From a9036083e6e1addaea693ebf1e4162f02e327098 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Tue, 18 Mar 2025 17:28:55 +0300 Subject: [PATCH 01/12] Init --- .openapi-generator-ignore | 10 +- .openapi-generator/FILES | 179 +- .openapi-generator/VERSION | 2 +- csharp-generator-config.json | 9 +- .../Api/DefaultApi.cs | 315 - .../Api/HealthcheckApi.cs | 883 ++ .../Api/IApi.cs | 15 + .../Api/ProcessApi.cs | 508 +- .../Api/TransactionApi.cs | 1866 ++++ .../Client/ApiClient.cs | 547 -- .../Client/ApiException.cs | 52 +- .../Client/ApiFactory.cs | 49 + .../Client/ApiResponse.cs | 66 - .../Client/ApiResponseEventArgs.cs | 24 + .../Client/ApiResponse`1.cs | 192 + .../Client/ClientUtils.cs | 396 + .../Client/Configuration.cs | 438 - .../Client/CookieContainer.cs | 20 + .../Client/DateOnlyJsonConverter.cs | 61 + .../Client/DateOnlyNullableJsonConverter.cs | 66 + .../Client/DateTimeJsonConverter.cs | 75 + .../Client/DateTimeNullableJsonConverter.cs | 80 + .../Client/ExceptionEventArgs.cs | 24 + .../Client/ExceptionFactory.cs | 24 - .../Client/GlobalConfiguration.cs | 34 - .../Client/HostConfiguration.cs | 409 + .../Client/IApiAccessor.cs | 42 - .../Client/IReadableConfiguration.cs | 94 - .../Client/JsonSerializerOptionsProvider.cs | 27 + .../Client/OpenAPIDateConverter.cs | 30 - .../Client/Option.cs | 53 + .../Client/RateLimitProvider`1.cs | 56 + .../Client/TokenBase.cs | 71 + .../Client/TokenContainer`1.cs | 37 + .../Client/TokenProvider`1.cs | 44 + .../Extensions/IHostBuilderExtensions.cs | 59 + .../IHttpClientBuilderExtensions.cs | 79 + .../IServiceCollectionExtensions.cs | 73 + .../Model/AreaArray.cs | 219 +- .../Model/AreaContainer.cs | 222 +- .../Model/AuthParams.cs | 659 +- .../Model/AuthenticityCheckList.cs | 206 +- .../Model/AuthenticityCheckListItem.cs | 165 + .../Model/AuthenticityCheckResult.cs | 285 +- .../Model/AuthenticityCheckResultItem.cs | 351 +- .../Model/AuthenticityCheckResultListInner.cs | 522 ++ .../Model/AuthenticityResult.cs | 240 +- .../Model/AuthenticityResultType.cs | 461 +- .../Model/BarCodeModuleType.cs | 202 + .../Model/BarcodeType.cs | 379 + .../Model/BcPDF417INFO.cs | 291 +- .../Model/BcROIDETECT.cs | 239 +- .../Model/BinaryData.cs | 2189 +++++ .../Model/BinaryDataResult.cs | 142 - .../Model/ByteArrayItem.cs | 164 + .../Model/ByteArrayResult.cs | 239 +- .../Model/CandidatesListItem.cs | 172 + .../Model/CertificateData.cs | 187 + .../Model/CheckDiagnose.cs | 1597 +++- .../Model/CheckResult.cs | 176 +- .../Model/ChosenDocumentType.cs | 474 +- .../Model/ChosenDocumentTypeResult.cs | 264 +- .../Model/ContainerList.cs | 222 +- .../Model/ContainerListListInner.cs | 1188 +++ .../Model/Critical.cs | 164 +- .../Model/CrossSourceValueComparison.cs | 257 +- .../Model/DataModule.cs | 291 +- .../Model/DetailsOptical.cs | 481 +- .../Model/DetailsRFID.cs | 415 +- .../Model/DeviceInfo.cs | 351 +- .../Model/DeviceInfo2.cs | 221 - .../Model/DocBarCodeInfo.cs | 237 +- .../Model/DocBarCodeInfoFieldsList.cs | 192 +- .../Model/DocBarCodeInfoItem.cs | 165 + .../Model/DocGraphicsInfoItem.cs | 165 + .../Model/DocVisualExtendedField.cs | 490 +- .../Model/DocVisualExtendedFieldItem.cs | 165 + .../Model/DocVisualExtendedInfo.cs | 203 +- .../Model/DocVisualExtendedInfoItem.cs | 165 + .../Model/DocumentBinaryInfoResult.cs | 216 + .../Model/DocumentFormat.cs | 307 +- .../Model/DocumentImage.cs | 213 +- .../Model/DocumentImageResult.cs | 240 +- .../Model/DocumentPosition.cs | 558 +- .../Model/DocumentPositionItem.cs | 165 + .../Model/DocumentPositionResult.cs | 231 +- .../Model/DocumentType.cs | 2898 +++++- .../Model/DocumentTypeRecognitionResult.cs | 176 +- .../Model/DocumentTypesCandidates.cs | 209 +- .../Model/DocumentTypesCandidatesList.cs | 209 +- .../Model/DocumentTypesCandidatesResult.cs | 239 +- .../Model/DocumentsDatabase.cs | 277 +- .../Model/EncryptedRCLItem.cs | 167 + .../Model/EncryptedRCLResult.cs | 243 +- .../Model/ErrorCoordinates.cs | 247 + .../Model/FDSIDList.cs | 551 +- .../Model/FaceApi.cs | 473 +- .../Model/FaceApiSearch.cs | 239 +- .../Model/FaceDetection.cs | 262 + .../Model/FaceDetectionItem.cs | 165 + .../Model/FaceDetectionResult.cs | 216 + .../Model/FaceItem.cs | 326 + .../Model/FiberItem.cs | 374 + .../Model/FiberResult.cs | 486 +- .../Model/FieldItem.cs | 271 + .../Model/FileImage.cs | 185 + .../Model/GetTransactionsByTagResponse.cs | 235 +- .../Model/GraphData.cs | 296 + .../Model/GraphicField.cs | 342 +- .../Model/GraphicFieldType.cs | 463 +- .../Model/GraphicFieldsList.cs | 202 +- .../Model/GraphicsResult.cs | 240 +- .../Model/Healthcheck.cs | 476 +- .../Model/HealthcheckDocumentsDatabase.cs | 293 +- .../Model/IdentItem.cs | 302 + .../Model/IdentResult.cs | 397 +- .../Model/ImageData.cs | 213 +- .../Model/ImageQA.cs | 432 +- .../Model/ImageQualityCheck.cs | 359 +- .../Model/ImageQualityCheckList.cs | 241 +- .../Model/ImageQualityCheckListItem.cs | 165 + .../Model/ImageQualityCheckType.cs | 236 +- .../Model/ImageQualityChecks.cs | 164 - .../Model/ImageQualityResult.cs | 240 +- .../Model/ImageTransactionData.cs | 172 +- .../Model/Images.cs | 274 +- .../Model/ImagesAvailableSource.cs | 223 +- .../Model/ImagesField.cs | 289 +- .../Model/ImagesFieldValue.cs | 497 +- .../Model/ImagesItem.cs | 165 + .../Model/ImagesResult.cs | 240 +- .../Model/InData.cs | 211 +- .../Model/InDataRfidSession.cs | 125 - .../InDataTransactionImagesFieldValue.cs | 268 +- .../Model/InDataVideo.cs | 207 +- .../Model/InlineResponse200.cs | 172 - .../Model/InlineResponse2001.cs | 256 - .../Model/InputBarcodeType.cs | 428 + .../Model/InputImageQualityChecks.cs | 218 +- .../Model/LCID.cs | 2107 ++++- .../Model/LexicalAnalysisResult.cs | 231 +- .../Model/LicenseItem.cs | 167 + .../Model/LicenseResult.cs | 243 +- .../Model/Light.cs | 606 +- .../Model/ListTransactionsByTagResponse.cs | 212 +- .../Model/ListVerifiedFields.cs | 217 +- .../Model/ListVerifiedFieldsItem.cs | 165 + .../Model/LivenessParams.cs | 295 +- .../Model/LogLevel.cs | 215 +- .../Model/MRZDetectorResult.cs | 216 + .../Model/MRZFormat.cs | 230 +- .../Model/MRZPositionResult.cs | 216 + .../Model/MRZRowsItem.cs | 209 + .../Model/MRZTestQuality.cs | 362 + .../Model/MRZTestQualityItem.cs | 165 + .../Model/MRZTestQualityResult.cs | 216 + .../Model/MeasureSystem.cs | 164 +- .../Model/MrzDetectModeEnum.cs | 165 +- .../Model/MrzPosition.cs | 514 ++ .../Model/MrzPositionItem.cs | 165 + .../Model/OCRSecurityTextItem.cs | 405 + .../Model/OCRSecurityTextResult.cs | 506 +- .../Model/OneCandidate.cs | 474 +- .../Model/OneCandidateItem.cs | 193 + .../Model/OriginalGraphicsResult.cs | 142 - .../Model/OriginalSymbol.cs | 244 +- .../Model/OutData.cs | 208 +- .../OutDataTransactionImagesFieldValue.cs | 304 +- .../Model/PArrayField.cs | 450 +- .../Model/ParsedData.cs | 172 + .../Model/ParsingNotificationCodes.cs | 2548 ++++-- .../Model/PerDocumentConfig.cs | 206 +- .../Model/PhotoIdentItem.cs | 432 + .../Model/PhotoIdentResult.cs | 534 +- .../Model/Point.cs | 187 +- .../Model/PointArray.cs | 166 +- .../Model/PointsContainer.cs | 206 +- .../Model/ProcessParams.cs | 2229 +++-- .../Model/ProcessParamsRfid.cs | 173 +- .../Model/ProcessRequest.cs | 613 +- .../Model/ProcessRequestImage.cs | 242 +- .../Model/ProcessResponse.cs | 483 +- .../Model/ProcessSystemInfo.cs | 205 +- .../Model/ProcessingStatus.cs | 176 +- .../Model/RFIDDocVisualExtendedField.cs | 410 + .../Model/RFIDDocVisualExtendedFieldItem.cs | 238 + .../Model/RFIDDocVisualExtendedInfo.cs | 188 + .../Model/RFIDDocVisualExtendedInfoItem.cs | 165 + .../Model/RFIDErrorCodes.cs | 1402 +++ .../Model/RFIDGraphicsInfoResult.cs | 216 + .../Model/RFIDPKDResourceType.cs | 236 + .../Model/RFIDTextDataResult.cs | 216 + .../Model/RawDataResult.cs | 142 - .../Model/RawImageContainerItem.cs | 165 + .../Model/RawImageContainerList.cs | 192 +- .../Model/RawResultItem.cs | 99 - .../Model/RectangleCoordinates.cs | 280 +- .../Model/Result.cs | 558 +- .../Model/ResultItem.cs | 522 +- .../Model/ResultMRZDetector.cs | 234 + .../Model/ResultMRZDetectorItem.cs | 165 + .../Model/RfidAChip.cs | 214 + .../Model/RfidAccessControlInfo.cs | 275 + .../Model/RfidAccessControlProcedureType.cs | 236 + .../Model/RfidAccessKey.cs | 235 + .../Model/RfidApplication.cs | 314 + .../Model/RfidApplicationType.cs | 258 + .../Model/RfidAttributeData.cs | 189 + .../Model/RfidAttributeName.cs | 190 + .../Model/RfidAuthenticationProcedureType.cs | 192 + .../Model/RfidBaudRate.cs | 203 + .../Model/RfidCardPropertiesExt.cs | 480 + .../Model/RfidCertificateEx.cs | 461 + .../Model/RfidCertificateOrigin.cs | 247 + .../Model/RfidCertificateType.cs | 236 + .../Model/RfidDG1.cs | 527 ++ .../Model/RfidDataFile.cs | 504 ++ .../Model/RfidDataFileType.cs | 1160 +++ .../Model/RfidDataGroupTypeTag.cs | 753 ++ .../Model/RfidDistinguishedName.cs | 216 + .../Model/RfidLocation.cs | 176 +- .../Model/RfidOrigin.cs | 253 +- .../Model/RfidPasswordType.cs | 225 + .../Model/RfidPkiExtension.cs | 189 + .../Model/RfidRawData.cs | 185 + .../Model/RfidSecurityObject.cs | 263 + .../Model/RfidSessionData.cs | 586 ++ .../Model/RfidSignerInfoEx.cs | 439 + .../Model/RfidTerminal.cs | 209 + .../Model/RfidTerminalType.cs | 203 + .../Model/RfidType.cs | 181 + .../Model/RfidValidity.cs | 190 + .../Model/Scenario.cs | 424 +- .../Model/SecurityFeatureItem.cs | 295 + .../Model/SecurityFeatureResult.cs | 388 +- .../Model/SecurityFeatureType.cs | 737 +- .../Model/SecurityObjectCertificates.cs | 172 + .../Model/Source.cs | 229 +- .../Model/SourceValidity.cs | 218 +- .../Model/Status.cs | 391 +- .../Model/StatusItem.cs | 165 + .../Model/StatusResult.cs | 240 +- .../Model/StringItem.cs | 526 ++ .../Model/StringRecognitionResult.cs | 287 +- .../Model/Symbol.cs | 165 + .../Model/SymbolCandidate.cs | 284 +- .../Model/SymbolEstimationItem.cs | 517 ++ .../Model/SymbolRecognitionResult.cs | 321 +- .../Model/TBinaryData.cs | 172 - .../Model/TDocBinaryInfo.cs | 204 + .../Model/TDocBinaryInfoItem.cs | 165 + .../Model/TOriginalRFIDGraphics.cs | 236 - .../Model/TOriginalRFIDGraphicsInfo.cs | 165 + .../Model/TOriginalRFIDGraphicsInfoItem.cs | 165 + .../Model/Text.cs | 361 +- .../Model/TextAvailableSource.cs | 259 +- .../Model/TextDataResult.cs | 231 +- .../Model/TextField.cs | 559 +- .../Model/TextFieldType.cs | 7794 ++++++++++++++--- .../Model/TextFieldValue.cs | 513 +- .../Model/TextItem.cs | 165 + .../Model/TextPostProcessing.cs | 188 +- .../Model/TextResult.cs | 240 +- .../Model/TransactionImage.cs | 172 +- .../Model/TransactionImagesFieldValue.cs | 190 - .../Model/TransactionInfo.cs | 416 +- .../Model/TransactionProcessGetResponse.cs | 278 +- .../Model/TransactionProcessRequest.cs | 435 +- .../Model/TransactionProcessResponse.cs | 288 + .../Model/TransactionProcessResponseItem.cs | 161 + .../Model/TransactionProcessResult.cs | 259 + .../Model/TransactionScenarioRequest.cs | 124 - .../Model/TrfFtBytes.cs | 230 + .../Model/TrfFtString.cs | 249 + .../Model/VerificationResult.cs | 200 +- .../Model/VerifiedFieldMap.cs | 401 +- .../Model/Visibility.cs | 200 +- .../Model/VisualExtendedFieldItem.cs | 471 + update-models.sh | 23 +- 279 files changed, 77021 insertions(+), 19457 deletions(-) delete mode 100644 src/Regula.DocumentReader.WebClient/Api/DefaultApi.cs create mode 100644 src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs create mode 100644 src/Regula.DocumentReader.WebClient/Api/IApi.cs create mode 100644 src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiClient.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/Configuration.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/Option.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/TokenBase.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs create mode 100644 src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs create mode 100644 src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs create mode 100644 src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/BinaryData.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/BinaryDataResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/CertificateData.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/FaceItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/FiberItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/FieldItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/FileImage.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/GraphData.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/IdentItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/ImageQualityChecks.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/InDataRfidSession.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/InlineResponse200.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/InlineResponse2001.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/OriginalGraphicsResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ParsedData.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/RawDataResult.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/RawResultItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidType.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/StatusItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/StringItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/Symbol.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/TBinaryData.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphics.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TextItem.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/TransactionImagesFieldValue.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/TransactionScenarioRequest.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 88a8a0b..d4704a1 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -1,20 +1,16 @@ docs/** .gitignore .travis.yml +appveyor.yml build.bat build.sh git_push.sh mono_nunit_test.sh README.md Regula.DocumentReader.WebClient.sln +api/openapi.yaml src/Regula.DocumentReader.WebClient.Test/** src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.nuspec src/Regula.DocumentReader.WebClient/packages.config -src/Regula.DocumentReader.WebClient/Properties/** - -# generator bugs, require manual change -src/Regula.DocumentReader.WebClient/Model/ContainerList.cs -src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs -**/*AllOf.cs -src/Regula.DocumentReader.WebClient/Model/ResultItem.cs \ No newline at end of file +src/Regula.DocumentReader.WebClient/README.md \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index cac2b82..b4c920a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,22 +1,54 @@ -src/Regula.DocumentReader.WebClient/Api/DefaultApi.cs +src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs +src/Regula.DocumentReader.WebClient/Api/IApi.cs src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs -src/Regula.DocumentReader.WebClient/Client/ApiClient.cs +src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs src/Regula.DocumentReader.WebClient/Client/ApiException.cs -src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs -src/Regula.DocumentReader.WebClient/Client/Configuration.cs -src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs -src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs -src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs -src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs -src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs +src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs +src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs +src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs +src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs +src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs +src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs +src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs +src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs +src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs +src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs +src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs +src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs +src/Regula.DocumentReader.WebClient/Client/Option.cs +src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs +src/Regula.DocumentReader.WebClient/Client/TokenBase.cs +src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs +src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs +src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs +src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs +src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs src/Regula.DocumentReader.WebClient/Model/AreaArray.cs src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs +src/Regula.DocumentReader.WebClient/Model/AuthParams.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs +src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs +src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs +src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs +src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs +src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs +src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs +src/Regula.DocumentReader.WebClient/Model/BinaryData.cs +src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs +src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs +src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs +src/Regula.DocumentReader.WebClient/Model/CertificateData.cs +src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs +src/Regula.DocumentReader.WebClient/Model/CheckResult.cs src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs +src/Regula.DocumentReader.WebClient/Model/ContainerList.cs +src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs +src/Regula.DocumentReader.WebClient/Model/Critical.cs src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs src/Regula.DocumentReader.WebClient/Model/DataModule.cs src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs @@ -24,43 +56,101 @@ src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs +src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs +src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs +src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs +src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs +src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs +src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs +src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs +src/Regula.DocumentReader.WebClient/Model/DocumentType.cs +src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs +src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs +src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs src/Regula.DocumentReader.WebClient/Model/FaceApi.cs src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs +src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs +src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs +src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs +src/Regula.DocumentReader.WebClient/Model/FaceItem.cs +src/Regula.DocumentReader.WebClient/Model/FiberItem.cs src/Regula.DocumentReader.WebClient/Model/FiberResult.cs +src/Regula.DocumentReader.WebClient/Model/FieldItem.cs +src/Regula.DocumentReader.WebClient/Model/FileImage.cs +src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs +src/Regula.DocumentReader.WebClient/Model/GraphData.cs src/Regula.DocumentReader.WebClient/Model/GraphicField.cs +src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs +src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs +src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs +src/Regula.DocumentReader.WebClient/Model/IdentItem.cs src/Regula.DocumentReader.WebClient/Model/IdentResult.cs src/Regula.DocumentReader.WebClient/Model/ImageData.cs src/Regula.DocumentReader.WebClient/Model/ImageQA.cs src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs +src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs +src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs +src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs src/Regula.DocumentReader.WebClient/Model/Images.cs src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs src/Regula.DocumentReader.WebClient/Model/ImagesField.cs src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs +src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs +src/Regula.DocumentReader.WebClient/Model/InData.cs +src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs +src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs +src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs +src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs +src/Regula.DocumentReader.WebClient/Model/LCID.cs src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs +src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +src/Regula.DocumentReader.WebClient/Model/Light.cs +src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs +src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs +src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs +src/Regula.DocumentReader.WebClient/Model/LogLevel.cs +src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs +src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs +src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs +src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs +src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs +src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs +src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs +src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs +src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs +src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs +src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs +src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs +src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs +src/Regula.DocumentReader.WebClient/Model/OutData.cs +src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs src/Regula.DocumentReader.WebClient/Model/PArrayField.cs +src/Regula.DocumentReader.WebClient/Model/ParsedData.cs src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs +src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs src/Regula.DocumentReader.WebClient/Model/Point.cs src/Regula.DocumentReader.WebClient/Model/PointArray.cs @@ -71,21 +161,92 @@ src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs +src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs +src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs +src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs +src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs +src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs +src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs +src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs +src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs +src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs +src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs +src/Regula.DocumentReader.WebClient/Model/Result.cs +src/Regula.DocumentReader.WebClient/Model/ResultItem.cs +src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs +src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs +src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs +src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs +src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs +src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs +src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs +src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs +src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs +src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs +src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs +src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs +src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs +src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs +src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs +src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs +src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs +src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs +src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs +src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs +src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs +src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs +src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs +src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs +src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs +src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs +src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs +src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs +src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs +src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs +src/Regula.DocumentReader.WebClient/Model/RfidType.cs +src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs +src/Regula.DocumentReader.WebClient/Model/Scenario.cs +src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs +src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs +src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs +src/Regula.DocumentReader.WebClient/Model/Source.cs src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs src/Regula.DocumentReader.WebClient/Model/Status.cs +src/Regula.DocumentReader.WebClient/Model/StatusItem.cs src/Regula.DocumentReader.WebClient/Model/StatusResult.cs +src/Regula.DocumentReader.WebClient/Model/StringItem.cs src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs +src/Regula.DocumentReader.WebClient/Model/Symbol.cs src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs +src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs +src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs +src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs +src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs +src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs src/Regula.DocumentReader.WebClient/Model/Text.cs src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs src/Regula.DocumentReader.WebClient/Model/TextField.cs +src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs +src/Regula.DocumentReader.WebClient/Model/TextItem.cs +src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs src/Regula.DocumentReader.WebClient/Model/TextResult.cs +src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs +src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs +src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs +src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs +src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs +src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs +src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs +src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs +src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs +src/Regula.DocumentReader.WebClient/Model/Visibility.cs +src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION index 28cbf7c..5f84a81 100644 --- a/.openapi-generator/VERSION +++ b/.openapi-generator/VERSION @@ -1 +1 @@ -5.0.0 \ No newline at end of file +7.12.0 diff --git a/csharp-generator-config.json b/csharp-generator-config.json index ac0fdf0..484feb8 100644 --- a/csharp-generator-config.json +++ b/csharp-generator-config.json @@ -1,9 +1,8 @@ { "packageName": "Regula.DocumentReader.WebClient", - "typeMappings": { - "boolean": "bool?" - }, "nullableReferenceTypes": true, - "optionalAssemblyInfo": true, - "isRestSharp_106_10_1_above" :true + "typeMappings" : { + "ContainerListListInner": "ResultItem", + "AuthenticityCheckResultListInner": "AuthenticityCheckResultItem" + } } \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Api/DefaultApi.cs b/src/Regula.DocumentReader.WebClient/Api/DefaultApi.cs deleted file mode 100644 index 7d1bd94..0000000 --- a/src/Regula.DocumentReader.WebClient/Api/DefaultApi.cs +++ /dev/null @@ -1,315 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Regula.DocumentReader.WebClient.Client; -using Regula.DocumentReader.WebClient.Model; - -namespace Regula.DocumentReader.WebClient.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IDefaultApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Server health check - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// DeviceInfo - DeviceInfo Ping(Dictionary headers, string xRequestID = default(string)); - - /// - /// Server health check - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of DeviceInfo - ApiResponse PingWithHttpInfo(Dictionary headers, string xRequestID = default(string)); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Server health check - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of DeviceInfo - System.Threading.Tasks.Task PingAsync(string xRequestID = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Server health check - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (DeviceInfo) - System.Threading.Tasks.Task> PingWithHttpInfoAsync(string xRequestID = default(string), CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class DefaultApi : IDefaultApi - { - private Regula.DocumentReader.WebClient.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public DefaultApi(String basePath) - { - this.Configuration = new Regula.DocumentReader.WebClient.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public DefaultApi() - { - this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.Default; - - ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public DefaultApi(Regula.DocumentReader.WebClient.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Regula.DocumentReader.WebClient.Client.Configuration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Regula.DocumentReader.WebClient.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Server health check - /// - /// Thrown when fails to make API call - /// (optional) - /// DeviceInfo - public DeviceInfo Ping(Dictionary headers, string xRequestID = default(string)) - { - ApiResponse localVarResponse = PingWithHttpInfo(headers, xRequestID); - return localVarResponse.Data; - } - - public ApiResponse SaveResponse(RestResponse response) - { - int localVarStatusCode = (int)response.StatusCode; - return new ApiResponse(localVarStatusCode, - response.Headers.ToDictionarySafe(x => x.Name, x => string.Join(",", x.Value)), - (DeviceInfo)this.Configuration.ApiClient.Deserialize(response, typeof(DeviceInfo))); - } - /// - /// Server health check - /// - /// Thrown when fails to make API call - /// (optional) - /// ApiResponse of DeviceInfo - public ApiResponse PingWithHttpInfo(Dictionary headers, string xRequestID = default(string)) - { - - var localVarPath = "/api/ping"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = this.Configuration.DefaultHeader.Union(headers).ToDictionary(k => k.Key, v => v.Value); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept; - - if (xRequestID != null) - localVarHeaderParams["X-RequestID"] = this.Configuration.ApiClient.ParameterToString(xRequestID); // header parameter - - // make the HTTP request - RestResponse localVarResponse = (RestResponse)this.Configuration.ApiClient.CallApi(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Ping", localVarResponse); - if (exception != null) throw exception; - } - return SaveResponse(localVarResponse); - } - /// - /// Server health check - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of DeviceInfo - public async System.Threading.Tasks.Task PingAsync(string xRequestID = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await PingWithHttpInfoAsync(xRequestID, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Server health check - /// - /// Thrown when fails to make API call - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (DeviceInfo) - public async System.Threading.Tasks.Task> PingWithHttpInfoAsync(string xRequestID = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/api/ping"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept; - - if (xRequestID != null) localVarHeaderParams["X-RequestID"] = this.Configuration.ApiClient.ParameterToString(xRequestID); // header parameter - - - // make the HTTP request - RestResponse localVarResponse = (RestResponse)await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.Get, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int)localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Ping", localVarResponse); - if (exception != null) throw exception; - } - - return SaveResponse(localVarResponse); - } - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs new file mode 100644 index 0000000..d7c12c4 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs @@ -0,0 +1,883 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Net; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text.Json; +using Regula.DocumentReader.WebClient.Client; +using Regula.DocumentReader.WebClient.Model; +using System.Diagnostics.CodeAnalysis; + +namespace Regula.DocumentReader.WebClient.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. + /// + public interface IHealthcheckApi : IApi + { + /// + /// The class containing the events + /// + HealthcheckApiEvents Events { get; } + + /// + /// Server health check + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + Task HealthzAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Server health check + /// + /// + /// + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// <?> + Task HealthzOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Server health check + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + [Obsolete] + Task PingAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Server health check + /// + /// + /// + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// <?> + [Obsolete] + Task PingOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + + /// + /// License health check + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + Task ReadyzAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + + /// + /// License health check + /// + /// + /// + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// <?> + Task ReadyzOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + } + + /// + /// The + /// + public interface IHealthzApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + { + /// + /// Returns true if the response is 200 Ok + /// + /// + bool IsOk { get; } + } + + /// + /// The + /// + public interface IPingApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + { + /// + /// Returns true if the response is 200 Ok + /// + /// + bool IsOk { get; } + } + + /// + /// The + /// + public interface IReadyzApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse + { + /// + /// Returns true if the response is 200 Ok + /// + /// + bool IsOk { get; } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + bool IsBadRequest { get; } + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public class HealthcheckApiEvents + { + /// + /// The event raised after the server response + /// + public event EventHandler? OnHealthz; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorHealthz; + + internal void ExecuteOnHealthz(HealthcheckApi.HealthzApiResponse apiResponse) + { + OnHealthz?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorHealthz(Exception exception) + { + OnErrorHealthz?.Invoke(this, new ExceptionEventArgs(exception)); + } + + /// + /// The event raised after the server response + /// + public event EventHandler? OnPing; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorPing; + + internal void ExecuteOnPing(HealthcheckApi.PingApiResponse apiResponse) + { + OnPing?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorPing(Exception exception) + { + OnErrorPing?.Invoke(this, new ExceptionEventArgs(exception)); + } + + /// + /// The event raised after the server response + /// + public event EventHandler? OnReadyz; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorReadyz; + + internal void ExecuteOnReadyz(HealthcheckApi.ReadyzApiResponse apiResponse) + { + OnReadyz?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorReadyz(Exception exception) + { + OnErrorReadyz?.Invoke(this, new ExceptionEventArgs(exception)); + } + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public sealed partial class HealthcheckApi : IHealthcheckApi + { + private JsonSerializerOptions _jsonSerializerOptions; + + /// + /// The logger factory + /// + public ILoggerFactory LoggerFactory { get; } + + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The HttpClient + /// + public HttpClient HttpClient { get; } + + /// + /// The class containing the events + /// + public HealthcheckApiEvents Events { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public HealthcheckApi(ILogger logger, ILoggerFactory loggerFactory, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, HealthcheckApiEvents healthcheckApiEvents) + { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; + LoggerFactory = loggerFactory; + Logger = LoggerFactory.CreateLogger(); + HttpClient = httpClient; + Events = healthcheckApiEvents; + } + + partial void FormatHealthz(ref Option xRequestID); + + /// + /// Validates the request parameters + /// + /// + /// + private void ValidateHealthz(Option xRequestID) + { + if (xRequestID.IsSet && xRequestID.Value == null) + throw new ArgumentNullException(nameof(xRequestID)); + } + + /// + /// Processes the server response + /// + /// + /// + private void AfterHealthzDefaultImplementation(IHealthzApiResponse apiResponseLocalVar, Option xRequestID) + { + bool suppressDefaultLog = false; + AfterHealthz(ref suppressDefaultLog, apiResponseLocalVar, xRequestID); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + partial void AfterHealthz(ref bool suppressDefaultLog, IHealthzApiResponse apiResponseLocalVar, Option xRequestID); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + private void OnErrorHealthzDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID) + { + bool suppressDefaultLogLocalVar = false; + OnErrorHealthz(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, xRequestID); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + partial void OnErrorHealthz(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID); + + /// + /// Server health check + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + public async Task HealthzOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await HealthzAsync(xRequestID, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// Server health check + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + public async Task HealthzAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + ValidateHealthz(xRequestID); + + FormatHealthz(ref xRequestID); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/healthz"; + + if (xRequestID.IsSet) + httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] acceptLocalVars = new string[] { + "application/json" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + HealthzApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/healthz", requestedAtLocalVar, _jsonSerializerOptions); + + AfterHealthzDefaultImplementation(apiResponseLocalVar, xRequestID); + + Events.ExecuteOnHealthz(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorHealthzDefaultImplementation(e, "/api/healthz", uriBuilderLocalVar.Path, xRequestID); + Events.ExecuteOnErrorHealthz(e); + throw; + } + } + + /// + /// The + /// + public partial class HealthzApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IHealthzApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public HealthzApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 200 Ok + /// + /// + public Regula.DocumentReader.WebClient.Model.Healthcheck? Ok() + { + // This logic may be modified with the AsModel.mustache template + return IsOk + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + /// + /// Returns true if the response is 200 Ok and the deserialized response is not null + /// + /// + /// + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.Healthcheck? result) + { + result = null; + + try + { + result = Ok(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); + } + + return result != null; + } + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + + partial void FormatPing(ref Option xRequestID); + + /// + /// Validates the request parameters + /// + /// + /// + private void ValidatePing(Option xRequestID) + { + if (xRequestID.IsSet && xRequestID.Value == null) + throw new ArgumentNullException(nameof(xRequestID)); + } + + /// + /// Processes the server response + /// + /// + /// + private void AfterPingDefaultImplementation(IPingApiResponse apiResponseLocalVar, Option xRequestID) + { + bool suppressDefaultLog = false; + AfterPing(ref suppressDefaultLog, apiResponseLocalVar, xRequestID); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + partial void AfterPing(ref bool suppressDefaultLog, IPingApiResponse apiResponseLocalVar, Option xRequestID); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + private void OnErrorPingDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID) + { + bool suppressDefaultLogLocalVar = false; + OnErrorPing(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, xRequestID); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + partial void OnErrorPing(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID); + + /// + /// Server health check + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + public async Task PingOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await PingAsync(xRequestID, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// Server health check + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + public async Task PingAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + ValidatePing(xRequestID); + + FormatPing(ref xRequestID); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/ping"; + + if (xRequestID.IsSet) + httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] acceptLocalVars = new string[] { + "application/json" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + PingApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/ping", requestedAtLocalVar, _jsonSerializerOptions); + + AfterPingDefaultImplementation(apiResponseLocalVar, xRequestID); + + Events.ExecuteOnPing(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorPingDefaultImplementation(e, "/api/ping", uriBuilderLocalVar.Path, xRequestID); + Events.ExecuteOnErrorPing(e); + throw; + } + } + + /// + /// The + /// + public partial class PingApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IPingApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public PingApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 200 Ok + /// + /// + public Regula.DocumentReader.WebClient.Model.DeviceInfo? Ok() + { + // This logic may be modified with the AsModel.mustache template + return IsOk + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + /// + /// Returns true if the response is 200 Ok and the deserialized response is not null + /// + /// + /// + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.DeviceInfo? result) + { + result = null; + + try + { + result = Ok(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); + } + + return result != null; + } + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + + partial void FormatReadyz(ref Option xRequestID); + + /// + /// Validates the request parameters + /// + /// + /// + private void ValidateReadyz(Option xRequestID) + { + if (xRequestID.IsSet && xRequestID.Value == null) + throw new ArgumentNullException(nameof(xRequestID)); + } + + /// + /// Processes the server response + /// + /// + /// + private void AfterReadyzDefaultImplementation(IReadyzApiResponse apiResponseLocalVar, Option xRequestID) + { + bool suppressDefaultLog = false; + AfterReadyz(ref suppressDefaultLog, apiResponseLocalVar, xRequestID); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + partial void AfterReadyz(ref bool suppressDefaultLog, IReadyzApiResponse apiResponseLocalVar, Option xRequestID); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + private void OnErrorReadyzDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID) + { + bool suppressDefaultLogLocalVar = false; + OnErrorReadyz(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, xRequestID); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + partial void OnErrorReadyz(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID); + + /// + /// License health check + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + public async Task ReadyzOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await ReadyzAsync(xRequestID, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// License health check + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// <> + public async Task ReadyzAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + ValidateReadyz(xRequestID); + + FormatReadyz(ref xRequestID); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/readyz"; + + if (xRequestID.IsSet) + httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + httpRequestMessageLocalVar.Method = HttpMethod.Get; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + ReadyzApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/readyz", requestedAtLocalVar, _jsonSerializerOptions); + + AfterReadyzDefaultImplementation(apiResponseLocalVar, xRequestID); + + Events.ExecuteOnReadyz(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorReadyzDefaultImplementation(e, "/api/readyz", uriBuilderLocalVar.Path, xRequestID); + Events.ExecuteOnErrorReadyz(e); + throw; + } + } + + /// + /// The + /// + public partial class ReadyzApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IReadyzApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public ReadyzApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + public bool IsBadRequest => 400 == (int)StatusCode; + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Api/IApi.cs b/src/Regula.DocumentReader.WebClient/Api/IApi.cs new file mode 100644 index 0000000..91406aa --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Api/IApi.cs @@ -0,0 +1,15 @@ +using System.Net.Http; + +namespace Regula.DocumentReader.WebClient.Api +{ + /// + /// Any Api client + /// + public interface IApi + { + /// + /// The HttpClient + /// + HttpClient HttpClient { get; } + } +} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs index 7bc15df..edfeb78 100644 --- a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs @@ -1,41 +1,39 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.9.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; +using System.Net; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text.Json; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; +using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { /// /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. /// - public interface IProcessApi : IApiAccessor + public interface IProcessApi : IApi { - #region Synchronous Operations /// - /// Process list of documents images and return extracted data + /// The class containing the events /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ProcessResponse - ProcessResponse ApiProcess (ProcessRequest processRequest, Dictionary headers, string xRequestID = default(string)); + ProcessApiEvents Events { get; } /// /// Process list of documents images and return extracted data @@ -43,25 +41,12 @@ public interface IProcessApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call - /// - /// (optional) - /// ApiResponse of ProcessResponse - ApiResponse ApiProcessWithHttpInfo (ProcessRequest processRequest, Dictionary headers, string xRequestID = default(string)); - #endregion Synchronous Operation, - #region Asynchronous Operations - /// - /// Process list of documents images and return extracted data - /// - /// - /// - /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ProcessResponse - System.Threading.Tasks.Task ApiProcessAsync (ProcessRequest processRequest, Dictionary headers, string xRequestID = default(string), CancellationToken cancellationToken = default(CancellationToken)); + /// Cancellation Token to cancel the request. + /// <> + Task ApiProcessAsync(ProcessRequest processRequest, Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); /// /// Process list of documents images and return extracted data @@ -69,283 +54,356 @@ public interface IProcessApi : IApiAccessor /// /// /// - /// Thrown when fails to make API call /// /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ProcessResponse) - System.Threading.Tasks.Task> ApiProcessWithHttpInfoAsync (ProcessRequest processRequest, Dictionary headers, string xRequestID = default(string), CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations + /// Cancellation Token to cancel the request. + /// <?> + Task ApiProcessOrDefaultAsync(ProcessRequest processRequest, Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); } /// - /// Represents a collection of functions to interact with the API endpoints + /// The /// - public partial class ProcessApi : IProcessApi + public interface IApiProcessApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk { - private Regula.DocumentReader.WebClient.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - /// - /// Initializes a new instance of the class. + /// Returns true if the response is 200 Ok /// /// - public ProcessApi(String basePath) - { - this.Configuration = new Regula.DocumentReader.WebClient.Client.Configuration { BasePath = basePath }; + bool IsOk { get; } - ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; - } + /// + /// Returns true if the response is 400 BadRequest + /// + /// + bool IsBadRequest { get; } /// - /// Initializes a new instance of the class + /// Returns true if the response is 403 Forbidden /// /// - public ProcessApi() - { - this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.Default; + bool IsForbidden { get; } + } - ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; - } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public class ProcessApiEvents + { + /// + /// The event raised after the server response + /// + public event EventHandler? OnApiProcess; /// - /// Initializes a new instance of the class - /// using Configuration object + /// The event raised after an error querying the server /// - /// An instance of Configuration - /// - public ProcessApi(Regula.DocumentReader.WebClient.Client.Configuration configuration = null) + public event EventHandler? OnErrorApiProcess; + + internal void ExecuteOnApiProcess(ProcessApi.ApiProcessApiResponse apiResponse) { - if (configuration == null) // use the default one in Configuration - this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.Default; - else - this.Configuration = configuration; + OnApiProcess?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } - ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + internal void ExecuteOnErrorApiProcess(Exception exception) + { + OnErrorApiProcess?.Invoke(this, new ExceptionEventArgs(exception)); } + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public sealed partial class ProcessApi : IProcessApi + { + private JsonSerializerOptions _jsonSerializerOptions; /// - /// Gets the base path of the API client. + /// The logger factory /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.Options.BaseUrl.ToString(); - } + public ILoggerFactory LoggerFactory { get; } /// - /// Sets the base path of the API client. + /// The logger /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } + public ILogger Logger { get; } /// - /// Gets or sets the configuration object + /// The HttpClient /// - /// An instance of the Configuration - public Regula.DocumentReader.WebClient.Client.Configuration Configuration {get; set;} + public HttpClient HttpClient { get; } /// - /// Provides a factory method hook for the creation of exceptions. + /// The class containing the events /// - public Regula.DocumentReader.WebClient.Client.ExceptionFactory ExceptionFactory + public ProcessApiEvents Events { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ProcessApi(ILogger logger, ILoggerFactory loggerFactory, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, ProcessApiEvents processApiEvents) { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; + LoggerFactory = loggerFactory; + Logger = LoggerFactory.CreateLogger(); + HttpClient = httpClient; + Events = processApiEvents; } + partial void FormatApiProcess(ProcessRequest processRequest, ref Option xRequestID); + /// - /// Gets the default header. + /// Validates the request parameters /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() + /// + /// + /// + private void ValidateApiProcess(ProcessRequest processRequest, Option xRequestID) { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); + if (processRequest == null) + throw new ArgumentNullException(nameof(processRequest)); + + if (xRequestID.IsSet && xRequestID.Value == null) + throw new ArgumentNullException(nameof(xRequestID)); } /// - /// Add default header. + /// Processes the server response /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) + /// + /// + /// + private void AfterApiProcessDefaultImplementation(IApiProcessApiResponse apiResponseLocalVar, ProcessRequest processRequest, Option xRequestID) { - this.Configuration.AddDefaultHeader(key, value); + bool suppressDefaultLog = false; + AfterApiProcess(ref suppressDefaultLog, apiResponseLocalVar, processRequest, xRequestID); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); } /// - /// Process list of documents images and return extracted data + /// Processes the server response /// - /// Thrown when fails to make API call + /// + /// /// - /// (optional) - /// ProcessResponse - public ProcessResponse ApiProcess (ProcessRequest processRequest, Dictionary headers, string xRequestID = default(string)) + /// + partial void AfterApiProcess(ref bool suppressDefaultLog, IApiProcessApiResponse apiResponseLocalVar, ProcessRequest processRequest, Option xRequestID); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + /// + private void OnErrorApiProcessDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, ProcessRequest processRequest, Option xRequestID) { - ApiResponse localVarResponse = ApiProcessWithHttpInfo(processRequest, headers, xRequestID); - return localVarResponse.Data; + bool suppressDefaultLogLocalVar = false; + OnErrorApiProcess(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, processRequest, xRequestID); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); } + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + /// + partial void OnErrorApiProcess(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, ProcessRequest processRequest, Option xRequestID); + /// /// Process list of documents images and return extracted data /// - /// Thrown when fails to make API call /// /// (optional) - /// ApiResponse of ProcessResponse - public ApiResponse ApiProcessWithHttpInfo (ProcessRequest processRequest, Dictionary headers, string xRequestID = default(string)) + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiProcessOrDefaultAsync(ProcessRequest processRequest, Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) { - // verify the required parameter 'processRequest' is set - if (processRequest == null) - throw new ApiException(400, "Missing required parameter 'processRequest' when calling ProcessApi->ApiProcess"); - - var localVarPath = "/api/process"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = this.Configuration.DefaultHeader.Union(headers).ToDictionary (k => k.Key, v => v.Value); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xRequestID != null) localVarHeaderParams.Add("X-RequestID", this.Configuration.ApiClient.ParameterToString(xRequestID)); // header parameter - if (processRequest != null && processRequest.GetType() != typeof(byte[])) + try { - localVarPostBody = this.Configuration.ApiClient.Serialize(processRequest); // http body (model) parameter + return await ApiProcessAsync(processRequest, xRequestID, cancellationToken).ConfigureAwait(false); } - else - { - localVarPostBody = processRequest; // byte array - } - - - // make the HTTP request - RestResponse localVarResponse = (RestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) + catch (Exception) { - Exception exception = ExceptionFactory("ApiProcess", localVarResponse); - if (exception != null) throw exception; + return null; } - - var rawResponse = localVarResponse.Content; - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionarySafe(x => x.Name, x => string.Join(",", x.Value)), - (ProcessResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProcessResponse)), rawResponse); } /// /// Process list of documents images and return extracted data /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ProcessResponse - public async System.Threading.Tasks.Task ApiProcessAsync (ProcessRequest processRequest, Dictionary headers, string xRequestID = default(string), CancellationToken cancellationToken = default(CancellationToken)) + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiProcessAsync(ProcessRequest processRequest, Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) { - ApiResponse localVarResponse = await ApiProcessWithHttpInfoAsync(processRequest, headers, xRequestID, cancellationToken); - return localVarResponse.Data; + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + ValidateApiProcess(processRequest, xRequestID); + + FormatApiProcess(processRequest, ref xRequestID); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/process"; + + if (xRequestID.IsSet) + httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); + + httpRequestMessageLocalVar.Content = (processRequest as object) is System.IO.Stream stream + ? httpRequestMessageLocalVar.Content = new StreamContent(stream) + : httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(processRequest, _jsonSerializerOptions)); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] contentTypes = new string[] { + "application/json" + }; + + string? contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes); + if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null) + httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar); + + string[] acceptLocalVars = new string[] { + "application/json" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Post; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + ApiProcessApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/process", requestedAtLocalVar, _jsonSerializerOptions); + + AfterApiProcessDefaultImplementation(apiResponseLocalVar, processRequest, xRequestID); + + Events.ExecuteOnApiProcess(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorApiProcessDefaultImplementation(e, "/api/process", uriBuilderLocalVar.Path, processRequest, xRequestID); + Events.ExecuteOnErrorApiProcess(e); + throw; + } } /// - /// Process list of documents images and return extracted data + /// The /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ProcessResponse) - public async System.Threading.Tasks.Task> ApiProcessWithHttpInfoAsync (ProcessRequest processRequest, Dictionary headers, string xRequestID = default(string), CancellationToken cancellationToken = default(CancellationToken)) + public partial class ApiProcessApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiProcessApiResponse { - // verify the required parameter 'processRequest' is set - if (processRequest == null) - throw new ApiException(400, "Missing required parameter 'processRequest' when calling ProcessApi->ApiProcess"); - - var localVarPath = "/api/process"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = this.Configuration.DefaultHeader.Union(headers).ToDictionarySafe(k => k.Key, v => v.Value); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams["Accept"] = localVarHttpHeaderAccept; - - if (xRequestID != null) - localVarHeaderParams["X-RequestID"] = this.Configuration.ApiClient.ParameterToString(xRequestID); // header parameter - - if (processRequest.GetType() != typeof(byte[])) + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public ApiProcessApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) { - localVarPostBody = this.Configuration.ApiClient.Serialize(processRequest); // http body (model) parameter + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); } - else + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 200 Ok + /// + /// + public Regula.DocumentReader.WebClient.Model.ProcessResponse? Ok() { - localVarPostBody = processRequest; // byte array + // This logic may be modified with the AsModel.mustache template + return IsOk + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; } + /// + /// Returns true if the response is 200 Ok and the deserialized response is not null + /// + /// + /// + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) + { + result = null; - // make the HTTP request - RestResponse localVarResponse = (RestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.Post, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); + try + { + result = Ok(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); + } - int localVarStatusCode = (int) localVarResponse.StatusCode; + return result != null; + } - if (ExceptionFactory != null) + /// + /// Returns true if the response is 400 BadRequest + /// + /// + public bool IsBadRequest => 400 == (int)StatusCode; + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + public bool IsForbidden => 403 == (int)StatusCode; + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) { - Exception exception = ExceptionFactory("ApiProcess", localVarResponse); - if (exception != null) throw exception; + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); } - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionarySafe(x => x.Name, x => string.Join(",", x.Value)), - (ProcessResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ProcessResponse))); + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); } - } } diff --git a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs new file mode 100644 index 0000000..aae8bb1 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs @@ -0,0 +1,1866 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Net; +using System.Threading.Tasks; +using Microsoft.Extensions.Logging; +using System.Net.Http; +using System.Net.Http.Headers; +using System.Text.Json; +using Regula.DocumentReader.WebClient.Client; +using Regula.DocumentReader.WebClient.Model; +using System.Diagnostics.CodeAnalysis; + +namespace Regula.DocumentReader.WebClient.Api +{ + /// + /// Represents a collection of functions to interact with the API endpoints + /// This class is registered as transient. + /// + public interface ITransactionApi : IApi + { + /// + /// The class containing the events + /// + TransactionApiEvents Events { get; } + + /// + /// Delete Reprocess transactions by tag + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Tag id + /// Cancellation Token to cancel the request. + /// <> + Task ApiV2TagTagIdDeleteAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Delete Reprocess transactions by tag + /// + /// + /// + /// + /// Tag id + /// Cancellation Token to cancel the request. + /// <?> + Task ApiV2TagTagIdDeleteOrDefaultAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Get transactions by tag + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Tag id + /// Cancellation Token to cancel the request. + /// <> + Task ApiV2TagTagIdTransactionsGetAsync(string tagId, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Get transactions by tag + /// + /// + /// + /// + /// Tag id + /// Cancellation Token to cancel the request. + /// <?> + Task ApiV2TagTagIdTransactionsGetOrDefaultAsync(string tagId, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Get Reprocess transaction file + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Transaction id + /// File name + /// Cancellation Token to cancel the request. + /// <> + Task ApiV2TransactionTransactionIdFileGetAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Get Reprocess transaction file + /// + /// + /// + /// + /// Transaction id + /// File name + /// Cancellation Token to cancel the request. + /// <?> + Task ApiV2TransactionTransactionIdFileGetOrDefaultAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Get Reprocess transaction data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Transaction id + /// Cancellation Token to cancel the request. + /// <> + Task ApiV2TransactionTransactionIdGetAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Get Reprocess transaction data + /// + /// + /// + /// + /// Transaction id + /// Cancellation Token to cancel the request. + /// <?> + Task ApiV2TransactionTransactionIdGetOrDefaultAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Reprocess + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Transaction id + /// + /// Cancellation Token to cancel the request. + /// <> + Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Reprocess + /// + /// + /// + /// + /// Transaction id + /// + /// Cancellation Token to cancel the request. + /// <?> + Task ApiV2TransactionTransactionIdProcessPostOrDefaultAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Get Reprocess transaction result + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Transaction id + /// With base64 images or url (optional) + /// Cancellation Token to cancel the request. + /// <> + Task ApiV2TransactionTransactionIdResultsGetAsync(Guid transactionId, Option withImages = default, System.Threading.CancellationToken cancellationToken = default); + + /// + /// Get Reprocess transaction result + /// + /// + /// + /// + /// Transaction id + /// With base64 images or url (optional) + /// Cancellation Token to cancel the request. + /// <?> + Task ApiV2TransactionTransactionIdResultsGetOrDefaultAsync(Guid transactionId, Option withImages = default, System.Threading.CancellationToken cancellationToken = default); + } + + /// + /// The + /// + public interface IApiV2TagTagIdDeleteApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, INoContent + { + /// + /// Returns true if the response is 204 NoContent + /// + /// + bool IsNoContent { get; } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + bool IsBadRequest { get; } + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + bool IsForbidden { get; } + } + + /// + /// The + /// + public interface IApiV2TagTagIdTransactionsGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + { + /// + /// Returns true if the response is 200 Ok + /// + /// + bool IsOk { get; } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + bool IsBadRequest { get; } + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + bool IsForbidden { get; } + } + + /// + /// The + /// + public interface IApiV2TransactionTransactionIdFileGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + { + /// + /// Returns true if the response is 200 Ok + /// + /// + bool IsOk { get; } + + /// + /// Returns true if the response is 404 NotFound + /// + /// + bool IsNotFound { get; } + } + + /// + /// The + /// + public interface IApiV2TransactionTransactionIdGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + { + /// + /// Returns true if the response is 200 Ok + /// + /// + bool IsOk { get; } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + bool IsBadRequest { get; } + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + bool IsForbidden { get; } + } + + /// + /// The + /// + public interface IApiV2TransactionTransactionIdProcessPostApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + { + /// + /// Returns true if the response is 200 Ok + /// + /// + bool IsOk { get; } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + bool IsBadRequest { get; } + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + bool IsForbidden { get; } + } + + /// + /// The + /// + public interface IApiV2TransactionTransactionIdResultsGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + { + /// + /// Returns true if the response is 200 Ok + /// + /// + bool IsOk { get; } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + bool IsBadRequest { get; } + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + bool IsForbidden { get; } + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public class TransactionApiEvents + { + /// + /// The event raised after the server response + /// + public event EventHandler? OnApiV2TagTagIdDelete; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorApiV2TagTagIdDelete; + + internal void ExecuteOnApiV2TagTagIdDelete(TransactionApi.ApiV2TagTagIdDeleteApiResponse apiResponse) + { + OnApiV2TagTagIdDelete?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorApiV2TagTagIdDelete(Exception exception) + { + OnErrorApiV2TagTagIdDelete?.Invoke(this, new ExceptionEventArgs(exception)); + } + + /// + /// The event raised after the server response + /// + public event EventHandler? OnApiV2TagTagIdTransactionsGet; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorApiV2TagTagIdTransactionsGet; + + internal void ExecuteOnApiV2TagTagIdTransactionsGet(TransactionApi.ApiV2TagTagIdTransactionsGetApiResponse apiResponse) + { + OnApiV2TagTagIdTransactionsGet?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorApiV2TagTagIdTransactionsGet(Exception exception) + { + OnErrorApiV2TagTagIdTransactionsGet?.Invoke(this, new ExceptionEventArgs(exception)); + } + + /// + /// The event raised after the server response + /// + public event EventHandler? OnApiV2TransactionTransactionIdFileGet; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorApiV2TransactionTransactionIdFileGet; + + internal void ExecuteOnApiV2TransactionTransactionIdFileGet(TransactionApi.ApiV2TransactionTransactionIdFileGetApiResponse apiResponse) + { + OnApiV2TransactionTransactionIdFileGet?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorApiV2TransactionTransactionIdFileGet(Exception exception) + { + OnErrorApiV2TransactionTransactionIdFileGet?.Invoke(this, new ExceptionEventArgs(exception)); + } + + /// + /// The event raised after the server response + /// + public event EventHandler? OnApiV2TransactionTransactionIdGet; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorApiV2TransactionTransactionIdGet; + + internal void ExecuteOnApiV2TransactionTransactionIdGet(TransactionApi.ApiV2TransactionTransactionIdGetApiResponse apiResponse) + { + OnApiV2TransactionTransactionIdGet?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorApiV2TransactionTransactionIdGet(Exception exception) + { + OnErrorApiV2TransactionTransactionIdGet?.Invoke(this, new ExceptionEventArgs(exception)); + } + + /// + /// The event raised after the server response + /// + public event EventHandler? OnApiV2TransactionTransactionIdProcessPost; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorApiV2TransactionTransactionIdProcessPost; + + internal void ExecuteOnApiV2TransactionTransactionIdProcessPost(TransactionApi.ApiV2TransactionTransactionIdProcessPostApiResponse apiResponse) + { + OnApiV2TransactionTransactionIdProcessPost?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorApiV2TransactionTransactionIdProcessPost(Exception exception) + { + OnErrorApiV2TransactionTransactionIdProcessPost?.Invoke(this, new ExceptionEventArgs(exception)); + } + + /// + /// The event raised after the server response + /// + public event EventHandler? OnApiV2TransactionTransactionIdResultsGet; + + /// + /// The event raised after an error querying the server + /// + public event EventHandler? OnErrorApiV2TransactionTransactionIdResultsGet; + + internal void ExecuteOnApiV2TransactionTransactionIdResultsGet(TransactionApi.ApiV2TransactionTransactionIdResultsGetApiResponse apiResponse) + { + OnApiV2TransactionTransactionIdResultsGet?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + } + + internal void ExecuteOnErrorApiV2TransactionTransactionIdResultsGet(Exception exception) + { + OnErrorApiV2TransactionTransactionIdResultsGet?.Invoke(this, new ExceptionEventArgs(exception)); + } + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public sealed partial class TransactionApi : ITransactionApi + { + private JsonSerializerOptions _jsonSerializerOptions; + + /// + /// The logger factory + /// + public ILoggerFactory LoggerFactory { get; } + + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The HttpClient + /// + public HttpClient HttpClient { get; } + + /// + /// The class containing the events + /// + public TransactionApiEvents Events { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public TransactionApi(ILogger logger, ILoggerFactory loggerFactory, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TransactionApiEvents transactionApiEvents) + { + _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; + LoggerFactory = loggerFactory; + Logger = LoggerFactory.CreateLogger(); + HttpClient = httpClient; + Events = transactionApiEvents; + } + + partial void FormatApiV2TagTagIdDelete(ref Guid tagId); + + /// + /// Processes the server response + /// + /// + /// + private void AfterApiV2TagTagIdDeleteDefaultImplementation(IApiV2TagTagIdDeleteApiResponse apiResponseLocalVar, Guid tagId) + { + bool suppressDefaultLog = false; + AfterApiV2TagTagIdDelete(ref suppressDefaultLog, apiResponseLocalVar, tagId); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + partial void AfterApiV2TagTagIdDelete(ref bool suppressDefaultLog, IApiV2TagTagIdDeleteApiResponse apiResponseLocalVar, Guid tagId); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + private void OnErrorApiV2TagTagIdDeleteDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid tagId) + { + bool suppressDefaultLogLocalVar = false; + OnErrorApiV2TagTagIdDelete(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, tagId); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + partial void OnErrorApiV2TagTagIdDelete(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid tagId); + + /// + /// Delete Reprocess transactions by tag + /// + /// Tag id + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TagTagIdDeleteOrDefaultAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await ApiV2TagTagIdDeleteAsync(tagId, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// Delete Reprocess transactions by tag + /// + /// Thrown when fails to make API call + /// Tag id + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TagTagIdDeleteAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + FormatApiV2TagTagIdDelete(ref tagId); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/tag/{tagId}"; + uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtagId%7D", Uri.EscapeDataString(tagId.ToString())); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] acceptLocalVars = new string[] { + "application/json" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Delete; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + ApiV2TagTagIdDeleteApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}", requestedAtLocalVar, _jsonSerializerOptions); + + AfterApiV2TagTagIdDeleteDefaultImplementation(apiResponseLocalVar, tagId); + + Events.ExecuteOnApiV2TagTagIdDelete(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorApiV2TagTagIdDeleteDefaultImplementation(e, "/api/v2/tag/{tagId}", uriBuilderLocalVar.Path, tagId); + Events.ExecuteOnErrorApiV2TagTagIdDelete(e); + throw; + } + } + + /// + /// The + /// + public partial class ApiV2TagTagIdDeleteApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TagTagIdDeleteApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public ApiV2TagTagIdDeleteApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 204 NoContent + /// + /// + public bool IsNoContent => 204 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 204 NoContent + /// + /// + public Object? NoContent() + { + // This logic may be modified with the AsModel.mustache template + return IsNoContent + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + /// + /// Returns true if the response is 204 NoContent and the deserialized response is not null + /// + /// + /// + public bool TryNoContent([NotNullWhen(true)]out Object? result) + { + result = null; + + try + { + result = NoContent(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)204); + } + + return result != null; + } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + public bool IsBadRequest => 400 == (int)StatusCode; + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + public bool IsForbidden => 403 == (int)StatusCode; + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + + partial void FormatApiV2TagTagIdTransactionsGet(ref string tagId); + + /// + /// Validates the request parameters + /// + /// + /// + private void ValidateApiV2TagTagIdTransactionsGet(string tagId) + { + if (tagId == null) + throw new ArgumentNullException(nameof(tagId)); + } + + /// + /// Processes the server response + /// + /// + /// + private void AfterApiV2TagTagIdTransactionsGetDefaultImplementation(IApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar, string tagId) + { + bool suppressDefaultLog = false; + AfterApiV2TagTagIdTransactionsGet(ref suppressDefaultLog, apiResponseLocalVar, tagId); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + partial void AfterApiV2TagTagIdTransactionsGet(ref bool suppressDefaultLog, IApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar, string tagId); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + private void OnErrorApiV2TagTagIdTransactionsGetDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, string tagId) + { + bool suppressDefaultLogLocalVar = false; + OnErrorApiV2TagTagIdTransactionsGet(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, tagId); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + partial void OnErrorApiV2TagTagIdTransactionsGet(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, string tagId); + + /// + /// Get transactions by tag + /// + /// Tag id + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TagTagIdTransactionsGetOrDefaultAsync(string tagId, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await ApiV2TagTagIdTransactionsGetAsync(tagId, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// Get transactions by tag + /// + /// Thrown when fails to make API call + /// Tag id + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TagTagIdTransactionsGetAsync(string tagId, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + ValidateApiV2TagTagIdTransactionsGet(tagId); + + FormatApiV2TagTagIdTransactionsGet(ref tagId); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/tag/{tagId}/transactions"; + uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtagId%7D", Uri.EscapeDataString(tagId.ToString())); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] acceptLocalVars = new string[] { + "application/json" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + ApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}/transactions", requestedAtLocalVar, _jsonSerializerOptions); + + AfterApiV2TagTagIdTransactionsGetDefaultImplementation(apiResponseLocalVar, tagId); + + Events.ExecuteOnApiV2TagTagIdTransactionsGet(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorApiV2TagTagIdTransactionsGetDefaultImplementation(e, "/api/v2/tag/{tagId}/transactions", uriBuilderLocalVar.Path, tagId); + Events.ExecuteOnErrorApiV2TagTagIdTransactionsGet(e); + throw; + } + } + + /// + /// The + /// + public partial class ApiV2TagTagIdTransactionsGetApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TagTagIdTransactionsGetApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public ApiV2TagTagIdTransactionsGetApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 200 Ok + /// + /// + public Regula.DocumentReader.WebClient.Model.ListTransactionsByTagResponse? Ok() + { + // This logic may be modified with the AsModel.mustache template + return IsOk + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + /// + /// Returns true if the response is 200 Ok and the deserialized response is not null + /// + /// + /// + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ListTransactionsByTagResponse? result) + { + result = null; + + try + { + result = Ok(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); + } + + return result != null; + } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + public bool IsBadRequest => 400 == (int)StatusCode; + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + public bool IsForbidden => 403 == (int)StatusCode; + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + + partial void FormatApiV2TransactionTransactionIdFileGet(ref Guid transactionId, ref string name); + + /// + /// Validates the request parameters + /// + /// + /// + private void ValidateApiV2TransactionTransactionIdFileGet(string name) + { + if (name == null) + throw new ArgumentNullException(nameof(name)); + } + + /// + /// Processes the server response + /// + /// + /// + /// + private void AfterApiV2TransactionTransactionIdFileGetDefaultImplementation(IApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar, Guid transactionId, string name) + { + bool suppressDefaultLog = false; + AfterApiV2TransactionTransactionIdFileGet(ref suppressDefaultLog, apiResponseLocalVar, transactionId, name); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + partial void AfterApiV2TransactionTransactionIdFileGet(ref bool suppressDefaultLog, IApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar, Guid transactionId, string name); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + /// + private void OnErrorApiV2TransactionTransactionIdFileGetDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, string name) + { + bool suppressDefaultLogLocalVar = false; + OnErrorApiV2TransactionTransactionIdFileGet(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, transactionId, name); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + /// + partial void OnErrorApiV2TransactionTransactionIdFileGet(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, string name); + + /// + /// Get Reprocess transaction file + /// + /// Transaction id + /// File name + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TransactionTransactionIdFileGetOrDefaultAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await ApiV2TransactionTransactionIdFileGetAsync(transactionId, name, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// Get Reprocess transaction file + /// + /// Thrown when fails to make API call + /// Transaction id + /// File name + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TransactionTransactionIdFileGetAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + ValidateApiV2TransactionTransactionIdFileGet(name); + + FormatApiV2TransactionTransactionIdFileGet(ref transactionId, ref name); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/transaction/{transactionId}/file"; + uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtransactionId%7D", Uri.EscapeDataString(transactionId.ToString())); + + System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); + + parseQueryStringLocalVar["name"] = ClientUtils.ParameterToString(name); + + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] acceptLocalVars = new string[] { + "application/octet-stream" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + ApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/file", requestedAtLocalVar, _jsonSerializerOptions); + + AfterApiV2TransactionTransactionIdFileGetDefaultImplementation(apiResponseLocalVar, transactionId, name); + + Events.ExecuteOnApiV2TransactionTransactionIdFileGet(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorApiV2TransactionTransactionIdFileGetDefaultImplementation(e, "/api/v2/transaction/{transactionId}/file", uriBuilderLocalVar.Path, transactionId, name); + Events.ExecuteOnErrorApiV2TransactionTransactionIdFileGet(e); + throw; + } + } + + /// + /// The + /// + public partial class ApiV2TransactionTransactionIdFileGetApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TransactionTransactionIdFileGetApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public ApiV2TransactionTransactionIdFileGetApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 200 Ok + /// + /// + public System.IO.Stream? Ok() + { + // This logic may be modified with the AsModel.mustache template + return IsOk + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + /// + /// Returns true if the response is 200 Ok and the deserialized response is not null + /// + /// + /// + public bool TryOk([NotNullWhen(true)]out System.IO.Stream? result) + { + result = null; + + try + { + result = Ok(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); + } + + return result != null; + } + + /// + /// Returns true if the response is 404 NotFound + /// + /// + public bool IsNotFound => 404 == (int)StatusCode; + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + + partial void FormatApiV2TransactionTransactionIdGet(ref Guid transactionId); + + /// + /// Processes the server response + /// + /// + /// + private void AfterApiV2TransactionTransactionIdGetDefaultImplementation(IApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar, Guid transactionId) + { + bool suppressDefaultLog = false; + AfterApiV2TransactionTransactionIdGet(ref suppressDefaultLog, apiResponseLocalVar, transactionId); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + partial void AfterApiV2TransactionTransactionIdGet(ref bool suppressDefaultLog, IApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar, Guid transactionId); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + private void OnErrorApiV2TransactionTransactionIdGetDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId) + { + bool suppressDefaultLogLocalVar = false; + OnErrorApiV2TransactionTransactionIdGet(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, transactionId); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + partial void OnErrorApiV2TransactionTransactionIdGet(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId); + + /// + /// Get Reprocess transaction data + /// + /// Transaction id + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TransactionTransactionIdGetOrDefaultAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await ApiV2TransactionTransactionIdGetAsync(transactionId, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// Get Reprocess transaction data + /// + /// Thrown when fails to make API call + /// Transaction id + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TransactionTransactionIdGetAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + FormatApiV2TransactionTransactionIdGet(ref transactionId); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/transaction/{transactionId}"; + uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtransactionId%7D", Uri.EscapeDataString(transactionId.ToString())); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] acceptLocalVars = new string[] { + "application/json" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + ApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}", requestedAtLocalVar, _jsonSerializerOptions); + + AfterApiV2TransactionTransactionIdGetDefaultImplementation(apiResponseLocalVar, transactionId); + + Events.ExecuteOnApiV2TransactionTransactionIdGet(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorApiV2TransactionTransactionIdGetDefaultImplementation(e, "/api/v2/transaction/{transactionId}", uriBuilderLocalVar.Path, transactionId); + Events.ExecuteOnErrorApiV2TransactionTransactionIdGet(e); + throw; + } + } + + /// + /// The + /// + public partial class ApiV2TransactionTransactionIdGetApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TransactionTransactionIdGetApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public ApiV2TransactionTransactionIdGetApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 200 Ok + /// + /// + public Regula.DocumentReader.WebClient.Model.TransactionProcessGetResponse? Ok() + { + // This logic may be modified with the AsModel.mustache template + return IsOk + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + /// + /// Returns true if the response is 200 Ok and the deserialized response is not null + /// + /// + /// + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessGetResponse? result) + { + result = null; + + try + { + result = Ok(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); + } + + return result != null; + } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + public bool IsBadRequest => 400 == (int)StatusCode; + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + public bool IsForbidden => 403 == (int)StatusCode; + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + + partial void FormatApiV2TransactionTransactionIdProcessPost(ref Guid transactionId, TransactionProcessRequest transactionProcessRequest); + + /// + /// Validates the request parameters + /// + /// + /// + private void ValidateApiV2TransactionTransactionIdProcessPost(TransactionProcessRequest transactionProcessRequest) + { + if (transactionProcessRequest == null) + throw new ArgumentNullException(nameof(transactionProcessRequest)); + } + + /// + /// Processes the server response + /// + /// + /// + /// + private void AfterApiV2TransactionTransactionIdProcessPostDefaultImplementation(IApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar, Guid transactionId, TransactionProcessRequest transactionProcessRequest) + { + bool suppressDefaultLog = false; + AfterApiV2TransactionTransactionIdProcessPost(ref suppressDefaultLog, apiResponseLocalVar, transactionId, transactionProcessRequest); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + partial void AfterApiV2TransactionTransactionIdProcessPost(ref bool suppressDefaultLog, IApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar, Guid transactionId, TransactionProcessRequest transactionProcessRequest); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + /// + private void OnErrorApiV2TransactionTransactionIdProcessPostDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, TransactionProcessRequest transactionProcessRequest) + { + bool suppressDefaultLogLocalVar = false; + OnErrorApiV2TransactionTransactionIdProcessPost(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, transactionId, transactionProcessRequest); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + /// + partial void OnErrorApiV2TransactionTransactionIdProcessPost(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, TransactionProcessRequest transactionProcessRequest); + + /// + /// Reprocess + /// + /// Transaction id + /// + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TransactionTransactionIdProcessPostOrDefaultAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await ApiV2TransactionTransactionIdProcessPostAsync(transactionId, transactionProcessRequest, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// Reprocess + /// + /// Thrown when fails to make API call + /// Transaction id + /// + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + ValidateApiV2TransactionTransactionIdProcessPost(transactionProcessRequest); + + FormatApiV2TransactionTransactionIdProcessPost(ref transactionId, transactionProcessRequest); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/transaction/{transactionId}/process"; + uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtransactionId%7D", Uri.EscapeDataString(transactionId.ToString())); + + httpRequestMessageLocalVar.Content = (transactionProcessRequest as object) is System.IO.Stream stream + ? httpRequestMessageLocalVar.Content = new StreamContent(stream) + : httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(transactionProcessRequest, _jsonSerializerOptions)); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] contentTypes = new string[] { + "application/json" + }; + + string? contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes); + + if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null) + httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar); + + string[] acceptLocalVars = new string[] { + "application/json" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Post; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + ApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/process", requestedAtLocalVar, _jsonSerializerOptions); + + AfterApiV2TransactionTransactionIdProcessPostDefaultImplementation(apiResponseLocalVar, transactionId, transactionProcessRequest); + + Events.ExecuteOnApiV2TransactionTransactionIdProcessPost(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorApiV2TransactionTransactionIdProcessPostDefaultImplementation(e, "/api/v2/transaction/{transactionId}/process", uriBuilderLocalVar.Path, transactionId, transactionProcessRequest); + Events.ExecuteOnErrorApiV2TransactionTransactionIdProcessPost(e); + throw; + } + } + + /// + /// The + /// + public partial class ApiV2TransactionTransactionIdProcessPostApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TransactionTransactionIdProcessPostApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public ApiV2TransactionTransactionIdProcessPostApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 200 Ok + /// + /// + public Regula.DocumentReader.WebClient.Model.TransactionProcessResult? Ok() + { + // This logic may be modified with the AsModel.mustache template + return IsOk + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + /// + /// Returns true if the response is 200 Ok and the deserialized response is not null + /// + /// + /// + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessResult? result) + { + result = null; + + try + { + result = Ok(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); + } + + return result != null; + } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + public bool IsBadRequest => 400 == (int)StatusCode; + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + public bool IsForbidden => 403 == (int)StatusCode; + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + + partial void FormatApiV2TransactionTransactionIdResultsGet(ref Guid transactionId, ref Option withImages); + + /// + /// Processes the server response + /// + /// + /// + /// + private void AfterApiV2TransactionTransactionIdResultsGetDefaultImplementation(IApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar, Guid transactionId, Option withImages) + { + bool suppressDefaultLog = false; + AfterApiV2TransactionTransactionIdResultsGet(ref suppressDefaultLog, apiResponseLocalVar, transactionId, withImages); + if (!suppressDefaultLog) + Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + } + + /// + /// Processes the server response + /// + /// + /// + /// + /// + partial void AfterApiV2TransactionTransactionIdResultsGet(ref bool suppressDefaultLog, IApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar, Guid transactionId, Option withImages); + + /// + /// Logs exceptions that occur while retrieving the server response + /// + /// + /// + /// + /// + /// + private void OnErrorApiV2TransactionTransactionIdResultsGetDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, Option withImages) + { + bool suppressDefaultLogLocalVar = false; + OnErrorApiV2TransactionTransactionIdResultsGet(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, transactionId, withImages); + if (!suppressDefaultLogLocalVar) + Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + } + + /// + /// A partial method that gives developers a way to provide customized exception handling + /// + /// + /// + /// + /// + /// + /// + partial void OnErrorApiV2TransactionTransactionIdResultsGet(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, Option withImages); + + /// + /// Get Reprocess transaction result + /// + /// Transaction id + /// With base64 images or url (optional) + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TransactionTransactionIdResultsGetOrDefaultAsync(Guid transactionId, Option withImages = default, System.Threading.CancellationToken cancellationToken = default) + { + try + { + return await ApiV2TransactionTransactionIdResultsGetAsync(transactionId, withImages, cancellationToken).ConfigureAwait(false); + } + catch (Exception) + { + return null; + } + } + + /// + /// Get Reprocess transaction result + /// + /// Thrown when fails to make API call + /// Transaction id + /// With base64 images or url (optional) + /// Cancellation Token to cancel the request. + /// <> + public async Task ApiV2TransactionTransactionIdResultsGetAsync(Guid transactionId, Option withImages = default, System.Threading.CancellationToken cancellationToken = default) + { + UriBuilder uriBuilderLocalVar = new UriBuilder(); + + try + { + FormatApiV2TransactionTransactionIdResultsGet(ref transactionId, ref withImages); + + using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) + { + uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; + uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; + uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; + uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/transaction/{transactionId}/results"; + uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtransactionId%7D", Uri.EscapeDataString(transactionId.ToString())); + + System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); + + if (withImages.IsSet) + parseQueryStringLocalVar["withImages"] = ClientUtils.ParameterToString(withImages.Value); + + uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + + httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + + string[] acceptLocalVars = new string[] { + "application/json" + }; + + string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + + if (acceptLocalVar != null) + httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; + + DateTime requestedAtLocalVar = DateTime.UtcNow; + + using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) + { + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + + ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + + ApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/results", requestedAtLocalVar, _jsonSerializerOptions); + + AfterApiV2TransactionTransactionIdResultsGetDefaultImplementation(apiResponseLocalVar, transactionId, withImages); + + Events.ExecuteOnApiV2TransactionTransactionIdResultsGet(apiResponseLocalVar); + + return apiResponseLocalVar; + } + } + } + catch(Exception e) + { + OnErrorApiV2TransactionTransactionIdResultsGetDefaultImplementation(e, "/api/v2/transaction/{transactionId}/results", uriBuilderLocalVar.Path, transactionId, withImages); + Events.ExecuteOnErrorApiV2TransactionTransactionIdResultsGet(e); + throw; + } + } + + /// + /// The + /// + public partial class ApiV2TransactionTransactionIdResultsGetApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TransactionTransactionIdResultsGetApiResponse + { + /// + /// The logger + /// + public ILogger Logger { get; } + + /// + /// The + /// + /// + /// + /// + /// + /// + /// + /// + public ApiV2TransactionTransactionIdResultsGetApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) + { + Logger = logger; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + + /// + /// Returns true if the response is 200 Ok + /// + /// + public bool IsOk => 200 == (int)StatusCode; + + /// + /// Deserializes the response if the response is 200 Ok + /// + /// + public Regula.DocumentReader.WebClient.Model.TransactionProcessResponse? Ok() + { + // This logic may be modified with the AsModel.mustache template + return IsOk + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + : null; + } + + /// + /// Returns true if the response is 200 Ok and the deserialized response is not null + /// + /// + /// + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessResponse? result) + { + result = null; + + try + { + result = Ok(); + } catch (Exception e) + { + OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); + } + + return result != null; + } + + /// + /// Returns true if the response is 400 BadRequest + /// + /// + public bool IsBadRequest => 400 == (int)StatusCode; + + /// + /// Returns true if the response is 403 Forbidden + /// + /// + public bool IsForbidden => 403 == (int)StatusCode; + + private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + { + bool suppressDefaultLog = false; + OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); + if (!suppressDefaultLog) + Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + } + + partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiClient.cs b/src/Regula.DocumentReader.WebClient/Client/ApiClient.cs deleted file mode 100644 index 0f29eda..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/ApiClient.cs +++ /dev/null @@ -1,547 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - public JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(RestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(RestRequest request, RestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = Regula.DocumentReader.WebClient.Client.Configuration.Default; - var options = new RestClientOptions("https://api.regulaforensics.com") - { - ThrowOnAnyError = true, - MaxTimeout = Configuration.Timeout - }; - RestClient = new RestClient(options); - } - - /// - /// Initializes a new instance of the class - /// with default base path (https://api.regulaforensics.com). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? Regula.DocumentReader.WebClient.Client.Configuration.Default; - - var options = new RestClientOptions(Configuration.BasePath) - { - ThrowOnAnyError = true, - MaxTimeout = Configuration.Timeout - }; - RestClient = new RestClient(options); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "https://api.regulaforensics.com") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - Configuration = Client.Configuration.Default; - RestClientOptions options = new(basePath) - { - ThrowOnAnyError = true, - MaxTimeout = Configuration.Timeout - }; - RestClient = new RestClient(options); - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, ()=>param.Value.GetFile(), param.Value.FileName, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - - return request; - } - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - - // set user agent - request.AddHeader("UserAgent", Configuration.UserAgent); - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// Cancellation Token. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType, CancellationToken cancellationToken) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - request.AddHeader("UserAgent", Configuration.UserAgent); - InterceptRequest(request); - var response = await RestClient.ExecuteAsync(request, cancellationToken); - InterceptResponse(request, response); - return (Object)response; - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(RestResponse response, Type type) - { - IReadOnlyCollection headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiException.cs b/src/Regula.DocumentReader.WebClient/Client/ApiException.cs index 64c08e5..06aa8cb 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ApiException.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ApiException.cs @@ -1,13 +1,15 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.9.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; namespace Regula.DocumentReader.WebClient.Client @@ -18,43 +20,33 @@ namespace Regula.DocumentReader.WebClient.Client public class ApiException : Exception { /// - /// Gets or sets the error code (HTTP status code) + /// The reason the api request failed /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } + public string? ReasonPhrase { get; } /// - /// Gets or sets the error content (body json object) + /// The HttpStatusCode /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } + public System.Net.HttpStatusCode StatusCode { get; } /// - /// Initializes a new instance of the class. + /// The raw data returned by the api /// - public ApiException() {} - + public string RawContent { get; } + /// - /// Initializes a new instance of the class. + /// Construct the ApiException from parts of the response /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) + /// + /// + /// + public ApiException(string? reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent) : base(reasonPhrase ?? rawContent) { - this.ErrorCode = errorCode; - } + ReasonPhrase = reasonPhrase; - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; + StatusCode = statusCode; + + RawContent = rawContent; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs b/src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs new file mode 100644 index 0000000..deff534 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs @@ -0,0 +1,49 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Regula.DocumentReader.WebClient.Api; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// An IApiFactory interface + /// + public interface IApiFactory + { + /// + /// A method to create an IApi of type IResult + /// + /// + /// + IResult Create() where IResult : IApi; + } + + /// + /// An ApiFactory + /// + public class ApiFactory : IApiFactory + { + /// + /// The service provider + /// + public IServiceProvider Services { get; } + + /// + /// Initializes a new instance of the class. + /// + /// + public ApiFactory(IServiceProvider services) + { + Services = services; + } + + /// + /// A method to create an IApi of type IResult + /// + /// + /// + public IResult Create() where IResult : IApi + { + return Services.GetRequiredService(); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs deleted file mode 100644 index fd876a7..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - - /// - /// Gets or sets the RawResponse - /// - /// The data. - public string RawResponse { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - /// - public ApiResponse(int statusCode, - IDictionary headers, - T data, - string rawResponse = null) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - this.RawResponse = rawResponse; - } - - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs new file mode 100644 index 0000000..8ea5bff --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs @@ -0,0 +1,24 @@ +using System; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Useful for tracking server health + /// + public class ApiResponseEventArgs : EventArgs + { + /// + /// The ApiResponse + /// + public ApiResponse ApiResponse { get; } + + /// + /// The ApiResponseEventArgs + /// + /// + public ApiResponseEventArgs(ApiResponse apiResponse) + { + ApiResponse = apiResponse; + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs new file mode 100644 index 0000000..56b1e9a --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs @@ -0,0 +1,192 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Diagnostics.CodeAnalysis; +using System.Net; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Provides a non-generic contract for the ApiResponse wrapper. + /// + public partial interface IApiResponse + { + /// + /// The IsSuccessStatusCode from the api response + /// + bool IsSuccessStatusCode { get; } + + /// + /// Gets the status code (HTTP status code) + /// + /// The status code. + HttpStatusCode StatusCode { get; } + + /// + /// The raw content of this response. + /// + string RawContent { get; } + + /// + /// The DateTime when the request was retrieved. + /// + DateTime DownloadedAt { get; } + + /// + /// The headers contained in the api response + /// + System.Net.Http.Headers.HttpResponseHeaders Headers { get; } + + /// + /// The path used when making the request. + /// + string Path { get; } + + /// + /// The reason phrase contained in the api response + /// + string? ReasonPhrase { get; } + + /// + /// The DateTime when the request was sent. + /// + DateTime RequestedAt { get; } + + /// + /// The Uri used when making the request. + /// + Uri? RequestUri { get; } + } + + /// + /// API Response + /// + public partial class ApiResponse : IApiResponse + { + /// + /// Gets the status code (HTTP status code) + /// + /// The status code. + public HttpStatusCode StatusCode { get; } + + /// + /// The raw data + /// + public string RawContent { get; protected set; } + + /// + /// The IsSuccessStatusCode from the api response + /// + public bool IsSuccessStatusCode { get; } + + /// + /// The reason phrase contained in the api response + /// + public string? ReasonPhrase { get; } + + /// + /// The headers contained in the api response + /// + public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } + + /// + /// The DateTime when the request was retrieved. + /// + public DateTime DownloadedAt { get; } = DateTime.UtcNow; + + /// + /// The DateTime when the request was sent. + /// + public DateTime RequestedAt { get; } + + /// + /// The path used when making the request. + /// + public string Path { get; } + + /// + /// The Uri used when making the request. + /// + public Uri? RequestUri { get; } + + /// + /// The + /// + protected System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; + + /// + /// Construct the response using an HttpResponseMessage + /// + /// + /// + /// + /// + /// + /// + public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) + { + StatusCode = httpResponseMessage.StatusCode; + Headers = httpResponseMessage.Headers; + IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; + ReasonPhrase = httpResponseMessage.ReasonPhrase; + RawContent = rawContent; + Path = path; + RequestUri = httpRequestMessage.RequestUri; + RequestedAt = requestedAt; + _jsonSerializerOptions = jsonSerializerOptions; + OnCreated(httpRequestMessage, httpResponseMessage); + } + + partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + } + + /// + /// An interface for responses of type + /// + /// + public interface INoContent : IApiResponse + { + /// + /// Deserializes the response if the response is NoContent + /// + /// + TType NoContent(); + + /// + /// Returns true if the response is NoContent and the deserialized response is not null + /// + /// + /// + bool TryNoContent([NotNullWhen(true)]out TType? result); + } + + /// + /// An interface for responses of type + /// + /// + public interface IOk : IApiResponse + { + /// + /// Deserializes the response if the response is Ok + /// + /// + TType Ok(); + + /// + /// Returns true if the response is Ok and the deserialized response is not null + /// + /// + /// + bool TryOk([NotNullWhen(true)]out TType? result); + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs new file mode 100644 index 0000000..99eea23 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs @@ -0,0 +1,396 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.IO; +using System.Linq; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.Text.Json; +using System.Text.RegularExpressions; +using Regula.DocumentReader.WebClient.Model; +using System.Runtime.CompilerServices; + +[assembly: InternalsVisibleTo("Regula.DocumentReader.WebClient.Test")] + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Utility functions providing some benefit to API client consumers. + /// + public static partial class ClientUtils + { + + /// + /// A delegate for events. + /// + /// + /// + /// + /// + public delegate void EventHandler(object sender, T e) where T : EventArgs; + + /// + /// Returns true when deserialization succeeds. + /// + /// + /// + /// + /// + /// + public static bool TryDeserialize(string json, JsonSerializerOptions options, [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) + { + try + { + result = JsonSerializer.Deserialize(json, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; + } + } + + /// + /// Returns true when deserialization succeeds. + /// + /// + /// + /// + /// + /// + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) + { + try + { + result = JsonSerializer.Deserialize(ref reader, options); + return result != null; + } + catch (Exception) + { + result = default; + return false; + } + } + + /// + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. + /// If parameter is a list, join the list with ",". + /// Otherwise just return the string. + /// + /// The parameter (header, path, query, form). + /// The DateTime serialization format. + /// Formatted string. + public static string? ParameterToString(object? obj, string? format = ISO8601_DATETIME_FORMAT) + { + if (obj is DateTime dateTime) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTime.ToString(format); + if (obj is DateTimeOffset dateTimeOffset) + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return dateTimeOffset.ToString(format); + if (obj is DateOnly dateOnly) + return dateOnly.ToString(format); + if (obj is bool boolean) + return boolean + ? "true" + : "false"; + if (obj is AuthenticityResultType authenticityResultType) + return AuthenticityResultTypeValueConverter.ToJsonValue(authenticityResultType).ToString(); + if (obj is BarCodeModuleType barCodeModuleType) + return BarCodeModuleTypeValueConverter.ToJsonValue(barCodeModuleType).ToString(); + if (obj is BarcodeType barcodeType) + return BarcodeTypeValueConverter.ToJsonValue(barcodeType).ToString(); + if (obj is CheckDiagnose checkDiagnose) + return CheckDiagnoseValueConverter.ToJsonValue(checkDiagnose).ToString(); + if (obj is CheckResult checkResult) + return CheckResultValueConverter.ToJsonValue(checkResult).ToString(); + if (obj is Critical critical) + return CriticalValueConverter.ToJsonValue(critical).ToString(); + if (obj is DocumentFormat documentFormat) + return DocumentFormatValueConverter.ToJsonValue(documentFormat).ToString(); + if (obj is DocumentType documentType) + return DocumentTypeValueConverter.ToJsonValue(documentType).ToString(); + if (obj is DocumentTypeRecognitionResult documentTypeRecognitionResult) + return DocumentTypeRecognitionResultValueConverter.ToJsonValue(documentTypeRecognitionResult).ToString(); + if (obj is GraphicFieldType graphicFieldType) + return GraphicFieldTypeValueConverter.ToJsonValue(graphicFieldType).ToString(); + if (obj is ImageQualityCheckType imageQualityCheckType) + return ImageQualityCheckTypeValueConverter.ToJsonValue(imageQualityCheckType).ToString(); + if (obj is InputBarcodeType inputBarcodeType) + return InputBarcodeTypeValueConverter.ToJsonValue(inputBarcodeType); + if (obj is InputImageQualityChecks inputImageQualityChecks) + return InputImageQualityChecksValueConverter.ToJsonValue(inputImageQualityChecks); + if (obj is LCID lCID) + return LCIDValueConverter.ToJsonValue(lCID).ToString(); + if (obj is Light light) + return LightValueConverter.ToJsonValue(light).ToString(); + if (obj is LogLevel logLevel) + return LogLevelValueConverter.ToJsonValue(logLevel); + if (obj is MRZFormat mRZFormat) + return MRZFormatValueConverter.ToJsonValue(mRZFormat); + if (obj is MeasureSystem measureSystem) + return MeasureSystemValueConverter.ToJsonValue(measureSystem).ToString(); + if (obj is MrzDetectModeEnum mrzDetectModeEnum) + return MrzDetectModeEnumValueConverter.ToJsonValue(mrzDetectModeEnum).ToString(); + if (obj is ParsingNotificationCodes parsingNotificationCodes) + return ParsingNotificationCodesValueConverter.ToJsonValue(parsingNotificationCodes).ToString(); + if (obj is ProcessingStatus processingStatus) + return ProcessingStatusValueConverter.ToJsonValue(processingStatus).ToString(); + if (obj is RFIDErrorCodes rFIDErrorCodes) + return RFIDErrorCodesValueConverter.ToJsonValue(rFIDErrorCodes).ToString(); + if (obj is RFIDPKDResourceType rFIDPKDResourceType) + return RFIDPKDResourceTypeValueConverter.ToJsonValue(rFIDPKDResourceType).ToString(); + if (obj is Result result) + return ResultValueConverter.ToJsonValue(result).ToString(); + if (obj is RfidAChip rfidAChip) + return RfidAChipValueConverter.ToJsonValue(rfidAChip).ToString(); + if (obj is RfidAccessControlProcedureType rfidAccessControlProcedureType) + return RfidAccessControlProcedureTypeValueConverter.ToJsonValue(rfidAccessControlProcedureType).ToString(); + if (obj is RfidApplicationType rfidApplicationType) + return RfidApplicationTypeValueConverter.ToJsonValue(rfidApplicationType).ToString(); + if (obj is RfidAuthenticationProcedureType rfidAuthenticationProcedureType) + return RfidAuthenticationProcedureTypeValueConverter.ToJsonValue(rfidAuthenticationProcedureType).ToString(); + if (obj is RfidBaudRate rfidBaudRate) + return RfidBaudRateValueConverter.ToJsonValue(rfidBaudRate).ToString(); + if (obj is RfidCertificateOrigin rfidCertificateOrigin) + return RfidCertificateOriginValueConverter.ToJsonValue(rfidCertificateOrigin).ToString(); + if (obj is RfidCertificateType rfidCertificateType) + return RfidCertificateTypeValueConverter.ToJsonValue(rfidCertificateType).ToString(); + if (obj is RfidDataFileType rfidDataFileType) + return RfidDataFileTypeValueConverter.ToJsonValue(rfidDataFileType).ToString(); + if (obj is RfidDataGroupTypeTag rfidDataGroupTypeTag) + return RfidDataGroupTypeTagValueConverter.ToJsonValue(rfidDataGroupTypeTag).ToString(); + if (obj is RfidLocation rfidLocation) + return RfidLocationValueConverter.ToJsonValue(rfidLocation).ToString(); + if (obj is RfidPasswordType rfidPasswordType) + return RfidPasswordTypeValueConverter.ToJsonValue(rfidPasswordType).ToString(); + if (obj is RfidTerminalType rfidTerminalType) + return RfidTerminalTypeValueConverter.ToJsonValue(rfidTerminalType).ToString(); + if (obj is RfidType rfidType) + return RfidTypeValueConverter.ToJsonValue(rfidType).ToString(); + if (obj is Scenario scenario) + return ScenarioValueConverter.ToJsonValue(scenario); + if (obj is SecurityFeatureType securityFeatureType) + return SecurityFeatureTypeValueConverter.ToJsonValue(securityFeatureType).ToString(); + if (obj is Source source) + return SourceValueConverter.ToJsonValue(source); + if (obj is TextFieldType textFieldType) + return TextFieldTypeValueConverter.ToJsonValue(textFieldType).ToString(); + if (obj is TextPostProcessing textPostProcessing) + return TextPostProcessingValueConverter.ToJsonValue(textPostProcessing).ToString(); + if (obj is VerificationResult verificationResult) + return VerificationResultValueConverter.ToJsonValue(verificationResult).ToString(); + if (obj is Visibility visibility) + return VisibilityValueConverter.ToJsonValue(visibility).ToString(); + if (obj is ICollection collection) + { + List entries = new(); + foreach (var entry in collection) + entries.Add(ParameterToString(entry)); + return string.Join(",", entries); + } + + return Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture); + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// string to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + + /// + /// Encode string in base64 format. + /// + /// string to be encoded. + /// Encoded string. + public static string Base64Encode(string text) + { + return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text)); + } + + /// + /// Convert stream to byte array + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream inputStream) + { + using (var ms = new MemoryStream()) + { + inputStream.CopyTo(ms); + return ms.ToArray(); + } + } + + /// + /// Select the Content-Type header's value from the given content-type array: + /// if JSON type exists in the given array, use it; + /// otherwise use the first one defined in 'consumes' + /// + /// The Content-Type array to select from. + /// The Content-Type header to use. + public static string? SelectHeaderContentType(string[] contentTypes) + { + if (contentTypes.Length == 0) + return null; + + foreach (var contentType in contentTypes) + { + if (IsJsonMime(contentType)) + return contentType; + } + + return contentTypes[0]; // use the first content type specified in 'consumes' + } + + /// + /// Select the Accept header's value from the given accepts array: + /// if JSON exists in the given array, use it; + /// otherwise use all of them (joining into a string) + /// + /// The accepts array to select from. + /// The Accept header to use. + public static string? SelectHeaderAccept(string[] accepts) + { + if (accepts.Length == 0) + return null; + + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) + return "application/json"; + + return string.Join(",", accepts); + } + + /// + /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. + /// + [GeneratedRegex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$")] + private static partial Regex JsonRegex(); + + /// + /// Check if the given MIME is a JSON MIME. + /// JSON MIME examples: + /// application/json + /// application/json; charset=UTF8 + /// APPLICATION/JSON + /// application/vnd.company+json + /// + /// MIME + /// Returns True if MIME type is json. + public static bool IsJsonMime(string mime) + { + if (string.IsNullOrWhiteSpace(mime)) return false; + + return JsonRegex().IsMatch(mime) || mime.Equals("application/json-patch+json"); + } + + /// + /// Get the discriminator + /// + /// + /// + /// + /// + public static string? GetDiscriminator(Utf8JsonReader utf8JsonReader, string discriminator) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + if (localVarJsonPropertyName != null && localVarJsonPropertyName.Equals(discriminator)) + return utf8JsonReader.GetString(); + } + } + + throw new JsonException("The specified discriminator was not found."); + } + + /// + /// The base path of the API + /// + public const string BASE_ADDRESS = "https://api.regulaforensics.com"; + + /// + /// The scheme of the API + /// + public const string SCHEME = "https"; + + /// + /// The context path of the API + /// + public const string CONTEXT_PATH = ""; + + /// + /// The host of the API + /// + public const string HOST = "api.regulaforensics.com"; + + /// + /// The format to use for DateTime serialization + /// + public const string ISO8601_DATETIME_FORMAT = "o"; + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/Configuration.cs b/src/Regula.DocumentReader.WebClient/Client/Configuration.cs deleted file mode 100644 index da74e71..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/Configuration.cs +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Reflection; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - } - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "OpenAPI-Generator/1.0.0/csharp"; - BasePath = "https://api.regulaforensics.com"; - DefaultHeader = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "https://api.regulaforensics.com") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "OpenAPI-Generator/1.0.0/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { get; set; } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout { get; set; } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Regula.DocumentReader.WebClient) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 6.9.0\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs b/src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs new file mode 100644 index 0000000..278c8ee --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs @@ -0,0 +1,20 @@ +// + +#nullable enable + +using System.Linq; +using System.Collections.Generic; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// A class containing a CookieContainer + /// + public sealed class CookieContainer + { + /// + /// The collection of tokens + /// + public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); + } +} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs new file mode 100644 index 0000000..f61b69f --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs @@ -0,0 +1,61 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateOnlyJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { + "yyyy'-'MM'-'dd", + "yyyyMMdd" + + }; + + /// + /// Returns a DateOnly from the Json object + /// + /// + /// + /// + /// + public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString()!; + + foreach(string format in Formats) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateOnly to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateOnly dateOnlyValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateOnlyValue.ToString("yyyy'-'MM'-'dd", CultureInfo.InvariantCulture)); + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs new file mode 100644 index 0000000..0690193 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs @@ -0,0 +1,66 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateOnlyNullableJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { + "yyyy'-'MM'-'dd", + "yyyyMMdd" + + }; + + /// + /// Returns a DateOnly from the Json object + /// + /// + /// + /// + /// + public override DateOnly? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString()!; + + foreach(string format in Formats) + if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateOnly to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateOnly? dateOnlyValue, JsonSerializerOptions options) + { + if (dateOnlyValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateOnlyValue.Value.ToString("yyyy'-'MM'-'dd", CultureInfo.InvariantCulture)); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs new file mode 100644 index 0000000..ebb5bfc --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs @@ -0,0 +1,75 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + throw new NotSupportedException(); + + string value = reader.GetString()!; + + foreach(string format in Formats) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + throw new NotSupportedException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => + writer.WriteStringValue(dateTimeValue.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", CultureInfo.InvariantCulture)); + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs new file mode 100644 index 0000000..442c351 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs @@ -0,0 +1,80 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Globalization; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class DateTimeNullableJsonConverter : JsonConverter + { + /// + /// The formats used to deserialize the date + /// + public static string[] Formats { get; } = { + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", + "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyyMMddTHHmmss.fffffffK", + "yyyyMMddTHHmmss.ffffffK", + "yyyyMMddTHHmmss.fffffK", + "yyyyMMddTHHmmss.ffffK", + "yyyyMMddTHHmmss.fffK", + "yyyyMMddTHHmmss.ffK", + "yyyyMMddTHHmmss.fK", + "yyyyMMddTHHmmssK", + + }; + + /// + /// Returns a DateTime from the Json object + /// + /// + /// + /// + /// + public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { + if (reader.TokenType == JsonTokenType.Null) + return null; + + string value = reader.GetString()!; + + foreach(string format in Formats) + if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) + return result; + + return null; + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) + { + if (dateTimeValue == null) + writer.WriteNullValue(); + else + writer.WriteStringValue(dateTimeValue.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", CultureInfo.InvariantCulture)); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs b/src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs new file mode 100644 index 0000000..b5ee313 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs @@ -0,0 +1,24 @@ +using System; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Useful for tracking server health + /// + public class ExceptionEventArgs : EventArgs + { + /// + /// The ApiResponse + /// + public Exception Exception { get; } + + /// + /// The ExceptionEventArgs + /// + /// + public ExceptionEventArgs(Exception exception) + { + Exception = exception; + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs b/src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs deleted file mode 100644 index 25e558a..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using RestSharp; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, RestResponse response); -} diff --git a/src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs deleted file mode 100644 index fc198c8..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs new file mode 100644 index 0000000..3e95573 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs @@ -0,0 +1,409 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection; +using Regula.DocumentReader.WebClient.Api; +using Regula.DocumentReader.WebClient.Model; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Provides hosting configuration for Regula.DocumentReader.WebClient + /// + public class HostConfiguration + { + private readonly IServiceCollection _services; + private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); + + internal bool HttpClientsAdded { get; private set; } + + /// + /// Instantiates the class + /// + /// + public HostConfiguration(IServiceCollection services) + { + _services = services; + _jsonOptions.Converters.Add(new JsonStringEnumConverter()); + _jsonOptions.Converters.Add(new DateTimeJsonConverter()); + _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); + _jsonOptions.Converters.Add(new DateOnlyJsonConverter()); + _jsonOptions.Converters.Add(new DateOnlyNullableJsonConverter()); + _jsonOptions.Converters.Add(new AreaArrayJsonConverter()); + _jsonOptions.Converters.Add(new AreaContainerJsonConverter()); + _jsonOptions.Converters.Add(new AuthParamsJsonConverter()); + _jsonOptions.Converters.Add(new AuthenticityCheckListJsonConverter()); + _jsonOptions.Converters.Add(new AuthenticityCheckListItemJsonConverter()); + _jsonOptions.Converters.Add(new AuthenticityCheckResultJsonConverter()); + _jsonOptions.Converters.Add(new AuthenticityCheckResultItemJsonConverter()); + _jsonOptions.Converters.Add(new AuthenticityCheckResultListInnerJsonConverter()); + _jsonOptions.Converters.Add(new AuthenticityResultJsonConverter()); + _jsonOptions.Converters.Add(new AuthenticityResultTypeJsonConverter()); + _jsonOptions.Converters.Add(new AuthenticityResultTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new BarCodeModuleTypeJsonConverter()); + _jsonOptions.Converters.Add(new BarCodeModuleTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new BarcodeTypeJsonConverter()); + _jsonOptions.Converters.Add(new BarcodeTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new BcPDF417INFOJsonConverter()); + _jsonOptions.Converters.Add(new BcROIDETECTJsonConverter()); + _jsonOptions.Converters.Add(new BinaryDataJsonConverter()); + _jsonOptions.Converters.Add(new ByteArrayItemJsonConverter()); + _jsonOptions.Converters.Add(new ByteArrayResultJsonConverter()); + _jsonOptions.Converters.Add(new CandidatesListItemJsonConverter()); + _jsonOptions.Converters.Add(new CertificateDataJsonConverter()); + _jsonOptions.Converters.Add(new CheckDiagnoseJsonConverter()); + _jsonOptions.Converters.Add(new CheckDiagnoseNullableJsonConverter()); + _jsonOptions.Converters.Add(new CheckResultJsonConverter()); + _jsonOptions.Converters.Add(new CheckResultNullableJsonConverter()); + _jsonOptions.Converters.Add(new ChosenDocumentTypeJsonConverter()); + _jsonOptions.Converters.Add(new ChosenDocumentTypeResultJsonConverter()); + _jsonOptions.Converters.Add(new ContainerListJsonConverter()); + _jsonOptions.Converters.Add(new ContainerListListInnerJsonConverter()); + _jsonOptions.Converters.Add(new CriticalJsonConverter()); + _jsonOptions.Converters.Add(new CriticalNullableJsonConverter()); + _jsonOptions.Converters.Add(new CrossSourceValueComparisonJsonConverter()); + _jsonOptions.Converters.Add(new DataModuleJsonConverter()); + _jsonOptions.Converters.Add(new DetailsOpticalJsonConverter()); + _jsonOptions.Converters.Add(new DetailsRFIDJsonConverter()); + _jsonOptions.Converters.Add(new DeviceInfoJsonConverter()); + _jsonOptions.Converters.Add(new DocBarCodeInfoJsonConverter()); + _jsonOptions.Converters.Add(new DocBarCodeInfoFieldsListJsonConverter()); + _jsonOptions.Converters.Add(new DocBarCodeInfoItemJsonConverter()); + _jsonOptions.Converters.Add(new DocGraphicsInfoItemJsonConverter()); + _jsonOptions.Converters.Add(new DocVisualExtendedFieldJsonConverter()); + _jsonOptions.Converters.Add(new DocVisualExtendedFieldItemJsonConverter()); + _jsonOptions.Converters.Add(new DocVisualExtendedInfoJsonConverter()); + _jsonOptions.Converters.Add(new DocVisualExtendedInfoItemJsonConverter()); + _jsonOptions.Converters.Add(new DocumentBinaryInfoResultJsonConverter()); + _jsonOptions.Converters.Add(new DocumentFormatJsonConverter()); + _jsonOptions.Converters.Add(new DocumentFormatNullableJsonConverter()); + _jsonOptions.Converters.Add(new DocumentImageJsonConverter()); + _jsonOptions.Converters.Add(new DocumentImageResultJsonConverter()); + _jsonOptions.Converters.Add(new DocumentPositionJsonConverter()); + _jsonOptions.Converters.Add(new DocumentPositionItemJsonConverter()); + _jsonOptions.Converters.Add(new DocumentPositionResultJsonConverter()); + _jsonOptions.Converters.Add(new DocumentTypeJsonConverter()); + _jsonOptions.Converters.Add(new DocumentTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new DocumentTypeRecognitionResultJsonConverter()); + _jsonOptions.Converters.Add(new DocumentTypeRecognitionResultNullableJsonConverter()); + _jsonOptions.Converters.Add(new DocumentTypesCandidatesJsonConverter()); + _jsonOptions.Converters.Add(new DocumentTypesCandidatesListJsonConverter()); + _jsonOptions.Converters.Add(new DocumentTypesCandidatesResultJsonConverter()); + _jsonOptions.Converters.Add(new DocumentsDatabaseJsonConverter()); + _jsonOptions.Converters.Add(new EncryptedRCLItemJsonConverter()); + _jsonOptions.Converters.Add(new EncryptedRCLResultJsonConverter()); + _jsonOptions.Converters.Add(new ErrorCoordinatesJsonConverter()); + _jsonOptions.Converters.Add(new FDSIDListJsonConverter()); + _jsonOptions.Converters.Add(new FaceApiJsonConverter()); + _jsonOptions.Converters.Add(new FaceApiSearchJsonConverter()); + _jsonOptions.Converters.Add(new FaceDetectionJsonConverter()); + _jsonOptions.Converters.Add(new FaceDetectionItemJsonConverter()); + _jsonOptions.Converters.Add(new FaceDetectionResultJsonConverter()); + _jsonOptions.Converters.Add(new FaceItemJsonConverter()); + _jsonOptions.Converters.Add(new FiberItemJsonConverter()); + _jsonOptions.Converters.Add(new FiberResultJsonConverter()); + _jsonOptions.Converters.Add(new FieldItemJsonConverter()); + _jsonOptions.Converters.Add(new FileImageJsonConverter()); + _jsonOptions.Converters.Add(new GetTransactionsByTagResponseJsonConverter()); + _jsonOptions.Converters.Add(new GraphDataJsonConverter()); + _jsonOptions.Converters.Add(new GraphicFieldJsonConverter()); + _jsonOptions.Converters.Add(new GraphicFieldTypeJsonConverter()); + _jsonOptions.Converters.Add(new GraphicFieldTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new GraphicFieldsListJsonConverter()); + _jsonOptions.Converters.Add(new GraphicsResultJsonConverter()); + _jsonOptions.Converters.Add(new HealthcheckJsonConverter()); + _jsonOptions.Converters.Add(new HealthcheckDocumentsDatabaseJsonConverter()); + _jsonOptions.Converters.Add(new IdentItemJsonConverter()); + _jsonOptions.Converters.Add(new IdentResultJsonConverter()); + _jsonOptions.Converters.Add(new ImageDataJsonConverter()); + _jsonOptions.Converters.Add(new ImageQAJsonConverter()); + _jsonOptions.Converters.Add(new ImageQualityCheckJsonConverter()); + _jsonOptions.Converters.Add(new ImageQualityCheckListJsonConverter()); + _jsonOptions.Converters.Add(new ImageQualityCheckListItemJsonConverter()); + _jsonOptions.Converters.Add(new ImageQualityCheckTypeJsonConverter()); + _jsonOptions.Converters.Add(new ImageQualityCheckTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new ImageQualityResultJsonConverter()); + _jsonOptions.Converters.Add(new ImageTransactionDataJsonConverter()); + _jsonOptions.Converters.Add(new ImagesJsonConverter()); + _jsonOptions.Converters.Add(new ImagesAvailableSourceJsonConverter()); + _jsonOptions.Converters.Add(new ImagesFieldJsonConverter()); + _jsonOptions.Converters.Add(new ImagesFieldValueJsonConverter()); + _jsonOptions.Converters.Add(new ImagesItemJsonConverter()); + _jsonOptions.Converters.Add(new ImagesResultJsonConverter()); + _jsonOptions.Converters.Add(new InDataJsonConverter()); + _jsonOptions.Converters.Add(new InDataTransactionImagesFieldValueJsonConverter()); + _jsonOptions.Converters.Add(new InDataVideoJsonConverter()); + _jsonOptions.Converters.Add(new InputBarcodeTypeJsonConverter()); + _jsonOptions.Converters.Add(new InputBarcodeTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new InputImageQualityChecksJsonConverter()); + _jsonOptions.Converters.Add(new InputImageQualityChecksNullableJsonConverter()); + _jsonOptions.Converters.Add(new LCIDJsonConverter()); + _jsonOptions.Converters.Add(new LCIDNullableJsonConverter()); + _jsonOptions.Converters.Add(new LexicalAnalysisResultJsonConverter()); + _jsonOptions.Converters.Add(new LicenseItemJsonConverter()); + _jsonOptions.Converters.Add(new LicenseResultJsonConverter()); + _jsonOptions.Converters.Add(new LightJsonConverter()); + _jsonOptions.Converters.Add(new LightNullableJsonConverter()); + _jsonOptions.Converters.Add(new ListTransactionsByTagResponseJsonConverter()); + _jsonOptions.Converters.Add(new ListVerifiedFieldsJsonConverter()); + _jsonOptions.Converters.Add(new ListVerifiedFieldsItemJsonConverter()); + _jsonOptions.Converters.Add(new LivenessParamsJsonConverter()); + _jsonOptions.Converters.Add(new LogLevelJsonConverter()); + _jsonOptions.Converters.Add(new LogLevelNullableJsonConverter()); + _jsonOptions.Converters.Add(new MRZDetectorResultJsonConverter()); + _jsonOptions.Converters.Add(new MRZFormatJsonConverter()); + _jsonOptions.Converters.Add(new MRZFormatNullableJsonConverter()); + _jsonOptions.Converters.Add(new MRZPositionResultJsonConverter()); + _jsonOptions.Converters.Add(new MRZRowsItemJsonConverter()); + _jsonOptions.Converters.Add(new MRZTestQualityJsonConverter()); + _jsonOptions.Converters.Add(new MRZTestQualityItemJsonConverter()); + _jsonOptions.Converters.Add(new MRZTestQualityResultJsonConverter()); + _jsonOptions.Converters.Add(new MeasureSystemJsonConverter()); + _jsonOptions.Converters.Add(new MeasureSystemNullableJsonConverter()); + _jsonOptions.Converters.Add(new MrzDetectModeEnumJsonConverter()); + _jsonOptions.Converters.Add(new MrzDetectModeEnumNullableJsonConverter()); + _jsonOptions.Converters.Add(new MrzPositionJsonConverter()); + _jsonOptions.Converters.Add(new MrzPositionItemJsonConverter()); + _jsonOptions.Converters.Add(new OCRSecurityTextItemJsonConverter()); + _jsonOptions.Converters.Add(new OCRSecurityTextResultJsonConverter()); + _jsonOptions.Converters.Add(new OneCandidateJsonConverter()); + _jsonOptions.Converters.Add(new OneCandidateItemJsonConverter()); + _jsonOptions.Converters.Add(new OriginalSymbolJsonConverter()); + _jsonOptions.Converters.Add(new OutDataJsonConverter()); + _jsonOptions.Converters.Add(new OutDataTransactionImagesFieldValueJsonConverter()); + _jsonOptions.Converters.Add(new PArrayFieldJsonConverter()); + _jsonOptions.Converters.Add(new ParsedDataJsonConverter()); + _jsonOptions.Converters.Add(new ParsingNotificationCodesJsonConverter()); + _jsonOptions.Converters.Add(new ParsingNotificationCodesNullableJsonConverter()); + _jsonOptions.Converters.Add(new PerDocumentConfigJsonConverter()); + _jsonOptions.Converters.Add(new PhotoIdentItemJsonConverter()); + _jsonOptions.Converters.Add(new PhotoIdentResultJsonConverter()); + _jsonOptions.Converters.Add(new PointJsonConverter()); + _jsonOptions.Converters.Add(new PointArrayJsonConverter()); + _jsonOptions.Converters.Add(new PointsContainerJsonConverter()); + _jsonOptions.Converters.Add(new ProcessParamsJsonConverter()); + _jsonOptions.Converters.Add(new ProcessParamsRfidJsonConverter()); + _jsonOptions.Converters.Add(new ProcessRequestJsonConverter()); + _jsonOptions.Converters.Add(new ProcessRequestImageJsonConverter()); + _jsonOptions.Converters.Add(new ProcessResponseJsonConverter()); + _jsonOptions.Converters.Add(new ProcessSystemInfoJsonConverter()); + _jsonOptions.Converters.Add(new ProcessingStatusJsonConverter()); + _jsonOptions.Converters.Add(new ProcessingStatusNullableJsonConverter()); + _jsonOptions.Converters.Add(new RFIDDocVisualExtendedFieldJsonConverter()); + _jsonOptions.Converters.Add(new RFIDDocVisualExtendedFieldItemJsonConverter()); + _jsonOptions.Converters.Add(new RFIDDocVisualExtendedInfoJsonConverter()); + _jsonOptions.Converters.Add(new RFIDDocVisualExtendedInfoItemJsonConverter()); + _jsonOptions.Converters.Add(new RFIDErrorCodesJsonConverter()); + _jsonOptions.Converters.Add(new RFIDErrorCodesNullableJsonConverter()); + _jsonOptions.Converters.Add(new RFIDGraphicsInfoResultJsonConverter()); + _jsonOptions.Converters.Add(new RFIDPKDResourceTypeJsonConverter()); + _jsonOptions.Converters.Add(new RFIDPKDResourceTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RFIDTextDataResultJsonConverter()); + _jsonOptions.Converters.Add(new RawImageContainerItemJsonConverter()); + _jsonOptions.Converters.Add(new RawImageContainerListJsonConverter()); + _jsonOptions.Converters.Add(new RectangleCoordinatesJsonConverter()); + _jsonOptions.Converters.Add(new ResultJsonConverter()); + _jsonOptions.Converters.Add(new ResultNullableJsonConverter()); + _jsonOptions.Converters.Add(new ResultItemJsonConverter()); + _jsonOptions.Converters.Add(new ResultMRZDetectorJsonConverter()); + _jsonOptions.Converters.Add(new ResultMRZDetectorItemJsonConverter()); + _jsonOptions.Converters.Add(new RfidAChipJsonConverter()); + _jsonOptions.Converters.Add(new RfidAChipNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidAccessControlInfoJsonConverter()); + _jsonOptions.Converters.Add(new RfidAccessControlProcedureTypeJsonConverter()); + _jsonOptions.Converters.Add(new RfidAccessControlProcedureTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidAccessKeyJsonConverter()); + _jsonOptions.Converters.Add(new RfidApplicationJsonConverter()); + _jsonOptions.Converters.Add(new RfidApplicationTypeJsonConverter()); + _jsonOptions.Converters.Add(new RfidApplicationTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidAttributeDataJsonConverter()); + _jsonOptions.Converters.Add(new RfidAttributeNameJsonConverter()); + _jsonOptions.Converters.Add(new RfidAuthenticationProcedureTypeJsonConverter()); + _jsonOptions.Converters.Add(new RfidAuthenticationProcedureTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidBaudRateJsonConverter()); + _jsonOptions.Converters.Add(new RfidBaudRateNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidCardPropertiesExtJsonConverter()); + _jsonOptions.Converters.Add(new RfidCertificateExJsonConverter()); + _jsonOptions.Converters.Add(new RfidCertificateOriginJsonConverter()); + _jsonOptions.Converters.Add(new RfidCertificateOriginNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidCertificateTypeJsonConverter()); + _jsonOptions.Converters.Add(new RfidCertificateTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidDG1JsonConverter()); + _jsonOptions.Converters.Add(new RfidDataFileJsonConverter()); + _jsonOptions.Converters.Add(new RfidDataFileTypeJsonConverter()); + _jsonOptions.Converters.Add(new RfidDataFileTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidDataGroupTypeTagJsonConverter()); + _jsonOptions.Converters.Add(new RfidDataGroupTypeTagNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidDistinguishedNameJsonConverter()); + _jsonOptions.Converters.Add(new RfidLocationJsonConverter()); + _jsonOptions.Converters.Add(new RfidLocationNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidOriginJsonConverter()); + _jsonOptions.Converters.Add(new RfidPasswordTypeJsonConverter()); + _jsonOptions.Converters.Add(new RfidPasswordTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidPkiExtensionJsonConverter()); + _jsonOptions.Converters.Add(new RfidRawDataJsonConverter()); + _jsonOptions.Converters.Add(new RfidSecurityObjectJsonConverter()); + _jsonOptions.Converters.Add(new RfidSessionDataJsonConverter()); + _jsonOptions.Converters.Add(new RfidSignerInfoExJsonConverter()); + _jsonOptions.Converters.Add(new RfidTerminalJsonConverter()); + _jsonOptions.Converters.Add(new RfidTerminalTypeJsonConverter()); + _jsonOptions.Converters.Add(new RfidTerminalTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidTypeJsonConverter()); + _jsonOptions.Converters.Add(new RfidTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new RfidValidityJsonConverter()); + _jsonOptions.Converters.Add(new ScenarioJsonConverter()); + _jsonOptions.Converters.Add(new ScenarioNullableJsonConverter()); + _jsonOptions.Converters.Add(new SecurityFeatureItemJsonConverter()); + _jsonOptions.Converters.Add(new SecurityFeatureResultJsonConverter()); + _jsonOptions.Converters.Add(new SecurityFeatureTypeJsonConverter()); + _jsonOptions.Converters.Add(new SecurityFeatureTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new SecurityObjectCertificatesJsonConverter()); + _jsonOptions.Converters.Add(new SourceJsonConverter()); + _jsonOptions.Converters.Add(new SourceNullableJsonConverter()); + _jsonOptions.Converters.Add(new SourceValidityJsonConverter()); + _jsonOptions.Converters.Add(new StatusJsonConverter()); + _jsonOptions.Converters.Add(new StatusItemJsonConverter()); + _jsonOptions.Converters.Add(new StatusResultJsonConverter()); + _jsonOptions.Converters.Add(new StringItemJsonConverter()); + _jsonOptions.Converters.Add(new StringRecognitionResultJsonConverter()); + _jsonOptions.Converters.Add(new SymbolJsonConverter()); + _jsonOptions.Converters.Add(new SymbolCandidateJsonConverter()); + _jsonOptions.Converters.Add(new SymbolEstimationItemJsonConverter()); + _jsonOptions.Converters.Add(new SymbolRecognitionResultJsonConverter()); + _jsonOptions.Converters.Add(new TDocBinaryInfoJsonConverter()); + _jsonOptions.Converters.Add(new TDocBinaryInfoItemJsonConverter()); + _jsonOptions.Converters.Add(new TOriginalRFIDGraphicsInfoJsonConverter()); + _jsonOptions.Converters.Add(new TOriginalRFIDGraphicsInfoItemJsonConverter()); + _jsonOptions.Converters.Add(new TextJsonConverter()); + _jsonOptions.Converters.Add(new TextAvailableSourceJsonConverter()); + _jsonOptions.Converters.Add(new TextDataResultJsonConverter()); + _jsonOptions.Converters.Add(new TextFieldJsonConverter()); + _jsonOptions.Converters.Add(new TextFieldTypeJsonConverter()); + _jsonOptions.Converters.Add(new TextFieldTypeNullableJsonConverter()); + _jsonOptions.Converters.Add(new TextFieldValueJsonConverter()); + _jsonOptions.Converters.Add(new TextItemJsonConverter()); + _jsonOptions.Converters.Add(new TextPostProcessingJsonConverter()); + _jsonOptions.Converters.Add(new TextPostProcessingNullableJsonConverter()); + _jsonOptions.Converters.Add(new TextResultJsonConverter()); + _jsonOptions.Converters.Add(new TransactionImageJsonConverter()); + _jsonOptions.Converters.Add(new TransactionInfoJsonConverter()); + _jsonOptions.Converters.Add(new TransactionProcessGetResponseJsonConverter()); + _jsonOptions.Converters.Add(new TransactionProcessRequestJsonConverter()); + _jsonOptions.Converters.Add(new TransactionProcessResponseJsonConverter()); + _jsonOptions.Converters.Add(new TransactionProcessResponseItemJsonConverter()); + _jsonOptions.Converters.Add(new TransactionProcessResultJsonConverter()); + _jsonOptions.Converters.Add(new TrfFtBytesJsonConverter()); + _jsonOptions.Converters.Add(new TrfFtStringJsonConverter()); + _jsonOptions.Converters.Add(new VerificationResultJsonConverter()); + _jsonOptions.Converters.Add(new VerificationResultNullableJsonConverter()); + _jsonOptions.Converters.Add(new VerifiedFieldMapJsonConverter()); + _jsonOptions.Converters.Add(new VisibilityJsonConverter()); + _jsonOptions.Converters.Add(new VisibilityNullableJsonConverter()); + _jsonOptions.Converters.Add(new VisualExtendedFieldItemJsonConverter()); + JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new(_jsonOptions); + _services.AddSingleton(jsonSerializerOptionsProvider); + _services.AddSingleton(); + _services.AddSingleton(); + _services.AddTransient(); + _services.AddSingleton(); + _services.AddTransient(); + _services.AddSingleton(); + _services.AddTransient(); + } + + /// + /// Configures the HttpClients. + /// + /// + /// + /// + public HostConfiguration AddApiHttpClients + ( + Action? client = null, Action? builder = null) + { + if (client == null) + client = c => c.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS); + + List builders = new List(); + + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + builders.Add(_services.AddHttpClient(client)); + + if (builder != null) + foreach (IHttpClientBuilder instance in builders) + builder(instance); + + HttpClientsAdded = true; + + return this; + } + + /// + /// Configures the JsonSerializerSettings + /// + /// + /// + public HostConfiguration ConfigureJsonOptions(Action options) + { + options(_jsonOptions); + + return this; + } + + /// + /// Adds tokens to your IServiceCollection + /// + /// + /// + /// + public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase + { + return AddTokens(new TTokenBase[]{ token }); + } + + /// + /// Adds tokens to your IServiceCollection + /// + /// + /// + /// + public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase + { + TokenContainer container = new TokenContainer(tokens); + _services.AddSingleton(services => container); + + return this; + } + + /// + /// Adds a token provider to your IServiceCollection + /// + /// + /// + /// + public HostConfiguration UseProvider() + where TTokenProvider : TokenProvider + where TTokenBase : TokenBase + { + _services.AddSingleton(); + _services.AddSingleton>(services => services.GetRequiredService()); + + return this; + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs b/src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs deleted file mode 100644 index efaacfd..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs deleted file mode 100644 index f27f1eb..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time foramt. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs b/src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs new file mode 100644 index 0000000..209e5bf --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs @@ -0,0 +1,27 @@ +// + +#nullable enable + +using System.Text.Json; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Provides the JsonSerializerOptions + /// + public class JsonSerializerOptionsProvider + { + /// + /// the JsonSerializerOptions + /// + public JsonSerializerOptions Options { get; } + + /// + /// Instantiates a JsonSerializerOptionsProvider + /// + public JsonSerializerOptionsProvider(JsonSerializerOptions options) + { + Options = options; + } + } +} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs b/src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs deleted file mode 100644 index f03d85a..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 6.9.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/Option.cs b/src/Regula.DocumentReader.WebClient/Client/Option.cs new file mode 100644 index 0000000..51f31bb --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/Option.cs @@ -0,0 +1,53 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// A wrapper for operation parameters which are not required + /// + public struct Option + { + /// + /// The value to send to the server + /// + public TType Value { get; } + + /// + /// When true the value will be sent to the server + /// + internal bool IsSet { get; } + + /// + /// A wrapper for operation parameters which are not required + /// + /// + public Option(TType value) + { + IsSet = true; + Value = value; + } + + /// + /// Implicitly converts this option to the contained type + /// + /// + public static implicit operator TType(Option option) => option.Value; + + /// + /// Implicitly converts the provided value to an Option + /// + /// + public static implicit operator Option(TType value) => new Option(value); + } +} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs new file mode 100644 index 0000000..43f0498 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs @@ -0,0 +1,56 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Provides a token to the api clients. Tokens will be rate limited based on the provided TimeSpan. + /// + /// + public class RateLimitProvider : TokenProvider where TTokenBase : TokenBase + { + internal Dictionary> AvailableTokens { get; } = new(); + + /// + /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. + /// + /// + public RateLimitProvider(TokenContainer container) : base(container.Tokens) + { + foreach(TTokenBase token in _tokens) + token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40)); + + global::System.Threading.Channels.BoundedChannelOptions options = new global::System.Threading.Channels.BoundedChannelOptions(_tokens.Length) + { + FullMode = global::System.Threading.Channels.BoundedChannelFullMode.DropWrite + }; + + AvailableTokens.Add(string.Empty, global::System.Threading.Channels.Channel.CreateBounded(options)); + + foreach(global::System.Threading.Channels.Channel tokens in AvailableTokens.Values) + for (int i = 0; i < _tokens.Length; i++) + _tokens[i].TokenBecameAvailable += ((sender) => tokens.Writer.TryWrite((TTokenBase) sender)); + } + + internal override async System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default) + { + if (!AvailableTokens.TryGetValue(header, out global::System.Threading.Channels.Channel? tokens)) + throw new KeyNotFoundException($"Could not locate a token for header '{header}'."); + + return await tokens.Reader.ReadAsync(cancellation).ConfigureAwait(false); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/TokenBase.cs b/src/Regula.DocumentReader.WebClient/Client/TokenBase.cs new file mode 100644 index 0000000..478ac2f --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/TokenBase.cs @@ -0,0 +1,71 @@ +// + +#nullable enable + +using System; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// The base for all tokens. + /// + public abstract class TokenBase + { + private DateTime _nextAvailable = DateTime.UtcNow; + private object _nextAvailableLock = new object(); + private readonly System.Timers.Timer _timer = new System.Timers.Timer(); + + + internal TimeSpan? Timeout { get; set; } + internal delegate void TokenBecameAvailableEventHandler(object sender); + internal event TokenBecameAvailableEventHandler? TokenBecameAvailable; + + + /// + /// Initialize a TokenBase object. + /// + /// + internal TokenBase(TimeSpan? timeout = null) + { + Timeout = timeout; + + if (Timeout != null) + StartTimer(Timeout.Value); + } + + + /// + /// Starts the token's timer + /// + /// + internal void StartTimer(TimeSpan timeout) + { + Timeout = timeout; + _timer.Interval = Timeout.Value.TotalMilliseconds; + _timer.Elapsed += OnTimer; + _timer.AutoReset = true; + _timer.Start(); + } + + /// + /// Returns true while the token is rate limited. + /// + public bool IsRateLimited => _nextAvailable > DateTime.UtcNow; + + /// + /// Triggered when the server returns status code TooManyRequests + /// Once triggered the local timeout will be extended an arbitrary length of time. + /// + public void BeginRateLimit() + { + lock(_nextAvailableLock) + _nextAvailable = DateTime.UtcNow.AddSeconds(5); + } + + private void OnTimer(object? sender, System.Timers.ElapsedEventArgs e) + { + if (TokenBecameAvailable != null && !IsRateLimited) + TokenBecameAvailable.Invoke(this); + } + } +} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs b/src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs new file mode 100644 index 0000000..d5b34d1 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs @@ -0,0 +1,37 @@ +// + +#nullable enable + +using System.Linq; +using System.Collections.Generic; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// A container for a collection of tokens. + /// + /// + public sealed class TokenContainer where TTokenBase : TokenBase + { + /// + /// The collection of tokens + /// + public List Tokens { get; } = new List(); + + /// + /// Instantiates a TokenContainer + /// + public TokenContainer() + { + } + + /// + /// Instantiates a TokenContainer + /// + /// + public TokenContainer(global::System.Collections.Generic.IEnumerable tokens) + { + Tokens = tokens.ToList(); + } + } +} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs b/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs new file mode 100644 index 0000000..4e7fd43 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs @@ -0,0 +1,44 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Linq; +using System.Collections.Generic; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient +{ + /// + /// A class which will provide tokens. + /// + public abstract class TokenProvider where TTokenBase : TokenBase + { + /// + /// The array of tokens. + /// + protected TTokenBase[] _tokens; + + internal abstract System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default); + + /// + /// Instantiates a TokenProvider. + /// + /// + public TokenProvider(IEnumerable tokens) + { + _tokens = tokens.ToArray(); + + if (_tokens.Length == 0) + throw new ArgumentException("You did not provide any tokens."); + } + } +} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs new file mode 100644 index 0000000..f64bab7 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs @@ -0,0 +1,59 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Extensions.Hosting; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Extensions +{ + /// + /// Extension methods for IHostBuilder + /// + public static class IHostBuilderExtensions + { + /// + /// Add the api to your host builder. + /// + /// + public static IHostBuilder ConfigureApi(this IHostBuilder builder) + { + builder.ConfigureServices((context, services) => + { + HostConfiguration config = new HostConfiguration(services); + + IServiceCollectionExtensions.AddApi(services, config); + }); + + return builder; + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action options) + { + builder.ConfigureServices((context, services) => + { + HostConfiguration config = new HostConfiguration(services); + + options(context, services, config); + + IServiceCollectionExtensions.AddApi(services, config); + }); + + return builder; + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs new file mode 100644 index 0000000..e77609e --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs @@ -0,0 +1,79 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Net.Http; +using Microsoft.Extensions.DependencyInjection; +using Polly.Timeout; +using Polly.Extensions.Http; +using Polly; + +namespace Regula.DocumentReader.WebClient.Extensions +{ + /// + /// Extension methods for IHttpClientBuilder + /// + public static class IHttpClientBuilderExtensions + { + /// + /// Adds a Polly retry policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) + { + client.AddPolicyHandler(RetryPolicy(retries)); + + return client; + } + + /// + /// Adds a Polly timeout policy to your clients. + /// + /// + /// + /// + public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) + { + client.AddPolicyHandler(TimeoutPolicy(timeout)); + + return client; + } + + /// + /// Adds a Polly circuit breaker to your clients. + /// + /// + /// + /// + /// + public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + { + client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); + + return client; + } + + private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) + => HttpPolicyExtensions + .HandleTransientHttpError() + .Or() + .RetryAsync(retries); + + private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) + => Policy.TimeoutAsync(timeout); + + private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( + PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) + => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); + } +} diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs new file mode 100644 index 0000000..a1df963 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs @@ -0,0 +1,73 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Linq; +using Microsoft.Extensions.DependencyInjection; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Extensions +{ + /// + /// Extension methods for IServiceCollection + /// + public static class IServiceCollectionExtensions + { + /// + /// Add the api to your host builder. + /// + /// + public static void AddApi(this IServiceCollection services) + { + HostConfiguration config = new(services); + AddApi(services, config); + } + + /// + /// Add the api to your host builder. + /// + /// + /// + public static void AddApi(this IServiceCollection services, Action options) + { + HostConfiguration config = new(services); + options(config); + AddApi(services, config); + } + + internal static void AddApi(IServiceCollection services, HostConfiguration host) + { + if (!host.HttpClientsAdded) + host.AddApiHttpClients(); + + services.AddSingleton(); + + // ensure that a token provider was provided for this token type + // if not, default to RateLimitProvider + var containerServices = services.Where(s => s.ServiceType.IsGenericType && + s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); + + foreach(var containerService in containerServices) + { + var tokenType = containerService.ServiceType.GenericTypeArguments[0]; + + var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); + + if (provider == null) + { + services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); + services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), + s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); + } + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs b/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs index 62b9cbb..5f7ccf3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs @@ -1,56 +1,69 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// AreaArray /// - [DataContract] - public partial class AreaArray : IEquatable, IValidatableObject + public partial class AreaArray : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// list. - /// points. - public AreaArray(List list = default(List), List points = default(List)) + /// Number of elements in List and Points + /// list + /// points + [JsonConstructor] + public AreaArray(decimal count, List list, List points) { - this.List = list; - this.Points = points; + Count = count; + List = list; + Points = points; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Number of elements in List and Points + /// + /// Number of elements in List and Points + [JsonPropertyName("Count")] + public decimal Count { get; set; } + /// /// Gets or Sets List /// - [DataMember(Name="List", EmitDefaultValue=false)] + [JsonPropertyName("List")] public List List { get; set; } /// /// Gets or Sets Points /// - [DataMember(Name="Points", EmitDefaultValue=false)] + [JsonPropertyName("Points")] public List Points { get; set; } /// @@ -59,84 +72,142 @@ public partial class AreaArray : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class AreaArray {\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); sb.Append(" Points: ").Append(Points).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as AreaArray); + yield break; } + } + /// + /// A Json converter for type + /// + public class AreaArrayJsonConverter : JsonConverter + { /// - /// Returns true if AreaArray instances are equal + /// Deserializes json to /// - /// Instance of AreaArray to be compared - /// Boolean - public bool Equals(AreaArray input) + /// + /// + /// + /// + /// + public override AreaArray Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ) && - ( - this.Points == input.Points || - this.Points != null && - input.Points != null && - this.Points.SequenceEqual(input.Points) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option count = default; + Option?> list = default; + Option?> points = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetDecimal()); + break; + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Points": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + points = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!count.IsSet) + throw new ArgumentException("Property is required for class AreaArray.", nameof(count)); + + if (!list.IsSet) + throw new ArgumentException("Property is required for class AreaArray.", nameof(list)); + + if (!points.IsSet) + throw new ArgumentException("Property is required for class AreaArray.", nameof(points)); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class AreaArray."); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class AreaArray."); + + if (points.IsSet && points.Value == null) + throw new ArgumentNullException(nameof(points), "Property is not nullable for class AreaArray."); + + return new AreaArray(count.Value!.Value!, list.Value!, points.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AreaArray areaArray, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - if (this.Points != null) - hashCode = hashCode * 59 + this.Points.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, areaArray, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AreaArray areaArray, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (areaArray.List == null) + throw new ArgumentNullException(nameof(areaArray.List), "Property is required for class AreaArray."); + + if (areaArray.Points == null) + throw new ArgumentNullException(nameof(areaArray.Points), "Property is required for class AreaArray."); + + writer.WriteNumber("Count", areaArray.Count); + + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, areaArray.List, jsonSerializerOptions); + writer.WritePropertyName("Points"); + JsonSerializer.Serialize(writer, areaArray.Points, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs b/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs index 037636b..71d4217 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs @@ -1,64 +1,68 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Checked fragment coordinates /// - [DataContract] - public partial class AreaContainer : IEquatable, IValidatableObject + public partial class AreaContainer : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// count. - /// list. - /// points. - public AreaContainer(int count = default(int), List list = default(List), List points = default(List)) + /// count + /// list + /// points + [JsonConstructor] + public AreaContainer(int count, List list, List points) { - this.Count = count; - this.List = list; - this.Points = points; + Count = count; + List = list; + Points = points; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Count /// - [DataMember(Name="Count", EmitDefaultValue=false)] + [JsonPropertyName("Count")] public int Count { get; set; } /// /// Gets or Sets List /// - [DataMember(Name="List", EmitDefaultValue=false)] + [JsonPropertyName("List")] public List List { get; set; } /// /// Gets or Sets Points /// - [DataMember(Name="Points", EmitDefaultValue=false)] + [JsonPropertyName("Points")] public List Points { get; set; } /// @@ -67,7 +71,7 @@ public partial class AreaContainer : IEquatable, IValidatableObj /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class AreaContainer {\n"); sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); @@ -75,84 +79,134 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as AreaContainer); + yield break; } + } + /// + /// A Json converter for type + /// + public class AreaContainerJsonConverter : JsonConverter + { /// - /// Returns true if AreaContainer instances are equal + /// Deserializes json to /// - /// Instance of AreaContainer to be compared - /// Boolean - public bool Equals(AreaContainer input) + /// + /// + /// + /// + /// + public override AreaContainer Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Count == input.Count || - (this.Count != null && - this.Count.Equals(input.Count)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ) && - ( - this.Points == input.Points || - this.Points != null && - input.Points != null && - this.Points.SequenceEqual(input.Points) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option count = default; + Option?> list = default; + Option?> points = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetInt32()); + break; + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Points": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + points = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!count.IsSet) + throw new ArgumentException("Property is required for class AreaContainer.", nameof(count)); + + if (!list.IsSet) + throw new ArgumentException("Property is required for class AreaContainer.", nameof(list)); + + if (!points.IsSet) + throw new ArgumentException("Property is required for class AreaContainer.", nameof(points)); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class AreaContainer."); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class AreaContainer."); + + if (points.IsSet && points.Value == null) + throw new ArgumentNullException(nameof(points), "Property is not nullable for class AreaContainer."); + + return new AreaContainer(count.Value!.Value!, list.Value!, points.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AreaContainer areaContainer, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Count != null) - hashCode = hashCode * 59 + this.Count.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - if (this.Points != null) - hashCode = hashCode * 59 + this.Points.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, areaContainer, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AreaContainer areaContainer, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (areaContainer.List == null) + throw new ArgumentNullException(nameof(areaContainer.List), "Property is required for class AreaContainer."); + + if (areaContainer.Points == null) + throw new ArgumentNullException(nameof(areaContainer.Points), "Property is required for class AreaContainer."); + + writer.WriteNumber("Count", areaContainer.Count); + + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, areaContainer.List, jsonSerializerOptions); + writer.WritePropertyName("Points"); + JsonSerializer.Serialize(writer, areaContainer.Points, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs index 5cb278d..0baa1f1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs @@ -1,175 +1,300 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthParams /// - [DataContract] - public partial class AuthParams : IEquatable, IValidatableObject + public partial class AuthParams : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// This parameter is used to enable document liveness check. - /// livenessParams. - /// This parameter is used to enable Document luminescence check in UV light. - /// This parameter is used to enable B900 ink MRZ contrast check in IR light. - /// This parameter is used to enable Image patterns presence/absence check (position, shape, color). - /// This parameter is used to enable Fibers detection. - /// This parameter is used to enable Extended MRZ Check. - /// This parameter is used to enable Extended OCR Check. - /// This parameter is used to enable laminate integrity check in axial light. - /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.). - /// This parameter is used to enable Document elements visibility check in IR light. - /// This parameter is used to enable Invisible Personal Information (IPI) check. - /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked). - /// This parameter is used to enable Portrait comparison check. - /// This parameter is used to enable LetterScreen check. - public AuthParams(bool? checkLiveness = default(bool?), LivenessParams livenessParams = default(LivenessParams), bool? checkUVLuminiscence = default(bool?), bool? checkIRB900 = default(bool?), bool? checkImagePatterns = default(bool?), bool? checkFibers = default(bool?), bool? checkExtMRZ = default(bool?), bool? checkExtOCR = default(bool?), bool? checkAxial = default(bool?), bool? checkBarcodeFormat = default(bool?), bool? checkIRVisibility = default(bool?), bool? checkIPI = default(bool?), bool? checkPhotoEmbedding = default(bool?), bool? checkPhotoComparison = default(bool?), bool? checkLetterScreen = default(bool?)) + /// This parameter is used to enable document liveness check + /// livenessParams + /// This parameter is used to enable Document luminescence check in UV light + /// This parameter is used to enable B900 ink MRZ contrast check in IR light + /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) + /// This parameter is used to enable Fibers detection + /// This parameter is used to enable Extended MRZ Check + /// This parameter is used to enable Extended OCR Check + /// This parameter is used to enable laminate integrity check in axial light + /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) + /// This parameter is used to enable Document elements visibility check in IR light + /// This parameter is used to enable Invisible Personal Information (IPI) check + /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) + /// This parameter is used to enable Portrait comparison check + /// This parameter is used to enable LetterScreen check + /// This parameter is used to enable Security text check + [JsonConstructor] + public AuthParams(Option checkLiveness = default, Option livenessParams = default, Option checkUVLuminiscence = default, Option checkIRB900 = default, Option checkImagePatterns = default, Option checkFibers = default, Option checkExtMRZ = default, Option checkExtOCR = default, Option checkAxial = default, Option checkBarcodeFormat = default, Option checkIRVisibility = default, Option checkIPI = default, Option checkPhotoEmbedding = default, Option checkPhotoComparison = default, Option checkLetterScreen = default, Option checkSecurityText = default) { - this.CheckLiveness = checkLiveness; - this.LivenessParams = livenessParams; - this.CheckUVLuminiscence = checkUVLuminiscence; - this.CheckIRB900 = checkIRB900; - this.CheckImagePatterns = checkImagePatterns; - this.CheckFibers = checkFibers; - this.CheckExtMRZ = checkExtMRZ; - this.CheckExtOCR = checkExtOCR; - this.CheckAxial = checkAxial; - this.CheckBarcodeFormat = checkBarcodeFormat; - this.CheckIRVisibility = checkIRVisibility; - this.CheckIPI = checkIPI; - this.CheckPhotoEmbedding = checkPhotoEmbedding; - this.CheckPhotoComparison = checkPhotoComparison; - this.CheckLetterScreen = checkLetterScreen; + CheckLivenessOption = checkLiveness; + LivenessParamsOption = livenessParams; + CheckUVLuminiscenceOption = checkUVLuminiscence; + CheckIRB900Option = checkIRB900; + CheckImagePatternsOption = checkImagePatterns; + CheckFibersOption = checkFibers; + CheckExtMRZOption = checkExtMRZ; + CheckExtOCROption = checkExtOCR; + CheckAxialOption = checkAxial; + CheckBarcodeFormatOption = checkBarcodeFormat; + CheckIRVisibilityOption = checkIRVisibility; + CheckIPIOption = checkIPI; + CheckPhotoEmbeddingOption = checkPhotoEmbedding; + CheckPhotoComparisonOption = checkPhotoComparison; + CheckLetterScreenOption = checkLetterScreen; + CheckSecurityTextOption = checkSecurityText; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of CheckLiveness + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckLivenessOption { get; private set; } + /// /// This parameter is used to enable document liveness check /// /// This parameter is used to enable document liveness check - [DataMember(Name="checkLiveness", EmitDefaultValue=false)] - public bool? CheckLiveness { get; set; } + [JsonPropertyName("checkLiveness")] + public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new(value); } } + + /// + /// Used to track the state of LivenessParams + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LivenessParamsOption { get; private set; } /// /// Gets or Sets LivenessParams /// - [DataMember(Name="livenessParams", EmitDefaultValue=false)] - public LivenessParams LivenessParams { get; set; } + [JsonPropertyName("livenessParams")] + public LivenessParams? LivenessParams { get { return this.LivenessParamsOption; } set { this.LivenessParamsOption = new(value); } } + + /// + /// Used to track the state of CheckUVLuminiscence + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckUVLuminiscenceOption { get; private set; } /// /// This parameter is used to enable Document luminescence check in UV light /// /// This parameter is used to enable Document luminescence check in UV light - [DataMember(Name="checkUVLuminiscence", EmitDefaultValue=false)] - public bool? CheckUVLuminiscence { get; set; } + [JsonPropertyName("checkUVLuminiscence")] + public bool? CheckUVLuminiscence { get { return this.CheckUVLuminiscenceOption; } set { this.CheckUVLuminiscenceOption = new(value); } } + + /// + /// Used to track the state of CheckIRB900 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckIRB900Option { get; private set; } /// /// This parameter is used to enable B900 ink MRZ contrast check in IR light /// /// This parameter is used to enable B900 ink MRZ contrast check in IR light - [DataMember(Name="checkIRB900", EmitDefaultValue=false)] - public bool? CheckIRB900 { get; set; } + [JsonPropertyName("checkIRB900")] + public bool? CheckIRB900 { get { return this.CheckIRB900Option; } set { this.CheckIRB900Option = new(value); } } + + /// + /// Used to track the state of CheckImagePatterns + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckImagePatternsOption { get; private set; } /// /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) /// /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) - [DataMember(Name="checkImagePatterns", EmitDefaultValue=false)] - public bool? CheckImagePatterns { get; set; } + [JsonPropertyName("checkImagePatterns")] + public bool? CheckImagePatterns { get { return this.CheckImagePatternsOption; } set { this.CheckImagePatternsOption = new(value); } } + + /// + /// Used to track the state of CheckFibers + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckFibersOption { get; private set; } /// /// This parameter is used to enable Fibers detection /// /// This parameter is used to enable Fibers detection - [DataMember(Name="checkFibers", EmitDefaultValue=false)] - public bool? CheckFibers { get; set; } + [JsonPropertyName("checkFibers")] + public bool? CheckFibers { get { return this.CheckFibersOption; } set { this.CheckFibersOption = new(value); } } + + /// + /// Used to track the state of CheckExtMRZ + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckExtMRZOption { get; private set; } /// /// This parameter is used to enable Extended MRZ Check /// /// This parameter is used to enable Extended MRZ Check - [DataMember(Name="checkExtMRZ", EmitDefaultValue=false)] - public bool? CheckExtMRZ { get; set; } + [JsonPropertyName("checkExtMRZ")] + public bool? CheckExtMRZ { get { return this.CheckExtMRZOption; } set { this.CheckExtMRZOption = new(value); } } + + /// + /// Used to track the state of CheckExtOCR + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckExtOCROption { get; private set; } /// /// This parameter is used to enable Extended OCR Check /// /// This parameter is used to enable Extended OCR Check - [DataMember(Name="checkExtOCR", EmitDefaultValue=false)] - public bool? CheckExtOCR { get; set; } + [JsonPropertyName("checkExtOCR")] + public bool? CheckExtOCR { get { return this.CheckExtOCROption; } set { this.CheckExtOCROption = new(value); } } + + /// + /// Used to track the state of CheckAxial + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckAxialOption { get; private set; } /// /// This parameter is used to enable laminate integrity check in axial light /// /// This parameter is used to enable laminate integrity check in axial light - [DataMember(Name="checkAxial", EmitDefaultValue=false)] - public bool? CheckAxial { get; set; } + [JsonPropertyName("checkAxial")] + public bool? CheckAxial { get { return this.CheckAxialOption; } set { this.CheckAxialOption = new(value); } } + + /// + /// Used to track the state of CheckBarcodeFormat + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckBarcodeFormatOption { get; private set; } /// /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) /// /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) - [DataMember(Name="checkBarcodeFormat", EmitDefaultValue=false)] - public bool? CheckBarcodeFormat { get; set; } + [JsonPropertyName("checkBarcodeFormat")] + public bool? CheckBarcodeFormat { get { return this.CheckBarcodeFormatOption; } set { this.CheckBarcodeFormatOption = new(value); } } + + /// + /// Used to track the state of CheckIRVisibility + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckIRVisibilityOption { get; private set; } /// /// This parameter is used to enable Document elements visibility check in IR light /// /// This parameter is used to enable Document elements visibility check in IR light - [DataMember(Name="checkIRVisibility", EmitDefaultValue=false)] - public bool? CheckIRVisibility { get; set; } + [JsonPropertyName("checkIRVisibility")] + public bool? CheckIRVisibility { get { return this.CheckIRVisibilityOption; } set { this.CheckIRVisibilityOption = new(value); } } + + /// + /// Used to track the state of CheckIPI + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckIPIOption { get; private set; } /// /// This parameter is used to enable Invisible Personal Information (IPI) check /// /// This parameter is used to enable Invisible Personal Information (IPI) check - [DataMember(Name="checkIPI", EmitDefaultValue=false)] - public bool? CheckIPI { get; set; } + [JsonPropertyName("checkIPI")] + public bool? CheckIPI { get { return this.CheckIPIOption; } set { this.CheckIPIOption = new(value); } } + + /// + /// Used to track the state of CheckPhotoEmbedding + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckPhotoEmbeddingOption { get; private set; } /// /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) /// /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) - [DataMember(Name="checkPhotoEmbedding", EmitDefaultValue=false)] - public bool? CheckPhotoEmbedding { get; set; } + [JsonPropertyName("checkPhotoEmbedding")] + public bool? CheckPhotoEmbedding { get { return this.CheckPhotoEmbeddingOption; } set { this.CheckPhotoEmbeddingOption = new(value); } } + + /// + /// Used to track the state of CheckPhotoComparison + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckPhotoComparisonOption { get; private set; } /// /// This parameter is used to enable Portrait comparison check /// /// This parameter is used to enable Portrait comparison check - [DataMember(Name="checkPhotoComparison", EmitDefaultValue=false)] - public bool? CheckPhotoComparison { get; set; } + [JsonPropertyName("checkPhotoComparison")] + public bool? CheckPhotoComparison { get { return this.CheckPhotoComparisonOption; } set { this.CheckPhotoComparisonOption = new(value); } } + + /// + /// Used to track the state of CheckLetterScreen + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckLetterScreenOption { get; private set; } /// /// This parameter is used to enable LetterScreen check /// /// This parameter is used to enable LetterScreen check - [DataMember(Name="checkLetterScreen", EmitDefaultValue=false)] - public bool? CheckLetterScreen { get; set; } + [JsonPropertyName("checkLetterScreen")] + public bool? CheckLetterScreen { get { return this.CheckLetterScreenOption; } set { this.CheckLetterScreenOption = new(value); } } + + /// + /// Used to track the state of CheckSecurityText + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckSecurityTextOption { get; private set; } + + /// + /// This parameter is used to enable Security text check + /// + /// This parameter is used to enable Security text check + [JsonPropertyName("checkSecurityText")] + public bool? CheckSecurityText { get { return this.CheckSecurityTextOption; } set { this.CheckSecurityTextOption = new(value); } } /// /// Returns the string presentation of the object @@ -177,7 +302,7 @@ public partial class AuthParams : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class AuthParams {\n"); sb.Append(" CheckLiveness: ").Append(CheckLiveness).Append("\n"); sb.Append(" LivenessParams: ").Append(LivenessParams).Append("\n"); @@ -194,169 +319,273 @@ public override string ToString() sb.Append(" CheckPhotoEmbedding: ").Append(CheckPhotoEmbedding).Append("\n"); sb.Append(" CheckPhotoComparison: ").Append(CheckPhotoComparison).Append("\n"); sb.Append(" CheckLetterScreen: ").Append(CheckLetterScreen).Append("\n"); + sb.Append(" CheckSecurityText: ").Append(CheckSecurityText).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class AuthParamsJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override AuthParams Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as AuthParams); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option checkLiveness = default; + Option livenessParams = default; + Option checkUVLuminiscence = default; + Option checkIRB900 = default; + Option checkImagePatterns = default; + Option checkFibers = default; + Option checkExtMRZ = default; + Option checkExtOCR = default; + Option checkAxial = default; + Option checkBarcodeFormat = default; + Option checkIRVisibility = default; + Option checkIPI = default; + Option checkPhotoEmbedding = default; + Option checkPhotoComparison = default; + Option checkLetterScreen = default; + Option checkSecurityText = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "checkLiveness": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkLiveness = new Option(utf8JsonReader.GetBoolean()); + break; + case "livenessParams": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + livenessParams = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "checkUVLuminiscence": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkUVLuminiscence = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkIRB900": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkIRB900 = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkImagePatterns": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkImagePatterns = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkFibers": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkFibers = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkExtMRZ": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkExtMRZ = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkExtOCR": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkExtOCR = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkAxial": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkAxial = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkBarcodeFormat": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkBarcodeFormat = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkIRVisibility": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkIRVisibility = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkIPI": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkIPI = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkPhotoEmbedding": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkPhotoEmbedding = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkPhotoComparison": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkPhotoComparison = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkLetterScreen": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkLetterScreen = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkSecurityText": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkSecurityText = new Option(utf8JsonReader.GetBoolean()); + break; + default: + break; + } + } + } + + if (checkLiveness.IsSet && checkLiveness.Value == null) + throw new ArgumentNullException(nameof(checkLiveness), "Property is not nullable for class AuthParams."); + + if (livenessParams.IsSet && livenessParams.Value == null) + throw new ArgumentNullException(nameof(livenessParams), "Property is not nullable for class AuthParams."); + + if (checkUVLuminiscence.IsSet && checkUVLuminiscence.Value == null) + throw new ArgumentNullException(nameof(checkUVLuminiscence), "Property is not nullable for class AuthParams."); + + if (checkIRB900.IsSet && checkIRB900.Value == null) + throw new ArgumentNullException(nameof(checkIRB900), "Property is not nullable for class AuthParams."); + + if (checkImagePatterns.IsSet && checkImagePatterns.Value == null) + throw new ArgumentNullException(nameof(checkImagePatterns), "Property is not nullable for class AuthParams."); + + if (checkFibers.IsSet && checkFibers.Value == null) + throw new ArgumentNullException(nameof(checkFibers), "Property is not nullable for class AuthParams."); + + if (checkExtMRZ.IsSet && checkExtMRZ.Value == null) + throw new ArgumentNullException(nameof(checkExtMRZ), "Property is not nullable for class AuthParams."); + + if (checkExtOCR.IsSet && checkExtOCR.Value == null) + throw new ArgumentNullException(nameof(checkExtOCR), "Property is not nullable for class AuthParams."); + + if (checkAxial.IsSet && checkAxial.Value == null) + throw new ArgumentNullException(nameof(checkAxial), "Property is not nullable for class AuthParams."); + + if (checkBarcodeFormat.IsSet && checkBarcodeFormat.Value == null) + throw new ArgumentNullException(nameof(checkBarcodeFormat), "Property is not nullable for class AuthParams."); + + if (checkIRVisibility.IsSet && checkIRVisibility.Value == null) + throw new ArgumentNullException(nameof(checkIRVisibility), "Property is not nullable for class AuthParams."); + + if (checkIPI.IsSet && checkIPI.Value == null) + throw new ArgumentNullException(nameof(checkIPI), "Property is not nullable for class AuthParams."); + + if (checkPhotoEmbedding.IsSet && checkPhotoEmbedding.Value == null) + throw new ArgumentNullException(nameof(checkPhotoEmbedding), "Property is not nullable for class AuthParams."); + + if (checkPhotoComparison.IsSet && checkPhotoComparison.Value == null) + throw new ArgumentNullException(nameof(checkPhotoComparison), "Property is not nullable for class AuthParams."); + + if (checkLetterScreen.IsSet && checkLetterScreen.Value == null) + throw new ArgumentNullException(nameof(checkLetterScreen), "Property is not nullable for class AuthParams."); + + if (checkSecurityText.IsSet && checkSecurityText.Value == null) + throw new ArgumentNullException(nameof(checkSecurityText), "Property is not nullable for class AuthParams."); + + return new AuthParams(checkLiveness, livenessParams, checkUVLuminiscence, checkIRB900, checkImagePatterns, checkFibers, checkExtMRZ, checkExtOCR, checkAxial, checkBarcodeFormat, checkIRVisibility, checkIPI, checkPhotoEmbedding, checkPhotoComparison, checkLetterScreen, checkSecurityText); } /// - /// Returns true if AuthParams instances are equal + /// Serializes a /// - /// Instance of AuthParams to be compared - /// Boolean - public bool Equals(AuthParams input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthParams authParams, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.CheckLiveness == input.CheckLiveness || - (this.CheckLiveness != null && - this.CheckLiveness.Equals(input.CheckLiveness)) - ) && - ( - this.LivenessParams == input.LivenessParams || - (this.LivenessParams != null && - this.LivenessParams.Equals(input.LivenessParams)) - ) && - ( - this.CheckUVLuminiscence == input.CheckUVLuminiscence || - (this.CheckUVLuminiscence != null && - this.CheckUVLuminiscence.Equals(input.CheckUVLuminiscence)) - ) && - ( - this.CheckIRB900 == input.CheckIRB900 || - (this.CheckIRB900 != null && - this.CheckIRB900.Equals(input.CheckIRB900)) - ) && - ( - this.CheckImagePatterns == input.CheckImagePatterns || - (this.CheckImagePatterns != null && - this.CheckImagePatterns.Equals(input.CheckImagePatterns)) - ) && - ( - this.CheckFibers == input.CheckFibers || - (this.CheckFibers != null && - this.CheckFibers.Equals(input.CheckFibers)) - ) && - ( - this.CheckExtMRZ == input.CheckExtMRZ || - (this.CheckExtMRZ != null && - this.CheckExtMRZ.Equals(input.CheckExtMRZ)) - ) && - ( - this.CheckExtOCR == input.CheckExtOCR || - (this.CheckExtOCR != null && - this.CheckExtOCR.Equals(input.CheckExtOCR)) - ) && - ( - this.CheckAxial == input.CheckAxial || - (this.CheckAxial != null && - this.CheckAxial.Equals(input.CheckAxial)) - ) && - ( - this.CheckBarcodeFormat == input.CheckBarcodeFormat || - (this.CheckBarcodeFormat != null && - this.CheckBarcodeFormat.Equals(input.CheckBarcodeFormat)) - ) && - ( - this.CheckIRVisibility == input.CheckIRVisibility || - (this.CheckIRVisibility != null && - this.CheckIRVisibility.Equals(input.CheckIRVisibility)) - ) && - ( - this.CheckIPI == input.CheckIPI || - (this.CheckIPI != null && - this.CheckIPI.Equals(input.CheckIPI)) - ) && - ( - this.CheckPhotoEmbedding == input.CheckPhotoEmbedding || - (this.CheckPhotoEmbedding != null && - this.CheckPhotoEmbedding.Equals(input.CheckPhotoEmbedding)) - ) && - ( - this.CheckPhotoComparison == input.CheckPhotoComparison || - (this.CheckPhotoComparison != null && - this.CheckPhotoComparison.Equals(input.CheckPhotoComparison)) - ) && - ( - this.CheckLetterScreen == input.CheckLetterScreen || - (this.CheckLetterScreen != null && - this.CheckLetterScreen.Equals(input.CheckLetterScreen)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, authParams, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AuthParams authParams, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (authParams.LivenessParamsOption.IsSet && authParams.LivenessParams == null) + throw new ArgumentNullException(nameof(authParams.LivenessParams), "Property is required for class AuthParams."); + + if (authParams.CheckLivenessOption.IsSet) + writer.WriteBoolean("checkLiveness", authParams.CheckLivenessOption.Value!.Value); + + if (authParams.LivenessParamsOption.IsSet) { - int hashCode = 41; - if (this.CheckLiveness != null) - hashCode = hashCode * 59 + this.CheckLiveness.GetHashCode(); - if (this.LivenessParams != null) - hashCode = hashCode * 59 + this.LivenessParams.GetHashCode(); - if (this.CheckUVLuminiscence != null) - hashCode = hashCode * 59 + this.CheckUVLuminiscence.GetHashCode(); - if (this.CheckIRB900 != null) - hashCode = hashCode * 59 + this.CheckIRB900.GetHashCode(); - if (this.CheckImagePatterns != null) - hashCode = hashCode * 59 + this.CheckImagePatterns.GetHashCode(); - if (this.CheckFibers != null) - hashCode = hashCode * 59 + this.CheckFibers.GetHashCode(); - if (this.CheckExtMRZ != null) - hashCode = hashCode * 59 + this.CheckExtMRZ.GetHashCode(); - if (this.CheckExtOCR != null) - hashCode = hashCode * 59 + this.CheckExtOCR.GetHashCode(); - if (this.CheckAxial != null) - hashCode = hashCode * 59 + this.CheckAxial.GetHashCode(); - if (this.CheckBarcodeFormat != null) - hashCode = hashCode * 59 + this.CheckBarcodeFormat.GetHashCode(); - if (this.CheckIRVisibility != null) - hashCode = hashCode * 59 + this.CheckIRVisibility.GetHashCode(); - if (this.CheckIPI != null) - hashCode = hashCode * 59 + this.CheckIPI.GetHashCode(); - if (this.CheckPhotoEmbedding != null) - hashCode = hashCode * 59 + this.CheckPhotoEmbedding.GetHashCode(); - if (this.CheckPhotoComparison != null) - hashCode = hashCode * 59 + this.CheckPhotoComparison.GetHashCode(); - if (this.CheckLetterScreen != null) - hashCode = hashCode * 59 + this.CheckLetterScreen.GetHashCode(); - return hashCode; + writer.WritePropertyName("livenessParams"); + JsonSerializer.Serialize(writer, authParams.LivenessParams, jsonSerializerOptions); } - } + if (authParams.CheckUVLuminiscenceOption.IsSet) + writer.WriteBoolean("checkUVLuminiscence", authParams.CheckUVLuminiscenceOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (authParams.CheckIRB900Option.IsSet) + writer.WriteBoolean("checkIRB900", authParams.CheckIRB900Option.Value!.Value); + + if (authParams.CheckImagePatternsOption.IsSet) + writer.WriteBoolean("checkImagePatterns", authParams.CheckImagePatternsOption.Value!.Value); + + if (authParams.CheckFibersOption.IsSet) + writer.WriteBoolean("checkFibers", authParams.CheckFibersOption.Value!.Value); + + if (authParams.CheckExtMRZOption.IsSet) + writer.WriteBoolean("checkExtMRZ", authParams.CheckExtMRZOption.Value!.Value); + + if (authParams.CheckExtOCROption.IsSet) + writer.WriteBoolean("checkExtOCR", authParams.CheckExtOCROption.Value!.Value); + + if (authParams.CheckAxialOption.IsSet) + writer.WriteBoolean("checkAxial", authParams.CheckAxialOption.Value!.Value); + + if (authParams.CheckBarcodeFormatOption.IsSet) + writer.WriteBoolean("checkBarcodeFormat", authParams.CheckBarcodeFormatOption.Value!.Value); + + if (authParams.CheckIRVisibilityOption.IsSet) + writer.WriteBoolean("checkIRVisibility", authParams.CheckIRVisibilityOption.Value!.Value); + + if (authParams.CheckIPIOption.IsSet) + writer.WriteBoolean("checkIPI", authParams.CheckIPIOption.Value!.Value); + + if (authParams.CheckPhotoEmbeddingOption.IsSet) + writer.WriteBoolean("checkPhotoEmbedding", authParams.CheckPhotoEmbeddingOption.Value!.Value); + + if (authParams.CheckPhotoComparisonOption.IsSet) + writer.WriteBoolean("checkPhotoComparison", authParams.CheckPhotoComparisonOption.Value!.Value); + + if (authParams.CheckLetterScreenOption.IsSet) + writer.WriteBoolean("checkLetterScreen", authParams.CheckLetterScreenOption.Value!.Value); + + if (authParams.CheckSecurityTextOption.IsSet) + writer.WriteBoolean("checkSecurityText", authParams.CheckSecurityTextOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs index 37e1226..e1c9321 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs @@ -1,72 +1,62 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthenticityCheckList /// - [DataContract] - public partial class AuthenticityCheckList : IEquatable, IValidatableObject + public partial class AuthenticityCheckList : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected AuthenticityCheckList() { } - /// - /// Initializes a new instance of the class. - /// - /// Count of items in List. - /// Authenticity Check (required). - public AuthenticityCheckList(int count = default(int), List list = default(List)) + /// Count of items in List + /// Authenticity Check + [JsonConstructor] + public AuthenticityCheckList(int count, List list) { - // to ensure "list" is required (not null) - if (list == null) - { - throw new InvalidDataException("list is a required property for AuthenticityCheckList and cannot be null"); - } - else - { - this.List = list; - } - - this.Count = count; + Count = count; + List = list; + OnCreated(); } - + + partial void OnCreated(); + /// /// Count of items in List /// /// Count of items in List - [DataMember(Name="Count", EmitDefaultValue=false)] + [JsonPropertyName("Count")] public int Count { get; set; } /// /// Authenticity Check /// /// Authenticity Check - [DataMember(Name="List", EmitDefaultValue=true)] + [JsonPropertyName("List")] public List List { get; set; } /// @@ -75,83 +65,125 @@ protected AuthenticityCheckList() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class AuthenticityCheckList {\n"); sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as AuthenticityCheckList); + yield break; } + } + /// + /// A Json converter for type + /// + public class AuthenticityCheckListJsonConverter : JsonConverter + { /// - /// Returns true if AuthenticityCheckList instances are equal + /// Deserializes json to /// - /// Instance of AuthenticityCheckList to be compared - /// Boolean - public bool Equals(AuthenticityCheckList input) + /// + /// + /// + /// + /// + public override AuthenticityCheckList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Count == input.Count || - (this.Count != null && - this.Count.Equals(input.Count)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option count = default; + Option?> list = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetInt32()); + break; + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!count.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckList.", nameof(count)); + + if (!list.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckList.", nameof(list)); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class AuthenticityCheckList."); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class AuthenticityCheckList."); + + return new AuthenticityCheckList(count.Value!.Value!, list.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityCheckList authenticityCheckList, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Count != null) - hashCode = hashCode * 59 + this.Count.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, authenticityCheckList, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckList authenticityCheckList, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (authenticityCheckList.List == null) + throw new ArgumentNullException(nameof(authenticityCheckList.List), "Property is required for class AuthenticityCheckList."); + + writer.WriteNumber("Count", authenticityCheckList.Count); + + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, authenticityCheckList.List, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs new file mode 100644 index 0000000..2c177a6 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// AuthenticityCheckListItem + /// + public partial class AuthenticityCheckListItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// authenticityCheckList + [JsonConstructor] + public AuthenticityCheckListItem(AuthenticityCheckList authenticityCheckList) + { + AuthenticityCheckList = authenticityCheckList; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets AuthenticityCheckList + /// + [JsonPropertyName("AuthenticityCheckList")] + public AuthenticityCheckList AuthenticityCheckList { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AuthenticityCheckListItem {\n"); + sb.Append(" AuthenticityCheckList: ").Append(AuthenticityCheckList).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class AuthenticityCheckListItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override AuthenticityCheckListItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option authenticityCheckList = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "AuthenticityCheckList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + authenticityCheckList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!authenticityCheckList.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckListItem.", nameof(authenticityCheckList)); + + if (authenticityCheckList.IsSet && authenticityCheckList.Value == null) + throw new ArgumentNullException(nameof(authenticityCheckList), "Property is not nullable for class AuthenticityCheckListItem."); + + return new AuthenticityCheckListItem(authenticityCheckList.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityCheckListItem authenticityCheckListItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, authenticityCheckListItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckListItem authenticityCheckListItem, JsonSerializerOptions jsonSerializerOptions) + { + if (authenticityCheckListItem.AuthenticityCheckList == null) + throw new ArgumentNullException(nameof(authenticityCheckListItem.AuthenticityCheckList), "Property is required for class AuthenticityCheckListItem."); + + writer.WritePropertyName("AuthenticityCheckList"); + JsonSerializer.Serialize(writer, authenticityCheckListItem.AuthenticityCheckList, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs index da6afcc..beb02f1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs @@ -1,189 +1,240 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 5.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthenticityCheckResult /// - [DataContract] - public partial class AuthenticityCheckResult : IEquatable, IValidatableObject + public partial class AuthenticityCheckResult : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected AuthenticityCheckResult() { } - /// - /// Initializes a new instance of the class. - /// - /// type (required). - /// result (required). - /// list (required). - public AuthenticityCheckResult(int type = default(int), int result = default(int), List list = default(List)) + /// type + /// result + /// list + /// Count of items in List + [JsonConstructor] + public AuthenticityCheckResult(AuthenticityResultType type, CheckResult result, List list, Option count = default) { - // to ensure "type" is required (not null) - if (type == null) - { - throw new InvalidDataException("type is a required property for AuthenticityCheckResult and cannot be null"); - } - else - { - this.Type = type; - } - - // to ensure "result" is required (not null) - if (result == null) - { - throw new InvalidDataException("result is a required property for AuthenticityCheckResult and cannot be null"); - } - else - { - this.Result = result; - } - - // to ensure "list" is required (not null) - if (list == null) - { - throw new InvalidDataException("list is a required property for AuthenticityCheckResult and cannot be null"); - } - else - { - this.List = list; - } - + Type = type; + Result = result; + List = list; + CountOption = count; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Type /// - [DataMember(Name="Type", EmitDefaultValue=true)] - public int Type { get; set; } + [JsonPropertyName("Type")] + public AuthenticityResultType Type { get; set; } /// /// Gets or Sets Result /// - [DataMember(Name="Result", EmitDefaultValue=true)] - public int Result { get; set; } + [JsonPropertyName("Result")] + public CheckResult Result { get; set; } /// /// Gets or Sets List /// - [DataMember(Name="List", EmitDefaultValue=true)] + [JsonPropertyName("List")] public List List { get; set; } + /// + /// Used to track the state of Count + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CountOption { get; private set; } + + /// + /// Count of items in List + /// + /// Count of items in List + [JsonPropertyName("Count")] + public int? Count { get { return this.CountOption; } set { this.CountOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class AuthenticityCheckResult {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Result: ").Append(Result).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as AuthenticityCheckResult); + yield break; } + } + /// + /// A Json converter for type + /// + public class AuthenticityCheckResultJsonConverter : JsonConverter + { /// - /// Returns true if AuthenticityCheckResult instances are equal + /// Deserializes json to /// - /// Instance of AuthenticityCheckResult to be compared - /// Boolean - public bool Equals(AuthenticityCheckResult input) + /// + /// + /// + /// + /// + public override AuthenticityCheckResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option result = default; + Option?> list = default; + Option count = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + string? typeRawValue = utf8JsonReader.GetString(); + if (typeRawValue != null) + type = new Option(AuthenticityResultTypeValueConverter.FromStringOrDefault(typeRawValue)); + break; + case "Result": + string? resultRawValue = utf8JsonReader.GetString(); + if (resultRawValue != null) + result = new Option(CheckResultValueConverter.FromStringOrDefault(resultRawValue)); + break; + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckResult.", nameof(type)); + + if (!result.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckResult.", nameof(result)); + + if (!list.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckResult.", nameof(list)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class AuthenticityCheckResult."); + + if (result.IsSet && result.Value == null) + throw new ArgumentNullException(nameof(result), "Property is not nullable for class AuthenticityCheckResult."); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class AuthenticityCheckResult."); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class AuthenticityCheckResult."); + + return new AuthenticityCheckResult(type.Value!.Value!, result.Value!.Value!, list.Value!, count); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityCheckResult authenticityCheckResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Result != null) - hashCode = hashCode * 59 + this.Result.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, authenticityCheckResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResult authenticityCheckResult, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (authenticityCheckResult.List == null) + throw new ArgumentNullException(nameof(authenticityCheckResult.List), "Property is required for class AuthenticityCheckResult."); + + var typeRawValue = AuthenticityResultTypeValueConverter.ToJsonValue(authenticityCheckResult.Type); + writer.WriteNumber("Type", typeRawValue); + + var resultRawValue = CheckResultValueConverter.ToJsonValue(authenticityCheckResult.Result); + writer.WriteNumber("Result", resultRawValue); + + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, authenticityCheckResult.List, jsonSerializerOptions); + if (authenticityCheckResult.CountOption.IsSet) + writer.WriteNumber("Count", authenticityCheckResult.CountOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs index 2a48102..90d11c7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs @@ -1,101 +1,98 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; using System.IO; using System.Text; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using JsonSubTypes; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Model.Ext.Autheticity; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Common fields for all authenticity result objects /// - [DataContract] - [JsonConverter(typeof(JsonSubtypes), "Type")] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.UV_LUMINESCENCE)] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.IR_B900)] - [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.IMAGE_PATTERN)] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.AXIAL_PROTECTION)] - [JsonSubtypes.KnownSubType(typeof(FiberResult), AuthenticityResultType.UV_FIBERS)] - [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.IR_VISIBILITY)] - [JsonSubtypes.KnownSubType(typeof(OCRSecurityTextResult), AuthenticityResultType.OCR_SECURITY_TEXT)] - [JsonSubtypes.KnownSubType(typeof(ImageIdentChecks), AuthenticityResultType.IPI)] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.PHOTO_EMBED_TYPE)] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.HOLOGRAMS)] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.OVI)] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.PHOTO_AREA)] - [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.PORTRAIT_COMPARISON)] - [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), AuthenticityResultType.BARCODE_FORMAT_CHECK)] - [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.KINEGRAM)] - [JsonSubtypes.KnownSubType(typeof(IdentResult), AuthenticityResultType.LETTER_SCREEN)] - public partial class AuthenticityCheckResultItem : IEquatable, IValidatableObject + public partial class AuthenticityCheckResultItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected AuthenticityCheckResultItem() { } - /// - /// Initializes a new instance of the class. - /// - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). - /// elementResult. - /// elementDiagnose. - /// percentValue. - public AuthenticityCheckResultItem(int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) + /// elementResult + /// elementDiagnose + /// percentValue + [JsonConstructor] + public AuthenticityCheckResultItem(Option elementResult = default, Option elementDiagnose = default, Option percentValue = default) { - // to ensure "type" is required (not null) - if (type == null) - { - throw new InvalidDataException("type is a required property for AuthenticityCheckResultItem and cannot be null"); - } - else - { - this.Type = type; - } - - this.ElementResult = elementResult; - this.ElementDiagnose = elementDiagnose; - this.PercentValue = percentValue; + Type = this.GetType().Name; + ElementResultOption = elementResult; + ElementDiagnoseOption = elementDiagnose; + PercentValueOption = percentValue; + OnCreated(); } - + + partial void OnCreated(); + /// - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ + /// Used to track the state of ElementResult /// - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ - [DataMember(Name="Type", EmitDefaultValue=true)] - public int Type { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ElementResultOption { get; private set; } /// /// Gets or Sets ElementResult /// - [DataMember(Name="ElementResult", EmitDefaultValue=false)] - public int ElementResult { get; set; } + [JsonPropertyName("ElementResult")] + public CheckResult? ElementResult { get { return this.ElementResultOption; } set { this.ElementResultOption = new(value); } } + + /// + /// Used to track the state of ElementDiagnose + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ElementDiagnoseOption { get; private set; } /// /// Gets or Sets ElementDiagnose /// - [DataMember(Name="ElementDiagnose", EmitDefaultValue=false)] - public int ElementDiagnose { get; set; } + [JsonPropertyName("ElementDiagnose")] + public CheckDiagnose? ElementDiagnose { get { return this.ElementDiagnoseOption; } set { this.ElementDiagnoseOption = new(value); } } + + /// + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public int Type { get; } + + /// + /// Used to track the state of PercentValue + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PercentValueOption { get; private set; } /// /// Gets or Sets PercentValue /// - [DataMember(Name="PercentValue", EmitDefaultValue=false)] - public int PercentValue { get; set; } + [JsonPropertyName("PercentValue")] + public int? PercentValue { get { return this.PercentValueOption; } set { this.PercentValueOption = new(value); } } /// /// Returns the string presentation of the object @@ -103,108 +100,200 @@ protected AuthenticityCheckResultItem() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class AuthenticityCheckResultItem {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" ElementResult: ").Append(ElementResult).Append("\n"); sb.Append(" ElementDiagnose: ").Append(ElementDiagnose).Append("\n"); sb.Append(" PercentValue: ").Append(PercentValue).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as AuthenticityCheckResultItem); + return this.BaseValidate(validationContext); } /// - /// Returns true if AuthenticityCheckResultItem instances are equal + /// To validate all properties of the instance /// - /// Instance of AuthenticityCheckResultItem to be compared - /// Boolean - public bool Equals(AuthenticityCheckResultItem input) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (input == null) - return false; - - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.ElementResult == input.ElementResult || - (this.ElementResult != null && - this.ElementResult.Equals(input.ElementResult)) - ) && - ( - this.ElementDiagnose == input.ElementDiagnose || - (this.ElementDiagnose != null && - this.ElementDiagnose.Equals(input.ElementDiagnose)) - ) && - ( - this.PercentValue == input.PercentValue || - (this.PercentValue != null && - this.PercentValue.Equals(input.PercentValue)) - ); + yield break; } + } + /// + /// A Json converter for type + /// + public class AuthenticityCheckResultItemJsonConverter : JsonConverter + { /// - /// Gets the hash code + /// Deserializes json to /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + /// + public override AuthenticityCheckResultItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option elementResult = default; + Option elementDiagnose = default; + Option percentValue = default; + + string? discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "Type"); + + if (discriminator != null && discriminator.Equals("FiberResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("IdentResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("OCRSecurityTextResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("PhotoIdentResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("SecurityFeatureResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + while (utf8JsonReader.Read()) { - int hashCode = 41; - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.ElementResult != null) - hashCode = hashCode * 59 + this.ElementResult.GetHashCode(); - if (this.ElementDiagnose != null) - hashCode = hashCode * 59 + this.ElementDiagnose.GetHashCode(); - if (this.PercentValue != null) - hashCode = hashCode * 59 + this.PercentValue.GetHashCode(); - return hashCode; + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + case "ElementResult": + string? elementResultRawValue = utf8JsonReader.GetString(); + if (elementResultRawValue != null) + elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); + break; + case "ElementDiagnose": + string? elementDiagnoseRawValue = utf8JsonReader.GetString(); + if (elementDiagnoseRawValue != null) + elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); + break; + case "PercentValue": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + percentValue = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckResultItem.", nameof(type)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class AuthenticityCheckResultItem."); + + if (elementResult.IsSet && elementResult.Value == null) + throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class AuthenticityCheckResultItem."); + + if (elementDiagnose.IsSet && elementDiagnose.Value == null) + throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class AuthenticityCheckResultItem."); + + if (percentValue.IsSet && percentValue.Value == null) + throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class AuthenticityCheckResultItem."); + + return new AuthenticityCheckResultItem(elementResult, elementDiagnose, percentValue); } /// - /// To validate all properties of the instance + /// Serializes a /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityCheckResultItem authenticityCheckResultItem, JsonSerializerOptions jsonSerializerOptions) { - return this.BaseValidate(validationContext); + if (authenticityCheckResultItem is FiberResult fiberResult){ + JsonSerializer.Serialize(writer, fiberResult, jsonSerializerOptions); + return; + } + + if (authenticityCheckResultItem is IdentResult identResult){ + JsonSerializer.Serialize(writer, identResult, jsonSerializerOptions); + return; + } + + if (authenticityCheckResultItem is OCRSecurityTextResult oCRSecurityTextResult){ + JsonSerializer.Serialize(writer, oCRSecurityTextResult, jsonSerializerOptions); + return; + } + + if (authenticityCheckResultItem is PhotoIdentResult photoIdentResult){ + JsonSerializer.Serialize(writer, photoIdentResult, jsonSerializerOptions); + return; + } + + if (authenticityCheckResultItem is SecurityFeatureResult securityFeatureResult){ + JsonSerializer.Serialize(writer, securityFeatureResult, jsonSerializerOptions); + return; + } + + writer.WriteStartObject(); + + WriteProperties(writer, authenticityCheckResultItem, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResultItem authenticityCheckResultItem, JsonSerializerOptions jsonSerializerOptions) { - yield break; + writer.WriteString("Type", authenticityCheckResultItem.Type); + + if (authenticityCheckResultItem.ElementResultOption.IsSet) + { + var elementResultRawValue = CheckResultValueConverter.ToJsonValue(authenticityCheckResultItem.ElementResult!.Value); + writer.WriteNumber("ElementResult", elementResultRawValue); + } + if (authenticityCheckResultItem.ElementDiagnoseOption.IsSet) + { + var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(authenticityCheckResultItem.ElementDiagnose!.Value); + writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); + } + if (authenticityCheckResultItem.PercentValueOption.IsSet) + writer.WriteNumber("PercentValue", authenticityCheckResultItem.PercentValueOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs new file mode 100644 index 0000000..ea41658 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs @@ -0,0 +1,522 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// AuthenticityCheckResultListInner + /// + public partial class AuthenticityCheckResultListInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(SecurityFeatureResult securityFeatureResult) + { + SecurityFeatureResult = securityFeatureResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(IdentResult identResult) + { + IdentResult = identResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(FiberResult fiberResult) + { + FiberResult = fiberResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(OCRSecurityTextResult oCRSecurityTextResult) + { + OCRSecurityTextResult = oCRSecurityTextResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(PhotoIdentResult photoIdentResult) + { + PhotoIdentResult = photoIdentResult; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets SecurityFeatureResult + /// + public SecurityFeatureResult? SecurityFeatureResult { get; set; } + + /// + /// Gets or Sets IdentResult + /// + public IdentResult? IdentResult { get; set; } + + /// + /// Gets or Sets FiberResult + /// + public FiberResult? FiberResult { get; set; } + + /// + /// Gets or Sets OCRSecurityTextResult + /// + public OCRSecurityTextResult? OCRSecurityTextResult { get; set; } + + /// + /// Gets or Sets PhotoIdentResult + /// + public PhotoIdentResult? PhotoIdentResult { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AuthenticityCheckResultListInner {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class AuthenticityCheckResultListInnerJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override AuthenticityCheckResultListInner Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + + SecurityFeatureResult? securityFeatureResult = null; + IdentResult? identResult = null; + IdentResult? identResult = null; + PhotoIdentResult? photoIdentResult = null; + IdentResult? identResult = null; + FiberResult? fiberResult = null; + FiberResult? fiberResult = null; + SecurityFeatureResult? securityFeatureResult = null; + IdentResult? identResult = null; + PhotoIdentResult? photoIdentResult = null; + IdentResult? identResult = null; + IdentResult? identResult = null; + IdentResult? identResult = null; + IdentResult? identResult = null; + SecurityFeatureResult? securityFeatureResult = null; + SecurityFeatureResult? securityFeatureResult = null; + IdentResult? identResult = null; + OCRSecurityTextResult? oCRSecurityTextResult = null; + SecurityFeatureResult? securityFeatureResult = null; + SecurityFeatureResult? securityFeatureResult = null; + SecurityFeatureResult? securityFeatureResult = null; + SecurityFeatureResult? securityFeatureResult = null; + FiberResult? fiberResult = null; + IdentResult? identResult = null; + OCRSecurityTextResult? oCRSecurityTextResult = null; + PhotoIdentResult? photoIdentResult = null; + SecurityFeatureResult? securityFeatureResult = null; + + Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; + while (utf8JsonReaderDiscriminator.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); + utf8JsonReaderDiscriminator.Read(); + if (localVarJsonPropertyName?.Equals("Type") ?? false) + { + string? discriminator = utf8JsonReaderDiscriminator.GetString(); + if (discriminator?.Equals("1") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("1024") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("1048576") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("128") ?? false) + { + Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; + photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("131072") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("16") ?? false) + { + Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; + fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); + } + if (discriminator?.Equals("16384") ?? false) + { + Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; + fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); + } + if (discriminator?.Equals("2") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("2048") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("256") ?? false) + { + Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; + photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("262144") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("32") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("32768") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("4") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("4096") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("512") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("524288") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("64") ?? false) + { + Utf8JsonReader utf8JsonReaderOCRSecurityTextResult = utf8JsonReader; + oCRSecurityTextResult = JsonSerializer.Deserialize(ref utf8JsonReaderOCRSecurityTextResult, jsonSerializerOptions); + } + if (discriminator?.Equals("65536") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("8") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("8192") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("8388608") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("FiberResult") ?? false) + { + Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; + fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); + } + if (discriminator?.Equals("IdentResult") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("OCRSecurityTextResult") ?? false) + { + Utf8JsonReader utf8JsonReaderOCRSecurityTextResult = utf8JsonReader; + oCRSecurityTextResult = JsonSerializer.Deserialize(ref utf8JsonReaderOCRSecurityTextResult, jsonSerializerOptions); + } + if (discriminator?.Equals("PhotoIdentResult") ?? false) + { + Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; + photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("SecurityFeatureResult") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + } + } + } + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckResultListInner.", nameof(type)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class AuthenticityCheckResultListInner."); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (photoIdentResult != null) + return new AuthenticityCheckResultListInner(photoIdentResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (fiberResult != null) + return new AuthenticityCheckResultListInner(fiberResult); + + if (fiberResult != null) + return new AuthenticityCheckResultListInner(fiberResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (photoIdentResult != null) + return new AuthenticityCheckResultListInner(photoIdentResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (oCRSecurityTextResult != null) + return new AuthenticityCheckResultListInner(oCRSecurityTextResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (fiberResult != null) + return new AuthenticityCheckResultListInner(fiberResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (oCRSecurityTextResult != null) + return new AuthenticityCheckResultListInner(oCRSecurityTextResult); + + if (photoIdentResult != null) + return new AuthenticityCheckResultListInner(photoIdentResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + throw new JsonException(); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + if (authenticityCheckResultListInner.SecurityFeatureResult != null) + { + SecurityFeatureResultJsonConverter securityFeatureResultJsonConverter = (SecurityFeatureResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.SecurityFeatureResult.GetType())); + securityFeatureResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.SecurityFeatureResult, jsonSerializerOptions); + } + + if (authenticityCheckResultListInner.IdentResult != null) + { + IdentResultJsonConverter identResultJsonConverter = (IdentResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.IdentResult.GetType())); + identResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.IdentResult, jsonSerializerOptions); + } + + if (authenticityCheckResultListInner.FiberResult != null) + { + FiberResultJsonConverter fiberResultJsonConverter = (FiberResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.FiberResult.GetType())); + fiberResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.FiberResult, jsonSerializerOptions); + } + + if (authenticityCheckResultListInner.OCRSecurityTextResult != null) + { + OCRSecurityTextResultJsonConverter oCRSecurityTextResultJsonConverter = (OCRSecurityTextResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.OCRSecurityTextResult.GetType())); + oCRSecurityTextResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.OCRSecurityTextResult, jsonSerializerOptions); + } + + if (authenticityCheckResultListInner.PhotoIdentResult != null) + { + PhotoIdentResultJsonConverter photoIdentResultJsonConverter = (PhotoIdentResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.PhotoIdentResult.GetType())); + photoIdentResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.PhotoIdentResult, jsonSerializerOptions); + } + + WriteProperties(writer, authenticityCheckResultListInner, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) + { + + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs index b010c2d..d1eb777 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs @@ -1,62 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthenticityResult /// - [DataContract] - public partial class AuthenticityResult : ResultItem, IEquatable, IValidatableObject + public partial class AuthenticityResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected AuthenticityResult() { } - /// - /// Initializes a new instance of the class. - /// - /// authenticityCheckList (required). - public AuthenticityResult(AuthenticityCheckList authenticityCheckList = default(AuthenticityCheckList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// authenticityCheckList + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public AuthenticityResult(AuthenticityCheckList authenticityCheckList, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "authenticityCheckList" is required (not null) - if (authenticityCheckList == null) - { - throw new InvalidDataException("authenticityCheckList is a required property for AuthenticityResult and cannot be null"); - } - else - { - this.AuthenticityCheckList = authenticityCheckList; - } - + AuthenticityCheckList = authenticityCheckList; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets AuthenticityCheckList /// - [DataMember(Name="AuthenticityCheckList", EmitDefaultValue=true)] + [JsonPropertyName("AuthenticityCheckList")] public AuthenticityCheckList AuthenticityCheckList { get; set; } /// @@ -65,76 +59,158 @@ protected AuthenticityResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class AuthenticityResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" AuthenticityCheckList: ").Append(AuthenticityCheckList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class AuthenticityResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override AuthenticityResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as AuthenticityResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if AuthenticityResult instances are equal - /// - /// Instance of AuthenticityResult to be compared - /// Boolean - public bool Equals(AuthenticityResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.AuthenticityCheckList == input.AuthenticityCheckList || - (this.AuthenticityCheckList != null && - this.AuthenticityCheckList.Equals(input.AuthenticityCheckList)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option authenticityCheckList = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "AuthenticityCheckList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + authenticityCheckList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!authenticityCheckList.IsSet) + throw new ArgumentException("Property is required for class AuthenticityResult.", nameof(authenticityCheckList)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class AuthenticityResult.", nameof(resultType)); + + if (authenticityCheckList.IsSet && authenticityCheckList.Value == null) + throw new ArgumentNullException(nameof(authenticityCheckList), "Property is not nullable for class AuthenticityResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class AuthenticityResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class AuthenticityResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class AuthenticityResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class AuthenticityResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class AuthenticityResult."); + + return new AuthenticityResult(authenticityCheckList.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityResult authenticityResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.AuthenticityCheckList != null) - hashCode = hashCode * 59 + this.AuthenticityCheckList.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, authenticityResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AuthenticityResult authenticityResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (authenticityResult.AuthenticityCheckList == null) + throw new ArgumentNullException(nameof(authenticityResult.AuthenticityCheckList), "Property is required for class AuthenticityResult."); + + writer.WritePropertyName("AuthenticityCheckList"); + JsonSerializer.Serialize(writer, authenticityResult.AuthenticityCheckList, jsonSerializerOptions); + if (authenticityResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", authenticityResult.BufLengthOption.Value!.Value); + + if (authenticityResult.LightOption.IsSet) + writer.WriteNumber("light", authenticityResult.LightOption.Value!.Value); + + if (authenticityResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", authenticityResult.ListIdxOption.Value!.Value); + + if (authenticityResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", authenticityResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", authenticityResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs index cbc170f..edcfa38 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs @@ -1,74 +1,445 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - /// Enumeration describes available authenticity checks - public class AuthenticityResultType + /// + /// Enumeration describes available authenticity checks: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/. + /// + /// Enumeration describes available authenticity checks: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/. + public enum AuthenticityResultType + { + /// + /// Enum NONE for value: 0 + /// + NONE = 0, + + /// + /// Enum UV_LUMINESCENCE for value: 1 + /// + UV_LUMINESCENCE = 1, + + /// + /// Enum IR_B900 for value: 2 + /// + IR_B900 = 2, + + /// + /// Enum IMAGE_PATTERN for value: 4 + /// + IMAGE_PATTERN = 4, + + /// + /// Enum AXIAL_PROTECTION for value: 8 + /// + AXIAL_PROTECTION = 8, + + /// + /// Enum UV_FIBERS for value: 16 + /// + UV_FIBERS = 16, + + /// + /// Enum IR_VISIBILITY for value: 32 + /// + IR_VISIBILITY = 32, + + /// + /// Enum OCR_SECURITY_TEXT for value: 64 + /// + OCR_SECURITY_TEXT = 64, + + /// + /// Enum IPI for value: 128 + /// + IPI = 128, + + /// + /// Enum IR_PHOTO for value: 256 + /// + IR_PHOTO = 256, + + /// + /// Enum PHOTO_EMBED_TYPE for value: 512 + /// + PHOTO_EMBED_TYPE = 512, + + /// + /// Enum OVI for value: 1024 + /// + OVI = 1024, + + /// + /// Enum IR_LUMINESCENCE for value: 2048 + /// + IR_LUMINESCENCE = 2048, + + /// + /// Enum HOLOGRAMS for value: 4096 + /// + HOLOGRAMS = 4096, + + /// + /// Enum PHOTO_AREA for value: 8192 + /// + PHOTO_AREA = 8192, + + /// + /// Enum UV_BACKGROUND for value: 16384 + /// + UV_BACKGROUND = 16384, + + /// + /// Enum PORTRAIT_COMPARISON for value: 32768 + /// + PORTRAIT_COMPARISON = 32768, + + /// + /// Enum BARCODE_FORMAT_CHECK for value: 65536 + /// + BARCODE_FORMAT_CHECK = 65536, + + /// + /// Enum KINEGRAM for value: 131072 + /// + KINEGRAM = 131072, + + /// + /// Enum LETTER_SCREEN for value: 262144 + /// + LETTER_SCREEN = 262144, + + /// + /// Enum HOLOGRAM_DETECTION for value: 524288 + /// + HOLOGRAM_DETECTION = 524288, + + /// + /// Enum FINGERPRINT_COMPARISON for value: 1048576 + /// + FINGERPRINT_COMPARISON = 1048576, + + /// + /// Enum LIVENESS for value: 2097152 + /// + LIVENESS = 2097152, + + /// + /// Enum EXTENDED_OCR_CHECK for value: 4194304 + /// + EXTENDED_OCR_CHECK = 4194304, + + /// + /// Enum EXTENDED_MRZ_CHECK for value: 8388608 + /// + EXTENDED_MRZ_CHECK = 8388608, + + /// + /// Enum ENCRYPTED_IPI for value: 16777216 + /// + ENCRYPTED_IPI = 16777216, + + /// + /// Enum STATUS_ONLY for value: 2147483648 + /// + STATUS_ONLY = 2147483648 + } + + /// + /// Converts to and from the JSON value + /// + public static class AuthenticityResultTypeValueConverter { - - public const int UV_LUMINESCENCE = 1; - - public const int IR_B900 = 2; - - public const int IMAGE_PATTERN = 4; - - public const int AXIAL_PROTECTION = 8; - - public const int UV_FIBERS = 16; - - public const int IR_VISIBILITY = 32; + /// + /// Parses a given value to + /// + /// + /// + public static AuthenticityResultType FromString(string value) + { + if (value.Equals((0).ToString())) + return AuthenticityResultType.NONE; + + if (value.Equals((1).ToString())) + return AuthenticityResultType.UV_LUMINESCENCE; + + if (value.Equals((2).ToString())) + return AuthenticityResultType.IR_B900; + + if (value.Equals((4).ToString())) + return AuthenticityResultType.IMAGE_PATTERN; + + if (value.Equals((8).ToString())) + return AuthenticityResultType.AXIAL_PROTECTION; + + if (value.Equals((16).ToString())) + return AuthenticityResultType.UV_FIBERS; + + if (value.Equals((32).ToString())) + return AuthenticityResultType.IR_VISIBILITY; + + if (value.Equals((64).ToString())) + return AuthenticityResultType.OCR_SECURITY_TEXT; + + if (value.Equals((128).ToString())) + return AuthenticityResultType.IPI; + + if (value.Equals((256).ToString())) + return AuthenticityResultType.IR_PHOTO; + + if (value.Equals((512).ToString())) + return AuthenticityResultType.PHOTO_EMBED_TYPE; + + if (value.Equals((1024).ToString())) + return AuthenticityResultType.OVI; + + if (value.Equals((2048).ToString())) + return AuthenticityResultType.IR_LUMINESCENCE; - public const int OCR_SECURITY_TEXT = 64; + if (value.Equals((4096).ToString())) + return AuthenticityResultType.HOLOGRAMS; - public const int IPI = 128; - - public const int PHOTO_EMBED_TYPE = 512; + if (value.Equals((8192).ToString())) + return AuthenticityResultType.PHOTO_AREA; - public const int OVI = 1024; - - public const int HOLOGRAMS = 4096; + if (value.Equals((16384).ToString())) + return AuthenticityResultType.UV_BACKGROUND; - public const int PHOTO_AREA = 8192; - - public const int PORTRAIT_COMPARISON = 32768; + if (value.Equals((32768).ToString())) + return AuthenticityResultType.PORTRAIT_COMPARISON; - public const int BARCODE_FORMAT_CHECK = 65536; - - public const int KINEGRAM = 131072; - - public const int LETTER_SCREEN = 262144; + if (value.Equals((65536).ToString())) + return AuthenticityResultType.BARCODE_FORMAT_CHECK; - public const int HOLOGRAM_DETECTION = 524288; + if (value.Equals((131072).ToString())) + return AuthenticityResultType.KINEGRAM; - public const int FINGERPRINT_COMPARISON = 1048576; + if (value.Equals((262144).ToString())) + return AuthenticityResultType.LETTER_SCREEN; + + if (value.Equals((524288).ToString())) + return AuthenticityResultType.HOLOGRAM_DETECTION; + + if (value.Equals((1048576).ToString())) + return AuthenticityResultType.FINGERPRINT_COMPARISON; + + if (value.Equals((2097152).ToString())) + return AuthenticityResultType.LIVENESS; + + if (value.Equals((4194304).ToString())) + return AuthenticityResultType.EXTENDED_OCR_CHECK; + + if (value.Equals((8388608).ToString())) + return AuthenticityResultType.EXTENDED_MRZ_CHECK; + + if (value.Equals((16777216).ToString())) + return AuthenticityResultType.ENCRYPTED_IPI; + + if (value.Equals((2147483648).ToString())) + return AuthenticityResultType.STATUS_ONLY; + + throw new NotImplementedException($"Could not convert value to type AuthenticityResultType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static AuthenticityResultType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return AuthenticityResultType.NONE; + + if (value.Equals((1).ToString())) + return AuthenticityResultType.UV_LUMINESCENCE; + + if (value.Equals((2).ToString())) + return AuthenticityResultType.IR_B900; + + if (value.Equals((4).ToString())) + return AuthenticityResultType.IMAGE_PATTERN; + + if (value.Equals((8).ToString())) + return AuthenticityResultType.AXIAL_PROTECTION; + + if (value.Equals((16).ToString())) + return AuthenticityResultType.UV_FIBERS; + + if (value.Equals((32).ToString())) + return AuthenticityResultType.IR_VISIBILITY; + + if (value.Equals((64).ToString())) + return AuthenticityResultType.OCR_SECURITY_TEXT; + + if (value.Equals((128).ToString())) + return AuthenticityResultType.IPI; + + if (value.Equals((256).ToString())) + return AuthenticityResultType.IR_PHOTO; + + if (value.Equals((512).ToString())) + return AuthenticityResultType.PHOTO_EMBED_TYPE; + + if (value.Equals((1024).ToString())) + return AuthenticityResultType.OVI; + + if (value.Equals((2048).ToString())) + return AuthenticityResultType.IR_LUMINESCENCE; + + if (value.Equals((4096).ToString())) + return AuthenticityResultType.HOLOGRAMS; + + if (value.Equals((8192).ToString())) + return AuthenticityResultType.PHOTO_AREA; + + if (value.Equals((16384).ToString())) + return AuthenticityResultType.UV_BACKGROUND; + + if (value.Equals((32768).ToString())) + return AuthenticityResultType.PORTRAIT_COMPARISON; + + if (value.Equals((65536).ToString())) + return AuthenticityResultType.BARCODE_FORMAT_CHECK; + + if (value.Equals((131072).ToString())) + return AuthenticityResultType.KINEGRAM; + + if (value.Equals((262144).ToString())) + return AuthenticityResultType.LETTER_SCREEN; + + if (value.Equals((524288).ToString())) + return AuthenticityResultType.HOLOGRAM_DETECTION; + + if (value.Equals((1048576).ToString())) + return AuthenticityResultType.FINGERPRINT_COMPARISON; + + if (value.Equals((2097152).ToString())) + return AuthenticityResultType.LIVENESS; + + if (value.Equals((4194304).ToString())) + return AuthenticityResultType.EXTENDED_OCR_CHECK; + + if (value.Equals((8388608).ToString())) + return AuthenticityResultType.EXTENDED_MRZ_CHECK; + + if (value.Equals((16777216).ToString())) + return AuthenticityResultType.ENCRYPTED_IPI; + + if (value.Equals((2147483648).ToString())) + return AuthenticityResultType.STATUS_ONLY; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static long ToJsonValue(AuthenticityResultType value) + { + return (long) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class AuthenticityResultTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override AuthenticityResultType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + AuthenticityResultType? result = rawValue == null + ? null + : AuthenticityResultTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the AuthenticityResultType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityResultType authenticityResultType, JsonSerializerOptions options) + { + writer.WriteStringValue(authenticityResultType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class AuthenticityResultTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a AuthenticityResultType from the Json object + /// + /// + /// + /// + /// + public override AuthenticityResultType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - public const int LIVENESS = 2097152; + AuthenticityResultType? result = rawValue == null + ? null + : AuthenticityResultTypeValueConverter.FromStringOrDefault(rawValue); - public const int EXTENDED_OCR_CHECK = 4194304; + if (result != null) + return result.Value; - public const int EXTENDED_MRZ_CHECK = 8388608; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityResultType? authenticityResultType, JsonSerializerOptions options) + { + writer.WriteStringValue(authenticityResultType?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs b/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs new file mode 100644 index 0000000..ec85d28 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs @@ -0,0 +1,202 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Defines BarCodeModuleType + /// + public enum BarCodeModuleType + { + /// + /// Enum TEXT for value: 0 + /// + TEXT = 0, + + /// + /// Enum BYTE for value: 1 + /// + BYTE = 1, + + /// + /// Enum NUM for value: 2 + /// + NUM = 2, + + /// + /// Enum SHIFT for value: 3 + /// + SHIFT = 3, + + /// + /// Enum ALL for value: 4 + /// + ALL = 4 + } + + /// + /// Converts to and from the JSON value + /// + public static class BarCodeModuleTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static BarCodeModuleType FromString(string value) + { + if (value.Equals((0).ToString())) + return BarCodeModuleType.TEXT; + + if (value.Equals((1).ToString())) + return BarCodeModuleType.BYTE; + + if (value.Equals((2).ToString())) + return BarCodeModuleType.NUM; + + if (value.Equals((3).ToString())) + return BarCodeModuleType.SHIFT; + + if (value.Equals((4).ToString())) + return BarCodeModuleType.ALL; + + throw new NotImplementedException($"Could not convert value to type BarCodeModuleType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static BarCodeModuleType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return BarCodeModuleType.TEXT; + + if (value.Equals((1).ToString())) + return BarCodeModuleType.BYTE; + + if (value.Equals((2).ToString())) + return BarCodeModuleType.NUM; + + if (value.Equals((3).ToString())) + return BarCodeModuleType.SHIFT; + + if (value.Equals((4).ToString())) + return BarCodeModuleType.ALL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(BarCodeModuleType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class BarCodeModuleTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override BarCodeModuleType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + BarCodeModuleType? result = rawValue == null + ? null + : BarCodeModuleTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the BarCodeModuleType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BarCodeModuleType barCodeModuleType, JsonSerializerOptions options) + { + writer.WriteStringValue(barCodeModuleType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class BarCodeModuleTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a BarCodeModuleType from the Json object + /// + /// + /// + /// + /// + public override BarCodeModuleType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + BarCodeModuleType? result = rawValue == null + ? null + : BarCodeModuleTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BarCodeModuleType? barCodeModuleType, JsonSerializerOptions options) + { + writer.WriteStringValue(barCodeModuleType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs b/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs new file mode 100644 index 0000000..91424a7 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs @@ -0,0 +1,379 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains the types of barcodes that can be processed + /// + /// Enumeration contains the types of barcodes that can be processed + public enum BarcodeType + { + /// + /// Enum UNKNOWN for value: 0 + /// + UNKNOWN = 0, + + /// + /// Enum CODE128 for value: 1 + /// + CODE128 = 1, + + /// + /// Enum CODE39 for value: 2 + /// + CODE39 = 2, + + /// + /// Enum EAN8 for value: 3 + /// + EAN8 = 3, + + /// + /// Enum ITF for value: 4 + /// + ITF = 4, + + /// + /// Enum PDF417 for value: 5 + /// + PDF417 = 5, + + /// + /// Enum STF for value: 6 + /// + STF = 6, + + /// + /// Enum MTF for value: 7 + /// + MTF = 7, + + /// + /// Enum IATA for value: 8 + /// + IATA = 8, + + /// + /// Enum CODABAR for value: 9 + /// + CODABAR = 9, + + /// + /// Enum UPCA for value: 10 + /// + UPCA = 10, + + /// + /// Enum CODE93 for value: 11 + /// + CODE93 = 11, + + /// + /// Enum UPCE for value: 12 + /// + UPCE = 12, + + /// + /// Enum EAN13 for value: 13 + /// + EAN13 = 13, + + /// + /// Enum QRCODE for value: 14 + /// + QRCODE = 14, + + /// + /// Enum AZTEC for value: 15 + /// + AZTEC = 15, + + /// + /// Enum DATAMATRIX for value: 16 + /// + DATAMATRIX = 16, + + /// + /// Enum ALL_1D for value: 17 + /// + ALL_1D = 17, + + /// + /// Enum CODE11 for value: 18 + /// + CODE11 = 18, + + /// + /// Enum JABCODE for value: 19 + /// + JABCODE = 19, + + /// + /// Enum END for value: 20 + /// + END = 20 + } + + /// + /// Converts to and from the JSON value + /// + public static class BarcodeTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static BarcodeType FromString(string value) + { + if (value.Equals((0).ToString())) + return BarcodeType.UNKNOWN; + + if (value.Equals((1).ToString())) + return BarcodeType.CODE128; + + if (value.Equals((2).ToString())) + return BarcodeType.CODE39; + + if (value.Equals((3).ToString())) + return BarcodeType.EAN8; + + if (value.Equals((4).ToString())) + return BarcodeType.ITF; + + if (value.Equals((5).ToString())) + return BarcodeType.PDF417; + + if (value.Equals((6).ToString())) + return BarcodeType.STF; + + if (value.Equals((7).ToString())) + return BarcodeType.MTF; + + if (value.Equals((8).ToString())) + return BarcodeType.IATA; + + if (value.Equals((9).ToString())) + return BarcodeType.CODABAR; + + if (value.Equals((10).ToString())) + return BarcodeType.UPCA; + + if (value.Equals((11).ToString())) + return BarcodeType.CODE93; + + if (value.Equals((12).ToString())) + return BarcodeType.UPCE; + + if (value.Equals((13).ToString())) + return BarcodeType.EAN13; + + if (value.Equals((14).ToString())) + return BarcodeType.QRCODE; + + if (value.Equals((15).ToString())) + return BarcodeType.AZTEC; + + if (value.Equals((16).ToString())) + return BarcodeType.DATAMATRIX; + + if (value.Equals((17).ToString())) + return BarcodeType.ALL_1D; + + if (value.Equals((18).ToString())) + return BarcodeType.CODE11; + + if (value.Equals((19).ToString())) + return BarcodeType.JABCODE; + + if (value.Equals((20).ToString())) + return BarcodeType.END; + + throw new NotImplementedException($"Could not convert value to type BarcodeType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static BarcodeType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return BarcodeType.UNKNOWN; + + if (value.Equals((1).ToString())) + return BarcodeType.CODE128; + + if (value.Equals((2).ToString())) + return BarcodeType.CODE39; + + if (value.Equals((3).ToString())) + return BarcodeType.EAN8; + + if (value.Equals((4).ToString())) + return BarcodeType.ITF; + + if (value.Equals((5).ToString())) + return BarcodeType.PDF417; + + if (value.Equals((6).ToString())) + return BarcodeType.STF; + + if (value.Equals((7).ToString())) + return BarcodeType.MTF; + + if (value.Equals((8).ToString())) + return BarcodeType.IATA; + + if (value.Equals((9).ToString())) + return BarcodeType.CODABAR; + + if (value.Equals((10).ToString())) + return BarcodeType.UPCA; + + if (value.Equals((11).ToString())) + return BarcodeType.CODE93; + + if (value.Equals((12).ToString())) + return BarcodeType.UPCE; + + if (value.Equals((13).ToString())) + return BarcodeType.EAN13; + + if (value.Equals((14).ToString())) + return BarcodeType.QRCODE; + + if (value.Equals((15).ToString())) + return BarcodeType.AZTEC; + + if (value.Equals((16).ToString())) + return BarcodeType.DATAMATRIX; + + if (value.Equals((17).ToString())) + return BarcodeType.ALL_1D; + + if (value.Equals((18).ToString())) + return BarcodeType.CODE11; + + if (value.Equals((19).ToString())) + return BarcodeType.JABCODE; + + if (value.Equals((20).ToString())) + return BarcodeType.END; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(BarcodeType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class BarcodeTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override BarcodeType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + BarcodeType? result = rawValue == null + ? null + : BarcodeTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the BarcodeType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BarcodeType barcodeType, JsonSerializerOptions options) + { + writer.WriteStringValue(barcodeType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class BarcodeTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a BarcodeType from the Json object + /// + /// + /// + /// + /// + public override BarcodeType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + BarcodeType? result = rawValue == null + ? null + : BarcodeTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BarcodeType? barcodeType, JsonSerializerOptions options) + { + writer.WriteStringValue(barcodeType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs b/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs index a1c7dff..9d3ae12 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs @@ -1,88 +1,92 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// BcPDF417INFO /// - [DataContract] - public partial class BcPDF417INFO : IEquatable, IValidatableObject + public partial class BcPDF417INFO : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// angle. - /// bcColumn. - /// bcErrorLevel. - /// bcRow. - /// minX. - /// minY. - public BcPDF417INFO(float angle = default(float), int bcColumn = default(int), int bcErrorLevel = default(int), int bcRow = default(int), float minX = default(float), float minY = default(float)) + /// angle + /// bcColumn + /// bcErrorLevel + /// bcRow + /// minX + /// minY + [JsonConstructor] + public BcPDF417INFO(float angle, int bcColumn, int bcErrorLevel, int bcRow, float minX, float minY) { - this.Angle = angle; - this.BcColumn = bcColumn; - this.BcErrorLevel = bcErrorLevel; - this.BcRow = bcRow; - this.MinX = minX; - this.MinY = minY; + Angle = angle; + BcColumn = bcColumn; + BcErrorLevel = bcErrorLevel; + BcRow = bcRow; + MinX = minX; + MinY = minY; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Angle /// - [DataMember(Name="Angle", EmitDefaultValue=false)] + [JsonPropertyName("Angle")] public float Angle { get; set; } /// /// Gets or Sets BcColumn /// - [DataMember(Name="bcColumn", EmitDefaultValue=false)] + [JsonPropertyName("bcColumn")] public int BcColumn { get; set; } /// /// Gets or Sets BcErrorLevel /// - [DataMember(Name="bcErrorLevel", EmitDefaultValue=false)] + [JsonPropertyName("bcErrorLevel")] public int BcErrorLevel { get; set; } /// /// Gets or Sets BcRow /// - [DataMember(Name="bcRow", EmitDefaultValue=false)] + [JsonPropertyName("bcRow")] public int BcRow { get; set; } /// /// Gets or Sets MinX /// - [DataMember(Name="minX", EmitDefaultValue=false)] + [JsonPropertyName("minX")] public float MinX { get; set; } /// /// Gets or Sets MinY /// - [DataMember(Name="minY", EmitDefaultValue=false)] + [JsonPropertyName("minY")] public float MinY { get; set; } /// @@ -91,7 +95,7 @@ public partial class BcPDF417INFO : IEquatable, IValidatableObjec /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BcPDF417INFO {\n"); sb.Append(" Angle: ").Append(Angle).Append("\n"); sb.Append(" BcColumn: ").Append(BcColumn).Append("\n"); @@ -102,103 +106,166 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as BcPDF417INFO); + yield break; } + } + /// + /// A Json converter for type + /// + public class BcPDF417INFOJsonConverter : JsonConverter + { /// - /// Returns true if BcPDF417INFO instances are equal + /// Deserializes json to /// - /// Instance of BcPDF417INFO to be compared - /// Boolean - public bool Equals(BcPDF417INFO input) + /// + /// + /// + /// + /// + public override BcPDF417INFO Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Angle == input.Angle || - (this.Angle != null && - this.Angle.Equals(input.Angle)) - ) && - ( - this.BcColumn == input.BcColumn || - (this.BcColumn != null && - this.BcColumn.Equals(input.BcColumn)) - ) && - ( - this.BcErrorLevel == input.BcErrorLevel || - (this.BcErrorLevel != null && - this.BcErrorLevel.Equals(input.BcErrorLevel)) - ) && - ( - this.BcRow == input.BcRow || - (this.BcRow != null && - this.BcRow.Equals(input.BcRow)) - ) && - ( - this.MinX == input.MinX || - (this.MinX != null && - this.MinX.Equals(input.MinX)) - ) && - ( - this.MinY == input.MinY || - (this.MinY != null && - this.MinY.Equals(input.MinY)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option angle = default; + Option bcColumn = default; + Option bcErrorLevel = default; + Option bcRow = default; + Option minX = default; + Option minY = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Angle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + angle = new Option((float)utf8JsonReader.GetDouble()); + break; + case "bcColumn": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcColumn = new Option(utf8JsonReader.GetInt32()); + break; + case "bcErrorLevel": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcErrorLevel = new Option(utf8JsonReader.GetInt32()); + break; + case "bcRow": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcRow = new Option(utf8JsonReader.GetInt32()); + break; + case "minX": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + minX = new Option((float)utf8JsonReader.GetDouble()); + break; + case "minY": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + minY = new Option((float)utf8JsonReader.GetDouble()); + break; + default: + break; + } + } + } + + if (!angle.IsSet) + throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(angle)); + + if (!bcColumn.IsSet) + throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(bcColumn)); + + if (!bcErrorLevel.IsSet) + throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(bcErrorLevel)); + + if (!bcRow.IsSet) + throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(bcRow)); + + if (!minX.IsSet) + throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(minX)); + + if (!minY.IsSet) + throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(minY)); + + if (angle.IsSet && angle.Value == null) + throw new ArgumentNullException(nameof(angle), "Property is not nullable for class BcPDF417INFO."); + + if (bcColumn.IsSet && bcColumn.Value == null) + throw new ArgumentNullException(nameof(bcColumn), "Property is not nullable for class BcPDF417INFO."); + + if (bcErrorLevel.IsSet && bcErrorLevel.Value == null) + throw new ArgumentNullException(nameof(bcErrorLevel), "Property is not nullable for class BcPDF417INFO."); + + if (bcRow.IsSet && bcRow.Value == null) + throw new ArgumentNullException(nameof(bcRow), "Property is not nullable for class BcPDF417INFO."); + + if (minX.IsSet && minX.Value == null) + throw new ArgumentNullException(nameof(minX), "Property is not nullable for class BcPDF417INFO."); + + if (minY.IsSet && minY.Value == null) + throw new ArgumentNullException(nameof(minY), "Property is not nullable for class BcPDF417INFO."); + + return new BcPDF417INFO(angle.Value!.Value!, bcColumn.Value!.Value!, bcErrorLevel.Value!.Value!, bcRow.Value!.Value!, minX.Value!.Value!, minY.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BcPDF417INFO bcPDF417INFO, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Angle != null) - hashCode = hashCode * 59 + this.Angle.GetHashCode(); - if (this.BcColumn != null) - hashCode = hashCode * 59 + this.BcColumn.GetHashCode(); - if (this.BcErrorLevel != null) - hashCode = hashCode * 59 + this.BcErrorLevel.GetHashCode(); - if (this.BcRow != null) - hashCode = hashCode * 59 + this.BcRow.GetHashCode(); - if (this.MinX != null) - hashCode = hashCode * 59 + this.MinX.GetHashCode(); - if (this.MinY != null) - hashCode = hashCode * 59 + this.MinY.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, bcPDF417INFO, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, BcPDF417INFO bcPDF417INFO, JsonSerializerOptions jsonSerializerOptions) { - yield break; + writer.WriteNumber("Angle", bcPDF417INFO.Angle); + + writer.WriteNumber("bcColumn", bcPDF417INFO.BcColumn); + + writer.WriteNumber("bcErrorLevel", bcPDF417INFO.BcErrorLevel); + + writer.WriteNumber("bcRow", bcPDF417INFO.BcRow); + + writer.WriteNumber("minX", bcPDF417INFO.MinX); + + writer.WriteNumber("minY", bcPDF417INFO.MinY); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs b/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs index 32eb628..316b691 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs @@ -1,72 +1,76 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// BcROIDETECT /// - [DataContract] - public partial class BcROIDETECT : IEquatable, IValidatableObject + public partial class BcROIDETECT : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// bottom. - /// left. - /// right. - /// top. - public BcROIDETECT(int bottom = default(int), int left = default(int), int right = default(int), int top = default(int)) + /// bottom + /// left + /// right + /// top + [JsonConstructor] + public BcROIDETECT(int bottom, int left, int right, int top) { - this.Bottom = bottom; - this.Left = left; - this.Right = right; - this.Top = top; + Bottom = bottom; + Left = left; + Right = right; + Top = top; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Bottom /// - [DataMember(Name="bottom", EmitDefaultValue=false)] + [JsonPropertyName("bottom")] public int Bottom { get; set; } /// /// Gets or Sets Left /// - [DataMember(Name="left", EmitDefaultValue=false)] + [JsonPropertyName("left")] public int Left { get; set; } /// /// Gets or Sets Right /// - [DataMember(Name="right", EmitDefaultValue=false)] + [JsonPropertyName("right")] public int Right { get; set; } /// /// Gets or Sets Top /// - [DataMember(Name="top", EmitDefaultValue=false)] + [JsonPropertyName("top")] public int Top { get; set; } /// @@ -75,7 +79,7 @@ public partial class BcROIDETECT : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class BcROIDETECT {\n"); sb.Append(" Bottom: ").Append(Bottom).Append("\n"); sb.Append(" Left: ").Append(Left).Append("\n"); @@ -84,89 +88,140 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as BcROIDETECT); + yield break; } + } + /// + /// A Json converter for type + /// + public class BcROIDETECTJsonConverter : JsonConverter + { /// - /// Returns true if BcROIDETECT instances are equal + /// Deserializes json to /// - /// Instance of BcROIDETECT to be compared - /// Boolean - public bool Equals(BcROIDETECT input) + /// + /// + /// + /// + /// + public override BcROIDETECT Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Bottom == input.Bottom || - (this.Bottom != null && - this.Bottom.Equals(input.Bottom)) - ) && - ( - this.Left == input.Left || - (this.Left != null && - this.Left.Equals(input.Left)) - ) && - ( - this.Right == input.Right || - (this.Right != null && - this.Right.Equals(input.Right)) - ) && - ( - this.Top == input.Top || - (this.Top != null && - this.Top.Equals(input.Top)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option bottom = default; + Option left = default; + Option right = default; + Option top = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "bottom": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bottom = new Option(utf8JsonReader.GetInt32()); + break; + case "left": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + left = new Option(utf8JsonReader.GetInt32()); + break; + case "right": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + right = new Option(utf8JsonReader.GetInt32()); + break; + case "top": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + top = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!bottom.IsSet) + throw new ArgumentException("Property is required for class BcROIDETECT.", nameof(bottom)); + + if (!left.IsSet) + throw new ArgumentException("Property is required for class BcROIDETECT.", nameof(left)); + + if (!right.IsSet) + throw new ArgumentException("Property is required for class BcROIDETECT.", nameof(right)); + + if (!top.IsSet) + throw new ArgumentException("Property is required for class BcROIDETECT.", nameof(top)); + + if (bottom.IsSet && bottom.Value == null) + throw new ArgumentNullException(nameof(bottom), "Property is not nullable for class BcROIDETECT."); + + if (left.IsSet && left.Value == null) + throw new ArgumentNullException(nameof(left), "Property is not nullable for class BcROIDETECT."); + + if (right.IsSet && right.Value == null) + throw new ArgumentNullException(nameof(right), "Property is not nullable for class BcROIDETECT."); + + if (top.IsSet && top.Value == null) + throw new ArgumentNullException(nameof(top), "Property is not nullable for class BcROIDETECT."); + + return new BcROIDETECT(bottom.Value!.Value!, left.Value!.Value!, right.Value!.Value!, top.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BcROIDETECT bcROIDETECT, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bottom != null) - hashCode = hashCode * 59 + this.Bottom.GetHashCode(); - if (this.Left != null) - hashCode = hashCode * 59 + this.Left.GetHashCode(); - if (this.Right != null) - hashCode = hashCode * 59 + this.Right.GetHashCode(); - if (this.Top != null) - hashCode = hashCode * 59 + this.Top.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, bcROIDETECT, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, BcROIDETECT bcROIDETECT, JsonSerializerOptions jsonSerializerOptions) { - yield break; + writer.WriteNumber("bottom", bcROIDETECT.Bottom); + + writer.WriteNumber("left", bcROIDETECT.Left); + + writer.WriteNumber("right", bcROIDETECT.Right); + + writer.WriteNumber("top", bcROIDETECT.Top); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs new file mode 100644 index 0000000..17c0b8d --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs @@ -0,0 +1,2189 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used for storing the results of one bar-code module reading. + /// + public partial class BinaryData : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// rFIDAuthenticationInfo + /// rFIDMIFAREDataValidity + /// rFIDMIFAREData + /// rFIDEFCOM + /// rFIDDG1 + /// rFIDDG2 + /// rFIDDG3 + /// rFIDDG4 + /// rFIDDG5 + /// rFIDDG6 + /// rFIDDG7 + /// rFIDDG8 + /// rFIDDG9 + /// rFIDDG10 + /// rFIDDG11 + /// rFIDDG12 + /// rFIDDG13 + /// rFIDDG14 + /// rFIDDG15 + /// rFIDDG16 + /// rFIDEFSOD + /// eIDDG1 + /// eIDDG2 + /// eIDDG3 + /// eIDDG4 + /// eIDDG5 + /// eIDDG6 + /// eIDDG7 + /// eIDDG8 + /// eIDDG9 + /// eIDDG10 + /// eIDDG11 + /// eIDDG12 + /// eIDDG13 + /// eIDDG14 + /// eIDDG15 + /// eIDDG16 + /// eIDDG17 + /// eIDDG18 + /// eIDDG19 + /// eIDDG20 + /// eIDDG21 + /// eDLCOM + /// eDLSOD + /// eDLDG1 + /// eDLDG2 + /// eDLDG3 + /// eDLDG4 + /// eDLDG5 + /// eDLDG6 + /// eDLDG7 + /// eDLDG8 + /// eDLDG9 + /// eDLDG10 + /// eDLDG11 + /// eDLDG12 + /// eDLDG13 + /// eDLDG14 + /// visibleDigitalSeal + /// visibleDigitalSealNC + /// digitalSignature + /// rFIDSessionData + /// rFIDSessionDataStatus + /// Indexes of groups that aren't read + [JsonConstructor] + public BinaryData(Option?> rFIDAuthenticationInfo = default, Option?> rFIDMIFAREDataValidity = default, Option?> rFIDMIFAREData = default, Option?> rFIDEFCOM = default, Option rFIDDG1 = default, Option?> rFIDDG2 = default, Option?> rFIDDG3 = default, Option?> rFIDDG4 = default, Option?> rFIDDG5 = default, Option?> rFIDDG6 = default, Option?> rFIDDG7 = default, Option?> rFIDDG8 = default, Option?> rFIDDG9 = default, Option?> rFIDDG10 = default, Option?> rFIDDG11 = default, Option?> rFIDDG12 = default, Option?> rFIDDG13 = default, Option?> rFIDDG14 = default, Option?> rFIDDG15 = default, Option?> rFIDDG16 = default, Option?> rFIDEFSOD = default, Option?> eIDDG1 = default, Option?> eIDDG2 = default, Option?> eIDDG3 = default, Option?> eIDDG4 = default, Option?> eIDDG5 = default, Option?> eIDDG6 = default, Option?> eIDDG7 = default, Option?> eIDDG8 = default, Option?> eIDDG9 = default, Option?> eIDDG10 = default, Option?> eIDDG11 = default, Option?> eIDDG12 = default, Option?> eIDDG13 = default, Option?> eIDDG14 = default, Option?> eIDDG15 = default, Option?> eIDDG16 = default, Option?> eIDDG17 = default, Option?> eIDDG18 = default, Option?> eIDDG19 = default, Option?> eIDDG20 = default, Option?> eIDDG21 = default, Option?> eDLCOM = default, Option?> eDLSOD = default, Option?> eDLDG1 = default, Option?> eDLDG2 = default, Option?> eDLDG3 = default, Option?> eDLDG4 = default, Option?> eDLDG5 = default, Option?> eDLDG6 = default, Option?> eDLDG7 = default, Option?> eDLDG8 = default, Option?> eDLDG9 = default, Option?> eDLDG10 = default, Option?> eDLDG11 = default, Option?> eDLDG12 = default, Option?> eDLDG13 = default, Option?> eDLDG14 = default, Option?> visibleDigitalSeal = default, Option?> visibleDigitalSealNC = default, Option?> digitalSignature = default, Option rFIDSessionData = default, Option rFIDSessionDataStatus = default, Option?> rFIDEPasspDirectory = default) + { + RFIDAuthenticationInfoOption = rFIDAuthenticationInfo; + RFIDMIFAREDataValidityOption = rFIDMIFAREDataValidity; + RFIDMIFAREDataOption = rFIDMIFAREData; + RFID_EF_COMOption = rFIDEFCOM; + RFIDDG1Option = rFIDDG1; + RFIDDG2Option = rFIDDG2; + RFIDDG3Option = rFIDDG3; + RFIDDG4Option = rFIDDG4; + RFIDDG5Option = rFIDDG5; + RFIDDG6Option = rFIDDG6; + RFIDDG7Option = rFIDDG7; + RFIDDG8Option = rFIDDG8; + RFIDDG9Option = rFIDDG9; + RFIDDG10Option = rFIDDG10; + RFIDDG11Option = rFIDDG11; + RFIDDG12Option = rFIDDG12; + RFIDDG13Option = rFIDDG13; + RFIDDG14Option = rFIDDG14; + RFIDDG15Option = rFIDDG15; + RFIDDG16Option = rFIDDG16; + RFID_EF_SODOption = rFIDEFSOD; + EIDDG1Option = eIDDG1; + EIDDG2Option = eIDDG2; + EIDDG3Option = eIDDG3; + EIDDG4Option = eIDDG4; + EIDDG5Option = eIDDG5; + EIDDG6Option = eIDDG6; + EIDDG7Option = eIDDG7; + EIDDG8Option = eIDDG8; + EIDDG9Option = eIDDG9; + EIDDG10Option = eIDDG10; + EIDDG11Option = eIDDG11; + EIDDG12Option = eIDDG12; + EIDDG13Option = eIDDG13; + EIDDG14Option = eIDDG14; + EIDDG15Option = eIDDG15; + EIDDG16Option = eIDDG16; + EIDDG17Option = eIDDG17; + EIDDG18Option = eIDDG18; + EIDDG19Option = eIDDG19; + EIDDG20Option = eIDDG20; + EIDDG21Option = eIDDG21; + EDLCOMOption = eDLCOM; + EDLSODOption = eDLSOD; + EDLDG1Option = eDLDG1; + EDLDG2Option = eDLDG2; + EDLDG3Option = eDLDG3; + EDLDG4Option = eDLDG4; + EDLDG5Option = eDLDG5; + EDLDG6Option = eDLDG6; + EDLDG7Option = eDLDG7; + EDLDG8Option = eDLDG8; + EDLDG9Option = eDLDG9; + EDLDG10Option = eDLDG10; + EDLDG11Option = eDLDG11; + EDLDG12Option = eDLDG12; + EDLDG13Option = eDLDG13; + EDLDG14Option = eDLDG14; + VisibleDigitalSealOption = visibleDigitalSeal; + VisibleDigitalSealNCOption = visibleDigitalSealNC; + DigitalSignatureOption = digitalSignature; + RFIDSessionDataOption = rFIDSessionData; + RFIDSessionDataStatusOption = rFIDSessionDataStatus; + RFIDEPasspDirectoryOption = rFIDEPasspDirectory; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Used to track the state of RFIDAuthenticationInfo + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDAuthenticationInfoOption { get; private set; } + + /// + /// Gets or Sets RFIDAuthenticationInfo + /// + [JsonPropertyName("RFID_Authentication_Info")] + public Dictionary? RFIDAuthenticationInfo { get { return this.RFIDAuthenticationInfoOption; } set { this.RFIDAuthenticationInfoOption = new(value); } } + + /// + /// Used to track the state of RFIDMIFAREDataValidity + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDMIFAREDataValidityOption { get; private set; } + + /// + /// Gets or Sets RFIDMIFAREDataValidity + /// + [JsonPropertyName("RFID_MIFARE_Data_Validity")] + public Dictionary? RFIDMIFAREDataValidity { get { return this.RFIDMIFAREDataValidityOption; } set { this.RFIDMIFAREDataValidityOption = new(value); } } + + /// + /// Used to track the state of RFIDMIFAREData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDMIFAREDataOption { get; private set; } + + /// + /// Gets or Sets RFIDMIFAREData + /// + [JsonPropertyName("RFID_MIFARE_Data")] + public Dictionary? RFIDMIFAREData { get { return this.RFIDMIFAREDataOption; } set { this.RFIDMIFAREDataOption = new(value); } } + + /// + /// Used to track the state of RFID_EF_COM + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFID_EF_COMOption { get; private set; } + + /// + /// Gets or Sets RFID_EF_COM + /// + [JsonPropertyName("RFID_EF_COM")] + public Dictionary? RFID_EF_COM { get { return this.RFID_EF_COMOption; } set { this.RFID_EF_COMOption = new(value); } } + + /// + /// Used to track the state of RFIDDG1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RFIDDG1Option { get; private set; } + + /// + /// Gets or Sets RFIDDG1 + /// + [JsonPropertyName("RFID_DG1")] + public RfidDG1? RFIDDG1 { get { return this.RFIDDG1Option; } set { this.RFIDDG1Option = new(value); } } + + /// + /// Used to track the state of RFIDDG2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG2Option { get; private set; } + + /// + /// Gets or Sets RFIDDG2 + /// + [JsonPropertyName("RFID_DG2")] + public Dictionary? RFIDDG2 { get { return this.RFIDDG2Option; } set { this.RFIDDG2Option = new(value); } } + + /// + /// Used to track the state of RFIDDG3 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG3Option { get; private set; } + + /// + /// Gets or Sets RFIDDG3 + /// + [JsonPropertyName("RFID_DG3")] + public Dictionary? RFIDDG3 { get { return this.RFIDDG3Option; } set { this.RFIDDG3Option = new(value); } } + + /// + /// Used to track the state of RFIDDG4 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG4Option { get; private set; } + + /// + /// Gets or Sets RFIDDG4 + /// + [JsonPropertyName("RFID_DG4")] + public Dictionary? RFIDDG4 { get { return this.RFIDDG4Option; } set { this.RFIDDG4Option = new(value); } } + + /// + /// Used to track the state of RFIDDG5 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG5Option { get; private set; } + + /// + /// Gets or Sets RFIDDG5 + /// + [JsonPropertyName("RFID_DG5")] + public Dictionary? RFIDDG5 { get { return this.RFIDDG5Option; } set { this.RFIDDG5Option = new(value); } } + + /// + /// Used to track the state of RFIDDG6 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG6Option { get; private set; } + + /// + /// Gets or Sets RFIDDG6 + /// + [JsonPropertyName("RFID_DG6")] + public Dictionary? RFIDDG6 { get { return this.RFIDDG6Option; } set { this.RFIDDG6Option = new(value); } } + + /// + /// Used to track the state of RFIDDG7 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG7Option { get; private set; } + + /// + /// Gets or Sets RFIDDG7 + /// + [JsonPropertyName("RFID_DG7")] + public Dictionary? RFIDDG7 { get { return this.RFIDDG7Option; } set { this.RFIDDG7Option = new(value); } } + + /// + /// Used to track the state of RFIDDG8 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG8Option { get; private set; } + + /// + /// Gets or Sets RFIDDG8 + /// + [JsonPropertyName("RFID_DG8")] + public Dictionary? RFIDDG8 { get { return this.RFIDDG8Option; } set { this.RFIDDG8Option = new(value); } } + + /// + /// Used to track the state of RFIDDG9 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG9Option { get; private set; } + + /// + /// Gets or Sets RFIDDG9 + /// + [JsonPropertyName("RFID_DG9")] + public Dictionary? RFIDDG9 { get { return this.RFIDDG9Option; } set { this.RFIDDG9Option = new(value); } } + + /// + /// Used to track the state of RFIDDG10 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG10Option { get; private set; } + + /// + /// Gets or Sets RFIDDG10 + /// + [JsonPropertyName("RFID_DG10")] + public Dictionary? RFIDDG10 { get { return this.RFIDDG10Option; } set { this.RFIDDG10Option = new(value); } } + + /// + /// Used to track the state of RFIDDG11 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG11Option { get; private set; } + + /// + /// Gets or Sets RFIDDG11 + /// + [JsonPropertyName("RFID_DG11")] + public Dictionary? RFIDDG11 { get { return this.RFIDDG11Option; } set { this.RFIDDG11Option = new(value); } } + + /// + /// Used to track the state of RFIDDG12 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG12Option { get; private set; } + + /// + /// Gets or Sets RFIDDG12 + /// + [JsonPropertyName("RFID_DG12")] + public Dictionary? RFIDDG12 { get { return this.RFIDDG12Option; } set { this.RFIDDG12Option = new(value); } } + + /// + /// Used to track the state of RFIDDG13 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG13Option { get; private set; } + + /// + /// Gets or Sets RFIDDG13 + /// + [JsonPropertyName("RFID_DG13")] + public Dictionary? RFIDDG13 { get { return this.RFIDDG13Option; } set { this.RFIDDG13Option = new(value); } } + + /// + /// Used to track the state of RFIDDG14 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG14Option { get; private set; } + + /// + /// Gets or Sets RFIDDG14 + /// + [JsonPropertyName("RFID_DG14")] + public Dictionary? RFIDDG14 { get { return this.RFIDDG14Option; } set { this.RFIDDG14Option = new(value); } } + + /// + /// Used to track the state of RFIDDG15 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG15Option { get; private set; } + + /// + /// Gets or Sets RFIDDG15 + /// + [JsonPropertyName("RFID_DG15")] + public Dictionary? RFIDDG15 { get { return this.RFIDDG15Option; } set { this.RFIDDG15Option = new(value); } } + + /// + /// Used to track the state of RFIDDG16 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDDG16Option { get; private set; } + + /// + /// Gets or Sets RFIDDG16 + /// + [JsonPropertyName("RFID_DG16")] + public Dictionary? RFIDDG16 { get { return this.RFIDDG16Option; } set { this.RFIDDG16Option = new(value); } } + + /// + /// Used to track the state of RFID_EF_SOD + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFID_EF_SODOption { get; private set; } + + /// + /// Gets or Sets RFID_EF_SOD + /// + [JsonPropertyName("RFID_EF_SOD")] + public Dictionary? RFID_EF_SOD { get { return this.RFID_EF_SODOption; } set { this.RFID_EF_SODOption = new(value); } } + + /// + /// Used to track the state of EIDDG1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG1Option { get; private set; } + + /// + /// Gets or Sets EIDDG1 + /// + [JsonPropertyName("eID_DG1")] + public Dictionary? EIDDG1 { get { return this.EIDDG1Option; } set { this.EIDDG1Option = new(value); } } + + /// + /// Used to track the state of EIDDG2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG2Option { get; private set; } + + /// + /// Gets or Sets EIDDG2 + /// + [JsonPropertyName("eID_DG2")] + public Dictionary? EIDDG2 { get { return this.EIDDG2Option; } set { this.EIDDG2Option = new(value); } } + + /// + /// Used to track the state of EIDDG3 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG3Option { get; private set; } + + /// + /// Gets or Sets EIDDG3 + /// + [JsonPropertyName("eID_DG3")] + public Dictionary? EIDDG3 { get { return this.EIDDG3Option; } set { this.EIDDG3Option = new(value); } } + + /// + /// Used to track the state of EIDDG4 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG4Option { get; private set; } + + /// + /// Gets or Sets EIDDG4 + /// + [JsonPropertyName("eID_DG4")] + public Dictionary? EIDDG4 { get { return this.EIDDG4Option; } set { this.EIDDG4Option = new(value); } } + + /// + /// Used to track the state of EIDDG5 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG5Option { get; private set; } + + /// + /// Gets or Sets EIDDG5 + /// + [JsonPropertyName("eID_DG5")] + public Dictionary? EIDDG5 { get { return this.EIDDG5Option; } set { this.EIDDG5Option = new(value); } } + + /// + /// Used to track the state of EIDDG6 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG6Option { get; private set; } + + /// + /// Gets or Sets EIDDG6 + /// + [JsonPropertyName("eID_DG6")] + public Dictionary? EIDDG6 { get { return this.EIDDG6Option; } set { this.EIDDG6Option = new(value); } } + + /// + /// Used to track the state of EIDDG7 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG7Option { get; private set; } + + /// + /// Gets or Sets EIDDG7 + /// + [JsonPropertyName("eID_DG7")] + public Dictionary? EIDDG7 { get { return this.EIDDG7Option; } set { this.EIDDG7Option = new(value); } } + + /// + /// Used to track the state of EIDDG8 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG8Option { get; private set; } + + /// + /// Gets or Sets EIDDG8 + /// + [JsonPropertyName("eID_DG8")] + public Dictionary? EIDDG8 { get { return this.EIDDG8Option; } set { this.EIDDG8Option = new(value); } } + + /// + /// Used to track the state of EIDDG9 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG9Option { get; private set; } + + /// + /// Gets or Sets EIDDG9 + /// + [JsonPropertyName("eID_DG9")] + public Dictionary? EIDDG9 { get { return this.EIDDG9Option; } set { this.EIDDG9Option = new(value); } } + + /// + /// Used to track the state of EIDDG10 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG10Option { get; private set; } + + /// + /// Gets or Sets EIDDG10 + /// + [JsonPropertyName("eID_DG10")] + public Dictionary? EIDDG10 { get { return this.EIDDG10Option; } set { this.EIDDG10Option = new(value); } } + + /// + /// Used to track the state of EIDDG11 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG11Option { get; private set; } + + /// + /// Gets or Sets EIDDG11 + /// + [JsonPropertyName("eID_DG11")] + public Dictionary? EIDDG11 { get { return this.EIDDG11Option; } set { this.EIDDG11Option = new(value); } } + + /// + /// Used to track the state of EIDDG12 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG12Option { get; private set; } + + /// + /// Gets or Sets EIDDG12 + /// + [JsonPropertyName("eID_DG12")] + public Dictionary? EIDDG12 { get { return this.EIDDG12Option; } set { this.EIDDG12Option = new(value); } } + + /// + /// Used to track the state of EIDDG13 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG13Option { get; private set; } + + /// + /// Gets or Sets EIDDG13 + /// + [JsonPropertyName("eID_DG13")] + public Dictionary? EIDDG13 { get { return this.EIDDG13Option; } set { this.EIDDG13Option = new(value); } } + + /// + /// Used to track the state of EIDDG14 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG14Option { get; private set; } + + /// + /// Gets or Sets EIDDG14 + /// + [JsonPropertyName("eID_DG14")] + public Dictionary? EIDDG14 { get { return this.EIDDG14Option; } set { this.EIDDG14Option = new(value); } } + + /// + /// Used to track the state of EIDDG15 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG15Option { get; private set; } + + /// + /// Gets or Sets EIDDG15 + /// + [JsonPropertyName("eID_DG15")] + public Dictionary? EIDDG15 { get { return this.EIDDG15Option; } set { this.EIDDG15Option = new(value); } } + + /// + /// Used to track the state of EIDDG16 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG16Option { get; private set; } + + /// + /// Gets or Sets EIDDG16 + /// + [JsonPropertyName("eID_DG16")] + public Dictionary? EIDDG16 { get { return this.EIDDG16Option; } set { this.EIDDG16Option = new(value); } } + + /// + /// Used to track the state of EIDDG17 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG17Option { get; private set; } + + /// + /// Gets or Sets EIDDG17 + /// + [JsonPropertyName("eID_DG17")] + public Dictionary? EIDDG17 { get { return this.EIDDG17Option; } set { this.EIDDG17Option = new(value); } } + + /// + /// Used to track the state of EIDDG18 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG18Option { get; private set; } + + /// + /// Gets or Sets EIDDG18 + /// + [JsonPropertyName("eID_DG18")] + public Dictionary? EIDDG18 { get { return this.EIDDG18Option; } set { this.EIDDG18Option = new(value); } } + + /// + /// Used to track the state of EIDDG19 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG19Option { get; private set; } + + /// + /// Gets or Sets EIDDG19 + /// + [JsonPropertyName("eID_DG19")] + public Dictionary? EIDDG19 { get { return this.EIDDG19Option; } set { this.EIDDG19Option = new(value); } } + + /// + /// Used to track the state of EIDDG20 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG20Option { get; private set; } + + /// + /// Gets or Sets EIDDG20 + /// + [JsonPropertyName("eID_DG20")] + public Dictionary? EIDDG20 { get { return this.EIDDG20Option; } set { this.EIDDG20Option = new(value); } } + + /// + /// Used to track the state of EIDDG21 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EIDDG21Option { get; private set; } + + /// + /// Gets or Sets EIDDG21 + /// + [JsonPropertyName("eID_DG21")] + public Dictionary? EIDDG21 { get { return this.EIDDG21Option; } set { this.EIDDG21Option = new(value); } } + + /// + /// Used to track the state of EDLCOM + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLCOMOption { get; private set; } + + /// + /// Gets or Sets EDLCOM + /// + [JsonPropertyName("eDL_COM")] + public Dictionary? EDLCOM { get { return this.EDLCOMOption; } set { this.EDLCOMOption = new(value); } } + + /// + /// Used to track the state of EDLSOD + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLSODOption { get; private set; } + + /// + /// Gets or Sets EDLSOD + /// + [JsonPropertyName("eDL_SOD")] + public Dictionary? EDLSOD { get { return this.EDLSODOption; } set { this.EDLSODOption = new(value); } } + + /// + /// Used to track the state of EDLDG1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG1Option { get; private set; } + + /// + /// Gets or Sets EDLDG1 + /// + [JsonPropertyName("eDL_DG1")] + public Dictionary? EDLDG1 { get { return this.EDLDG1Option; } set { this.EDLDG1Option = new(value); } } + + /// + /// Used to track the state of EDLDG2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG2Option { get; private set; } + + /// + /// Gets or Sets EDLDG2 + /// + [JsonPropertyName("eDL_DG2")] + public Dictionary? EDLDG2 { get { return this.EDLDG2Option; } set { this.EDLDG2Option = new(value); } } + + /// + /// Used to track the state of EDLDG3 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG3Option { get; private set; } + + /// + /// Gets or Sets EDLDG3 + /// + [JsonPropertyName("eDL_DG3")] + public Dictionary? EDLDG3 { get { return this.EDLDG3Option; } set { this.EDLDG3Option = new(value); } } + + /// + /// Used to track the state of EDLDG4 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG4Option { get; private set; } + + /// + /// Gets or Sets EDLDG4 + /// + [JsonPropertyName("eDL_DG4")] + public Dictionary? EDLDG4 { get { return this.EDLDG4Option; } set { this.EDLDG4Option = new(value); } } + + /// + /// Used to track the state of EDLDG5 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG5Option { get; private set; } + + /// + /// Gets or Sets EDLDG5 + /// + [JsonPropertyName("eDL_DG5")] + public Dictionary? EDLDG5 { get { return this.EDLDG5Option; } set { this.EDLDG5Option = new(value); } } + + /// + /// Used to track the state of EDLDG6 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG6Option { get; private set; } + + /// + /// Gets or Sets EDLDG6 + /// + [JsonPropertyName("eDL_DG6")] + public Dictionary? EDLDG6 { get { return this.EDLDG6Option; } set { this.EDLDG6Option = new(value); } } + + /// + /// Used to track the state of EDLDG7 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG7Option { get; private set; } + + /// + /// Gets or Sets EDLDG7 + /// + [JsonPropertyName("eDL_DG7")] + public Dictionary? EDLDG7 { get { return this.EDLDG7Option; } set { this.EDLDG7Option = new(value); } } + + /// + /// Used to track the state of EDLDG8 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG8Option { get; private set; } + + /// + /// Gets or Sets EDLDG8 + /// + [JsonPropertyName("eDL_DG8")] + public Dictionary? EDLDG8 { get { return this.EDLDG8Option; } set { this.EDLDG8Option = new(value); } } + + /// + /// Used to track the state of EDLDG9 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG9Option { get; private set; } + + /// + /// Gets or Sets EDLDG9 + /// + [JsonPropertyName("eDL_DG9")] + public Dictionary? EDLDG9 { get { return this.EDLDG9Option; } set { this.EDLDG9Option = new(value); } } + + /// + /// Used to track the state of EDLDG10 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG10Option { get; private set; } + + /// + /// Gets or Sets EDLDG10 + /// + [JsonPropertyName("eDL_DG10")] + public Dictionary? EDLDG10 { get { return this.EDLDG10Option; } set { this.EDLDG10Option = new(value); } } + + /// + /// Used to track the state of EDLDG11 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG11Option { get; private set; } + + /// + /// Gets or Sets EDLDG11 + /// + [JsonPropertyName("eDL_DG11")] + public Dictionary? EDLDG11 { get { return this.EDLDG11Option; } set { this.EDLDG11Option = new(value); } } + + /// + /// Used to track the state of EDLDG12 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG12Option { get; private set; } + + /// + /// Gets or Sets EDLDG12 + /// + [JsonPropertyName("eDL_DG12")] + public Dictionary? EDLDG12 { get { return this.EDLDG12Option; } set { this.EDLDG12Option = new(value); } } + + /// + /// Used to track the state of EDLDG13 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG13Option { get; private set; } + + /// + /// Gets or Sets EDLDG13 + /// + [JsonPropertyName("eDL_DG13")] + public Dictionary? EDLDG13 { get { return this.EDLDG13Option; } set { this.EDLDG13Option = new(value); } } + + /// + /// Used to track the state of EDLDG14 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> EDLDG14Option { get; private set; } + + /// + /// Gets or Sets EDLDG14 + /// + [JsonPropertyName("eDL_DG14")] + public Dictionary? EDLDG14 { get { return this.EDLDG14Option; } set { this.EDLDG14Option = new(value); } } + + /// + /// Used to track the state of VisibleDigitalSeal + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> VisibleDigitalSealOption { get; private set; } + + /// + /// Gets or Sets VisibleDigitalSeal + /// + [JsonPropertyName("Visible_Digital_Seal")] + public Dictionary? VisibleDigitalSeal { get { return this.VisibleDigitalSealOption; } set { this.VisibleDigitalSealOption = new(value); } } + + /// + /// Used to track the state of VisibleDigitalSealNC + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> VisibleDigitalSealNCOption { get; private set; } + + /// + /// Gets or Sets VisibleDigitalSealNC + /// + [JsonPropertyName("Visible_Digital_Seal_NC")] + public Dictionary? VisibleDigitalSealNC { get { return this.VisibleDigitalSealNCOption; } set { this.VisibleDigitalSealNCOption = new(value); } } + + /// + /// Used to track the state of DigitalSignature + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> DigitalSignatureOption { get; private set; } + + /// + /// Gets or Sets DigitalSignature + /// + [JsonPropertyName("Digital_Signature")] + public Dictionary? DigitalSignature { get { return this.DigitalSignatureOption; } set { this.DigitalSignatureOption = new(value); } } + + /// + /// Used to track the state of RFIDSessionData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RFIDSessionDataOption { get; private set; } + + /// + /// Gets or Sets RFIDSessionData + /// + [JsonPropertyName("RFID_Session_Data")] + public RfidSessionData? RFIDSessionData { get { return this.RFIDSessionDataOption; } set { this.RFIDSessionDataOption = new(value); } } + + /// + /// Used to track the state of RFIDSessionDataStatus + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RFIDSessionDataStatusOption { get; private set; } + + /// + /// Gets or Sets RFIDSessionDataStatus + /// + [JsonPropertyName("RFID_Session_Data_Status")] + public DetailsRFID? RFIDSessionDataStatus { get { return this.RFIDSessionDataStatusOption; } set { this.RFIDSessionDataStatusOption = new(value); } } + + /// + /// Used to track the state of RFIDEPasspDirectory + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFIDEPasspDirectoryOption { get; private set; } + + /// + /// Indexes of groups that aren't read + /// + /// Indexes of groups that aren't read + [JsonPropertyName("RFID_ePassp_Directory")] + public List? RFIDEPasspDirectory { get { return this.RFIDEPasspDirectoryOption; } set { this.RFIDEPasspDirectoryOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class BinaryData {\n"); + sb.Append(" RFIDAuthenticationInfo: ").Append(RFIDAuthenticationInfo).Append("\n"); + sb.Append(" RFIDMIFAREDataValidity: ").Append(RFIDMIFAREDataValidity).Append("\n"); + sb.Append(" RFIDMIFAREData: ").Append(RFIDMIFAREData).Append("\n"); + sb.Append(" RFID_EF_COM: ").Append(RFID_EF_COM).Append("\n"); + sb.Append(" RFIDDG1: ").Append(RFIDDG1).Append("\n"); + sb.Append(" RFIDDG2: ").Append(RFIDDG2).Append("\n"); + sb.Append(" RFIDDG3: ").Append(RFIDDG3).Append("\n"); + sb.Append(" RFIDDG4: ").Append(RFIDDG4).Append("\n"); + sb.Append(" RFIDDG5: ").Append(RFIDDG5).Append("\n"); + sb.Append(" RFIDDG6: ").Append(RFIDDG6).Append("\n"); + sb.Append(" RFIDDG7: ").Append(RFIDDG7).Append("\n"); + sb.Append(" RFIDDG8: ").Append(RFIDDG8).Append("\n"); + sb.Append(" RFIDDG9: ").Append(RFIDDG9).Append("\n"); + sb.Append(" RFIDDG10: ").Append(RFIDDG10).Append("\n"); + sb.Append(" RFIDDG11: ").Append(RFIDDG11).Append("\n"); + sb.Append(" RFIDDG12: ").Append(RFIDDG12).Append("\n"); + sb.Append(" RFIDDG13: ").Append(RFIDDG13).Append("\n"); + sb.Append(" RFIDDG14: ").Append(RFIDDG14).Append("\n"); + sb.Append(" RFIDDG15: ").Append(RFIDDG15).Append("\n"); + sb.Append(" RFIDDG16: ").Append(RFIDDG16).Append("\n"); + sb.Append(" RFID_EF_SOD: ").Append(RFID_EF_SOD).Append("\n"); + sb.Append(" EIDDG1: ").Append(EIDDG1).Append("\n"); + sb.Append(" EIDDG2: ").Append(EIDDG2).Append("\n"); + sb.Append(" EIDDG3: ").Append(EIDDG3).Append("\n"); + sb.Append(" EIDDG4: ").Append(EIDDG4).Append("\n"); + sb.Append(" EIDDG5: ").Append(EIDDG5).Append("\n"); + sb.Append(" EIDDG6: ").Append(EIDDG6).Append("\n"); + sb.Append(" EIDDG7: ").Append(EIDDG7).Append("\n"); + sb.Append(" EIDDG8: ").Append(EIDDG8).Append("\n"); + sb.Append(" EIDDG9: ").Append(EIDDG9).Append("\n"); + sb.Append(" EIDDG10: ").Append(EIDDG10).Append("\n"); + sb.Append(" EIDDG11: ").Append(EIDDG11).Append("\n"); + sb.Append(" EIDDG12: ").Append(EIDDG12).Append("\n"); + sb.Append(" EIDDG13: ").Append(EIDDG13).Append("\n"); + sb.Append(" EIDDG14: ").Append(EIDDG14).Append("\n"); + sb.Append(" EIDDG15: ").Append(EIDDG15).Append("\n"); + sb.Append(" EIDDG16: ").Append(EIDDG16).Append("\n"); + sb.Append(" EIDDG17: ").Append(EIDDG17).Append("\n"); + sb.Append(" EIDDG18: ").Append(EIDDG18).Append("\n"); + sb.Append(" EIDDG19: ").Append(EIDDG19).Append("\n"); + sb.Append(" EIDDG20: ").Append(EIDDG20).Append("\n"); + sb.Append(" EIDDG21: ").Append(EIDDG21).Append("\n"); + sb.Append(" EDLCOM: ").Append(EDLCOM).Append("\n"); + sb.Append(" EDLSOD: ").Append(EDLSOD).Append("\n"); + sb.Append(" EDLDG1: ").Append(EDLDG1).Append("\n"); + sb.Append(" EDLDG2: ").Append(EDLDG2).Append("\n"); + sb.Append(" EDLDG3: ").Append(EDLDG3).Append("\n"); + sb.Append(" EDLDG4: ").Append(EDLDG4).Append("\n"); + sb.Append(" EDLDG5: ").Append(EDLDG5).Append("\n"); + sb.Append(" EDLDG6: ").Append(EDLDG6).Append("\n"); + sb.Append(" EDLDG7: ").Append(EDLDG7).Append("\n"); + sb.Append(" EDLDG8: ").Append(EDLDG8).Append("\n"); + sb.Append(" EDLDG9: ").Append(EDLDG9).Append("\n"); + sb.Append(" EDLDG10: ").Append(EDLDG10).Append("\n"); + sb.Append(" EDLDG11: ").Append(EDLDG11).Append("\n"); + sb.Append(" EDLDG12: ").Append(EDLDG12).Append("\n"); + sb.Append(" EDLDG13: ").Append(EDLDG13).Append("\n"); + sb.Append(" EDLDG14: ").Append(EDLDG14).Append("\n"); + sb.Append(" VisibleDigitalSeal: ").Append(VisibleDigitalSeal).Append("\n"); + sb.Append(" VisibleDigitalSealNC: ").Append(VisibleDigitalSealNC).Append("\n"); + sb.Append(" DigitalSignature: ").Append(DigitalSignature).Append("\n"); + sb.Append(" RFIDSessionData: ").Append(RFIDSessionData).Append("\n"); + sb.Append(" RFIDSessionDataStatus: ").Append(RFIDSessionDataStatus).Append("\n"); + sb.Append(" RFIDEPasspDirectory: ").Append(RFIDEPasspDirectory).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class BinaryDataJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override BinaryData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> rFIDAuthenticationInfo = default; + Option?> rFIDMIFAREDataValidity = default; + Option?> rFIDMIFAREData = default; + Option?> rFIDEFCOM = default; + Option rFIDDG1 = default; + Option?> rFIDDG2 = default; + Option?> rFIDDG3 = default; + Option?> rFIDDG4 = default; + Option?> rFIDDG5 = default; + Option?> rFIDDG6 = default; + Option?> rFIDDG7 = default; + Option?> rFIDDG8 = default; + Option?> rFIDDG9 = default; + Option?> rFIDDG10 = default; + Option?> rFIDDG11 = default; + Option?> rFIDDG12 = default; + Option?> rFIDDG13 = default; + Option?> rFIDDG14 = default; + Option?> rFIDDG15 = default; + Option?> rFIDDG16 = default; + Option?> rFIDEFSOD = default; + Option?> eIDDG1 = default; + Option?> eIDDG2 = default; + Option?> eIDDG3 = default; + Option?> eIDDG4 = default; + Option?> eIDDG5 = default; + Option?> eIDDG6 = default; + Option?> eIDDG7 = default; + Option?> eIDDG8 = default; + Option?> eIDDG9 = default; + Option?> eIDDG10 = default; + Option?> eIDDG11 = default; + Option?> eIDDG12 = default; + Option?> eIDDG13 = default; + Option?> eIDDG14 = default; + Option?> eIDDG15 = default; + Option?> eIDDG16 = default; + Option?> eIDDG17 = default; + Option?> eIDDG18 = default; + Option?> eIDDG19 = default; + Option?> eIDDG20 = default; + Option?> eIDDG21 = default; + Option?> eDLCOM = default; + Option?> eDLSOD = default; + Option?> eDLDG1 = default; + Option?> eDLDG2 = default; + Option?> eDLDG3 = default; + Option?> eDLDG4 = default; + Option?> eDLDG5 = default; + Option?> eDLDG6 = default; + Option?> eDLDG7 = default; + Option?> eDLDG8 = default; + Option?> eDLDG9 = default; + Option?> eDLDG10 = default; + Option?> eDLDG11 = default; + Option?> eDLDG12 = default; + Option?> eDLDG13 = default; + Option?> eDLDG14 = default; + Option?> visibleDigitalSeal = default; + Option?> visibleDigitalSealNC = default; + Option?> digitalSignature = default; + Option rFIDSessionData = default; + Option rFIDSessionDataStatus = default; + Option?> rFIDEPasspDirectory = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RFID_Authentication_Info": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDAuthenticationInfo = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_MIFARE_Data_Validity": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDMIFAREDataValidity = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_MIFARE_Data": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDMIFAREData = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_EF_COM": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDEFCOM = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG1 = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG2 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG3": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG3 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG4": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG4 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG5": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG5 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG6": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG6 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG7": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG7 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG8": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG8 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG9": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG9 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG10": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG10 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG11": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG11 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG12": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG12 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG13": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG13 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG14": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG14 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG15": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG15 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_DG16": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDDG16 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_EF_SOD": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDEFSOD = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG1 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG2 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG3": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG3 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG4": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG4 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG5": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG5 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG6": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG6 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG7": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG7 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG8": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG8 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG9": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG9 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG10": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG10 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG11": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG11 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG12": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG12 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG13": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG13 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG14": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG14 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG15": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG15 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG16": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG16 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG17": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG17 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG18": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG18 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG19": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG19 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG20": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG20 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eID_DG21": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eIDDG21 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_COM": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLCOM = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_SOD": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLSOD = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG1 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG2 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG3": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG3 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG4": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG4 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG5": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG5 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG6": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG6 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG7": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG7 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG8": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG8 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG9": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG9 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG10": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG10 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG11": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG11 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG12": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG12 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG13": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG13 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "eDL_DG14": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDLDG14 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Visible_Digital_Seal": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + visibleDigitalSeal = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Visible_Digital_Seal_NC": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + visibleDigitalSealNC = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Digital_Signature": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + digitalSignature = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_Session_Data": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDSessionData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_Session_Data_Status": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDSessionDataStatus = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_ePassp_Directory": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDEPasspDirectory = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (rFIDAuthenticationInfo.IsSet && rFIDAuthenticationInfo.Value == null) + throw new ArgumentNullException(nameof(rFIDAuthenticationInfo), "Property is not nullable for class BinaryData."); + + if (rFIDMIFAREDataValidity.IsSet && rFIDMIFAREDataValidity.Value == null) + throw new ArgumentNullException(nameof(rFIDMIFAREDataValidity), "Property is not nullable for class BinaryData."); + + if (rFIDMIFAREData.IsSet && rFIDMIFAREData.Value == null) + throw new ArgumentNullException(nameof(rFIDMIFAREData), "Property is not nullable for class BinaryData."); + + if (rFIDEFCOM.IsSet && rFIDEFCOM.Value == null) + throw new ArgumentNullException(nameof(rFIDEFCOM), "Property is not nullable for class BinaryData."); + + if (rFIDDG1.IsSet && rFIDDG1.Value == null) + throw new ArgumentNullException(nameof(rFIDDG1), "Property is not nullable for class BinaryData."); + + if (rFIDDG2.IsSet && rFIDDG2.Value == null) + throw new ArgumentNullException(nameof(rFIDDG2), "Property is not nullable for class BinaryData."); + + if (rFIDDG3.IsSet && rFIDDG3.Value == null) + throw new ArgumentNullException(nameof(rFIDDG3), "Property is not nullable for class BinaryData."); + + if (rFIDDG4.IsSet && rFIDDG4.Value == null) + throw new ArgumentNullException(nameof(rFIDDG4), "Property is not nullable for class BinaryData."); + + if (rFIDDG5.IsSet && rFIDDG5.Value == null) + throw new ArgumentNullException(nameof(rFIDDG5), "Property is not nullable for class BinaryData."); + + if (rFIDDG6.IsSet && rFIDDG6.Value == null) + throw new ArgumentNullException(nameof(rFIDDG6), "Property is not nullable for class BinaryData."); + + if (rFIDDG7.IsSet && rFIDDG7.Value == null) + throw new ArgumentNullException(nameof(rFIDDG7), "Property is not nullable for class BinaryData."); + + if (rFIDDG8.IsSet && rFIDDG8.Value == null) + throw new ArgumentNullException(nameof(rFIDDG8), "Property is not nullable for class BinaryData."); + + if (rFIDDG9.IsSet && rFIDDG9.Value == null) + throw new ArgumentNullException(nameof(rFIDDG9), "Property is not nullable for class BinaryData."); + + if (rFIDDG10.IsSet && rFIDDG10.Value == null) + throw new ArgumentNullException(nameof(rFIDDG10), "Property is not nullable for class BinaryData."); + + if (rFIDDG11.IsSet && rFIDDG11.Value == null) + throw new ArgumentNullException(nameof(rFIDDG11), "Property is not nullable for class BinaryData."); + + if (rFIDDG12.IsSet && rFIDDG12.Value == null) + throw new ArgumentNullException(nameof(rFIDDG12), "Property is not nullable for class BinaryData."); + + if (rFIDDG13.IsSet && rFIDDG13.Value == null) + throw new ArgumentNullException(nameof(rFIDDG13), "Property is not nullable for class BinaryData."); + + if (rFIDDG14.IsSet && rFIDDG14.Value == null) + throw new ArgumentNullException(nameof(rFIDDG14), "Property is not nullable for class BinaryData."); + + if (rFIDDG15.IsSet && rFIDDG15.Value == null) + throw new ArgumentNullException(nameof(rFIDDG15), "Property is not nullable for class BinaryData."); + + if (rFIDDG16.IsSet && rFIDDG16.Value == null) + throw new ArgumentNullException(nameof(rFIDDG16), "Property is not nullable for class BinaryData."); + + if (rFIDEFSOD.IsSet && rFIDEFSOD.Value == null) + throw new ArgumentNullException(nameof(rFIDEFSOD), "Property is not nullable for class BinaryData."); + + if (eIDDG1.IsSet && eIDDG1.Value == null) + throw new ArgumentNullException(nameof(eIDDG1), "Property is not nullable for class BinaryData."); + + if (eIDDG2.IsSet && eIDDG2.Value == null) + throw new ArgumentNullException(nameof(eIDDG2), "Property is not nullable for class BinaryData."); + + if (eIDDG3.IsSet && eIDDG3.Value == null) + throw new ArgumentNullException(nameof(eIDDG3), "Property is not nullable for class BinaryData."); + + if (eIDDG4.IsSet && eIDDG4.Value == null) + throw new ArgumentNullException(nameof(eIDDG4), "Property is not nullable for class BinaryData."); + + if (eIDDG5.IsSet && eIDDG5.Value == null) + throw new ArgumentNullException(nameof(eIDDG5), "Property is not nullable for class BinaryData."); + + if (eIDDG6.IsSet && eIDDG6.Value == null) + throw new ArgumentNullException(nameof(eIDDG6), "Property is not nullable for class BinaryData."); + + if (eIDDG7.IsSet && eIDDG7.Value == null) + throw new ArgumentNullException(nameof(eIDDG7), "Property is not nullable for class BinaryData."); + + if (eIDDG8.IsSet && eIDDG8.Value == null) + throw new ArgumentNullException(nameof(eIDDG8), "Property is not nullable for class BinaryData."); + + if (eIDDG9.IsSet && eIDDG9.Value == null) + throw new ArgumentNullException(nameof(eIDDG9), "Property is not nullable for class BinaryData."); + + if (eIDDG10.IsSet && eIDDG10.Value == null) + throw new ArgumentNullException(nameof(eIDDG10), "Property is not nullable for class BinaryData."); + + if (eIDDG11.IsSet && eIDDG11.Value == null) + throw new ArgumentNullException(nameof(eIDDG11), "Property is not nullable for class BinaryData."); + + if (eIDDG12.IsSet && eIDDG12.Value == null) + throw new ArgumentNullException(nameof(eIDDG12), "Property is not nullable for class BinaryData."); + + if (eIDDG13.IsSet && eIDDG13.Value == null) + throw new ArgumentNullException(nameof(eIDDG13), "Property is not nullable for class BinaryData."); + + if (eIDDG14.IsSet && eIDDG14.Value == null) + throw new ArgumentNullException(nameof(eIDDG14), "Property is not nullable for class BinaryData."); + + if (eIDDG15.IsSet && eIDDG15.Value == null) + throw new ArgumentNullException(nameof(eIDDG15), "Property is not nullable for class BinaryData."); + + if (eIDDG16.IsSet && eIDDG16.Value == null) + throw new ArgumentNullException(nameof(eIDDG16), "Property is not nullable for class BinaryData."); + + if (eIDDG17.IsSet && eIDDG17.Value == null) + throw new ArgumentNullException(nameof(eIDDG17), "Property is not nullable for class BinaryData."); + + if (eIDDG18.IsSet && eIDDG18.Value == null) + throw new ArgumentNullException(nameof(eIDDG18), "Property is not nullable for class BinaryData."); + + if (eIDDG19.IsSet && eIDDG19.Value == null) + throw new ArgumentNullException(nameof(eIDDG19), "Property is not nullable for class BinaryData."); + + if (eIDDG20.IsSet && eIDDG20.Value == null) + throw new ArgumentNullException(nameof(eIDDG20), "Property is not nullable for class BinaryData."); + + if (eIDDG21.IsSet && eIDDG21.Value == null) + throw new ArgumentNullException(nameof(eIDDG21), "Property is not nullable for class BinaryData."); + + if (eDLCOM.IsSet && eDLCOM.Value == null) + throw new ArgumentNullException(nameof(eDLCOM), "Property is not nullable for class BinaryData."); + + if (eDLSOD.IsSet && eDLSOD.Value == null) + throw new ArgumentNullException(nameof(eDLSOD), "Property is not nullable for class BinaryData."); + + if (eDLDG1.IsSet && eDLDG1.Value == null) + throw new ArgumentNullException(nameof(eDLDG1), "Property is not nullable for class BinaryData."); + + if (eDLDG2.IsSet && eDLDG2.Value == null) + throw new ArgumentNullException(nameof(eDLDG2), "Property is not nullable for class BinaryData."); + + if (eDLDG3.IsSet && eDLDG3.Value == null) + throw new ArgumentNullException(nameof(eDLDG3), "Property is not nullable for class BinaryData."); + + if (eDLDG4.IsSet && eDLDG4.Value == null) + throw new ArgumentNullException(nameof(eDLDG4), "Property is not nullable for class BinaryData."); + + if (eDLDG5.IsSet && eDLDG5.Value == null) + throw new ArgumentNullException(nameof(eDLDG5), "Property is not nullable for class BinaryData."); + + if (eDLDG6.IsSet && eDLDG6.Value == null) + throw new ArgumentNullException(nameof(eDLDG6), "Property is not nullable for class BinaryData."); + + if (eDLDG7.IsSet && eDLDG7.Value == null) + throw new ArgumentNullException(nameof(eDLDG7), "Property is not nullable for class BinaryData."); + + if (eDLDG8.IsSet && eDLDG8.Value == null) + throw new ArgumentNullException(nameof(eDLDG8), "Property is not nullable for class BinaryData."); + + if (eDLDG9.IsSet && eDLDG9.Value == null) + throw new ArgumentNullException(nameof(eDLDG9), "Property is not nullable for class BinaryData."); + + if (eDLDG10.IsSet && eDLDG10.Value == null) + throw new ArgumentNullException(nameof(eDLDG10), "Property is not nullable for class BinaryData."); + + if (eDLDG11.IsSet && eDLDG11.Value == null) + throw new ArgumentNullException(nameof(eDLDG11), "Property is not nullable for class BinaryData."); + + if (eDLDG12.IsSet && eDLDG12.Value == null) + throw new ArgumentNullException(nameof(eDLDG12), "Property is not nullable for class BinaryData."); + + if (eDLDG13.IsSet && eDLDG13.Value == null) + throw new ArgumentNullException(nameof(eDLDG13), "Property is not nullable for class BinaryData."); + + if (eDLDG14.IsSet && eDLDG14.Value == null) + throw new ArgumentNullException(nameof(eDLDG14), "Property is not nullable for class BinaryData."); + + if (visibleDigitalSeal.IsSet && visibleDigitalSeal.Value == null) + throw new ArgumentNullException(nameof(visibleDigitalSeal), "Property is not nullable for class BinaryData."); + + if (visibleDigitalSealNC.IsSet && visibleDigitalSealNC.Value == null) + throw new ArgumentNullException(nameof(visibleDigitalSealNC), "Property is not nullable for class BinaryData."); + + if (digitalSignature.IsSet && digitalSignature.Value == null) + throw new ArgumentNullException(nameof(digitalSignature), "Property is not nullable for class BinaryData."); + + if (rFIDSessionData.IsSet && rFIDSessionData.Value == null) + throw new ArgumentNullException(nameof(rFIDSessionData), "Property is not nullable for class BinaryData."); + + if (rFIDSessionDataStatus.IsSet && rFIDSessionDataStatus.Value == null) + throw new ArgumentNullException(nameof(rFIDSessionDataStatus), "Property is not nullable for class BinaryData."); + + if (rFIDEPasspDirectory.IsSet && rFIDEPasspDirectory.Value == null) + throw new ArgumentNullException(nameof(rFIDEPasspDirectory), "Property is not nullable for class BinaryData."); + + return new BinaryData(rFIDAuthenticationInfo, rFIDMIFAREDataValidity, rFIDMIFAREData, rFIDEFCOM, rFIDDG1, rFIDDG2, rFIDDG3, rFIDDG4, rFIDDG5, rFIDDG6, rFIDDG7, rFIDDG8, rFIDDG9, rFIDDG10, rFIDDG11, rFIDDG12, rFIDDG13, rFIDDG14, rFIDDG15, rFIDDG16, rFIDEFSOD, eIDDG1, eIDDG2, eIDDG3, eIDDG4, eIDDG5, eIDDG6, eIDDG7, eIDDG8, eIDDG9, eIDDG10, eIDDG11, eIDDG12, eIDDG13, eIDDG14, eIDDG15, eIDDG16, eIDDG17, eIDDG18, eIDDG19, eIDDG20, eIDDG21, eDLCOM, eDLSOD, eDLDG1, eDLDG2, eDLDG3, eDLDG4, eDLDG5, eDLDG6, eDLDG7, eDLDG8, eDLDG9, eDLDG10, eDLDG11, eDLDG12, eDLDG13, eDLDG14, visibleDigitalSeal, visibleDigitalSealNC, digitalSignature, rFIDSessionData, rFIDSessionDataStatus, rFIDEPasspDirectory); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, BinaryData binaryData, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, binaryData, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, BinaryData binaryData, JsonSerializerOptions jsonSerializerOptions) + { + if (binaryData.RFIDAuthenticationInfoOption.IsSet && binaryData.RFIDAuthenticationInfo == null) + throw new ArgumentNullException(nameof(binaryData.RFIDAuthenticationInfo), "Property is required for class BinaryData."); + + if (binaryData.RFIDMIFAREDataValidityOption.IsSet && binaryData.RFIDMIFAREDataValidity == null) + throw new ArgumentNullException(nameof(binaryData.RFIDMIFAREDataValidity), "Property is required for class BinaryData."); + + if (binaryData.RFIDMIFAREDataOption.IsSet && binaryData.RFIDMIFAREData == null) + throw new ArgumentNullException(nameof(binaryData.RFIDMIFAREData), "Property is required for class BinaryData."); + + if (binaryData.RFID_EF_COMOption.IsSet && binaryData.RFID_EF_COM == null) + throw new ArgumentNullException(nameof(binaryData.RFID_EF_COM), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG1Option.IsSet && binaryData.RFIDDG1 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG1), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG2Option.IsSet && binaryData.RFIDDG2 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG2), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG3Option.IsSet && binaryData.RFIDDG3 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG3), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG4Option.IsSet && binaryData.RFIDDG4 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG4), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG5Option.IsSet && binaryData.RFIDDG5 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG5), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG6Option.IsSet && binaryData.RFIDDG6 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG6), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG7Option.IsSet && binaryData.RFIDDG7 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG7), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG8Option.IsSet && binaryData.RFIDDG8 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG8), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG9Option.IsSet && binaryData.RFIDDG9 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG9), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG10Option.IsSet && binaryData.RFIDDG10 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG10), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG11Option.IsSet && binaryData.RFIDDG11 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG11), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG12Option.IsSet && binaryData.RFIDDG12 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG12), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG13Option.IsSet && binaryData.RFIDDG13 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG13), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG14Option.IsSet && binaryData.RFIDDG14 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG14), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG15Option.IsSet && binaryData.RFIDDG15 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG15), "Property is required for class BinaryData."); + + if (binaryData.RFIDDG16Option.IsSet && binaryData.RFIDDG16 == null) + throw new ArgumentNullException(nameof(binaryData.RFIDDG16), "Property is required for class BinaryData."); + + if (binaryData.RFID_EF_SODOption.IsSet && binaryData.RFID_EF_SOD == null) + throw new ArgumentNullException(nameof(binaryData.RFID_EF_SOD), "Property is required for class BinaryData."); + + if (binaryData.EIDDG1Option.IsSet && binaryData.EIDDG1 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG1), "Property is required for class BinaryData."); + + if (binaryData.EIDDG2Option.IsSet && binaryData.EIDDG2 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG2), "Property is required for class BinaryData."); + + if (binaryData.EIDDG3Option.IsSet && binaryData.EIDDG3 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG3), "Property is required for class BinaryData."); + + if (binaryData.EIDDG4Option.IsSet && binaryData.EIDDG4 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG4), "Property is required for class BinaryData."); + + if (binaryData.EIDDG5Option.IsSet && binaryData.EIDDG5 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG5), "Property is required for class BinaryData."); + + if (binaryData.EIDDG6Option.IsSet && binaryData.EIDDG6 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG6), "Property is required for class BinaryData."); + + if (binaryData.EIDDG7Option.IsSet && binaryData.EIDDG7 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG7), "Property is required for class BinaryData."); + + if (binaryData.EIDDG8Option.IsSet && binaryData.EIDDG8 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG8), "Property is required for class BinaryData."); + + if (binaryData.EIDDG9Option.IsSet && binaryData.EIDDG9 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG9), "Property is required for class BinaryData."); + + if (binaryData.EIDDG10Option.IsSet && binaryData.EIDDG10 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG10), "Property is required for class BinaryData."); + + if (binaryData.EIDDG11Option.IsSet && binaryData.EIDDG11 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG11), "Property is required for class BinaryData."); + + if (binaryData.EIDDG12Option.IsSet && binaryData.EIDDG12 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG12), "Property is required for class BinaryData."); + + if (binaryData.EIDDG13Option.IsSet && binaryData.EIDDG13 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG13), "Property is required for class BinaryData."); + + if (binaryData.EIDDG14Option.IsSet && binaryData.EIDDG14 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG14), "Property is required for class BinaryData."); + + if (binaryData.EIDDG15Option.IsSet && binaryData.EIDDG15 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG15), "Property is required for class BinaryData."); + + if (binaryData.EIDDG16Option.IsSet && binaryData.EIDDG16 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG16), "Property is required for class BinaryData."); + + if (binaryData.EIDDG17Option.IsSet && binaryData.EIDDG17 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG17), "Property is required for class BinaryData."); + + if (binaryData.EIDDG18Option.IsSet && binaryData.EIDDG18 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG18), "Property is required for class BinaryData."); + + if (binaryData.EIDDG19Option.IsSet && binaryData.EIDDG19 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG19), "Property is required for class BinaryData."); + + if (binaryData.EIDDG20Option.IsSet && binaryData.EIDDG20 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG20), "Property is required for class BinaryData."); + + if (binaryData.EIDDG21Option.IsSet && binaryData.EIDDG21 == null) + throw new ArgumentNullException(nameof(binaryData.EIDDG21), "Property is required for class BinaryData."); + + if (binaryData.EDLCOMOption.IsSet && binaryData.EDLCOM == null) + throw new ArgumentNullException(nameof(binaryData.EDLCOM), "Property is required for class BinaryData."); + + if (binaryData.EDLSODOption.IsSet && binaryData.EDLSOD == null) + throw new ArgumentNullException(nameof(binaryData.EDLSOD), "Property is required for class BinaryData."); + + if (binaryData.EDLDG1Option.IsSet && binaryData.EDLDG1 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG1), "Property is required for class BinaryData."); + + if (binaryData.EDLDG2Option.IsSet && binaryData.EDLDG2 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG2), "Property is required for class BinaryData."); + + if (binaryData.EDLDG3Option.IsSet && binaryData.EDLDG3 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG3), "Property is required for class BinaryData."); + + if (binaryData.EDLDG4Option.IsSet && binaryData.EDLDG4 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG4), "Property is required for class BinaryData."); + + if (binaryData.EDLDG5Option.IsSet && binaryData.EDLDG5 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG5), "Property is required for class BinaryData."); + + if (binaryData.EDLDG6Option.IsSet && binaryData.EDLDG6 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG6), "Property is required for class BinaryData."); + + if (binaryData.EDLDG7Option.IsSet && binaryData.EDLDG7 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG7), "Property is required for class BinaryData."); + + if (binaryData.EDLDG8Option.IsSet && binaryData.EDLDG8 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG8), "Property is required for class BinaryData."); + + if (binaryData.EDLDG9Option.IsSet && binaryData.EDLDG9 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG9), "Property is required for class BinaryData."); + + if (binaryData.EDLDG10Option.IsSet && binaryData.EDLDG10 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG10), "Property is required for class BinaryData."); + + if (binaryData.EDLDG11Option.IsSet && binaryData.EDLDG11 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG11), "Property is required for class BinaryData."); + + if (binaryData.EDLDG12Option.IsSet && binaryData.EDLDG12 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG12), "Property is required for class BinaryData."); + + if (binaryData.EDLDG13Option.IsSet && binaryData.EDLDG13 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG13), "Property is required for class BinaryData."); + + if (binaryData.EDLDG14Option.IsSet && binaryData.EDLDG14 == null) + throw new ArgumentNullException(nameof(binaryData.EDLDG14), "Property is required for class BinaryData."); + + if (binaryData.VisibleDigitalSealOption.IsSet && binaryData.VisibleDigitalSeal == null) + throw new ArgumentNullException(nameof(binaryData.VisibleDigitalSeal), "Property is required for class BinaryData."); + + if (binaryData.VisibleDigitalSealNCOption.IsSet && binaryData.VisibleDigitalSealNC == null) + throw new ArgumentNullException(nameof(binaryData.VisibleDigitalSealNC), "Property is required for class BinaryData."); + + if (binaryData.DigitalSignatureOption.IsSet && binaryData.DigitalSignature == null) + throw new ArgumentNullException(nameof(binaryData.DigitalSignature), "Property is required for class BinaryData."); + + if (binaryData.RFIDSessionDataOption.IsSet && binaryData.RFIDSessionData == null) + throw new ArgumentNullException(nameof(binaryData.RFIDSessionData), "Property is required for class BinaryData."); + + if (binaryData.RFIDSessionDataStatusOption.IsSet && binaryData.RFIDSessionDataStatus == null) + throw new ArgumentNullException(nameof(binaryData.RFIDSessionDataStatus), "Property is required for class BinaryData."); + + if (binaryData.RFIDEPasspDirectoryOption.IsSet && binaryData.RFIDEPasspDirectory == null) + throw new ArgumentNullException(nameof(binaryData.RFIDEPasspDirectory), "Property is required for class BinaryData."); + + if (binaryData.RFIDAuthenticationInfoOption.IsSet) + { + writer.WritePropertyName("RFID_Authentication_Info"); + JsonSerializer.Serialize(writer, binaryData.RFIDAuthenticationInfo, jsonSerializerOptions); + } + if (binaryData.RFIDMIFAREDataValidityOption.IsSet) + { + writer.WritePropertyName("RFID_MIFARE_Data_Validity"); + JsonSerializer.Serialize(writer, binaryData.RFIDMIFAREDataValidity, jsonSerializerOptions); + } + if (binaryData.RFIDMIFAREDataOption.IsSet) + { + writer.WritePropertyName("RFID_MIFARE_Data"); + JsonSerializer.Serialize(writer, binaryData.RFIDMIFAREData, jsonSerializerOptions); + } + if (binaryData.RFID_EF_COMOption.IsSet) + { + writer.WritePropertyName("RFID_EF_COM"); + JsonSerializer.Serialize(writer, binaryData.RFID_EF_COM, jsonSerializerOptions); + } + if (binaryData.RFIDDG1Option.IsSet) + { + writer.WritePropertyName("RFID_DG1"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG1, jsonSerializerOptions); + } + if (binaryData.RFIDDG2Option.IsSet) + { + writer.WritePropertyName("RFID_DG2"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG2, jsonSerializerOptions); + } + if (binaryData.RFIDDG3Option.IsSet) + { + writer.WritePropertyName("RFID_DG3"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG3, jsonSerializerOptions); + } + if (binaryData.RFIDDG4Option.IsSet) + { + writer.WritePropertyName("RFID_DG4"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG4, jsonSerializerOptions); + } + if (binaryData.RFIDDG5Option.IsSet) + { + writer.WritePropertyName("RFID_DG5"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG5, jsonSerializerOptions); + } + if (binaryData.RFIDDG6Option.IsSet) + { + writer.WritePropertyName("RFID_DG6"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG6, jsonSerializerOptions); + } + if (binaryData.RFIDDG7Option.IsSet) + { + writer.WritePropertyName("RFID_DG7"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG7, jsonSerializerOptions); + } + if (binaryData.RFIDDG8Option.IsSet) + { + writer.WritePropertyName("RFID_DG8"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG8, jsonSerializerOptions); + } + if (binaryData.RFIDDG9Option.IsSet) + { + writer.WritePropertyName("RFID_DG9"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG9, jsonSerializerOptions); + } + if (binaryData.RFIDDG10Option.IsSet) + { + writer.WritePropertyName("RFID_DG10"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG10, jsonSerializerOptions); + } + if (binaryData.RFIDDG11Option.IsSet) + { + writer.WritePropertyName("RFID_DG11"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG11, jsonSerializerOptions); + } + if (binaryData.RFIDDG12Option.IsSet) + { + writer.WritePropertyName("RFID_DG12"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG12, jsonSerializerOptions); + } + if (binaryData.RFIDDG13Option.IsSet) + { + writer.WritePropertyName("RFID_DG13"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG13, jsonSerializerOptions); + } + if (binaryData.RFIDDG14Option.IsSet) + { + writer.WritePropertyName("RFID_DG14"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG14, jsonSerializerOptions); + } + if (binaryData.RFIDDG15Option.IsSet) + { + writer.WritePropertyName("RFID_DG15"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG15, jsonSerializerOptions); + } + if (binaryData.RFIDDG16Option.IsSet) + { + writer.WritePropertyName("RFID_DG16"); + JsonSerializer.Serialize(writer, binaryData.RFIDDG16, jsonSerializerOptions); + } + if (binaryData.RFID_EF_SODOption.IsSet) + { + writer.WritePropertyName("RFID_EF_SOD"); + JsonSerializer.Serialize(writer, binaryData.RFID_EF_SOD, jsonSerializerOptions); + } + if (binaryData.EIDDG1Option.IsSet) + { + writer.WritePropertyName("eID_DG1"); + JsonSerializer.Serialize(writer, binaryData.EIDDG1, jsonSerializerOptions); + } + if (binaryData.EIDDG2Option.IsSet) + { + writer.WritePropertyName("eID_DG2"); + JsonSerializer.Serialize(writer, binaryData.EIDDG2, jsonSerializerOptions); + } + if (binaryData.EIDDG3Option.IsSet) + { + writer.WritePropertyName("eID_DG3"); + JsonSerializer.Serialize(writer, binaryData.EIDDG3, jsonSerializerOptions); + } + if (binaryData.EIDDG4Option.IsSet) + { + writer.WritePropertyName("eID_DG4"); + JsonSerializer.Serialize(writer, binaryData.EIDDG4, jsonSerializerOptions); + } + if (binaryData.EIDDG5Option.IsSet) + { + writer.WritePropertyName("eID_DG5"); + JsonSerializer.Serialize(writer, binaryData.EIDDG5, jsonSerializerOptions); + } + if (binaryData.EIDDG6Option.IsSet) + { + writer.WritePropertyName("eID_DG6"); + JsonSerializer.Serialize(writer, binaryData.EIDDG6, jsonSerializerOptions); + } + if (binaryData.EIDDG7Option.IsSet) + { + writer.WritePropertyName("eID_DG7"); + JsonSerializer.Serialize(writer, binaryData.EIDDG7, jsonSerializerOptions); + } + if (binaryData.EIDDG8Option.IsSet) + { + writer.WritePropertyName("eID_DG8"); + JsonSerializer.Serialize(writer, binaryData.EIDDG8, jsonSerializerOptions); + } + if (binaryData.EIDDG9Option.IsSet) + { + writer.WritePropertyName("eID_DG9"); + JsonSerializer.Serialize(writer, binaryData.EIDDG9, jsonSerializerOptions); + } + if (binaryData.EIDDG10Option.IsSet) + { + writer.WritePropertyName("eID_DG10"); + JsonSerializer.Serialize(writer, binaryData.EIDDG10, jsonSerializerOptions); + } + if (binaryData.EIDDG11Option.IsSet) + { + writer.WritePropertyName("eID_DG11"); + JsonSerializer.Serialize(writer, binaryData.EIDDG11, jsonSerializerOptions); + } + if (binaryData.EIDDG12Option.IsSet) + { + writer.WritePropertyName("eID_DG12"); + JsonSerializer.Serialize(writer, binaryData.EIDDG12, jsonSerializerOptions); + } + if (binaryData.EIDDG13Option.IsSet) + { + writer.WritePropertyName("eID_DG13"); + JsonSerializer.Serialize(writer, binaryData.EIDDG13, jsonSerializerOptions); + } + if (binaryData.EIDDG14Option.IsSet) + { + writer.WritePropertyName("eID_DG14"); + JsonSerializer.Serialize(writer, binaryData.EIDDG14, jsonSerializerOptions); + } + if (binaryData.EIDDG15Option.IsSet) + { + writer.WritePropertyName("eID_DG15"); + JsonSerializer.Serialize(writer, binaryData.EIDDG15, jsonSerializerOptions); + } + if (binaryData.EIDDG16Option.IsSet) + { + writer.WritePropertyName("eID_DG16"); + JsonSerializer.Serialize(writer, binaryData.EIDDG16, jsonSerializerOptions); + } + if (binaryData.EIDDG17Option.IsSet) + { + writer.WritePropertyName("eID_DG17"); + JsonSerializer.Serialize(writer, binaryData.EIDDG17, jsonSerializerOptions); + } + if (binaryData.EIDDG18Option.IsSet) + { + writer.WritePropertyName("eID_DG18"); + JsonSerializer.Serialize(writer, binaryData.EIDDG18, jsonSerializerOptions); + } + if (binaryData.EIDDG19Option.IsSet) + { + writer.WritePropertyName("eID_DG19"); + JsonSerializer.Serialize(writer, binaryData.EIDDG19, jsonSerializerOptions); + } + if (binaryData.EIDDG20Option.IsSet) + { + writer.WritePropertyName("eID_DG20"); + JsonSerializer.Serialize(writer, binaryData.EIDDG20, jsonSerializerOptions); + } + if (binaryData.EIDDG21Option.IsSet) + { + writer.WritePropertyName("eID_DG21"); + JsonSerializer.Serialize(writer, binaryData.EIDDG21, jsonSerializerOptions); + } + if (binaryData.EDLCOMOption.IsSet) + { + writer.WritePropertyName("eDL_COM"); + JsonSerializer.Serialize(writer, binaryData.EDLCOM, jsonSerializerOptions); + } + if (binaryData.EDLSODOption.IsSet) + { + writer.WritePropertyName("eDL_SOD"); + JsonSerializer.Serialize(writer, binaryData.EDLSOD, jsonSerializerOptions); + } + if (binaryData.EDLDG1Option.IsSet) + { + writer.WritePropertyName("eDL_DG1"); + JsonSerializer.Serialize(writer, binaryData.EDLDG1, jsonSerializerOptions); + } + if (binaryData.EDLDG2Option.IsSet) + { + writer.WritePropertyName("eDL_DG2"); + JsonSerializer.Serialize(writer, binaryData.EDLDG2, jsonSerializerOptions); + } + if (binaryData.EDLDG3Option.IsSet) + { + writer.WritePropertyName("eDL_DG3"); + JsonSerializer.Serialize(writer, binaryData.EDLDG3, jsonSerializerOptions); + } + if (binaryData.EDLDG4Option.IsSet) + { + writer.WritePropertyName("eDL_DG4"); + JsonSerializer.Serialize(writer, binaryData.EDLDG4, jsonSerializerOptions); + } + if (binaryData.EDLDG5Option.IsSet) + { + writer.WritePropertyName("eDL_DG5"); + JsonSerializer.Serialize(writer, binaryData.EDLDG5, jsonSerializerOptions); + } + if (binaryData.EDLDG6Option.IsSet) + { + writer.WritePropertyName("eDL_DG6"); + JsonSerializer.Serialize(writer, binaryData.EDLDG6, jsonSerializerOptions); + } + if (binaryData.EDLDG7Option.IsSet) + { + writer.WritePropertyName("eDL_DG7"); + JsonSerializer.Serialize(writer, binaryData.EDLDG7, jsonSerializerOptions); + } + if (binaryData.EDLDG8Option.IsSet) + { + writer.WritePropertyName("eDL_DG8"); + JsonSerializer.Serialize(writer, binaryData.EDLDG8, jsonSerializerOptions); + } + if (binaryData.EDLDG9Option.IsSet) + { + writer.WritePropertyName("eDL_DG9"); + JsonSerializer.Serialize(writer, binaryData.EDLDG9, jsonSerializerOptions); + } + if (binaryData.EDLDG10Option.IsSet) + { + writer.WritePropertyName("eDL_DG10"); + JsonSerializer.Serialize(writer, binaryData.EDLDG10, jsonSerializerOptions); + } + if (binaryData.EDLDG11Option.IsSet) + { + writer.WritePropertyName("eDL_DG11"); + JsonSerializer.Serialize(writer, binaryData.EDLDG11, jsonSerializerOptions); + } + if (binaryData.EDLDG12Option.IsSet) + { + writer.WritePropertyName("eDL_DG12"); + JsonSerializer.Serialize(writer, binaryData.EDLDG12, jsonSerializerOptions); + } + if (binaryData.EDLDG13Option.IsSet) + { + writer.WritePropertyName("eDL_DG13"); + JsonSerializer.Serialize(writer, binaryData.EDLDG13, jsonSerializerOptions); + } + if (binaryData.EDLDG14Option.IsSet) + { + writer.WritePropertyName("eDL_DG14"); + JsonSerializer.Serialize(writer, binaryData.EDLDG14, jsonSerializerOptions); + } + if (binaryData.VisibleDigitalSealOption.IsSet) + { + writer.WritePropertyName("Visible_Digital_Seal"); + JsonSerializer.Serialize(writer, binaryData.VisibleDigitalSeal, jsonSerializerOptions); + } + if (binaryData.VisibleDigitalSealNCOption.IsSet) + { + writer.WritePropertyName("Visible_Digital_Seal_NC"); + JsonSerializer.Serialize(writer, binaryData.VisibleDigitalSealNC, jsonSerializerOptions); + } + if (binaryData.DigitalSignatureOption.IsSet) + { + writer.WritePropertyName("Digital_Signature"); + JsonSerializer.Serialize(writer, binaryData.DigitalSignature, jsonSerializerOptions); + } + if (binaryData.RFIDSessionDataOption.IsSet) + { + writer.WritePropertyName("RFID_Session_Data"); + JsonSerializer.Serialize(writer, binaryData.RFIDSessionData, jsonSerializerOptions); + } + if (binaryData.RFIDSessionDataStatusOption.IsSet) + { + writer.WritePropertyName("RFID_Session_Data_Status"); + JsonSerializer.Serialize(writer, binaryData.RFIDSessionDataStatus, jsonSerializerOptions); + } + if (binaryData.RFIDEPasspDirectoryOption.IsSet) + { + writer.WritePropertyName("RFID_ePassp_Directory"); + JsonSerializer.Serialize(writer, binaryData.RFIDEPasspDirectory, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/BinaryDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/BinaryDataResult.cs deleted file mode 100644 index b891483..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/BinaryDataResult.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// BinaryDataResult - /// - [DataContract] - public partial class BinaryDataResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Count of array fields. - /// pArrayFields. - public BinaryDataResult(int nFields = default(int), List pArrayFields = default(List)) - { - this.NFields = nFields; - this.PArrayFields = pArrayFields; - } - - /// - /// Count of array fields - /// - /// Count of array fields - [DataMember(Name="nFields", EmitDefaultValue=false)] - public int NFields { get; set; } - - /// - /// Gets or Sets PArrayFields - /// - [DataMember(Name="pArrayFields", EmitDefaultValue=false)] - public List PArrayFields { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BinaryDataResult {\n"); - sb.Append(" NFields: ").Append(NFields).Append("\n"); - sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BinaryDataResult); - } - - /// - /// Returns true if BinaryDataResult instances are equal - /// - /// Instance of BinaryDataResult to be compared - /// Boolean - public bool Equals(BinaryDataResult input) - { - if (input == null) - return false; - - return - ( - this.NFields == input.NFields || - (this.NFields != null && - this.NFields.Equals(input.NFields)) - ) && - ( - this.PArrayFields == input.PArrayFields || - this.PArrayFields != null && - input.PArrayFields != null && - this.PArrayFields.SequenceEqual(input.PArrayFields) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NFields != null) - hashCode = hashCode * 59 + this.NFields.GetHashCode(); - if (this.PArrayFields != null) - hashCode = hashCode * 59 + this.PArrayFields.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs b/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs new file mode 100644 index 0000000..5ef96ef --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs @@ -0,0 +1,164 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ByteArrayItem + /// + public partial class ByteArrayItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Byte array in base64 + [JsonConstructor] + public ByteArrayItem(string byteArray) + { + ByteArray = byteArray; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Byte array in base64 + /// + /// Byte array in base64 + [JsonPropertyName("ByteArray")] + public string ByteArray { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ByteArrayItem {\n"); + sb.Append(" ByteArray: ").Append(ByteArray).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ByteArrayItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ByteArrayItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option byteArray = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ByteArray": + byteArray = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!byteArray.IsSet) + throw new ArgumentException("Property is required for class ByteArrayItem.", nameof(byteArray)); + + if (byteArray.IsSet && byteArray.Value == null) + throw new ArgumentNullException(nameof(byteArray), "Property is not nullable for class ByteArrayItem."); + + return new ByteArrayItem(byteArray.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ByteArrayItem byteArrayItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, byteArrayItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ByteArrayItem byteArrayItem, JsonSerializerOptions jsonSerializerOptions) + { + if (byteArrayItem.ByteArray == null) + throw new ArgumentNullException(nameof(byteArrayItem.ByteArray), "Property is required for class ByteArrayItem."); + + writer.WriteString("ByteArray", byteArrayItem.ByteArray); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs index e1d68d1..ade19a1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs @@ -1,63 +1,57 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ByteArrayResult /// - [DataContract] - public partial class ByteArrayResult : ResultItem, IEquatable, IValidatableObject + public partial class ByteArrayResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ByteArrayResult() { } - /// - /// Initializes a new instance of the class. - /// - /// Byte array in base64 (required). - public ByteArrayResult(string byteArray = default(string), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// Byte array in base64 + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public ByteArrayResult(string byteArray, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "byteArray" is required (not null) - if (byteArray == null) - { - throw new InvalidDataException("byteArray is a required property for ByteArrayResult and cannot be null"); - } - else - { - this.ByteArray = byteArray; - } - + ByteArray = byteArray; + OnCreated(); } - + + partial void OnCreated(); + /// /// Byte array in base64 /// /// Byte array in base64 - [DataMember(Name="ByteArray", EmitDefaultValue=true)] + [JsonPropertyName("ByteArray")] public string ByteArray { get; set; } /// @@ -66,76 +60,157 @@ protected ByteArrayResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ByteArrayResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" ByteArray: ").Append(ByteArray).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class ByteArrayResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ByteArrayResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ByteArrayResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if ByteArrayResult instances are equal - /// - /// Instance of ByteArrayResult to be compared - /// Boolean - public bool Equals(ByteArrayResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.ByteArray == input.ByteArray || - (this.ByteArray != null && - this.ByteArray.Equals(input.ByteArray)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option byteArray = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ByteArray": + byteArray = new Option(utf8JsonReader.GetString()!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!byteArray.IsSet) + throw new ArgumentException("Property is required for class ByteArrayResult.", nameof(byteArray)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class ByteArrayResult.", nameof(resultType)); + + if (byteArray.IsSet && byteArray.Value == null) + throw new ArgumentNullException(nameof(byteArray), "Property is not nullable for class ByteArrayResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ByteArrayResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class ByteArrayResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ByteArrayResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ByteArrayResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ByteArrayResult."); + + return new ByteArrayResult(byteArray.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ByteArrayResult byteArrayResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ByteArray != null) - hashCode = hashCode * 59 + this.ByteArray.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, byteArrayResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ByteArrayResult byteArrayResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (byteArrayResult.ByteArray == null) + throw new ArgumentNullException(nameof(byteArrayResult.ByteArray), "Property is required for class ByteArrayResult."); + + writer.WriteString("ByteArray", byteArrayResult.ByteArray); + + if (byteArrayResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", byteArrayResult.BufLengthOption.Value!.Value); + + if (byteArrayResult.LightOption.IsSet) + writer.WriteNumber("light", byteArrayResult.LightOption.Value!.Value); + + if (byteArrayResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", byteArrayResult.ListIdxOption.Value!.Value); + + if (byteArrayResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", byteArrayResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", byteArrayResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs new file mode 100644 index 0000000..d9292b3 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs @@ -0,0 +1,172 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// CandidatesListItem + /// + public partial class CandidatesListItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// candidatesList + [JsonConstructor] + public CandidatesListItem(Option candidatesList = default) + { + CandidatesListOption = candidatesList; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Used to track the state of CandidatesList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CandidatesListOption { get; private set; } + + /// + /// Gets or Sets CandidatesList + /// + [JsonPropertyName("CandidatesList")] + public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CandidatesListItem {\n"); + sb.Append(" CandidatesList: ").Append(CandidatesList).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class CandidatesListItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override CandidatesListItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option candidatesList = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "CandidatesList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + candidatesList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (candidatesList.IsSet && candidatesList.Value == null) + throw new ArgumentNullException(nameof(candidatesList), "Property is not nullable for class CandidatesListItem."); + + return new CandidatesListItem(candidatesList); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CandidatesListItem candidatesListItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, candidatesListItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, CandidatesListItem candidatesListItem, JsonSerializerOptions jsonSerializerOptions) + { + if (candidatesListItem.CandidatesListOption.IsSet && candidatesListItem.CandidatesList == null) + throw new ArgumentNullException(nameof(candidatesListItem.CandidatesList), "Property is required for class CandidatesListItem."); + + if (candidatesListItem.CandidatesListOption.IsSet) + { + writer.WritePropertyName("CandidatesList"); + JsonSerializer.Serialize(writer, candidatesListItem.CandidatesList, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs b/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs new file mode 100644 index 0000000..33098f1 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs @@ -0,0 +1,187 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// CertificateData + /// + public partial class CertificateData : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// data + /// length + [JsonConstructor] + public CertificateData(string data, string length) + { + Data = data; + Length = length; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Data + /// + [JsonPropertyName("Data")] + public string Data { get; set; } + + /// + /// Gets or Sets Length + /// + [JsonPropertyName("Length")] + public string Length { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class CertificateData {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Length: ").Append(Length).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class CertificateDataJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override CertificateData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option data = default; + Option length = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Data": + data = new Option(utf8JsonReader.GetString()!); + break; + case "Length": + length = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!data.IsSet) + throw new ArgumentException("Property is required for class CertificateData.", nameof(data)); + + if (!length.IsSet) + throw new ArgumentException("Property is required for class CertificateData.", nameof(length)); + + if (data.IsSet && data.Value == null) + throw new ArgumentNullException(nameof(data), "Property is not nullable for class CertificateData."); + + if (length.IsSet && length.Value == null) + throw new ArgumentNullException(nameof(length), "Property is not nullable for class CertificateData."); + + return new CertificateData(data.Value!, length.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CertificateData certificateData, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, certificateData, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, CertificateData certificateData, JsonSerializerOptions jsonSerializerOptions) + { + if (certificateData.Data == null) + throw new ArgumentNullException(nameof(certificateData.Data), "Property is required for class CertificateData."); + + if (certificateData.Length == null) + throw new ArgumentNullException(nameof(certificateData.Length), "Property is required for class CertificateData."); + + writer.WriteString("Data", certificateData.Data); + + writer.WriteString("Length", certificateData.Length); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs b/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs index 92c9021..e1deea9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs @@ -1,304 +1,1523 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - /// Enumeration contains identifiers which determinate the single document element authenticity check outcome reason - public class CheckDiagnose + /// + /// Enumeration contains identifiers which determinate the single document element authenticity check outcome reason: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/check-diagnose/ + /// + /// Enumeration contains identifiers which determinate the single document element authenticity check outcome reason: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/check-diagnose/ + public enum CheckDiagnose { + /// + /// Enum UNKNOWN for value: 0 + /// + UNKNOWN = 0, + + /// + /// Enum PASS for value: 1 + /// + PASS = 1, + + /// + /// Enum INVALID_INPUT_DATA for value: 2 + /// + INVALID_INPUT_DATA = 2, + + /// + /// Enum INTERNAL_ERROR for value: 3 + /// + INTERNAL_ERROR = 3, + + /// + /// Enum EXCEPTION_IN_MODULE for value: 4 + /// + EXCEPTION_IN_MODULE = 4, + + /// + /// Enum UNCERTAIN_VERIFICATION for value: 5 + /// + UNCERTAIN_VERIFICATION = 5, + + /// + /// Enum NECESSARY_IMAGE_NOT_FOUND for value: 7 + /// + NECESSARY_IMAGE_NOT_FOUND = 7, + + /// + /// Enum PHOTO_SIDES_NOT_FOUND for value: 8 + /// + PHOTO_SIDES_NOT_FOUND = 8, + + /// + /// Enum INVALID_CHECKSUM for value: 10 + /// + INVALID_CHECKSUM = 10, + + /// + /// Enum SYNTAX_ERROR for value: 11 + /// + SYNTAX_ERROR = 11, + + /// + /// Enum LOGIC_ERROR for value: 12 + /// + LOGIC_ERROR = 12, + + /// + /// Enum SOURCES_COMPARISON_ERROR for value: 13 + /// + SOURCES_COMPARISON_ERROR = 13, + + /// + /// Enum FIELDS_COMPARISON_LOGIC_ERROR for value: 14 + /// + FIELDS_COMPARISON_LOGIC_ERROR = 14, + + /// + /// Enum INVALID_FIELD_FORMAT for value: 15 + /// + INVALID_FIELD_FORMAT = 15, + + /// + /// Enum TRUE_LUMINESCENCE_ERROR for value: 20 + /// + TRUE_LUMINESCENCE_ERROR = 20, + + /// + /// Enum FALSE_LUMINESCENCE_ERROR for value: 21 + /// + FALSE_LUMINESCENCE_ERROR = 21, + + /// + /// Enum FIXED_PATTERN_ERROR for value: 22 + /// + FIXED_PATTERN_ERROR = 22, + + /// + /// Enum LOW_CONTRAST_IN_IR_LIGHT for value: 23 + /// + LOW_CONTRAST_IN_IR_LIGHT = 23, + + /// + /// Enum INCORRECT_BACKGROUND_LIGHT for value: 24 + /// + INCORRECT_BACKGROUND_LIGHT = 24, + + /// + /// Enum BACKGROUND_COMPARISON_ERROR for value: 25 + /// + BACKGROUND_COMPARISON_ERROR = 25, + + /// + /// Enum INCORRECT_TEXT_COLOR for value: 26 + /// + INCORRECT_TEXT_COLOR = 26, + + /// + /// Enum PHOTO_FALSE_LUMINESCENCE for value: 27 + /// + PHOTO_FALSE_LUMINESCENCE = 27, + + /// + /// Enum TOO_MUCH_SHIFT for value: 28 + /// + TOO_MUCH_SHIFT = 28, + + /// + /// Enum CONTACT_CHIP_TYPE_MISMATCH for value: 29 + /// + CONTACT_CHIP_TYPE_MISMATCH = 29, + + /// + /// Enum FIBERS_NOT_FOUND for value: 30 + /// + FIBERS_NOT_FOUND = 30, + + /// + /// Enum TOO_MANY_OBJECTS for value: 31 + /// + TOO_MANY_OBJECTS = 31, + + /// + /// Enum SPECKS_IN_UV for value: 33 + /// + SPECKS_IN_UV = 33, + + /// + /// Enum TOO_LOW_RESOLUTION for value: 34 + /// + TOO_LOW_RESOLUTION = 34, + + /// + /// Enum INVISIBLE_ELEMENT_PRESENT for value: 40 + /// + INVISIBLE_ELEMENT_PRESENT = 40, + + /// + /// Enum VISIBLE_ELEMENT_ABSENT for value: 41 + /// + VISIBLE_ELEMENT_ABSENT = 41, + + /// + /// Enum ELEMENT_SHOULD_BE_COLORED for value: 42 + /// + ELEMENT_SHOULD_BE_COLORED = 42, + + /// + /// Enum ELEMENT_SHOULD_BE_GRAYSCALE for value: 43 + /// + ELEMENT_SHOULD_BE_GRAYSCALE = 43, + + /// + /// Enum PHOTO_WHITE_IR_DONT_MATCH for value: 44 + /// + PHOTO_WHITE_IR_DONT_MATCH = 44, + + /// + /// Enum UV_DULL_PAPER_MRZ for value: 50 + /// + UV_DULL_PAPER_MRZ = 50, + + /// + /// Enum FALSE_LUMINESCENCE_IN_MRZ for value: 51 + /// + FALSE_LUMINESCENCE_IN_MRZ = 51, + + /// + /// Enum UV_DULL_PAPER_PHOTO for value: 52 + /// + UV_DULL_PAPER_PHOTO = 52, + + /// + /// Enum UV_DULL_PAPER_BLANK for value: 53 + /// + UV_DULL_PAPER_BLANK = 53, + + /// + /// Enum UV_DULL_PAPER_ERROR for value: 54 + /// + UV_DULL_PAPER_ERROR = 54, + + /// + /// Enum FALSE_LUMINESCENCE_IN_BLANK for value: 55 + /// + FALSE_LUMINESCENCE_IN_BLANK = 55, + + /// + /// Enum BAD_AREA_IN_AXIAL for value: 60 + /// + BAD_AREA_IN_AXIAL = 60, + + /// + /// Enum FALSE_IPI_PARAMETERS for value: 65 + /// + FALSE_IPI_PARAMETERS = 65, + + /// + /// Enum ENCRYPTED_IPI_NOT_FOUND for value: 66 + /// + ENCRYPTED_IPI_NOT_FOUND = 66, + + /// + /// Enum ENCRYPTED_IPI_DATA_DONT_MATCH for value: 67 + /// + ENCRYPTED_IPI_DATA_DONT_MATCH = 67, + + /// + /// Enum FIELD_POS_CORRECTOR_HIGHLIGHT_IR for value: 80 + /// + FIELD_POS_CORRECTOR_HIGHLIGHT_IR = 80, + + /// + /// Enum FIELD_POS_CORRECTOR_GLARES_IN_PHOTO_AREA for value: 81 + /// + FIELD_POS_CORRECTOR_GLARES_IN_PHOTO_AREA = 81, + + /// + /// Enum FIELD_POS_CORRECTOR_PHOTO_REPLACED for value: 82 + /// + FIELD_POS_CORRECTOR_PHOTO_REPLACED = 82, + + /// + /// Enum FIELD_POS_CORRECTOR_LANDMARKS_CHECK_ERROR for value: 83 + /// + FIELD_POS_CORRECTOR_LANDMARKS_CHECK_ERROR = 83, + + /// + /// Enum FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR for value: 84 + /// + FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR = 84, + + /// + /// Enum FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR for value: 85 + /// + FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR = 85, + + /// + /// Enum FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION for value: 86 + /// + FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION = 86, + + /// + /// Enum OVI_IR_INVISIBLE for value: 90 + /// + OVI_IR_INVISIBLE = 90, + + /// + /// Enum OVI_INSUFFICIENT_AREA for value: 91 + /// + OVI_INSUFFICIENT_AREA = 91, + + /// + /// Enum OVI_COLOR_INVARIABLE for value: 92 + /// + OVI_COLOR_INVARIABLE = 92, + + /// + /// Enum OVI_BAD_COLOR_FRONT for value: 93 + /// + OVI_BAD_COLOR_FRONT = 93, + + /// + /// Enum OVI_BAD_COLOR_SIDE for value: 94 + /// + OVI_BAD_COLOR_SIDE = 94, + + /// + /// Enum OVI_WIDE_COLOR_SPREAD for value: 95 + /// + OVI_WIDE_COLOR_SPREAD = 95, + + /// + /// Enum OVI_BAD_COLOR_PERCENT for value: 96 + /// + OVI_BAD_COLOR_PERCENT = 96, + + /// + /// Enum HOLOGRAM_ELEMENT_ABSENT for value: 100 + /// + HOLOGRAM_ELEMENT_ABSENT = 100, + + /// + /// Enum HOLOGRAM_SIDE_TOP_IMAGES_ABSENT for value: 101 + /// + HOLOGRAM_SIDE_TOP_IMAGES_ABSENT = 101, + + /// + /// Enum HOLOGRAM_ELEMENT_PRESENT for value: 102 + /// + HOLOGRAM_ELEMENT_PRESENT = 102, + + /// + /// Enum HOLOGRAM_FRAMES_IS_ABSENT for value: 103 + /// + HOLOGRAM_FRAMES_IS_ABSENT = 103, + + /// + /// Enum HOLOGRAM_HOLO_FIELD_IS_ABSENT for value: 104 + /// + HOLOGRAM_HOLO_FIELD_IS_ABSENT = 104, + + /// + /// Enum PHOTO_PATTERN_INTERRUPTED for value: 110 + /// + PHOTO_PATTERN_INTERRUPTED = 110, + + /// + /// Enum PHOTO_PATTERN_SHIFTED for value: 111 + /// + PHOTO_PATTERN_SHIFTED = 111, + + /// + /// Enum PHOTO_PATTERN_DIFFERENT_COLORS for value: 112 + /// + PHOTO_PATTERN_DIFFERENT_COLORS = 112, + + /// + /// Enum PHOTO_PATTERN_IR_VISIBLE for value: 113 + /// + PHOTO_PATTERN_IR_VISIBLE = 113, + + /// + /// Enum PHOTO_PATTERN_NOT_INTERSECT for value: 114 + /// + PHOTO_PATTERN_NOT_INTERSECT = 114, + + /// + /// Enum PHOTO_SIZE_IS_WRONG for value: 115 + /// + PHOTO_SIZE_IS_WRONG = 115, + + /// + /// Enum PHOTO_PATTERN_INVALID_COLOR for value: 116 + /// + PHOTO_PATTERN_INVALID_COLOR = 116, + + /// + /// Enum PHOTO_PATTERN_SHIFTED_VERT for value: 117 + /// + PHOTO_PATTERN_SHIFTED_VERT = 117, + + /// + /// Enum PHOTO_PATTERN_PATTERN_NOT_FOUND for value: 118 + /// + PHOTO_PATTERN_PATTERN_NOT_FOUND = 118, + + /// + /// Enum PHOTO_PATTERN_DIFFERENT_LINES_THICKNESS for value: 119 + /// + PHOTO_PATTERN_DIFFERENT_LINES_THICKNESS = 119, + + /// + /// Enum PHOTO_IS_NOT_RECTANGLE for value: 120 + /// + PHOTO_IS_NOT_RECTANGLE = 120, + + /// + /// Enum PHOTO_CORNERS_IS_WRONG for value: 121 + /// + PHOTO_CORNERS_IS_WRONG = 121, + + /// + /// Enum DOCUMENT_IS_CANCELLING for value: 122 + /// + DOCUMENT_IS_CANCELLING = 122, + + /// + /// Enum TEXT_COLOR_SHOULD_BE_BLUE for value: 130 + /// + TEXT_COLOR_SHOULD_BE_BLUE = 130, + + /// + /// Enum TEXT_COLOR_SHOULD_BE_GREEN for value: 131 + /// + TEXT_COLOR_SHOULD_BE_GREEN = 131, + + /// + /// Enum TEXT_COLOR_SHOULD_BE_RED for value: 132 + /// + TEXT_COLOR_SHOULD_BE_RED = 132, + + /// + /// Enum TEXT_SHOULD_BE_BLACK for value: 133 + /// + TEXT_SHOULD_BE_BLACK = 133, + + /// + /// Enum BARCODE_WAS_READ_WITH_ERRORS for value: 140 + /// + BARCODE_WAS_READ_WITH_ERRORS = 140, + + /// + /// Enum BARCODE_DATA_FORMAT_ERROR for value: 141 + /// + BARCODE_DATA_FORMAT_ERROR = 141, + + /// + /// Enum BARCODE_SIZE_PARAMS_ERROR for value: 142 + /// + BARCODE_SIZE_PARAMS_ERROR = 142, + + /// + /// Enum NOT_ALL_BARCODES_READ for value: 143 + /// + NOT_ALL_BARCODES_READ = 143, + + /// + /// Enum GLARES_IN_BARCODE_AREA for value: 144 + /// + GLARES_IN_BARCODE_AREA = 144, + + /// + /// Enum NO_CERTIFICATE_FOR_DIGITAL_SIGNATURE_CHECK for value: 145 + /// + NO_CERTIFICATE_FOR_DIGITAL_SIGNATURE_CHECK = 145, + + /// + /// Enum PORTRAIT_COMPARISON_PORTRAITS_DIFFER for value: 150 + /// + PORTRAIT_COMPARISON_PORTRAITS_DIFFER = 150, + + /// + /// Enum PORTRAIT_COMPARISON_NO_SERVICE_REPLY for value: 151 + /// + PORTRAIT_COMPARISON_NO_SERVICE_REPLY = 151, + + /// + /// Enum PORTRAIT_COMPARISON_SERVICE_ERROR for value: 152 + /// + PORTRAIT_COMPARISON_SERVICE_ERROR = 152, + + /// + /// Enum PORTRAIT_COMPARISON_NOT_ENOUGH_IMAGES for value: 153 + /// + PORTRAIT_COMPARISON_NOT_ENOUGH_IMAGES = 153, + + /// + /// Enum PORTRAIT_COMPARISON_NO_LIVE_PHOTO for value: 154 + /// + PORTRAIT_COMPARISON_NO_LIVE_PHOTO = 154, + + /// + /// Enum PORTRAIT_COMPARISON_NO_SERVICE_LICENSE for value: 155 + /// + PORTRAIT_COMPARISON_NO_SERVICE_LICENSE = 155, + + /// + /// Enum PORTRAIT_COMPARISON_NO_PORTRAIT_DETECTED for value: 156 + /// + PORTRAIT_COMPARISON_NO_PORTRAIT_DETECTED = 156, + + /// + /// Enum MOBILE_IMAGES_UNSUITABLE_LIGHT_CONDITIONS for value: 160 + /// + MOBILE_IMAGES_UNSUITABLE_LIGHT_CONDITIONS = 160, + + /// + /// Enum MOBILE_IMAGES_WHITE_UV_NO_DIFFERENCE for value: 161 + /// + MOBILE_IMAGES_WHITE_UV_NO_DIFFERENCE = 161, + + /// + /// Enum FINGERPRINTS_COMPARISON_MISMATCH for value: 170 + /// + FINGERPRINTS_COMPARISON_MISMATCH = 170, + + /// + /// Enum HOLO_PHOTO_FACE_NOT_DETECTED for value: 180 + /// + HOLO_PHOTO_FACE_NOT_DETECTED = 180, + + /// + /// Enum HOLO_PHOTO_FACE_COMPARISON_FAILED for value: 181 + /// + HOLO_PHOTO_FACE_COMPARISON_FAILED = 181, + + /// + /// Enum HOLO_PHOTO_GLARE_IN_CENTER_ABSENT for value: 182 + /// + HOLO_PHOTO_GLARE_IN_CENTER_ABSENT = 182, + + /// + /// Enum HOLO_PHOTO_HOLO_ELEMENT_SHAPE_ERROR for value: 183 + /// + HOLO_PHOTO_HOLO_ELEMENT_SHAPE_ERROR = 183, + + /// + /// Enum HOLO_PHOTO_ALGORITHMS_STEPS_ERROR for value: 184 + /// + HOLO_PHOTO_ALGORITHMS_STEPS_ERROR = 184, + + /// + /// Enum HOLO_PHOTO_HOLO_AREAS_NOT_LOADED for value: 185 + /// + HOLO_PHOTO_HOLO_AREAS_NOT_LOADED = 185, + + /// + /// Enum HOLO_PHOTO_FINISHED_BY_TIMEOUT for value: 186 + /// + HOLO_PHOTO_FINISHED_BY_TIMEOUT = 186, + + /// + /// Enum HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME for value: 187 + /// + HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME = 187, + + /// + /// Enum LIVENESS_DEPTH_CHECK_FAILED for value: 190 + /// + LIVENESS_DEPTH_CHECK_FAILED = 190, + + /// + /// Enum MRZ_QUALITY_WRONG_SYMBOL_POSITION for value: 200 + /// + MRZ_QUALITY_WRONG_SYMBOL_POSITION = 200, + + /// + /// Enum MRZ_QUALITY_WRONG_BACKGROUND for value: 201 + /// + MRZ_QUALITY_WRONG_BACKGROUND = 201, + + /// + /// Enum MRZ_QUALITY_WRONG_MRZ_WIDTH for value: 202 + /// + MRZ_QUALITY_WRONG_MRZ_WIDTH = 202, + + /// + /// Enum MRZ_QUALITY_WRONG_MRZ_HEIGHT for value: 203 + /// + MRZ_QUALITY_WRONG_MRZ_HEIGHT = 203, + + /// + /// Enum MRZ_QUALITY_WRONG_LINE_POSITION for value: 204 + /// + MRZ_QUALITY_WRONG_LINE_POSITION = 204, + + /// + /// Enum MRZ_QUALITY_WRONG_FONT_TYPE for value: 205 + /// + MRZ_QUALITY_WRONG_FONT_TYPE = 205, + + /// + /// Enum OCR_QUALITY_TEXT_POSITION for value: 220 + /// + OCR_QUALITY_TEXT_POSITION = 220, + + /// + /// Enum OCR_QUALITY_INVALID_FONT for value: 221 + /// + OCR_QUALITY_INVALID_FONT = 221, + + /// + /// Enum OCR_QUALITY_INVALID_BACKGROUND for value: 222 + /// + OCR_QUALITY_INVALID_BACKGROUND = 222, + + /// + /// Enum LASINK_INVALID_LINES_FREQUENCY for value: 230 + /// + LASINK_INVALID_LINES_FREQUENCY = 230, + + /// + /// Enum DOC_LIVENESS_DOCUMENT_NOT_LIVE for value: 238 + /// + DOC_LIVENESS_DOCUMENT_NOT_LIVE = 238, + + /// + /// Enum DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED for value: 239 + /// + DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED = 239, + + /// + /// Enum DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED for value: 240 + /// + DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED = 240, + + /// + /// Enum DOC_LIVENESS_INVALID_BARCODE_BACKGROUND for value: 241 + /// + DOC_LIVENESS_INVALID_BARCODE_BACKGROUND = 241, + + /// + /// Enum CHD_ICAO_IDB_BASE32_ERROR for value: 243 + /// + CHD_ICAO_IDB_BASE32_ERROR = 243, + + /// + /// Enum CHD_ICAO_IDB_ZIPPED_ERROR for value: 244 + /// + CHD_ICAO_IDB_ZIPPED_ERROR = 244, + + /// + /// Enum CHD_ICAO_IDB_MESSAGE_ZONE_EMPTY for value: 245 + /// + CHD_ICAO_IDB_MESSAGE_ZONE_EMPTY = 245, + + /// + /// Enum CHD_ICAO_IDB_SIGNATURE_MUST_BE_PRESENT for value: 246 + /// + CHD_ICAO_IDB_SIGNATURE_MUST_BE_PRESENT = 246, + + /// + /// Enum CHD_ICAO_IDB_SIGNATURE_MUST_NOT_BE_PRESENT for value: 247 + /// + CHD_ICAO_IDB_SIGNATURE_MUST_NOT_BE_PRESENT = 247, + + /// + /// Enum CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT for value: 248 + /// + CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT = 248, + + /// + /// Enum CHD_INCORRECT_OBJECT_COLOR for value: 250 + /// + CHD_INCORRECT_OBJECT_COLOR = 250 + } + + /// + /// Converts to and from the JSON value + /// + public static class CheckDiagnoseValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static CheckDiagnose FromString(string value) + { + if (value.Equals((0).ToString())) + return CheckDiagnose.UNKNOWN; + + if (value.Equals((1).ToString())) + return CheckDiagnose.PASS; + + if (value.Equals((2).ToString())) + return CheckDiagnose.INVALID_INPUT_DATA; + + if (value.Equals((3).ToString())) + return CheckDiagnose.INTERNAL_ERROR; + + if (value.Equals((4).ToString())) + return CheckDiagnose.EXCEPTION_IN_MODULE; + + if (value.Equals((5).ToString())) + return CheckDiagnose.UNCERTAIN_VERIFICATION; + + if (value.Equals((7).ToString())) + return CheckDiagnose.NECESSARY_IMAGE_NOT_FOUND; + + if (value.Equals((8).ToString())) + return CheckDiagnose.PHOTO_SIDES_NOT_FOUND; + + if (value.Equals((10).ToString())) + return CheckDiagnose.INVALID_CHECKSUM; + + if (value.Equals((11).ToString())) + return CheckDiagnose.SYNTAX_ERROR; + + if (value.Equals((12).ToString())) + return CheckDiagnose.LOGIC_ERROR; + + if (value.Equals((13).ToString())) + return CheckDiagnose.SOURCES_COMPARISON_ERROR; + + if (value.Equals((14).ToString())) + return CheckDiagnose.FIELDS_COMPARISON_LOGIC_ERROR; + + if (value.Equals((15).ToString())) + return CheckDiagnose.INVALID_FIELD_FORMAT; + + if (value.Equals((20).ToString())) + return CheckDiagnose.TRUE_LUMINESCENCE_ERROR; + + if (value.Equals((21).ToString())) + return CheckDiagnose.FALSE_LUMINESCENCE_ERROR; + + if (value.Equals((22).ToString())) + return CheckDiagnose.FIXED_PATTERN_ERROR; + + if (value.Equals((23).ToString())) + return CheckDiagnose.LOW_CONTRAST_IN_IR_LIGHT; + + if (value.Equals((24).ToString())) + return CheckDiagnose.INCORRECT_BACKGROUND_LIGHT; + + if (value.Equals((25).ToString())) + return CheckDiagnose.BACKGROUND_COMPARISON_ERROR; + + if (value.Equals((26).ToString())) + return CheckDiagnose.INCORRECT_TEXT_COLOR; + + if (value.Equals((27).ToString())) + return CheckDiagnose.PHOTO_FALSE_LUMINESCENCE; + + if (value.Equals((28).ToString())) + return CheckDiagnose.TOO_MUCH_SHIFT; + + if (value.Equals((29).ToString())) + return CheckDiagnose.CONTACT_CHIP_TYPE_MISMATCH; + + if (value.Equals((30).ToString())) + return CheckDiagnose.FIBERS_NOT_FOUND; + + if (value.Equals((31).ToString())) + return CheckDiagnose.TOO_MANY_OBJECTS; + + if (value.Equals((33).ToString())) + return CheckDiagnose.SPECKS_IN_UV; + + if (value.Equals((34).ToString())) + return CheckDiagnose.TOO_LOW_RESOLUTION; + + if (value.Equals((40).ToString())) + return CheckDiagnose.INVISIBLE_ELEMENT_PRESENT; + + if (value.Equals((41).ToString())) + return CheckDiagnose.VISIBLE_ELEMENT_ABSENT; + + if (value.Equals((42).ToString())) + return CheckDiagnose.ELEMENT_SHOULD_BE_COLORED; + + if (value.Equals((43).ToString())) + return CheckDiagnose.ELEMENT_SHOULD_BE_GRAYSCALE; + + if (value.Equals((44).ToString())) + return CheckDiagnose.PHOTO_WHITE_IR_DONT_MATCH; + + if (value.Equals((50).ToString())) + return CheckDiagnose.UV_DULL_PAPER_MRZ; + + if (value.Equals((51).ToString())) + return CheckDiagnose.FALSE_LUMINESCENCE_IN_MRZ; + + if (value.Equals((52).ToString())) + return CheckDiagnose.UV_DULL_PAPER_PHOTO; + + if (value.Equals((53).ToString())) + return CheckDiagnose.UV_DULL_PAPER_BLANK; + + if (value.Equals((54).ToString())) + return CheckDiagnose.UV_DULL_PAPER_ERROR; + + if (value.Equals((55).ToString())) + return CheckDiagnose.FALSE_LUMINESCENCE_IN_BLANK; + + if (value.Equals((60).ToString())) + return CheckDiagnose.BAD_AREA_IN_AXIAL; + + if (value.Equals((65).ToString())) + return CheckDiagnose.FALSE_IPI_PARAMETERS; + + if (value.Equals((66).ToString())) + return CheckDiagnose.ENCRYPTED_IPI_NOT_FOUND; + + if (value.Equals((67).ToString())) + return CheckDiagnose.ENCRYPTED_IPI_DATA_DONT_MATCH; + + if (value.Equals((80).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_HIGHLIGHT_IR; + + if (value.Equals((81).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_GLARES_IN_PHOTO_AREA; + + if (value.Equals((82).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_PHOTO_REPLACED; + + if (value.Equals((83).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_LANDMARKS_CHECK_ERROR; + + if (value.Equals((84).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR; + + if (value.Equals((85).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR; + + if (value.Equals((86).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION; + + if (value.Equals((90).ToString())) + return CheckDiagnose.OVI_IR_INVISIBLE; + + if (value.Equals((91).ToString())) + return CheckDiagnose.OVI_INSUFFICIENT_AREA; + + if (value.Equals((92).ToString())) + return CheckDiagnose.OVI_COLOR_INVARIABLE; + + if (value.Equals((93).ToString())) + return CheckDiagnose.OVI_BAD_COLOR_FRONT; + + if (value.Equals((94).ToString())) + return CheckDiagnose.OVI_BAD_COLOR_SIDE; + + if (value.Equals((95).ToString())) + return CheckDiagnose.OVI_WIDE_COLOR_SPREAD; + + if (value.Equals((96).ToString())) + return CheckDiagnose.OVI_BAD_COLOR_PERCENT; + + if (value.Equals((100).ToString())) + return CheckDiagnose.HOLOGRAM_ELEMENT_ABSENT; + + if (value.Equals((101).ToString())) + return CheckDiagnose.HOLOGRAM_SIDE_TOP_IMAGES_ABSENT; + + if (value.Equals((102).ToString())) + return CheckDiagnose.HOLOGRAM_ELEMENT_PRESENT; + + if (value.Equals((103).ToString())) + return CheckDiagnose.HOLOGRAM_FRAMES_IS_ABSENT; + + if (value.Equals((104).ToString())) + return CheckDiagnose.HOLOGRAM_HOLO_FIELD_IS_ABSENT; + + if (value.Equals((110).ToString())) + return CheckDiagnose.PHOTO_PATTERN_INTERRUPTED; + + if (value.Equals((111).ToString())) + return CheckDiagnose.PHOTO_PATTERN_SHIFTED; + + if (value.Equals((112).ToString())) + return CheckDiagnose.PHOTO_PATTERN_DIFFERENT_COLORS; + + if (value.Equals((113).ToString())) + return CheckDiagnose.PHOTO_PATTERN_IR_VISIBLE; + + if (value.Equals((114).ToString())) + return CheckDiagnose.PHOTO_PATTERN_NOT_INTERSECT; + + if (value.Equals((115).ToString())) + return CheckDiagnose.PHOTO_SIZE_IS_WRONG; + + if (value.Equals((116).ToString())) + return CheckDiagnose.PHOTO_PATTERN_INVALID_COLOR; + + if (value.Equals((117).ToString())) + return CheckDiagnose.PHOTO_PATTERN_SHIFTED_VERT; + + if (value.Equals((118).ToString())) + return CheckDiagnose.PHOTO_PATTERN_PATTERN_NOT_FOUND; + + if (value.Equals((119).ToString())) + return CheckDiagnose.PHOTO_PATTERN_DIFFERENT_LINES_THICKNESS; + + if (value.Equals((120).ToString())) + return CheckDiagnose.PHOTO_IS_NOT_RECTANGLE; + + if (value.Equals((121).ToString())) + return CheckDiagnose.PHOTO_CORNERS_IS_WRONG; + + if (value.Equals((122).ToString())) + return CheckDiagnose.DOCUMENT_IS_CANCELLING; + + if (value.Equals((130).ToString())) + return CheckDiagnose.TEXT_COLOR_SHOULD_BE_BLUE; + + if (value.Equals((131).ToString())) + return CheckDiagnose.TEXT_COLOR_SHOULD_BE_GREEN; - - public const int UNKNOWN = 0; + if (value.Equals((132).ToString())) + return CheckDiagnose.TEXT_COLOR_SHOULD_BE_RED; - - public const int PASS = 1; + if (value.Equals((133).ToString())) + return CheckDiagnose.TEXT_SHOULD_BE_BLACK; - - public const int INVALID_INPUT_DATA = 2; + if (value.Equals((140).ToString())) + return CheckDiagnose.BARCODE_WAS_READ_WITH_ERRORS; - - public const int INTERNAL_ERROR = 3; + if (value.Equals((141).ToString())) + return CheckDiagnose.BARCODE_DATA_FORMAT_ERROR; - - public const int EXCEPTION_IN_MODULE = 4; + if (value.Equals((142).ToString())) + return CheckDiagnose.BARCODE_SIZE_PARAMS_ERROR; - - public const int UNCERTAIN_VERIFICATION = 5; + if (value.Equals((143).ToString())) + return CheckDiagnose.NOT_ALL_BARCODES_READ; - - public const int NECESSARY_IMAGE_NOT_FOUND = 7; + if (value.Equals((144).ToString())) + return CheckDiagnose.GLARES_IN_BARCODE_AREA; - - public const int PHOTO_SIDES_NOT_FOUND = 8; + if (value.Equals((145).ToString())) + return CheckDiagnose.NO_CERTIFICATE_FOR_DIGITAL_SIGNATURE_CHECK; - - public const int INVALID_CHECKSUM = 10; + if (value.Equals((150).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_PORTRAITS_DIFFER; - - public const int SYNTAX_ERROR = 11; + if (value.Equals((151).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NO_SERVICE_REPLY; - - public const int LOGIC_ERROR = 12; + if (value.Equals((152).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_SERVICE_ERROR; - - public const int SOURCES_COMPARISON_ERROR = 13; + if (value.Equals((153).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NOT_ENOUGH_IMAGES; - - public const int FIELDS_COMPARISON_LOGIC_ERROR = 14; + if (value.Equals((154).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NO_LIVE_PHOTO; - - public const int INVALID_FIELD_FORMAT = 15; + if (value.Equals((155).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NO_SERVICE_LICENSE; - - public const int TRUE_LUMINESCENCE_ERROR = 20; + if (value.Equals((156).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NO_PORTRAIT_DETECTED; - - public const int FALSE_LUMINESCENCE_ERROR = 21; + if (value.Equals((160).ToString())) + return CheckDiagnose.MOBILE_IMAGES_UNSUITABLE_LIGHT_CONDITIONS; - - public const int FIXED_PATTERN_ERROR = 22; + if (value.Equals((161).ToString())) + return CheckDiagnose.MOBILE_IMAGES_WHITE_UV_NO_DIFFERENCE; - - public const int LOW_CONTRAST_IN_IR_LIGHT = 23; + if (value.Equals((170).ToString())) + return CheckDiagnose.FINGERPRINTS_COMPARISON_MISMATCH; - - public const int INCORRECT_BACKGROUND_LIGHT = 24; + if (value.Equals((180).ToString())) + return CheckDiagnose.HOLO_PHOTO_FACE_NOT_DETECTED; - - public const int BACKGROUND_COMPARISON_ERROR = 25; + if (value.Equals((181).ToString())) + return CheckDiagnose.HOLO_PHOTO_FACE_COMPARISON_FAILED; - - public const int INCORRECT_TEXT_COLOR = 26; + if (value.Equals((182).ToString())) + return CheckDiagnose.HOLO_PHOTO_GLARE_IN_CENTER_ABSENT; - - public const int PHOTO_FALSE_LUMINESCENCE = 27; + if (value.Equals((183).ToString())) + return CheckDiagnose.HOLO_PHOTO_HOLO_ELEMENT_SHAPE_ERROR; - - public const int TOO_MUCH_SHIFT = 28; + if (value.Equals((184).ToString())) + return CheckDiagnose.HOLO_PHOTO_ALGORITHMS_STEPS_ERROR; - - public const int FIBERS_NOT_FOUND = 30; + if (value.Equals((185).ToString())) + return CheckDiagnose.HOLO_PHOTO_HOLO_AREAS_NOT_LOADED; - - public const int TOO_MANY_OBJECTS = 31; + if (value.Equals((186).ToString())) + return CheckDiagnose.HOLO_PHOTO_FINISHED_BY_TIMEOUT; - - public const int SPECKS_IN_UV = 33; + if (value.Equals((187).ToString())) + return CheckDiagnose.HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME; - - public const int TOO_LOW_RESOLUTION = 34; + if (value.Equals((190).ToString())) + return CheckDiagnose.LIVENESS_DEPTH_CHECK_FAILED; - - public const int INVISIBLE_ELEMENT_PRESENT = 40; + if (value.Equals((200).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_SYMBOL_POSITION; - - public const int VISIBLE_ELEMENT_ABSENT = 41; + if (value.Equals((201).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_BACKGROUND; - - public const int ELEMENT_SHOULD_BE_COLORED = 42; + if (value.Equals((202).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_MRZ_WIDTH; - - public const int ELEMENT_SHOULD_BE_GRAYSCALE = 43; + if (value.Equals((203).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_MRZ_HEIGHT; - - public const int PHOTO_WHITE_IR_DONT_MATCH = 44; + if (value.Equals((204).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_LINE_POSITION; - - public const int UV_DULL_PAPER_MRZ = 50; + if (value.Equals((205).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_FONT_TYPE; - - public const int FALSE_LUMINESCENCE_IN_MRZ = 51; + if (value.Equals((220).ToString())) + return CheckDiagnose.OCR_QUALITY_TEXT_POSITION; - - public const int UV_DULL_PAPER_PHOTO = 52; + if (value.Equals((221).ToString())) + return CheckDiagnose.OCR_QUALITY_INVALID_FONT; - - public const int UV_DULL_PAPER_BLANK = 53; + if (value.Equals((222).ToString())) + return CheckDiagnose.OCR_QUALITY_INVALID_BACKGROUND; - - public const int UV_DULL_PAPER_ERROR = 54; + if (value.Equals((230).ToString())) + return CheckDiagnose.LASINK_INVALID_LINES_FREQUENCY; - - public const int FALSE_LUMINESCENCE_IN_BLANK = 55; + if (value.Equals((238).ToString())) + return CheckDiagnose.DOC_LIVENESS_DOCUMENT_NOT_LIVE; - - public const int BAD_AREA_IN_AXIAL = 60; + if (value.Equals((239).ToString())) + return CheckDiagnose.DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED; - - public const int FALSE_IP_PARAMETERS = 65; + if (value.Equals((240).ToString())) + return CheckDiagnose.DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED; - - public const int FIELD_POS_CORRECTOR_HIGHLIGHT_IR = 80; + if (value.Equals((241).ToString())) + return CheckDiagnose.DOC_LIVENESS_INVALID_BARCODE_BACKGROUND; - - public const int OVI_IR_INVISIBLE = 90; + if (value.Equals((243).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_BASE32_ERROR; - - public const int OVI_INSUFFICIENT_AREA = 91; + if (value.Equals((244).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_ZIPPED_ERROR; - - public const int OVI_COLOR_INVARIABLE = 92; + if (value.Equals((245).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_MESSAGE_ZONE_EMPTY; - - public const int OVI_BAD_COLOR_FRONT = 93; + if (value.Equals((246).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_SIGNATURE_MUST_BE_PRESENT; - - public const int OVI_BAD_COLOR_SIDE = 94; + if (value.Equals((247).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_SIGNATURE_MUST_NOT_BE_PRESENT; - - public const int OVI_WIDE_COLOR_SPREAD = 95; + if (value.Equals((248).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT; - - public const int OVI_BAD_COLOR_PERCENT = 96; + if (value.Equals((250).ToString())) + return CheckDiagnose.CHD_INCORRECT_OBJECT_COLOR; - - public const int HOLOGRAM_ELEMENT_ABSENT = 100; + throw new NotImplementedException($"Could not convert value to type CheckDiagnose: '{value}'"); + } - - public const int HOLOGRAM_SIDE_TOP_IMAGES_ABSENT = 101; + /// + /// Parses a given value to + /// + /// + /// + public static CheckDiagnose? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return CheckDiagnose.UNKNOWN; - - public const int HOLOGRAM_ELEMENT_PRESENT = 102; + if (value.Equals((1).ToString())) + return CheckDiagnose.PASS; - - public const int PHOTO_PATTERN_INTERRUPTED = 110; + if (value.Equals((2).ToString())) + return CheckDiagnose.INVALID_INPUT_DATA; - - public const int PHOTO_PATTERN_SHIFTED = 111; + if (value.Equals((3).ToString())) + return CheckDiagnose.INTERNAL_ERROR; - - public const int PHOTO_PATTERN_DIFFERENT_COLORS = 112; + if (value.Equals((4).ToString())) + return CheckDiagnose.EXCEPTION_IN_MODULE; - - public const int PHOTO_PATTERN_IR_VISIBLE = 113; + if (value.Equals((5).ToString())) + return CheckDiagnose.UNCERTAIN_VERIFICATION; - - public const int PHOTO_PATTERN_NOT_INTERSECT = 114; + if (value.Equals((7).ToString())) + return CheckDiagnose.NECESSARY_IMAGE_NOT_FOUND; - - public const int PHOTO_SIZE_IS_WRONG = 115; + if (value.Equals((8).ToString())) + return CheckDiagnose.PHOTO_SIDES_NOT_FOUND; - - public const int PHOTO_PATTERN_INVALID_COLOR = 116; + if (value.Equals((10).ToString())) + return CheckDiagnose.INVALID_CHECKSUM; - - public const int PHOTO_PATTERN_SHIFTED_VERT = 117; + if (value.Equals((11).ToString())) + return CheckDiagnose.SYNTAX_ERROR; - - public const int PHOTO_PATTERN_PATTERN_NOT_FOUND = 118; + if (value.Equals((12).ToString())) + return CheckDiagnose.LOGIC_ERROR; - - public const int PHOTO_PATTERN_DIFFERENT_LINES_THICKNESS = 119; + if (value.Equals((13).ToString())) + return CheckDiagnose.SOURCES_COMPARISON_ERROR; - - public const int PHOTO_IS_NOT_RECTANGLE = 120; + if (value.Equals((14).ToString())) + return CheckDiagnose.FIELDS_COMPARISON_LOGIC_ERROR; - - public const int PHOTO_CORNERS_IS_WRONG = 121; + if (value.Equals((15).ToString())) + return CheckDiagnose.INVALID_FIELD_FORMAT; - - public const int TEXT_COLOR_SHOULD_BE_BLUE = 130; + if (value.Equals((20).ToString())) + return CheckDiagnose.TRUE_LUMINESCENCE_ERROR; - - public const int TEXT_COLOR_SHOULD_BE_GREEN = 131; + if (value.Equals((21).ToString())) + return CheckDiagnose.FALSE_LUMINESCENCE_ERROR; - - public const int TEXT_COLOR_SHOULD_BE_RED = 132; + if (value.Equals((22).ToString())) + return CheckDiagnose.FIXED_PATTERN_ERROR; - - public const int TEXT_SHOULD_BE_BLACK = 133; + if (value.Equals((23).ToString())) + return CheckDiagnose.LOW_CONTRAST_IN_IR_LIGHT; - - public const int BARCODE_WAS_READ_WITH_ERRORS = 140; + if (value.Equals((24).ToString())) + return CheckDiagnose.INCORRECT_BACKGROUND_LIGHT; - - public const int BARCODE_DATA_FORMAT_ERROR = 141; + if (value.Equals((25).ToString())) + return CheckDiagnose.BACKGROUND_COMPARISON_ERROR; - - public const int BARCODE_SIZE_PARAMS_ERROR = 142; + if (value.Equals((26).ToString())) + return CheckDiagnose.INCORRECT_TEXT_COLOR; - - public const int NOT_ALL_BARCODES_READ = 143; + if (value.Equals((27).ToString())) + return CheckDiagnose.PHOTO_FALSE_LUMINESCENCE; - - public const int PORTRAIT_COMPARISON_PORTRAITS_DIFFER = 150; + if (value.Equals((28).ToString())) + return CheckDiagnose.TOO_MUCH_SHIFT; - - public const int PORTRAIT_COMPARISON_NO_SERVICE_REPLY = 151; + if (value.Equals((29).ToString())) + return CheckDiagnose.CONTACT_CHIP_TYPE_MISMATCH; - - public const int PORTRAIT_COMPARISON_SERVICE_ERROR = 152; + if (value.Equals((30).ToString())) + return CheckDiagnose.FIBERS_NOT_FOUND; - - public const int PORTRAIT_COMPARISON_NOT_ENOUGH_IMAGES = 153; + if (value.Equals((31).ToString())) + return CheckDiagnose.TOO_MANY_OBJECTS; - - public const int PORTRAIT_COMPARISON_NO_LIVE_PHOTO = 154; + if (value.Equals((33).ToString())) + return CheckDiagnose.SPECKS_IN_UV; - - public const int PORTRAIT_COMPARISON_NO_SERVICE_LICENSE = 155; + if (value.Equals((34).ToString())) + return CheckDiagnose.TOO_LOW_RESOLUTION; - - public const int PORTRAIT_COMPARISON_NO_PORTRAIT_DETECTED = 156; + if (value.Equals((40).ToString())) + return CheckDiagnose.INVISIBLE_ELEMENT_PRESENT; - public const int FIELD_POS_CORRECTOR_PHOTO_REPLACED = 82; - - public const int FIELD_POS_CORRECTOR_GLARES_IN_PHOTO_AREA = 81; + if (value.Equals((41).ToString())) + return CheckDiagnose.VISIBLE_ELEMENT_ABSENT; - public const int HOLOGRAM_FRAMES_IS_ABSENT = 103; + if (value.Equals((42).ToString())) + return CheckDiagnose.ELEMENT_SHOULD_BE_COLORED; - public const int HOLOGRAM_HOLO_FIELD_IS_ABSENT = 104; + if (value.Equals((43).ToString())) + return CheckDiagnose.ELEMENT_SHOULD_BE_GRAYSCALE; - public const int DOCUMENT_IS_CANCELLING = 122; + if (value.Equals((44).ToString())) + return CheckDiagnose.PHOTO_WHITE_IR_DONT_MATCH; - public const int MOBILE_IMAGES_UNSUITABLE_LIGHT_CONDITIONS = 160; + if (value.Equals((50).ToString())) + return CheckDiagnose.UV_DULL_PAPER_MRZ; - public const int MOBILE_IMAGES_WHITE_UV_NO_DIFFERENCE = 161; + if (value.Equals((51).ToString())) + return CheckDiagnose.FALSE_LUMINESCENCE_IN_MRZ; - public const int FINGERPRINTS_COMPARISON_MISMATCH = 170; + if (value.Equals((52).ToString())) + return CheckDiagnose.UV_DULL_PAPER_PHOTO; - public const int HOLO_PHOTO_FACE_NOT_DETECTED = 180; + if (value.Equals((53).ToString())) + return CheckDiagnose.UV_DULL_PAPER_BLANK; - public const int HOLO_PHOTO_FACE_COMPARISON_FAILED = 181; + if (value.Equals((54).ToString())) + return CheckDiagnose.UV_DULL_PAPER_ERROR; - public const int HOLO_PHOTO_GLARE_IN_CENTER_ABSENT = 182; + if (value.Equals((55).ToString())) + return CheckDiagnose.FALSE_LUMINESCENCE_IN_BLANK; - public const int HOLO_PHOTO_HOLO_ELEMENT_SHAPE_ERROR = 183; + if (value.Equals((60).ToString())) + return CheckDiagnose.BAD_AREA_IN_AXIAL; - public const int HOLO_PHOTO_ALGORITHMS_STEPS_ERROR = 184; + if (value.Equals((65).ToString())) + return CheckDiagnose.FALSE_IPI_PARAMETERS; - public const int HOLO_PHOTO_HOLO_AREAS_NOT_LOADED = 185; + if (value.Equals((66).ToString())) + return CheckDiagnose.ENCRYPTED_IPI_NOT_FOUND; - public const int HOLO_PHOTO_FINISHED_BY_TIMEOUT = 186; + if (value.Equals((67).ToString())) + return CheckDiagnose.ENCRYPTED_IPI_DATA_DONT_MATCH; - public const int HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME = 187; + if (value.Equals((80).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_HIGHLIGHT_IR; - public const int LIVENESS_DEPTH_CHECK_FAILED = 190; + if (value.Equals((81).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_GLARES_IN_PHOTO_AREA; - public const int LAS_INK_INVALID_LINES_FREQUENCY = 230; + if (value.Equals((82).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_PHOTO_REPLACED; - public const int LAST_DIAGNOSE_VALUE = 240; + if (value.Equals((83).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_LANDMARKS_CHECK_ERROR; + if (value.Equals((84).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR; + + if (value.Equals((85).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR; + + if (value.Equals((86).ToString())) + return CheckDiagnose.FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION; + + if (value.Equals((90).ToString())) + return CheckDiagnose.OVI_IR_INVISIBLE; + + if (value.Equals((91).ToString())) + return CheckDiagnose.OVI_INSUFFICIENT_AREA; + + if (value.Equals((92).ToString())) + return CheckDiagnose.OVI_COLOR_INVARIABLE; + + if (value.Equals((93).ToString())) + return CheckDiagnose.OVI_BAD_COLOR_FRONT; + + if (value.Equals((94).ToString())) + return CheckDiagnose.OVI_BAD_COLOR_SIDE; + + if (value.Equals((95).ToString())) + return CheckDiagnose.OVI_WIDE_COLOR_SPREAD; + + if (value.Equals((96).ToString())) + return CheckDiagnose.OVI_BAD_COLOR_PERCENT; + + if (value.Equals((100).ToString())) + return CheckDiagnose.HOLOGRAM_ELEMENT_ABSENT; + + if (value.Equals((101).ToString())) + return CheckDiagnose.HOLOGRAM_SIDE_TOP_IMAGES_ABSENT; + + if (value.Equals((102).ToString())) + return CheckDiagnose.HOLOGRAM_ELEMENT_PRESENT; + + if (value.Equals((103).ToString())) + return CheckDiagnose.HOLOGRAM_FRAMES_IS_ABSENT; + + if (value.Equals((104).ToString())) + return CheckDiagnose.HOLOGRAM_HOLO_FIELD_IS_ABSENT; + + if (value.Equals((110).ToString())) + return CheckDiagnose.PHOTO_PATTERN_INTERRUPTED; + + if (value.Equals((111).ToString())) + return CheckDiagnose.PHOTO_PATTERN_SHIFTED; + + if (value.Equals((112).ToString())) + return CheckDiagnose.PHOTO_PATTERN_DIFFERENT_COLORS; + + if (value.Equals((113).ToString())) + return CheckDiagnose.PHOTO_PATTERN_IR_VISIBLE; + + if (value.Equals((114).ToString())) + return CheckDiagnose.PHOTO_PATTERN_NOT_INTERSECT; + + if (value.Equals((115).ToString())) + return CheckDiagnose.PHOTO_SIZE_IS_WRONG; + + if (value.Equals((116).ToString())) + return CheckDiagnose.PHOTO_PATTERN_INVALID_COLOR; + + if (value.Equals((117).ToString())) + return CheckDiagnose.PHOTO_PATTERN_SHIFTED_VERT; + + if (value.Equals((118).ToString())) + return CheckDiagnose.PHOTO_PATTERN_PATTERN_NOT_FOUND; + + if (value.Equals((119).ToString())) + return CheckDiagnose.PHOTO_PATTERN_DIFFERENT_LINES_THICKNESS; + + if (value.Equals((120).ToString())) + return CheckDiagnose.PHOTO_IS_NOT_RECTANGLE; + + if (value.Equals((121).ToString())) + return CheckDiagnose.PHOTO_CORNERS_IS_WRONG; + + if (value.Equals((122).ToString())) + return CheckDiagnose.DOCUMENT_IS_CANCELLING; + + if (value.Equals((130).ToString())) + return CheckDiagnose.TEXT_COLOR_SHOULD_BE_BLUE; + + if (value.Equals((131).ToString())) + return CheckDiagnose.TEXT_COLOR_SHOULD_BE_GREEN; + + if (value.Equals((132).ToString())) + return CheckDiagnose.TEXT_COLOR_SHOULD_BE_RED; + + if (value.Equals((133).ToString())) + return CheckDiagnose.TEXT_SHOULD_BE_BLACK; + + if (value.Equals((140).ToString())) + return CheckDiagnose.BARCODE_WAS_READ_WITH_ERRORS; + + if (value.Equals((141).ToString())) + return CheckDiagnose.BARCODE_DATA_FORMAT_ERROR; + + if (value.Equals((142).ToString())) + return CheckDiagnose.BARCODE_SIZE_PARAMS_ERROR; + + if (value.Equals((143).ToString())) + return CheckDiagnose.NOT_ALL_BARCODES_READ; + + if (value.Equals((144).ToString())) + return CheckDiagnose.GLARES_IN_BARCODE_AREA; + + if (value.Equals((145).ToString())) + return CheckDiagnose.NO_CERTIFICATE_FOR_DIGITAL_SIGNATURE_CHECK; + + if (value.Equals((150).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_PORTRAITS_DIFFER; + + if (value.Equals((151).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NO_SERVICE_REPLY; + + if (value.Equals((152).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_SERVICE_ERROR; + + if (value.Equals((153).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NOT_ENOUGH_IMAGES; + + if (value.Equals((154).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NO_LIVE_PHOTO; + + if (value.Equals((155).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NO_SERVICE_LICENSE; + + if (value.Equals((156).ToString())) + return CheckDiagnose.PORTRAIT_COMPARISON_NO_PORTRAIT_DETECTED; + + if (value.Equals((160).ToString())) + return CheckDiagnose.MOBILE_IMAGES_UNSUITABLE_LIGHT_CONDITIONS; + + if (value.Equals((161).ToString())) + return CheckDiagnose.MOBILE_IMAGES_WHITE_UV_NO_DIFFERENCE; + + if (value.Equals((170).ToString())) + return CheckDiagnose.FINGERPRINTS_COMPARISON_MISMATCH; + + if (value.Equals((180).ToString())) + return CheckDiagnose.HOLO_PHOTO_FACE_NOT_DETECTED; + + if (value.Equals((181).ToString())) + return CheckDiagnose.HOLO_PHOTO_FACE_COMPARISON_FAILED; + + if (value.Equals((182).ToString())) + return CheckDiagnose.HOLO_PHOTO_GLARE_IN_CENTER_ABSENT; + + if (value.Equals((183).ToString())) + return CheckDiagnose.HOLO_PHOTO_HOLO_ELEMENT_SHAPE_ERROR; + + if (value.Equals((184).ToString())) + return CheckDiagnose.HOLO_PHOTO_ALGORITHMS_STEPS_ERROR; + + if (value.Equals((185).ToString())) + return CheckDiagnose.HOLO_PHOTO_HOLO_AREAS_NOT_LOADED; + + if (value.Equals((186).ToString())) + return CheckDiagnose.HOLO_PHOTO_FINISHED_BY_TIMEOUT; + + if (value.Equals((187).ToString())) + return CheckDiagnose.HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME; + + if (value.Equals((190).ToString())) + return CheckDiagnose.LIVENESS_DEPTH_CHECK_FAILED; + + if (value.Equals((200).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_SYMBOL_POSITION; + + if (value.Equals((201).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_BACKGROUND; + + if (value.Equals((202).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_MRZ_WIDTH; + + if (value.Equals((203).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_MRZ_HEIGHT; + + if (value.Equals((204).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_LINE_POSITION; + + if (value.Equals((205).ToString())) + return CheckDiagnose.MRZ_QUALITY_WRONG_FONT_TYPE; + + if (value.Equals((220).ToString())) + return CheckDiagnose.OCR_QUALITY_TEXT_POSITION; + + if (value.Equals((221).ToString())) + return CheckDiagnose.OCR_QUALITY_INVALID_FONT; + + if (value.Equals((222).ToString())) + return CheckDiagnose.OCR_QUALITY_INVALID_BACKGROUND; + + if (value.Equals((230).ToString())) + return CheckDiagnose.LASINK_INVALID_LINES_FREQUENCY; + + if (value.Equals((238).ToString())) + return CheckDiagnose.DOC_LIVENESS_DOCUMENT_NOT_LIVE; + + if (value.Equals((239).ToString())) + return CheckDiagnose.DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED; + + if (value.Equals((240).ToString())) + return CheckDiagnose.DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED; + + if (value.Equals((241).ToString())) + return CheckDiagnose.DOC_LIVENESS_INVALID_BARCODE_BACKGROUND; + + if (value.Equals((243).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_BASE32_ERROR; + + if (value.Equals((244).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_ZIPPED_ERROR; + + if (value.Equals((245).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_MESSAGE_ZONE_EMPTY; + + if (value.Equals((246).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_SIGNATURE_MUST_BE_PRESENT; + + if (value.Equals((247).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_SIGNATURE_MUST_NOT_BE_PRESENT; + + if (value.Equals((248).ToString())) + return CheckDiagnose.CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT; + + if (value.Equals((250).ToString())) + return CheckDiagnose.CHD_INCORRECT_OBJECT_COLOR; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(CheckDiagnose value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class CheckDiagnoseJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override CheckDiagnose Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + CheckDiagnose? result = rawValue == null + ? null + : CheckDiagnoseValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the CheckDiagnose to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CheckDiagnose checkDiagnose, JsonSerializerOptions options) + { + writer.WriteStringValue(checkDiagnose.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class CheckDiagnoseNullableJsonConverter : JsonConverter + { + /// + /// Returns a CheckDiagnose from the Json object + /// + /// + /// + /// + /// + public override CheckDiagnose? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + CheckDiagnose? result = rawValue == null + ? null + : CheckDiagnoseValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CheckDiagnose? checkDiagnose, JsonSerializerOptions options) + { + writer.WriteStringValue(checkDiagnose?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs index 7c34dda..2606426 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs @@ -1,41 +1,181 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// 0 - result is negative; 1 - result is positive; 2 - сheck was not performed - public class CheckResult + /// + /// 0 - result is negative; 1 - result is positive; 2 - сheck was not performed + public enum CheckResult + { + /// + /// Enum ERROR for value: 0 + /// + ERROR = 0, + + /// + /// Enum OK for value: 1 + /// + OK = 1, + + /// + /// Enum WAS_NOT_DONE for value: 2 + /// + WAS_NOT_DONE = 2 + } + + /// + /// Converts to and from the JSON value + /// + public static class CheckResultValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static CheckResult FromString(string value) + { + if (value.Equals((0).ToString())) + return CheckResult.ERROR; + + if (value.Equals((1).ToString())) + return CheckResult.OK; + + if (value.Equals((2).ToString())) + return CheckResult.WAS_NOT_DONE; + + throw new NotImplementedException($"Could not convert value to type CheckResult: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static CheckResult? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return CheckResult.ERROR; + + if (value.Equals((1).ToString())) + return CheckResult.OK; + + if (value.Equals((2).ToString())) + return CheckResult.WAS_NOT_DONE; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(CheckResult value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class CheckResultJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override CheckResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + CheckResult? result = rawValue == null + ? null + : CheckResultValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the CheckResult to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CheckResult checkResult, JsonSerializerOptions options) + { + writer.WriteStringValue(checkResult.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class CheckResultNullableJsonConverter : JsonConverter { + /// + /// Returns a CheckResult from the Json object + /// + /// + /// + /// + /// + public override CheckResult? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** Check was performed and result is NEGATIVE */ - public const int ERROR = 0; + CheckResult? result = rawValue == null + ? null + : CheckResultValueConverter.FromStringOrDefault(rawValue); - /** Check was performed and result is POSITIVE */ - public const int OK = 1; + if (result != null) + return result.Value; - /** Check was NOT PERFORMED */ - public const int WAS_NOT_DONE = 2; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CheckResult? checkResult, JsonSerializerOptions options) + { + writer.WriteStringValue(checkResult?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs index a748d3a..844eccc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs @@ -1,273 +1,437 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains information about one document type candidate /// - [DataContract] - public partial class ChosenDocumentType : IEquatable, IValidatableObject + public partial class ChosenDocumentType : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Document name. - /// Unique document type template identifier (Regula's internal numeric code). - /// A measure of the likelihood of correct recognition in the analysis of this type of document. - /// rFIDPresence. - /// fDSIDList. - /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document. - /// Set of authentication options provided for this type of document (combination of Authenticity enum). - /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme. - /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity. - public ChosenDocumentType(string documentName = default(string), int iD = default(int), decimal p = default(decimal), int rFIDPresence = default(int), FDSIDList fDSIDList = default(FDSIDList), int necessaryLights = default(int), int checkAuthenticity = default(int), int uVExp = default(int), int authenticityNecessaryLights = default(int)) + /// Document name + /// Unique document type template identifier (Regula's internal numeric code) + /// A measure of the likelihood of correct recognition in the analysis of this type of document + /// true if the document of the given type is rotated by 180 degrees + /// rFIDPresence + /// fDSIDList + /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document + /// Set of authentication options provided for this type of document (combination of Authenticity enum) + /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme + /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity + /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme + /// rotationAngle + [JsonConstructor] + public ChosenDocumentType(string documentName, int iD, decimal p, int rotated180, RfidLocation rFIDPresence, FDSIDList fDSIDList, int necessaryLights, int checkAuthenticity, int uVExp, int authenticityNecessaryLights, decimal oVIExp, Option rotationAngle = default) { - this.DocumentName = documentName; - this.ID = iD; - this.P = p; - this.RFIDPresence = rFIDPresence; - this.FDSIDList = fDSIDList; - this.NecessaryLights = necessaryLights; - this.CheckAuthenticity = checkAuthenticity; - this.UVExp = uVExp; - this.AuthenticityNecessaryLights = authenticityNecessaryLights; + DocumentName = documentName; + ID = iD; + P = p; + Rotated180 = rotated180; + RFIDPresence = rFIDPresence; + FDSIDList = fDSIDList; + NecessaryLights = necessaryLights; + CheckAuthenticity = checkAuthenticity; + UVExp = uVExp; + AuthenticityNecessaryLights = authenticityNecessaryLights; + OVIExp = oVIExp; + RotationAngleOption = rotationAngle; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Gets or Sets RFIDPresence + /// + [JsonPropertyName("RFID_Presence")] + public RfidLocation RFIDPresence { get; set; } + /// /// Document name /// /// Document name - [DataMember(Name="DocumentName", EmitDefaultValue=false)] + [JsonPropertyName("DocumentName")] public string DocumentName { get; set; } /// /// Unique document type template identifier (Regula's internal numeric code) /// /// Unique document type template identifier (Regula's internal numeric code) - [DataMember(Name="ID", EmitDefaultValue=false)] + [JsonPropertyName("ID")] public int ID { get; set; } /// /// A measure of the likelihood of correct recognition in the analysis of this type of document /// /// A measure of the likelihood of correct recognition in the analysis of this type of document - [DataMember(Name="P", EmitDefaultValue=false)] + /* 0.9913095831871032 */ + [JsonPropertyName("P")] public decimal P { get; set; } /// - /// Gets or Sets RFIDPresence + /// true if the document of the given type is rotated by 180 degrees /// - [DataMember(Name="RFID_Presence", EmitDefaultValue=false)] - public int RFIDPresence { get; set; } + /// true if the document of the given type is rotated by 180 degrees + [JsonPropertyName("Rotated180")] + public int Rotated180 { get; set; } /// /// Gets or Sets FDSIDList /// - [DataMember(Name="FDSIDList", EmitDefaultValue=false)] + [JsonPropertyName("FDSIDList")] public FDSIDList FDSIDList { get; set; } /// /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document /// /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document - [DataMember(Name="NecessaryLights", EmitDefaultValue=false)] + [JsonPropertyName("NecessaryLights")] public int NecessaryLights { get; set; } /// /// Set of authentication options provided for this type of document (combination of Authenticity enum) /// /// Set of authentication options provided for this type of document (combination of Authenticity enum) - [DataMember(Name="CheckAuthenticity", EmitDefaultValue=false)] + [JsonPropertyName("CheckAuthenticity")] public int CheckAuthenticity { get; set; } /// /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme /// /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme - [DataMember(Name="UVExp", EmitDefaultValue=false)] + [JsonPropertyName("UVExp")] public int UVExp { get; set; } /// /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity /// /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity - [DataMember(Name="AuthenticityNecessaryLights", EmitDefaultValue=false)] + [JsonPropertyName("AuthenticityNecessaryLights")] public int AuthenticityNecessaryLights { get; set; } + /// + /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme + /// + /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme + [JsonPropertyName("OVIExp")] + public decimal OVIExp { get; set; } + + /// + /// Used to track the state of RotationAngle + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RotationAngleOption { get; private set; } + + /// + /// Gets or Sets RotationAngle + /// + [JsonPropertyName("RotationAngle")] + public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ChosenDocumentType {\n"); sb.Append(" DocumentName: ").Append(DocumentName).Append("\n"); sb.Append(" ID: ").Append(ID).Append("\n"); sb.Append(" P: ").Append(P).Append("\n"); + sb.Append(" Rotated180: ").Append(Rotated180).Append("\n"); sb.Append(" RFIDPresence: ").Append(RFIDPresence).Append("\n"); sb.Append(" FDSIDList: ").Append(FDSIDList).Append("\n"); sb.Append(" NecessaryLights: ").Append(NecessaryLights).Append("\n"); sb.Append(" CheckAuthenticity: ").Append(CheckAuthenticity).Append("\n"); sb.Append(" UVExp: ").Append(UVExp).Append("\n"); sb.Append(" AuthenticityNecessaryLights: ").Append(AuthenticityNecessaryLights).Append("\n"); + sb.Append(" OVIExp: ").Append(OVIExp).Append("\n"); + sb.Append(" RotationAngle: ").Append(RotationAngle).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ChosenDocumentType); + // P (decimal) maximum + if (this.P > (decimal)1) + { + yield return new ValidationResult("Invalid value for P, must be a value less than or equal to 1.", new [] { "P" }); + } + + // P (decimal) minimum + if (this.P < (decimal)0) + { + yield return new ValidationResult("Invalid value for P, must be a value greater than or equal to 0.", new [] { "P" }); + } + + yield break; } + } + /// + /// A Json converter for type + /// + public class ChosenDocumentTypeJsonConverter : JsonConverter + { /// - /// Returns true if ChosenDocumentType instances are equal + /// Deserializes json to /// - /// Instance of ChosenDocumentType to be compared - /// Boolean - public bool Equals(ChosenDocumentType input) + /// + /// + /// + /// + /// + public override ChosenDocumentType Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.DocumentName == input.DocumentName || - (this.DocumentName != null && - this.DocumentName.Equals(input.DocumentName)) - ) && - ( - this.ID == input.ID || - (this.ID != null && - this.ID.Equals(input.ID)) - ) && - ( - this.P == input.P || - (this.P != null && - this.P.Equals(input.P)) - ) && - ( - this.RFIDPresence == input.RFIDPresence || - (this.RFIDPresence != null && - this.RFIDPresence.Equals(input.RFIDPresence)) - ) && - ( - this.FDSIDList == input.FDSIDList || - (this.FDSIDList != null && - this.FDSIDList.Equals(input.FDSIDList)) - ) && - ( - this.NecessaryLights == input.NecessaryLights || - (this.NecessaryLights != null && - this.NecessaryLights.Equals(input.NecessaryLights)) - ) && - ( - this.CheckAuthenticity == input.CheckAuthenticity || - (this.CheckAuthenticity != null && - this.CheckAuthenticity.Equals(input.CheckAuthenticity)) - ) && - ( - this.UVExp == input.UVExp || - (this.UVExp != null && - this.UVExp.Equals(input.UVExp)) - ) && - ( - this.AuthenticityNecessaryLights == input.AuthenticityNecessaryLights || - (this.AuthenticityNecessaryLights != null && - this.AuthenticityNecessaryLights.Equals(input.AuthenticityNecessaryLights)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option documentName = default; + Option iD = default; + Option p = default; + Option rotated180 = default; + Option rFIDPresence = default; + Option fDSIDList = default; + Option necessaryLights = default; + Option checkAuthenticity = default; + Option uVExp = default; + Option authenticityNecessaryLights = default; + Option oVIExp = default; + Option rotationAngle = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocumentName": + documentName = new Option(utf8JsonReader.GetString()!); + break; + case "ID": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + iD = new Option(utf8JsonReader.GetInt32()); + break; + case "P": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + p = new Option(utf8JsonReader.GetDecimal()); + break; + case "Rotated180": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rotated180 = new Option(utf8JsonReader.GetInt32()); + break; + case "RFID_Presence": + string? rFIDPresenceRawValue = utf8JsonReader.GetString(); + if (rFIDPresenceRawValue != null) + rFIDPresence = new Option(RfidLocationValueConverter.FromStringOrDefault(rFIDPresenceRawValue)); + break; + case "FDSIDList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fDSIDList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "NecessaryLights": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + necessaryLights = new Option(utf8JsonReader.GetInt32()); + break; + case "CheckAuthenticity": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkAuthenticity = new Option(utf8JsonReader.GetInt32()); + break; + case "UVExp": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + uVExp = new Option(utf8JsonReader.GetInt32()); + break; + case "AuthenticityNecessaryLights": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + authenticityNecessaryLights = new Option(utf8JsonReader.GetInt32()); + break; + case "OVIExp": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + oVIExp = new Option(utf8JsonReader.GetDecimal()); + break; + case "RotationAngle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rotationAngle = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!documentName.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(documentName)); + + if (!iD.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(iD)); + + if (!p.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(p)); + + if (!rotated180.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(rotated180)); + + if (!rFIDPresence.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(rFIDPresence)); + + if (!fDSIDList.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(fDSIDList)); + + if (!necessaryLights.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(necessaryLights)); + + if (!checkAuthenticity.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(checkAuthenticity)); + + if (!uVExp.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(uVExp)); + + if (!authenticityNecessaryLights.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(authenticityNecessaryLights)); + + if (!oVIExp.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(oVIExp)); + + if (documentName.IsSet && documentName.Value == null) + throw new ArgumentNullException(nameof(documentName), "Property is not nullable for class ChosenDocumentType."); + + if (iD.IsSet && iD.Value == null) + throw new ArgumentNullException(nameof(iD), "Property is not nullable for class ChosenDocumentType."); + + if (p.IsSet && p.Value == null) + throw new ArgumentNullException(nameof(p), "Property is not nullable for class ChosenDocumentType."); + + if (rotated180.IsSet && rotated180.Value == null) + throw new ArgumentNullException(nameof(rotated180), "Property is not nullable for class ChosenDocumentType."); + + if (rFIDPresence.IsSet && rFIDPresence.Value == null) + throw new ArgumentNullException(nameof(rFIDPresence), "Property is not nullable for class ChosenDocumentType."); + + if (fDSIDList.IsSet && fDSIDList.Value == null) + throw new ArgumentNullException(nameof(fDSIDList), "Property is not nullable for class ChosenDocumentType."); + + if (necessaryLights.IsSet && necessaryLights.Value == null) + throw new ArgumentNullException(nameof(necessaryLights), "Property is not nullable for class ChosenDocumentType."); + + if (checkAuthenticity.IsSet && checkAuthenticity.Value == null) + throw new ArgumentNullException(nameof(checkAuthenticity), "Property is not nullable for class ChosenDocumentType."); + + if (uVExp.IsSet && uVExp.Value == null) + throw new ArgumentNullException(nameof(uVExp), "Property is not nullable for class ChosenDocumentType."); + + if (authenticityNecessaryLights.IsSet && authenticityNecessaryLights.Value == null) + throw new ArgumentNullException(nameof(authenticityNecessaryLights), "Property is not nullable for class ChosenDocumentType."); + + if (oVIExp.IsSet && oVIExp.Value == null) + throw new ArgumentNullException(nameof(oVIExp), "Property is not nullable for class ChosenDocumentType."); + + if (rotationAngle.IsSet && rotationAngle.Value == null) + throw new ArgumentNullException(nameof(rotationAngle), "Property is not nullable for class ChosenDocumentType."); + + return new ChosenDocumentType(documentName.Value!, iD.Value!.Value!, p.Value!.Value!, rotated180.Value!.Value!, rFIDPresence.Value!.Value!, fDSIDList.Value!, necessaryLights.Value!.Value!, checkAuthenticity.Value!.Value!, uVExp.Value!.Value!, authenticityNecessaryLights.Value!.Value!, oVIExp.Value!.Value!, rotationAngle); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ChosenDocumentType chosenDocumentType, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DocumentName != null) - hashCode = hashCode * 59 + this.DocumentName.GetHashCode(); - if (this.ID != null) - hashCode = hashCode * 59 + this.ID.GetHashCode(); - if (this.P != null) - hashCode = hashCode * 59 + this.P.GetHashCode(); - if (this.RFIDPresence != null) - hashCode = hashCode * 59 + this.RFIDPresence.GetHashCode(); - if (this.FDSIDList != null) - hashCode = hashCode * 59 + this.FDSIDList.GetHashCode(); - if (this.NecessaryLights != null) - hashCode = hashCode * 59 + this.NecessaryLights.GetHashCode(); - if (this.CheckAuthenticity != null) - hashCode = hashCode * 59 + this.CheckAuthenticity.GetHashCode(); - if (this.UVExp != null) - hashCode = hashCode * 59 + this.UVExp.GetHashCode(); - if (this.AuthenticityNecessaryLights != null) - hashCode = hashCode * 59 + this.AuthenticityNecessaryLights.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, chosenDocumentType, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ChosenDocumentType chosenDocumentType, JsonSerializerOptions jsonSerializerOptions) { + if (chosenDocumentType.DocumentName == null) + throw new ArgumentNullException(nameof(chosenDocumentType.DocumentName), "Property is required for class ChosenDocumentType."); - - // P (decimal) maximum - if(this.P > (decimal)1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for P, must be a value less than or equal to 1.", new [] { "P" }); - } + if (chosenDocumentType.FDSIDList == null) + throw new ArgumentNullException(nameof(chosenDocumentType.FDSIDList), "Property is required for class ChosenDocumentType."); - // P (decimal) minimum - if(this.P < (decimal)0) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for P, must be a value greater than or equal to 0.", new [] { "P" }); - } + writer.WriteString("DocumentName", chosenDocumentType.DocumentName); - yield break; + writer.WriteNumber("ID", chosenDocumentType.ID); + + writer.WriteNumber("P", chosenDocumentType.P); + + writer.WriteNumber("Rotated180", chosenDocumentType.Rotated180); + + var rFIDPresenceRawValue = RfidLocationValueConverter.ToJsonValue(chosenDocumentType.RFIDPresence); + writer.WriteNumber("RFID_Presence", rFIDPresenceRawValue); + + writer.WritePropertyName("FDSIDList"); + JsonSerializer.Serialize(writer, chosenDocumentType.FDSIDList, jsonSerializerOptions); + writer.WriteNumber("NecessaryLights", chosenDocumentType.NecessaryLights); + + writer.WriteNumber("CheckAuthenticity", chosenDocumentType.CheckAuthenticity); + + writer.WriteNumber("UVExp", chosenDocumentType.UVExp); + + writer.WriteNumber("AuthenticityNecessaryLights", chosenDocumentType.AuthenticityNecessaryLights); + + writer.WriteNumber("OVIExp", chosenDocumentType.OVIExp); + + if (chosenDocumentType.RotationAngleOption.IsSet) + writer.WriteNumber("RotationAngle", chosenDocumentType.RotationAngleOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs index 5d5ce4f..ec6ba17 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs @@ -1,60 +1,72 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains information about the type of document that was determined based on the analysis of the provided image /// - [DataContract] - public partial class ChosenDocumentTypeResult : ResultItem, IEquatable, IValidatableObject + public partial class ChosenDocumentTypeResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ChosenDocumentTypeResult() { } - /// - /// Initializes a new instance of the class. - /// - /// oneCandidate. - public ChosenDocumentTypeResult(OneCandidate oneCandidate = default(OneCandidate), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// oneCandidate + /// bufLength + /// light + /// listIdx + /// pageIdx + /// xMLBuffer + [JsonConstructor] + public ChosenDocumentTypeResult(OneCandidate oneCandidate, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default, Option xMLBuffer = default) : base(bufLength, light, listIdx, pageIdx) { - this.OneCandidate = oneCandidate; + OneCandidate = oneCandidate; + XMLBufferOption = xMLBuffer; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets OneCandidate /// - [DataMember(Name="OneCandidate", EmitDefaultValue=false)] + [JsonPropertyName("OneCandidate")] public OneCandidate OneCandidate { get; set; } + /// + /// Used to track the state of XMLBuffer + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option XMLBufferOption { get; } + /// /// Gets or Sets XMLBuffer /// - [DataMember(Name="XML_buffer", EmitDefaultValue=false)] - public string XMLBuffer { get; private set; } + [JsonPropertyName("XML_buffer")] + public string? XMLBuffer { get { return this.XMLBufferOption; } } /// /// Returns the string presentation of the object @@ -62,84 +74,172 @@ protected ChosenDocumentTypeResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ChosenDocumentTypeResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" OneCandidate: ").Append(OneCandidate).Append("\n"); sb.Append(" XMLBuffer: ").Append(XMLBuffer).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class ChosenDocumentTypeResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ChosenDocumentTypeResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ChosenDocumentTypeResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if ChosenDocumentTypeResult instances are equal - /// - /// Instance of ChosenDocumentTypeResult to be compared - /// Boolean - public bool Equals(ChosenDocumentTypeResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.OneCandidate == input.OneCandidate || - (this.OneCandidate != null && - this.OneCandidate.Equals(input.OneCandidate)) - ) && base.Equals(input) && - ( - this.XMLBuffer == input.XMLBuffer || - (this.XMLBuffer != null && - this.XMLBuffer.Equals(input.XMLBuffer)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option oneCandidate = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + Option xMLBuffer = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "OneCandidate": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + oneCandidate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + case "XML_buffer": + xMLBuffer = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!oneCandidate.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentTypeResult.", nameof(oneCandidate)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class ChosenDocumentTypeResult.", nameof(resultType)); + + if (oneCandidate.IsSet && oneCandidate.Value == null) + throw new ArgumentNullException(nameof(oneCandidate), "Property is not nullable for class ChosenDocumentTypeResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ChosenDocumentTypeResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class ChosenDocumentTypeResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ChosenDocumentTypeResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ChosenDocumentTypeResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ChosenDocumentTypeResult."); + + if (xMLBuffer.IsSet && xMLBuffer.Value == null) + throw new ArgumentNullException(nameof(xMLBuffer), "Property is not nullable for class ChosenDocumentTypeResult."); + + return new ChosenDocumentTypeResult(oneCandidate.Value!, bufLength, light, listIdx, pageIdx, xMLBuffer); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ChosenDocumentTypeResult chosenDocumentTypeResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.OneCandidate != null) - hashCode = hashCode * 59 + this.OneCandidate.GetHashCode(); - if (this.XMLBuffer != null) - hashCode = hashCode * 59 + this.XMLBuffer.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, chosenDocumentTypeResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ChosenDocumentTypeResult chosenDocumentTypeResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (chosenDocumentTypeResult.OneCandidate == null) + throw new ArgumentNullException(nameof(chosenDocumentTypeResult.OneCandidate), "Property is required for class ChosenDocumentTypeResult."); + + if (chosenDocumentTypeResult.XMLBufferOption.IsSet && chosenDocumentTypeResult.XMLBuffer == null) + throw new ArgumentNullException(nameof(chosenDocumentTypeResult.XMLBuffer), "Property is required for class ChosenDocumentTypeResult."); + + writer.WritePropertyName("OneCandidate"); + JsonSerializer.Serialize(writer, chosenDocumentTypeResult.OneCandidate, jsonSerializerOptions); + if (chosenDocumentTypeResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", chosenDocumentTypeResult.BufLengthOption.Value!.Value); + + if (chosenDocumentTypeResult.LightOption.IsSet) + writer.WriteNumber("light", chosenDocumentTypeResult.LightOption.Value!.Value); + + if (chosenDocumentTypeResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", chosenDocumentTypeResult.ListIdxOption.Value!.Value); + + if (chosenDocumentTypeResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", chosenDocumentTypeResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", chosenDocumentTypeResult.ResultType); + + if (chosenDocumentTypeResult.XMLBufferOption.IsSet) + writer.WriteString("XML_buffer", chosenDocumentTypeResult.XMLBuffer); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs index 43a6d85..5ff2612 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs @@ -1,156 +1,192 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// List with various objects, containing processing results /// - [DataContract] - public partial class ContainerList : IEquatable, IValidatableObject + public partial class ContainerList : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ContainerList() { } - /// - /// Initializes a new instance of the class. - /// - /// Length of list (Count for items). - /// list (required). - public ContainerList(int count = default(int), List list = default(List)) + /// list + /// Length of list (Count for items) + [JsonConstructor] + public ContainerList(List list, Option count = default) { - // to ensure "list" is required (not null) - if (list == null) - { - throw new InvalidDataException("list is a required property for ContainerList and cannot be null"); - } - else - { - this.List = list; - } - - this.Count = count; + List = list; + CountOption = count; + OnCreated(); } - - /// - /// Length of list (Count for items) - /// - /// Length of list (Count for items) - [DataMember(Name="Count", EmitDefaultValue=false)] - public int Count { get; set; } + + partial void OnCreated(); /// /// Gets or Sets List /// - [DataMember(Name="List", EmitDefaultValue=true)] + [JsonPropertyName("List")] public List List { get; set; } + /// + /// Used to track the state of Count + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CountOption { get; private set; } + + /// + /// Length of list (Count for items) + /// + /// Length of list (Count for items) + [JsonPropertyName("Count")] + public int? Count { get { return this.CountOption; } set { this.CountOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ContainerList {\n"); - sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ContainerList); + yield break; } + } + /// + /// A Json converter for type + /// + public class ContainerListJsonConverter : JsonConverter + { /// - /// Returns true if ContainerList instances are equal + /// Deserializes json to /// - /// Instance of ContainerList to be compared - /// Boolean - public bool Equals(ContainerList input) + /// + /// + /// + /// + /// + public override ContainerList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Count == input.Count || - (this.Count != null && - this.Count.Equals(input.Count)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> list = default; + Option count = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!list.IsSet) + throw new ArgumentException("Property is required for class ContainerList.", nameof(list)); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class ContainerList."); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class ContainerList."); + + return new ContainerList(list.Value!, count); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ContainerList containerList, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Count != null) - hashCode = hashCode * 59 + this.Count.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, containerList, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ContainerList containerList, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (containerList.List == null) + throw new ArgumentNullException(nameof(containerList.List), "Property is required for class ContainerList."); + + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, containerList.List, jsonSerializerOptions); + if (containerList.CountOption.IsSet) + writer.WriteNumber("Count", containerList.CountOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs new file mode 100644 index 0000000..4180d96 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs @@ -0,0 +1,1188 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ContainerListListInner + /// + public partial class ContainerListListInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(StatusResult statusResult) + { + StatusResult = statusResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(TextResult textResult) + { + TextResult = textResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocumentImageResult documentImageResult) + { + DocumentImageResult = documentImageResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(ImagesResult imagesResult) + { + ImagesResult = imagesResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(ChosenDocumentTypeResult chosenDocumentTypeResult) + { + ChosenDocumentTypeResult = chosenDocumentTypeResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocumentTypesCandidatesResult documentTypesCandidatesResult) + { + DocumentTypesCandidatesResult = documentTypesCandidatesResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(TextDataResult textDataResult) + { + TextDataResult = textDataResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(GraphicsResult graphicsResult) + { + GraphicsResult = graphicsResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(LexicalAnalysisResult lexicalAnalysisResult) + { + LexicalAnalysisResult = lexicalAnalysisResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(AuthenticityResult authenticityResult) + { + AuthenticityResult = authenticityResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(ImageQualityResult imageQualityResult) + { + ImageQualityResult = imageQualityResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocumentPositionResult documentPositionResult) + { + DocumentPositionResult = documentPositionResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocBarCodeInfo docBarCodeInfo) + { + DocBarCodeInfo = docBarCodeInfo; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(LicenseResult licenseResult) + { + LicenseResult = licenseResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(EncryptedRCLResult encryptedRCLResult) + { + EncryptedRCLResult = encryptedRCLResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocumentBinaryInfoResult documentBinaryInfoResult) + { + DocumentBinaryInfoResult = documentBinaryInfoResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(ByteArrayResult byteArrayResult) + { + ByteArrayResult = byteArrayResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(FaceDetectionResult faceDetectionResult) + { + FaceDetectionResult = faceDetectionResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(MRZDetectorResult mRZDetectorResult) + { + MRZDetectorResult = mRZDetectorResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(MRZPositionResult mRZPositionResult) + { + MRZPositionResult = mRZPositionResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(MRZTestQualityResult mRZTestQualityResult) + { + MRZTestQualityResult = mRZTestQualityResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(RFIDGraphicsInfoResult rFIDGraphicsInfoResult) + { + RFIDGraphicsInfoResult = rFIDGraphicsInfoResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(RFIDTextDataResult rFIDTextDataResult) + { + RFIDTextDataResult = rFIDTextDataResult; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets StatusResult + /// + public StatusResult? StatusResult { get; set; } + + /// + /// Gets or Sets TextResult + /// + public TextResult? TextResult { get; set; } + + /// + /// Gets or Sets DocumentImageResult + /// + public DocumentImageResult? DocumentImageResult { get; set; } + + /// + /// Gets or Sets ImagesResult + /// + public ImagesResult? ImagesResult { get; set; } + + /// + /// Gets or Sets ChosenDocumentTypeResult + /// + public ChosenDocumentTypeResult? ChosenDocumentTypeResult { get; set; } + + /// + /// Gets or Sets DocumentTypesCandidatesResult + /// + public DocumentTypesCandidatesResult? DocumentTypesCandidatesResult { get; set; } + + /// + /// Gets or Sets TextDataResult + /// + public TextDataResult? TextDataResult { get; set; } + + /// + /// Gets or Sets GraphicsResult + /// + public GraphicsResult? GraphicsResult { get; set; } + + /// + /// Gets or Sets LexicalAnalysisResult + /// + public LexicalAnalysisResult? LexicalAnalysisResult { get; set; } + + /// + /// Gets or Sets AuthenticityResult + /// + public AuthenticityResult? AuthenticityResult { get; set; } + + /// + /// Gets or Sets ImageQualityResult + /// + public ImageQualityResult? ImageQualityResult { get; set; } + + /// + /// Gets or Sets DocumentPositionResult + /// + public DocumentPositionResult? DocumentPositionResult { get; set; } + + /// + /// Gets or Sets DocBarCodeInfo + /// + public DocBarCodeInfo? DocBarCodeInfo { get; set; } + + /// + /// Gets or Sets LicenseResult + /// + public LicenseResult? LicenseResult { get; set; } + + /// + /// Gets or Sets EncryptedRCLResult + /// + public EncryptedRCLResult? EncryptedRCLResult { get; set; } + + /// + /// Gets or Sets DocumentBinaryInfoResult + /// + public DocumentBinaryInfoResult? DocumentBinaryInfoResult { get; set; } + + /// + /// Gets or Sets ByteArrayResult + /// + public ByteArrayResult? ByteArrayResult { get; set; } + + /// + /// Gets or Sets FaceDetectionResult + /// + public FaceDetectionResult? FaceDetectionResult { get; set; } + + /// + /// Gets or Sets MRZDetectorResult + /// + public MRZDetectorResult? MRZDetectorResult { get; set; } + + /// + /// Gets or Sets MRZPositionResult + /// + public MRZPositionResult? MRZPositionResult { get; set; } + + /// + /// Gets or Sets MRZTestQualityResult + /// + public MRZTestQualityResult? MRZTestQualityResult { get; set; } + + /// + /// Gets or Sets RFIDGraphicsInfoResult + /// + public RFIDGraphicsInfoResult? RFIDGraphicsInfoResult { get; set; } + + /// + /// Gets or Sets RFIDTextDataResult + /// + public RFIDTextDataResult? RFIDTextDataResult { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ContainerListListInner {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ContainerListListInnerJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ContainerListListInner Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option resultType = default; + + DocumentImageResult? documentImageResult = null; + DocumentBinaryInfoResult? documentBinaryInfoResult = null; + RFIDTextDataResult? rFIDTextDataResult = null; + GraphicsResult? graphicsResult = null; + DocumentBinaryInfoResult? documentBinaryInfoResult = null; + RFIDGraphicsInfoResult? rFIDGraphicsInfoResult = null; + ByteArrayResult? byteArrayResult = null; + LexicalAnalysisResult? lexicalAnalysisResult = null; + DocumentImageResult? documentImageResult = null; + TextDataResult? textDataResult = null; + TextDataResult? textDataResult = null; + GraphicsResult? graphicsResult = null; + AuthenticityResult? authenticityResult = null; + TextDataResult? textDataResult = null; + TextDataResult? textDataResult = null; + ImageQualityResult? imageQualityResult = null; + GraphicsResult? graphicsResult = null; + StatusResult? statusResult = null; + AuthenticityResult? authenticityResult = null; + GraphicsResult? graphicsResult = null; + TextResult? textResult = null; + ImagesResult? imagesResult = null; + GraphicsResult? graphicsResult = null; + AuthenticityResult? authenticityResult = null; + EncryptedRCLResult? encryptedRCLResult = null; + DocBarCodeInfo? docBarCodeInfo = null; + LicenseResult? licenseResult = null; + GraphicsResult? graphicsResult = null; + MRZPositionResult? mRZPositionResult = null; + DocumentPositionResult? documentPositionResult = null; + MRZTestQualityResult? mRZTestQualityResult = null; + DocumentTypesCandidatesResult? documentTypesCandidatesResult = null; + DocumentPositionResult? documentPositionResult = null; + MRZDetectorResult? mRZDetectorResult = null; + ChosenDocumentTypeResult? chosenDocumentTypeResult = null; + FaceDetectionResult? faceDetectionResult = null; + AuthenticityResult? authenticityResult = null; + ByteArrayResult? byteArrayResult = null; + ChosenDocumentTypeResult? chosenDocumentTypeResult = null; + DocBarCodeInfo? docBarCodeInfo = null; + DocumentBinaryInfoResult? documentBinaryInfoResult = null; + DocumentImageResult? documentImageResult = null; + DocumentPositionResult? documentPositionResult = null; + DocumentTypesCandidatesResult? documentTypesCandidatesResult = null; + EncryptedRCLResult? encryptedRCLResult = null; + FaceDetectionResult? faceDetectionResult = null; + GraphicsResult? graphicsResult = null; + ImageQualityResult? imageQualityResult = null; + ImagesResult? imagesResult = null; + LexicalAnalysisResult? lexicalAnalysisResult = null; + LicenseResult? licenseResult = null; + MRZDetectorResult? mRZDetectorResult = null; + MRZPositionResult? mRZPositionResult = null; + MRZTestQualityResult? mRZTestQualityResult = null; + RFIDGraphicsInfoResult? rFIDGraphicsInfoResult = null; + RFIDTextDataResult? rFIDTextDataResult = null; + StatusResult? statusResult = null; + TextDataResult? textDataResult = null; + TextResult? textResult = null; + + Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; + while (utf8JsonReaderDiscriminator.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); + utf8JsonReaderDiscriminator.Read(); + if (localVarJsonPropertyName?.Equals("result_type") ?? false) + { + string? discriminator = utf8JsonReaderDiscriminator.GetString(); + if (discriminator?.Equals("1") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; + documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); + } + if (discriminator?.Equals("101") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; + documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("102") ?? false) + { + Utf8JsonReader utf8JsonReaderRFIDTextDataResult = utf8JsonReader; + rFIDTextDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("103") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("104") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; + documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("105") ?? false) + { + Utf8JsonReader utf8JsonReaderRFIDGraphicsInfoResult = utf8JsonReader; + rFIDGraphicsInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDGraphicsInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("109") ?? false) + { + Utf8JsonReader utf8JsonReaderByteArrayResult = utf8JsonReader; + byteArrayResult = JsonSerializer.Deserialize(ref utf8JsonReaderByteArrayResult, jsonSerializerOptions); + } + if (discriminator?.Equals("15") ?? false) + { + Utf8JsonReader utf8JsonReaderLexicalAnalysisResult = utf8JsonReader; + lexicalAnalysisResult = JsonSerializer.Deserialize(ref utf8JsonReaderLexicalAnalysisResult, jsonSerializerOptions); + } + if (discriminator?.Equals("16") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; + documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); + } + if (discriminator?.Equals("17") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("18") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("19") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("20") ?? false) + { + Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; + authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("26") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("3") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("30") ?? false) + { + Utf8JsonReader utf8JsonReaderImageQualityResult = utf8JsonReader; + imageQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderImageQualityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("32") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("33") ?? false) + { + Utf8JsonReader utf8JsonReaderStatusResult = utf8JsonReader; + statusResult = JsonSerializer.Deserialize(ref utf8JsonReaderStatusResult, jsonSerializerOptions); + } + if (discriminator?.Equals("34") ?? false) + { + Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; + authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("35") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("36") ?? false) + { + Utf8JsonReader utf8JsonReaderTextResult = utf8JsonReader; + textResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextResult, jsonSerializerOptions); + } + if (discriminator?.Equals("37") ?? false) + { + Utf8JsonReader utf8JsonReaderImagesResult = utf8JsonReader; + imagesResult = JsonSerializer.Deserialize(ref utf8JsonReaderImagesResult, jsonSerializerOptions); + } + if (discriminator?.Equals("38") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("39") ?? false) + { + Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; + authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("49") ?? false) + { + Utf8JsonReader utf8JsonReaderEncryptedRCLResult = utf8JsonReader; + encryptedRCLResult = JsonSerializer.Deserialize(ref utf8JsonReaderEncryptedRCLResult, jsonSerializerOptions); + } + if (discriminator?.Equals("5") ?? false) + { + Utf8JsonReader utf8JsonReaderDocBarCodeInfo = utf8JsonReader; + docBarCodeInfo = JsonSerializer.Deserialize(ref utf8JsonReaderDocBarCodeInfo, jsonSerializerOptions); + } + if (discriminator?.Equals("50") ?? false) + { + Utf8JsonReader utf8JsonReaderLicenseResult = utf8JsonReader; + licenseResult = JsonSerializer.Deserialize(ref utf8JsonReaderLicenseResult, jsonSerializerOptions); + } + if (discriminator?.Equals("6") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("61") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZPositionResult = utf8JsonReader; + mRZPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("62") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; + documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("7") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZTestQualityResult = utf8JsonReader; + mRZTestQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZTestQualityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("8") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentTypesCandidatesResult = utf8JsonReader; + documentTypesCandidatesResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentTypesCandidatesResult, jsonSerializerOptions); + } + if (discriminator?.Equals("85") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; + documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("87") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZDetectorResult = utf8JsonReader; + mRZDetectorResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZDetectorResult, jsonSerializerOptions); + } + if (discriminator?.Equals("9") ?? false) + { + Utf8JsonReader utf8JsonReaderChosenDocumentTypeResult = utf8JsonReader; + chosenDocumentTypeResult = JsonSerializer.Deserialize(ref utf8JsonReaderChosenDocumentTypeResult, jsonSerializerOptions); + } + if (discriminator?.Equals("97") ?? false) + { + Utf8JsonReader utf8JsonReaderFaceDetectionResult = utf8JsonReader; + faceDetectionResult = JsonSerializer.Deserialize(ref utf8JsonReaderFaceDetectionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("AuthenticityResult") ?? false) + { + Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; + authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("ByteArrayResult") ?? false) + { + Utf8JsonReader utf8JsonReaderByteArrayResult = utf8JsonReader; + byteArrayResult = JsonSerializer.Deserialize(ref utf8JsonReaderByteArrayResult, jsonSerializerOptions); + } + if (discriminator?.Equals("ChosenDocumentTypeResult") ?? false) + { + Utf8JsonReader utf8JsonReaderChosenDocumentTypeResult = utf8JsonReader; + chosenDocumentTypeResult = JsonSerializer.Deserialize(ref utf8JsonReaderChosenDocumentTypeResult, jsonSerializerOptions); + } + if (discriminator?.Equals("DocBarCodeInfo") ?? false) + { + Utf8JsonReader utf8JsonReaderDocBarCodeInfo = utf8JsonReader; + docBarCodeInfo = JsonSerializer.Deserialize(ref utf8JsonReaderDocBarCodeInfo, jsonSerializerOptions); + } + if (discriminator?.Equals("DocumentBinaryInfoResult") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; + documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("DocumentImageResult") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; + documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); + } + if (discriminator?.Equals("DocumentPositionResult") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; + documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("DocumentTypesCandidatesResult") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentTypesCandidatesResult = utf8JsonReader; + documentTypesCandidatesResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentTypesCandidatesResult, jsonSerializerOptions); + } + if (discriminator?.Equals("EncryptedRCLResult") ?? false) + { + Utf8JsonReader utf8JsonReaderEncryptedRCLResult = utf8JsonReader; + encryptedRCLResult = JsonSerializer.Deserialize(ref utf8JsonReaderEncryptedRCLResult, jsonSerializerOptions); + } + if (discriminator?.Equals("FaceDetectionResult") ?? false) + { + Utf8JsonReader utf8JsonReaderFaceDetectionResult = utf8JsonReader; + faceDetectionResult = JsonSerializer.Deserialize(ref utf8JsonReaderFaceDetectionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("GraphicsResult") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("ImageQualityResult") ?? false) + { + Utf8JsonReader utf8JsonReaderImageQualityResult = utf8JsonReader; + imageQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderImageQualityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("ImagesResult") ?? false) + { + Utf8JsonReader utf8JsonReaderImagesResult = utf8JsonReader; + imagesResult = JsonSerializer.Deserialize(ref utf8JsonReaderImagesResult, jsonSerializerOptions); + } + if (discriminator?.Equals("LexicalAnalysisResult") ?? false) + { + Utf8JsonReader utf8JsonReaderLexicalAnalysisResult = utf8JsonReader; + lexicalAnalysisResult = JsonSerializer.Deserialize(ref utf8JsonReaderLexicalAnalysisResult, jsonSerializerOptions); + } + if (discriminator?.Equals("LicenseResult") ?? false) + { + Utf8JsonReader utf8JsonReaderLicenseResult = utf8JsonReader; + licenseResult = JsonSerializer.Deserialize(ref utf8JsonReaderLicenseResult, jsonSerializerOptions); + } + if (discriminator?.Equals("MRZDetectorResult") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZDetectorResult = utf8JsonReader; + mRZDetectorResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZDetectorResult, jsonSerializerOptions); + } + if (discriminator?.Equals("MRZPositionResult") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZPositionResult = utf8JsonReader; + mRZPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("MRZTestQualityResult") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZTestQualityResult = utf8JsonReader; + mRZTestQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZTestQualityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("RFIDGraphicsInfoResult") ?? false) + { + Utf8JsonReader utf8JsonReaderRFIDGraphicsInfoResult = utf8JsonReader; + rFIDGraphicsInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDGraphicsInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("RFIDTextDataResult") ?? false) + { + Utf8JsonReader utf8JsonReaderRFIDTextDataResult = utf8JsonReader; + rFIDTextDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("StatusResult") ?? false) + { + Utf8JsonReader utf8JsonReaderStatusResult = utf8JsonReader; + statusResult = JsonSerializer.Deserialize(ref utf8JsonReaderStatusResult, jsonSerializerOptions); + } + if (discriminator?.Equals("TextDataResult") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("TextResult") ?? false) + { + Utf8JsonReader utf8JsonReaderTextResult = utf8JsonReader; + textResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextResult, jsonSerializerOptions); + } + } + } + } + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class ContainerListListInner.", nameof(resultType)); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ContainerListListInner."); + + if (documentImageResult != null) + return new ContainerListListInner(documentImageResult); + + if (documentBinaryInfoResult != null) + return new ContainerListListInner(documentBinaryInfoResult); + + if (rFIDTextDataResult != null) + return new ContainerListListInner(rFIDTextDataResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (documentBinaryInfoResult != null) + return new ContainerListListInner(documentBinaryInfoResult); + + if (rFIDGraphicsInfoResult != null) + return new ContainerListListInner(rFIDGraphicsInfoResult); + + if (byteArrayResult != null) + return new ContainerListListInner(byteArrayResult); + + if (lexicalAnalysisResult != null) + return new ContainerListListInner(lexicalAnalysisResult); + + if (documentImageResult != null) + return new ContainerListListInner(documentImageResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (authenticityResult != null) + return new ContainerListListInner(authenticityResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (imageQualityResult != null) + return new ContainerListListInner(imageQualityResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (statusResult != null) + return new ContainerListListInner(statusResult); + + if (authenticityResult != null) + return new ContainerListListInner(authenticityResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (textResult != null) + return new ContainerListListInner(textResult); + + if (imagesResult != null) + return new ContainerListListInner(imagesResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (authenticityResult != null) + return new ContainerListListInner(authenticityResult); + + if (encryptedRCLResult != null) + return new ContainerListListInner(encryptedRCLResult); + + if (docBarCodeInfo != null) + return new ContainerListListInner(docBarCodeInfo); + + if (licenseResult != null) + return new ContainerListListInner(licenseResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (mRZPositionResult != null) + return new ContainerListListInner(mRZPositionResult); + + if (documentPositionResult != null) + return new ContainerListListInner(documentPositionResult); + + if (mRZTestQualityResult != null) + return new ContainerListListInner(mRZTestQualityResult); + + if (documentTypesCandidatesResult != null) + return new ContainerListListInner(documentTypesCandidatesResult); + + if (documentPositionResult != null) + return new ContainerListListInner(documentPositionResult); + + if (mRZDetectorResult != null) + return new ContainerListListInner(mRZDetectorResult); + + if (chosenDocumentTypeResult != null) + return new ContainerListListInner(chosenDocumentTypeResult); + + if (faceDetectionResult != null) + return new ContainerListListInner(faceDetectionResult); + + if (authenticityResult != null) + return new ContainerListListInner(authenticityResult); + + if (byteArrayResult != null) + return new ContainerListListInner(byteArrayResult); + + if (chosenDocumentTypeResult != null) + return new ContainerListListInner(chosenDocumentTypeResult); + + if (docBarCodeInfo != null) + return new ContainerListListInner(docBarCodeInfo); + + if (documentBinaryInfoResult != null) + return new ContainerListListInner(documentBinaryInfoResult); + + if (documentImageResult != null) + return new ContainerListListInner(documentImageResult); + + if (documentPositionResult != null) + return new ContainerListListInner(documentPositionResult); + + if (documentTypesCandidatesResult != null) + return new ContainerListListInner(documentTypesCandidatesResult); + + if (encryptedRCLResult != null) + return new ContainerListListInner(encryptedRCLResult); + + if (faceDetectionResult != null) + return new ContainerListListInner(faceDetectionResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (imageQualityResult != null) + return new ContainerListListInner(imageQualityResult); + + if (imagesResult != null) + return new ContainerListListInner(imagesResult); + + if (lexicalAnalysisResult != null) + return new ContainerListListInner(lexicalAnalysisResult); + + if (licenseResult != null) + return new ContainerListListInner(licenseResult); + + if (mRZDetectorResult != null) + return new ContainerListListInner(mRZDetectorResult); + + if (mRZPositionResult != null) + return new ContainerListListInner(mRZPositionResult); + + if (mRZTestQualityResult != null) + return new ContainerListListInner(mRZTestQualityResult); + + if (rFIDGraphicsInfoResult != null) + return new ContainerListListInner(rFIDGraphicsInfoResult); + + if (rFIDTextDataResult != null) + return new ContainerListListInner(rFIDTextDataResult); + + if (statusResult != null) + return new ContainerListListInner(statusResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (textResult != null) + return new ContainerListListInner(textResult); + + throw new JsonException(); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + if (containerListListInner.StatusResult != null) + { + StatusResultJsonConverter statusResultJsonConverter = (StatusResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.StatusResult.GetType())); + statusResultJsonConverter.WriteProperties(writer, containerListListInner.StatusResult, jsonSerializerOptions); + } + + if (containerListListInner.TextResult != null) + { + TextResultJsonConverter textResultJsonConverter = (TextResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.TextResult.GetType())); + textResultJsonConverter.WriteProperties(writer, containerListListInner.TextResult, jsonSerializerOptions); + } + + if (containerListListInner.DocumentImageResult != null) + { + DocumentImageResultJsonConverter documentImageResultJsonConverter = (DocumentImageResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentImageResult.GetType())); + documentImageResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentImageResult, jsonSerializerOptions); + } + + if (containerListListInner.ImagesResult != null) + { + ImagesResultJsonConverter imagesResultJsonConverter = (ImagesResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ImagesResult.GetType())); + imagesResultJsonConverter.WriteProperties(writer, containerListListInner.ImagesResult, jsonSerializerOptions); + } + + if (containerListListInner.ChosenDocumentTypeResult != null) + { + ChosenDocumentTypeResultJsonConverter chosenDocumentTypeResultJsonConverter = (ChosenDocumentTypeResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ChosenDocumentTypeResult.GetType())); + chosenDocumentTypeResultJsonConverter.WriteProperties(writer, containerListListInner.ChosenDocumentTypeResult, jsonSerializerOptions); + } + + if (containerListListInner.DocumentTypesCandidatesResult != null) + { + DocumentTypesCandidatesResultJsonConverter documentTypesCandidatesResultJsonConverter = (DocumentTypesCandidatesResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentTypesCandidatesResult.GetType())); + documentTypesCandidatesResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentTypesCandidatesResult, jsonSerializerOptions); + } + + if (containerListListInner.TextDataResult != null) + { + TextDataResultJsonConverter textDataResultJsonConverter = (TextDataResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.TextDataResult.GetType())); + textDataResultJsonConverter.WriteProperties(writer, containerListListInner.TextDataResult, jsonSerializerOptions); + } + + if (containerListListInner.GraphicsResult != null) + { + GraphicsResultJsonConverter graphicsResultJsonConverter = (GraphicsResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.GraphicsResult.GetType())); + graphicsResultJsonConverter.WriteProperties(writer, containerListListInner.GraphicsResult, jsonSerializerOptions); + } + + if (containerListListInner.LexicalAnalysisResult != null) + { + LexicalAnalysisResultJsonConverter lexicalAnalysisResultJsonConverter = (LexicalAnalysisResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.LexicalAnalysisResult.GetType())); + lexicalAnalysisResultJsonConverter.WriteProperties(writer, containerListListInner.LexicalAnalysisResult, jsonSerializerOptions); + } + + if (containerListListInner.AuthenticityResult != null) + { + AuthenticityResultJsonConverter authenticityResultJsonConverter = (AuthenticityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.AuthenticityResult.GetType())); + authenticityResultJsonConverter.WriteProperties(writer, containerListListInner.AuthenticityResult, jsonSerializerOptions); + } + + if (containerListListInner.ImageQualityResult != null) + { + ImageQualityResultJsonConverter imageQualityResultJsonConverter = (ImageQualityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ImageQualityResult.GetType())); + imageQualityResultJsonConverter.WriteProperties(writer, containerListListInner.ImageQualityResult, jsonSerializerOptions); + } + + if (containerListListInner.DocumentPositionResult != null) + { + DocumentPositionResultJsonConverter documentPositionResultJsonConverter = (DocumentPositionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentPositionResult.GetType())); + documentPositionResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentPositionResult, jsonSerializerOptions); + } + + if (containerListListInner.DocBarCodeInfo != null) + { + DocBarCodeInfoJsonConverter docBarCodeInfoJsonConverter = (DocBarCodeInfoJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocBarCodeInfo.GetType())); + docBarCodeInfoJsonConverter.WriteProperties(writer, containerListListInner.DocBarCodeInfo, jsonSerializerOptions); + } + + if (containerListListInner.LicenseResult != null) + { + LicenseResultJsonConverter licenseResultJsonConverter = (LicenseResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.LicenseResult.GetType())); + licenseResultJsonConverter.WriteProperties(writer, containerListListInner.LicenseResult, jsonSerializerOptions); + } + + if (containerListListInner.EncryptedRCLResult != null) + { + EncryptedRCLResultJsonConverter encryptedRCLResultJsonConverter = (EncryptedRCLResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.EncryptedRCLResult.GetType())); + encryptedRCLResultJsonConverter.WriteProperties(writer, containerListListInner.EncryptedRCLResult, jsonSerializerOptions); + } + + if (containerListListInner.DocumentBinaryInfoResult != null) + { + DocumentBinaryInfoResultJsonConverter documentBinaryInfoResultJsonConverter = (DocumentBinaryInfoResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentBinaryInfoResult.GetType())); + documentBinaryInfoResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentBinaryInfoResult, jsonSerializerOptions); + } + + if (containerListListInner.ByteArrayResult != null) + { + ByteArrayResultJsonConverter byteArrayResultJsonConverter = (ByteArrayResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ByteArrayResult.GetType())); + byteArrayResultJsonConverter.WriteProperties(writer, containerListListInner.ByteArrayResult, jsonSerializerOptions); + } + + if (containerListListInner.FaceDetectionResult != null) + { + FaceDetectionResultJsonConverter faceDetectionResultJsonConverter = (FaceDetectionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.FaceDetectionResult.GetType())); + faceDetectionResultJsonConverter.WriteProperties(writer, containerListListInner.FaceDetectionResult, jsonSerializerOptions); + } + + if (containerListListInner.MRZDetectorResult != null) + { + MRZDetectorResultJsonConverter mRZDetectorResultJsonConverter = (MRZDetectorResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZDetectorResult.GetType())); + mRZDetectorResultJsonConverter.WriteProperties(writer, containerListListInner.MRZDetectorResult, jsonSerializerOptions); + } + + if (containerListListInner.MRZPositionResult != null) + { + MRZPositionResultJsonConverter mRZPositionResultJsonConverter = (MRZPositionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZPositionResult.GetType())); + mRZPositionResultJsonConverter.WriteProperties(writer, containerListListInner.MRZPositionResult, jsonSerializerOptions); + } + + if (containerListListInner.MRZTestQualityResult != null) + { + MRZTestQualityResultJsonConverter mRZTestQualityResultJsonConverter = (MRZTestQualityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZTestQualityResult.GetType())); + mRZTestQualityResultJsonConverter.WriteProperties(writer, containerListListInner.MRZTestQualityResult, jsonSerializerOptions); + } + + if (containerListListInner.RFIDGraphicsInfoResult != null) + { + RFIDGraphicsInfoResultJsonConverter rFIDGraphicsInfoResultJsonConverter = (RFIDGraphicsInfoResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.RFIDGraphicsInfoResult.GetType())); + rFIDGraphicsInfoResultJsonConverter.WriteProperties(writer, containerListListInner.RFIDGraphicsInfoResult, jsonSerializerOptions); + } + + if (containerListListInner.RFIDTextDataResult != null) + { + RFIDTextDataResultJsonConverter rFIDTextDataResultJsonConverter = (RFIDTextDataResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.RFIDTextDataResult.GetType())); + rFIDTextDataResultJsonConverter.WriteProperties(writer, containerListListInner.RFIDTextDataResult, jsonSerializerOptions); + } + + WriteProperties(writer, containerListListInner, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) + { + + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/Critical.cs b/src/Regula.DocumentReader.WebClient/Model/Critical.cs index 0a2dcba..ee57b21 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Critical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Critical.cs @@ -1,38 +1,170 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Enumeration contains identifiers determining the criticality of the security element - public class Critical + /// + /// Enumeration contains identifiers determining the criticality of the security element + public enum Critical + { + /// + /// Enum NOT_CRITICAL for value: 0 + /// + NOT_CRITICAL = 0, + + /// + /// Enum CRITICAL for value: 1 + /// + CRITICAL = 1 + } + + /// + /// Converts to and from the JSON value + /// + public static class CriticalValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static Critical FromString(string value) + { + if (value.Equals((0).ToString())) + return Critical.NOT_CRITICAL; + + if (value.Equals((1).ToString())) + return Critical.CRITICAL; + + throw new NotImplementedException($"Could not convert value to type Critical: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static Critical? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return Critical.NOT_CRITICAL; + + if (value.Equals((1).ToString())) + return Critical.CRITICAL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(Critical value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class CriticalJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override Critical Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + Critical? result = rawValue == null + ? null + : CriticalValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the Critical to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Critical critical, JsonSerializerOptions options) + { + writer.WriteStringValue(critical.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class CriticalNullableJsonConverter : JsonConverter { + /// + /// Returns a Critical from the Json object + /// + /// + /// + /// + /// + public override Critical? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + Critical? result = rawValue == null + ? null + : CriticalValueConverter.FromStringOrDefault(rawValue); - /** Security element may be absent in a valid document */ - public const int NOT_CRITICAL = 0; + if (result != null) + return result.Value; - /** Security element must be present in a valid document */ - public const int CRITICAL = 1; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Critical? critical, JsonSerializerOptions options) + { + writer.WriteStringValue(critical?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs b/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs index 882791c..7796e85 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs @@ -1,97 +1,69 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// CrossSourceValueComparison /// - [DataContract] - public partial class CrossSourceValueComparison : IEquatable, IValidatableObject + public partial class CrossSourceValueComparison : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected CrossSourceValueComparison() { } - /// - /// Initializes a new instance of the class. - /// - /// sourceLeft (required). - /// sourceRight (required). - /// status (required). - public CrossSourceValueComparison(string sourceLeft = default(string), string sourceRight = default(string), int status = default(int)) + /// sourceLeft + /// sourceRight + /// status + [JsonConstructor] + public CrossSourceValueComparison(Source sourceLeft, Source sourceRight, CheckResult status) { - // to ensure "sourceLeft" is required (not null) - if (sourceLeft == null) - { - throw new InvalidDataException("sourceLeft is a required property for CrossSourceValueComparison and cannot be null"); - } - else - { - this.SourceLeft = sourceLeft; - } - - // to ensure "sourceRight" is required (not null) - if (sourceRight == null) - { - throw new InvalidDataException("sourceRight is a required property for CrossSourceValueComparison and cannot be null"); - } - else - { - this.SourceRight = sourceRight; - } - - // to ensure "status" is required (not null) - if (status == null) - { - throw new InvalidDataException("status is a required property for CrossSourceValueComparison and cannot be null"); - } - else - { - this.Status = status; - } - + SourceLeft = sourceLeft; + SourceRight = sourceRight; + Status = status; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets SourceLeft /// - [DataMember(Name="sourceLeft", EmitDefaultValue=true)] - public string SourceLeft { get; set; } + [JsonPropertyName("sourceLeft")] + public Source SourceLeft { get; set; } /// /// Gets or Sets SourceRight /// - [DataMember(Name="sourceRight", EmitDefaultValue=true)] - public string SourceRight { get; set; } + [JsonPropertyName("sourceRight")] + public Source SourceRight { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name="status", EmitDefaultValue=true)] - public int Status { get; set; } + [JsonPropertyName("status")] + public CheckResult Status { get; set; } /// /// Returns the string presentation of the object @@ -99,7 +71,7 @@ protected CrossSourceValueComparison() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class CrossSourceValueComparison {\n"); sb.Append(" SourceLeft: ").Append(SourceLeft).Append("\n"); sb.Append(" SourceRight: ").Append(SourceRight).Append("\n"); @@ -107,82 +79,133 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as CrossSourceValueComparison); + yield break; } + } + /// + /// A Json converter for type + /// + public class CrossSourceValueComparisonJsonConverter : JsonConverter + { /// - /// Returns true if CrossSourceValueComparison instances are equal + /// Deserializes json to /// - /// Instance of CrossSourceValueComparison to be compared - /// Boolean - public bool Equals(CrossSourceValueComparison input) + /// + /// + /// + /// + /// + public override CrossSourceValueComparison Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.SourceLeft == input.SourceLeft || - (this.SourceLeft != null && - this.SourceLeft.Equals(input.SourceLeft)) - ) && - ( - this.SourceRight == input.SourceRight || - (this.SourceRight != null && - this.SourceRight.Equals(input.SourceRight)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option sourceLeft = default; + Option sourceRight = default; + Option status = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "sourceLeft": + string? sourceLeftRawValue = utf8JsonReader.GetString(); + if (sourceLeftRawValue != null) + sourceLeft = new Option(SourceValueConverter.FromStringOrDefault(sourceLeftRawValue)); + break; + case "sourceRight": + string? sourceRightRawValue = utf8JsonReader.GetString(); + if (sourceRightRawValue != null) + sourceRight = new Option(SourceValueConverter.FromStringOrDefault(sourceRightRawValue)); + break; + case "status": + string? statusRawValue = utf8JsonReader.GetString(); + if (statusRawValue != null) + status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); + break; + default: + break; + } + } + } + + if (!sourceLeft.IsSet) + throw new ArgumentException("Property is required for class CrossSourceValueComparison.", nameof(sourceLeft)); + + if (!sourceRight.IsSet) + throw new ArgumentException("Property is required for class CrossSourceValueComparison.", nameof(sourceRight)); + + if (!status.IsSet) + throw new ArgumentException("Property is required for class CrossSourceValueComparison.", nameof(status)); + + if (sourceLeft.IsSet && sourceLeft.Value == null) + throw new ArgumentNullException(nameof(sourceLeft), "Property is not nullable for class CrossSourceValueComparison."); + + if (sourceRight.IsSet && sourceRight.Value == null) + throw new ArgumentNullException(nameof(sourceRight), "Property is not nullable for class CrossSourceValueComparison."); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class CrossSourceValueComparison."); + + return new CrossSourceValueComparison(sourceLeft.Value!.Value!, sourceRight.Value!.Value!, status.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, CrossSourceValueComparison crossSourceValueComparison, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceLeft != null) - hashCode = hashCode * 59 + this.SourceLeft.GetHashCode(); - if (this.SourceRight != null) - hashCode = hashCode * 59 + this.SourceRight.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, crossSourceValueComparison, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, CrossSourceValueComparison crossSourceValueComparison, JsonSerializerOptions jsonSerializerOptions) { - yield break; + var sourceLeftRawValue = SourceValueConverter.ToJsonValue(crossSourceValueComparison.SourceLeft); + writer.WriteString("sourceLeft", sourceLeftRawValue); + + var sourceRightRawValue = SourceValueConverter.ToJsonValue(crossSourceValueComparison.SourceRight); + writer.WriteString("sourceRight", sourceRightRawValue); + + var statusRawValue = CheckResultValueConverter.ToJsonValue(crossSourceValueComparison.Status); + writer.WriteNumber("status", statusRawValue); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs index 2096925..0bb73fe 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs @@ -1,81 +1,99 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DataModule /// - [DataContract] - public partial class DataModule : IEquatable, IValidatableObject + public partial class DataModule : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mData. - /// mLength. - /// mReserved1. - /// mReserver2. - /// mType. - public DataModule(string mData = default(string), int mLength = default(int), int mReserved1 = default(int), int mReserver2 = default(int), int mType = default(int)) + /// mData + /// mLength + /// mType + /// mReserved1 + /// mReserver2 + [JsonConstructor] + public DataModule(string mData, int mLength, BarCodeModuleType mType, Option mReserved1 = default, Option mReserver2 = default) { - this.MData = mData; - this.MLength = mLength; - this.MReserved1 = mReserved1; - this.MReserver2 = mReserver2; - this.MType = mType; + MData = mData; + MLength = mLength; + MType = mType; + MReserved1Option = mReserved1; + MReserver2Option = mReserver2; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Gets or Sets MType + /// + [JsonPropertyName("mType")] + public BarCodeModuleType MType { get; set; } + /// /// Gets or Sets MData /// - [DataMember(Name="mData", EmitDefaultValue=false)] + [JsonPropertyName("mData")] public string MData { get; set; } /// /// Gets or Sets MLength /// - [DataMember(Name="mLength", EmitDefaultValue=false)] + [JsonPropertyName("mLength")] public int MLength { get; set; } + /// + /// Used to track the state of MReserved1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option MReserved1Option { get; private set; } + /// /// Gets or Sets MReserved1 /// - [DataMember(Name="mReserved1", EmitDefaultValue=false)] - public int MReserved1 { get; set; } + [JsonPropertyName("mReserved1")] + public int? MReserved1 { get { return this.MReserved1Option; } set { this.MReserved1Option = new(value); } } /// - /// Gets or Sets MReserver2 + /// Used to track the state of MReserver2 /// - [DataMember(Name="mReserver2", EmitDefaultValue=false)] - public int MReserver2 { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option MReserver2Option { get; private set; } /// - /// Gets or Sets MType + /// Gets or Sets MReserver2 /// - [DataMember(Name="mType", EmitDefaultValue=false)] - public int MType { get; set; } + [JsonPropertyName("mReserver2")] + public int? MReserver2 { get { return this.MReserver2Option; } set { this.MReserver2Option = new(value); } } /// /// Returns the string presentation of the object @@ -83,106 +101,163 @@ public partial class DataModule : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DataModule {\n"); sb.Append(" MData: ").Append(MData).Append("\n"); sb.Append(" MLength: ").Append(MLength).Append("\n"); + sb.Append(" MType: ").Append(MType).Append("\n"); sb.Append(" MReserved1: ").Append(MReserved1).Append("\n"); sb.Append(" MReserver2: ").Append(MReserver2).Append("\n"); - sb.Append(" MType: ").Append(MType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as DataModule); + yield break; } + } + /// + /// A Json converter for type + /// + public class DataModuleJsonConverter : JsonConverter + { /// - /// Returns true if DataModule instances are equal + /// Deserializes json to /// - /// Instance of DataModule to be compared - /// Boolean - public bool Equals(DataModule input) + /// + /// + /// + /// + /// + public override DataModule Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.MData == input.MData || - (this.MData != null && - this.MData.Equals(input.MData)) - ) && - ( - this.MLength == input.MLength || - (this.MLength != null && - this.MLength.Equals(input.MLength)) - ) && - ( - this.MReserved1 == input.MReserved1 || - (this.MReserved1 != null && - this.MReserved1.Equals(input.MReserved1)) - ) && - ( - this.MReserver2 == input.MReserver2 || - (this.MReserver2 != null && - this.MReserver2.Equals(input.MReserver2)) - ) && - ( - this.MType == input.MType || - (this.MType != null && - this.MType.Equals(input.MType)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option mData = default; + Option mLength = default; + Option mType = default; + Option mReserved1 = default; + Option mReserver2 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "mData": + mData = new Option(utf8JsonReader.GetString()!); + break; + case "mLength": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mLength = new Option(utf8JsonReader.GetInt32()); + break; + case "mType": + string? mTypeRawValue = utf8JsonReader.GetString(); + if (mTypeRawValue != null) + mType = new Option(BarCodeModuleTypeValueConverter.FromStringOrDefault(mTypeRawValue)); + break; + case "mReserved1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mReserved1 = new Option(utf8JsonReader.GetInt32()); + break; + case "mReserver2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mReserver2 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!mData.IsSet) + throw new ArgumentException("Property is required for class DataModule.", nameof(mData)); + + if (!mLength.IsSet) + throw new ArgumentException("Property is required for class DataModule.", nameof(mLength)); + + if (!mType.IsSet) + throw new ArgumentException("Property is required for class DataModule.", nameof(mType)); + + if (mData.IsSet && mData.Value == null) + throw new ArgumentNullException(nameof(mData), "Property is not nullable for class DataModule."); + + if (mLength.IsSet && mLength.Value == null) + throw new ArgumentNullException(nameof(mLength), "Property is not nullable for class DataModule."); + + if (mType.IsSet && mType.Value == null) + throw new ArgumentNullException(nameof(mType), "Property is not nullable for class DataModule."); + + if (mReserved1.IsSet && mReserved1.Value == null) + throw new ArgumentNullException(nameof(mReserved1), "Property is not nullable for class DataModule."); + + if (mReserver2.IsSet && mReserver2.Value == null) + throw new ArgumentNullException(nameof(mReserver2), "Property is not nullable for class DataModule."); + + return new DataModule(mData.Value!, mLength.Value!.Value!, mType.Value!.Value!, mReserved1, mReserver2); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DataModule dataModule, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MData != null) - hashCode = hashCode * 59 + this.MData.GetHashCode(); - if (this.MLength != null) - hashCode = hashCode * 59 + this.MLength.GetHashCode(); - if (this.MReserved1 != null) - hashCode = hashCode * 59 + this.MReserved1.GetHashCode(); - if (this.MReserver2 != null) - hashCode = hashCode * 59 + this.MReserver2.GetHashCode(); - if (this.MType != null) - hashCode = hashCode * 59 + this.MType.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, dataModule, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DataModule dataModule, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (dataModule.MData == null) + throw new ArgumentNullException(nameof(dataModule.MData), "Property is required for class DataModule."); + + writer.WriteString("mData", dataModule.MData); + + writer.WriteNumber("mLength", dataModule.MLength); + + var mTypeRawValue = BarCodeModuleTypeValueConverter.ToJsonValue(dataModule.MType); + writer.WriteNumber("mType", mTypeRawValue); + + if (dataModule.MReserved1Option.IsSet) + writer.WriteNumber("mReserved1", dataModule.MReserved1Option.Value!.Value); + + if (dataModule.MReserver2Option.IsSet) + writer.WriteNumber("mReserver2", dataModule.MReserver2Option.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs index 13f077d..515920d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs @@ -1,183 +1,125 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// - /// DetailsOptical + /// Details on performed optical checks /// - [DataContract] - public partial class DetailsOptical : IEquatable, IValidatableObject + public partial class DetailsOptical : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DetailsOptical() { } - /// - /// Initializes a new instance of the class. - /// - /// overallStatus (required). - /// docType (required). - /// expiry (required). - /// imageQA (required). - /// mrz (required). - /// Number of processed pages in the document (required). - /// security (required). - /// text (required). - public DetailsOptical(int overallStatus = default(int), int docType = default(int), int expiry = default(int), int imageQA = default(int), int mrz = default(int), int pagesCount = default(int), int security = default(int), int text = default(int)) + /// overallStatus + /// docType + /// expiry + /// imageQA + /// mrz + /// Number of processed pages in the document + /// security + /// text + /// vds + [JsonConstructor] + public DetailsOptical(CheckResult overallStatus, CheckResult docType, CheckResult expiry, CheckResult imageQA, CheckResult mrz, int pagesCount, CheckResult security, CheckResult text, Option vds = default) { - // to ensure "overallStatus" is required (not null) - if (overallStatus == null) - { - throw new InvalidDataException("overallStatus is a required property for DetailsOptical and cannot be null"); - } - else - { - this.OverallStatus = overallStatus; - } - - // to ensure "docType" is required (not null) - if (docType == null) - { - throw new InvalidDataException("docType is a required property for DetailsOptical and cannot be null"); - } - else - { - this.DocType = docType; - } - - // to ensure "expiry" is required (not null) - if (expiry == null) - { - throw new InvalidDataException("expiry is a required property for DetailsOptical and cannot be null"); - } - else - { - this.Expiry = expiry; - } - - // to ensure "imageQA" is required (not null) - if (imageQA == null) - { - throw new InvalidDataException("imageQA is a required property for DetailsOptical and cannot be null"); - } - else - { - this.ImageQA = imageQA; - } - - // to ensure "mrz" is required (not null) - if (mrz == null) - { - throw new InvalidDataException("mrz is a required property for DetailsOptical and cannot be null"); - } - else - { - this.Mrz = mrz; - } - - // to ensure "pagesCount" is required (not null) - if (pagesCount == null) - { - throw new InvalidDataException("pagesCount is a required property for DetailsOptical and cannot be null"); - } - else - { - this.PagesCount = pagesCount; - } - - // to ensure "security" is required (not null) - if (security == null) - { - throw new InvalidDataException("security is a required property for DetailsOptical and cannot be null"); - } - else - { - this.Security = security; - } - - // to ensure "text" is required (not null) - if (text == null) - { - throw new InvalidDataException("text is a required property for DetailsOptical and cannot be null"); - } - else - { - this.Text = text; - } - + OverallStatus = overallStatus; + DocType = docType; + Expiry = expiry; + ImageQA = imageQA; + Mrz = mrz; + PagesCount = pagesCount; + Security = security; + Text = text; + VdsOption = vds; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets OverallStatus /// - [DataMember(Name="overallStatus", EmitDefaultValue=true)] - public int OverallStatus { get; set; } + [JsonPropertyName("overallStatus")] + public CheckResult OverallStatus { get; set; } /// /// Gets or Sets DocType /// - [DataMember(Name="docType", EmitDefaultValue=true)] - public int DocType { get; set; } + [JsonPropertyName("docType")] + public CheckResult DocType { get; set; } /// /// Gets or Sets Expiry /// - [DataMember(Name="expiry", EmitDefaultValue=true)] - public int Expiry { get; set; } + [JsonPropertyName("expiry")] + public CheckResult Expiry { get; set; } /// /// Gets or Sets ImageQA /// - [DataMember(Name="imageQA", EmitDefaultValue=true)] - public int ImageQA { get; set; } + [JsonPropertyName("imageQA")] + public CheckResult ImageQA { get; set; } /// /// Gets or Sets Mrz /// - [DataMember(Name="mrz", EmitDefaultValue=true)] - public int Mrz { get; set; } + [JsonPropertyName("mrz")] + public CheckResult Mrz { get; set; } + + /// + /// Gets or Sets Security + /// + [JsonPropertyName("security")] + public CheckResult Security { get; set; } + + /// + /// Gets or Sets Text + /// + [JsonPropertyName("text")] + public CheckResult Text { get; set; } /// /// Number of processed pages in the document /// /// Number of processed pages in the document - [DataMember(Name="pagesCount", EmitDefaultValue=true)] + [JsonPropertyName("pagesCount")] public int PagesCount { get; set; } /// - /// Gets or Sets Security + /// Used to track the state of Vds /// - [DataMember(Name="security", EmitDefaultValue=true)] - public int Security { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option VdsOption { get; private set; } /// - /// Gets or Sets Text + /// Gets or Sets Vds /// - [DataMember(Name="text", EmitDefaultValue=true)] - public int Text { get; set; } + [JsonPropertyName("vds")] + public int? Vds { get { return this.VdsOption; } set { this.VdsOption = new(value); } } /// /// Returns the string presentation of the object @@ -185,7 +127,7 @@ protected DetailsOptical() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DetailsOptical {\n"); sb.Append(" OverallStatus: ").Append(OverallStatus).Append("\n"); sb.Append(" DocType: ").Append(DocType).Append("\n"); @@ -195,120 +137,221 @@ public override string ToString() sb.Append(" PagesCount: ").Append(PagesCount).Append("\n"); sb.Append(" Security: ").Append(Security).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append(" Vds: ").Append(Vds).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as DetailsOptical); + yield break; } + } + /// + /// A Json converter for type + /// + public class DetailsOpticalJsonConverter : JsonConverter + { /// - /// Returns true if DetailsOptical instances are equal + /// Deserializes json to /// - /// Instance of DetailsOptical to be compared - /// Boolean - public bool Equals(DetailsOptical input) + /// + /// + /// + /// + /// + public override DetailsOptical Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.OverallStatus == input.OverallStatus || - (this.OverallStatus != null && - this.OverallStatus.Equals(input.OverallStatus)) - ) && - ( - this.DocType == input.DocType || - (this.DocType != null && - this.DocType.Equals(input.DocType)) - ) && - ( - this.Expiry == input.Expiry || - (this.Expiry != null && - this.Expiry.Equals(input.Expiry)) - ) && - ( - this.ImageQA == input.ImageQA || - (this.ImageQA != null && - this.ImageQA.Equals(input.ImageQA)) - ) && - ( - this.Mrz == input.Mrz || - (this.Mrz != null && - this.Mrz.Equals(input.Mrz)) - ) && - ( - this.PagesCount == input.PagesCount || - (this.PagesCount != null && - this.PagesCount.Equals(input.PagesCount)) - ) && - ( - this.Security == input.Security || - (this.Security != null && - this.Security.Equals(input.Security)) - ) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option overallStatus = default; + Option docType = default; + Option expiry = default; + Option imageQA = default; + Option mrz = default; + Option pagesCount = default; + Option security = default; + Option text = default; + Option vds = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "overallStatus": + string? overallStatusRawValue = utf8JsonReader.GetString(); + if (overallStatusRawValue != null) + overallStatus = new Option(CheckResultValueConverter.FromStringOrDefault(overallStatusRawValue)); + break; + case "docType": + string? docTypeRawValue = utf8JsonReader.GetString(); + if (docTypeRawValue != null) + docType = new Option(CheckResultValueConverter.FromStringOrDefault(docTypeRawValue)); + break; + case "expiry": + string? expiryRawValue = utf8JsonReader.GetString(); + if (expiryRawValue != null) + expiry = new Option(CheckResultValueConverter.FromStringOrDefault(expiryRawValue)); + break; + case "imageQA": + string? imageQARawValue = utf8JsonReader.GetString(); + if (imageQARawValue != null) + imageQA = new Option(CheckResultValueConverter.FromStringOrDefault(imageQARawValue)); + break; + case "mrz": + string? mrzRawValue = utf8JsonReader.GetString(); + if (mrzRawValue != null) + mrz = new Option(CheckResultValueConverter.FromStringOrDefault(mrzRawValue)); + break; + case "pagesCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pagesCount = new Option(utf8JsonReader.GetInt32()); + break; + case "security": + string? securityRawValue = utf8JsonReader.GetString(); + if (securityRawValue != null) + security = new Option(CheckResultValueConverter.FromStringOrDefault(securityRawValue)); + break; + case "text": + string? textRawValue = utf8JsonReader.GetString(); + if (textRawValue != null) + text = new Option(CheckResultValueConverter.FromStringOrDefault(textRawValue)); + break; + case "vds": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + vds = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!overallStatus.IsSet) + throw new ArgumentException("Property is required for class DetailsOptical.", nameof(overallStatus)); + + if (!docType.IsSet) + throw new ArgumentException("Property is required for class DetailsOptical.", nameof(docType)); + + if (!expiry.IsSet) + throw new ArgumentException("Property is required for class DetailsOptical.", nameof(expiry)); + + if (!imageQA.IsSet) + throw new ArgumentException("Property is required for class DetailsOptical.", nameof(imageQA)); + + if (!mrz.IsSet) + throw new ArgumentException("Property is required for class DetailsOptical.", nameof(mrz)); + + if (!pagesCount.IsSet) + throw new ArgumentException("Property is required for class DetailsOptical.", nameof(pagesCount)); + + if (!security.IsSet) + throw new ArgumentException("Property is required for class DetailsOptical.", nameof(security)); + + if (!text.IsSet) + throw new ArgumentException("Property is required for class DetailsOptical.", nameof(text)); + + if (overallStatus.IsSet && overallStatus.Value == null) + throw new ArgumentNullException(nameof(overallStatus), "Property is not nullable for class DetailsOptical."); + + if (docType.IsSet && docType.Value == null) + throw new ArgumentNullException(nameof(docType), "Property is not nullable for class DetailsOptical."); + + if (expiry.IsSet && expiry.Value == null) + throw new ArgumentNullException(nameof(expiry), "Property is not nullable for class DetailsOptical."); + + if (imageQA.IsSet && imageQA.Value == null) + throw new ArgumentNullException(nameof(imageQA), "Property is not nullable for class DetailsOptical."); + + if (mrz.IsSet && mrz.Value == null) + throw new ArgumentNullException(nameof(mrz), "Property is not nullable for class DetailsOptical."); + + if (pagesCount.IsSet && pagesCount.Value == null) + throw new ArgumentNullException(nameof(pagesCount), "Property is not nullable for class DetailsOptical."); + + if (security.IsSet && security.Value == null) + throw new ArgumentNullException(nameof(security), "Property is not nullable for class DetailsOptical."); + + if (text.IsSet && text.Value == null) + throw new ArgumentNullException(nameof(text), "Property is not nullable for class DetailsOptical."); + + if (vds.IsSet && vds.Value == null) + throw new ArgumentNullException(nameof(vds), "Property is not nullable for class DetailsOptical."); + + return new DetailsOptical(overallStatus.Value!.Value!, docType.Value!.Value!, expiry.Value!.Value!, imageQA.Value!.Value!, mrz.Value!.Value!, pagesCount.Value!.Value!, security.Value!.Value!, text.Value!.Value!, vds); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DetailsOptical detailsOptical, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OverallStatus != null) - hashCode = hashCode * 59 + this.OverallStatus.GetHashCode(); - if (this.DocType != null) - hashCode = hashCode * 59 + this.DocType.GetHashCode(); - if (this.Expiry != null) - hashCode = hashCode * 59 + this.Expiry.GetHashCode(); - if (this.ImageQA != null) - hashCode = hashCode * 59 + this.ImageQA.GetHashCode(); - if (this.Mrz != null) - hashCode = hashCode * 59 + this.Mrz.GetHashCode(); - if (this.PagesCount != null) - hashCode = hashCode * 59 + this.PagesCount.GetHashCode(); - if (this.Security != null) - hashCode = hashCode * 59 + this.Security.GetHashCode(); - if (this.Text != null) - hashCode = hashCode * 59 + this.Text.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, detailsOptical, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DetailsOptical detailsOptical, JsonSerializerOptions jsonSerializerOptions) { - yield break; + var overallStatusRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.OverallStatus); + writer.WriteNumber("overallStatus", overallStatusRawValue); + + var docTypeRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.DocType); + writer.WriteNumber("docType", docTypeRawValue); + + var expiryRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.Expiry); + writer.WriteNumber("expiry", expiryRawValue); + + var imageQARawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.ImageQA); + writer.WriteNumber("imageQA", imageQARawValue); + + var mrzRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.Mrz); + writer.WriteNumber("mrz", mrzRawValue); + + writer.WriteNumber("pagesCount", detailsOptical.PagesCount); + + var securityRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.Security); + writer.WriteNumber("security", securityRawValue); + + var textRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.Text); + writer.WriteNumber("text", textRawValue); + + if (detailsOptical.VdsOption.IsSet) + writer.WriteNumber("vds", detailsOptical.VdsOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs index fc6077f..a0e3739 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs @@ -1,165 +1,101 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// - /// DetailsRFID + /// Details on performed RFID checks /// - [DataContract] - public partial class DetailsRFID : IEquatable, IValidatableObject + public partial class DetailsRFID : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DetailsRFID() { } - /// - /// Initializes a new instance of the class. - /// - /// overallStatus (required). - /// aA (required). - /// bAC (required). - /// cA (required). - /// pA (required). - /// pACE (required). - /// tA (required). - public DetailsRFID(int overallStatus = default(int), int aA = default(int), int bAC = default(int), int cA = default(int), int pA = default(int), int pACE = default(int), int tA = default(int)) + /// overallStatus + /// aA + /// bAC + /// cA + /// pA + /// pACE + /// tA + [JsonConstructor] + public DetailsRFID(CheckResult overallStatus, CheckResult aA, CheckResult bAC, CheckResult cA, CheckResult pA, CheckResult pACE, CheckResult tA) { - // to ensure "overallStatus" is required (not null) - if (overallStatus == null) - { - throw new InvalidDataException("overallStatus is a required property for DetailsRFID and cannot be null"); - } - else - { - this.OverallStatus = overallStatus; - } - - // to ensure "aA" is required (not null) - if (aA == null) - { - throw new InvalidDataException("aA is a required property for DetailsRFID and cannot be null"); - } - else - { - this.AA = aA; - } - - // to ensure "bAC" is required (not null) - if (bAC == null) - { - throw new InvalidDataException("bAC is a required property for DetailsRFID and cannot be null"); - } - else - { - this.BAC = bAC; - } - - // to ensure "cA" is required (not null) - if (cA == null) - { - throw new InvalidDataException("cA is a required property for DetailsRFID and cannot be null"); - } - else - { - this.CA = cA; - } - - // to ensure "pA" is required (not null) - if (pA == null) - { - throw new InvalidDataException("pA is a required property for DetailsRFID and cannot be null"); - } - else - { - this.PA = pA; - } - - // to ensure "pACE" is required (not null) - if (pACE == null) - { - throw new InvalidDataException("pACE is a required property for DetailsRFID and cannot be null"); - } - else - { - this.PACE = pACE; - } - - // to ensure "tA" is required (not null) - if (tA == null) - { - throw new InvalidDataException("tA is a required property for DetailsRFID and cannot be null"); - } - else - { - this.TA = tA; - } - + OverallStatus = overallStatus; + AA = aA; + BAC = bAC; + CA = cA; + PA = pA; + PACE = pACE; + TA = tA; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets OverallStatus /// - [DataMember(Name="overallStatus", EmitDefaultValue=true)] - public int OverallStatus { get; set; } + [JsonPropertyName("overallStatus")] + public CheckResult OverallStatus { get; set; } /// /// Gets or Sets AA /// - [DataMember(Name="AA", EmitDefaultValue=true)] - public int AA { get; set; } + [JsonPropertyName("AA")] + public CheckResult AA { get; set; } /// /// Gets or Sets BAC /// - [DataMember(Name="BAC", EmitDefaultValue=true)] - public int BAC { get; set; } + [JsonPropertyName("BAC")] + public CheckResult BAC { get; set; } /// /// Gets or Sets CA /// - [DataMember(Name="CA", EmitDefaultValue=true)] - public int CA { get; set; } + [JsonPropertyName("CA")] + public CheckResult CA { get; set; } /// /// Gets or Sets PA /// - [DataMember(Name="PA", EmitDefaultValue=true)] - public int PA { get; set; } + [JsonPropertyName("PA")] + public CheckResult PA { get; set; } /// /// Gets or Sets PACE /// - [DataMember(Name="PACE", EmitDefaultValue=true)] - public int PACE { get; set; } + [JsonPropertyName("PACE")] + public CheckResult PACE { get; set; } /// /// Gets or Sets TA /// - [DataMember(Name="TA", EmitDefaultValue=true)] - public int TA { get; set; } + [JsonPropertyName("TA")] + public CheckResult TA { get; set; } /// /// Returns the string presentation of the object @@ -167,7 +103,7 @@ protected DetailsRFID() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DetailsRFID {\n"); sb.Append(" OverallStatus: ").Append(OverallStatus).Append("\n"); sb.Append(" AA: ").Append(AA).Append("\n"); @@ -179,110 +115,193 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as DetailsRFID); + yield break; } + } + /// + /// A Json converter for type + /// + public class DetailsRFIDJsonConverter : JsonConverter + { /// - /// Returns true if DetailsRFID instances are equal + /// Deserializes json to /// - /// Instance of DetailsRFID to be compared - /// Boolean - public bool Equals(DetailsRFID input) + /// + /// + /// + /// + /// + public override DetailsRFID Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.OverallStatus == input.OverallStatus || - (this.OverallStatus != null && - this.OverallStatus.Equals(input.OverallStatus)) - ) && - ( - this.AA == input.AA || - (this.AA != null && - this.AA.Equals(input.AA)) - ) && - ( - this.BAC == input.BAC || - (this.BAC != null && - this.BAC.Equals(input.BAC)) - ) && - ( - this.CA == input.CA || - (this.CA != null && - this.CA.Equals(input.CA)) - ) && - ( - this.PA == input.PA || - (this.PA != null && - this.PA.Equals(input.PA)) - ) && - ( - this.PACE == input.PACE || - (this.PACE != null && - this.PACE.Equals(input.PACE)) - ) && - ( - this.TA == input.TA || - (this.TA != null && - this.TA.Equals(input.TA)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option overallStatus = default; + Option aA = default; + Option bAC = default; + Option cA = default; + Option pA = default; + Option pACE = default; + Option tA = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "overallStatus": + string? overallStatusRawValue = utf8JsonReader.GetString(); + if (overallStatusRawValue != null) + overallStatus = new Option(CheckResultValueConverter.FromStringOrDefault(overallStatusRawValue)); + break; + case "AA": + string? aARawValue = utf8JsonReader.GetString(); + if (aARawValue != null) + aA = new Option(CheckResultValueConverter.FromStringOrDefault(aARawValue)); + break; + case "BAC": + string? bACRawValue = utf8JsonReader.GetString(); + if (bACRawValue != null) + bAC = new Option(CheckResultValueConverter.FromStringOrDefault(bACRawValue)); + break; + case "CA": + string? cARawValue = utf8JsonReader.GetString(); + if (cARawValue != null) + cA = new Option(CheckResultValueConverter.FromStringOrDefault(cARawValue)); + break; + case "PA": + string? pARawValue = utf8JsonReader.GetString(); + if (pARawValue != null) + pA = new Option(CheckResultValueConverter.FromStringOrDefault(pARawValue)); + break; + case "PACE": + string? pACERawValue = utf8JsonReader.GetString(); + if (pACERawValue != null) + pACE = new Option(CheckResultValueConverter.FromStringOrDefault(pACERawValue)); + break; + case "TA": + string? tARawValue = utf8JsonReader.GetString(); + if (tARawValue != null) + tA = new Option(CheckResultValueConverter.FromStringOrDefault(tARawValue)); + break; + default: + break; + } + } + } + + if (!overallStatus.IsSet) + throw new ArgumentException("Property is required for class DetailsRFID.", nameof(overallStatus)); + + if (!aA.IsSet) + throw new ArgumentException("Property is required for class DetailsRFID.", nameof(aA)); + + if (!bAC.IsSet) + throw new ArgumentException("Property is required for class DetailsRFID.", nameof(bAC)); + + if (!cA.IsSet) + throw new ArgumentException("Property is required for class DetailsRFID.", nameof(cA)); + + if (!pA.IsSet) + throw new ArgumentException("Property is required for class DetailsRFID.", nameof(pA)); + + if (!pACE.IsSet) + throw new ArgumentException("Property is required for class DetailsRFID.", nameof(pACE)); + + if (!tA.IsSet) + throw new ArgumentException("Property is required for class DetailsRFID.", nameof(tA)); + + if (overallStatus.IsSet && overallStatus.Value == null) + throw new ArgumentNullException(nameof(overallStatus), "Property is not nullable for class DetailsRFID."); + + if (aA.IsSet && aA.Value == null) + throw new ArgumentNullException(nameof(aA), "Property is not nullable for class DetailsRFID."); + + if (bAC.IsSet && bAC.Value == null) + throw new ArgumentNullException(nameof(bAC), "Property is not nullable for class DetailsRFID."); + + if (cA.IsSet && cA.Value == null) + throw new ArgumentNullException(nameof(cA), "Property is not nullable for class DetailsRFID."); + + if (pA.IsSet && pA.Value == null) + throw new ArgumentNullException(nameof(pA), "Property is not nullable for class DetailsRFID."); + + if (pACE.IsSet && pACE.Value == null) + throw new ArgumentNullException(nameof(pACE), "Property is not nullable for class DetailsRFID."); + + if (tA.IsSet && tA.Value == null) + throw new ArgumentNullException(nameof(tA), "Property is not nullable for class DetailsRFID."); + + return new DetailsRFID(overallStatus.Value!.Value!, aA.Value!.Value!, bAC.Value!.Value!, cA.Value!.Value!, pA.Value!.Value!, pACE.Value!.Value!, tA.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DetailsRFID detailsRFID, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OverallStatus != null) - hashCode = hashCode * 59 + this.OverallStatus.GetHashCode(); - if (this.AA != null) - hashCode = hashCode * 59 + this.AA.GetHashCode(); - if (this.BAC != null) - hashCode = hashCode * 59 + this.BAC.GetHashCode(); - if (this.CA != null) - hashCode = hashCode * 59 + this.CA.GetHashCode(); - if (this.PA != null) - hashCode = hashCode * 59 + this.PA.GetHashCode(); - if (this.PACE != null) - hashCode = hashCode * 59 + this.PACE.GetHashCode(); - if (this.TA != null) - hashCode = hashCode * 59 + this.TA.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, detailsRFID, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DetailsRFID detailsRFID, JsonSerializerOptions jsonSerializerOptions) { - yield break; + var overallStatusRawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.OverallStatus); + writer.WriteNumber("overallStatus", overallStatusRawValue); + + var aARawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.AA); + writer.WriteNumber("AA", aARawValue); + + var bACRawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.BAC); + writer.WriteNumber("BAC", bACRawValue); + + var cARawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.CA); + writer.WriteNumber("CA", cARawValue); + + var pARawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.PA); + writer.WriteNumber("PA", pARawValue); + + var pACERawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.PACE); + writer.WriteNumber("PACE", pACERawValue); + + var tARawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.TA); + writer.WriteNumber("TA", tARawValue); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs index ef377c0..3b94f7f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs @@ -1,89 +1,135 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DeviceInfo /// - [DataContract] - public partial class DeviceInfo : IEquatable, IValidatableObject + public partial class DeviceInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// appName. - /// version. - /// licenseId. - /// licenseSerial. - /// validUntil. - /// serverTime. - public DeviceInfo(string appName = default(string), string version = default(string), string licenseId = default(string), string licenseSerial = default(string), DateTime validUntil = default(DateTime), DateTime serverTime = default(DateTime)) + /// appName + /// varVersion + /// licenseId + /// licenseSerial + /// validUntil + /// serverTime + [JsonConstructor] + public DeviceInfo(Option appName = default, Option varVersion = default, Option licenseId = default, Option licenseSerial = default, Option validUntil = default, Option serverTime = default) { - this.AppName = appName; - this.Version = version; - this.LicenseId = licenseId; - this.LicenseSerial = licenseSerial; - this.ValidUntil = validUntil; - this.ServerTime = serverTime; + AppNameOption = appName; + VarVersionOption = varVersion; + LicenseIdOption = licenseId; + LicenseSerialOption = licenseSerial; + ValidUntilOption = validUntil; + ServerTimeOption = serverTime; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of AppName + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AppNameOption { get; private set; } + /// /// Gets or Sets AppName /// - [DataMember(Name="app-name", EmitDefaultValue=false)] - public string AppName { get; set; } + [JsonPropertyName("app-name")] + public string? AppName { get { return this.AppNameOption; } set { this.AppNameOption = new(value); } } + + /// + /// Used to track the state of VarVersion + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option VarVersionOption { get; private set; } /// - /// Gets or Sets Version + /// Gets or Sets VarVersion /// - [DataMember(Name="version", EmitDefaultValue=false)] - public string Version { get; set; } + [JsonPropertyName("version")] + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } + + /// + /// Used to track the state of LicenseId + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LicenseIdOption { get; private set; } /// /// Gets or Sets LicenseId /// - [DataMember(Name="license-id", EmitDefaultValue=false)] - public string LicenseId { get; set; } + [JsonPropertyName("license-id")] + public string? LicenseId { get { return this.LicenseIdOption; } set { this.LicenseIdOption = new(value); } } + + /// + /// Used to track the state of LicenseSerial + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LicenseSerialOption { get; private set; } /// /// Gets or Sets LicenseSerial /// - [DataMember(Name="license-serial", EmitDefaultValue=false)] - public string LicenseSerial { get; set; } + [JsonPropertyName("license-serial")] + public string? LicenseSerial { get { return this.LicenseSerialOption; } set { this.LicenseSerialOption = new(value); } } + + /// + /// Used to track the state of ValidUntil + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ValidUntilOption { get; private set; } /// /// Gets or Sets ValidUntil /// - [DataMember(Name="valid-until", EmitDefaultValue=false)] - public DateTime ValidUntil { get; set; } + [JsonPropertyName("valid-until")] + public DateTime? ValidUntil { get { return this.ValidUntilOption; } set { this.ValidUntilOption = new(value); } } + + /// + /// Used to track the state of ServerTime + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ServerTimeOption { get; private set; } /// /// Gets or Sets ServerTime /// - [DataMember(Name="server-time", EmitDefaultValue=false)] - public DateTime ServerTime { get; set; } + [JsonPropertyName("server-time")] + public DateTime? ServerTime { get { return this.ServerTimeOption; } set { this.ServerTimeOption = new(value); } } /// /// Returns the string presentation of the object @@ -91,10 +137,10 @@ public partial class DeviceInfo : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DeviceInfo {\n"); sb.Append(" AppName: ").Append(AppName).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); sb.Append(" LicenseId: ").Append(LicenseId).Append("\n"); sb.Append(" LicenseSerial: ").Append(LicenseSerial).Append("\n"); sb.Append(" ValidUntil: ").Append(ValidUntil).Append("\n"); @@ -102,103 +148,172 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class DeviceInfoJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// The format to use to serialize ValidUntil /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeviceInfo); - } + public static string ValidUntilFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; /// - /// Returns true if DeviceInfo instances are equal + /// The format to use to serialize ServerTime /// - /// Instance of DeviceInfo to be compared - /// Boolean - public bool Equals(DeviceInfo input) - { - if (input == null) - return false; - - return - ( - this.AppName == input.AppName || - (this.AppName != null && - this.AppName.Equals(input.AppName)) - ) && - ( - this.Version == input.Version || - (this.Version != null && - this.Version.Equals(input.Version)) - ) && - ( - this.LicenseId == input.LicenseId || - (this.LicenseId != null && - this.LicenseId.Equals(input.LicenseId)) - ) && - ( - this.LicenseSerial == input.LicenseSerial || - (this.LicenseSerial != null && - this.LicenseSerial.Equals(input.LicenseSerial)) - ) && - ( - this.ValidUntil == input.ValidUntil || - (this.ValidUntil != null && - this.ValidUntil.Equals(input.ValidUntil)) - ) && - ( - this.ServerTime == input.ServerTime || - (this.ServerTime != null && - this.ServerTime.Equals(input.ServerTime)) - ); - } + public static string ServerTimeFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; /// - /// Gets the hash code + /// Deserializes json to /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + /// + public override DeviceInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option appName = default; + Option varVersion = default; + Option licenseId = default; + Option licenseSerial = default; + Option validUntil = default; + Option serverTime = default; + + while (utf8JsonReader.Read()) { - int hashCode = 41; - if (this.AppName != null) - hashCode = hashCode * 59 + this.AppName.GetHashCode(); - if (this.Version != null) - hashCode = hashCode * 59 + this.Version.GetHashCode(); - if (this.LicenseId != null) - hashCode = hashCode * 59 + this.LicenseId.GetHashCode(); - if (this.LicenseSerial != null) - hashCode = hashCode * 59 + this.LicenseSerial.GetHashCode(); - if (this.ValidUntil != null) - hashCode = hashCode * 59 + this.ValidUntil.GetHashCode(); - if (this.ServerTime != null) - hashCode = hashCode * 59 + this.ServerTime.GetHashCode(); - return hashCode; + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "app-name": + appName = new Option(utf8JsonReader.GetString()!); + break; + case "version": + varVersion = new Option(utf8JsonReader.GetString()!); + break; + case "license-id": + licenseId = new Option(utf8JsonReader.GetString()!); + break; + case "license-serial": + licenseSerial = new Option(utf8JsonReader.GetString()!); + break; + case "valid-until": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + validUntil = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + case "server-time": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + serverTime = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + default: + break; + } + } } + + if (appName.IsSet && appName.Value == null) + throw new ArgumentNullException(nameof(appName), "Property is not nullable for class DeviceInfo."); + + if (varVersion.IsSet && varVersion.Value == null) + throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class DeviceInfo."); + + if (licenseId.IsSet && licenseId.Value == null) + throw new ArgumentNullException(nameof(licenseId), "Property is not nullable for class DeviceInfo."); + + if (licenseSerial.IsSet && licenseSerial.Value == null) + throw new ArgumentNullException(nameof(licenseSerial), "Property is not nullable for class DeviceInfo."); + + if (validUntil.IsSet && validUntil.Value == null) + throw new ArgumentNullException(nameof(validUntil), "Property is not nullable for class DeviceInfo."); + + if (serverTime.IsSet && serverTime.Value == null) + throw new ArgumentNullException(nameof(serverTime), "Property is not nullable for class DeviceInfo."); + + return new DeviceInfo(appName, varVersion, licenseId, licenseSerial, validUntil, serverTime); } /// - /// To validate all properties of the instance + /// Serializes a /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DeviceInfo deviceInfo, JsonSerializerOptions jsonSerializerOptions) { - yield break; + writer.WriteStartObject(); + + WriteProperties(writer, deviceInfo, jsonSerializerOptions); + writer.WriteEndObject(); } - } + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DeviceInfo deviceInfo, JsonSerializerOptions jsonSerializerOptions) + { + if (deviceInfo.AppNameOption.IsSet && deviceInfo.AppName == null) + throw new ArgumentNullException(nameof(deviceInfo.AppName), "Property is required for class DeviceInfo."); + + if (deviceInfo.VarVersionOption.IsSet && deviceInfo.VarVersion == null) + throw new ArgumentNullException(nameof(deviceInfo.VarVersion), "Property is required for class DeviceInfo."); + + if (deviceInfo.LicenseIdOption.IsSet && deviceInfo.LicenseId == null) + throw new ArgumentNullException(nameof(deviceInfo.LicenseId), "Property is required for class DeviceInfo."); + + if (deviceInfo.LicenseSerialOption.IsSet && deviceInfo.LicenseSerial == null) + throw new ArgumentNullException(nameof(deviceInfo.LicenseSerial), "Property is required for class DeviceInfo."); + + if (deviceInfo.AppNameOption.IsSet) + writer.WriteString("app-name", deviceInfo.AppName); + + if (deviceInfo.VarVersionOption.IsSet) + writer.WriteString("version", deviceInfo.VarVersion); + + if (deviceInfo.LicenseIdOption.IsSet) + writer.WriteString("license-id", deviceInfo.LicenseId); + + if (deviceInfo.LicenseSerialOption.IsSet) + writer.WriteString("license-serial", deviceInfo.LicenseSerial); + + if (deviceInfo.ValidUntilOption.IsSet) + writer.WriteString("valid-until", deviceInfo.ValidUntilOption.Value!.Value.ToString(ValidUntilFormat)); + + if (deviceInfo.ServerTimeOption.IsSet) + writer.WriteString("server-time", deviceInfo.ServerTimeOption.Value!.Value.ToString(ServerTimeFormat)); + } + } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs deleted file mode 100644 index 4615034..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs +++ /dev/null @@ -1,221 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// DeviceInfo2 - /// - [DataContract] - public partial class DeviceInfo2 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// app. - /// licenseId. - /// licenseType. - /// licenseSerial. - /// licenseValidUntil. - /// scenarios. - /// version. - public DeviceInfo2(string app = default(string), string licenseId = default(string), string licenseType = default(string), string licenseSerial = default(string), DateTime licenseValidUntil = default(DateTime), List scenarios = default(List), string version = default(string)) - { - this.App = app; - this.LicenseId = licenseId; - this.LicenseType = licenseType; - this.LicenseSerial = licenseSerial; - this.LicenseValidUntil = licenseValidUntil; - this.Scenarios = scenarios; - this.Version = version; - } - - /// - /// Gets or Sets App - /// - [DataMember(Name="app", EmitDefaultValue=false)] - public string App { get; set; } - - /// - /// Gets or Sets LicenseId - /// - [DataMember(Name="licenseId", EmitDefaultValue=false)] - public string LicenseId { get; set; } - - /// - /// Gets or Sets LicenseType - /// - [DataMember(Name="licenseType", EmitDefaultValue=false)] - public string LicenseType { get; set; } - - /// - /// Gets or Sets LicenseSerial - /// - [DataMember(Name="licenseSerial", EmitDefaultValue=false)] - public string LicenseSerial { get; set; } - - /// - /// Gets or Sets LicenseValidUntil - /// - [DataMember(Name="licenseValidUntil", EmitDefaultValue=false)] - public DateTime LicenseValidUntil { get; set; } - - /// - /// Gets or Sets Scenarios - /// - [DataMember(Name="scenarios", EmitDefaultValue=false)] - public List Scenarios { get; set; } - - /// - /// Gets or Sets Version - /// - [DataMember(Name="version", EmitDefaultValue=false)] - public string Version { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DeviceInfo2 {\n"); - sb.Append(" App: ").Append(App).Append("\n"); - sb.Append(" LicenseId: ").Append(LicenseId).Append("\n"); - sb.Append(" LicenseType: ").Append(LicenseType).Append("\n"); - sb.Append(" LicenseSerial: ").Append(LicenseSerial).Append("\n"); - sb.Append(" LicenseValidUntil: ").Append(LicenseValidUntil).Append("\n"); - sb.Append(" Scenarios: ").Append(Scenarios).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeviceInfo2); - } - - /// - /// Returns true if DeviceInfo2 instances are equal - /// - /// Instance of DeviceInfo2 to be compared - /// Boolean - public bool Equals(DeviceInfo2 input) - { - if (input == null) - return false; - - return - ( - this.App == input.App || - (this.App != null && - this.App.Equals(input.App)) - ) && - ( - this.LicenseId == input.LicenseId || - (this.LicenseId != null && - this.LicenseId.Equals(input.LicenseId)) - ) && - ( - this.LicenseType == input.LicenseType || - (this.LicenseType != null && - this.LicenseType.Equals(input.LicenseType)) - ) && - ( - this.LicenseSerial == input.LicenseSerial || - (this.LicenseSerial != null && - this.LicenseSerial.Equals(input.LicenseSerial)) - ) && - ( - this.LicenseValidUntil == input.LicenseValidUntil || - (this.LicenseValidUntil != null && - this.LicenseValidUntil.Equals(input.LicenseValidUntil)) - ) && - ( - this.Scenarios == input.Scenarios || - this.Scenarios != null && - input.Scenarios != null && - this.Scenarios.SequenceEqual(input.Scenarios) - ) && - ( - this.Version == input.Version || - (this.Version != null && - this.Version.Equals(input.Version)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.App != null) - hashCode = hashCode * 59 + this.App.GetHashCode(); - if (this.LicenseId != null) - hashCode = hashCode * 59 + this.LicenseId.GetHashCode(); - if (this.LicenseType != null) - hashCode = hashCode * 59 + this.LicenseType.GetHashCode(); - if (this.LicenseSerial != null) - hashCode = hashCode * 59 + this.LicenseSerial.GetHashCode(); - if (this.LicenseValidUntil != null) - hashCode = hashCode * 59 + this.LicenseValidUntil.GetHashCode(); - if (this.Scenarios != null) - hashCode = hashCode * 59 + this.Scenarios.GetHashCode(); - if (this.Version != null) - hashCode = hashCode * 59 + this.Version.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs index 5873cd6..71fb091 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs @@ -1,54 +1,57 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Raw data from BarCodes /// - [DataContract] - public partial class DocBarCodeInfo : ResultItem, IEquatable, IValidatableObject + public partial class DocBarCodeInfo : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DocBarCodeInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// docBarCodeInfo. - public DocBarCodeInfo(DocBarCodeInfoFieldsList docBarCodeInfo = default(DocBarCodeInfoFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// varDocBarCodeInfo + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public DocBarCodeInfo(DocBarCodeInfoFieldsList varDocBarCodeInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - this._DocBarCodeInfo = docBarCodeInfo; + VarDocBarCodeInfo = varDocBarCodeInfo; + OnCreated(); } - + + partial void OnCreated(); + /// - /// Gets or Sets _DocBarCodeInfo + /// Gets or Sets VarDocBarCodeInfo /// - [DataMember(Name="DocBarCodeInfo", EmitDefaultValue=false)] - public DocBarCodeInfoFieldsList _DocBarCodeInfo { get; set; } + [JsonPropertyName("DocBarCodeInfo")] + public DocBarCodeInfoFieldsList VarDocBarCodeInfo { get; set; } /// /// Returns the string presentation of the object @@ -56,76 +59,158 @@ protected DocBarCodeInfo() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocBarCodeInfo {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" _DocBarCodeInfo: ").Append(_DocBarCodeInfo).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" VarDocBarCodeInfo: ").Append(VarDocBarCodeInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class DocBarCodeInfoJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override DocBarCodeInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as DocBarCodeInfo); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if DocBarCodeInfo instances are equal - /// - /// Instance of DocBarCodeInfo to be compared - /// Boolean - public bool Equals(DocBarCodeInfo input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this._DocBarCodeInfo == input._DocBarCodeInfo || - (this._DocBarCodeInfo != null && - this._DocBarCodeInfo.Equals(input._DocBarCodeInfo)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option varDocBarCodeInfo = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocBarCodeInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + varDocBarCodeInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!varDocBarCodeInfo.IsSet) + throw new ArgumentException("Property is required for class DocBarCodeInfo.", nameof(varDocBarCodeInfo)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class DocBarCodeInfo.", nameof(resultType)); + + if (varDocBarCodeInfo.IsSet && varDocBarCodeInfo.Value == null) + throw new ArgumentNullException(nameof(varDocBarCodeInfo), "Property is not nullable for class DocBarCodeInfo."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocBarCodeInfo."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocBarCodeInfo."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocBarCodeInfo."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocBarCodeInfo."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocBarCodeInfo."); + + return new DocBarCodeInfo(varDocBarCodeInfo.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocBarCodeInfo docBarCodeInfo, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this._DocBarCodeInfo != null) - hashCode = hashCode * 59 + this._DocBarCodeInfo.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, docBarCodeInfo, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocBarCodeInfo docBarCodeInfo, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (docBarCodeInfo.VarDocBarCodeInfo == null) + throw new ArgumentNullException(nameof(docBarCodeInfo.VarDocBarCodeInfo), "Property is required for class DocBarCodeInfo."); + + writer.WritePropertyName("DocBarCodeInfo"); + JsonSerializer.Serialize(writer, docBarCodeInfo.VarDocBarCodeInfo, jsonSerializerOptions); + if (docBarCodeInfo.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", docBarCodeInfo.BufLengthOption.Value!.Value); + + if (docBarCodeInfo.LightOption.IsSet) + writer.WriteNumber("light", docBarCodeInfo.LightOption.Value!.Value); + + if (docBarCodeInfo.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", docBarCodeInfo.ListIdxOption.Value!.Value); + + if (docBarCodeInfo.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", docBarCodeInfo.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", docBarCodeInfo.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs index dd67d51..a221f2e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs @@ -1,58 +1,62 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DocBarCodeInfoFieldsList /// - [DataContract] - public partial class DocBarCodeInfoFieldsList : IEquatable, IValidatableObject + public partial class DocBarCodeInfoFieldsList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Count of array fields. - /// Data from barcode. - public DocBarCodeInfoFieldsList(int nFields = default(int), List pArrayFields = default(List)) + /// Count of array fields + /// Data from barcode + [JsonConstructor] + public DocBarCodeInfoFieldsList(int nFields, List pArrayFields) { - this.NFields = nFields; - this.PArrayFields = pArrayFields; + NFields = nFields; + PArrayFields = pArrayFields; + OnCreated(); } - + + partial void OnCreated(); + /// /// Count of array fields /// /// Count of array fields - [DataMember(Name="nFields", EmitDefaultValue=false)] + [JsonPropertyName("nFields")] public int NFields { get; set; } /// /// Data from barcode /// /// Data from barcode - [DataMember(Name="pArrayFields", EmitDefaultValue=false)] + [JsonPropertyName("pArrayFields")] public List PArrayFields { get; set; } /// @@ -61,83 +65,125 @@ public partial class DocBarCodeInfoFieldsList : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocBarCodeInfoFieldsList {\n"); sb.Append(" NFields: ").Append(NFields).Append("\n"); sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as DocBarCodeInfoFieldsList); + yield break; } + } + /// + /// A Json converter for type + /// + public class DocBarCodeInfoFieldsListJsonConverter : JsonConverter + { /// - /// Returns true if DocBarCodeInfoFieldsList instances are equal + /// Deserializes json to /// - /// Instance of DocBarCodeInfoFieldsList to be compared - /// Boolean - public bool Equals(DocBarCodeInfoFieldsList input) + /// + /// + /// + /// + /// + public override DocBarCodeInfoFieldsList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.NFields == input.NFields || - (this.NFields != null && - this.NFields.Equals(input.NFields)) - ) && - ( - this.PArrayFields == input.PArrayFields || - this.PArrayFields != null && - input.PArrayFields != null && - this.PArrayFields.SequenceEqual(input.PArrayFields) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option nFields = default; + Option?> pArrayFields = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "nFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + nFields = new Option(utf8JsonReader.GetInt32()); + break; + case "pArrayFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pArrayFields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!nFields.IsSet) + throw new ArgumentException("Property is required for class DocBarCodeInfoFieldsList.", nameof(nFields)); + + if (!pArrayFields.IsSet) + throw new ArgumentException("Property is required for class DocBarCodeInfoFieldsList.", nameof(pArrayFields)); + + if (nFields.IsSet && nFields.Value == null) + throw new ArgumentNullException(nameof(nFields), "Property is not nullable for class DocBarCodeInfoFieldsList."); + + if (pArrayFields.IsSet && pArrayFields.Value == null) + throw new ArgumentNullException(nameof(pArrayFields), "Property is not nullable for class DocBarCodeInfoFieldsList."); + + return new DocBarCodeInfoFieldsList(nFields.Value!.Value!, pArrayFields.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocBarCodeInfoFieldsList docBarCodeInfoFieldsList, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NFields != null) - hashCode = hashCode * 59 + this.NFields.GetHashCode(); - if (this.PArrayFields != null) - hashCode = hashCode * 59 + this.PArrayFields.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, docBarCodeInfoFieldsList, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocBarCodeInfoFieldsList docBarCodeInfoFieldsList, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (docBarCodeInfoFieldsList.PArrayFields == null) + throw new ArgumentNullException(nameof(docBarCodeInfoFieldsList.PArrayFields), "Property is required for class DocBarCodeInfoFieldsList."); + + writer.WriteNumber("nFields", docBarCodeInfoFieldsList.NFields); + + writer.WritePropertyName("pArrayFields"); + JsonSerializer.Serialize(writer, docBarCodeInfoFieldsList.PArrayFields, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs new file mode 100644 index 0000000..12f15d1 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// DocBarCodeInfoItem + /// + public partial class DocBarCodeInfoItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// docBarCodeInfo + [JsonConstructor] + public DocBarCodeInfoItem(DocBarCodeInfoFieldsList docBarCodeInfo) + { + DocBarCodeInfo = docBarCodeInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets DocBarCodeInfo + /// + [JsonPropertyName("DocBarCodeInfo")] + public DocBarCodeInfoFieldsList DocBarCodeInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocBarCodeInfoItem {\n"); + sb.Append(" DocBarCodeInfo: ").Append(DocBarCodeInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class DocBarCodeInfoItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override DocBarCodeInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docBarCodeInfo = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocBarCodeInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docBarCodeInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!docBarCodeInfo.IsSet) + throw new ArgumentException("Property is required for class DocBarCodeInfoItem.", nameof(docBarCodeInfo)); + + if (docBarCodeInfo.IsSet && docBarCodeInfo.Value == null) + throw new ArgumentNullException(nameof(docBarCodeInfo), "Property is not nullable for class DocBarCodeInfoItem."); + + return new DocBarCodeInfoItem(docBarCodeInfo.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocBarCodeInfoItem docBarCodeInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, docBarCodeInfoItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocBarCodeInfoItem docBarCodeInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + if (docBarCodeInfoItem.DocBarCodeInfo == null) + throw new ArgumentNullException(nameof(docBarCodeInfoItem.DocBarCodeInfo), "Property is required for class DocBarCodeInfoItem."); + + writer.WritePropertyName("DocBarCodeInfo"); + JsonSerializer.Serialize(writer, docBarCodeInfoItem.DocBarCodeInfo, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs new file mode 100644 index 0000000..bc6c03b --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// DocGraphicsInfoItem + /// + public partial class DocGraphicsInfoItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// docGraphicsInfo + [JsonConstructor] + public DocGraphicsInfoItem(GraphicFieldsList docGraphicsInfo) + { + DocGraphicsInfo = docGraphicsInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets DocGraphicsInfo + /// + [JsonPropertyName("DocGraphicsInfo")] + public GraphicFieldsList DocGraphicsInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocGraphicsInfoItem {\n"); + sb.Append(" DocGraphicsInfo: ").Append(DocGraphicsInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class DocGraphicsInfoItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override DocGraphicsInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docGraphicsInfo = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocGraphicsInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docGraphicsInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!docGraphicsInfo.IsSet) + throw new ArgumentException("Property is required for class DocGraphicsInfoItem.", nameof(docGraphicsInfo)); + + if (docGraphicsInfo.IsSet && docGraphicsInfo.Value == null) + throw new ArgumentNullException(nameof(docGraphicsInfo), "Property is not nullable for class DocGraphicsInfoItem."); + + return new DocGraphicsInfoItem(docGraphicsInfo.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocGraphicsInfoItem docGraphicsInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, docGraphicsInfoItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocGraphicsInfoItem docGraphicsInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + if (docGraphicsInfoItem.DocGraphicsInfo == null) + throw new ArgumentNullException(nameof(docGraphicsInfoItem.DocGraphicsInfo), "Property is required for class DocGraphicsInfoItem."); + + writer.WritePropertyName("DocGraphicsInfo"); + JsonSerializer.Serialize(writer, docGraphicsInfoItem.DocGraphicsInfo, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs index 64c291b..0390a6a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs @@ -1,274 +1,336 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DocVisualExtendedField /// - [DataContract] - public partial class DocVisualExtendedField : IEquatable, IValidatableObject + public partial class DocVisualExtendedField : VisualExtendedFieldItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DocVisualExtendedField() { } - /// - /// Initializes a new instance of the class. - /// - /// wFieldType (required). - /// Field name. Only use to search values for fields with fieldType=50(other). In general, use wFieldType for lookup. (required). - /// wLCID (required). - /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results.. - /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^'. - /// fieldRect. - /// Origin data group information. Only for Result.RFID_TEXT results.. - /// Index of the text field record in origin data group. Only for Result.RFID_TEXT results.. - public DocVisualExtendedField(int wFieldType = default(int), string fieldName = default(string), int wLCID = default(int), List stringsResult = default(List), string bufText = default(string), RectangleCoordinates fieldRect = default(RectangleCoordinates), int rFIDOriginDG = default(int), int rFIDOriginTagEntry = default(int)) + /// fieldType + /// wFieldType + /// Field symbolic name (null-terminated string) + /// Number of StringsResult array elements + /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. + /// Buf_Text text string length + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' + /// fieldRect + /// fieldMask + /// validity + /// inComparison + /// wLCID + /// reserved2 + /// reserved3 + [JsonConstructor] + public DocVisualExtendedField(int fieldType, TextFieldType wFieldType, string fieldName, decimal stringsCount, List stringsResult, decimal bufLength, string bufText, RectangleCoordinates fieldRect, Option fieldMask = default, Option validity = default, Option inComparison = default, Option wLCID = default, Option reserved2 = default, Option reserved3 = default) : base(fieldType, wFieldType, fieldName, stringsCount, stringsResult, bufLength, bufText, fieldMask, validity, inComparison, wLCID, reserved2, reserved3) { - // to ensure "wFieldType" is required (not null) - if (wFieldType == null) - { - throw new InvalidDataException("wFieldType is a required property for DocVisualExtendedField and cannot be null"); - } - else - { - this.WFieldType = wFieldType; - } - - // to ensure "fieldName" is required (not null) - if (fieldName == null) - { - throw new InvalidDataException("fieldName is a required property for DocVisualExtendedField and cannot be null"); - } - else - { - this.FieldName = fieldName; - } - - // to ensure "wLCID" is required (not null) - if (wLCID == null) - { - throw new InvalidDataException("wLCID is a required property for DocVisualExtendedField and cannot be null"); - } - else - { - this.WLCID = wLCID; - } - - this.StringsResult = stringsResult; - this.BufText = bufText; - this.FieldRect = fieldRect; - this.RFIDOriginDG = rFIDOriginDG; - this.RFIDOriginTagEntry = rFIDOriginTagEntry; + FieldRect = fieldRect; + OnCreated(); } - - /// - /// Gets or Sets WFieldType - /// - [DataMember(Name="wFieldType", EmitDefaultValue=true)] - public int WFieldType { get; set; } - - /// - /// Field name. Only use to search values for fields with fieldType=50(other). In general, use wFieldType for lookup. - /// - /// Field name. Only use to search values for fields with fieldType=50(other). In general, use wFieldType for lookup. - [DataMember(Name="FieldName", EmitDefaultValue=true)] - public string FieldName { get; set; } - /// - /// Gets or Sets WLCID - /// - [DataMember(Name="wLCID", EmitDefaultValue=true)] - public int WLCID { get; set; } - - /// - /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. - /// - /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. - [DataMember(Name="StringsResult", EmitDefaultValue=false)] - public List StringsResult { get; set; } - - /// - /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' - /// - /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' - [DataMember(Name="Buf_Text", EmitDefaultValue=false)] - public string BufText { get; set; } + partial void OnCreated(); /// /// Gets or Sets FieldRect /// - [DataMember(Name="FieldRect", EmitDefaultValue=false)] + [JsonPropertyName("FieldRect")] public RectangleCoordinates FieldRect { get; set; } - /// - /// Origin data group information. Only for Result.RFID_TEXT results. - /// - /// Origin data group information. Only for Result.RFID_TEXT results. - [DataMember(Name="RFID_OriginDG", EmitDefaultValue=false)] - public int RFIDOriginDG { get; set; } - - /// - /// Index of the text field record in origin data group. Only for Result.RFID_TEXT results. - /// - /// Index of the text field record in origin data group. Only for Result.RFID_TEXT results. - [DataMember(Name="RFID_OriginTagEntry", EmitDefaultValue=false)] - public int RFIDOriginTagEntry { get; set; } - /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocVisualExtendedField {\n"); - sb.Append(" WFieldType: ").Append(WFieldType).Append("\n"); - sb.Append(" FieldName: ").Append(FieldName).Append("\n"); - sb.Append(" WLCID: ").Append(WLCID).Append("\n"); - sb.Append(" StringsResult: ").Append(StringsResult).Append("\n"); - sb.Append(" BufText: ").Append(BufText).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); - sb.Append(" RFIDOriginDG: ").Append(RFIDOriginDG).Append("\n"); - sb.Append(" RFIDOriginTagEntry: ").Append(RFIDOriginTagEntry).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class DocVisualExtendedFieldJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override DocVisualExtendedField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as DocVisualExtendedField); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if DocVisualExtendedField instances are equal - /// - /// Instance of DocVisualExtendedField to be compared - /// Boolean - public bool Equals(DocVisualExtendedField input) - { - if (input == null) - return false; - - return - ( - this.WFieldType == input.WFieldType || - (this.WFieldType != null && - this.WFieldType.Equals(input.WFieldType)) - ) && - ( - this.FieldName == input.FieldName || - (this.FieldName != null && - this.FieldName.Equals(input.FieldName)) - ) && - ( - this.WLCID == input.WLCID || - (this.WLCID != null && - this.WLCID.Equals(input.WLCID)) - ) && - ( - this.StringsResult == input.StringsResult || - this.StringsResult != null && - input.StringsResult != null && - this.StringsResult.SequenceEqual(input.StringsResult) - ) && - ( - this.BufText == input.BufText || - (this.BufText != null && - this.BufText.Equals(input.BufText)) - ) && - ( - this.FieldRect == input.FieldRect || - (this.FieldRect != null && - this.FieldRect.Equals(input.FieldRect)) - ) && - ( - this.RFIDOriginDG == input.RFIDOriginDG || - (this.RFIDOriginDG != null && - this.RFIDOriginDG.Equals(input.RFIDOriginDG)) - ) && - ( - this.RFIDOriginTagEntry == input.RFIDOriginTagEntry || - (this.RFIDOriginTagEntry != null && - this.RFIDOriginTagEntry.Equals(input.RFIDOriginTagEntry)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldType = default; + Option wFieldType = default; + Option fieldName = default; + Option stringsCount = default; + Option?> stringsResult = default; + Option bufLength = default; + Option bufText = default; + Option fieldRect = default; + Option fieldMask = default; + Option validity = default; + Option inComparison = default; + Option wLCID = default; + Option reserved2 = default; + Option reserved3 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldType = new Option(utf8JsonReader.GetInt32()); + break; + case "wFieldType": + string? wFieldTypeRawValue = utf8JsonReader.GetString(); + if (wFieldTypeRawValue != null) + wFieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(wFieldTypeRawValue)); + break; + case "FieldName": + fieldName = new Option(utf8JsonReader.GetString()!); + break; + case "StringsCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringsCount = new Option(utf8JsonReader.GetDecimal()); + break; + case "StringsResult": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringsResult = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Buf_Length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetDecimal()); + break; + case "Buf_Text": + bufText = new Option(utf8JsonReader.GetString()!); + break; + case "FieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "FieldMask": + fieldMask = new Option(utf8JsonReader.GetString()!); + break; + case "Validity": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + validity = new Option(utf8JsonReader.GetInt32()); + break; + case "InComparison": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + inComparison = new Option(utf8JsonReader.GetInt32()); + break; + case "wLCID": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + wLCID = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved3": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved3 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(fieldType)); + + if (!wFieldType.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(wFieldType)); + + if (!fieldName.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(fieldName)); + + if (!stringsCount.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(stringsCount)); + + if (!stringsResult.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(stringsResult)); + + if (!bufLength.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(bufLength)); + + if (!bufText.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(bufText)); + + if (!fieldRect.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(fieldRect)); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class DocVisualExtendedField."); + + if (wFieldType.IsSet && wFieldType.Value == null) + throw new ArgumentNullException(nameof(wFieldType), "Property is not nullable for class DocVisualExtendedField."); + + if (fieldName.IsSet && fieldName.Value == null) + throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class DocVisualExtendedField."); + + if (stringsCount.IsSet && stringsCount.Value == null) + throw new ArgumentNullException(nameof(stringsCount), "Property is not nullable for class DocVisualExtendedField."); + + if (stringsResult.IsSet && stringsResult.Value == null) + throw new ArgumentNullException(nameof(stringsResult), "Property is not nullable for class DocVisualExtendedField."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocVisualExtendedField."); + + if (bufText.IsSet && bufText.Value == null) + throw new ArgumentNullException(nameof(bufText), "Property is not nullable for class DocVisualExtendedField."); + + if (fieldRect.IsSet && fieldRect.Value == null) + throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class DocVisualExtendedField."); + + if (fieldMask.IsSet && fieldMask.Value == null) + throw new ArgumentNullException(nameof(fieldMask), "Property is not nullable for class DocVisualExtendedField."); + + if (validity.IsSet && validity.Value == null) + throw new ArgumentNullException(nameof(validity), "Property is not nullable for class DocVisualExtendedField."); + + if (inComparison.IsSet && inComparison.Value == null) + throw new ArgumentNullException(nameof(inComparison), "Property is not nullable for class DocVisualExtendedField."); + + if (wLCID.IsSet && wLCID.Value == null) + throw new ArgumentNullException(nameof(wLCID), "Property is not nullable for class DocVisualExtendedField."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class DocVisualExtendedField."); + + if (reserved3.IsSet && reserved3.Value == null) + throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class DocVisualExtendedField."); + + return new DocVisualExtendedField(fieldType.Value!.Value!, wFieldType.Value!.Value!, fieldName.Value!, stringsCount.Value!.Value!, stringsResult.Value!, bufLength.Value!.Value!, bufText.Value!, fieldRect.Value!, fieldMask, validity, inComparison, wLCID, reserved2, reserved3); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocVisualExtendedField docVisualExtendedField, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WFieldType != null) - hashCode = hashCode * 59 + this.WFieldType.GetHashCode(); - if (this.FieldName != null) - hashCode = hashCode * 59 + this.FieldName.GetHashCode(); - if (this.WLCID != null) - hashCode = hashCode * 59 + this.WLCID.GetHashCode(); - if (this.StringsResult != null) - hashCode = hashCode * 59 + this.StringsResult.GetHashCode(); - if (this.BufText != null) - hashCode = hashCode * 59 + this.BufText.GetHashCode(); - if (this.FieldRect != null) - hashCode = hashCode * 59 + this.FieldRect.GetHashCode(); - if (this.RFIDOriginDG != null) - hashCode = hashCode * 59 + this.RFIDOriginDG.GetHashCode(); - if (this.RFIDOriginTagEntry != null) - hashCode = hashCode * 59 + this.RFIDOriginTagEntry.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, docVisualExtendedField, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocVisualExtendedField docVisualExtendedField, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (docVisualExtendedField.FieldName == null) + throw new ArgumentNullException(nameof(docVisualExtendedField.FieldName), "Property is required for class DocVisualExtendedField."); + + if (docVisualExtendedField.StringsResult == null) + throw new ArgumentNullException(nameof(docVisualExtendedField.StringsResult), "Property is required for class DocVisualExtendedField."); + + if (docVisualExtendedField.BufText == null) + throw new ArgumentNullException(nameof(docVisualExtendedField.BufText), "Property is required for class DocVisualExtendedField."); + + if (docVisualExtendedField.FieldRect == null) + throw new ArgumentNullException(nameof(docVisualExtendedField.FieldRect), "Property is required for class DocVisualExtendedField."); + + if (docVisualExtendedField.FieldMaskOption.IsSet && docVisualExtendedField.FieldMask == null) + throw new ArgumentNullException(nameof(docVisualExtendedField.FieldMask), "Property is required for class DocVisualExtendedField."); + + writer.WriteNumber("FieldType", docVisualExtendedField.FieldType); + + var wFieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(docVisualExtendedField.WFieldType); + writer.WriteNumber("wFieldType", wFieldTypeRawValue); + + writer.WriteString("FieldName", docVisualExtendedField.FieldName); + + writer.WriteNumber("StringsCount", docVisualExtendedField.StringsCount); + + writer.WritePropertyName("StringsResult"); + JsonSerializer.Serialize(writer, docVisualExtendedField.StringsResult, jsonSerializerOptions); + writer.WriteNumber("Buf_Length", docVisualExtendedField.BufLength); + + writer.WriteString("Buf_Text", docVisualExtendedField.BufText); + + writer.WritePropertyName("FieldRect"); + JsonSerializer.Serialize(writer, docVisualExtendedField.FieldRect, jsonSerializerOptions); + if (docVisualExtendedField.FieldMaskOption.IsSet) + writer.WriteString("FieldMask", docVisualExtendedField.FieldMask); + + if (docVisualExtendedField.ValidityOption.IsSet) + writer.WriteNumber("Validity", docVisualExtendedField.ValidityOption.Value!.Value); + + if (docVisualExtendedField.InComparisonOption.IsSet) + writer.WriteNumber("InComparison", docVisualExtendedField.InComparisonOption.Value!.Value); + + if (docVisualExtendedField.WLCIDOption.IsSet) + writer.WriteNumber("wLCID", docVisualExtendedField.WLCIDOption.Value!.Value); + + if (docVisualExtendedField.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", docVisualExtendedField.Reserved2Option.Value!.Value); + + if (docVisualExtendedField.Reserved3Option.IsSet) + writer.WriteNumber("Reserved3", docVisualExtendedField.Reserved3Option.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs new file mode 100644 index 0000000..05e988b --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// DocVisualExtendedFieldItem + /// + public partial class DocVisualExtendedFieldItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// fieldRect + [JsonConstructor] + public DocVisualExtendedFieldItem(RectangleCoordinates fieldRect) + { + FieldRect = fieldRect; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets FieldRect + /// + [JsonPropertyName("FieldRect")] + public RectangleCoordinates FieldRect { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocVisualExtendedFieldItem {\n"); + sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class DocVisualExtendedFieldItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override DocVisualExtendedFieldItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldRect = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!fieldRect.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedFieldItem.", nameof(fieldRect)); + + if (fieldRect.IsSet && fieldRect.Value == null) + throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class DocVisualExtendedFieldItem."); + + return new DocVisualExtendedFieldItem(fieldRect.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocVisualExtendedFieldItem docVisualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, docVisualExtendedFieldItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocVisualExtendedFieldItem docVisualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) + { + if (docVisualExtendedFieldItem.FieldRect == null) + throw new ArgumentNullException(nameof(docVisualExtendedFieldItem.FieldRect), "Property is required for class DocVisualExtendedFieldItem."); + + writer.WritePropertyName("FieldRect"); + JsonSerializer.Serialize(writer, docVisualExtendedFieldItem.FieldRect, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs index e510960..00c03d8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs @@ -1,62 +1,61 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Container for extracted text fields. Fields are identified by type and language /// - [DataContract] - public partial class DocVisualExtendedInfo : IEquatable, IValidatableObject + public partial class DocVisualExtendedInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DocVisualExtendedInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// pArrayFields (required). - public DocVisualExtendedInfo(List pArrayFields = default(List)) + /// Number of pArrayFields array elements + /// pArrayFields + [JsonConstructor] + public DocVisualExtendedInfo(decimal nFields, List pArrayFields) { - // to ensure "pArrayFields" is required (not null) - if (pArrayFields == null) - { - throw new InvalidDataException("pArrayFields is a required property for DocVisualExtendedInfo and cannot be null"); - } - else - { - this.PArrayFields = pArrayFields; - } - + NFields = nFields; + PArrayFields = pArrayFields; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Number of pArrayFields array elements + /// + /// Number of pArrayFields array elements + [JsonPropertyName("nFields")] + public decimal NFields { get; set; } + /// /// Gets or Sets PArrayFields /// - [DataMember(Name="pArrayFields", EmitDefaultValue=true)] + [JsonPropertyName("pArrayFields")] public List PArrayFields { get; set; } /// @@ -65,75 +64,125 @@ protected DocVisualExtendedInfo() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocVisualExtendedInfo {\n"); + sb.Append(" NFields: ").Append(NFields).Append("\n"); sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as DocVisualExtendedInfo); + yield break; } + } + /// + /// A Json converter for type + /// + public class DocVisualExtendedInfoJsonConverter : JsonConverter + { /// - /// Returns true if DocVisualExtendedInfo instances are equal + /// Deserializes json to /// - /// Instance of DocVisualExtendedInfo to be compared - /// Boolean - public bool Equals(DocVisualExtendedInfo input) + /// + /// + /// + /// + /// + public override DocVisualExtendedInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.PArrayFields == input.PArrayFields || - this.PArrayFields != null && - input.PArrayFields != null && - this.PArrayFields.SequenceEqual(input.PArrayFields) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option nFields = default; + Option?> pArrayFields = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "nFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + nFields = new Option(utf8JsonReader.GetDecimal()); + break; + case "pArrayFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pArrayFields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!nFields.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedInfo.", nameof(nFields)); + + if (!pArrayFields.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedInfo.", nameof(pArrayFields)); + + if (nFields.IsSet && nFields.Value == null) + throw new ArgumentNullException(nameof(nFields), "Property is not nullable for class DocVisualExtendedInfo."); + + if (pArrayFields.IsSet && pArrayFields.Value == null) + throw new ArgumentNullException(nameof(pArrayFields), "Property is not nullable for class DocVisualExtendedInfo."); + + return new DocVisualExtendedInfo(nFields.Value!.Value!, pArrayFields.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocVisualExtendedInfo docVisualExtendedInfo, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PArrayFields != null) - hashCode = hashCode * 59 + this.PArrayFields.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, docVisualExtendedInfo, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocVisualExtendedInfo docVisualExtendedInfo, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (docVisualExtendedInfo.PArrayFields == null) + throw new ArgumentNullException(nameof(docVisualExtendedInfo.PArrayFields), "Property is required for class DocVisualExtendedInfo."); + + writer.WriteNumber("nFields", docVisualExtendedInfo.NFields); + + writer.WritePropertyName("pArrayFields"); + JsonSerializer.Serialize(writer, docVisualExtendedInfo.PArrayFields, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs new file mode 100644 index 0000000..fc3700f --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// DocVisualExtendedInfoItem + /// + public partial class DocVisualExtendedInfoItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// docVisualExtendedInfo + [JsonConstructor] + public DocVisualExtendedInfoItem(DocVisualExtendedInfo docVisualExtendedInfo) + { + DocVisualExtendedInfo = docVisualExtendedInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets DocVisualExtendedInfo + /// + [JsonPropertyName("DocVisualExtendedInfo")] + public DocVisualExtendedInfo DocVisualExtendedInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocVisualExtendedInfoItem {\n"); + sb.Append(" DocVisualExtendedInfo: ").Append(DocVisualExtendedInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class DocVisualExtendedInfoItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override DocVisualExtendedInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docVisualExtendedInfo = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocVisualExtendedInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docVisualExtendedInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!docVisualExtendedInfo.IsSet) + throw new ArgumentException("Property is required for class DocVisualExtendedInfoItem.", nameof(docVisualExtendedInfo)); + + if (docVisualExtendedInfo.IsSet && docVisualExtendedInfo.Value == null) + throw new ArgumentNullException(nameof(docVisualExtendedInfo), "Property is not nullable for class DocVisualExtendedInfoItem."); + + return new DocVisualExtendedInfoItem(docVisualExtendedInfo.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocVisualExtendedInfoItem docVisualExtendedInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, docVisualExtendedInfoItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocVisualExtendedInfoItem docVisualExtendedInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + if (docVisualExtendedInfoItem.DocVisualExtendedInfo == null) + throw new ArgumentNullException(nameof(docVisualExtendedInfoItem.DocVisualExtendedInfo), "Property is required for class DocVisualExtendedInfoItem."); + + writer.WritePropertyName("DocVisualExtendedInfo"); + JsonSerializer.Serialize(writer, docVisualExtendedInfoItem.DocVisualExtendedInfo, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs new file mode 100644 index 0000000..e887e1d --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs @@ -0,0 +1,216 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to store the data reading results from the RFID-chip in a form of a list of the logically separated data groups. + /// + public partial class DocumentBinaryInfoResult : ResultItem, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// tDocBinaryInfo + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public DocumentBinaryInfoResult(TDocBinaryInfo tDocBinaryInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + { + TDocBinaryInfo = tDocBinaryInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets TDocBinaryInfo + /// + [JsonPropertyName("TDocBinaryInfo")] + public TDocBinaryInfo TDocBinaryInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocumentBinaryInfoResult {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" TDocBinaryInfo: ").Append(TDocBinaryInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class DocumentBinaryInfoResultJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override DocumentBinaryInfoResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option tDocBinaryInfo = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "TDocBinaryInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + tDocBinaryInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!tDocBinaryInfo.IsSet) + throw new ArgumentException("Property is required for class DocumentBinaryInfoResult.", nameof(tDocBinaryInfo)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class DocumentBinaryInfoResult.", nameof(resultType)); + + if (tDocBinaryInfo.IsSet && tDocBinaryInfo.Value == null) + throw new ArgumentNullException(nameof(tDocBinaryInfo), "Property is not nullable for class DocumentBinaryInfoResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocumentBinaryInfoResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocumentBinaryInfoResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocumentBinaryInfoResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocumentBinaryInfoResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocumentBinaryInfoResult."); + + return new DocumentBinaryInfoResult(tDocBinaryInfo.Value!, bufLength, light, listIdx, pageIdx); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentBinaryInfoResult documentBinaryInfoResult, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, documentBinaryInfoResult, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentBinaryInfoResult documentBinaryInfoResult, JsonSerializerOptions jsonSerializerOptions) + { + if (documentBinaryInfoResult.TDocBinaryInfo == null) + throw new ArgumentNullException(nameof(documentBinaryInfoResult.TDocBinaryInfo), "Property is required for class DocumentBinaryInfoResult."); + + writer.WritePropertyName("TDocBinaryInfo"); + JsonSerializer.Serialize(writer, documentBinaryInfoResult.TDocBinaryInfo, jsonSerializerOptions); + if (documentBinaryInfoResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", documentBinaryInfoResult.BufLengthOption.Value!.Value); + + if (documentBinaryInfoResult.LightOption.IsSet) + writer.WriteNumber("light", documentBinaryInfoResult.LightOption.Value!.Value); + + if (documentBinaryInfoResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", documentBinaryInfoResult.ListIdxOption.Value!.Value); + + if (documentBinaryInfoResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", documentBinaryInfoResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", documentBinaryInfoResult.ResultType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs index 5c4bd24..037415f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs @@ -1,71 +1,302 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Defining the geometric format of documents in accordance with ISO / IEC 7810 - public class DocumentFormat + /// + /// Defining the geometric format of documents in accordance with ISO / IEC 7810 + public enum DocumentFormat { + /// + /// Enum UNKNOWN for value: -1 + /// + UNKNOWN = -1, + + /// + /// Enum ID1 for value: 0 + /// + ID1 = 0, + + /// + /// Enum ID2 for value: 1 + /// + ID2 = 1, + + /// + /// Enum ID3 for value: 2 + /// + ID3 = 2, + + /// + /// Enum NON for value: 3 + /// + NON = 3, + + /// + /// Enum A4 for value: 4 + /// + A4 = 4, + + /// + /// Enum ID3_X2 for value: 5 + /// + ID3_X2 = 5, + + /// + /// Enum ID1_90 for value: 10 + /// + ID1_90 = 10, + + /// + /// Enum ID1_180 for value: 11 + /// + ID1_180 = 11, + + /// + /// Enum ID1_270 for value: 12 + /// + ID1_270 = 12, + + /// + /// Enum ID2_180 for value: 13 + /// + ID2_180 = 13, + + /// + /// Enum ID3_180 for value: 14 + /// + ID3_180 = 14, + + /// + /// Enum CUSTOM for value: 1000 + /// + CUSTOM = 1000, + + /// + /// Enum FLEXIBLE for value: 1002 + /// + FLEXIBLE = 1002 + } + + /// + /// Converts to and from the JSON value + /// + public static class DocumentFormatValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static DocumentFormat FromString(string value) + { + if (value.Equals((-1).ToString())) + return DocumentFormat.UNKNOWN; + + if (value.Equals((0).ToString())) + return DocumentFormat.ID1; + + if (value.Equals((1).ToString())) + return DocumentFormat.ID2; + + if (value.Equals((2).ToString())) + return DocumentFormat.ID3; + + if (value.Equals((3).ToString())) + return DocumentFormat.NON; - /** ID1 document format */ - public const int ID1 = 0; + if (value.Equals((4).ToString())) + return DocumentFormat.A4; - /** ID2 document format */ - public const int ID2 = 1; + if (value.Equals((5).ToString())) + return DocumentFormat.ID3_X2; - /** ID3 document format */ - public const int ID3 = 2; + if (value.Equals((10).ToString())) + return DocumentFormat.ID1_90; - /** Undefined document format */ - public const int NON = 3; + if (value.Equals((11).ToString())) + return DocumentFormat.ID1_180; - /** A4 document format */ - public const int A4 = 4; + if (value.Equals((12).ToString())) + return DocumentFormat.ID1_270; - /** ID3 double document format */ - public const int ID3_X2 = 5; + if (value.Equals((13).ToString())) + return DocumentFormat.ID2_180; - /** ID1 format document rotated 90 ° */ - public const int ID1_90 = 10; + if (value.Equals((14).ToString())) + return DocumentFormat.ID3_180; - /** ID1 format document rotated 180 ° */ - public const int ID1_180 = 11; + if (value.Equals((1000).ToString())) + return DocumentFormat.CUSTOM; - /** ID1 format document rotated 270 ° */ - public const int ID1_270 = 12; + if (value.Equals((1002).ToString())) + return DocumentFormat.FLEXIBLE; - /** ID2 format document rotated 90 ° */ - public const int ID2_180 = 13; + throw new NotImplementedException($"Could not convert value to type DocumentFormat: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static DocumentFormat? FromStringOrDefault(string value) + { + if (value.Equals((-1).ToString())) + return DocumentFormat.UNKNOWN; + + if (value.Equals((0).ToString())) + return DocumentFormat.ID1; + + if (value.Equals((1).ToString())) + return DocumentFormat.ID2; + + if (value.Equals((2).ToString())) + return DocumentFormat.ID3; + + if (value.Equals((3).ToString())) + return DocumentFormat.NON; + + if (value.Equals((4).ToString())) + return DocumentFormat.A4; + + if (value.Equals((5).ToString())) + return DocumentFormat.ID3_X2; + + if (value.Equals((10).ToString())) + return DocumentFormat.ID1_90; + + if (value.Equals((11).ToString())) + return DocumentFormat.ID1_180; + + if (value.Equals((12).ToString())) + return DocumentFormat.ID1_270; + + if (value.Equals((13).ToString())) + return DocumentFormat.ID2_180; + + if (value.Equals((14).ToString())) + return DocumentFormat.ID3_180; + + if (value.Equals((1000).ToString())) + return DocumentFormat.CUSTOM; + + if (value.Equals((1002).ToString())) + return DocumentFormat.FLEXIBLE; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(DocumentFormat value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class DocumentFormatJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override DocumentFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + DocumentFormat? result = rawValue == null + ? null + : DocumentFormatValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DocumentFormat to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentFormat documentFormat, JsonSerializerOptions options) + { + writer.WriteStringValue(documentFormat.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class DocumentFormatNullableJsonConverter : JsonConverter + { + /// + /// Returns a DocumentFormat from the Json object + /// + /// + /// + /// + /// + public override DocumentFormat? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** ID3 format document rotated 180 ° */ - public const int ID3_180 = 14; + DocumentFormat? result = rawValue == null + ? null + : DocumentFormatValueConverter.FromStringOrDefault(rawValue); - /** Arbitrary format */ - public const int CUSTOM = 1000; + if (result != null) + return result.Value; - /** Flexible format. Standard formats can be resized during cropping, depending on various factors: light, background... */ - public const int FLEXIBLE = 1002; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentFormat? documentFormat, JsonSerializerOptions options) + { + writer.WriteStringValue(documentFormat?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs index 1dde17b..75b1b9c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs @@ -1,73 +1,71 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentImage /// - [DataContract] - public partial class DocumentImage : IEquatable, IValidatableObject + public partial class DocumentImage : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DocumentImage() { } - /// - /// Initializes a new instance of the class. - /// - /// Base64 encoded image (required). - /// Image format. - public DocumentImage(string image = default(string), string format = default(string)) + /// Base64 encoded image + /// Image format + [JsonConstructor] + public DocumentImage(string image, Option format = default) { - // to ensure "image" is required (not null) - if (image == null) - { - throw new InvalidDataException("image is a required property for DocumentImage and cannot be null"); - } - else - { - this.Image = image; - } - - this.Format = format; + Image = image; + FormatOption = format; + OnCreated(); } - + + partial void OnCreated(); + /// /// Base64 encoded image /// /// Base64 encoded image - [DataMember(Name="image", EmitDefaultValue=true)] + /* Base64 encoded image */ + [JsonPropertyName("image")] public string Image { get; set; } + /// + /// Used to track the state of Format + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FormatOption { get; private set; } + /// /// Image format /// /// Image format - [DataMember(Name="format", EmitDefaultValue=false)] - public string Format { get; set; } + [JsonPropertyName("format")] + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } /// /// Returns the string presentation of the object @@ -75,82 +73,123 @@ protected DocumentImage() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentImage {\n"); sb.Append(" Image: ").Append(Image).Append("\n"); sb.Append(" Format: ").Append(Format).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as DocumentImage); + yield break; } + } + /// + /// A Json converter for type + /// + public class DocumentImageJsonConverter : JsonConverter + { /// - /// Returns true if DocumentImage instances are equal + /// Deserializes json to /// - /// Instance of DocumentImage to be compared - /// Boolean - public bool Equals(DocumentImage input) + /// + /// + /// + /// + /// + public override DocumentImage Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Image == input.Image || - (this.Image != null && - this.Image.Equals(input.Image)) - ) && - ( - this.Format == input.Format || - (this.Format != null && - this.Format.Equals(input.Format)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option image = default; + Option format = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "image": + image = new Option(utf8JsonReader.GetString()!); + break; + case "format": + format = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!image.IsSet) + throw new ArgumentException("Property is required for class DocumentImage.", nameof(image)); + + if (image.IsSet && image.Value == null) + throw new ArgumentNullException(nameof(image), "Property is not nullable for class DocumentImage."); + + if (format.IsSet && format.Value == null) + throw new ArgumentNullException(nameof(format), "Property is not nullable for class DocumentImage."); + + return new DocumentImage(image.Value!, format); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentImage documentImage, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Image != null) - hashCode = hashCode * 59 + this.Image.GetHashCode(); - if (this.Format != null) - hashCode = hashCode * 59 + this.Format.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, documentImage, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentImage documentImage, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (documentImage.Image == null) + throw new ArgumentNullException(nameof(documentImage.Image), "Property is required for class DocumentImage."); + + if (documentImage.FormatOption.IsSet && documentImage.Format == null) + throw new ArgumentNullException(nameof(documentImage.Format), "Property is required for class DocumentImage."); + + writer.WriteString("image", documentImage.Image); + + if (documentImage.FormatOption.IsSet) + writer.WriteString("format", documentImage.Format); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs index 1fca4e7..df50a1a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs @@ -1,62 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains document image. /// - [DataContract] - public partial class DocumentImageResult : ResultItem, IEquatable, IValidatableObject + public partial class DocumentImageResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DocumentImageResult() { } - /// - /// Initializes a new instance of the class. - /// - /// rawImageContainer (required). - public DocumentImageResult(ImageData rawImageContainer = default(ImageData), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// rawImageContainer + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public DocumentImageResult(ImageData rawImageContainer, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "rawImageContainer" is required (not null) - if (rawImageContainer == null) - { - throw new InvalidDataException("rawImageContainer is a required property for DocumentImageResult and cannot be null"); - } - else - { - this.RawImageContainer = rawImageContainer; - } - + RawImageContainer = rawImageContainer; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets RawImageContainer /// - [DataMember(Name="RawImageContainer", EmitDefaultValue=true)] + [JsonPropertyName("RawImageContainer")] public ImageData RawImageContainer { get; set; } /// @@ -65,76 +59,158 @@ protected DocumentImageResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentImageResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" RawImageContainer: ").Append(RawImageContainer).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class DocumentImageResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override DocumentImageResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as DocumentImageResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if DocumentImageResult instances are equal - /// - /// Instance of DocumentImageResult to be compared - /// Boolean - public bool Equals(DocumentImageResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.RawImageContainer == input.RawImageContainer || - (this.RawImageContainer != null && - this.RawImageContainer.Equals(input.RawImageContainer)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option rawImageContainer = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RawImageContainer": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rawImageContainer = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!rawImageContainer.IsSet) + throw new ArgumentException("Property is required for class DocumentImageResult.", nameof(rawImageContainer)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class DocumentImageResult.", nameof(resultType)); + + if (rawImageContainer.IsSet && rawImageContainer.Value == null) + throw new ArgumentNullException(nameof(rawImageContainer), "Property is not nullable for class DocumentImageResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocumentImageResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocumentImageResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocumentImageResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocumentImageResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocumentImageResult."); + + return new DocumentImageResult(rawImageContainer.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentImageResult documentImageResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.RawImageContainer != null) - hashCode = hashCode * 59 + this.RawImageContainer.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, documentImageResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentImageResult documentImageResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (documentImageResult.RawImageContainer == null) + throw new ArgumentNullException(nameof(documentImageResult.RawImageContainer), "Property is required for class DocumentImageResult."); + + writer.WritePropertyName("RawImageContainer"); + JsonSerializer.Serialize(writer, documentImageResult.RawImageContainer, jsonSerializerOptions); + if (documentImageResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", documentImageResult.BufLengthOption.Value!.Value); + + if (documentImageResult.LightOption.IsSet) + writer.WriteNumber("light", documentImageResult.LightOption.Value!.Value); + + if (documentImageResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", documentImageResult.ListIdxOption.Value!.Value); + + if (documentImageResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", documentImageResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", documentImageResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs index 0560d1a..a94a5de 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs @@ -1,129 +1,211 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentPosition /// - [DataContract] - public partial class DocumentPosition : IEquatable, IValidatableObject + public partial class DocumentPosition : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// docFormat. - /// angle. - /// width. - /// height. - /// center. - /// leftBottom. - /// leftTop. - /// rightBottom. - /// rightTop. - /// dpi. - public DocumentPosition(int docFormat = default(int), decimal angle = default(decimal), int width = default(int), int height = default(int), Point center = default(Point), Point leftBottom = default(Point), Point leftTop = default(Point), Point rightBottom = default(Point), Point rightTop = default(Point), int dpi = default(int)) + /// docFormat + /// Document rotation angle + /// Document width + /// Document height + /// center + /// leftBottom + /// leftTop + /// rightBottom + /// rightTop + /// dpi + /// inverse + /// objArea + /// objIntAngleDev + /// perspectiveTr + /// resultStatus + [JsonConstructor] + public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int height, Point center, Point leftBottom, Point leftTop, Point rightBottom, Point rightTop, int dpi, Option inverse = default, Option objArea = default, Option objIntAngleDev = default, Option perspectiveTr = default, Option resultStatus = default) { - this.DocFormat = docFormat; - this.Angle = angle; - this.Width = width; - this.Height = height; - this.Center = center; - this.LeftBottom = leftBottom; - this.LeftTop = leftTop; - this.RightBottom = rightBottom; - this.RightTop = rightTop; - this.Dpi = dpi; + DocFormat = docFormat; + Angle = angle; + Width = width; + Height = height; + Center = center; + LeftBottom = leftBottom; + LeftTop = leftTop; + RightBottom = rightBottom; + RightTop = rightTop; + Dpi = dpi; + InverseOption = inverse; + ObjAreaOption = objArea; + ObjIntAngleDevOption = objIntAngleDev; + PerspectiveTrOption = perspectiveTr; + ResultStatusOption = resultStatus; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets DocFormat /// - [DataMember(Name="docFormat", EmitDefaultValue=false)] - public int DocFormat { get; set; } + [JsonPropertyName("docFormat")] + public DocumentFormat DocFormat { get; set; } /// - /// Gets or Sets Angle + /// Document rotation angle /// - [DataMember(Name="Angle", EmitDefaultValue=false)] + /// Document rotation angle + [JsonPropertyName("Angle")] public decimal Angle { get; set; } /// - /// Gets or Sets Width + /// Document width /// - [DataMember(Name="Width", EmitDefaultValue=false)] + /// Document width + [JsonPropertyName("Width")] public int Width { get; set; } /// - /// Gets or Sets Height + /// Document height /// - [DataMember(Name="Height", EmitDefaultValue=false)] + /// Document height + [JsonPropertyName("Height")] public int Height { get; set; } /// /// Gets or Sets Center /// - [DataMember(Name="Center", EmitDefaultValue=false)] + [JsonPropertyName("Center")] public Point Center { get; set; } /// /// Gets or Sets LeftBottom /// - [DataMember(Name="LeftBottom", EmitDefaultValue=false)] + [JsonPropertyName("LeftBottom")] public Point LeftBottom { get; set; } /// /// Gets or Sets LeftTop /// - [DataMember(Name="LeftTop", EmitDefaultValue=false)] + [JsonPropertyName("LeftTop")] public Point LeftTop { get; set; } /// /// Gets or Sets RightBottom /// - [DataMember(Name="RightBottom", EmitDefaultValue=false)] + [JsonPropertyName("RightBottom")] public Point RightBottom { get; set; } /// /// Gets or Sets RightTop /// - [DataMember(Name="RightTop", EmitDefaultValue=false)] + [JsonPropertyName("RightTop")] public Point RightTop { get; set; } /// /// Gets or Sets Dpi /// - [DataMember(Name="Dpi", EmitDefaultValue=false)] + [JsonPropertyName("Dpi")] public int Dpi { get; set; } + /// + /// Used to track the state of Inverse + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option InverseOption { get; private set; } + + /// + /// Gets or Sets Inverse + /// + [JsonPropertyName("Inverse")] + public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new(value); } } + + /// + /// Used to track the state of ObjArea + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ObjAreaOption { get; private set; } + + /// + /// Gets or Sets ObjArea + /// + [JsonPropertyName("ObjArea")] + public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new(value); } } + + /// + /// Used to track the state of ObjIntAngleDev + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ObjIntAngleDevOption { get; private set; } + + /// + /// Gets or Sets ObjIntAngleDev + /// + [JsonPropertyName("ObjIntAngleDev")] + public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new(value); } } + + /// + /// Used to track the state of PerspectiveTr + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PerspectiveTrOption { get; private set; } + + /// + /// Gets or Sets PerspectiveTr + /// + [JsonPropertyName("PerspectiveTr")] + public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new(value); } } + + /// + /// Used to track the state of ResultStatus + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ResultStatusOption { get; private set; } + + /// + /// Gets or Sets ResultStatus + /// + [JsonPropertyName("ResultStatus")] + public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentPosition {\n"); sb.Append(" DocFormat: ").Append(DocFormat).Append("\n"); sb.Append(" Angle: ").Append(Angle).Append("\n"); @@ -135,134 +217,298 @@ public override string ToString() sb.Append(" RightBottom: ").Append(RightBottom).Append("\n"); sb.Append(" RightTop: ").Append(RightTop).Append("\n"); sb.Append(" Dpi: ").Append(Dpi).Append("\n"); + sb.Append(" Inverse: ").Append(Inverse).Append("\n"); + sb.Append(" ObjArea: ").Append(ObjArea).Append("\n"); + sb.Append(" ObjIntAngleDev: ").Append(ObjIntAngleDev).Append("\n"); + sb.Append(" PerspectiveTr: ").Append(PerspectiveTr).Append("\n"); + sb.Append(" ResultStatus: ").Append(ResultStatus).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as DocumentPosition); + yield break; } + } + /// + /// A Json converter for type + /// + public class DocumentPositionJsonConverter : JsonConverter + { /// - /// Returns true if DocumentPosition instances are equal + /// Deserializes json to /// - /// Instance of DocumentPosition to be compared - /// Boolean - public bool Equals(DocumentPosition input) + /// + /// + /// + /// + /// + public override DocumentPosition Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.DocFormat == input.DocFormat || - (this.DocFormat != null && - this.DocFormat.Equals(input.DocFormat)) - ) && - ( - this.Angle == input.Angle || - (this.Angle != null && - this.Angle.Equals(input.Angle)) - ) && - ( - this.Width == input.Width || - (this.Width != null && - this.Width.Equals(input.Width)) - ) && - ( - this.Height == input.Height || - (this.Height != null && - this.Height.Equals(input.Height)) - ) && - ( - this.Center == input.Center || - (this.Center != null && - this.Center.Equals(input.Center)) - ) && - ( - this.LeftBottom == input.LeftBottom || - (this.LeftBottom != null && - this.LeftBottom.Equals(input.LeftBottom)) - ) && - ( - this.LeftTop == input.LeftTop || - (this.LeftTop != null && - this.LeftTop.Equals(input.LeftTop)) - ) && - ( - this.RightBottom == input.RightBottom || - (this.RightBottom != null && - this.RightBottom.Equals(input.RightBottom)) - ) && - ( - this.RightTop == input.RightTop || - (this.RightTop != null && - this.RightTop.Equals(input.RightTop)) - ) && - ( - this.Dpi == input.Dpi || - (this.Dpi != null && - this.Dpi.Equals(input.Dpi)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docFormat = default; + Option angle = default; + Option width = default; + Option height = default; + Option center = default; + Option leftBottom = default; + Option leftTop = default; + Option rightBottom = default; + Option rightTop = default; + Option dpi = default; + Option inverse = default; + Option objArea = default; + Option objIntAngleDev = default; + Option perspectiveTr = default; + Option resultStatus = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "docFormat": + string? docFormatRawValue = utf8JsonReader.GetString(); + if (docFormatRawValue != null) + docFormat = new Option(DocumentFormatValueConverter.FromStringOrDefault(docFormatRawValue)); + break; + case "Angle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + angle = new Option(utf8JsonReader.GetDecimal()); + break; + case "Width": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + width = new Option(utf8JsonReader.GetInt32()); + break; + case "Height": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + height = new Option(utf8JsonReader.GetInt32()); + break; + case "Center": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + center = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "LeftBottom": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + leftBottom = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "LeftTop": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + leftTop = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RightBottom": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rightBottom = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RightTop": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rightTop = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Dpi": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + dpi = new Option(utf8JsonReader.GetInt32()); + break; + case "Inverse": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + inverse = new Option(utf8JsonReader.GetInt32()); + break; + case "ObjArea": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + objArea = new Option(utf8JsonReader.GetInt32()); + break; + case "ObjIntAngleDev": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + objIntAngleDev = new Option(utf8JsonReader.GetInt32()); + break; + case "PerspectiveTr": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + perspectiveTr = new Option(utf8JsonReader.GetInt32()); + break; + case "ResultStatus": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultStatus = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!docFormat.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(docFormat)); + + if (!angle.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(angle)); + + if (!width.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(width)); + + if (!height.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(height)); + + if (!center.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(center)); + + if (!leftBottom.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(leftBottom)); + + if (!leftTop.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(leftTop)); + + if (!rightBottom.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(rightBottom)); + + if (!rightTop.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(rightTop)); + + if (!dpi.IsSet) + throw new ArgumentException("Property is required for class DocumentPosition.", nameof(dpi)); + + if (docFormat.IsSet && docFormat.Value == null) + throw new ArgumentNullException(nameof(docFormat), "Property is not nullable for class DocumentPosition."); + + if (angle.IsSet && angle.Value == null) + throw new ArgumentNullException(nameof(angle), "Property is not nullable for class DocumentPosition."); + + if (width.IsSet && width.Value == null) + throw new ArgumentNullException(nameof(width), "Property is not nullable for class DocumentPosition."); + + if (height.IsSet && height.Value == null) + throw new ArgumentNullException(nameof(height), "Property is not nullable for class DocumentPosition."); + + if (center.IsSet && center.Value == null) + throw new ArgumentNullException(nameof(center), "Property is not nullable for class DocumentPosition."); + + if (leftBottom.IsSet && leftBottom.Value == null) + throw new ArgumentNullException(nameof(leftBottom), "Property is not nullable for class DocumentPosition."); + + if (leftTop.IsSet && leftTop.Value == null) + throw new ArgumentNullException(nameof(leftTop), "Property is not nullable for class DocumentPosition."); + + if (rightBottom.IsSet && rightBottom.Value == null) + throw new ArgumentNullException(nameof(rightBottom), "Property is not nullable for class DocumentPosition."); + + if (rightTop.IsSet && rightTop.Value == null) + throw new ArgumentNullException(nameof(rightTop), "Property is not nullable for class DocumentPosition."); + + if (dpi.IsSet && dpi.Value == null) + throw new ArgumentNullException(nameof(dpi), "Property is not nullable for class DocumentPosition."); + + if (inverse.IsSet && inverse.Value == null) + throw new ArgumentNullException(nameof(inverse), "Property is not nullable for class DocumentPosition."); + + if (objArea.IsSet && objArea.Value == null) + throw new ArgumentNullException(nameof(objArea), "Property is not nullable for class DocumentPosition."); + + if (objIntAngleDev.IsSet && objIntAngleDev.Value == null) + throw new ArgumentNullException(nameof(objIntAngleDev), "Property is not nullable for class DocumentPosition."); + + if (perspectiveTr.IsSet && perspectiveTr.Value == null) + throw new ArgumentNullException(nameof(perspectiveTr), "Property is not nullable for class DocumentPosition."); + + if (resultStatus.IsSet && resultStatus.Value == null) + throw new ArgumentNullException(nameof(resultStatus), "Property is not nullable for class DocumentPosition."); + + return new DocumentPosition(docFormat.Value!.Value!, angle.Value!.Value!, width.Value!.Value!, height.Value!.Value!, center.Value!, leftBottom.Value!, leftTop.Value!, rightBottom.Value!, rightTop.Value!, dpi.Value!.Value!, inverse, objArea, objIntAngleDev, perspectiveTr, resultStatus); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentPosition documentPosition, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DocFormat != null) - hashCode = hashCode * 59 + this.DocFormat.GetHashCode(); - if (this.Angle != null) - hashCode = hashCode * 59 + this.Angle.GetHashCode(); - if (this.Width != null) - hashCode = hashCode * 59 + this.Width.GetHashCode(); - if (this.Height != null) - hashCode = hashCode * 59 + this.Height.GetHashCode(); - if (this.Center != null) - hashCode = hashCode * 59 + this.Center.GetHashCode(); - if (this.LeftBottom != null) - hashCode = hashCode * 59 + this.LeftBottom.GetHashCode(); - if (this.LeftTop != null) - hashCode = hashCode * 59 + this.LeftTop.GetHashCode(); - if (this.RightBottom != null) - hashCode = hashCode * 59 + this.RightBottom.GetHashCode(); - if (this.RightTop != null) - hashCode = hashCode * 59 + this.RightTop.GetHashCode(); - if (this.Dpi != null) - hashCode = hashCode * 59 + this.Dpi.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, documentPosition, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentPosition documentPosition, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (documentPosition.Center == null) + throw new ArgumentNullException(nameof(documentPosition.Center), "Property is required for class DocumentPosition."); + + if (documentPosition.LeftBottom == null) + throw new ArgumentNullException(nameof(documentPosition.LeftBottom), "Property is required for class DocumentPosition."); + + if (documentPosition.LeftTop == null) + throw new ArgumentNullException(nameof(documentPosition.LeftTop), "Property is required for class DocumentPosition."); + + if (documentPosition.RightBottom == null) + throw new ArgumentNullException(nameof(documentPosition.RightBottom), "Property is required for class DocumentPosition."); + + if (documentPosition.RightTop == null) + throw new ArgumentNullException(nameof(documentPosition.RightTop), "Property is required for class DocumentPosition."); + + var docFormatRawValue = DocumentFormatValueConverter.ToJsonValue(documentPosition.DocFormat); + writer.WriteNumber("docFormat", docFormatRawValue); + + writer.WriteNumber("Angle", documentPosition.Angle); + + writer.WriteNumber("Width", documentPosition.Width); + + writer.WriteNumber("Height", documentPosition.Height); + + writer.WritePropertyName("Center"); + JsonSerializer.Serialize(writer, documentPosition.Center, jsonSerializerOptions); + writer.WritePropertyName("LeftBottom"); + JsonSerializer.Serialize(writer, documentPosition.LeftBottom, jsonSerializerOptions); + writer.WritePropertyName("LeftTop"); + JsonSerializer.Serialize(writer, documentPosition.LeftTop, jsonSerializerOptions); + writer.WritePropertyName("RightBottom"); + JsonSerializer.Serialize(writer, documentPosition.RightBottom, jsonSerializerOptions); + writer.WritePropertyName("RightTop"); + JsonSerializer.Serialize(writer, documentPosition.RightTop, jsonSerializerOptions); + writer.WriteNumber("Dpi", documentPosition.Dpi); + + if (documentPosition.InverseOption.IsSet) + writer.WriteNumber("Inverse", documentPosition.InverseOption.Value!.Value); + + if (documentPosition.ObjAreaOption.IsSet) + writer.WriteNumber("ObjArea", documentPosition.ObjAreaOption.Value!.Value); + + if (documentPosition.ObjIntAngleDevOption.IsSet) + writer.WriteNumber("ObjIntAngleDev", documentPosition.ObjIntAngleDevOption.Value!.Value); + + if (documentPosition.PerspectiveTrOption.IsSet) + writer.WriteNumber("PerspectiveTr", documentPosition.PerspectiveTrOption.Value!.Value); + + if (documentPosition.ResultStatusOption.IsSet) + writer.WriteNumber("ResultStatus", documentPosition.ResultStatusOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs new file mode 100644 index 0000000..0ed6ba8 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// DocumentPositionItem + /// + public partial class DocumentPositionItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// documentPosition + [JsonConstructor] + public DocumentPositionItem(DocumentPosition documentPosition) + { + DocumentPosition = documentPosition; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets DocumentPosition + /// + [JsonPropertyName("DocumentPosition")] + public DocumentPosition DocumentPosition { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class DocumentPositionItem {\n"); + sb.Append(" DocumentPosition: ").Append(DocumentPosition).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class DocumentPositionItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override DocumentPositionItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option documentPosition = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocumentPosition": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + documentPosition = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!documentPosition.IsSet) + throw new ArgumentException("Property is required for class DocumentPositionItem.", nameof(documentPosition)); + + if (documentPosition.IsSet && documentPosition.Value == null) + throw new ArgumentNullException(nameof(documentPosition), "Property is not nullable for class DocumentPositionItem."); + + return new DocumentPositionItem(documentPosition.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentPositionItem documentPositionItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, documentPositionItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentPositionItem documentPositionItem, JsonSerializerOptions jsonSerializerOptions) + { + if (documentPositionItem.DocumentPosition == null) + throw new ArgumentNullException(nameof(documentPositionItem.DocumentPosition), "Property is required for class DocumentPositionItem."); + + writer.WritePropertyName("DocumentPosition"); + JsonSerializer.Serialize(writer, documentPositionItem.DocumentPosition, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs index fa14439..358fb78 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs @@ -1,53 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains information about document position on the input image, its center, angle, etc /// - [DataContract] - public partial class DocumentPositionResult : ResultItem, IEquatable, IValidatableObject + public partial class DocumentPositionResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DocumentPositionResult() { } - /// - /// Initializes a new instance of the class. - /// - /// documentPosition. - public DocumentPositionResult(DocumentPosition documentPosition = default(DocumentPosition), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// documentPosition + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public DocumentPositionResult(DocumentPosition documentPosition, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - this.DocumentPosition = documentPosition; + DocumentPosition = documentPosition; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets DocumentPosition /// - [DataMember(Name="DocumentPosition", EmitDefaultValue=false)] + [JsonPropertyName("DocumentPosition")] public DocumentPosition DocumentPosition { get; set; } /// @@ -56,76 +59,158 @@ protected DocumentPositionResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentPositionResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" DocumentPosition: ").Append(DocumentPosition).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class DocumentPositionResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override DocumentPositionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as DocumentPositionResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if DocumentPositionResult instances are equal - /// - /// Instance of DocumentPositionResult to be compared - /// Boolean - public bool Equals(DocumentPositionResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.DocumentPosition == input.DocumentPosition || - (this.DocumentPosition != null && - this.DocumentPosition.Equals(input.DocumentPosition)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option documentPosition = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocumentPosition": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + documentPosition = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!documentPosition.IsSet) + throw new ArgumentException("Property is required for class DocumentPositionResult.", nameof(documentPosition)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class DocumentPositionResult.", nameof(resultType)); + + if (documentPosition.IsSet && documentPosition.Value == null) + throw new ArgumentNullException(nameof(documentPosition), "Property is not nullable for class DocumentPositionResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocumentPositionResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocumentPositionResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocumentPositionResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocumentPositionResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocumentPositionResult."); + + return new DocumentPositionResult(documentPosition.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentPositionResult documentPositionResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.DocumentPosition != null) - hashCode = hashCode * 59 + this.DocumentPosition.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, documentPositionResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentPositionResult documentPositionResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (documentPositionResult.DocumentPosition == null) + throw new ArgumentNullException(nameof(documentPositionResult.DocumentPosition), "Property is required for class DocumentPositionResult."); + + writer.WritePropertyName("DocumentPosition"); + JsonSerializer.Serialize(writer, documentPositionResult.DocumentPosition, jsonSerializerOptions); + if (documentPositionResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", documentPositionResult.BufLengthOption.Value!.Value); + + if (documentPositionResult.LightOption.IsSet) + writer.WriteNumber("light", documentPositionResult.LightOption.Value!.Value); + + if (documentPositionResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", documentPositionResult.ListIdxOption.Value!.Value); + + if (documentPositionResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", documentPositionResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", documentPositionResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs index 66ee65e..f244415 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs @@ -1,716 +1,2678 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Possible values for document types - public class DocumentType + /// + /// Possible values for document types + public enum DocumentType + { + /// + /// Enum NOT_DEFINED for value: 0 + /// + NOT_DEFINED = 0, + + /// + /// Enum PASSPORT for value: 11 + /// + PASSPORT = 11, + + /// + /// Enum IDENTITY_CARD for value: 12 + /// + IDENTITY_CARD = 12, + + /// + /// Enum DIPLOMATIC_PASSPORT for value: 13 + /// + DIPLOMATIC_PASSPORT = 13, + + /// + /// Enum SERVICE_PASSPORT for value: 14 + /// + SERVICE_PASSPORT = 14, + + /// + /// Enum SEAMANS_IDENTITY_DOCUMENT for value: 15 + /// + SEAMANS_IDENTITY_DOCUMENT = 15, + + /// + /// Enum IDENTITY_CARD_FOR_RESIDENCE for value: 16 + /// + IDENTITY_CARD_FOR_RESIDENCE = 16, + + /// + /// Enum TRAVEL_DOCUMENT for value: 17 + /// + TRAVEL_DOCUMENT = 17, + + /// + /// Enum NATIONAL_IDENTITY_CARD for value: 20 + /// + NATIONAL_IDENTITY_CARD = 20, + + /// + /// Enum SOCIAL_IDENTITY_CARD for value: 21 + /// + SOCIAL_IDENTITY_CARD = 21, + + /// + /// Enum ALIENS_IDENTITY_CARD for value: 22 + /// + ALIENS_IDENTITY_CARD = 22, + + /// + /// Enum PRIVILEGED_IDENTITY_CARD for value: 23 + /// + PRIVILEGED_IDENTITY_CARD = 23, + + /// + /// Enum RESIDENCE_PERMIT_IDENTITY_CARD for value: 24 + /// + RESIDENCE_PERMIT_IDENTITY_CARD = 24, + + /// + /// Enum ORIGIN_CARD for value: 25 + /// + ORIGIN_CARD = 25, + + /// + /// Enum EMERGENCY_PASSPORT for value: 26 + /// + EMERGENCY_PASSPORT = 26, + + /// + /// Enum ALIENS_PASSPORT for value: 27 + /// + ALIENS_PASSPORT = 27, + + /// + /// Enum ALTERNATIVE_IDENTITY_CARD for value: 28 + /// + ALTERNATIVE_IDENTITY_CARD = 28, + + /// + /// Enum VISA_ID2 for value: 29 + /// + VISA_ID2 = 29, + + /// + /// Enum VISA_ID3 for value: 30 + /// + VISA_ID3 = 30, + + /// + /// Enum AUTHORIZATION_CARD for value: 32 + /// + AUTHORIZATION_CARD = 32, + + /// + /// Enum BEGINNER_PERMIT for value: 33 + /// + BEGINNER_PERMIT = 33, + + /// + /// Enum BORDER_CROSSING_CARD for value: 34 + /// + BORDER_CROSSING_CARD = 34, + + /// + /// Enum CHAUFFEUR_LICENSE for value: 35 + /// + CHAUFFEUR_LICENSE = 35, + + /// + /// Enum CHAUFFEUR_LICENSE_UNDER_18 for value: 36 + /// + CHAUFFEUR_LICENSE_UNDER_18 = 36, + + /// + /// Enum CHAUFFEUR_LICENSE_UNDER_21 for value: 37 + /// + CHAUFFEUR_LICENSE_UNDER_21 = 37, + + /// + /// Enum COMMERCIAL_DRIVING_LICENSE for value: 38 + /// + COMMERCIAL_DRIVING_LICENSE = 38, + + /// + /// Enum COMMERCIAL_DRIVING_LICENSE_INSTRUCTIONAL_PERMIT for value: 39 + /// + COMMERCIAL_DRIVING_LICENSE_INSTRUCTIONAL_PERMIT = 39, + + /// + /// Enum COMMERCIAL_DRIVING_LICENSE_UNDER_18 for value: 40 + /// + COMMERCIAL_DRIVING_LICENSE_UNDER_18 = 40, + + /// + /// Enum COMMERCIAL_DRIVING_LICENSE_UNDER_21 for value: 41 + /// + COMMERCIAL_DRIVING_LICENSE_UNDER_21 = 41, + + /// + /// Enum COMMERCIAL_INSTRUCTION_PERMIT for value: 42 + /// + COMMERCIAL_INSTRUCTION_PERMIT = 42, + + /// + /// Enum COMMERCIAL_NEW_PERMIT for value: 43 + /// + COMMERCIAL_NEW_PERMIT = 43, + + /// + /// Enum CONCEALED_CARRY_LICENSE for value: 44 + /// + CONCEALED_CARRY_LICENSE = 44, + + /// + /// Enum CONCEALED_FIREARM_PERMIT for value: 45 + /// + CONCEALED_FIREARM_PERMIT = 45, + + /// + /// Enum CONDITIONAL_DRIVING_LICENSE for value: 46 + /// + CONDITIONAL_DRIVING_LICENSE = 46, + + /// + /// Enum DEPARTMENT_OF_VETERANS_AFFAIRS_IDENTITY_CARD for value: 47 + /// + DEPARTMENT_OF_VETERANS_AFFAIRS_IDENTITY_CARD = 47, + + /// + /// Enum DIPLOMATIC_DRIVING_LICENSE for value: 48 + /// + DIPLOMATIC_DRIVING_LICENSE = 48, + + /// + /// Enum DRIVING_LICENSE for value: 49 + /// + DRIVING_LICENSE = 49, + + /// + /// Enum DRIVING_LICENSE_INSTRUCTIONAL_PERMIT for value: 50 + /// + DRIVING_LICENSE_INSTRUCTIONAL_PERMIT = 50, + + /// + /// Enum DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_18 for value: 51 + /// + DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_18 = 51, + + /// + /// Enum DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_21 for value: 52 + /// + DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_21 = 52, + + /// + /// Enum DRIVING_LICENSE_LEARNERS_PERMIT for value: 53 + /// + DRIVING_LICENSE_LEARNERS_PERMIT = 53, + + /// + /// Enum DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_18 for value: 54 + /// + DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_18 = 54, + + /// + /// Enum DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_21 for value: 55 + /// + DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_21 = 55, + + /// + /// Enum DRIVING_LICENSE_NOVICE for value: 56 + /// + DRIVING_LICENSE_NOVICE = 56, + + /// + /// Enum DRIVING_LICENSE_NOVICE_UNDER_18 for value: 57 + /// + DRIVING_LICENSE_NOVICE_UNDER_18 = 57, + + /// + /// Enum DRIVING_LICENSE_NOVICE_UNDER_21 for value: 58 + /// + DRIVING_LICENSE_NOVICE_UNDER_21 = 58, + + /// + /// Enum DRIVING_LICENSE_REGISTERED_OFFENDER for value: 59 + /// + DRIVING_LICENSE_REGISTERED_OFFENDER = 59, + + /// + /// Enum DRIVING_LICENSE_RESTRICTED_UNDER_18 for value: 60 + /// + DRIVING_LICENSE_RESTRICTED_UNDER_18 = 60, + + /// + /// Enum DRIVING_LICENSE_RESTRICTED_UNDER_21 for value: 61 + /// + DRIVING_LICENSE_RESTRICTED_UNDER_21 = 61, + + /// + /// Enum DRIVING_LICENSE_TEMPORARY_VISITOR for value: 62 + /// + DRIVING_LICENSE_TEMPORARY_VISITOR = 62, + + /// + /// Enum DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_18 for value: 63 + /// + DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_18 = 63, + + /// + /// Enum DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_21 for value: 64 + /// + DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_21 = 64, + + /// + /// Enum DRIVING_LICENSE_UNDER_18 for value: 65 + /// + DRIVING_LICENSE_UNDER_18 = 65, + + /// + /// Enum DRIVING_LICENSE_UNDER_21 for value: 66 + /// + DRIVING_LICENSE_UNDER_21 = 66, + + /// + /// Enum EMPLOYMENT_DRIVING_PERMIT for value: 67 + /// + EMPLOYMENT_DRIVING_PERMIT = 67, + + /// + /// Enum ENHANCED_CHAUFFEUR_LICENSE for value: 68 + /// + ENHANCED_CHAUFFEUR_LICENSE = 68, + + /// + /// Enum ENHANCED_CHAUFFEUR_LICENSE_UNDER_18 for value: 69 + /// + ENHANCED_CHAUFFEUR_LICENSE_UNDER_18 = 69, + + /// + /// Enum ENHANCED_CHAUFFEUR_LICENSE_UNDER_21 for value: 70 + /// + ENHANCED_CHAUFFEUR_LICENSE_UNDER_21 = 70, + + /// + /// Enum ENHANCED_COMMERCIAL_DRIVING_LICENSE for value: 71 + /// + ENHANCED_COMMERCIAL_DRIVING_LICENSE = 71, + + /// + /// Enum ENHANCED_DRIVING_LICENSE for value: 72 + /// + ENHANCED_DRIVING_LICENSE = 72, + + /// + /// Enum ENHANCED_DRIVING_LICENSE_UNDER_18 for value: 73 + /// + ENHANCED_DRIVING_LICENSE_UNDER_18 = 73, + + /// + /// Enum ENHANCED_DRIVING_LICENSE_UNDER_21 for value: 74 + /// + ENHANCED_DRIVING_LICENSE_UNDER_21 = 74, + + /// + /// Enum ENHANCED_IDENTITY_CARD for value: 75 + /// + ENHANCED_IDENTITY_CARD = 75, + + /// + /// Enum ENHANCED_IDENTITY_CARD_UNDER_18 for value: 76 + /// + ENHANCED_IDENTITY_CARD_UNDER_18 = 76, + + /// + /// Enum ENHANCED_IDENTITY_CARD_UNDER_21 for value: 77 + /// + ENHANCED_IDENTITY_CARD_UNDER_21 = 77, + + /// + /// Enum ENHANCED_OPERATORS_LICENSE for value: 78 + /// + ENHANCED_OPERATORS_LICENSE = 78, + + /// + /// Enum FIREARMS_PERMIT for value: 79 + /// + FIREARMS_PERMIT = 79, + + /// + /// Enum FULL_PROVISIONAL_LICENSE for value: 80 + /// + FULL_PROVISIONAL_LICENSE = 80, + + /// + /// Enum FULL_PROVISIONAL_LICENSE_UNDER_18 for value: 81 + /// + FULL_PROVISIONAL_LICENSE_UNDER_18 = 81, + + /// + /// Enum FULL_PROVISIONAL_LICENSE_UNDER_21 for value: 82 + /// + FULL_PROVISIONAL_LICENSE_UNDER_21 = 82, + + /// + /// Enum GENEVA_CONVENTIONS_IDENTITY_CARD for value: 83 + /// + GENEVA_CONVENTIONS_IDENTITY_CARD = 83, + + /// + /// Enum GRADUATED_DRIVING_LICENSE_UNDER_18 for value: 84 + /// + GRADUATED_DRIVING_LICENSE_UNDER_18 = 84, + + /// + /// Enum GRADUATED_DRIVING_LICENSE_UNDER_21 for value: 85 + /// + GRADUATED_DRIVING_LICENSE_UNDER_21 = 85, + + /// + /// Enum GRADUATED_INSTRUCTION_PERMIT_UNDER_18 for value: 86 + /// + GRADUATED_INSTRUCTION_PERMIT_UNDER_18 = 86, + + /// + /// Enum GRADUATED_INSTRUCTION_PERMIT_UNDER_21 for value: 87 + /// + GRADUATED_INSTRUCTION_PERMIT_UNDER_21 = 87, + + /// + /// Enum GRADUATED_LICENSE_UNDER_18 for value: 88 + /// + GRADUATED_LICENSE_UNDER_18 = 88, + + /// + /// Enum GRADUATED_LICENSE_UNDER_21 for value: 89 + /// + GRADUATED_LICENSE_UNDER_21 = 89, + + /// + /// Enum HANDGUN_CARRY_PERMIT for value: 90 + /// + HANDGUN_CARRY_PERMIT = 90, + + /// + /// Enum IDENTITY_AND_PRIVILEGE_CARD for value: 91 + /// + IDENTITY_AND_PRIVILEGE_CARD = 91, + + /// + /// Enum IDENTITY_CARD_MOBILITY_IMPAIRED for value: 92 + /// + IDENTITY_CARD_MOBILITY_IMPAIRED = 92, + + /// + /// Enum IDENTITY_CARD_REGISTERED_OFFENDER for value: 93 + /// + IDENTITY_CARD_REGISTERED_OFFENDER = 93, + + /// + /// Enum IDENTITY_CARD_TEMPORARY_VISITOR for value: 94 + /// + IDENTITY_CARD_TEMPORARY_VISITOR = 94, + + /// + /// Enum IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_18 for value: 95 + /// + IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_18 = 95, + + /// + /// Enum IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_21 for value: 96 + /// + IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_21 = 96, + + /// + /// Enum IDENTITY_CARD_UNDER_18 for value: 97 + /// + IDENTITY_CARD_UNDER_18 = 97, + + /// + /// Enum IDENTITY_CARD_UNDER_21 for value: 98 + /// + IDENTITY_CARD_UNDER_21 = 98, + + /// + /// Enum OTHER for value: 99 + /// + OTHER = 99, + + /// + /// Enum IGNITION_INTERLOCK_PERMIT for value: 100 + /// + IGNITION_INTERLOCK_PERMIT = 100, + + /// + /// Enum IMMIGRANT_VISA for value: 101 + /// + IMMIGRANT_VISA = 101, + + /// + /// Enum INSTRUCTION_PERMIT for value: 102 + /// + INSTRUCTION_PERMIT = 102, + + /// + /// Enum INSTRUCTION_PERMIT_UNDER_18 for value: 103 + /// + INSTRUCTION_PERMIT_UNDER_18 = 103, + + /// + /// Enum INSTRUCTION_PERMIT_UNDER_21 for value: 104 + /// + INSTRUCTION_PERMIT_UNDER_21 = 104, + + /// + /// Enum INTERIM_DRIVING_LICENSE for value: 105 + /// + INTERIM_DRIVING_LICENSE = 105, + + /// + /// Enum INTERIM_IDENTITY_CARD for value: 106 + /// + INTERIM_IDENTITY_CARD = 106, + + /// + /// Enum INTERMEDIATE_DRIVING_LICENSE for value: 107 + /// + INTERMEDIATE_DRIVING_LICENSE = 107, + + /// + /// Enum INTERMEDIATE_DRIVING_LICENSE_UNDER_18 for value: 108 + /// + INTERMEDIATE_DRIVING_LICENSE_UNDER_18 = 108, + + /// + /// Enum INTERMEDIATE_DRIVING_LICENSE_UNDER_21 for value: 109 + /// + INTERMEDIATE_DRIVING_LICENSE_UNDER_21 = 109, + + /// + /// Enum JUNIOR_DRIVING_LICENSE for value: 110 + /// + JUNIOR_DRIVING_LICENSE = 110, + + /// + /// Enum LEARNER_INSTRUCTIONAL_PERMIT for value: 111 + /// + LEARNER_INSTRUCTIONAL_PERMIT = 111, + + /// + /// Enum LEARNER_LICENSE for value: 112 + /// + LEARNER_LICENSE = 112, + + /// + /// Enum LEARNER_LICENSE_UNDER_18 for value: 113 + /// + LEARNER_LICENSE_UNDER_18 = 113, + + /// + /// Enum LEARNER_LICENSE_UNDER_21 for value: 114 + /// + LEARNER_LICENSE_UNDER_21 = 114, + + /// + /// Enum LEARNER_PERMIT for value: 115 + /// + LEARNER_PERMIT = 115, + + /// + /// Enum LEARNER_PERMIT_UNDER_18 for value: 116 + /// + LEARNER_PERMIT_UNDER_18 = 116, + + /// + /// Enum LEARNER_PERMIT_UNDER_21 for value: 117 + /// + LEARNER_PERMIT_UNDER_21 = 117, + + /// + /// Enum LIMITED_LICENSE for value: 118 + /// + LIMITED_LICENSE = 118, + + /// + /// Enum LIMITED_PERMIT for value: 119 + /// + LIMITED_PERMIT = 119, + + /// + /// Enum LIMITED_TERM_DRIVING_LICENSE for value: 120 + /// + LIMITED_TERM_DRIVING_LICENSE = 120, + + /// + /// Enum LIMITED_TERM_IDENTITY_CARD for value: 121 + /// + LIMITED_TERM_IDENTITY_CARD = 121, + + /// + /// Enum LIQUOR_IDENTITY_CARD for value: 122 + /// + LIQUOR_IDENTITY_CARD = 122, + + /// + /// Enum NEW_PERMIT for value: 123 + /// + NEW_PERMIT = 123, + + /// + /// Enum NEW_PERMIT_UNDER_18 for value: 124 + /// + NEW_PERMIT_UNDER_18 = 124, + + /// + /// Enum NEW_PERMIT_UNDER_21 for value: 125 + /// + NEW_PERMIT_UNDER_21 = 125, + + /// + /// Enum NON_US_CITIZEN_DRIVING_LICENSE for value: 126 + /// + NON_US_CITIZEN_DRIVING_LICENSE = 126, + + /// + /// Enum OCCUPATIONAL_DRIVING_LICENSE for value: 127 + /// + OCCUPATIONAL_DRIVING_LICENSE = 127, + + /// + /// Enum ONEIDA_TRIBE_OF_INDIANS_IDENTITY_CARD for value: 128 + /// + ONEIDA_TRIBE_OF_INDIANS_IDENTITY_CARD = 128, + + /// + /// Enum OPERATOR_LICENSE for value: 129 + /// + OPERATOR_LICENSE = 129, + + /// + /// Enum OPERATOR_LICENSE_UNDER_18 for value: 130 + /// + OPERATOR_LICENSE_UNDER_18 = 130, + + /// + /// Enum OPERATOR_LICENSE_UNDER_21 for value: 131 + /// + OPERATOR_LICENSE_UNDER_21 = 131, + + /// + /// Enum PERMANENT_DRIVING_LICENSE for value: 132 + /// + PERMANENT_DRIVING_LICENSE = 132, + + /// + /// Enum PERMIT_TO_REENTER for value: 133 + /// + PERMIT_TO_REENTER = 133, + + /// + /// Enum PROBATIONARY_AUTO_LICENSE for value: 134 + /// + PROBATIONARY_AUTO_LICENSE = 134, + + /// + /// Enum PROBATIONARY_DRIVING_LICENSE_UNDER_18 for value: 135 + /// + PROBATIONARY_DRIVING_LICENSE_UNDER_18 = 135, + + /// + /// Enum PROBATIONARY_DRIVING_LICENSE_UNDER_21 for value: 136 + /// + PROBATIONARY_DRIVING_LICENSE_UNDER_21 = 136, + + /// + /// Enum PROBATIONARY_VEHICLE_SALES_PERSON_LICENSE for value: 137 + /// + PROBATIONARY_VEHICLE_SALES_PERSON_LICENSE = 137, + + /// + /// Enum PROVISIONAL_DRIVING_LICENSE for value: 138 + /// + PROVISIONAL_DRIVING_LICENSE = 138, + + /// + /// Enum PROVISIONAL_DRIVING_LICENSE_UNDER_18 for value: 139 + /// + PROVISIONAL_DRIVING_LICENSE_UNDER_18 = 139, + + /// + /// Enum PROVISIONAL_DRIVING_LICENSE_UNDER_21 for value: 140 + /// + PROVISIONAL_DRIVING_LICENSE_UNDER_21 = 140, + + /// + /// Enum PROVISIONAL_LICENSE for value: 141 + /// + PROVISIONAL_LICENSE = 141, + + /// + /// Enum PROVISIONAL_LICENSE_UNDER_18 for value: 142 + /// + PROVISIONAL_LICENSE_UNDER_18 = 142, + + /// + /// Enum PROVISIONAL_LICENSE_UNDER_21 for value: 143 + /// + PROVISIONAL_LICENSE_UNDER_21 = 143, + + /// + /// Enum PUBLIC_PASSENGER_CHAUFFEUR_LICENSE for value: 144 + /// + PUBLIC_PASSENGER_CHAUFFEUR_LICENSE = 144, + + /// + /// Enum RACING_AND_GAMING_COMISSION_CARD for value: 145 + /// + RACING_AND_GAMING_COMISSION_CARD = 145, + + /// + /// Enum REFUGEE_TRAVEL_DOCUMENT for value: 146 + /// + REFUGEE_TRAVEL_DOCUMENT = 146, + + /// + /// Enum RENEWAL_PERMIT for value: 147 + /// + RENEWAL_PERMIT = 147, + + /// + /// Enum RESTRICTED_COMMERCIAL_DRIVER_LICENSE for value: 148 + /// + RESTRICTED_COMMERCIAL_DRIVER_LICENSE = 148, + + /// + /// Enum RESTRICTED_DRIVER_LICENSE for value: 149 + /// + RESTRICTED_DRIVER_LICENSE = 149, + + /// + /// Enum RESTRICTED_PERMIT for value: 150 + /// + RESTRICTED_PERMIT = 150, + + /// + /// Enum SEASONAL_PERMIT for value: 151 + /// + SEASONAL_PERMIT = 151, + + /// + /// Enum SEASONAL_RESIDENT_IDENTITY_CARD for value: 152 + /// + SEASONAL_RESIDENT_IDENTITY_CARD = 152, + + /// + /// Enum SEASONAL_CITIZEN_IDENTITY_CARD for value: 153 + /// + SEASONAL_CITIZEN_IDENTITY_CARD = 153, + + /// + /// Enum SEX_OFFENDER for value: 154 + /// + SEX_OFFENDER = 154, + + /// + /// Enum SOCIAL_SECURITY_CARD for value: 155 + /// + SOCIAL_SECURITY_CARD = 155, + + /// + /// Enum TEMPORARY_DRIVING_LICENSE for value: 156 + /// + TEMPORARY_DRIVING_LICENSE = 156, + + /// + /// Enum TEMPORARY_DRIVING_LICENSE_UNDER_18 for value: 157 + /// + TEMPORARY_DRIVING_LICENSE_UNDER_18 = 157, + + /// + /// Enum TEMPORARY_DRIVING_LICENSE_UNDER_21 for value: 158 + /// + TEMPORARY_DRIVING_LICENSE_UNDER_21 = 158, + + /// + /// Enum TEMPORARY_IDENTITY_CARD for value: 159 + /// + TEMPORARY_IDENTITY_CARD = 159, + + /// + /// Enum TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD for value: 160 + /// + TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD = 160, + + /// + /// Enum TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_18 for value: 161 + /// + TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_18 = 161, + + /// + /// Enum TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_21 for value: 162 + /// + TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_21 = 162, + + /// + /// Enum TEMPORARY_VISITOR_DRIVING_LICENSE for value: 163 + /// + TEMPORARY_VISITOR_DRIVING_LICENSE = 163, + + /// + /// Enum TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_18 for value: 164 + /// + TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_18 = 164, + + /// + /// Enum TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_21 for value: 165 + /// + TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_21 = 165, + + /// + /// Enum UNIFORMED_SERVICES_IDENTITY_CARD for value: 166 + /// + UNIFORMED_SERVICES_IDENTITY_CARD = 166, + + /// + /// Enum VEHICLE_SALES_PERSON_LICENSE for value: 167 + /// + VEHICLE_SALES_PERSON_LICENSE = 167, + + /// + /// Enum WORKER_IDENTIFICATION_CREDENTIAL for value: 168 + /// + WORKER_IDENTIFICATION_CREDENTIAL = 168, + + /// + /// Enum COMMERCIAL_DRIVING_LICENSE_NOVICE for value: 169 + /// + COMMERCIAL_DRIVING_LICENSE_NOVICE = 169, + + /// + /// Enum COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_18 for value: 170 + /// + COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_18 = 170, + + /// + /// Enum COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_21 for value: 171 + /// + COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_21 = 171, + + /// + /// Enum PASSPORT_CARD for value: 172 + /// + PASSPORT_CARD = 172, + + /// + /// Enum PASSPORT_RESIDENT_CARD for value: 173 + /// + PASSPORT_RESIDENT_CARD = 173, + + /// + /// Enum PERSONAL_IDENTIFICATION_VERIFICATION for value: 174 + /// + PERSONAL_IDENTIFICATION_VERIFICATION = 174, + + /// + /// Enum TEMPORARY_OPERATOR_LICENSE for value: 175 + /// + TEMPORARY_OPERATOR_LICENSE = 175, + + /// + /// Enum DRIVING_LICENSE_UNDER_19 for value: 176 + /// + DRIVING_LICENSE_UNDER_19 = 176, + + /// + /// Enum IDENTITY_CARD_UNDER_19 for value: 177 + /// + IDENTITY_CARD_UNDER_19 = 177, + + /// + /// Enum VISA for value: 178 + /// + VISA = 178, + + /// + /// Enum TEMPORARY_PASSPORT for value: 179 + /// + TEMPORARY_PASSPORT = 179, + + /// + /// Enum VOTING_CARD for value: 180 + /// + VOTING_CARD = 180, + + /// + /// Enum HEALTH_CARD for value: 181 + /// + HEALTH_CARD = 181, + + /// + /// Enum CERTIFICATE_OF_CITIZENSHIP for value: 182 + /// + CERTIFICATE_OF_CITIZENSHIP = 182, + + /// + /// Enum ADDRESS_CARD for value: 183 + /// + ADDRESS_CARD = 183, + + /// + /// Enum AIRPORT_IMMIGRATION_CARD for value: 184 + /// + AIRPORT_IMMIGRATION_CARD = 184, + + /// + /// Enum ALIEN_REGISTRATION_CARD for value: 185 + /// + ALIEN_REGISTRATION_CARD = 185, + + /// + /// Enum APEH_CARD for value: 186 + /// + APEH_CARD = 186, + + /// + /// Enum COUPON_TO_DRIVING_LICENSE for value: 187 + /// + COUPON_TO_DRIVING_LICENSE = 187, + + /// + /// Enum CREW_MEMBER_CERTIFICATE for value: 188 + /// + CREW_MEMBER_CERTIFICATE = 188, + + /// + /// Enum DOCUMENT_FOR_RETURN for value: 189 + /// + DOCUMENT_FOR_RETURN = 189, + + /// + /// Enum E_CARD for value: 190 + /// + E_CARD = 190, + + /// + /// Enum EMPLOYMENT_CARD for value: 191 + /// + EMPLOYMENT_CARD = 191, + + /// + /// Enum HKSAR_IMMIGRATION_FORM for value: 192 + /// + HKSAR_IMMIGRATION_FORM = 192, + + /// + /// Enum IMMIGRANT_CARD for value: 193 + /// + IMMIGRANT_CARD = 193, + + /// + /// Enum LABOUR_CARD for value: 194 + /// + LABOUR_CARD = 194, + + /// + /// Enum LAISSEZ_PASSER for value: 195 + /// + LAISSEZ_PASSER = 195, + + /// + /// Enum LAWYER_IDENTITY_CERTIFICATE for value: 196 + /// + LAWYER_IDENTITY_CERTIFICATE = 196, + + /// + /// Enum LICENSE_CARD for value: 197 + /// + LICENSE_CARD = 197, + + /// + /// Enum PASSPORT_STATELESS for value: 198 + /// + PASSPORT_STATELESS = 198, + + /// + /// Enum PASSPORT_CHILD for value: 199 + /// + PASSPORT_CHILD = 199, + + /// + /// Enum PASSPORT_CONSULAR for value: 200 + /// + PASSPORT_CONSULAR = 200, + + /// + /// Enum PASSPORT_DIPLOMATIC_SERVICE for value: 201 + /// + PASSPORT_DIPLOMATIC_SERVICE = 201, + + /// + /// Enum PASSPORT_OFFICIAL for value: 202 + /// + PASSPORT_OFFICIAL = 202, + + /// + /// Enum PASSPORT_PROVISIONAL for value: 203 + /// + PASSPORT_PROVISIONAL = 203, + + /// + /// Enum PASSPORT_SPECIAL for value: 204 + /// + PASSPORT_SPECIAL = 204, + + /// + /// Enum PERMISSION_TO_THE_LOCAL_BORDER_TRAFFIC for value: 205 + /// + PERMISSION_TO_THE_LOCAL_BORDER_TRAFFIC = 205, + + /// + /// Enum REGISTRATION_CERTIFICATE for value: 206 + /// + REGISTRATION_CERTIFICATE = 206, + + /// + /// Enum SEDESOL_CARD for value: 207 + /// + SEDESOL_CARD = 207, + + /// + /// Enum SOCIAL_CARD for value: 208 + /// + SOCIAL_CARD = 208, + + /// + /// Enum TB_CARD for value: 209 + /// + TB_CARD = 209, + + /// + /// Enum VEHICLE_PASSPORT for value: 210 + /// + VEHICLE_PASSPORT = 210, + + /// + /// Enum W_DOCUMENT for value: 211 + /// + W_DOCUMENT = 211, + + /// + /// Enum DIPLOMATIC_IDENTITY_CARD for value: 212 + /// + DIPLOMATIC_IDENTITY_CARD = 212, + + /// + /// Enum CONSULAR_IDENTITY_CARD for value: 213 + /// + CONSULAR_IDENTITY_CARD = 213, + + /// + /// Enum INCOME_TAX_CARD for value: 214 + /// + INCOME_TAX_CARD = 214, + + /// + /// Enum RESIDENCE_PERMIT for value: 215 + /// + RESIDENCE_PERMIT = 215, + + /// + /// Enum DOCUMENT_OF_IDENTITY for value: 216 + /// + DOCUMENT_OF_IDENTITY = 216, + + /// + /// Enum BORDER_CROSSING_PERMIT for value: 217 + /// + BORDER_CROSSING_PERMIT = 217, + + /// + /// Enum PASSPORT_LIMITED_VALIDITY for value: 218 + /// + PASSPORT_LIMITED_VALIDITY = 218, + + /// + /// Enum SIM_CARD for value: 219 + /// + SIM_CARD = 219, + + /// + /// Enum TAX_CARD for value: 220 + /// + TAX_CARD = 220, + + /// + /// Enum COMPANY_CARD for value: 221 + /// + COMPANY_CARD = 221, + + /// + /// Enum DOMESTIC_PASSPORT for value: 222 + /// + DOMESTIC_PASSPORT = 222, + + /// + /// Enum IDENTITY_CERTIFICATE for value: 223 + /// + IDENTITY_CERTIFICATE = 223, + + /// + /// Enum RESIDENT_ID_CARD for value: 224 + /// + RESIDENT_ID_CARD = 224, + + /// + /// Enum ARMED_FORCES_IDENTITY_CARD for value: 225 + /// + ARMED_FORCES_IDENTITY_CARD = 225, + + /// + /// Enum PROFESSIONAL_CARD for value: 226 + /// + PROFESSIONAL_CARD = 226, + + /// + /// Enum REGISTRATION_STAMP for value: 227 + /// + REGISTRATION_STAMP = 227, + + /// + /// Enum DRIVER_CARD for value: 228 + /// + DRIVER_CARD = 228, + + /// + /// Enum DRIVER_TRAINING_CERTIFICATE for value: 229 + /// + DRIVER_TRAINING_CERTIFICATE = 229, + + /// + /// Enum QUALIFICATION_DRIVING_LICENSE for value: 230 + /// + QUALIFICATION_DRIVING_LICENSE = 230, + + /// + /// Enum MEMBERSHIP_CARD for value: 231 + /// + MEMBERSHIP_CARD = 231, + + /// + /// Enum PUBLIC_VEHICLE_DRIVER_AUTHORITY_CARD for value: 232 + /// + PUBLIC_VEHICLE_DRIVER_AUTHORITY_CARD = 232, + + /// + /// Enum MARINE_LICENSE for value: 233 + /// + MARINE_LICENSE = 233, + + /// + /// Enum TEMPORARY_LEARNER_LICENSE for value: 234 + /// + TEMPORARY_LEARNER_LICENSE = 234, + + /// + /// Enum TEMPORARY_COMMERCIAL_DRIVING_LICENSE for value: 235 + /// + TEMPORARY_COMMERCIAL_DRIVING_LICENSE = 235, + + /// + /// Enum INTERIM_INSTRUCTIONAL_PERMIT for value: 236 + /// + INTERIM_INSTRUCTIONAL_PERMIT = 236, + + /// + /// Enum CERTIFICATE_OF_COMPETENCY for value: 237 + /// + CERTIFICATE_OF_COMPETENCY = 237, + + /// + /// Enum CERTIFICATE_OF_PROFICIENCY for value: 238 + /// + CERTIFICATE_OF_PROFICIENCY = 238, + + /// + /// Enum TRADE_LICENSE for value: 239 + /// + TRADE_LICENSE = 239, + + /// + /// Enum PASSPORT_PAGE for value: 240 + /// + PASSPORT_PAGE = 240, + + /// + /// Enum INVOICE for value: 241 + /// + INVOICE = 241, + + /// + /// Enum PASSENGER_LOCATOR_FORM for value: 242 + /// + PASSENGER_LOCATOR_FORM = 242 + } + + /// + /// Converts to and from the JSON value + /// + public static class DocumentTypeValueConverter { + /// + /// Parses a given value to + /// + /// + /// + public static DocumentType FromString(string value) + { + if (value.Equals((0).ToString())) + return DocumentType.NOT_DEFINED; + + if (value.Equals((11).ToString())) + return DocumentType.PASSPORT; + + if (value.Equals((12).ToString())) + return DocumentType.IDENTITY_CARD; + + if (value.Equals((13).ToString())) + return DocumentType.DIPLOMATIC_PASSPORT; + + if (value.Equals((14).ToString())) + return DocumentType.SERVICE_PASSPORT; + + if (value.Equals((15).ToString())) + return DocumentType.SEAMANS_IDENTITY_DOCUMENT; + + if (value.Equals((16).ToString())) + return DocumentType.IDENTITY_CARD_FOR_RESIDENCE; + + if (value.Equals((17).ToString())) + return DocumentType.TRAVEL_DOCUMENT; + + if (value.Equals((20).ToString())) + return DocumentType.NATIONAL_IDENTITY_CARD; + + if (value.Equals((21).ToString())) + return DocumentType.SOCIAL_IDENTITY_CARD; + + if (value.Equals((22).ToString())) + return DocumentType.ALIENS_IDENTITY_CARD; + + if (value.Equals((23).ToString())) + return DocumentType.PRIVILEGED_IDENTITY_CARD; + + if (value.Equals((24).ToString())) + return DocumentType.RESIDENCE_PERMIT_IDENTITY_CARD; + + if (value.Equals((25).ToString())) + return DocumentType.ORIGIN_CARD; + + if (value.Equals((26).ToString())) + return DocumentType.EMERGENCY_PASSPORT; + + if (value.Equals((27).ToString())) + return DocumentType.ALIENS_PASSPORT; + + if (value.Equals((28).ToString())) + return DocumentType.ALTERNATIVE_IDENTITY_CARD; + + if (value.Equals((29).ToString())) + return DocumentType.VISA_ID2; + + if (value.Equals((30).ToString())) + return DocumentType.VISA_ID3; + + if (value.Equals((32).ToString())) + return DocumentType.AUTHORIZATION_CARD; + + if (value.Equals((33).ToString())) + return DocumentType.BEGINNER_PERMIT; + + if (value.Equals((34).ToString())) + return DocumentType.BORDER_CROSSING_CARD; + + if (value.Equals((35).ToString())) + return DocumentType.CHAUFFEUR_LICENSE; + + if (value.Equals((36).ToString())) + return DocumentType.CHAUFFEUR_LICENSE_UNDER_18; + + if (value.Equals((37).ToString())) + return DocumentType.CHAUFFEUR_LICENSE_UNDER_21; + + if (value.Equals((38).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE; + + if (value.Equals((39).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_INSTRUCTIONAL_PERMIT; + + if (value.Equals((40).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_UNDER_18; + + if (value.Equals((41).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_UNDER_21; + + if (value.Equals((42).ToString())) + return DocumentType.COMMERCIAL_INSTRUCTION_PERMIT; + + if (value.Equals((43).ToString())) + return DocumentType.COMMERCIAL_NEW_PERMIT; + + if (value.Equals((44).ToString())) + return DocumentType.CONCEALED_CARRY_LICENSE; + + if (value.Equals((45).ToString())) + return DocumentType.CONCEALED_FIREARM_PERMIT; + + if (value.Equals((46).ToString())) + return DocumentType.CONDITIONAL_DRIVING_LICENSE; + + if (value.Equals((47).ToString())) + return DocumentType.DEPARTMENT_OF_VETERANS_AFFAIRS_IDENTITY_CARD; + + if (value.Equals((48).ToString())) + return DocumentType.DIPLOMATIC_DRIVING_LICENSE; + + if (value.Equals((49).ToString())) + return DocumentType.DRIVING_LICENSE; + + if (value.Equals((50).ToString())) + return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT; + + if (value.Equals((51).ToString())) + return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_18; + + if (value.Equals((52).ToString())) + return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_21; + + if (value.Equals((53).ToString())) + return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT; + + if (value.Equals((54).ToString())) + return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_18; + + if (value.Equals((55).ToString())) + return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_21; + + if (value.Equals((56).ToString())) + return DocumentType.DRIVING_LICENSE_NOVICE; + + if (value.Equals((57).ToString())) + return DocumentType.DRIVING_LICENSE_NOVICE_UNDER_18; + + if (value.Equals((58).ToString())) + return DocumentType.DRIVING_LICENSE_NOVICE_UNDER_21; + + if (value.Equals((59).ToString())) + return DocumentType.DRIVING_LICENSE_REGISTERED_OFFENDER; + + if (value.Equals((60).ToString())) + return DocumentType.DRIVING_LICENSE_RESTRICTED_UNDER_18; + + if (value.Equals((61).ToString())) + return DocumentType.DRIVING_LICENSE_RESTRICTED_UNDER_21; + + if (value.Equals((62).ToString())) + return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR; + + if (value.Equals((63).ToString())) + return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_18; + + if (value.Equals((64).ToString())) + return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_21; + + if (value.Equals((65).ToString())) + return DocumentType.DRIVING_LICENSE_UNDER_18; + + if (value.Equals((66).ToString())) + return DocumentType.DRIVING_LICENSE_UNDER_21; + + if (value.Equals((67).ToString())) + return DocumentType.EMPLOYMENT_DRIVING_PERMIT; + + if (value.Equals((68).ToString())) + return DocumentType.ENHANCED_CHAUFFEUR_LICENSE; + + if (value.Equals((69).ToString())) + return DocumentType.ENHANCED_CHAUFFEUR_LICENSE_UNDER_18; + + if (value.Equals((70).ToString())) + return DocumentType.ENHANCED_CHAUFFEUR_LICENSE_UNDER_21; + + if (value.Equals((71).ToString())) + return DocumentType.ENHANCED_COMMERCIAL_DRIVING_LICENSE; + + if (value.Equals((72).ToString())) + return DocumentType.ENHANCED_DRIVING_LICENSE; + + if (value.Equals((73).ToString())) + return DocumentType.ENHANCED_DRIVING_LICENSE_UNDER_18; + + if (value.Equals((74).ToString())) + return DocumentType.ENHANCED_DRIVING_LICENSE_UNDER_21; + + if (value.Equals((75).ToString())) + return DocumentType.ENHANCED_IDENTITY_CARD; + + if (value.Equals((76).ToString())) + return DocumentType.ENHANCED_IDENTITY_CARD_UNDER_18; + + if (value.Equals((77).ToString())) + return DocumentType.ENHANCED_IDENTITY_CARD_UNDER_21; + + if (value.Equals((78).ToString())) + return DocumentType.ENHANCED_OPERATORS_LICENSE; + + if (value.Equals((79).ToString())) + return DocumentType.FIREARMS_PERMIT; + + if (value.Equals((80).ToString())) + return DocumentType.FULL_PROVISIONAL_LICENSE; + + if (value.Equals((81).ToString())) + return DocumentType.FULL_PROVISIONAL_LICENSE_UNDER_18; + + if (value.Equals((82).ToString())) + return DocumentType.FULL_PROVISIONAL_LICENSE_UNDER_21; + + if (value.Equals((83).ToString())) + return DocumentType.GENEVA_CONVENTIONS_IDENTITY_CARD; + + if (value.Equals((84).ToString())) + return DocumentType.GRADUATED_DRIVING_LICENSE_UNDER_18; + + if (value.Equals((85).ToString())) + return DocumentType.GRADUATED_DRIVING_LICENSE_UNDER_21; + + if (value.Equals((86).ToString())) + return DocumentType.GRADUATED_INSTRUCTION_PERMIT_UNDER_18; + + if (value.Equals((87).ToString())) + return DocumentType.GRADUATED_INSTRUCTION_PERMIT_UNDER_21; + + if (value.Equals((88).ToString())) + return DocumentType.GRADUATED_LICENSE_UNDER_18; + + if (value.Equals((89).ToString())) + return DocumentType.GRADUATED_LICENSE_UNDER_21; + + if (value.Equals((90).ToString())) + return DocumentType.HANDGUN_CARRY_PERMIT; + + if (value.Equals((91).ToString())) + return DocumentType.IDENTITY_AND_PRIVILEGE_CARD; + + if (value.Equals((92).ToString())) + return DocumentType.IDENTITY_CARD_MOBILITY_IMPAIRED; + + if (value.Equals((93).ToString())) + return DocumentType.IDENTITY_CARD_REGISTERED_OFFENDER; + + if (value.Equals((94).ToString())) + return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR; + + if (value.Equals((95).ToString())) + return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_18; + + if (value.Equals((96).ToString())) + return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_21; + + if (value.Equals((97).ToString())) + return DocumentType.IDENTITY_CARD_UNDER_18; + + if (value.Equals((98).ToString())) + return DocumentType.IDENTITY_CARD_UNDER_21; + + if (value.Equals((99).ToString())) + return DocumentType.OTHER; + + if (value.Equals((100).ToString())) + return DocumentType.IGNITION_INTERLOCK_PERMIT; + + if (value.Equals((101).ToString())) + return DocumentType.IMMIGRANT_VISA; + + if (value.Equals((102).ToString())) + return DocumentType.INSTRUCTION_PERMIT; + + if (value.Equals((103).ToString())) + return DocumentType.INSTRUCTION_PERMIT_UNDER_18; + + if (value.Equals((104).ToString())) + return DocumentType.INSTRUCTION_PERMIT_UNDER_21; + + if (value.Equals((105).ToString())) + return DocumentType.INTERIM_DRIVING_LICENSE; + + if (value.Equals((106).ToString())) + return DocumentType.INTERIM_IDENTITY_CARD; + + if (value.Equals((107).ToString())) + return DocumentType.INTERMEDIATE_DRIVING_LICENSE; + + if (value.Equals((108).ToString())) + return DocumentType.INTERMEDIATE_DRIVING_LICENSE_UNDER_18; + + if (value.Equals((109).ToString())) + return DocumentType.INTERMEDIATE_DRIVING_LICENSE_UNDER_21; + + if (value.Equals((110).ToString())) + return DocumentType.JUNIOR_DRIVING_LICENSE; + + if (value.Equals((111).ToString())) + return DocumentType.LEARNER_INSTRUCTIONAL_PERMIT; + + if (value.Equals((112).ToString())) + return DocumentType.LEARNER_LICENSE; + + if (value.Equals((113).ToString())) + return DocumentType.LEARNER_LICENSE_UNDER_18; + + if (value.Equals((114).ToString())) + return DocumentType.LEARNER_LICENSE_UNDER_21; + + if (value.Equals((115).ToString())) + return DocumentType.LEARNER_PERMIT; + + if (value.Equals((116).ToString())) + return DocumentType.LEARNER_PERMIT_UNDER_18; + + if (value.Equals((117).ToString())) + return DocumentType.LEARNER_PERMIT_UNDER_21; + + if (value.Equals((118).ToString())) + return DocumentType.LIMITED_LICENSE; + + if (value.Equals((119).ToString())) + return DocumentType.LIMITED_PERMIT; + + if (value.Equals((120).ToString())) + return DocumentType.LIMITED_TERM_DRIVING_LICENSE; + + if (value.Equals((121).ToString())) + return DocumentType.LIMITED_TERM_IDENTITY_CARD; + + if (value.Equals((122).ToString())) + return DocumentType.LIQUOR_IDENTITY_CARD; + + if (value.Equals((123).ToString())) + return DocumentType.NEW_PERMIT; + + if (value.Equals((124).ToString())) + return DocumentType.NEW_PERMIT_UNDER_18; + + if (value.Equals((125).ToString())) + return DocumentType.NEW_PERMIT_UNDER_21; + + if (value.Equals((126).ToString())) + return DocumentType.NON_US_CITIZEN_DRIVING_LICENSE; + + if (value.Equals((127).ToString())) + return DocumentType.OCCUPATIONAL_DRIVING_LICENSE; + + if (value.Equals((128).ToString())) + return DocumentType.ONEIDA_TRIBE_OF_INDIANS_IDENTITY_CARD; - - public const int NOT_DEFINED = 0; + if (value.Equals((129).ToString())) + return DocumentType.OPERATOR_LICENSE; - - public const int PASSPORT = 11; + if (value.Equals((130).ToString())) + return DocumentType.OPERATOR_LICENSE_UNDER_18; - - public const int IDENTITY_CARD = 12; + if (value.Equals((131).ToString())) + return DocumentType.OPERATOR_LICENSE_UNDER_21; - - public const int DIPLOMATIC_PASSPORT = 13; + if (value.Equals((132).ToString())) + return DocumentType.PERMANENT_DRIVING_LICENSE; - - public const int SERVICE_PASSPORT = 14; + if (value.Equals((133).ToString())) + return DocumentType.PERMIT_TO_REENTER; - - public const int SEAMANS_IDENTITY_DOCUMENT = 15; + if (value.Equals((134).ToString())) + return DocumentType.PROBATIONARY_AUTO_LICENSE; - - public const int IDENTITY_CARD_FOR_RESIDENCE = 16; + if (value.Equals((135).ToString())) + return DocumentType.PROBATIONARY_DRIVING_LICENSE_UNDER_18; - - public const int TRAVEL_DOCUMENT = 17; + if (value.Equals((136).ToString())) + return DocumentType.PROBATIONARY_DRIVING_LICENSE_UNDER_21; - - public const int OTHER = 99; + if (value.Equals((137).ToString())) + return DocumentType.PROBATIONARY_VEHICLE_SALES_PERSON_LICENSE; - - public const int VISA_ID2 = 29; + if (value.Equals((138).ToString())) + return DocumentType.PROVISIONAL_DRIVING_LICENSE; - - public const int VISA_ID3 = 30; + if (value.Equals((139).ToString())) + return DocumentType.PROVISIONAL_DRIVING_LICENSE_UNDER_18; - - public const int NATIONAL_IDENTITY_CARD = 20; + if (value.Equals((140).ToString())) + return DocumentType.PROVISIONAL_DRIVING_LICENSE_UNDER_21; - - public const int SOCIAL_IDENTITY_CARD = 21; + if (value.Equals((141).ToString())) + return DocumentType.PROVISIONAL_LICENSE; - - public const int ALIENS_IDENTITY_CARD = 22; + if (value.Equals((142).ToString())) + return DocumentType.PROVISIONAL_LICENSE_UNDER_18; - - public const int PRIVILEGED_IDENTITY_CARD = 23; + if (value.Equals((143).ToString())) + return DocumentType.PROVISIONAL_LICENSE_UNDER_21; - - public const int RESIDENCE_PERMIT_IDENTITY_CARD = 24; + if (value.Equals((144).ToString())) + return DocumentType.PUBLIC_PASSENGER_CHAUFFEUR_LICENSE; - - public const int ORIGIN_CARD = 25; + if (value.Equals((145).ToString())) + return DocumentType.RACING_AND_GAMING_COMISSION_CARD; - - public const int EMERGENCY_PASSPORT = 26; + if (value.Equals((146).ToString())) + return DocumentType.REFUGEE_TRAVEL_DOCUMENT; - - public const int ALIENS_PASSPORT = 27; + if (value.Equals((147).ToString())) + return DocumentType.RENEWAL_PERMIT; - - public const int ALTERNATIVE_IDENTITY_CARD = 28; + if (value.Equals((148).ToString())) + return DocumentType.RESTRICTED_COMMERCIAL_DRIVER_LICENSE; - - public const int AUTHORIZATION_CARD = 32; + if (value.Equals((149).ToString())) + return DocumentType.RESTRICTED_DRIVER_LICENSE; - - public const int BEGINNER_PERMIT = 33; + if (value.Equals((150).ToString())) + return DocumentType.RESTRICTED_PERMIT; - - public const int BORDER_CROSSING_CARD = 34; + if (value.Equals((151).ToString())) + return DocumentType.SEASONAL_PERMIT; - - public const int CHAUFFEUR_LICENSE = 35; + if (value.Equals((152).ToString())) + return DocumentType.SEASONAL_RESIDENT_IDENTITY_CARD; - - public const int CHAUFFEUR_LICENSE_UNDER_18 = 36; + if (value.Equals((153).ToString())) + return DocumentType.SEASONAL_CITIZEN_IDENTITY_CARD; - - public const int CHAUFFEUR_LICENSE_UNDER_21 = 37; + if (value.Equals((154).ToString())) + return DocumentType.SEX_OFFENDER; - - public const int COMMERCIAL_DRIVING_LICENSE = 38; + if (value.Equals((155).ToString())) + return DocumentType.SOCIAL_SECURITY_CARD; - - public const int COMMERCIAL_DRIVING_LICENSE_INSTRUCTIONAL_PERMIT = 39; + if (value.Equals((156).ToString())) + return DocumentType.TEMPORARY_DRIVING_LICENSE; - - public const int COMMERCIAL_DRIVING_LICENSE_UNDER_18 = 40; + if (value.Equals((157).ToString())) + return DocumentType.TEMPORARY_DRIVING_LICENSE_UNDER_18; - - public const int COMMERCIAL_DRIVING_LICENSE_UNDER_21 = 41; + if (value.Equals((158).ToString())) + return DocumentType.TEMPORARY_DRIVING_LICENSE_UNDER_21; - - public const int COMMERCIAL_INSTRUCTION_PERMIT = 42; + if (value.Equals((159).ToString())) + return DocumentType.TEMPORARY_IDENTITY_CARD; - - public const int COMMERCIAL_NEW_PERMIT = 43; + if (value.Equals((160).ToString())) + return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD; - - public const int CONCEALED_CARRY_LICENSE = 44; + if (value.Equals((161).ToString())) + return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_18; - - public const int CONCEALED_FIREARM_PERMIT = 45; + if (value.Equals((162).ToString())) + return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_21; - - public const int CONDITIONAL_DRIVING_LICENSE = 46; + if (value.Equals((163).ToString())) + return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE; - - public const int DEPARTMENT_OF_VETERANS_AFFAIRS_IDENTITY_CARD = 47; + if (value.Equals((164).ToString())) + return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_18; - - public const int DIPLOMATIC_DRIVING_LICENSE = 48; + if (value.Equals((165).ToString())) + return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_21; - - public const int DRIVING_LICENSE = 49; + if (value.Equals((166).ToString())) + return DocumentType.UNIFORMED_SERVICES_IDENTITY_CARD; - - public const int DRIVING_LICENSE_INSTRUCTIONAL_PERMIT = 50; + if (value.Equals((167).ToString())) + return DocumentType.VEHICLE_SALES_PERSON_LICENSE; - - public const int DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_18 = 51; + if (value.Equals((168).ToString())) + return DocumentType.WORKER_IDENTIFICATION_CREDENTIAL; - - public const int DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_21 = 52; + if (value.Equals((169).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE; - - public const int DRIVING_LICENSE_LEARNERS_PERMIT = 53; + if (value.Equals((170).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_18; - - public const int DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_18 = 54; + if (value.Equals((171).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_21; - - public const int DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_21 = 55; + if (value.Equals((172).ToString())) + return DocumentType.PASSPORT_CARD; - - public const int DRIVING_LICENSE_NOVICE = 56; + if (value.Equals((173).ToString())) + return DocumentType.PASSPORT_RESIDENT_CARD; - - public const int DRIVING_LICENSE_NOVICE_UNDER_18 = 57; + if (value.Equals((174).ToString())) + return DocumentType.PERSONAL_IDENTIFICATION_VERIFICATION; - - public const int DRIVING_LICENSE_NOVICE_UNDER_21 = 58; + if (value.Equals((175).ToString())) + return DocumentType.TEMPORARY_OPERATOR_LICENSE; - - public const int DRIVING_LICENSE_REGISTERED_OFFENDER = 59; + if (value.Equals((176).ToString())) + return DocumentType.DRIVING_LICENSE_UNDER_19; - - public const int DRIVING_LICENSE_RESTRICTED_UNDER_18 = 60; + if (value.Equals((177).ToString())) + return DocumentType.IDENTITY_CARD_UNDER_19; - - public const int DRIVING_LICENSE_RESTRICTED_UNDER_21 = 61; + if (value.Equals((178).ToString())) + return DocumentType.VISA; - - public const int DRIVING_LICENSE_TEMPORARY_VISITOR = 62; + if (value.Equals((179).ToString())) + return DocumentType.TEMPORARY_PASSPORT; - - public const int DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_18 = 63; + if (value.Equals((180).ToString())) + return DocumentType.VOTING_CARD; - - public const int DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_21 = 64; + if (value.Equals((181).ToString())) + return DocumentType.HEALTH_CARD; - - public const int DRIVING_LICENSE_UNDER_18 = 65; + if (value.Equals((182).ToString())) + return DocumentType.CERTIFICATE_OF_CITIZENSHIP; - - public const int DRIVING_LICENSE_UNDER_21 = 66; + if (value.Equals((183).ToString())) + return DocumentType.ADDRESS_CARD; - - public const int EMPLOYMENT_DRIVING_PERMIT = 67; + if (value.Equals((184).ToString())) + return DocumentType.AIRPORT_IMMIGRATION_CARD; - - public const int ENHANCED_CHAUFFEUR_LICENSE = 68; + if (value.Equals((185).ToString())) + return DocumentType.ALIEN_REGISTRATION_CARD; - - public const int ENHANCED_CHAUFFEUR_LICENSE_UNDER_18 = 69; + if (value.Equals((186).ToString())) + return DocumentType.APEH_CARD; - - public const int ENHANCED_CHAUFFEUR_LICENSE_UNDER_21 = 70; + if (value.Equals((187).ToString())) + return DocumentType.COUPON_TO_DRIVING_LICENSE; - - public const int ENHANCED_COMMERCIAL_DRIVING_LICENSE = 71; + if (value.Equals((188).ToString())) + return DocumentType.CREW_MEMBER_CERTIFICATE; - - public const int ENHANCED_DRIVING_LICENSE = 72; + if (value.Equals((189).ToString())) + return DocumentType.DOCUMENT_FOR_RETURN; - - public const int ENHANCED_DRIVING_LICENSE_UNDER_18 = 73; + if (value.Equals((190).ToString())) + return DocumentType.E_CARD; - - public const int ENHANCED_DRIVING_LICENSE_UNDER_21 = 74; + if (value.Equals((191).ToString())) + return DocumentType.EMPLOYMENT_CARD; - - public const int ENHANCED_IDENTITY_CARD = 75; + if (value.Equals((192).ToString())) + return DocumentType.HKSAR_IMMIGRATION_FORM; - - public const int ENHANCED_IDENTITY_CARD_UNDER_18 = 76; + if (value.Equals((193).ToString())) + return DocumentType.IMMIGRANT_CARD; - - public const int ENHANCED_IDENTITY_CARD_UNDER_21 = 77; + if (value.Equals((194).ToString())) + return DocumentType.LABOUR_CARD; - - public const int ENHANCED_OPERATORS_LICENSE = 78; + if (value.Equals((195).ToString())) + return DocumentType.LAISSEZ_PASSER; - - public const int FIREARMS_PERMIT = 79; + if (value.Equals((196).ToString())) + return DocumentType.LAWYER_IDENTITY_CERTIFICATE; - - public const int FULL_PROVISIONAL_LICENSE = 80; + if (value.Equals((197).ToString())) + return DocumentType.LICENSE_CARD; - - public const int FULL_PROVISIONAL_LICENSE_UNDER_18 = 81; + if (value.Equals((198).ToString())) + return DocumentType.PASSPORT_STATELESS; - - public const int FULL_PROVISIONAL_LICENSE_UNDER_21 = 82; + if (value.Equals((199).ToString())) + return DocumentType.PASSPORT_CHILD; - - public const int GENEVA_CONVENTIONS_IDENTITY_CARD = 83; + if (value.Equals((200).ToString())) + return DocumentType.PASSPORT_CONSULAR; - - public const int GRADUATED_DRIVING_LICENSE_UNDER_18 = 84; + if (value.Equals((201).ToString())) + return DocumentType.PASSPORT_DIPLOMATIC_SERVICE; - - public const int GRADUATED_DRIVING_LICENSE_UNDER_21 = 85; + if (value.Equals((202).ToString())) + return DocumentType.PASSPORT_OFFICIAL; - - public const int GRADUATED_INSTRUCTION_PERMIT_UNDER_18 = 86; + if (value.Equals((203).ToString())) + return DocumentType.PASSPORT_PROVISIONAL; - - public const int GRADUATED_INSTRUCTION_PERMIT_UNDER_21 = 87; + if (value.Equals((204).ToString())) + return DocumentType.PASSPORT_SPECIAL; - - public const int GRADUATED_LICENSE_UNDER_18 = 88; + if (value.Equals((205).ToString())) + return DocumentType.PERMISSION_TO_THE_LOCAL_BORDER_TRAFFIC; - - public const int GRADUATED_LICENSE_UNDER_21 = 89; + if (value.Equals((206).ToString())) + return DocumentType.REGISTRATION_CERTIFICATE; - - public const int HANDGUN_CARRY_PERMIT = 90; + if (value.Equals((207).ToString())) + return DocumentType.SEDESOL_CARD; - - public const int IDENTITY_AND_PRIVILEGE_CARD = 91; + if (value.Equals((208).ToString())) + return DocumentType.SOCIAL_CARD; - - public const int IDENTITY_CARD_MOBILITY_IMPAIRED = 92; + if (value.Equals((209).ToString())) + return DocumentType.TB_CARD; - - public const int IDENTITY_CARD_REGISTERED_OFFENDER = 93; + if (value.Equals((210).ToString())) + return DocumentType.VEHICLE_PASSPORT; - - public const int IDENTITY_CARD_TEMPORARY_VISITOR = 94; + if (value.Equals((211).ToString())) + return DocumentType.W_DOCUMENT; - - public const int IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_18 = 95; + if (value.Equals((212).ToString())) + return DocumentType.DIPLOMATIC_IDENTITY_CARD; - - public const int IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_21 = 96; + if (value.Equals((213).ToString())) + return DocumentType.CONSULAR_IDENTITY_CARD; - - public const int IDENTITY_CARD_UNDER_18 = 97; + if (value.Equals((214).ToString())) + return DocumentType.INCOME_TAX_CARD; - - public const int IDENTITY_CARD_UNDER_21 = 98; + if (value.Equals((215).ToString())) + return DocumentType.RESIDENCE_PERMIT; - - public const int IGNITION_INTERLOCK_PERMIT = 100; + if (value.Equals((216).ToString())) + return DocumentType.DOCUMENT_OF_IDENTITY; - - public const int IMMIGRANT_VISA = 101; + if (value.Equals((217).ToString())) + return DocumentType.BORDER_CROSSING_PERMIT; - - public const int INSTRUCTION_PERMIT = 102; + if (value.Equals((218).ToString())) + return DocumentType.PASSPORT_LIMITED_VALIDITY; - - public const int INSTRUCTION_PERMIT_UNDER_18 = 103; + if (value.Equals((219).ToString())) + return DocumentType.SIM_CARD; - - public const int INSTRUCTION_PERMIT_UNDER_21 = 104; + if (value.Equals((220).ToString())) + return DocumentType.TAX_CARD; - - public const int INTERIM_DRIVING_LICENSE = 105; + if (value.Equals((221).ToString())) + return DocumentType.COMPANY_CARD; - - public const int INTERIM_IDENTITY_CARD = 106; + if (value.Equals((222).ToString())) + return DocumentType.DOMESTIC_PASSPORT; - - public const int INTERMEDIATE_DRIVING_LICENSE = 107; + if (value.Equals((223).ToString())) + return DocumentType.IDENTITY_CERTIFICATE; - - public const int INTERMEDIATE_DRIVING_LICENSE_UNDER_18 = 108; + if (value.Equals((224).ToString())) + return DocumentType.RESIDENT_ID_CARD; - - public const int INTERMEDIATE_DRIVING_LICENSE_UNDER_21 = 109; + if (value.Equals((225).ToString())) + return DocumentType.ARMED_FORCES_IDENTITY_CARD; - - public const int JUNIOR_DRIVING_LICENSE = 110; + if (value.Equals((226).ToString())) + return DocumentType.PROFESSIONAL_CARD; - - public const int LEARNER_INSTRUCTIONAL_PERMIT = 111; + if (value.Equals((227).ToString())) + return DocumentType.REGISTRATION_STAMP; - - public const int LEARNER_LICENSE = 112; + if (value.Equals((228).ToString())) + return DocumentType.DRIVER_CARD; - - public const int LEARNER_LICENSE_UNDER_18 = 113; + if (value.Equals((229).ToString())) + return DocumentType.DRIVER_TRAINING_CERTIFICATE; - - public const int LEARNER_LICENSE_UNDER_21 = 114; + if (value.Equals((230).ToString())) + return DocumentType.QUALIFICATION_DRIVING_LICENSE; - - public const int LEARNER_PERMIT = 115; + if (value.Equals((231).ToString())) + return DocumentType.MEMBERSHIP_CARD; - - public const int LEARNER_PERMIT_UNDER_18 = 116; + if (value.Equals((232).ToString())) + return DocumentType.PUBLIC_VEHICLE_DRIVER_AUTHORITY_CARD; - - public const int LEARNER_PERMIT_UNDER_21 = 117; + if (value.Equals((233).ToString())) + return DocumentType.MARINE_LICENSE; - - public const int LIMITED_LICENSE = 118; + if (value.Equals((234).ToString())) + return DocumentType.TEMPORARY_LEARNER_LICENSE; - - public const int LIMITED_PERMIT = 119; + if (value.Equals((235).ToString())) + return DocumentType.TEMPORARY_COMMERCIAL_DRIVING_LICENSE; - - public const int LIMITED_TERM_DRIVING_LICENSE = 120; + if (value.Equals((236).ToString())) + return DocumentType.INTERIM_INSTRUCTIONAL_PERMIT; - - public const int LIMITED_TERM_IDENTITY_CARD = 121; + if (value.Equals((237).ToString())) + return DocumentType.CERTIFICATE_OF_COMPETENCY; - - public const int LIQUOR_IDENTITY_CARD = 122; + if (value.Equals((238).ToString())) + return DocumentType.CERTIFICATE_OF_PROFICIENCY; - - public const int NEW_PERMIT = 123; + if (value.Equals((239).ToString())) + return DocumentType.TRADE_LICENSE; - - public const int NEW_PERMIT_UNDER_18 = 124; + if (value.Equals((240).ToString())) + return DocumentType.PASSPORT_PAGE; - - public const int NEW_PERMIT_UNDER_21 = 125; + if (value.Equals((241).ToString())) + return DocumentType.INVOICE; - - public const int NON_US_CITIZEN_DRIVING_LICENSE = 126; + if (value.Equals((242).ToString())) + return DocumentType.PASSENGER_LOCATOR_FORM; - - public const int OCCUPATIONAL_DRIVING_LICENSE = 127; + throw new NotImplementedException($"Could not convert value to type DocumentType: '{value}'"); + } - - public const int ONEIDA_TRIBE_OF_INDIANS_IDENTITY_CARD = 128; + /// + /// Parses a given value to + /// + /// + /// + public static DocumentType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return DocumentType.NOT_DEFINED; - - public const int OPERATOR_LICENSE = 129; + if (value.Equals((11).ToString())) + return DocumentType.PASSPORT; - - public const int OPERATOR_LICENSE_UNDER_18 = 130; + if (value.Equals((12).ToString())) + return DocumentType.IDENTITY_CARD; - - public const int OPERATOR_LICENSE_UNDER_21 = 131; + if (value.Equals((13).ToString())) + return DocumentType.DIPLOMATIC_PASSPORT; - - public const int PERMANENT_DRIVING_LICENSE = 132; + if (value.Equals((14).ToString())) + return DocumentType.SERVICE_PASSPORT; - - public const int PERMIT_TO_REENTER = 133; + if (value.Equals((15).ToString())) + return DocumentType.SEAMANS_IDENTITY_DOCUMENT; - - public const int PROBATIONARY_AUTO_LICENSE = 134; + if (value.Equals((16).ToString())) + return DocumentType.IDENTITY_CARD_FOR_RESIDENCE; - - public const int PROBATIONARY_DRIVING_LICENSE_UNDER_18 = 135; + if (value.Equals((17).ToString())) + return DocumentType.TRAVEL_DOCUMENT; - - public const int PROBATIONARY_DRIVING_LICENSE_UNDER_21 = 136; + if (value.Equals((20).ToString())) + return DocumentType.NATIONAL_IDENTITY_CARD; - - public const int PROBATIONARY_VEHICLE_SALES_PERSON_LICENSE = 137; + if (value.Equals((21).ToString())) + return DocumentType.SOCIAL_IDENTITY_CARD; - - public const int PROVISIONAL_DRIVING_LICENSE = 138; + if (value.Equals((22).ToString())) + return DocumentType.ALIENS_IDENTITY_CARD; - - public const int PROVISIONAL_DRIVING_LICENSE_UNDER_18 = 139; + if (value.Equals((23).ToString())) + return DocumentType.PRIVILEGED_IDENTITY_CARD; - - public const int PROVISIONAL_DRIVING_LICENSE_UNDER_21 = 140; + if (value.Equals((24).ToString())) + return DocumentType.RESIDENCE_PERMIT_IDENTITY_CARD; - - public const int PROVISIONAL_LICENSE = 141; + if (value.Equals((25).ToString())) + return DocumentType.ORIGIN_CARD; - - public const int PROVISIONAL_LICENSE_UNDER_18 = 142; + if (value.Equals((26).ToString())) + return DocumentType.EMERGENCY_PASSPORT; - - public const int PROVISIONAL_LICENSE_UNDER_21 = 143; + if (value.Equals((27).ToString())) + return DocumentType.ALIENS_PASSPORT; - - public const int PUBLIC_PASSENGER_CHAUFFEUR_LICENSE = 144; + if (value.Equals((28).ToString())) + return DocumentType.ALTERNATIVE_IDENTITY_CARD; - - public const int RACING_AND_GAMING_COMISSION_CARD = 145; + if (value.Equals((29).ToString())) + return DocumentType.VISA_ID2; - - public const int REFUGEE_TRAVEL_DOCUMENT = 146; + if (value.Equals((30).ToString())) + return DocumentType.VISA_ID3; - - public const int RENEWAL_PERMIT = 147; + if (value.Equals((32).ToString())) + return DocumentType.AUTHORIZATION_CARD; - - public const int RESTRICTED_COMMERCIAL_DRIVER_LICENSE = 148; + if (value.Equals((33).ToString())) + return DocumentType.BEGINNER_PERMIT; - - public const int RESTRICTED_DRIVER_LICENSE = 149; + if (value.Equals((34).ToString())) + return DocumentType.BORDER_CROSSING_CARD; - - public const int RESTRICTED_PERMIT = 150; + if (value.Equals((35).ToString())) + return DocumentType.CHAUFFEUR_LICENSE; - - public const int SEASONAL_PERMIT = 151; + if (value.Equals((36).ToString())) + return DocumentType.CHAUFFEUR_LICENSE_UNDER_18; - - public const int SEASONAL_RESIDENT_IDENTITY_CARD = 152; + if (value.Equals((37).ToString())) + return DocumentType.CHAUFFEUR_LICENSE_UNDER_21; - - public const int SEASONAL_CITIZEN_IDENTITY_CARD = 153; + if (value.Equals((38).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE; - - public const int SEX_OFFENDER = 154; + if (value.Equals((39).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_INSTRUCTIONAL_PERMIT; - - public const int SOCIAL_SECURITY_CARD = 155; + if (value.Equals((40).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_UNDER_18; - - public const int TEMPORARY_DRIVING_LICENSE = 156; + if (value.Equals((41).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_UNDER_21; - - public const int TEMPORARY_DRIVING_LICENSE_UNDER_18 = 157; + if (value.Equals((42).ToString())) + return DocumentType.COMMERCIAL_INSTRUCTION_PERMIT; - - public const int TEMPORARY_DRIVING_LICENSE_UNDER_21 = 158; + if (value.Equals((43).ToString())) + return DocumentType.COMMERCIAL_NEW_PERMIT; - - public const int TEMPORARY_IDENTITY_CARD = 159; + if (value.Equals((44).ToString())) + return DocumentType.CONCEALED_CARRY_LICENSE; - - public const int TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD = 160; + if (value.Equals((45).ToString())) + return DocumentType.CONCEALED_FIREARM_PERMIT; - - public const int TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_18 = 161; + if (value.Equals((46).ToString())) + return DocumentType.CONDITIONAL_DRIVING_LICENSE; - - public const int TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_21 = 162; + if (value.Equals((47).ToString())) + return DocumentType.DEPARTMENT_OF_VETERANS_AFFAIRS_IDENTITY_CARD; - - public const int TEMPORARY_VISITOR_DRIVING_LICENSE = 163; + if (value.Equals((48).ToString())) + return DocumentType.DIPLOMATIC_DRIVING_LICENSE; - - public const int TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_18 = 164; + if (value.Equals((49).ToString())) + return DocumentType.DRIVING_LICENSE; - - public const int TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_21 = 165; + if (value.Equals((50).ToString())) + return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT; - - public const int UNIFORMED_SERVICES_IDENTITY_CARD = 166; + if (value.Equals((51).ToString())) + return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_18; - - public const int VEHICLE_SALES_PERSON_LICENSE = 167; + if (value.Equals((52).ToString())) + return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_21; - - public const int WORKER_IDENTIFICATION_CREDENTIAL = 168; + if (value.Equals((53).ToString())) + return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT; - - public const int COMMERCIAL_DRIVING_LICENSE_NOVICE = 169; + if (value.Equals((54).ToString())) + return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_18; - - public const int COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_18 = 170; + if (value.Equals((55).ToString())) + return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_21; - - public const int COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_21 = 171; + if (value.Equals((56).ToString())) + return DocumentType.DRIVING_LICENSE_NOVICE; - - public const int PASSPORT_CARD = 172; + if (value.Equals((57).ToString())) + return DocumentType.DRIVING_LICENSE_NOVICE_UNDER_18; - - public const int PASSPORT_RESIDENT_CARD = 173; + if (value.Equals((58).ToString())) + return DocumentType.DRIVING_LICENSE_NOVICE_UNDER_21; - - public const int PERSONAL_IDENTIFICATION_VERIFICATION = 174; + if (value.Equals((59).ToString())) + return DocumentType.DRIVING_LICENSE_REGISTERED_OFFENDER; - - public const int TEMPORARY_OPERATOR_LICENSE = 175; + if (value.Equals((60).ToString())) + return DocumentType.DRIVING_LICENSE_RESTRICTED_UNDER_18; - - public const int DRIVING_LICENSE_UNDER_19 = 176; + if (value.Equals((61).ToString())) + return DocumentType.DRIVING_LICENSE_RESTRICTED_UNDER_21; - - public const int IDENTITY_CARD_UNDER_19 = 177; + if (value.Equals((62).ToString())) + return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR; - - public const int VISA = 178; + if (value.Equals((63).ToString())) + return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_18; - - public const int TEMPORARY_PASSPORT = 179; + if (value.Equals((64).ToString())) + return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_21; - - public const int VOTING_CARD = 180; + if (value.Equals((65).ToString())) + return DocumentType.DRIVING_LICENSE_UNDER_18; - - public const int HEALTH_CARD = 181; + if (value.Equals((66).ToString())) + return DocumentType.DRIVING_LICENSE_UNDER_21; - - public const int CERTIFICATE_OF_CITIZENSHIP = 182; + if (value.Equals((67).ToString())) + return DocumentType.EMPLOYMENT_DRIVING_PERMIT; - - public const int ADDRESS_CARD = 183; + if (value.Equals((68).ToString())) + return DocumentType.ENHANCED_CHAUFFEUR_LICENSE; - - public const int AIRPORT_IMMIGRATION_CARD = 184; + if (value.Equals((69).ToString())) + return DocumentType.ENHANCED_CHAUFFEUR_LICENSE_UNDER_18; - - public const int ALIEN_REGISTRATION_CARD = 185; + if (value.Equals((70).ToString())) + return DocumentType.ENHANCED_CHAUFFEUR_LICENSE_UNDER_21; - - public const int APEH_CARD = 186; + if (value.Equals((71).ToString())) + return DocumentType.ENHANCED_COMMERCIAL_DRIVING_LICENSE; - - public const int COUPON_TO_DRIVING_LICENSE = 187; + if (value.Equals((72).ToString())) + return DocumentType.ENHANCED_DRIVING_LICENSE; - - public const int CREW_MEMBER_CERTIFICATE = 188; + if (value.Equals((73).ToString())) + return DocumentType.ENHANCED_DRIVING_LICENSE_UNDER_18; - - public const int DOCUMENT_FOR_RETURN = 189; + if (value.Equals((74).ToString())) + return DocumentType.ENHANCED_DRIVING_LICENSE_UNDER_21; - - public const int E_CARD = 190; + if (value.Equals((75).ToString())) + return DocumentType.ENHANCED_IDENTITY_CARD; - - public const int EMPLOYMENT_CARD = 191; + if (value.Equals((76).ToString())) + return DocumentType.ENHANCED_IDENTITY_CARD_UNDER_18; - - public const int HKSAR_IMMIGRATION_FORM = 192; + if (value.Equals((77).ToString())) + return DocumentType.ENHANCED_IDENTITY_CARD_UNDER_21; - - public const int IMMIGRANT_CARD = 193; + if (value.Equals((78).ToString())) + return DocumentType.ENHANCED_OPERATORS_LICENSE; - - public const int LABOUR_CARD = 194; + if (value.Equals((79).ToString())) + return DocumentType.FIREARMS_PERMIT; - - public const int LAISSEZ_PASSER = 195; + if (value.Equals((80).ToString())) + return DocumentType.FULL_PROVISIONAL_LICENSE; - - public const int LAWYER_IDENTITY_CERTIFICATE = 196; + if (value.Equals((81).ToString())) + return DocumentType.FULL_PROVISIONAL_LICENSE_UNDER_18; - - public const int LICENSE_CARD = 197; + if (value.Equals((82).ToString())) + return DocumentType.FULL_PROVISIONAL_LICENSE_UNDER_21; - - public const int PASSPORT_STATELESS = 198; + if (value.Equals((83).ToString())) + return DocumentType.GENEVA_CONVENTIONS_IDENTITY_CARD; - - public const int PASSPORT_CHILD = 199; + if (value.Equals((84).ToString())) + return DocumentType.GRADUATED_DRIVING_LICENSE_UNDER_18; - - public const int PASSPORT_CONSULAR = 200; + if (value.Equals((85).ToString())) + return DocumentType.GRADUATED_DRIVING_LICENSE_UNDER_21; - - public const int PASSPORT_DIPLOMATIC_SERVICE = 201; + if (value.Equals((86).ToString())) + return DocumentType.GRADUATED_INSTRUCTION_PERMIT_UNDER_18; - - public const int PASSPORT_OFFICIAL = 202; + if (value.Equals((87).ToString())) + return DocumentType.GRADUATED_INSTRUCTION_PERMIT_UNDER_21; - - public const int PASSPORT_PROVISIONAL = 203; + if (value.Equals((88).ToString())) + return DocumentType.GRADUATED_LICENSE_UNDER_18; - - public const int PASSPORT_SPECIAL = 204; + if (value.Equals((89).ToString())) + return DocumentType.GRADUATED_LICENSE_UNDER_21; - - public const int PERMISSION_TO_THE_LOCAL_BORDER_TRAFFIC = 205; + if (value.Equals((90).ToString())) + return DocumentType.HANDGUN_CARRY_PERMIT; - - public const int REGISTRATION_CERTIFICATE = 206; + if (value.Equals((91).ToString())) + return DocumentType.IDENTITY_AND_PRIVILEGE_CARD; - - public const int SEDESOL_CARD = 207; + if (value.Equals((92).ToString())) + return DocumentType.IDENTITY_CARD_MOBILITY_IMPAIRED; - - public const int SOCIAL_CARD = 208; + if (value.Equals((93).ToString())) + return DocumentType.IDENTITY_CARD_REGISTERED_OFFENDER; - - public const int TB_CARD = 209; + if (value.Equals((94).ToString())) + return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR; - - public const int VEHICLE_PASSPORT = 210; + if (value.Equals((95).ToString())) + return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_18; - - public const int W_DOCUMENT = 211; + if (value.Equals((96).ToString())) + return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_21; - - public const int DIPLOMATIC_IDENTITY_CARD = 212; + if (value.Equals((97).ToString())) + return DocumentType.IDENTITY_CARD_UNDER_18; - - public const int CONSULAR_IDENTITY_CARD = 213; + if (value.Equals((98).ToString())) + return DocumentType.IDENTITY_CARD_UNDER_21; - - public const int INCOME_TAX_CARD = 214; + if (value.Equals((99).ToString())) + return DocumentType.OTHER; - - public const int RESIDENCE_PERMIT = 215; + if (value.Equals((100).ToString())) + return DocumentType.IGNITION_INTERLOCK_PERMIT; - - public const int DOCUMENT_OF_IDENTITY = 216; + if (value.Equals((101).ToString())) + return DocumentType.IMMIGRANT_VISA; - - public const int BORDER_CROSSING_PERMIT = 217; + if (value.Equals((102).ToString())) + return DocumentType.INSTRUCTION_PERMIT; - - public const int PASSPORT_LIMITED_VALIDITY = 218; + if (value.Equals((103).ToString())) + return DocumentType.INSTRUCTION_PERMIT_UNDER_18; - - public const int SIM_CARD = 219; + if (value.Equals((104).ToString())) + return DocumentType.INSTRUCTION_PERMIT_UNDER_21; - - public const int TAX_CARD = 220; + if (value.Equals((105).ToString())) + return DocumentType.INTERIM_DRIVING_LICENSE; - - public const int COMPANY_CARD = 221; + if (value.Equals((106).ToString())) + return DocumentType.INTERIM_IDENTITY_CARD; - - public const int DOMESTIC_PASSPORT = 222; + if (value.Equals((107).ToString())) + return DocumentType.INTERMEDIATE_DRIVING_LICENSE; - - public const int IDENTITY_CERTIFICATE = 223; + if (value.Equals((108).ToString())) + return DocumentType.INTERMEDIATE_DRIVING_LICENSE_UNDER_18; - - public const int RESIDENT_ID_CARD = 224; + if (value.Equals((109).ToString())) + return DocumentType.INTERMEDIATE_DRIVING_LICENSE_UNDER_21; - - public const int ARMED_FORCES_IDENTITY_CARD = 225; + if (value.Equals((110).ToString())) + return DocumentType.JUNIOR_DRIVING_LICENSE; - - public const int PROFESSIONAL_CARD = 226; + if (value.Equals((111).ToString())) + return DocumentType.LEARNER_INSTRUCTIONAL_PERMIT; - - public const int REGISTRATION_STAMP = 227; + if (value.Equals((112).ToString())) + return DocumentType.LEARNER_LICENSE; - - public const int DRIVER_CARD = 228; + if (value.Equals((113).ToString())) + return DocumentType.LEARNER_LICENSE_UNDER_18; - - public const int DRIVER_TRAINING_CERTIFICATE = 229; + if (value.Equals((114).ToString())) + return DocumentType.LEARNER_LICENSE_UNDER_21; - - public const int QUALIFICATION_DRIVING_LICENSE = 230; + if (value.Equals((115).ToString())) + return DocumentType.LEARNER_PERMIT; - - public const int MEMBERSHIP_CARD = 231; + if (value.Equals((116).ToString())) + return DocumentType.LEARNER_PERMIT_UNDER_18; - - public const int PUBLIC_VEHICLE_DRIVER_AUTHORITY_CARD = 232; + if (value.Equals((117).ToString())) + return DocumentType.LEARNER_PERMIT_UNDER_21; - - public const int MARINE_LICENSE = 233; + if (value.Equals((118).ToString())) + return DocumentType.LIMITED_LICENSE; - - public const int TEMPORARY_LEARNER_LICENSE = 234; + if (value.Equals((119).ToString())) + return DocumentType.LIMITED_PERMIT; - - public const int TEMPORARY_COMMERCIAL_DRIVING_LICENSE = 235; + if (value.Equals((120).ToString())) + return DocumentType.LIMITED_TERM_DRIVING_LICENSE; - - public const int INTERIM_INSTRUCTIONAL_PERMIT = 236; + if (value.Equals((121).ToString())) + return DocumentType.LIMITED_TERM_IDENTITY_CARD; - - public const int CERTIFICATE_OF_COMPETENCY = 237; + if (value.Equals((122).ToString())) + return DocumentType.LIQUOR_IDENTITY_CARD; - - public const int CERTIFICATE_OF_PROFICIENCY = 238; + if (value.Equals((123).ToString())) + return DocumentType.NEW_PERMIT; - - public const int TRADE_LICENSE = 239; + if (value.Equals((124).ToString())) + return DocumentType.NEW_PERMIT_UNDER_18; - - public const int PASSPORT_PAGE = 240; + if (value.Equals((125).ToString())) + return DocumentType.NEW_PERMIT_UNDER_21; + if (value.Equals((126).ToString())) + return DocumentType.NON_US_CITIZEN_DRIVING_LICENSE; + + if (value.Equals((127).ToString())) + return DocumentType.OCCUPATIONAL_DRIVING_LICENSE; + + if (value.Equals((128).ToString())) + return DocumentType.ONEIDA_TRIBE_OF_INDIANS_IDENTITY_CARD; + + if (value.Equals((129).ToString())) + return DocumentType.OPERATOR_LICENSE; + + if (value.Equals((130).ToString())) + return DocumentType.OPERATOR_LICENSE_UNDER_18; + + if (value.Equals((131).ToString())) + return DocumentType.OPERATOR_LICENSE_UNDER_21; + + if (value.Equals((132).ToString())) + return DocumentType.PERMANENT_DRIVING_LICENSE; + + if (value.Equals((133).ToString())) + return DocumentType.PERMIT_TO_REENTER; + + if (value.Equals((134).ToString())) + return DocumentType.PROBATIONARY_AUTO_LICENSE; + + if (value.Equals((135).ToString())) + return DocumentType.PROBATIONARY_DRIVING_LICENSE_UNDER_18; + + if (value.Equals((136).ToString())) + return DocumentType.PROBATIONARY_DRIVING_LICENSE_UNDER_21; + + if (value.Equals((137).ToString())) + return DocumentType.PROBATIONARY_VEHICLE_SALES_PERSON_LICENSE; + + if (value.Equals((138).ToString())) + return DocumentType.PROVISIONAL_DRIVING_LICENSE; + + if (value.Equals((139).ToString())) + return DocumentType.PROVISIONAL_DRIVING_LICENSE_UNDER_18; + + if (value.Equals((140).ToString())) + return DocumentType.PROVISIONAL_DRIVING_LICENSE_UNDER_21; + + if (value.Equals((141).ToString())) + return DocumentType.PROVISIONAL_LICENSE; + + if (value.Equals((142).ToString())) + return DocumentType.PROVISIONAL_LICENSE_UNDER_18; + + if (value.Equals((143).ToString())) + return DocumentType.PROVISIONAL_LICENSE_UNDER_21; + + if (value.Equals((144).ToString())) + return DocumentType.PUBLIC_PASSENGER_CHAUFFEUR_LICENSE; + + if (value.Equals((145).ToString())) + return DocumentType.RACING_AND_GAMING_COMISSION_CARD; + + if (value.Equals((146).ToString())) + return DocumentType.REFUGEE_TRAVEL_DOCUMENT; + + if (value.Equals((147).ToString())) + return DocumentType.RENEWAL_PERMIT; + + if (value.Equals((148).ToString())) + return DocumentType.RESTRICTED_COMMERCIAL_DRIVER_LICENSE; + + if (value.Equals((149).ToString())) + return DocumentType.RESTRICTED_DRIVER_LICENSE; + + if (value.Equals((150).ToString())) + return DocumentType.RESTRICTED_PERMIT; + + if (value.Equals((151).ToString())) + return DocumentType.SEASONAL_PERMIT; + + if (value.Equals((152).ToString())) + return DocumentType.SEASONAL_RESIDENT_IDENTITY_CARD; + + if (value.Equals((153).ToString())) + return DocumentType.SEASONAL_CITIZEN_IDENTITY_CARD; + + if (value.Equals((154).ToString())) + return DocumentType.SEX_OFFENDER; + + if (value.Equals((155).ToString())) + return DocumentType.SOCIAL_SECURITY_CARD; + + if (value.Equals((156).ToString())) + return DocumentType.TEMPORARY_DRIVING_LICENSE; + + if (value.Equals((157).ToString())) + return DocumentType.TEMPORARY_DRIVING_LICENSE_UNDER_18; + + if (value.Equals((158).ToString())) + return DocumentType.TEMPORARY_DRIVING_LICENSE_UNDER_21; + + if (value.Equals((159).ToString())) + return DocumentType.TEMPORARY_IDENTITY_CARD; + + if (value.Equals((160).ToString())) + return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD; + + if (value.Equals((161).ToString())) + return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_18; + + if (value.Equals((162).ToString())) + return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_21; + + if (value.Equals((163).ToString())) + return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE; + + if (value.Equals((164).ToString())) + return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_18; + + if (value.Equals((165).ToString())) + return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_21; + + if (value.Equals((166).ToString())) + return DocumentType.UNIFORMED_SERVICES_IDENTITY_CARD; + + if (value.Equals((167).ToString())) + return DocumentType.VEHICLE_SALES_PERSON_LICENSE; + + if (value.Equals((168).ToString())) + return DocumentType.WORKER_IDENTIFICATION_CREDENTIAL; + + if (value.Equals((169).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE; + + if (value.Equals((170).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_18; + + if (value.Equals((171).ToString())) + return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_21; + + if (value.Equals((172).ToString())) + return DocumentType.PASSPORT_CARD; + + if (value.Equals((173).ToString())) + return DocumentType.PASSPORT_RESIDENT_CARD; + + if (value.Equals((174).ToString())) + return DocumentType.PERSONAL_IDENTIFICATION_VERIFICATION; + + if (value.Equals((175).ToString())) + return DocumentType.TEMPORARY_OPERATOR_LICENSE; + + if (value.Equals((176).ToString())) + return DocumentType.DRIVING_LICENSE_UNDER_19; + + if (value.Equals((177).ToString())) + return DocumentType.IDENTITY_CARD_UNDER_19; + + if (value.Equals((178).ToString())) + return DocumentType.VISA; + + if (value.Equals((179).ToString())) + return DocumentType.TEMPORARY_PASSPORT; + + if (value.Equals((180).ToString())) + return DocumentType.VOTING_CARD; + + if (value.Equals((181).ToString())) + return DocumentType.HEALTH_CARD; + + if (value.Equals((182).ToString())) + return DocumentType.CERTIFICATE_OF_CITIZENSHIP; + + if (value.Equals((183).ToString())) + return DocumentType.ADDRESS_CARD; + + if (value.Equals((184).ToString())) + return DocumentType.AIRPORT_IMMIGRATION_CARD; + + if (value.Equals((185).ToString())) + return DocumentType.ALIEN_REGISTRATION_CARD; + + if (value.Equals((186).ToString())) + return DocumentType.APEH_CARD; + + if (value.Equals((187).ToString())) + return DocumentType.COUPON_TO_DRIVING_LICENSE; + + if (value.Equals((188).ToString())) + return DocumentType.CREW_MEMBER_CERTIFICATE; + + if (value.Equals((189).ToString())) + return DocumentType.DOCUMENT_FOR_RETURN; + + if (value.Equals((190).ToString())) + return DocumentType.E_CARD; + + if (value.Equals((191).ToString())) + return DocumentType.EMPLOYMENT_CARD; + + if (value.Equals((192).ToString())) + return DocumentType.HKSAR_IMMIGRATION_FORM; + + if (value.Equals((193).ToString())) + return DocumentType.IMMIGRANT_CARD; + + if (value.Equals((194).ToString())) + return DocumentType.LABOUR_CARD; + + if (value.Equals((195).ToString())) + return DocumentType.LAISSEZ_PASSER; + + if (value.Equals((196).ToString())) + return DocumentType.LAWYER_IDENTITY_CERTIFICATE; + + if (value.Equals((197).ToString())) + return DocumentType.LICENSE_CARD; + + if (value.Equals((198).ToString())) + return DocumentType.PASSPORT_STATELESS; + + if (value.Equals((199).ToString())) + return DocumentType.PASSPORT_CHILD; + + if (value.Equals((200).ToString())) + return DocumentType.PASSPORT_CONSULAR; + + if (value.Equals((201).ToString())) + return DocumentType.PASSPORT_DIPLOMATIC_SERVICE; + + if (value.Equals((202).ToString())) + return DocumentType.PASSPORT_OFFICIAL; + + if (value.Equals((203).ToString())) + return DocumentType.PASSPORT_PROVISIONAL; + + if (value.Equals((204).ToString())) + return DocumentType.PASSPORT_SPECIAL; + + if (value.Equals((205).ToString())) + return DocumentType.PERMISSION_TO_THE_LOCAL_BORDER_TRAFFIC; + + if (value.Equals((206).ToString())) + return DocumentType.REGISTRATION_CERTIFICATE; + + if (value.Equals((207).ToString())) + return DocumentType.SEDESOL_CARD; + + if (value.Equals((208).ToString())) + return DocumentType.SOCIAL_CARD; + + if (value.Equals((209).ToString())) + return DocumentType.TB_CARD; + + if (value.Equals((210).ToString())) + return DocumentType.VEHICLE_PASSPORT; + + if (value.Equals((211).ToString())) + return DocumentType.W_DOCUMENT; + + if (value.Equals((212).ToString())) + return DocumentType.DIPLOMATIC_IDENTITY_CARD; + + if (value.Equals((213).ToString())) + return DocumentType.CONSULAR_IDENTITY_CARD; + + if (value.Equals((214).ToString())) + return DocumentType.INCOME_TAX_CARD; + + if (value.Equals((215).ToString())) + return DocumentType.RESIDENCE_PERMIT; + + if (value.Equals((216).ToString())) + return DocumentType.DOCUMENT_OF_IDENTITY; + + if (value.Equals((217).ToString())) + return DocumentType.BORDER_CROSSING_PERMIT; + + if (value.Equals((218).ToString())) + return DocumentType.PASSPORT_LIMITED_VALIDITY; + + if (value.Equals((219).ToString())) + return DocumentType.SIM_CARD; + + if (value.Equals((220).ToString())) + return DocumentType.TAX_CARD; + + if (value.Equals((221).ToString())) + return DocumentType.COMPANY_CARD; + + if (value.Equals((222).ToString())) + return DocumentType.DOMESTIC_PASSPORT; + + if (value.Equals((223).ToString())) + return DocumentType.IDENTITY_CERTIFICATE; + + if (value.Equals((224).ToString())) + return DocumentType.RESIDENT_ID_CARD; + + if (value.Equals((225).ToString())) + return DocumentType.ARMED_FORCES_IDENTITY_CARD; + + if (value.Equals((226).ToString())) + return DocumentType.PROFESSIONAL_CARD; + + if (value.Equals((227).ToString())) + return DocumentType.REGISTRATION_STAMP; + + if (value.Equals((228).ToString())) + return DocumentType.DRIVER_CARD; + + if (value.Equals((229).ToString())) + return DocumentType.DRIVER_TRAINING_CERTIFICATE; + + if (value.Equals((230).ToString())) + return DocumentType.QUALIFICATION_DRIVING_LICENSE; + + if (value.Equals((231).ToString())) + return DocumentType.MEMBERSHIP_CARD; + + if (value.Equals((232).ToString())) + return DocumentType.PUBLIC_VEHICLE_DRIVER_AUTHORITY_CARD; + + if (value.Equals((233).ToString())) + return DocumentType.MARINE_LICENSE; + + if (value.Equals((234).ToString())) + return DocumentType.TEMPORARY_LEARNER_LICENSE; + + if (value.Equals((235).ToString())) + return DocumentType.TEMPORARY_COMMERCIAL_DRIVING_LICENSE; + + if (value.Equals((236).ToString())) + return DocumentType.INTERIM_INSTRUCTIONAL_PERMIT; + + if (value.Equals((237).ToString())) + return DocumentType.CERTIFICATE_OF_COMPETENCY; + + if (value.Equals((238).ToString())) + return DocumentType.CERTIFICATE_OF_PROFICIENCY; + + if (value.Equals((239).ToString())) + return DocumentType.TRADE_LICENSE; + + if (value.Equals((240).ToString())) + return DocumentType.PASSPORT_PAGE; + + if (value.Equals((241).ToString())) + return DocumentType.INVOICE; + + if (value.Equals((242).ToString())) + return DocumentType.PASSENGER_LOCATOR_FORM; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(DocumentType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class DocumentTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override DocumentType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + DocumentType? result = rawValue == null + ? null + : DocumentTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DocumentType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentType documentType, JsonSerializerOptions options) + { + writer.WriteStringValue(documentType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class DocumentTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a DocumentType from the Json object + /// + /// + /// + /// + /// + public override DocumentType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + DocumentType? result = rawValue == null + ? null + : DocumentTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentType? documentType, JsonSerializerOptions options) + { + writer.WriteStringValue(documentType?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs index b453d0e..8a38a06 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs @@ -1,40 +1,180 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class DocumentTypeRecognitionResult + /// + /// Defines DocumentTypeRecognitionResult + /// + public enum DocumentTypeRecognitionResult + { + /// + /// Enum OK for value: 0 + /// + OK = 0, + + /// + /// Enum UNKNOWN for value: 15 + /// + UNKNOWN = 15, + + /// + /// Enum NEED_MORE_IMAGES for value: 29 + /// + NEED_MORE_IMAGES = 29 + } + + /// + /// Converts to and from the JSON value + /// + public static class DocumentTypeRecognitionResultValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static DocumentTypeRecognitionResult FromString(string value) + { + if (value.Equals((0).ToString())) + return DocumentTypeRecognitionResult.OK; + + if (value.Equals((15).ToString())) + return DocumentTypeRecognitionResult.UNKNOWN; + + if (value.Equals((29).ToString())) + return DocumentTypeRecognitionResult.NEED_MORE_IMAGES; + + throw new NotImplementedException($"Could not convert value to type DocumentTypeRecognitionResult: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static DocumentTypeRecognitionResult? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return DocumentTypeRecognitionResult.OK; + + if (value.Equals((15).ToString())) + return DocumentTypeRecognitionResult.UNKNOWN; + + if (value.Equals((29).ToString())) + return DocumentTypeRecognitionResult.NEED_MORE_IMAGES; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(DocumentTypeRecognitionResult value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class DocumentTypeRecognitionResultJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override DocumentTypeRecognitionResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + DocumentTypeRecognitionResult? result = rawValue == null + ? null + : DocumentTypeRecognitionResultValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DocumentTypeRecognitionResult to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentTypeRecognitionResult documentTypeRecognitionResult, JsonSerializerOptions options) + { + writer.WriteStringValue(documentTypeRecognitionResult.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class DocumentTypeRecognitionResultNullableJsonConverter : JsonConverter { + /// + /// Returns a DocumentTypeRecognitionResult from the Json object + /// + /// + /// + /// + /// + public override DocumentTypeRecognitionResult? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** Document type determined. The first element in candidates array is recognition result */ - public const int OK = 0; + DocumentTypeRecognitionResult? result = rawValue == null + ? null + : DocumentTypeRecognitionResultValueConverter.FromStringOrDefault(rawValue); - /** Document type was not determined. Ongoing processing is not possible */ - public const int UNKNOWN = 15; + if (result != null) + return result.Value; - /** To determine document type user should provide more images with different light sources (UV, for example) */ - public const int NEED_MORE_IMAGES = 29; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentTypeRecognitionResult? documentTypeRecognitionResult, JsonSerializerOptions options) + { + writer.WriteStringValue(documentTypeRecognitionResult?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs index e6a7d77..c8a7e0d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs @@ -1,57 +1,75 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentTypesCandidates /// - [DataContract] - public partial class DocumentTypesCandidates : IEquatable, IValidatableObject + public partial class DocumentTypesCandidates : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// recResult. - /// candidates. - public DocumentTypesCandidates(int recResult = default(int), List candidates = default(List)) + /// recResult + /// candidates + [JsonConstructor] + public DocumentTypesCandidates(Option recResult = default, Option?> candidates = default) { - this.RecResult = recResult; - this.Candidates = candidates; + RecResultOption = recResult; + CandidatesOption = candidates; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of RecResult + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RecResultOption { get; private set; } + /// /// Gets or Sets RecResult /// - [DataMember(Name="RecResult", EmitDefaultValue=false)] - public int RecResult { get; set; } + [JsonPropertyName("RecResult")] + public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new(value); } } + + /// + /// Used to track the state of Candidates + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> CandidatesOption { get; private set; } /// /// Gets or Sets Candidates /// - [DataMember(Name="Candidates", EmitDefaultValue=false)] - public List Candidates { get; set; } + [JsonPropertyName("Candidates")] + public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new(value); } } /// /// Returns the string presentation of the object @@ -59,83 +77,126 @@ public partial class DocumentTypesCandidates : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentTypesCandidates {\n"); sb.Append(" RecResult: ").Append(RecResult).Append("\n"); sb.Append(" Candidates: ").Append(Candidates).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class DocumentTypesCandidatesJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override DocumentTypesCandidates Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as DocumentTypesCandidates); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option recResult = default; + Option?> candidates = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RecResult": + string? recResultRawValue = utf8JsonReader.GetString(); + if (recResultRawValue != null) + recResult = new Option(DocumentTypeRecognitionResultValueConverter.FromStringOrDefault(recResultRawValue)); + break; + case "Candidates": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + candidates = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (recResult.IsSet && recResult.Value == null) + throw new ArgumentNullException(nameof(recResult), "Property is not nullable for class DocumentTypesCandidates."); + + if (candidates.IsSet && candidates.Value == null) + throw new ArgumentNullException(nameof(candidates), "Property is not nullable for class DocumentTypesCandidates."); + + return new DocumentTypesCandidates(recResult, candidates); } /// - /// Returns true if DocumentTypesCandidates instances are equal + /// Serializes a /// - /// Instance of DocumentTypesCandidates to be compared - /// Boolean - public bool Equals(DocumentTypesCandidates input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentTypesCandidates documentTypesCandidates, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.RecResult == input.RecResult || - (this.RecResult != null && - this.RecResult.Equals(input.RecResult)) - ) && - ( - this.Candidates == input.Candidates || - this.Candidates != null && - input.Candidates != null && - this.Candidates.SequenceEqual(input.Candidates) - ); + writer.WriteStartObject(); + + WriteProperties(writer, documentTypesCandidates, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentTypesCandidates documentTypesCandidates, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (documentTypesCandidates.CandidatesOption.IsSet && documentTypesCandidates.Candidates == null) + throw new ArgumentNullException(nameof(documentTypesCandidates.Candidates), "Property is required for class DocumentTypesCandidates."); + + if (documentTypesCandidates.RecResultOption.IsSet) { - int hashCode = 41; - if (this.RecResult != null) - hashCode = hashCode * 59 + this.RecResult.GetHashCode(); - if (this.Candidates != null) - hashCode = hashCode * 59 + this.Candidates.GetHashCode(); - return hashCode; + var recResultRawValue = DocumentTypeRecognitionResultValueConverter.ToJsonValue(documentTypesCandidates.RecResult!.Value); + writer.WriteNumber("RecResult", recResultRawValue); + } + if (documentTypesCandidates.CandidatesOption.IsSet) + { + writer.WritePropertyName("Candidates"); + JsonSerializer.Serialize(writer, documentTypesCandidates.Candidates, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs index fd81fe4..ff81ea6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs @@ -1,57 +1,75 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentTypesCandidatesList /// - [DataContract] - public partial class DocumentTypesCandidatesList : IEquatable, IValidatableObject + public partial class DocumentTypesCandidatesList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// recResult. - /// candidates. - public DocumentTypesCandidatesList(int recResult = default(int), List candidates = default(List)) + /// recResult + /// candidates + [JsonConstructor] + public DocumentTypesCandidatesList(Option recResult = default, Option?> candidates = default) { - this.RecResult = recResult; - this.Candidates = candidates; + RecResultOption = recResult; + CandidatesOption = candidates; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of RecResult + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RecResultOption { get; private set; } + /// /// Gets or Sets RecResult /// - [DataMember(Name="RecResult", EmitDefaultValue=false)] - public int RecResult { get; set; } + [JsonPropertyName("RecResult")] + public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new(value); } } + + /// + /// Used to track the state of Candidates + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> CandidatesOption { get; private set; } /// /// Gets or Sets Candidates /// - [DataMember(Name="Candidates", EmitDefaultValue=false)] - public List Candidates { get; set; } + [JsonPropertyName("Candidates")] + public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new(value); } } /// /// Returns the string presentation of the object @@ -59,83 +77,126 @@ public partial class DocumentTypesCandidatesList : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentTypesCandidatesList {\n"); sb.Append(" RecResult: ").Append(RecResult).Append("\n"); sb.Append(" Candidates: ").Append(Candidates).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class DocumentTypesCandidatesListJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override DocumentTypesCandidatesList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as DocumentTypesCandidatesList); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option recResult = default; + Option?> candidates = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RecResult": + string? recResultRawValue = utf8JsonReader.GetString(); + if (recResultRawValue != null) + recResult = new Option(DocumentTypeRecognitionResultValueConverter.FromStringOrDefault(recResultRawValue)); + break; + case "Candidates": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + candidates = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (recResult.IsSet && recResult.Value == null) + throw new ArgumentNullException(nameof(recResult), "Property is not nullable for class DocumentTypesCandidatesList."); + + if (candidates.IsSet && candidates.Value == null) + throw new ArgumentNullException(nameof(candidates), "Property is not nullable for class DocumentTypesCandidatesList."); + + return new DocumentTypesCandidatesList(recResult, candidates); } /// - /// Returns true if DocumentTypesCandidatesList instances are equal + /// Serializes a /// - /// Instance of DocumentTypesCandidatesList to be compared - /// Boolean - public bool Equals(DocumentTypesCandidatesList input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentTypesCandidatesList documentTypesCandidatesList, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.RecResult == input.RecResult || - (this.RecResult != null && - this.RecResult.Equals(input.RecResult)) - ) && - ( - this.Candidates == input.Candidates || - this.Candidates != null && - input.Candidates != null && - this.Candidates.SequenceEqual(input.Candidates) - ); + writer.WriteStartObject(); + + WriteProperties(writer, documentTypesCandidatesList, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentTypesCandidatesList documentTypesCandidatesList, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (documentTypesCandidatesList.CandidatesOption.IsSet && documentTypesCandidatesList.Candidates == null) + throw new ArgumentNullException(nameof(documentTypesCandidatesList.Candidates), "Property is required for class DocumentTypesCandidatesList."); + + if (documentTypesCandidatesList.RecResultOption.IsSet) { - int hashCode = 41; - if (this.RecResult != null) - hashCode = hashCode * 59 + this.RecResult.GetHashCode(); - if (this.Candidates != null) - hashCode = hashCode * 59 + this.Candidates.GetHashCode(); - return hashCode; + var recResultRawValue = DocumentTypeRecognitionResultValueConverter.ToJsonValue(documentTypesCandidatesList.RecResult!.Value); + writer.WriteNumber("RecResult", recResultRawValue); + } + if (documentTypesCandidatesList.CandidatesOption.IsSet) + { + writer.WritePropertyName("Candidates"); + JsonSerializer.Serialize(writer, documentTypesCandidatesList.Candidates, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs index ad58fa5..af72c38 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs @@ -1,54 +1,64 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentTypesCandidatesResult /// - [DataContract] - public partial class DocumentTypesCandidatesResult : ResultItem, IEquatable, IValidatableObject + public partial class DocumentTypesCandidatesResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected DocumentTypesCandidatesResult() { } - /// - /// Initializes a new instance of the class. - /// - /// candidatesList. - public DocumentTypesCandidatesResult(DocumentTypesCandidatesList candidatesList = default(DocumentTypesCandidatesList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// bufLength + /// light + /// listIdx + /// pageIdx + /// candidatesList + [JsonConstructor] + public DocumentTypesCandidatesResult(Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default, Option candidatesList = default) : base(bufLength, light, listIdx, pageIdx) { - this.CandidatesList = candidatesList; + CandidatesListOption = candidatesList; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of CandidatesList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CandidatesListOption { get; private set; } + /// /// Gets or Sets CandidatesList /// - [DataMember(Name="CandidatesList", EmitDefaultValue=false)] - public DocumentTypesCandidatesList CandidatesList { get; set; } + [JsonPropertyName("CandidatesList")] + public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new(value); } } /// /// Returns the string presentation of the object @@ -56,76 +66,159 @@ protected DocumentTypesCandidatesResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentTypesCandidatesResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" CandidatesList: ").Append(CandidatesList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class DocumentTypesCandidatesResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override DocumentTypesCandidatesResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as DocumentTypesCandidatesResult); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + Option candidatesList = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + case "CandidatesList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + candidatesList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class DocumentTypesCandidatesResult.", nameof(resultType)); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocumentTypesCandidatesResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocumentTypesCandidatesResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocumentTypesCandidatesResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocumentTypesCandidatesResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocumentTypesCandidatesResult."); + + if (candidatesList.IsSet && candidatesList.Value == null) + throw new ArgumentNullException(nameof(candidatesList), "Property is not nullable for class DocumentTypesCandidatesResult."); + + return new DocumentTypesCandidatesResult(bufLength, light, listIdx, pageIdx, candidatesList); } /// - /// Returns true if DocumentTypesCandidatesResult instances are equal + /// Serializes a /// - /// Instance of DocumentTypesCandidatesResult to be compared - /// Boolean - public bool Equals(DocumentTypesCandidatesResult input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentTypesCandidatesResult documentTypesCandidatesResult, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.CandidatesList == input.CandidatesList || - (this.CandidatesList != null && - this.CandidatesList.Equals(input.CandidatesList)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, documentTypesCandidatesResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentTypesCandidatesResult documentTypesCandidatesResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (documentTypesCandidatesResult.CandidatesListOption.IsSet && documentTypesCandidatesResult.CandidatesList == null) + throw new ArgumentNullException(nameof(documentTypesCandidatesResult.CandidatesList), "Property is required for class DocumentTypesCandidatesResult."); + + if (documentTypesCandidatesResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", documentTypesCandidatesResult.BufLengthOption.Value!.Value); + + if (documentTypesCandidatesResult.LightOption.IsSet) + writer.WriteNumber("light", documentTypesCandidatesResult.LightOption.Value!.Value); + + if (documentTypesCandidatesResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", documentTypesCandidatesResult.ListIdxOption.Value!.Value); + + if (documentTypesCandidatesResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", documentTypesCandidatesResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", documentTypesCandidatesResult.ResultType); + + if (documentTypesCandidatesResult.CandidatesListOption.IsSet) { - int hashCode = base.GetHashCode(); - if (this.CandidatesList != null) - hashCode = hashCode * 59 + this.CandidatesList.GetHashCode(); - return hashCode; + writer.WritePropertyName("CandidatesList"); + JsonSerializer.Serialize(writer, documentTypesCandidatesResult.CandidatesList, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs index c1ddd9c..90a642a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs @@ -1,77 +1,109 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Document database information /// - [DataContract] - public partial class DocumentsDatabase : IEquatable, IValidatableObject + public partial class DocumentsDatabase : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Document database description. - /// Date the document database was created. - /// Document database identifier. - /// Document database version. - public DocumentsDatabase(string description = default(string), string exportDate = default(string), string iD = default(string), string version = default(string)) + /// Document database description + /// Date the document database was created + /// Document database identifier + /// Document database version + [JsonConstructor] + public DocumentsDatabase(Option description = default, Option exportDate = default, Option iD = default, Option varVersion = default) { - this.Description = description; - this.ExportDate = exportDate; - this.ID = iD; - this.Version = version; + DescriptionOption = description; + ExportDateOption = exportDate; + IDOption = iD; + VarVersionOption = varVersion; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Description + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DescriptionOption { get; private set; } + /// /// Document database description /// /// Document database description - [DataMember(Name="Description", EmitDefaultValue=false)] - public string Description { get; set; } + [JsonPropertyName("Description")] + public string? Description { get { return this.DescriptionOption; } set { this.DescriptionOption = new(value); } } + + /// + /// Used to track the state of ExportDate + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ExportDateOption { get; private set; } /// /// Date the document database was created /// /// Date the document database was created - [DataMember(Name="ExportDate", EmitDefaultValue=false)] - public string ExportDate { get; set; } + [JsonPropertyName("ExportDate")] + public string? ExportDate { get { return this.ExportDateOption; } set { this.ExportDateOption = new(value); } } + + /// + /// Used to track the state of ID + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option IDOption { get; private set; } /// /// Document database identifier /// /// Document database identifier - [DataMember(Name="ID", EmitDefaultValue=false)] - public string ID { get; set; } + [JsonPropertyName("ID")] + public string? ID { get { return this.IDOption; } set { this.IDOption = new(value); } } + + /// + /// Used to track the state of VarVersion + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option VarVersionOption { get; private set; } /// /// Document database version /// /// Document database version - [DataMember(Name="Version", EmitDefaultValue=false)] - public string Version { get; set; } + [JsonPropertyName("Version")] + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } /// /// Returns the string presentation of the object @@ -79,98 +111,149 @@ public partial class DocumentsDatabase : IEquatable, IValida /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class DocumentsDatabase {\n"); sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append(" ExportDate: ").Append(ExportDate).Append("\n"); sb.Append(" ID: ").Append(ID).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as DocumentsDatabase); + yield break; } + } + /// + /// A Json converter for type + /// + public class DocumentsDatabaseJsonConverter : JsonConverter + { /// - /// Returns true if DocumentsDatabase instances are equal + /// Deserializes json to /// - /// Instance of DocumentsDatabase to be compared - /// Boolean - public bool Equals(DocumentsDatabase input) + /// + /// + /// + /// + /// + public override DocumentsDatabase Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ) && - ( - this.ExportDate == input.ExportDate || - (this.ExportDate != null && - this.ExportDate.Equals(input.ExportDate)) - ) && - ( - this.ID == input.ID || - (this.ID != null && - this.ID.Equals(input.ID)) - ) && - ( - this.Version == input.Version || - (this.Version != null && - this.Version.Equals(input.Version)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option description = default; + Option exportDate = default; + Option iD = default; + Option varVersion = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Description": + description = new Option(utf8JsonReader.GetString()!); + break; + case "ExportDate": + exportDate = new Option(utf8JsonReader.GetString()!); + break; + case "ID": + iD = new Option(utf8JsonReader.GetString()!); + break; + case "Version": + varVersion = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (description.IsSet && description.Value == null) + throw new ArgumentNullException(nameof(description), "Property is not nullable for class DocumentsDatabase."); + + if (exportDate.IsSet && exportDate.Value == null) + throw new ArgumentNullException(nameof(exportDate), "Property is not nullable for class DocumentsDatabase."); + + if (iD.IsSet && iD.Value == null) + throw new ArgumentNullException(nameof(iD), "Property is not nullable for class DocumentsDatabase."); + + if (varVersion.IsSet && varVersion.Value == null) + throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class DocumentsDatabase."); + + return new DocumentsDatabase(description, exportDate, iD, varVersion); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, DocumentsDatabase documentsDatabase, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - if (this.ExportDate != null) - hashCode = hashCode * 59 + this.ExportDate.GetHashCode(); - if (this.ID != null) - hashCode = hashCode * 59 + this.ID.GetHashCode(); - if (this.Version != null) - hashCode = hashCode * 59 + this.Version.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, documentsDatabase, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, DocumentsDatabase documentsDatabase, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (documentsDatabase.DescriptionOption.IsSet && documentsDatabase.Description == null) + throw new ArgumentNullException(nameof(documentsDatabase.Description), "Property is required for class DocumentsDatabase."); + + if (documentsDatabase.ExportDateOption.IsSet && documentsDatabase.ExportDate == null) + throw new ArgumentNullException(nameof(documentsDatabase.ExportDate), "Property is required for class DocumentsDatabase."); + + if (documentsDatabase.IDOption.IsSet && documentsDatabase.ID == null) + throw new ArgumentNullException(nameof(documentsDatabase.ID), "Property is required for class DocumentsDatabase."); + + if (documentsDatabase.VarVersionOption.IsSet && documentsDatabase.VarVersion == null) + throw new ArgumentNullException(nameof(documentsDatabase.VarVersion), "Property is required for class DocumentsDatabase."); + + if (documentsDatabase.DescriptionOption.IsSet) + writer.WriteString("Description", documentsDatabase.Description); + + if (documentsDatabase.ExportDateOption.IsSet) + writer.WriteString("ExportDate", documentsDatabase.ExportDate); + + if (documentsDatabase.IDOption.IsSet) + writer.WriteString("ID", documentsDatabase.ID); + + if (documentsDatabase.VarVersionOption.IsSet) + writer.WriteString("Version", documentsDatabase.VarVersion); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs new file mode 100644 index 0000000..296dd9e --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs @@ -0,0 +1,167 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// EncryptedRCLItem + /// + public partial class EncryptedRCLItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded data + [JsonConstructor] + public EncryptedRCLItem(byte[] encryptedRCL) + { + EncryptedRCL = encryptedRCL; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Base64 encoded data + /// + /// Base64 encoded data + /* [B@3209469d */ + [JsonPropertyName("EncryptedRCL")] + public byte[] EncryptedRCL { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class EncryptedRCLItem {\n"); + sb.Append(" EncryptedRCL: ").Append(EncryptedRCL).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class EncryptedRCLItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override EncryptedRCLItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option encryptedRCL = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "EncryptedRCL": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + encryptedRCL = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!encryptedRCL.IsSet) + throw new ArgumentException("Property is required for class EncryptedRCLItem.", nameof(encryptedRCL)); + + if (encryptedRCL.IsSet && encryptedRCL.Value == null) + throw new ArgumentNullException(nameof(encryptedRCL), "Property is not nullable for class EncryptedRCLItem."); + + return new EncryptedRCLItem(encryptedRCL.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EncryptedRCLItem encryptedRCLItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, encryptedRCLItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, EncryptedRCLItem encryptedRCLItem, JsonSerializerOptions jsonSerializerOptions) + { + if (encryptedRCLItem.EncryptedRCL == null) + throw new ArgumentNullException(nameof(encryptedRCLItem.EncryptedRCL), "Property is required for class EncryptedRCLItem."); + + writer.WritePropertyName("EncryptedRCL"); + JsonSerializer.Serialize(writer, encryptedRCLItem.EncryptedRCL, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs index 12ee290..dde2110 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs @@ -1,63 +1,58 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// - /// EncryptedRCLResult + /// Contains encrypted result container list /// - [DataContract] - public partial class EncryptedRCLResult : ResultItem, IEquatable, IValidatableObject + public partial class EncryptedRCLResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected EncryptedRCLResult() { } - /// - /// Initializes a new instance of the class. - /// - /// Base64 encoded data (required). - public EncryptedRCLResult(byte[] encryptedRCL = default(byte[]), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// Base64 encoded data + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public EncryptedRCLResult(byte[] encryptedRCL, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "encryptedRCL" is required (not null) - if (encryptedRCL == null) - { - throw new InvalidDataException("encryptedRCL is a required property for EncryptedRCLResult and cannot be null"); - } - else - { - this.EncryptedRCL = encryptedRCL; - } - + EncryptedRCL = encryptedRCL; + OnCreated(); } - + + partial void OnCreated(); + /// /// Base64 encoded data /// /// Base64 encoded data - [DataMember(Name="EncryptedRCL", EmitDefaultValue=true)] + /* [B@3209469d */ + [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } /// @@ -66,76 +61,158 @@ protected EncryptedRCLResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class EncryptedRCLResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" EncryptedRCL: ").Append(EncryptedRCL).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class EncryptedRCLResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override EncryptedRCLResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as EncryptedRCLResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if EncryptedRCLResult instances are equal - /// - /// Instance of EncryptedRCLResult to be compared - /// Boolean - public bool Equals(EncryptedRCLResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.EncryptedRCL == input.EncryptedRCL || - (this.EncryptedRCL != null && - this.EncryptedRCL.Equals(input.EncryptedRCL)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option encryptedRCL = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "EncryptedRCL": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + encryptedRCL = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!encryptedRCL.IsSet) + throw new ArgumentException("Property is required for class EncryptedRCLResult.", nameof(encryptedRCL)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class EncryptedRCLResult.", nameof(resultType)); + + if (encryptedRCL.IsSet && encryptedRCL.Value == null) + throw new ArgumentNullException(nameof(encryptedRCL), "Property is not nullable for class EncryptedRCLResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class EncryptedRCLResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class EncryptedRCLResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class EncryptedRCLResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class EncryptedRCLResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class EncryptedRCLResult."); + + return new EncryptedRCLResult(encryptedRCL.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, EncryptedRCLResult encryptedRCLResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.EncryptedRCL != null) - hashCode = hashCode * 59 + this.EncryptedRCL.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, encryptedRCLResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, EncryptedRCLResult encryptedRCLResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (encryptedRCLResult.EncryptedRCL == null) + throw new ArgumentNullException(nameof(encryptedRCLResult.EncryptedRCL), "Property is required for class EncryptedRCLResult."); + + writer.WritePropertyName("EncryptedRCL"); + JsonSerializer.Serialize(writer, encryptedRCLResult.EncryptedRCL, jsonSerializerOptions); + if (encryptedRCLResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", encryptedRCLResult.BufLengthOption.Value!.Value); + + if (encryptedRCLResult.LightOption.IsSet) + writer.WriteNumber("light", encryptedRCLResult.LightOption.Value!.Value); + + if (encryptedRCLResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", encryptedRCLResult.ListIdxOption.Value!.Value); + + if (encryptedRCLResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", encryptedRCLResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", encryptedRCLResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs new file mode 100644 index 0000000..35d7905 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs @@ -0,0 +1,247 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ErrorCoordinates + /// + public partial class ErrorCoordinates : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// left + /// top + /// right + /// bottom + [JsonConstructor] + public ErrorCoordinates(Option left = default, Option top = default, Option right = default, Option bottom = default) + { + LeftOption = left; + TopOption = top; + RightOption = right; + BottomOption = bottom; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Used to track the state of Left + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LeftOption { get; private set; } + + /// + /// Gets or Sets Left + /// + [JsonPropertyName("Left")] + public decimal? Left { get { return this.LeftOption; } set { this.LeftOption = new(value); } } + + /// + /// Used to track the state of Top + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TopOption { get; private set; } + + /// + /// Gets or Sets Top + /// + [JsonPropertyName("Top")] + public decimal? Top { get { return this.TopOption; } set { this.TopOption = new(value); } } + + /// + /// Used to track the state of Right + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RightOption { get; private set; } + + /// + /// Gets or Sets Right + /// + [JsonPropertyName("Right")] + public decimal? Right { get { return this.RightOption; } set { this.RightOption = new(value); } } + + /// + /// Used to track the state of Bottom + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BottomOption { get; private set; } + + /// + /// Gets or Sets Bottom + /// + [JsonPropertyName("Bottom")] + public decimal? Bottom { get { return this.BottomOption; } set { this.BottomOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ErrorCoordinates {\n"); + sb.Append(" Left: ").Append(Left).Append("\n"); + sb.Append(" Top: ").Append(Top).Append("\n"); + sb.Append(" Right: ").Append(Right).Append("\n"); + sb.Append(" Bottom: ").Append(Bottom).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ErrorCoordinatesJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ErrorCoordinates Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option left = default; + Option top = default; + Option right = default; + Option bottom = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Left": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + left = new Option(utf8JsonReader.GetDecimal()); + break; + case "Top": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + top = new Option(utf8JsonReader.GetDecimal()); + break; + case "Right": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + right = new Option(utf8JsonReader.GetDecimal()); + break; + case "Bottom": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bottom = new Option(utf8JsonReader.GetDecimal()); + break; + default: + break; + } + } + } + + if (left.IsSet && left.Value == null) + throw new ArgumentNullException(nameof(left), "Property is not nullable for class ErrorCoordinates."); + + if (top.IsSet && top.Value == null) + throw new ArgumentNullException(nameof(top), "Property is not nullable for class ErrorCoordinates."); + + if (right.IsSet && right.Value == null) + throw new ArgumentNullException(nameof(right), "Property is not nullable for class ErrorCoordinates."); + + if (bottom.IsSet && bottom.Value == null) + throw new ArgumentNullException(nameof(bottom), "Property is not nullable for class ErrorCoordinates."); + + return new ErrorCoordinates(left, top, right, bottom); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ErrorCoordinates errorCoordinates, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, errorCoordinates, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ErrorCoordinates errorCoordinates, JsonSerializerOptions jsonSerializerOptions) + { + if (errorCoordinates.LeftOption.IsSet) + writer.WriteNumber("Left", errorCoordinates.LeftOption.Value!.Value); + + if (errorCoordinates.TopOption.IsSet) + writer.WriteNumber("Top", errorCoordinates.TopOption.Value!.Value); + + if (errorCoordinates.RightOption.IsSet) + writer.WriteNumber("Right", errorCoordinates.RightOption.Value!.Value); + + if (errorCoordinates.BottomOption.IsSet) + writer.WriteNumber("Bottom", errorCoordinates.BottomOption.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs index 697ec54..2f9fdb5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs @@ -1,138 +1,172 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Extended document type info and Regula's 'Information Reference Systems' links /// - [DataContract] - public partial class FDSIDList : IEquatable, IValidatableObject + public partial class FDSIDList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// ICAO code of the issuing country. - /// Document identifiers in 'Information Reference Systems'. - /// dType. - /// dFormat. - /// Flag indicating the presence of MRZ on the document. - /// Document description. - /// Year of publication of the document. - /// Issuing country name. - /// Issuing state code. - /// Issuing state name. - /// Whether the document is deprecated. - public FDSIDList(string iCAOCode = default(string), List list = default(List), int dType = default(int), int dFormat = default(int), bool? dMRZ = default(bool?), string dDescription = default(string), string dYear = default(string), string dCountryName = default(string), string dStateCode = default(string), string dStateName = default(string), bool? isDeprecated = default(bool?)) + /// ICAO code of the issuing country + /// Number of elements in the List + /// Document identifiers in 'Information Reference Systems' + /// dType + /// dFormat + /// Flag indicating the presence of MRZ on the document + /// Year of publication of the document + /// Issuing country name + /// Whether the document is deprecated + /// Document description + /// Issuing state code + /// Issuing state name + [JsonConstructor] + public FDSIDList(string iCAOCode, decimal count, List list, DocumentType dType, DocumentFormat dFormat, bool dMRZ, string dYear, string dCountryName, bool isDeprecated, Option dDescription = default, Option dStateCode = default, Option dStateName = default) { - this.ICAOCode = iCAOCode; - this.List = list; - this.DType = dType; - this.DFormat = dFormat; - this.DMRZ = dMRZ; - this.DDescription = dDescription; - this.DYear = dYear; - this.DCountryName = dCountryName; - this.DStateCode = dStateCode; - this.DStateName = dStateName; - this.IsDeprecated = isDeprecated; + ICAOCode = iCAOCode; + Count = count; + List = list; + DType = dType; + DFormat = dFormat; + DMRZ = dMRZ; + DYear = dYear; + DCountryName = dCountryName; + IsDeprecated = isDeprecated; + DDescriptionOption = dDescription; + DStateCodeOption = dStateCode; + DStateNameOption = dStateName; + OnCreated(); } - + + partial void OnCreated(); + /// - /// ICAO code of the issuing country + /// Gets or Sets DType /// - /// ICAO code of the issuing country - [DataMember(Name="ICAOCode", EmitDefaultValue=false)] - public string ICAOCode { get; set; } + [JsonPropertyName("dType")] + public DocumentType DType { get; set; } /// - /// Document identifiers in 'Information Reference Systems' + /// Gets or Sets DFormat /// - /// Document identifiers in 'Information Reference Systems' - [DataMember(Name="List", EmitDefaultValue=false)] - public List List { get; set; } + [JsonPropertyName("dFormat")] + public DocumentFormat DFormat { get; set; } /// - /// Gets or Sets DType + /// ICAO code of the issuing country /// - [DataMember(Name="dType", EmitDefaultValue=false)] - public int DType { get; set; } + /// ICAO code of the issuing country + [JsonPropertyName("ICAOCode")] + public string ICAOCode { get; set; } /// - /// Gets or Sets DFormat + /// Number of elements in the List /// - [DataMember(Name="dFormat", EmitDefaultValue=false)] - public int DFormat { get; set; } + /// Number of elements in the List + [JsonPropertyName("Count")] + public decimal Count { get; set; } /// - /// Flag indicating the presence of MRZ on the document + /// Document identifiers in 'Information Reference Systems' /// - /// Flag indicating the presence of MRZ on the document - [DataMember(Name="dMRZ", EmitDefaultValue=false)] - public bool? DMRZ { get; set; } + /// Document identifiers in 'Information Reference Systems' + [JsonPropertyName("List")] + public List List { get; set; } /// - /// Document description + /// Flag indicating the presence of MRZ on the document /// - /// Document description - [DataMember(Name="dDescription", EmitDefaultValue=false)] - public string DDescription { get; set; } + /// Flag indicating the presence of MRZ on the document + [JsonPropertyName("dMRZ")] + public bool DMRZ { get; set; } /// /// Year of publication of the document /// /// Year of publication of the document - [DataMember(Name="dYear", EmitDefaultValue=false)] + [JsonPropertyName("dYear")] public string DYear { get; set; } /// /// Issuing country name /// /// Issuing country name - [DataMember(Name="dCountryName", EmitDefaultValue=false)] + [JsonPropertyName("dCountryName")] public string DCountryName { get; set; } + /// + /// Whether the document is deprecated + /// + /// Whether the document is deprecated + [JsonPropertyName("isDeprecated")] + public bool IsDeprecated { get; set; } + + /// + /// Used to track the state of DDescription + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DDescriptionOption { get; private set; } + + /// + /// Document description + /// + /// Document description + [JsonPropertyName("dDescription")] + public string? DDescription { get { return this.DDescriptionOption; } set { this.DDescriptionOption = new(value); } } + + /// + /// Used to track the state of DStateCode + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DStateCodeOption { get; private set; } + /// /// Issuing state code /// /// Issuing state code - [DataMember(Name="dStateCode", EmitDefaultValue=false)] - public string DStateCode { get; set; } + [JsonPropertyName("dStateCode")] + public string? DStateCode { get { return this.DStateCodeOption; } set { this.DStateCodeOption = new(value); } } /// - /// Issuing state name + /// Used to track the state of DStateName /// - /// Issuing state name - [DataMember(Name="dStateName", EmitDefaultValue=false)] - public string DStateName { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DStateNameOption { get; private set; } /// - /// Whether the document is deprecated + /// Issuing state name /// - /// Whether the document is deprecated - [DataMember(Name="isDeprecated", EmitDefaultValue=false)] - public bool? IsDeprecated { get; set; } + /// Issuing state name + [JsonPropertyName("dStateName")] + public string? DStateName { get { return this.DStateNameOption; } set { this.DStateNameOption = new(value); } } /// /// Returns the string presentation of the object @@ -140,167 +174,286 @@ public partial class FDSIDList : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class FDSIDList {\n"); sb.Append(" ICAOCode: ").Append(ICAOCode).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); sb.Append(" DType: ").Append(DType).Append("\n"); sb.Append(" DFormat: ").Append(DFormat).Append("\n"); sb.Append(" DMRZ: ").Append(DMRZ).Append("\n"); - sb.Append(" DDescription: ").Append(DDescription).Append("\n"); sb.Append(" DYear: ").Append(DYear).Append("\n"); sb.Append(" DCountryName: ").Append(DCountryName).Append("\n"); + sb.Append(" IsDeprecated: ").Append(IsDeprecated).Append("\n"); + sb.Append(" DDescription: ").Append(DDescription).Append("\n"); sb.Append(" DStateCode: ").Append(DStateCode).Append("\n"); sb.Append(" DStateName: ").Append(DStateName).Append("\n"); - sb.Append(" IsDeprecated: ").Append(IsDeprecated).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as FDSIDList); + // ICAOCode (string) maxLength + if (this.ICAOCode != null && this.ICAOCode.Length > 3) + { + yield return new ValidationResult("Invalid value for ICAOCode, length must be less than 3.", new [] { "ICAOCode" }); + } + + // ICAOCode (string) minLength + if (this.ICAOCode != null && this.ICAOCode.Length < 3) + { + yield return new ValidationResult("Invalid value for ICAOCode, length must be greater than 3.", new [] { "ICAOCode" }); + } + + yield break; } + } + /// + /// A Json converter for type + /// + public class FDSIDListJsonConverter : JsonConverter + { /// - /// Returns true if FDSIDList instances are equal + /// Deserializes json to /// - /// Instance of FDSIDList to be compared - /// Boolean - public bool Equals(FDSIDList input) + /// + /// + /// + /// + /// + public override FDSIDList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.ICAOCode == input.ICAOCode || - (this.ICAOCode != null && - this.ICAOCode.Equals(input.ICAOCode)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ) && - ( - this.DType == input.DType || - (this.DType != null && - this.DType.Equals(input.DType)) - ) && - ( - this.DFormat == input.DFormat || - (this.DFormat != null && - this.DFormat.Equals(input.DFormat)) - ) && - ( - this.DMRZ == input.DMRZ || - (this.DMRZ != null && - this.DMRZ.Equals(input.DMRZ)) - ) && - ( - this.DDescription == input.DDescription || - (this.DDescription != null && - this.DDescription.Equals(input.DDescription)) - ) && - ( - this.DYear == input.DYear || - (this.DYear != null && - this.DYear.Equals(input.DYear)) - ) && - ( - this.DCountryName == input.DCountryName || - (this.DCountryName != null && - this.DCountryName.Equals(input.DCountryName)) - ) && - ( - this.DStateCode == input.DStateCode || - (this.DStateCode != null && - this.DStateCode.Equals(input.DStateCode)) - ) && - ( - this.DStateName == input.DStateName || - (this.DStateName != null && - this.DStateName.Equals(input.DStateName)) - ) && - ( - this.IsDeprecated == input.IsDeprecated || - (this.IsDeprecated != null && - this.IsDeprecated.Equals(input.IsDeprecated)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option iCAOCode = default; + Option count = default; + Option?> list = default; + Option dType = default; + Option dFormat = default; + Option dMRZ = default; + Option dYear = default; + Option dCountryName = default; + Option isDeprecated = default; + Option dDescription = default; + Option dStateCode = default; + Option dStateName = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ICAOCode": + iCAOCode = new Option(utf8JsonReader.GetString()!); + break; + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetDecimal()); + break; + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "dType": + string? dTypeRawValue = utf8JsonReader.GetString(); + if (dTypeRawValue != null) + dType = new Option(DocumentTypeValueConverter.FromStringOrDefault(dTypeRawValue)); + break; + case "dFormat": + string? dFormatRawValue = utf8JsonReader.GetString(); + if (dFormatRawValue != null) + dFormat = new Option(DocumentFormatValueConverter.FromStringOrDefault(dFormatRawValue)); + break; + case "dMRZ": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + dMRZ = new Option(utf8JsonReader.GetBoolean()); + break; + case "dYear": + dYear = new Option(utf8JsonReader.GetString()!); + break; + case "dCountryName": + dCountryName = new Option(utf8JsonReader.GetString()!); + break; + case "isDeprecated": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + isDeprecated = new Option(utf8JsonReader.GetBoolean()); + break; + case "dDescription": + dDescription = new Option(utf8JsonReader.GetString()!); + break; + case "dStateCode": + dStateCode = new Option(utf8JsonReader.GetString()!); + break; + case "dStateName": + dStateName = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!iCAOCode.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(iCAOCode)); + + if (!count.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(count)); + + if (!list.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(list)); + + if (!dType.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(dType)); + + if (!dFormat.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(dFormat)); + + if (!dMRZ.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(dMRZ)); + + if (!dYear.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(dYear)); + + if (!dCountryName.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(dCountryName)); + + if (!isDeprecated.IsSet) + throw new ArgumentException("Property is required for class FDSIDList.", nameof(isDeprecated)); + + if (iCAOCode.IsSet && iCAOCode.Value == null) + throw new ArgumentNullException(nameof(iCAOCode), "Property is not nullable for class FDSIDList."); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class FDSIDList."); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class FDSIDList."); + + if (dType.IsSet && dType.Value == null) + throw new ArgumentNullException(nameof(dType), "Property is not nullable for class FDSIDList."); + + if (dFormat.IsSet && dFormat.Value == null) + throw new ArgumentNullException(nameof(dFormat), "Property is not nullable for class FDSIDList."); + + if (dMRZ.IsSet && dMRZ.Value == null) + throw new ArgumentNullException(nameof(dMRZ), "Property is not nullable for class FDSIDList."); + + if (dYear.IsSet && dYear.Value == null) + throw new ArgumentNullException(nameof(dYear), "Property is not nullable for class FDSIDList."); + + if (dCountryName.IsSet && dCountryName.Value == null) + throw new ArgumentNullException(nameof(dCountryName), "Property is not nullable for class FDSIDList."); + + if (isDeprecated.IsSet && isDeprecated.Value == null) + throw new ArgumentNullException(nameof(isDeprecated), "Property is not nullable for class FDSIDList."); + + if (dDescription.IsSet && dDescription.Value == null) + throw new ArgumentNullException(nameof(dDescription), "Property is not nullable for class FDSIDList."); + + if (dStateCode.IsSet && dStateCode.Value == null) + throw new ArgumentNullException(nameof(dStateCode), "Property is not nullable for class FDSIDList."); + + if (dStateName.IsSet && dStateName.Value == null) + throw new ArgumentNullException(nameof(dStateName), "Property is not nullable for class FDSIDList."); + + return new FDSIDList(iCAOCode.Value!, count.Value!.Value!, list.Value!, dType.Value!.Value!, dFormat.Value!.Value!, dMRZ.Value!.Value!, dYear.Value!, dCountryName.Value!, isDeprecated.Value!.Value!, dDescription, dStateCode, dStateName); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FDSIDList fDSIDList, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ICAOCode != null) - hashCode = hashCode * 59 + this.ICAOCode.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - if (this.DType != null) - hashCode = hashCode * 59 + this.DType.GetHashCode(); - if (this.DFormat != null) - hashCode = hashCode * 59 + this.DFormat.GetHashCode(); - if (this.DMRZ != null) - hashCode = hashCode * 59 + this.DMRZ.GetHashCode(); - if (this.DDescription != null) - hashCode = hashCode * 59 + this.DDescription.GetHashCode(); - if (this.DYear != null) - hashCode = hashCode * 59 + this.DYear.GetHashCode(); - if (this.DCountryName != null) - hashCode = hashCode * 59 + this.DCountryName.GetHashCode(); - if (this.DStateCode != null) - hashCode = hashCode * 59 + this.DStateCode.GetHashCode(); - if (this.DStateName != null) - hashCode = hashCode * 59 + this.DStateName.GetHashCode(); - if (this.IsDeprecated != null) - hashCode = hashCode * 59 + this.IsDeprecated.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, fDSIDList, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FDSIDList fDSIDList, JsonSerializerOptions jsonSerializerOptions) { - // ICAOCode (string) maxLength - if(this.ICAOCode != null && this.ICAOCode.Length > 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ICAOCode, length must be less than 3.", new [] { "ICAOCode" }); - } + if (fDSIDList.ICAOCode == null) + throw new ArgumentNullException(nameof(fDSIDList.ICAOCode), "Property is required for class FDSIDList."); - // ICAOCode (string) minLength - if(this.ICAOCode != null && this.ICAOCode.Length < 3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for ICAOCode, length must be greater than 3.", new [] { "ICAOCode" }); - } - - yield break; + if (fDSIDList.List == null) + throw new ArgumentNullException(nameof(fDSIDList.List), "Property is required for class FDSIDList."); + + if (fDSIDList.DYear == null) + throw new ArgumentNullException(nameof(fDSIDList.DYear), "Property is required for class FDSIDList."); + + if (fDSIDList.DCountryName == null) + throw new ArgumentNullException(nameof(fDSIDList.DCountryName), "Property is required for class FDSIDList."); + + if (fDSIDList.DDescriptionOption.IsSet && fDSIDList.DDescription == null) + throw new ArgumentNullException(nameof(fDSIDList.DDescription), "Property is required for class FDSIDList."); + + if (fDSIDList.DStateCodeOption.IsSet && fDSIDList.DStateCode == null) + throw new ArgumentNullException(nameof(fDSIDList.DStateCode), "Property is required for class FDSIDList."); + + if (fDSIDList.DStateNameOption.IsSet && fDSIDList.DStateName == null) + throw new ArgumentNullException(nameof(fDSIDList.DStateName), "Property is required for class FDSIDList."); + + writer.WriteString("ICAOCode", fDSIDList.ICAOCode); + + writer.WriteNumber("Count", fDSIDList.Count); + + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, fDSIDList.List, jsonSerializerOptions); + var dTypeRawValue = DocumentTypeValueConverter.ToJsonValue(fDSIDList.DType); + writer.WriteNumber("dType", dTypeRawValue); + + var dFormatRawValue = DocumentFormatValueConverter.ToJsonValue(fDSIDList.DFormat); + writer.WriteNumber("dFormat", dFormatRawValue); + + writer.WriteBoolean("dMRZ", fDSIDList.DMRZ); + + writer.WriteString("dYear", fDSIDList.DYear); + + writer.WriteString("dCountryName", fDSIDList.DCountryName); + + writer.WriteBoolean("isDeprecated", fDSIDList.IsDeprecated); + + if (fDSIDList.DDescriptionOption.IsSet) + writer.WriteString("dDescription", fDSIDList.DDescription); + + if (fDSIDList.DStateCodeOption.IsSet) + writer.WriteString("dStateCode", fDSIDList.DStateCode); + + if (fDSIDList.DStateNameOption.IsSet) + writer.WriteString("dStateName", fDSIDList.DStateName); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs index c38b00f..9a0b1b3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs @@ -1,112 +1,213 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// FaceApi /// - [DataContract] - public partial class FaceApi : IEquatable, IValidatableObject + public partial class FaceApi : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// The URL of the Regula Face Web service to be used.. - /// The processing mode: \"match\" or \"match+search\".. - /// search. - /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not.. - /// The Regula Face Web service requests timeout, ms.. - /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>.. - /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>.. - /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>.. - public FaceApi(string url = default(string), string mode = default(string), FaceApiSearch search = default(FaceApiSearch), int threshold = default(int), int serviceTimeout = default(int), string proxy = default(string), string proxyUserpwd = default(string), int proxyType = default(int)) + /// The URL of the Regula Face Web service to be used. + /// The processing mode: \"match\" or \"match+search\". + /// search + /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. + /// The Regula Face Web service requests timeout, ms. + /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. + /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. + /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. + /// Minimum age of a child, at which portrait comparison result will be effective. Default: 13. + /// Estimated duration of validity for a child's passport, years. Default: 5. + [JsonConstructor] + public FaceApi(Option url = default, Option mode = default, Option search = default, Option threshold = default, Option serviceTimeout = default, Option proxy = default, Option proxyUserpwd = default, Option proxyType = default, Option childAgeThreshold = default, Option childDocValidityYears = default) { - this.Url = url; - this.Mode = mode; - this.Search = search; - this.Threshold = threshold; - this.ServiceTimeout = serviceTimeout; - this.Proxy = proxy; - this.ProxyUserpwd = proxyUserpwd; - this.ProxyType = proxyType; + UrlOption = url; + ModeOption = mode; + SearchOption = search; + ThresholdOption = threshold; + ServiceTimeoutOption = serviceTimeout; + ProxyOption = proxy; + ProxyUserpwdOption = proxyUserpwd; + ProxyTypeOption = proxyType; + ChildAgeThresholdOption = childAgeThreshold; + ChildDocValidityYearsOption = childDocValidityYears; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Url + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UrlOption { get; private set; } + /// /// The URL of the Regula Face Web service to be used. /// /// The URL of the Regula Face Web service to be used. - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } + /* https://faceapi.regulaforensics.com */ + [JsonPropertyName("url")] + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + + /// + /// Used to track the state of Mode + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ModeOption { get; private set; } /// /// The processing mode: \"match\" or \"match+search\". /// /// The processing mode: \"match\" or \"match+search\". - [DataMember(Name="mode", EmitDefaultValue=false)] - public string Mode { get; set; } + /* match */ + [JsonPropertyName("mode")] + public string? Mode { get { return this.ModeOption; } set { this.ModeOption = new(value); } } + + /// + /// Used to track the state of Search + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SearchOption { get; private set; } /// /// Gets or Sets Search /// - [DataMember(Name="search", EmitDefaultValue=false)] - public FaceApiSearch Search { get; set; } + [JsonPropertyName("search")] + public FaceApiSearch? Search { get { return this.SearchOption; } set { this.SearchOption = new(value); } } + + /// + /// Used to track the state of Threshold + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ThresholdOption { get; private set; } /// /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. /// /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. - [DataMember(Name="threshold", EmitDefaultValue=false)] - public int Threshold { get; set; } + /* 75 */ + [JsonPropertyName("threshold")] + public int? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new(value); } } + + /// + /// Used to track the state of ServiceTimeout + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ServiceTimeoutOption { get; private set; } /// /// The Regula Face Web service requests timeout, ms. /// /// The Regula Face Web service requests timeout, ms. - [DataMember(Name="serviceTimeout", EmitDefaultValue=false)] - public int ServiceTimeout { get; set; } + /* 3000 */ + [JsonPropertyName("serviceTimeout")] + public int? ServiceTimeout { get { return this.ServiceTimeoutOption; } set { this.ServiceTimeoutOption = new(value); } } + + /// + /// Used to track the state of Proxy + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ProxyOption { get; private set; } /// /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. /// /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. - [DataMember(Name="proxy", EmitDefaultValue=false)] - public string Proxy { get; set; } + /* http://localhost:8080 */ + [JsonPropertyName("proxy")] + public string? Proxy { get { return this.ProxyOption; } set { this.ProxyOption = new(value); } } + + /// + /// Used to track the state of ProxyUserpwd + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ProxyUserpwdOption { get; private set; } /// /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. /// /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. - [DataMember(Name="proxy_userpwd", EmitDefaultValue=false)] - public string ProxyUserpwd { get; set; } + /* user:pass */ + [JsonPropertyName("proxy_userpwd")] + public string? ProxyUserpwd { get { return this.ProxyUserpwdOption; } set { this.ProxyUserpwdOption = new(value); } } + + /// + /// Used to track the state of ProxyType + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ProxyTypeOption { get; private set; } /// /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. /// /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. - [DataMember(Name="proxy_type", EmitDefaultValue=false)] - public int ProxyType { get; set; } + /* 0 */ + [JsonPropertyName("proxy_type")] + public int? ProxyType { get { return this.ProxyTypeOption; } set { this.ProxyTypeOption = new(value); } } + + /// + /// Used to track the state of ChildAgeThreshold + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ChildAgeThresholdOption { get; private set; } + + /// + /// Minimum age of a child, at which portrait comparison result will be effective. Default: 13. + /// + /// Minimum age of a child, at which portrait comparison result will be effective. Default: 13. + /* 13 */ + [JsonPropertyName("childAgeThreshold")] + public int? ChildAgeThreshold { get { return this.ChildAgeThresholdOption; } set { this.ChildAgeThresholdOption = new(value); } } + + /// + /// Used to track the state of ChildDocValidityYears + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ChildDocValidityYearsOption { get; private set; } + + /// + /// Estimated duration of validity for a child's passport, years. Default: 5. + /// + /// Estimated duration of validity for a child's passport, years. Default: 5. + /* 5 */ + [JsonPropertyName("childDocValidityYears")] + public int? ChildDocValidityYears { get { return this.ChildDocValidityYearsOption; } set { this.ChildDocValidityYearsOption = new(value); } } /// /// Returns the string presentation of the object @@ -114,7 +215,7 @@ public partial class FaceApi : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class FaceApi {\n"); sb.Append(" Url: ").Append(Url).Append("\n"); sb.Append(" Mode: ").Append(Mode).Append("\n"); @@ -124,120 +225,216 @@ public override string ToString() sb.Append(" Proxy: ").Append(Proxy).Append("\n"); sb.Append(" ProxyUserpwd: ").Append(ProxyUserpwd).Append("\n"); sb.Append(" ProxyType: ").Append(ProxyType).Append("\n"); + sb.Append(" ChildAgeThreshold: ").Append(ChildAgeThreshold).Append("\n"); + sb.Append(" ChildDocValidityYears: ").Append(ChildDocValidityYears).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class FaceApiJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override FaceApi Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as FaceApi); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option url = default; + Option mode = default; + Option search = default; + Option threshold = default; + Option serviceTimeout = default; + Option proxy = default; + Option proxyUserpwd = default; + Option proxyType = default; + Option childAgeThreshold = default; + Option childDocValidityYears = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "url": + url = new Option(utf8JsonReader.GetString()!); + break; + case "mode": + mode = new Option(utf8JsonReader.GetString()!); + break; + case "search": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + search = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "threshold": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + threshold = new Option(utf8JsonReader.GetInt32()); + break; + case "serviceTimeout": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + serviceTimeout = new Option(utf8JsonReader.GetInt32()); + break; + case "proxy": + proxy = new Option(utf8JsonReader.GetString()!); + break; + case "proxy_userpwd": + proxyUserpwd = new Option(utf8JsonReader.GetString()!); + break; + case "proxy_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + proxyType = new Option(utf8JsonReader.GetInt32()); + break; + case "childAgeThreshold": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + childAgeThreshold = new Option(utf8JsonReader.GetInt32()); + break; + case "childDocValidityYears": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + childDocValidityYears = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (url.IsSet && url.Value == null) + throw new ArgumentNullException(nameof(url), "Property is not nullable for class FaceApi."); + + if (mode.IsSet && mode.Value == null) + throw new ArgumentNullException(nameof(mode), "Property is not nullable for class FaceApi."); + + if (search.IsSet && search.Value == null) + throw new ArgumentNullException(nameof(search), "Property is not nullable for class FaceApi."); + + if (threshold.IsSet && threshold.Value == null) + throw new ArgumentNullException(nameof(threshold), "Property is not nullable for class FaceApi."); + + if (serviceTimeout.IsSet && serviceTimeout.Value == null) + throw new ArgumentNullException(nameof(serviceTimeout), "Property is not nullable for class FaceApi."); + + if (proxy.IsSet && proxy.Value == null) + throw new ArgumentNullException(nameof(proxy), "Property is not nullable for class FaceApi."); + + if (proxyUserpwd.IsSet && proxyUserpwd.Value == null) + throw new ArgumentNullException(nameof(proxyUserpwd), "Property is not nullable for class FaceApi."); + + if (proxyType.IsSet && proxyType.Value == null) + throw new ArgumentNullException(nameof(proxyType), "Property is not nullable for class FaceApi."); + + if (childAgeThreshold.IsSet && childAgeThreshold.Value == null) + throw new ArgumentNullException(nameof(childAgeThreshold), "Property is not nullable for class FaceApi."); + + if (childDocValidityYears.IsSet && childDocValidityYears.Value == null) + throw new ArgumentNullException(nameof(childDocValidityYears), "Property is not nullable for class FaceApi."); + + return new FaceApi(url, mode, search, threshold, serviceTimeout, proxy, proxyUserpwd, proxyType, childAgeThreshold, childDocValidityYears); } /// - /// Returns true if FaceApi instances are equal + /// Serializes a /// - /// Instance of FaceApi to be compared - /// Boolean - public bool Equals(FaceApi input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FaceApi faceApi, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Mode == input.Mode || - (this.Mode != null && - this.Mode.Equals(input.Mode)) - ) && - ( - this.Search == input.Search || - (this.Search != null && - this.Search.Equals(input.Search)) - ) && - ( - this.Threshold == input.Threshold || - (this.Threshold != null && - this.Threshold.Equals(input.Threshold)) - ) && - ( - this.ServiceTimeout == input.ServiceTimeout || - (this.ServiceTimeout != null && - this.ServiceTimeout.Equals(input.ServiceTimeout)) - ) && - ( - this.Proxy == input.Proxy || - (this.Proxy != null && - this.Proxy.Equals(input.Proxy)) - ) && - ( - this.ProxyUserpwd == input.ProxyUserpwd || - (this.ProxyUserpwd != null && - this.ProxyUserpwd.Equals(input.ProxyUserpwd)) - ) && - ( - this.ProxyType == input.ProxyType || - (this.ProxyType != null && - this.ProxyType.Equals(input.ProxyType)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, faceApi, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FaceApi faceApi, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (faceApi.UrlOption.IsSet && faceApi.Url == null) + throw new ArgumentNullException(nameof(faceApi.Url), "Property is required for class FaceApi."); + + if (faceApi.ModeOption.IsSet && faceApi.Mode == null) + throw new ArgumentNullException(nameof(faceApi.Mode), "Property is required for class FaceApi."); + + if (faceApi.SearchOption.IsSet && faceApi.Search == null) + throw new ArgumentNullException(nameof(faceApi.Search), "Property is required for class FaceApi."); + + if (faceApi.ProxyOption.IsSet && faceApi.Proxy == null) + throw new ArgumentNullException(nameof(faceApi.Proxy), "Property is required for class FaceApi."); + + if (faceApi.ProxyUserpwdOption.IsSet && faceApi.ProxyUserpwd == null) + throw new ArgumentNullException(nameof(faceApi.ProxyUserpwd), "Property is required for class FaceApi."); + + if (faceApi.UrlOption.IsSet) + writer.WriteString("url", faceApi.Url); + + if (faceApi.ModeOption.IsSet) + writer.WriteString("mode", faceApi.Mode); + + if (faceApi.SearchOption.IsSet) { - int hashCode = 41; - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - if (this.Mode != null) - hashCode = hashCode * 59 + this.Mode.GetHashCode(); - if (this.Search != null) - hashCode = hashCode * 59 + this.Search.GetHashCode(); - if (this.Threshold != null) - hashCode = hashCode * 59 + this.Threshold.GetHashCode(); - if (this.ServiceTimeout != null) - hashCode = hashCode * 59 + this.ServiceTimeout.GetHashCode(); - if (this.Proxy != null) - hashCode = hashCode * 59 + this.Proxy.GetHashCode(); - if (this.ProxyUserpwd != null) - hashCode = hashCode * 59 + this.ProxyUserpwd.GetHashCode(); - if (this.ProxyType != null) - hashCode = hashCode * 59 + this.ProxyType.GetHashCode(); - return hashCode; + writer.WritePropertyName("search"); + JsonSerializer.Serialize(writer, faceApi.Search, jsonSerializerOptions); } - } + if (faceApi.ThresholdOption.IsSet) + writer.WriteNumber("threshold", faceApi.ThresholdOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (faceApi.ServiceTimeoutOption.IsSet) + writer.WriteNumber("serviceTimeout", faceApi.ServiceTimeoutOption.Value!.Value); + + if (faceApi.ProxyOption.IsSet) + writer.WriteString("proxy", faceApi.Proxy); + + if (faceApi.ProxyUserpwdOption.IsSet) + writer.WriteString("proxy_userpwd", faceApi.ProxyUserpwd); + + if (faceApi.ProxyTypeOption.IsSet) + writer.WriteNumber("proxy_type", faceApi.ProxyTypeOption.Value!.Value); + + if (faceApi.ChildAgeThresholdOption.IsSet) + writer.WriteNumber("childAgeThreshold", faceApi.ChildAgeThresholdOption.Value!.Value); + + if (faceApi.ChildDocValidityYearsOption.IsSet) + writer.WriteNumber("childDocValidityYears", faceApi.ChildDocValidityYearsOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs index 3c6520f..383ffab 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs @@ -1,68 +1,93 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// A search filter that can be applied if the \"match+search\" mode is enabled. May include limit, threshold, group_ids. If the group_ids are specified, the search is performed only in these groups. Find more information in the <a href=\"https://dev.regulaforensics.com/FaceSDK-web-openapi/#tag/search/operation/search\" target=\"_blank\">OpenAPI documentation</a>. /// - [DataContract] - public partial class FaceApiSearch : IEquatable, IValidatableObject + public partial class FaceApiSearch : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// The maximum number of results to be returned.. - /// The similarity threshold.. - /// The groups where to conduct the search.. - public FaceApiSearch(int limit = default(int), float threshold = default(float), List groupIds = default(List)) + /// The maximum number of results to be returned. + /// The similarity threshold. + /// The groups where to conduct the search. + [JsonConstructor] + public FaceApiSearch(Option limit = default, Option threshold = default, Option?> groupIds = default) { - this.Limit = limit; - this.Threshold = threshold; - this.GroupIds = groupIds; + LimitOption = limit; + ThresholdOption = threshold; + GroupIdsOption = groupIds; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Limit + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LimitOption { get; private set; } + /// /// The maximum number of results to be returned. /// /// The maximum number of results to be returned. - [DataMember(Name="limit", EmitDefaultValue=false)] - public int Limit { get; set; } + [JsonPropertyName("limit")] + public int? Limit { get { return this.LimitOption; } set { this.LimitOption = new(value); } } + + /// + /// Used to track the state of Threshold + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ThresholdOption { get; private set; } /// /// The similarity threshold. /// /// The similarity threshold. - [DataMember(Name="threshold", EmitDefaultValue=false)] - public float Threshold { get; set; } + [JsonPropertyName("threshold")] + public float? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new(value); } } + + /// + /// Used to track the state of GroupIds + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> GroupIdsOption { get; private set; } /// /// The groups where to conduct the search. /// /// The groups where to conduct the search. - [DataMember(Name="group_ids", EmitDefaultValue=false)] - public List GroupIds { get; set; } + [JsonPropertyName("group_ids")] + public List? GroupIds { get { return this.GroupIdsOption; } set { this.GroupIdsOption = new(value); } } /// /// Returns the string presentation of the object @@ -70,7 +95,7 @@ public partial class FaceApiSearch : IEquatable, IValidatableObj /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class FaceApiSearch {\n"); sb.Append(" Limit: ").Append(Limit).Append("\n"); sb.Append(" Threshold: ").Append(Threshold).Append("\n"); @@ -78,83 +103,127 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class FaceApiSearchJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override FaceApiSearch Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as FaceApiSearch); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option limit = default; + Option threshold = default; + Option?> groupIds = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "limit": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + limit = new Option(utf8JsonReader.GetInt32()); + break; + case "threshold": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + threshold = new Option((float)utf8JsonReader.GetDouble()); + break; + case "group_ids": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + groupIds = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (limit.IsSet && limit.Value == null) + throw new ArgumentNullException(nameof(limit), "Property is not nullable for class FaceApiSearch."); + + if (threshold.IsSet && threshold.Value == null) + throw new ArgumentNullException(nameof(threshold), "Property is not nullable for class FaceApiSearch."); + + if (groupIds.IsSet && groupIds.Value == null) + throw new ArgumentNullException(nameof(groupIds), "Property is not nullable for class FaceApiSearch."); + + return new FaceApiSearch(limit, threshold, groupIds); } /// - /// Returns true if FaceApiSearch instances are equal + /// Serializes a /// - /// Instance of FaceApiSearch to be compared - /// Boolean - public bool Equals(FaceApiSearch input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FaceApiSearch faceApiSearch, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Limit == input.Limit || - (this.Limit != null && - this.Limit.Equals(input.Limit)) - ) && - ( - this.Threshold == input.Threshold || - (this.Threshold != null && - this.Threshold.Equals(input.Threshold)) - ) && - ( - this.GroupIds == input.GroupIds || - this.GroupIds != null && - input.GroupIds != null && - this.GroupIds.SequenceEqual(input.GroupIds) - ); + writer.WriteStartObject(); + + WriteProperties(writer, faceApiSearch, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FaceApiSearch faceApiSearch, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (faceApiSearch.GroupIdsOption.IsSet && faceApiSearch.GroupIds == null) + throw new ArgumentNullException(nameof(faceApiSearch.GroupIds), "Property is required for class FaceApiSearch."); + + if (faceApiSearch.LimitOption.IsSet) + writer.WriteNumber("limit", faceApiSearch.LimitOption.Value!.Value); + + if (faceApiSearch.ThresholdOption.IsSet) + writer.WriteNumber("threshold", faceApiSearch.ThresholdOption.Value!.Value); + + if (faceApiSearch.GroupIdsOption.IsSet) { - int hashCode = 41; - if (this.Limit != null) - hashCode = hashCode * 59 + this.Limit.GetHashCode(); - if (this.Threshold != null) - hashCode = hashCode * 59 + this.Threshold.GetHashCode(); - if (this.GroupIds != null) - hashCode = hashCode * 59 + this.GroupIds.GetHashCode(); - return hashCode; + writer.WritePropertyName("group_ids"); + JsonSerializer.Serialize(writer, faceApiSearch.GroupIds, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs new file mode 100644 index 0000000..8c4e7f7 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs @@ -0,0 +1,262 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// FaceDetection + /// + public partial class FaceDetection : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// count + /// countFalseDetection + /// res + /// reserved1 + /// reserved2 + [JsonConstructor] + public FaceDetection(int count, int countFalseDetection, List res, Option reserved1 = default, Option reserved2 = default) + { + Count = count; + CountFalseDetection = countFalseDetection; + Res = res; + Reserved1Option = reserved1; + Reserved2Option = reserved2; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Count + /// + [JsonPropertyName("Count")] + public int Count { get; set; } + + /// + /// Gets or Sets CountFalseDetection + /// + [JsonPropertyName("CountFalseDetection")] + public int CountFalseDetection { get; set; } + + /// + /// Gets or Sets Res + /// + [JsonPropertyName("Res")] + public List Res { get; set; } + + /// + /// Used to track the state of Reserved1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved1Option { get; private set; } + + /// + /// Gets or Sets Reserved1 + /// + [JsonPropertyName("Reserved1")] + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + + /// + /// Used to track the state of Reserved2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved2Option { get; private set; } + + /// + /// Gets or Sets Reserved2 + /// + [JsonPropertyName("Reserved2")] + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaceDetection {\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" CountFalseDetection: ").Append(CountFalseDetection).Append("\n"); + sb.Append(" Res: ").Append(Res).Append("\n"); + sb.Append(" Reserved1: ").Append(Reserved1).Append("\n"); + sb.Append(" Reserved2: ").Append(Reserved2).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class FaceDetectionJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override FaceDetection Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option count = default; + Option countFalseDetection = default; + Option?> res = default; + Option reserved1 = default; + Option reserved2 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetInt32()); + break; + case "CountFalseDetection": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + countFalseDetection = new Option(utf8JsonReader.GetInt32()); + break; + case "Res": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + res = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Reserved1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved1 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!count.IsSet) + throw new ArgumentException("Property is required for class FaceDetection.", nameof(count)); + + if (!countFalseDetection.IsSet) + throw new ArgumentException("Property is required for class FaceDetection.", nameof(countFalseDetection)); + + if (!res.IsSet) + throw new ArgumentException("Property is required for class FaceDetection.", nameof(res)); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class FaceDetection."); + + if (countFalseDetection.IsSet && countFalseDetection.Value == null) + throw new ArgumentNullException(nameof(countFalseDetection), "Property is not nullable for class FaceDetection."); + + if (res.IsSet && res.Value == null) + throw new ArgumentNullException(nameof(res), "Property is not nullable for class FaceDetection."); + + if (reserved1.IsSet && reserved1.Value == null) + throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class FaceDetection."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class FaceDetection."); + + return new FaceDetection(count.Value!.Value!, countFalseDetection.Value!.Value!, res.Value!, reserved1, reserved2); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FaceDetection faceDetection, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, faceDetection, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FaceDetection faceDetection, JsonSerializerOptions jsonSerializerOptions) + { + if (faceDetection.Res == null) + throw new ArgumentNullException(nameof(faceDetection.Res), "Property is required for class FaceDetection."); + + writer.WriteNumber("Count", faceDetection.Count); + + writer.WriteNumber("CountFalseDetection", faceDetection.CountFalseDetection); + + writer.WritePropertyName("Res"); + JsonSerializer.Serialize(writer, faceDetection.Res, jsonSerializerOptions); + if (faceDetection.Reserved1Option.IsSet) + writer.WriteNumber("Reserved1", faceDetection.Reserved1Option.Value!.Value); + + if (faceDetection.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", faceDetection.Reserved2Option.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs new file mode 100644 index 0000000..1f3c497 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// FaceDetectionItem + /// + public partial class FaceDetectionItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// faceDetection + [JsonConstructor] + public FaceDetectionItem(FaceDetection faceDetection) + { + FaceDetection = faceDetection; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets FaceDetection + /// + [JsonPropertyName("FaceDetection")] + public FaceDetection FaceDetection { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaceDetectionItem {\n"); + sb.Append(" FaceDetection: ").Append(FaceDetection).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class FaceDetectionItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override FaceDetectionItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option faceDetection = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FaceDetection": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + faceDetection = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!faceDetection.IsSet) + throw new ArgumentException("Property is required for class FaceDetectionItem.", nameof(faceDetection)); + + if (faceDetection.IsSet && faceDetection.Value == null) + throw new ArgumentNullException(nameof(faceDetection), "Property is not nullable for class FaceDetectionItem."); + + return new FaceDetectionItem(faceDetection.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FaceDetectionItem faceDetectionItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, faceDetectionItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FaceDetectionItem faceDetectionItem, JsonSerializerOptions jsonSerializerOptions) + { + if (faceDetectionItem.FaceDetection == null) + throw new ArgumentNullException(nameof(faceDetectionItem.FaceDetection), "Property is required for class FaceDetectionItem."); + + writer.WritePropertyName("FaceDetection"); + JsonSerializer.Serialize(writer, faceDetectionItem.FaceDetection, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs new file mode 100644 index 0000000..fc1c3b2 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs @@ -0,0 +1,216 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// FaceDetectionResult + /// + public partial class FaceDetectionResult : ResultItem, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// faceDetection + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public FaceDetectionResult(FaceDetection faceDetection, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + { + FaceDetection = faceDetection; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets FaceDetection + /// + [JsonPropertyName("FaceDetection")] + public FaceDetection FaceDetection { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaceDetectionResult {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" FaceDetection: ").Append(FaceDetection).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class FaceDetectionResultJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override FaceDetectionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option faceDetection = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FaceDetection": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + faceDetection = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!faceDetection.IsSet) + throw new ArgumentException("Property is required for class FaceDetectionResult.", nameof(faceDetection)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class FaceDetectionResult.", nameof(resultType)); + + if (faceDetection.IsSet && faceDetection.Value == null) + throw new ArgumentNullException(nameof(faceDetection), "Property is not nullable for class FaceDetectionResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class FaceDetectionResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class FaceDetectionResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class FaceDetectionResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class FaceDetectionResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class FaceDetectionResult."); + + return new FaceDetectionResult(faceDetection.Value!, bufLength, light, listIdx, pageIdx); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FaceDetectionResult faceDetectionResult, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, faceDetectionResult, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FaceDetectionResult faceDetectionResult, JsonSerializerOptions jsonSerializerOptions) + { + if (faceDetectionResult.FaceDetection == null) + throw new ArgumentNullException(nameof(faceDetectionResult.FaceDetection), "Property is required for class FaceDetectionResult."); + + writer.WritePropertyName("FaceDetection"); + JsonSerializer.Serialize(writer, faceDetectionResult.FaceDetection, jsonSerializerOptions); + if (faceDetectionResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", faceDetectionResult.BufLengthOption.Value!.Value); + + if (faceDetectionResult.LightOption.IsSet) + writer.WriteNumber("light", faceDetectionResult.LightOption.Value!.Value); + + if (faceDetectionResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", faceDetectionResult.ListIdxOption.Value!.Value); + + if (faceDetectionResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", faceDetectionResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", faceDetectionResult.ResultType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs b/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs new file mode 100644 index 0000000..49814f2 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs @@ -0,0 +1,326 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// FaceItem + /// + public partial class FaceItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// coincidenceToPhotoArea + /// faceRect + /// fieldRect + /// graphFieldNumber + /// landmarks + /// lightType + /// orientation + /// probability + [JsonConstructor] + public FaceItem(int coincidenceToPhotoArea, RectangleCoordinates faceRect, RectangleCoordinates fieldRect, int graphFieldNumber, List landmarks, Light lightType, int orientation, int probability) + { + CoincidenceToPhotoArea = coincidenceToPhotoArea; + FaceRect = faceRect; + FieldRect = fieldRect; + GraphFieldNumber = graphFieldNumber; + Landmarks = landmarks; + LightType = lightType; + Orientation = orientation; + Probability = probability; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets LightType + /// + [JsonPropertyName("LightType")] + public Light LightType { get; set; } + + /// + /// Gets or Sets CoincidenceToPhotoArea + /// + [JsonPropertyName("CoincidenceToPhotoArea")] + public int CoincidenceToPhotoArea { get; set; } + + /// + /// Gets or Sets FaceRect + /// + [JsonPropertyName("FaceRect")] + public RectangleCoordinates FaceRect { get; set; } + + /// + /// Gets or Sets FieldRect + /// + [JsonPropertyName("FieldRect")] + public RectangleCoordinates FieldRect { get; set; } + + /// + /// Gets or Sets GraphFieldNumber + /// + [JsonPropertyName("GraphFieldNumber")] + public int GraphFieldNumber { get; set; } + + /// + /// Gets or Sets Landmarks + /// + [JsonPropertyName("Landmarks")] + public List Landmarks { get; set; } + + /// + /// Gets or Sets Orientation + /// + [JsonPropertyName("Orientation")] + public int Orientation { get; set; } + + /// + /// Gets or Sets Probability + /// + [JsonPropertyName("Probability")] + public int Probability { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FaceItem {\n"); + sb.Append(" CoincidenceToPhotoArea: ").Append(CoincidenceToPhotoArea).Append("\n"); + sb.Append(" FaceRect: ").Append(FaceRect).Append("\n"); + sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); + sb.Append(" GraphFieldNumber: ").Append(GraphFieldNumber).Append("\n"); + sb.Append(" Landmarks: ").Append(Landmarks).Append("\n"); + sb.Append(" LightType: ").Append(LightType).Append("\n"); + sb.Append(" Orientation: ").Append(Orientation).Append("\n"); + sb.Append(" Probability: ").Append(Probability).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class FaceItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override FaceItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option coincidenceToPhotoArea = default; + Option faceRect = default; + Option fieldRect = default; + Option graphFieldNumber = default; + Option?> landmarks = default; + Option lightType = default; + Option orientation = default; + Option probability = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "CoincidenceToPhotoArea": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + coincidenceToPhotoArea = new Option(utf8JsonReader.GetInt32()); + break; + case "FaceRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + faceRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "FieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "GraphFieldNumber": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + graphFieldNumber = new Option(utf8JsonReader.GetInt32()); + break; + case "Landmarks": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + landmarks = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "LightType": + string? lightTypeRawValue = utf8JsonReader.GetString(); + if (lightTypeRawValue != null) + lightType = new Option(LightValueConverter.FromStringOrDefault(lightTypeRawValue)); + break; + case "Orientation": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + orientation = new Option(utf8JsonReader.GetInt32()); + break; + case "Probability": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + probability = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!coincidenceToPhotoArea.IsSet) + throw new ArgumentException("Property is required for class FaceItem.", nameof(coincidenceToPhotoArea)); + + if (!faceRect.IsSet) + throw new ArgumentException("Property is required for class FaceItem.", nameof(faceRect)); + + if (!fieldRect.IsSet) + throw new ArgumentException("Property is required for class FaceItem.", nameof(fieldRect)); + + if (!graphFieldNumber.IsSet) + throw new ArgumentException("Property is required for class FaceItem.", nameof(graphFieldNumber)); + + if (!landmarks.IsSet) + throw new ArgumentException("Property is required for class FaceItem.", nameof(landmarks)); + + if (!lightType.IsSet) + throw new ArgumentException("Property is required for class FaceItem.", nameof(lightType)); + + if (!orientation.IsSet) + throw new ArgumentException("Property is required for class FaceItem.", nameof(orientation)); + + if (!probability.IsSet) + throw new ArgumentException("Property is required for class FaceItem.", nameof(probability)); + + if (coincidenceToPhotoArea.IsSet && coincidenceToPhotoArea.Value == null) + throw new ArgumentNullException(nameof(coincidenceToPhotoArea), "Property is not nullable for class FaceItem."); + + if (faceRect.IsSet && faceRect.Value == null) + throw new ArgumentNullException(nameof(faceRect), "Property is not nullable for class FaceItem."); + + if (fieldRect.IsSet && fieldRect.Value == null) + throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class FaceItem."); + + if (graphFieldNumber.IsSet && graphFieldNumber.Value == null) + throw new ArgumentNullException(nameof(graphFieldNumber), "Property is not nullable for class FaceItem."); + + if (landmarks.IsSet && landmarks.Value == null) + throw new ArgumentNullException(nameof(landmarks), "Property is not nullable for class FaceItem."); + + if (lightType.IsSet && lightType.Value == null) + throw new ArgumentNullException(nameof(lightType), "Property is not nullable for class FaceItem."); + + if (orientation.IsSet && orientation.Value == null) + throw new ArgumentNullException(nameof(orientation), "Property is not nullable for class FaceItem."); + + if (probability.IsSet && probability.Value == null) + throw new ArgumentNullException(nameof(probability), "Property is not nullable for class FaceItem."); + + return new FaceItem(coincidenceToPhotoArea.Value!.Value!, faceRect.Value!, fieldRect.Value!, graphFieldNumber.Value!.Value!, landmarks.Value!, lightType.Value!.Value!, orientation.Value!.Value!, probability.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FaceItem faceItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, faceItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FaceItem faceItem, JsonSerializerOptions jsonSerializerOptions) + { + if (faceItem.FaceRect == null) + throw new ArgumentNullException(nameof(faceItem.FaceRect), "Property is required for class FaceItem."); + + if (faceItem.FieldRect == null) + throw new ArgumentNullException(nameof(faceItem.FieldRect), "Property is required for class FaceItem."); + + if (faceItem.Landmarks == null) + throw new ArgumentNullException(nameof(faceItem.Landmarks), "Property is required for class FaceItem."); + + writer.WriteNumber("CoincidenceToPhotoArea", faceItem.CoincidenceToPhotoArea); + + writer.WritePropertyName("FaceRect"); + JsonSerializer.Serialize(writer, faceItem.FaceRect, jsonSerializerOptions); + writer.WritePropertyName("FieldRect"); + JsonSerializer.Serialize(writer, faceItem.FieldRect, jsonSerializerOptions); + writer.WriteNumber("GraphFieldNumber", faceItem.GraphFieldNumber); + + writer.WritePropertyName("Landmarks"); + JsonSerializer.Serialize(writer, faceItem.Landmarks, jsonSerializerOptions); + var lightTypeRawValue = LightValueConverter.ToJsonValue(faceItem.LightType); + writer.WriteNumber("LightType", lightTypeRawValue); + + writer.WriteNumber("Orientation", faceItem.Orientation); + + writer.WriteNumber("Probability", faceItem.Probability); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs new file mode 100644 index 0000000..01c92bb --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs @@ -0,0 +1,374 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// FiberItem + /// + public partial class FiberItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// For UV_Fibers authenticity result type + /// Expected fibers number. For UV_Fibers authentication result type + /// Coordinates of located areas for defined fibers type + /// Fibers width value for located areas (in pixels) + /// Fibers length value for located areas (in pixels) + /// Fibers value for areas (in pixels) + /// Fibers color value + /// lightValue + /// For UV_Background authentication result type + [JsonConstructor] + public FiberItem(int rectCount, int expectedCount, List rectArray, List width, List length, List area, List colorValues, Option lightValue = default, Option lightDisp = default) + { + RectCount = rectCount; + ExpectedCount = expectedCount; + RectArray = rectArray; + Width = width; + Length = length; + Area = area; + ColorValues = colorValues; + LightValueOption = lightValue; + LightDispOption = lightDisp; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Used to track the state of LightValue + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LightValueOption { get; private set; } + + /// + /// Gets or Sets LightValue + /// + [JsonPropertyName("LightValue")] + public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new(value); } } + + /// + /// For UV_Fibers authenticity result type + /// + /// For UV_Fibers authenticity result type + [JsonPropertyName("RectCount")] + public int RectCount { get; set; } + + /// + /// Expected fibers number. For UV_Fibers authentication result type + /// + /// Expected fibers number. For UV_Fibers authentication result type + [JsonPropertyName("ExpectedCount")] + public int ExpectedCount { get; set; } + + /// + /// Coordinates of located areas for defined fibers type + /// + /// Coordinates of located areas for defined fibers type + [JsonPropertyName("RectArray")] + public List RectArray { get; set; } + + /// + /// Fibers width value for located areas (in pixels) + /// + /// Fibers width value for located areas (in pixels) + [JsonPropertyName("Width")] + public List Width { get; set; } + + /// + /// Fibers length value for located areas (in pixels) + /// + /// Fibers length value for located areas (in pixels) + [JsonPropertyName("Length")] + public List Length { get; set; } + + /// + /// Fibers value for areas (in pixels) + /// + /// Fibers value for areas (in pixels) + [JsonPropertyName("Area")] + public List Area { get; set; } + + /// + /// Fibers color value + /// + /// Fibers color value + /* ["BLUE","GREEN","RED"] */ + [JsonPropertyName("ColorValues")] + public List ColorValues { get; set; } + + /// + /// Used to track the state of LightDisp + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LightDispOption { get; private set; } + + /// + /// For UV_Background authentication result type + /// + /// For UV_Background authentication result type + [JsonPropertyName("LightDisp")] + public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FiberItem {\n"); + sb.Append(" RectCount: ").Append(RectCount).Append("\n"); + sb.Append(" ExpectedCount: ").Append(ExpectedCount).Append("\n"); + sb.Append(" RectArray: ").Append(RectArray).Append("\n"); + sb.Append(" Width: ").Append(Width).Append("\n"); + sb.Append(" Length: ").Append(Length).Append("\n"); + sb.Append(" Area: ").Append(Area).Append("\n"); + sb.Append(" ColorValues: ").Append(ColorValues).Append("\n"); + sb.Append(" LightValue: ").Append(LightValue).Append("\n"); + sb.Append(" LightDisp: ").Append(LightDisp).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class FiberItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override FiberItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option rectCount = default; + Option expectedCount = default; + Option?> rectArray = default; + Option?> width = default; + Option?> length = default; + Option?> area = default; + Option?> colorValues = default; + Option lightValue = default; + Option lightDisp = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RectCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rectCount = new Option(utf8JsonReader.GetInt32()); + break; + case "ExpectedCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + expectedCount = new Option(utf8JsonReader.GetInt32()); + break; + case "RectArray": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rectArray = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Width": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + width = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + length = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Area": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + area = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "ColorValues": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + colorValues = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "LightValue": + string? lightValueRawValue = utf8JsonReader.GetString(); + if (lightValueRawValue != null) + lightValue = new Option(LightValueConverter.FromStringOrDefault(lightValueRawValue)); + break; + case "LightDisp": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + lightDisp = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!rectCount.IsSet) + throw new ArgumentException("Property is required for class FiberItem.", nameof(rectCount)); + + if (!expectedCount.IsSet) + throw new ArgumentException("Property is required for class FiberItem.", nameof(expectedCount)); + + if (!rectArray.IsSet) + throw new ArgumentException("Property is required for class FiberItem.", nameof(rectArray)); + + if (!width.IsSet) + throw new ArgumentException("Property is required for class FiberItem.", nameof(width)); + + if (!length.IsSet) + throw new ArgumentException("Property is required for class FiberItem.", nameof(length)); + + if (!area.IsSet) + throw new ArgumentException("Property is required for class FiberItem.", nameof(area)); + + if (!colorValues.IsSet) + throw new ArgumentException("Property is required for class FiberItem.", nameof(colorValues)); + + if (rectCount.IsSet && rectCount.Value == null) + throw new ArgumentNullException(nameof(rectCount), "Property is not nullable for class FiberItem."); + + if (expectedCount.IsSet && expectedCount.Value == null) + throw new ArgumentNullException(nameof(expectedCount), "Property is not nullable for class FiberItem."); + + if (rectArray.IsSet && rectArray.Value == null) + throw new ArgumentNullException(nameof(rectArray), "Property is not nullable for class FiberItem."); + + if (width.IsSet && width.Value == null) + throw new ArgumentNullException(nameof(width), "Property is not nullable for class FiberItem."); + + if (length.IsSet && length.Value == null) + throw new ArgumentNullException(nameof(length), "Property is not nullable for class FiberItem."); + + if (area.IsSet && area.Value == null) + throw new ArgumentNullException(nameof(area), "Property is not nullable for class FiberItem."); + + if (colorValues.IsSet && colorValues.Value == null) + throw new ArgumentNullException(nameof(colorValues), "Property is not nullable for class FiberItem."); + + if (lightValue.IsSet && lightValue.Value == null) + throw new ArgumentNullException(nameof(lightValue), "Property is not nullable for class FiberItem."); + + if (lightDisp.IsSet && lightDisp.Value == null) + throw new ArgumentNullException(nameof(lightDisp), "Property is not nullable for class FiberItem."); + + return new FiberItem(rectCount.Value!.Value!, expectedCount.Value!.Value!, rectArray.Value!, width.Value!, length.Value!, area.Value!, colorValues.Value!, lightValue, lightDisp); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FiberItem fiberItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, fiberItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FiberItem fiberItem, JsonSerializerOptions jsonSerializerOptions) + { + if (fiberItem.RectArray == null) + throw new ArgumentNullException(nameof(fiberItem.RectArray), "Property is required for class FiberItem."); + + if (fiberItem.Width == null) + throw new ArgumentNullException(nameof(fiberItem.Width), "Property is required for class FiberItem."); + + if (fiberItem.Length == null) + throw new ArgumentNullException(nameof(fiberItem.Length), "Property is required for class FiberItem."); + + if (fiberItem.Area == null) + throw new ArgumentNullException(nameof(fiberItem.Area), "Property is required for class FiberItem."); + + if (fiberItem.ColorValues == null) + throw new ArgumentNullException(nameof(fiberItem.ColorValues), "Property is required for class FiberItem."); + + writer.WriteNumber("RectCount", fiberItem.RectCount); + + writer.WriteNumber("ExpectedCount", fiberItem.ExpectedCount); + + writer.WritePropertyName("RectArray"); + JsonSerializer.Serialize(writer, fiberItem.RectArray, jsonSerializerOptions); + writer.WritePropertyName("Width"); + JsonSerializer.Serialize(writer, fiberItem.Width, jsonSerializerOptions); + writer.WritePropertyName("Length"); + JsonSerializer.Serialize(writer, fiberItem.Length, jsonSerializerOptions); + writer.WritePropertyName("Area"); + JsonSerializer.Serialize(writer, fiberItem.Area, jsonSerializerOptions); + writer.WritePropertyName("ColorValues"); + JsonSerializer.Serialize(writer, fiberItem.ColorValues, jsonSerializerOptions); + if (fiberItem.LightValueOption.IsSet) + { + var lightValueRawValue = LightValueConverter.ToJsonValue(fiberItem.LightValue!.Value); + writer.WriteNumber("LightValue", lightValueRawValue); + } + if (fiberItem.LightDispOption.IsSet) + writer.WriteNumber("LightDisp", fiberItem.LightDispOption.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs index 28e5056..6c5ecd4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs @@ -1,272 +1,420 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// FiberResult /// - [DataContract] - public partial class FiberResult : AuthenticityCheckResultItem, IEquatable, IValidatableObject + public partial class FiberResult : AuthenticityCheckResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected FiberResult() { } - /// - /// Initializes a new instance of the class. - /// - /// For UV_Fibers authenticity result type. - /// Expected fibers number. For UV_Fibers authentication result type. - /// lightValue. - /// For UV_Background authentication result type. - /// Coordinates of located areas for defined fibers type. - /// Fibers width value for located areas (in pixels). - /// Fibers length value for located areas (in pixels). - /// Fibers value for areas (in pixels). - /// Fibers color value. - public FiberResult(int rectCount = default(int), int expectedCount = default(int), int lightValue = default(int), int lightDisp = default(int), List rectArray = default(List), List width = default(List), List length = default(List), List area = default(List), List colorValues = default(List), int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + /// For UV_Fibers authenticity result type + /// Expected fibers number. For UV_Fibers authentication result type + /// Coordinates of located areas for defined fibers type + /// Fibers width value for located areas (in pixels) + /// Fibers length value for located areas (in pixels) + /// Fibers value for areas (in pixels) + /// Fibers color value + /// elementResult + /// elementDiagnose + /// percentValue + /// lightValue + /// For UV_Background authentication result type + [JsonConstructor] + public FiberResult(int rectCount, int expectedCount, List rectArray, List width, List length, List area, List colorValues, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option lightValue = default, Option lightDisp = default) : base(elementResult, elementDiagnose, percentValue) { - this.RectCount = rectCount; - this.ExpectedCount = expectedCount; - this.LightValue = lightValue; - this.LightDisp = lightDisp; - this.RectArray = rectArray; - this.Width = width; - this.Length = length; - this.Area = area; - this.ColorValues = colorValues; + RectCount = rectCount; + ExpectedCount = expectedCount; + RectArray = rectArray; + Width = width; + Length = length; + Area = area; + ColorValues = colorValues; + LightValueOption = lightValue; + LightDispOption = lightDisp; + OnCreated(); } - + + partial void OnCreated(); + /// - /// For UV_Fibers authenticity result type + /// Used to track the state of LightValue /// - /// For UV_Fibers authenticity result type - [DataMember(Name="RectCount", EmitDefaultValue=false)] - public int RectCount { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LightValueOption { get; private set; } /// - /// Expected fibers number. For UV_Fibers authentication result type + /// Gets or Sets LightValue /// - /// Expected fibers number. For UV_Fibers authentication result type - [DataMember(Name="ExpectedCount", EmitDefaultValue=false)] - public int ExpectedCount { get; set; } + [JsonPropertyName("LightValue")] + public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new(value); } } /// - /// Gets or Sets LightValue + /// For UV_Fibers authenticity result type /// - [DataMember(Name="LightValue", EmitDefaultValue=false)] - public int LightValue { get; set; } + /// For UV_Fibers authenticity result type + [JsonPropertyName("RectCount")] + public int RectCount { get; set; } /// - /// For UV_Background authentication result type + /// Expected fibers number. For UV_Fibers authentication result type /// - /// For UV_Background authentication result type - [DataMember(Name="LightDisp", EmitDefaultValue=false)] - public int LightDisp { get; set; } + /// Expected fibers number. For UV_Fibers authentication result type + [JsonPropertyName("ExpectedCount")] + public int ExpectedCount { get; set; } /// /// Coordinates of located areas for defined fibers type /// /// Coordinates of located areas for defined fibers type - [DataMember(Name="RectArray", EmitDefaultValue=false)] + [JsonPropertyName("RectArray")] public List RectArray { get; set; } /// /// Fibers width value for located areas (in pixels) /// /// Fibers width value for located areas (in pixels) - [DataMember(Name="Width", EmitDefaultValue=false)] + [JsonPropertyName("Width")] public List Width { get; set; } /// /// Fibers length value for located areas (in pixels) /// /// Fibers length value for located areas (in pixels) - [DataMember(Name="Length", EmitDefaultValue=false)] + [JsonPropertyName("Length")] public List Length { get; set; } /// /// Fibers value for areas (in pixels) /// /// Fibers value for areas (in pixels) - [DataMember(Name="Area", EmitDefaultValue=false)] + [JsonPropertyName("Area")] public List Area { get; set; } /// /// Fibers color value /// /// Fibers color value - [DataMember(Name="ColorValues", EmitDefaultValue=false)] + /* [BLUE, GREEN, RED] */ + [JsonPropertyName("ColorValues")] public List ColorValues { get; set; } + /// + /// Used to track the state of LightDisp + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LightDispOption { get; private set; } + + /// + /// For UV_Background authentication result type + /// + /// For UV_Background authentication result type + [JsonPropertyName("LightDisp")] + public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class FiberResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" RectCount: ").Append(RectCount).Append("\n"); sb.Append(" ExpectedCount: ").Append(ExpectedCount).Append("\n"); - sb.Append(" LightValue: ").Append(LightValue).Append("\n"); - sb.Append(" LightDisp: ").Append(LightDisp).Append("\n"); sb.Append(" RectArray: ").Append(RectArray).Append("\n"); sb.Append(" Width: ").Append(Width).Append("\n"); sb.Append(" Length: ").Append(Length).Append("\n"); sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" ColorValues: ").Append(ColorValues).Append("\n"); + sb.Append(" LightValue: ").Append(LightValue).Append("\n"); + sb.Append(" LightDisp: ").Append(LightDisp).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class FiberResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override FiberResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as FiberResult); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option rectCount = default; + Option expectedCount = default; + Option?> rectArray = default; + Option?> width = default; + Option?> length = default; + Option?> area = default; + Option?> colorValues = default; + Option type = default; + Option elementResult = default; + Option elementDiagnose = default; + Option percentValue = default; + Option lightValue = default; + Option lightDisp = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RectCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rectCount = new Option(utf8JsonReader.GetInt32()); + break; + case "ExpectedCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + expectedCount = new Option(utf8JsonReader.GetInt32()); + break; + case "RectArray": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rectArray = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Width": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + width = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + length = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Area": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + area = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "ColorValues": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + colorValues = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + case "ElementResult": + string? elementResultRawValue = utf8JsonReader.GetString(); + if (elementResultRawValue != null) + elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); + break; + case "ElementDiagnose": + string? elementDiagnoseRawValue = utf8JsonReader.GetString(); + if (elementDiagnoseRawValue != null) + elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); + break; + case "PercentValue": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + percentValue = new Option(utf8JsonReader.GetInt32()); + break; + case "LightValue": + string? lightValueRawValue = utf8JsonReader.GetString(); + if (lightValueRawValue != null) + lightValue = new Option(LightValueConverter.FromStringOrDefault(lightValueRawValue)); + break; + case "LightDisp": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + lightDisp = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!rectCount.IsSet) + throw new ArgumentException("Property is required for class FiberResult.", nameof(rectCount)); + + if (!expectedCount.IsSet) + throw new ArgumentException("Property is required for class FiberResult.", nameof(expectedCount)); + + if (!rectArray.IsSet) + throw new ArgumentException("Property is required for class FiberResult.", nameof(rectArray)); + + if (!width.IsSet) + throw new ArgumentException("Property is required for class FiberResult.", nameof(width)); + + if (!length.IsSet) + throw new ArgumentException("Property is required for class FiberResult.", nameof(length)); + + if (!area.IsSet) + throw new ArgumentException("Property is required for class FiberResult.", nameof(area)); + + if (!colorValues.IsSet) + throw new ArgumentException("Property is required for class FiberResult.", nameof(colorValues)); + + if (!type.IsSet) + throw new ArgumentException("Property is required for class FiberResult.", nameof(type)); + + if (rectCount.IsSet && rectCount.Value == null) + throw new ArgumentNullException(nameof(rectCount), "Property is not nullable for class FiberResult."); + + if (expectedCount.IsSet && expectedCount.Value == null) + throw new ArgumentNullException(nameof(expectedCount), "Property is not nullable for class FiberResult."); + + if (rectArray.IsSet && rectArray.Value == null) + throw new ArgumentNullException(nameof(rectArray), "Property is not nullable for class FiberResult."); + + if (width.IsSet && width.Value == null) + throw new ArgumentNullException(nameof(width), "Property is not nullable for class FiberResult."); + + if (length.IsSet && length.Value == null) + throw new ArgumentNullException(nameof(length), "Property is not nullable for class FiberResult."); + + if (area.IsSet && area.Value == null) + throw new ArgumentNullException(nameof(area), "Property is not nullable for class FiberResult."); + + if (colorValues.IsSet && colorValues.Value == null) + throw new ArgumentNullException(nameof(colorValues), "Property is not nullable for class FiberResult."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class FiberResult."); + + if (elementResult.IsSet && elementResult.Value == null) + throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class FiberResult."); + + if (elementDiagnose.IsSet && elementDiagnose.Value == null) + throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class FiberResult."); + + if (percentValue.IsSet && percentValue.Value == null) + throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class FiberResult."); + + if (lightValue.IsSet && lightValue.Value == null) + throw new ArgumentNullException(nameof(lightValue), "Property is not nullable for class FiberResult."); + + if (lightDisp.IsSet && lightDisp.Value == null) + throw new ArgumentNullException(nameof(lightDisp), "Property is not nullable for class FiberResult."); + + return new FiberResult(rectCount.Value!.Value!, expectedCount.Value!.Value!, rectArray.Value!, width.Value!, length.Value!, area.Value!, colorValues.Value!, elementResult, elementDiagnose, percentValue, lightValue, lightDisp); } /// - /// Returns true if FiberResult instances are equal + /// Serializes a /// - /// Instance of FiberResult to be compared - /// Boolean - public bool Equals(FiberResult input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FiberResult fiberResult, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.RectCount == input.RectCount || - (this.RectCount != null && - this.RectCount.Equals(input.RectCount)) - ) && base.Equals(input) && - ( - this.ExpectedCount == input.ExpectedCount || - (this.ExpectedCount != null && - this.ExpectedCount.Equals(input.ExpectedCount)) - ) && base.Equals(input) && - ( - this.LightValue == input.LightValue || - (this.LightValue != null && - this.LightValue.Equals(input.LightValue)) - ) && base.Equals(input) && - ( - this.LightDisp == input.LightDisp || - (this.LightDisp != null && - this.LightDisp.Equals(input.LightDisp)) - ) && base.Equals(input) && - ( - this.RectArray == input.RectArray || - this.RectArray != null && - input.RectArray != null && - this.RectArray.SequenceEqual(input.RectArray) - ) && base.Equals(input) && - ( - this.Width == input.Width || - this.Width != null && - input.Width != null && - this.Width.SequenceEqual(input.Width) - ) && base.Equals(input) && - ( - this.Length == input.Length || - this.Length != null && - input.Length != null && - this.Length.SequenceEqual(input.Length) - ) && base.Equals(input) && - ( - this.Area == input.Area || - this.Area != null && - input.Area != null && - this.Area.SequenceEqual(input.Area) - ) && base.Equals(input) && - ( - this.ColorValues == input.ColorValues || - this.ColorValues != null && - input.ColorValues != null && - this.ColorValues.SequenceEqual(input.ColorValues) - ); + writer.WriteStartObject(); + + WriteProperties(writer, fiberResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FiberResult fiberResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (fiberResult.RectArray == null) + throw new ArgumentNullException(nameof(fiberResult.RectArray), "Property is required for class FiberResult."); + + if (fiberResult.Width == null) + throw new ArgumentNullException(nameof(fiberResult.Width), "Property is required for class FiberResult."); + + if (fiberResult.Length == null) + throw new ArgumentNullException(nameof(fiberResult.Length), "Property is required for class FiberResult."); + + if (fiberResult.Area == null) + throw new ArgumentNullException(nameof(fiberResult.Area), "Property is required for class FiberResult."); + + if (fiberResult.ColorValues == null) + throw new ArgumentNullException(nameof(fiberResult.ColorValues), "Property is required for class FiberResult."); + + writer.WriteNumber("RectCount", fiberResult.RectCount); + + writer.WriteNumber("ExpectedCount", fiberResult.ExpectedCount); + + writer.WritePropertyName("RectArray"); + JsonSerializer.Serialize(writer, fiberResult.RectArray, jsonSerializerOptions); + writer.WritePropertyName("Width"); + JsonSerializer.Serialize(writer, fiberResult.Width, jsonSerializerOptions); + writer.WritePropertyName("Length"); + JsonSerializer.Serialize(writer, fiberResult.Length, jsonSerializerOptions); + writer.WritePropertyName("Area"); + JsonSerializer.Serialize(writer, fiberResult.Area, jsonSerializerOptions); + writer.WritePropertyName("ColorValues"); + JsonSerializer.Serialize(writer, fiberResult.ColorValues, jsonSerializerOptions); + writer.WriteString("Type", fiberResult.Type); + + if (fiberResult.ElementResultOption.IsSet) { - int hashCode = base.GetHashCode(); - if (this.RectCount != null) - hashCode = hashCode * 59 + this.RectCount.GetHashCode(); - if (this.ExpectedCount != null) - hashCode = hashCode * 59 + this.ExpectedCount.GetHashCode(); - if (this.LightValue != null) - hashCode = hashCode * 59 + this.LightValue.GetHashCode(); - if (this.LightDisp != null) - hashCode = hashCode * 59 + this.LightDisp.GetHashCode(); - if (this.RectArray != null) - hashCode = hashCode * 59 + this.RectArray.GetHashCode(); - if (this.Width != null) - hashCode = hashCode * 59 + this.Width.GetHashCode(); - if (this.Length != null) - hashCode = hashCode * 59 + this.Length.GetHashCode(); - if (this.Area != null) - hashCode = hashCode * 59 + this.Area.GetHashCode(); - if (this.ColorValues != null) - hashCode = hashCode * 59 + this.ColorValues.GetHashCode(); - return hashCode; + var elementResultRawValue = CheckResultValueConverter.ToJsonValue(fiberResult.ElementResult!.Value); + writer.WriteNumber("ElementResult", elementResultRawValue); } - } + if (fiberResult.ElementDiagnoseOption.IsSet) + { + var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(fiberResult.ElementDiagnose!.Value); + writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); + } + if (fiberResult.PercentValueOption.IsSet) + writer.WriteNumber("PercentValue", fiberResult.PercentValueOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (fiberResult.LightValueOption.IsSet) + { + var lightValueRawValue = LightValueConverter.ToJsonValue(fiberResult.LightValue!.Value); + writer.WriteNumber("LightValue", lightValueRawValue); + } + if (fiberResult.LightDispOption.IsSet) + writer.WriteNumber("LightDisp", fiberResult.LightDispOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs new file mode 100644 index 0000000..9ea294f --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs @@ -0,0 +1,271 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// FieldItem + /// + public partial class FieldItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// fieldLength + /// fieldPos + /// fieldType + /// tESTRESULT + /// validCheckSum + /// reserved + [JsonConstructor] + public FieldItem(int fieldLength, int fieldPos, int fieldType, int tESTRESULT, int validCheckSum, int reserved) + { + FieldLength = fieldLength; + FieldPos = fieldPos; + FieldType = fieldType; + TEST_RESULT = tESTRESULT; + ValidCheckSum = validCheckSum; + Reserved = reserved; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets FieldLength + /// + [JsonPropertyName("FieldLength")] + public int FieldLength { get; set; } + + /// + /// Gets or Sets FieldPos + /// + [JsonPropertyName("FieldPos")] + public int FieldPos { get; set; } + + /// + /// Gets or Sets FieldType + /// + [JsonPropertyName("FieldType")] + public int FieldType { get; set; } + + /// + /// Gets or Sets TEST_RESULT + /// + [JsonPropertyName("TEST_RESULT")] + public int TEST_RESULT { get; set; } + + /// + /// Gets or Sets ValidCheckSum + /// + [JsonPropertyName("ValidCheckSum")] + public int ValidCheckSum { get; set; } + + /// + /// Gets or Sets Reserved + /// + [JsonPropertyName("reserved")] + public int Reserved { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FieldItem {\n"); + sb.Append(" FieldLength: ").Append(FieldLength).Append("\n"); + sb.Append(" FieldPos: ").Append(FieldPos).Append("\n"); + sb.Append(" FieldType: ").Append(FieldType).Append("\n"); + sb.Append(" TEST_RESULT: ").Append(TEST_RESULT).Append("\n"); + sb.Append(" ValidCheckSum: ").Append(ValidCheckSum).Append("\n"); + sb.Append(" Reserved: ").Append(Reserved).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class FieldItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override FieldItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldLength = default; + Option fieldPos = default; + Option fieldType = default; + Option tESTRESULT = default; + Option validCheckSum = default; + Option reserved = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FieldLength": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldLength = new Option(utf8JsonReader.GetInt32()); + break; + case "FieldPos": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldPos = new Option(utf8JsonReader.GetInt32()); + break; + case "FieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldType = new Option(utf8JsonReader.GetInt32()); + break; + case "TEST_RESULT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + tESTRESULT = new Option(utf8JsonReader.GetInt32()); + break; + case "ValidCheckSum": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + validCheckSum = new Option(utf8JsonReader.GetInt32()); + break; + case "reserved": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!fieldLength.IsSet) + throw new ArgumentException("Property is required for class FieldItem.", nameof(fieldLength)); + + if (!fieldPos.IsSet) + throw new ArgumentException("Property is required for class FieldItem.", nameof(fieldPos)); + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class FieldItem.", nameof(fieldType)); + + if (!tESTRESULT.IsSet) + throw new ArgumentException("Property is required for class FieldItem.", nameof(tESTRESULT)); + + if (!validCheckSum.IsSet) + throw new ArgumentException("Property is required for class FieldItem.", nameof(validCheckSum)); + + if (!reserved.IsSet) + throw new ArgumentException("Property is required for class FieldItem.", nameof(reserved)); + + if (fieldLength.IsSet && fieldLength.Value == null) + throw new ArgumentNullException(nameof(fieldLength), "Property is not nullable for class FieldItem."); + + if (fieldPos.IsSet && fieldPos.Value == null) + throw new ArgumentNullException(nameof(fieldPos), "Property is not nullable for class FieldItem."); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class FieldItem."); + + if (tESTRESULT.IsSet && tESTRESULT.Value == null) + throw new ArgumentNullException(nameof(tESTRESULT), "Property is not nullable for class FieldItem."); + + if (validCheckSum.IsSet && validCheckSum.Value == null) + throw new ArgumentNullException(nameof(validCheckSum), "Property is not nullable for class FieldItem."); + + if (reserved.IsSet && reserved.Value == null) + throw new ArgumentNullException(nameof(reserved), "Property is not nullable for class FieldItem."); + + return new FieldItem(fieldLength.Value!.Value!, fieldPos.Value!.Value!, fieldType.Value!.Value!, tESTRESULT.Value!.Value!, validCheckSum.Value!.Value!, reserved.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FieldItem fieldItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, fieldItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FieldItem fieldItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteNumber("FieldLength", fieldItem.FieldLength); + + writer.WriteNumber("FieldPos", fieldItem.FieldPos); + + writer.WriteNumber("FieldType", fieldItem.FieldType); + + writer.WriteNumber("TEST_RESULT", fieldItem.TEST_RESULT); + + writer.WriteNumber("ValidCheckSum", fieldItem.ValidCheckSum); + + writer.WriteNumber("reserved", fieldItem.Reserved); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/FileImage.cs b/src/Regula.DocumentReader.WebClient/Model/FileImage.cs new file mode 100644 index 0000000..817a8f3 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/FileImage.cs @@ -0,0 +1,185 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// FileImage + /// + public partial class FileImage : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// data + /// length + [JsonConstructor] + public FileImage(string data, int length) + { + Data = data; + Length = length; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Data + /// + [JsonPropertyName("Data")] + public string Data { get; set; } + + /// + /// Gets or Sets Length + /// + [JsonPropertyName("Length")] + public int Length { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class FileImage {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Length: ").Append(Length).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class FileImageJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override FileImage Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option data = default; + Option length = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Data": + data = new Option(utf8JsonReader.GetString()!); + break; + case "Length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + length = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!data.IsSet) + throw new ArgumentException("Property is required for class FileImage.", nameof(data)); + + if (!length.IsSet) + throw new ArgumentException("Property is required for class FileImage.", nameof(length)); + + if (data.IsSet && data.Value == null) + throw new ArgumentNullException(nameof(data), "Property is not nullable for class FileImage."); + + if (length.IsSet && length.Value == null) + throw new ArgumentNullException(nameof(length), "Property is not nullable for class FileImage."); + + return new FileImage(data.Value!, length.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, FileImage fileImage, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, fileImage, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, FileImage fileImage, JsonSerializerOptions jsonSerializerOptions) + { + if (fileImage.Data == null) + throw new ArgumentNullException(nameof(fileImage.Data), "Property is required for class FileImage."); + + writer.WriteString("Data", fileImage.Data); + + writer.WriteNumber("Length", fileImage.Length); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs index eb6eb63..4e1e245 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs @@ -1,68 +1,93 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// GetTransactionsByTagResponse /// - [DataContract] - public partial class GetTransactionsByTagResponse : IEquatable, IValidatableObject + public partial class GetTransactionsByTagResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Transaction id. - /// Transaction status. - /// Last time updated. - public GetTransactionsByTagResponse(Guid id = default(Guid), int state = default(int), DateTime updatedAt = default(DateTime)) + /// Transaction id + /// Transaction status + /// Last time updated + [JsonConstructor] + public GetTransactionsByTagResponse(Option id = default, Option state = default, Option updatedAt = default) { - this.Id = id; - this.State = state; - this.UpdatedAt = updatedAt; + IdOption = id; + StateOption = state; + UpdatedAtOption = updatedAt; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Id + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option IdOption { get; private set; } + /// /// Transaction id /// /// Transaction id - [DataMember(Name="id", EmitDefaultValue=false)] - public Guid Id { get; set; } + [JsonPropertyName("id")] + public Guid? Id { get { return this.IdOption; } set { this.IdOption = new(value); } } + + /// + /// Used to track the state of State + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option StateOption { get; private set; } /// /// Transaction status /// /// Transaction status - [DataMember(Name="state", EmitDefaultValue=false)] - public int State { get; set; } + [JsonPropertyName("state")] + public int? State { get { return this.StateOption; } set { this.StateOption = new(value); } } + + /// + /// Used to track the state of UpdatedAt + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UpdatedAtOption { get; private set; } /// /// Last time updated /// /// Last time updated - [DataMember(Name="updatedAt", EmitDefaultValue=false)] - public DateTime UpdatedAt { get; set; } + [JsonPropertyName("updatedAt")] + public DateTime? UpdatedAt { get { return this.UpdatedAtOption; } set { this.UpdatedAtOption = new(value); } } /// /// Returns the string presentation of the object @@ -70,7 +95,7 @@ public partial class GetTransactionsByTagResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GetTransactionsByTagResponse {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); sb.Append(" State: ").Append(State).Append("\n"); @@ -78,82 +103,126 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class GetTransactionsByTagResponseJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// The format to use to serialize UpdatedAt /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as GetTransactionsByTagResponse); - } + public static string UpdatedAtFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; /// - /// Returns true if GetTransactionsByTagResponse instances are equal + /// Deserializes json to /// - /// Instance of GetTransactionsByTagResponse to be compared - /// Boolean - public bool Equals(GetTransactionsByTagResponse input) + /// + /// + /// + /// + /// + public override GetTransactionsByTagResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.State == input.State || - (this.State != null && - this.State.Equals(input.State)) - ) && - ( - this.UpdatedAt == input.UpdatedAt || - (this.UpdatedAt != null && - this.UpdatedAt.Equals(input.UpdatedAt)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option id = default; + Option state = default; + Option updatedAt = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "id": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + id = new Option(utf8JsonReader.GetGuid()); + break; + case "state": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + state = new Option(utf8JsonReader.GetInt32()); + break; + case "updatedAt": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + updatedAt = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + default: + break; + } + } + } + + if (id.IsSet && id.Value == null) + throw new ArgumentNullException(nameof(id), "Property is not nullable for class GetTransactionsByTagResponse."); + + if (state.IsSet && state.Value == null) + throw new ArgumentNullException(nameof(state), "Property is not nullable for class GetTransactionsByTagResponse."); + + if (updatedAt.IsSet && updatedAt.Value == null) + throw new ArgumentNullException(nameof(updatedAt), "Property is not nullable for class GetTransactionsByTagResponse."); + + return new GetTransactionsByTagResponse(id, state, updatedAt); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GetTransactionsByTagResponse getTransactionsByTagResponse, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.State != null) - hashCode = hashCode * 59 + this.State.GetHashCode(); - if (this.UpdatedAt != null) - hashCode = hashCode * 59 + this.UpdatedAt.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, getTransactionsByTagResponse, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, GetTransactionsByTagResponse getTransactionsByTagResponse, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (getTransactionsByTagResponse.IdOption.IsSet) + writer.WriteString("id", getTransactionsByTagResponse.IdOption.Value!.Value); + + if (getTransactionsByTagResponse.StateOption.IsSet) + writer.WriteNumber("state", getTransactionsByTagResponse.StateOption.Value!.Value); + + if (getTransactionsByTagResponse.UpdatedAtOption.IsSet) + writer.WriteString("updatedAt", getTransactionsByTagResponse.UpdatedAtOption.Value!.Value.ToString(UpdatedAtFormat)); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphData.cs b/src/Regula.DocumentReader.WebClient/Model/GraphData.cs new file mode 100644 index 0000000..3e8a007 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/GraphData.cs @@ -0,0 +1,296 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// GraphData + /// + public partial class GraphData : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// fieldType + /// fileImage + /// graphicsType + /// originDG + /// originDGTag + /// originEntryView + /// originTagEntry + [JsonConstructor] + public GraphData(int fieldType, FileImage fileImage, int graphicsType, int originDG, int originDGTag, int originEntryView, int originTagEntry) + { + FieldType = fieldType; + FileImage = fileImage; + GraphicsType = graphicsType; + OriginDG = originDG; + OriginDGTag = originDGTag; + OriginEntryView = originEntryView; + OriginTagEntry = originTagEntry; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets FieldType + /// + [JsonPropertyName("FieldType")] + public int FieldType { get; set; } + + /// + /// Gets or Sets FileImage + /// + [JsonPropertyName("File_Image")] + public FileImage FileImage { get; set; } + + /// + /// Gets or Sets GraphicsType + /// + [JsonPropertyName("GraphicsType")] + public int GraphicsType { get; set; } + + /// + /// Gets or Sets OriginDG + /// + [JsonPropertyName("OriginDG")] + public int OriginDG { get; set; } + + /// + /// Gets or Sets OriginDGTag + /// + [JsonPropertyName("OriginDGTag")] + public int OriginDGTag { get; set; } + + /// + /// Gets or Sets OriginEntryView + /// + [JsonPropertyName("OriginEntryView")] + public int OriginEntryView { get; set; } + + /// + /// Gets or Sets OriginTagEntry + /// + [JsonPropertyName("OriginTagEntry")] + public int OriginTagEntry { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class GraphData {\n"); + sb.Append(" FieldType: ").Append(FieldType).Append("\n"); + sb.Append(" FileImage: ").Append(FileImage).Append("\n"); + sb.Append(" GraphicsType: ").Append(GraphicsType).Append("\n"); + sb.Append(" OriginDG: ").Append(OriginDG).Append("\n"); + sb.Append(" OriginDGTag: ").Append(OriginDGTag).Append("\n"); + sb.Append(" OriginEntryView: ").Append(OriginEntryView).Append("\n"); + sb.Append(" OriginTagEntry: ").Append(OriginTagEntry).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class GraphDataJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override GraphData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldType = default; + Option fileImage = default; + Option graphicsType = default; + Option originDG = default; + Option originDGTag = default; + Option originEntryView = default; + Option originTagEntry = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldType = new Option(utf8JsonReader.GetInt32()); + break; + case "File_Image": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fileImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "GraphicsType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + graphicsType = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginDG": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originDG = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginDGTag": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originDGTag = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginEntryView": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originEntryView = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginTagEntry": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originTagEntry = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class GraphData.", nameof(fieldType)); + + if (!fileImage.IsSet) + throw new ArgumentException("Property is required for class GraphData.", nameof(fileImage)); + + if (!graphicsType.IsSet) + throw new ArgumentException("Property is required for class GraphData.", nameof(graphicsType)); + + if (!originDG.IsSet) + throw new ArgumentException("Property is required for class GraphData.", nameof(originDG)); + + if (!originDGTag.IsSet) + throw new ArgumentException("Property is required for class GraphData.", nameof(originDGTag)); + + if (!originEntryView.IsSet) + throw new ArgumentException("Property is required for class GraphData.", nameof(originEntryView)); + + if (!originTagEntry.IsSet) + throw new ArgumentException("Property is required for class GraphData.", nameof(originTagEntry)); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class GraphData."); + + if (fileImage.IsSet && fileImage.Value == null) + throw new ArgumentNullException(nameof(fileImage), "Property is not nullable for class GraphData."); + + if (graphicsType.IsSet && graphicsType.Value == null) + throw new ArgumentNullException(nameof(graphicsType), "Property is not nullable for class GraphData."); + + if (originDG.IsSet && originDG.Value == null) + throw new ArgumentNullException(nameof(originDG), "Property is not nullable for class GraphData."); + + if (originDGTag.IsSet && originDGTag.Value == null) + throw new ArgumentNullException(nameof(originDGTag), "Property is not nullable for class GraphData."); + + if (originEntryView.IsSet && originEntryView.Value == null) + throw new ArgumentNullException(nameof(originEntryView), "Property is not nullable for class GraphData."); + + if (originTagEntry.IsSet && originTagEntry.Value == null) + throw new ArgumentNullException(nameof(originTagEntry), "Property is not nullable for class GraphData."); + + return new GraphData(fieldType.Value!.Value!, fileImage.Value!, graphicsType.Value!.Value!, originDG.Value!.Value!, originDGTag.Value!.Value!, originEntryView.Value!.Value!, originTagEntry.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GraphData graphData, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, graphData, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, GraphData graphData, JsonSerializerOptions jsonSerializerOptions) + { + if (graphData.FileImage == null) + throw new ArgumentNullException(nameof(graphData.FileImage), "Property is required for class GraphData."); + + writer.WriteNumber("FieldType", graphData.FieldType); + + writer.WritePropertyName("File_Image"); + JsonSerializer.Serialize(writer, graphData.FileImage, jsonSerializerOptions); + writer.WriteNumber("GraphicsType", graphData.GraphicsType); + + writer.WriteNumber("OriginDG", graphData.OriginDG); + + writer.WriteNumber("OriginDGTag", graphData.OriginDGTag); + + writer.WriteNumber("OriginEntryView", graphData.OriginEntryView); + + writer.WriteNumber("OriginTagEntry", graphData.OriginTagEntry); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs index ac9f592..b07f80d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs @@ -1,124 +1,78 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// - /// GraphicField + /// Information about one graphic field - abstract class /// - [DataContract] - public partial class GraphicField : IEquatable, IValidatableObject + public partial class GraphicField : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected GraphicField() { } - /// - /// Initializes a new instance of the class. - /// - /// fieldType (required). - /// image (required). - /// fieldRect. - /// Source data group file. Only for Result.RFID_GRAPHICS result.. - /// Index of the source record of the image with biometric information in the information data group. Only for Result.RFID_GRAPHICS result.. - /// Index of the template in the record with biometric data. Only for Result.RFID_GRAPHICS result.. - /// Index of the variant of the biometric data template. Only for Result.RFID_GRAPHICS result.. - public GraphicField(int fieldType = default(int), ImageData image = default(ImageData), RectangleCoordinates fieldRect = default(RectangleCoordinates), int rFIDOriginDG = default(int), int rFIDOriginDGTag = default(int), int rFIDOriginTagEntry = default(int), int rFIDOriginEntryView = default(int)) + /// fieldRect + /// fieldType + /// Graphic field symbolic name + /// image + [JsonConstructor] + public GraphicField(RectangleCoordinates fieldRect, GraphicFieldType fieldType, string fieldName, ImageData image) { - // to ensure "fieldType" is required (not null) - if (fieldType == null) - { - throw new InvalidDataException("fieldType is a required property for GraphicField and cannot be null"); - } - else - { - this.FieldType = fieldType; - } - - // to ensure "image" is required (not null) - if (image == null) - { - throw new InvalidDataException("image is a required property for GraphicField and cannot be null"); - } - else - { - this.Image = image; - } - - this.FieldRect = fieldRect; - this.RFIDOriginDG = rFIDOriginDG; - this.RFIDOriginDGTag = rFIDOriginDGTag; - this.RFIDOriginTagEntry = rFIDOriginTagEntry; - this.RFIDOriginEntryView = rFIDOriginEntryView; + FieldRect = fieldRect; + FieldType = fieldType; + FieldName = fieldName; + Image = image; + OnCreated(); } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name="FieldType", EmitDefaultValue=true)] - public int FieldType { get; set; } + + partial void OnCreated(); /// - /// Gets or Sets Image + /// Gets or Sets FieldType /// - [DataMember(Name="image", EmitDefaultValue=true)] - public ImageData Image { get; set; } + [JsonPropertyName("FieldType")] + public GraphicFieldType FieldType { get; set; } /// /// Gets or Sets FieldRect /// - [DataMember(Name="FieldRect", EmitDefaultValue=false)] + [JsonPropertyName("FieldRect")] public RectangleCoordinates FieldRect { get; set; } /// - /// Source data group file. Only for Result.RFID_GRAPHICS result. + /// Graphic field symbolic name /// - /// Source data group file. Only for Result.RFID_GRAPHICS result. - [DataMember(Name="RFID_OriginDG", EmitDefaultValue=false)] - public int RFIDOriginDG { get; set; } + /// Graphic field symbolic name + [JsonPropertyName("FieldName")] + public string FieldName { get; set; } /// - /// Index of the source record of the image with biometric information in the information data group. Only for Result.RFID_GRAPHICS result. - /// - /// Index of the source record of the image with biometric information in the information data group. Only for Result.RFID_GRAPHICS result. - [DataMember(Name="RFID_OriginDGTag", EmitDefaultValue=false)] - public int RFIDOriginDGTag { get; set; } - - /// - /// Index of the template in the record with biometric data. Only for Result.RFID_GRAPHICS result. - /// - /// Index of the template in the record with biometric data. Only for Result.RFID_GRAPHICS result. - [DataMember(Name="RFID_OriginTagEntry", EmitDefaultValue=false)] - public int RFIDOriginTagEntry { get; set; } - - /// - /// Index of the variant of the biometric data template. Only for Result.RFID_GRAPHICS result. + /// Gets or Sets Image /// - /// Index of the variant of the biometric data template. Only for Result.RFID_GRAPHICS result. - [DataMember(Name="RFID_OriginEntryView", EmitDefaultValue=false)] - public int RFIDOriginEntryView { get; set; } + [JsonPropertyName("image")] + public ImageData Image { get; set; } /// /// Returns the string presentation of the object @@ -126,122 +80,160 @@ protected GraphicField() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GraphicField {\n"); + sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); sb.Append(" FieldType: ").Append(FieldType).Append("\n"); + sb.Append(" FieldName: ").Append(FieldName).Append("\n"); sb.Append(" Image: ").Append(Image).Append("\n"); - sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); - sb.Append(" RFIDOriginDG: ").Append(RFIDOriginDG).Append("\n"); - sb.Append(" RFIDOriginDGTag: ").Append(RFIDOriginDGTag).Append("\n"); - sb.Append(" RFIDOriginTagEntry: ").Append(RFIDOriginTagEntry).Append("\n"); - sb.Append(" RFIDOriginEntryView: ").Append(RFIDOriginEntryView).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as GraphicField); + yield break; } + } + /// + /// A Json converter for type + /// + public class GraphicFieldJsonConverter : JsonConverter + { /// - /// Returns true if GraphicField instances are equal + /// Deserializes json to /// - /// Instance of GraphicField to be compared - /// Boolean - public bool Equals(GraphicField input) + /// + /// + /// + /// + /// + public override GraphicField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ) && - ( - this.Image == input.Image || - (this.Image != null && - this.Image.Equals(input.Image)) - ) && - ( - this.FieldRect == input.FieldRect || - (this.FieldRect != null && - this.FieldRect.Equals(input.FieldRect)) - ) && - ( - this.RFIDOriginDG == input.RFIDOriginDG || - (this.RFIDOriginDG != null && - this.RFIDOriginDG.Equals(input.RFIDOriginDG)) - ) && - ( - this.RFIDOriginDGTag == input.RFIDOriginDGTag || - (this.RFIDOriginDGTag != null && - this.RFIDOriginDGTag.Equals(input.RFIDOriginDGTag)) - ) && - ( - this.RFIDOriginTagEntry == input.RFIDOriginTagEntry || - (this.RFIDOriginTagEntry != null && - this.RFIDOriginTagEntry.Equals(input.RFIDOriginTagEntry)) - ) && - ( - this.RFIDOriginEntryView == input.RFIDOriginEntryView || - (this.RFIDOriginEntryView != null && - this.RFIDOriginEntryView.Equals(input.RFIDOriginEntryView)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldRect = default; + Option fieldType = default; + Option fieldName = default; + Option image = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "FieldType": + string? fieldTypeRawValue = utf8JsonReader.GetString(); + if (fieldTypeRawValue != null) + fieldType = new Option(GraphicFieldTypeValueConverter.FromStringOrDefault(fieldTypeRawValue)); + break; + case "FieldName": + fieldName = new Option(utf8JsonReader.GetString()!); + break; + case "image": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!fieldRect.IsSet) + throw new ArgumentException("Property is required for class GraphicField.", nameof(fieldRect)); + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class GraphicField.", nameof(fieldType)); + + if (!fieldName.IsSet) + throw new ArgumentException("Property is required for class GraphicField.", nameof(fieldName)); + + if (!image.IsSet) + throw new ArgumentException("Property is required for class GraphicField.", nameof(image)); + + if (fieldRect.IsSet && fieldRect.Value == null) + throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class GraphicField."); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class GraphicField."); + + if (fieldName.IsSet && fieldName.Value == null) + throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class GraphicField."); + + if (image.IsSet && image.Value == null) + throw new ArgumentNullException(nameof(image), "Property is not nullable for class GraphicField."); + + return new GraphicField(fieldRect.Value!, fieldType.Value!.Value!, fieldName.Value!, image.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GraphicField graphicField, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FieldType != null) - hashCode = hashCode * 59 + this.FieldType.GetHashCode(); - if (this.Image != null) - hashCode = hashCode * 59 + this.Image.GetHashCode(); - if (this.FieldRect != null) - hashCode = hashCode * 59 + this.FieldRect.GetHashCode(); - if (this.RFIDOriginDG != null) - hashCode = hashCode * 59 + this.RFIDOriginDG.GetHashCode(); - if (this.RFIDOriginDGTag != null) - hashCode = hashCode * 59 + this.RFIDOriginDGTag.GetHashCode(); - if (this.RFIDOriginTagEntry != null) - hashCode = hashCode * 59 + this.RFIDOriginTagEntry.GetHashCode(); - if (this.RFIDOriginEntryView != null) - hashCode = hashCode * 59 + this.RFIDOriginEntryView.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, graphicField, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, GraphicField graphicField, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (graphicField.FieldRect == null) + throw new ArgumentNullException(nameof(graphicField.FieldRect), "Property is required for class GraphicField."); + + if (graphicField.FieldName == null) + throw new ArgumentNullException(nameof(graphicField.FieldName), "Property is required for class GraphicField."); + + if (graphicField.Image == null) + throw new ArgumentNullException(nameof(graphicField.Image), "Property is required for class GraphicField."); + + writer.WritePropertyName("FieldRect"); + JsonSerializer.Serialize(writer, graphicField.FieldRect, jsonSerializerOptions); + var fieldTypeRawValue = GraphicFieldTypeValueConverter.ToJsonValue(graphicField.FieldType); + writer.WriteNumber("FieldType", fieldTypeRawValue); + + writer.WriteString("FieldName", graphicField.FieldName); + + writer.WritePropertyName("image"); + JsonSerializer.Serialize(writer, graphicField.Image, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs index 990fda6..9cf86cf 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs @@ -1,109 +1,444 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class GraphicFieldType + /// + /// Defines GraphicFieldType + /// + public enum GraphicFieldType + { + /// + /// Enum PORTRAIT for value: 201 + /// + PORTRAIT = 201, + + /// + /// Enum FINGERPRINT for value: 202 + /// + FINGERPRINT = 202, + + /// + /// Enum EYE for value: 203 + /// + EYE = 203, + + /// + /// Enum SIGNATURE for value: 204 + /// + SIGNATURE = 204, + + /// + /// Enum BAR_CODE for value: 205 + /// + BAR_CODE = 205, + + /// + /// Enum PROOF_OF_CITIZENSHIP for value: 206 + /// + PROOF_OF_CITIZENSHIP = 206, + + /// + /// Enum DOCUMENT_FRONT for value: 207 + /// + DOCUMENT_FRONT = 207, + + /// + /// Enum DOCUMENT_REAR for value: 208 + /// + DOCUMENT_REAR = 208, + + /// + /// Enum COLOR_DYNAMIC for value: 209 + /// + COLOR_DYNAMIC = 209, + + /// + /// Enum GHOST_PORTRAIT for value: 210 + /// + GHOST_PORTRAIT = 210, + + /// + /// Enum STAMP for value: 211 + /// + STAMP = 211, + + /// + /// Enum PORTRAIT_OF_CHILD for value: 212 + /// + PORTRAIT_OF_CHILD = 212, + + /// + /// Enum CONTACT_CHIP for value: 213 + /// + CONTACT_CHIP = 213, + + /// + /// Enum OTHER for value: 250 + /// + OTHER = 250, + + /// + /// Enum FINGER_LEFT_THUMB for value: 300 + /// + FINGER_LEFT_THUMB = 300, + + /// + /// Enum FINGER_LEFT_INDEX for value: 301 + /// + FINGER_LEFT_INDEX = 301, + + /// + /// Enum FINGER_LEFT_MIDDLE for value: 302 + /// + FINGER_LEFT_MIDDLE = 302, + + /// + /// Enum FINGER_LEFT_RING for value: 303 + /// + FINGER_LEFT_RING = 303, + + /// + /// Enum FINGER_LEFT_LITTLE for value: 304 + /// + FINGER_LEFT_LITTLE = 304, + + /// + /// Enum FINGER_RIGHT_THUMB for value: 305 + /// + FINGER_RIGHT_THUMB = 305, + + /// + /// Enum FINGER_RIGHT_INDEX for value: 306 + /// + FINGER_RIGHT_INDEX = 306, + + /// + /// Enum FINGER_RIGHT_MIDDLE for value: 307 + /// + FINGER_RIGHT_MIDDLE = 307, + + /// + /// Enum FINGER_RIGHT_RING for value: 308 + /// + FINGER_RIGHT_RING = 308, + + /// + /// Enum FINGER_RIGHT_LITTLE for value: 309 + /// + FINGER_RIGHT_LITTLE = 309, + + /// + /// Enum FINGER_RIGHT_FOUR_FINGERS for value: 313 + /// + FINGER_RIGHT_FOUR_FINGERS = 313, + + /// + /// Enum FINGER_LEFT_FOUR_FINGERS for value: 314 + /// + FINGER_LEFT_FOUR_FINGERS = 314, + + /// + /// Enum FINGER_TWO_THUMBS for value: 315 + /// + FINGER_TWO_THUMBS = 315 + } + + /// + /// Converts to and from the JSON value + /// + public static class GraphicFieldTypeValueConverter { + /// + /// Parses a given value to + /// + /// + /// + public static GraphicFieldType FromString(string value) + { + if (value.Equals((201).ToString())) + return GraphicFieldType.PORTRAIT; + + if (value.Equals((202).ToString())) + return GraphicFieldType.FINGERPRINT; + + if (value.Equals((203).ToString())) + return GraphicFieldType.EYE; + + if (value.Equals((204).ToString())) + return GraphicFieldType.SIGNATURE; + + if (value.Equals((205).ToString())) + return GraphicFieldType.BAR_CODE; - /** Document holder photo */ - public const int PORTRAIT = 201; + if (value.Equals((206).ToString())) + return GraphicFieldType.PROOF_OF_CITIZENSHIP; - /** Fingerprint of document holder */ - public const int FINGERPRINT = 202; + if (value.Equals((207).ToString())) + return GraphicFieldType.DOCUMENT_FRONT; - /** Image of the iris of document holder */ - public const int EYE = 203; + if (value.Equals((208).ToString())) + return GraphicFieldType.DOCUMENT_REAR; - /** Signature of document holder */ - public const int SIGNATURE = 204; + if (value.Equals((209).ToString())) + return GraphicFieldType.COLOR_DYNAMIC; - /** Barcode image */ - public const int BAR_CODE = 205; + if (value.Equals((210).ToString())) + return GraphicFieldType.GHOST_PORTRAIT; - /** Image of document confirming owner citizenship */ - public const int PROOF_OF_CITIZENSHIP = 206; + if (value.Equals((211).ToString())) + return GraphicFieldType.STAMP; - /** Cropped and rotated with perspective compensation (front side) of a document. Single input image can contain multiple document side/pages, which will be returned as separated results. Most coordinates in other types defined on that image. */ - public const int DOCUMENT_FRONT = 207; + if (value.Equals((212).ToString())) + return GraphicFieldType.PORTRAIT_OF_CHILD; - /** Image of the rear side of the document */ - public const int DOCUMENT_REAR = 208; + if (value.Equals((213).ToString())) + return GraphicFieldType.CONTACT_CHIP; - /** Area with dynamic color change */ - public const int COLOR_DYNAMIC = 209; + if (value.Equals((250).ToString())) + return GraphicFieldType.OTHER; - /** Additional Portrait */ - public const int GHOST_PORTRAIT = 210; + if (value.Equals((300).ToString())) + return GraphicFieldType.FINGER_LEFT_THUMB; - /** Stamp */ - public const int STAMP = 211; + if (value.Equals((301).ToString())) + return GraphicFieldType.FINGER_LEFT_INDEX; - /** Contact chip */ - public const int CONTACT_CHIP = 213; + if (value.Equals((302).ToString())) + return GraphicFieldType.FINGER_LEFT_MIDDLE; - /** Undefined image type */ - public const int OTHER = 250; + if (value.Equals((303).ToString())) + return GraphicFieldType.FINGER_LEFT_RING; - /** Fingerprint (thumb, left hand) */ - public const int FINGER_LEFT_THUMB = 300; + if (value.Equals((304).ToString())) + return GraphicFieldType.FINGER_LEFT_LITTLE; - /** Fingerprint (index, left hand) */ - public const int FINGER_LEFT_INDEX = 301; + if (value.Equals((305).ToString())) + return GraphicFieldType.FINGER_RIGHT_THUMB; - /** Fingerprint (middle, left hand) */ - public const int FINGER_LEFT_MIDDLE = 302; + if (value.Equals((306).ToString())) + return GraphicFieldType.FINGER_RIGHT_INDEX; - /** Fingerprint (ring, left hand) */ - public const int FINGER_LEFT_RING = 303; + if (value.Equals((307).ToString())) + return GraphicFieldType.FINGER_RIGHT_MIDDLE; - /** Fingerprint (little, left hand) */ - public const int FINGER_LEFT_LITTLE = 304; + if (value.Equals((308).ToString())) + return GraphicFieldType.FINGER_RIGHT_RING; - /** Fingerprint (thumb, right hand) */ - public const int FINGER_RIGHT_THUMB = 305; + if (value.Equals((309).ToString())) + return GraphicFieldType.FINGER_RIGHT_LITTLE; - /** Fingerprint (index, right hand) */ - public const int FINGER_RIGHT_INDEX = 306; + if (value.Equals((313).ToString())) + return GraphicFieldType.FINGER_RIGHT_FOUR_FINGERS; - /** Fingerprint (middle, right hand) */ - public const int FINGER_RIGHT_MIDDLE = 307; + if (value.Equals((314).ToString())) + return GraphicFieldType.FINGER_LEFT_FOUR_FINGERS; - /** Fingerprint (ring, right hand) */ - public const int FINGER_RIGHT_RING = 308; + if (value.Equals((315).ToString())) + return GraphicFieldType.FINGER_TWO_THUMBS; - /** Fingerprint (little, right hand) */ - public const int FINGER_RIGHT_LITTLE = 309; + throw new NotImplementedException($"Could not convert value to type GraphicFieldType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static GraphicFieldType? FromStringOrDefault(string value) + { + if (value.Equals((201).ToString())) + return GraphicFieldType.PORTRAIT; + + if (value.Equals((202).ToString())) + return GraphicFieldType.FINGERPRINT; + + if (value.Equals((203).ToString())) + return GraphicFieldType.EYE; + + if (value.Equals((204).ToString())) + return GraphicFieldType.SIGNATURE; + + if (value.Equals((205).ToString())) + return GraphicFieldType.BAR_CODE; + + if (value.Equals((206).ToString())) + return GraphicFieldType.PROOF_OF_CITIZENSHIP; + + if (value.Equals((207).ToString())) + return GraphicFieldType.DOCUMENT_FRONT; + + if (value.Equals((208).ToString())) + return GraphicFieldType.DOCUMENT_REAR; + + if (value.Equals((209).ToString())) + return GraphicFieldType.COLOR_DYNAMIC; + + if (value.Equals((210).ToString())) + return GraphicFieldType.GHOST_PORTRAIT; + + if (value.Equals((211).ToString())) + return GraphicFieldType.STAMP; + + if (value.Equals((212).ToString())) + return GraphicFieldType.PORTRAIT_OF_CHILD; + + if (value.Equals((213).ToString())) + return GraphicFieldType.CONTACT_CHIP; + + if (value.Equals((250).ToString())) + return GraphicFieldType.OTHER; + + if (value.Equals((300).ToString())) + return GraphicFieldType.FINGER_LEFT_THUMB; + + if (value.Equals((301).ToString())) + return GraphicFieldType.FINGER_LEFT_INDEX; + + if (value.Equals((302).ToString())) + return GraphicFieldType.FINGER_LEFT_MIDDLE; + + if (value.Equals((303).ToString())) + return GraphicFieldType.FINGER_LEFT_RING; + + if (value.Equals((304).ToString())) + return GraphicFieldType.FINGER_LEFT_LITTLE; + + if (value.Equals((305).ToString())) + return GraphicFieldType.FINGER_RIGHT_THUMB; + + if (value.Equals((306).ToString())) + return GraphicFieldType.FINGER_RIGHT_INDEX; + + if (value.Equals((307).ToString())) + return GraphicFieldType.FINGER_RIGHT_MIDDLE; + + if (value.Equals((308).ToString())) + return GraphicFieldType.FINGER_RIGHT_RING; + + if (value.Equals((309).ToString())) + return GraphicFieldType.FINGER_RIGHT_LITTLE; + + if (value.Equals((313).ToString())) + return GraphicFieldType.FINGER_RIGHT_FOUR_FINGERS; + + if (value.Equals((314).ToString())) + return GraphicFieldType.FINGER_LEFT_FOUR_FINGERS; + + if (value.Equals((315).ToString())) + return GraphicFieldType.FINGER_TWO_THUMBS; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(GraphicFieldType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class GraphicFieldTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override GraphicFieldType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + GraphicFieldType? result = rawValue == null + ? null + : GraphicFieldTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the GraphicFieldType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GraphicFieldType graphicFieldType, JsonSerializerOptions options) + { + writer.WriteStringValue(graphicFieldType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class GraphicFieldTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a GraphicFieldType from the Json object + /// + /// + /// + /// + /// + public override GraphicFieldType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** Fingerprint (four without thumb on right hand) */ - public const int FINGER_RIGHT_FOUR_FINGERS = 313; + GraphicFieldType? result = rawValue == null + ? null + : GraphicFieldTypeValueConverter.FromStringOrDefault(rawValue); - /** Fingerprint (four without thumb on left hand */ - public const int FINGER_LEFT_FOUR_FINGERS = 314; + if (result != null) + return result.Value; - /** Fingerprint (two thumbs) */ - public const int FINGER_TWO_THUMBS = 315; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GraphicFieldType? graphicFieldType, JsonSerializerOptions options) + { + writer.WriteStringValue(graphicFieldType?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs index 78fc60a..e80c943 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs @@ -1,139 +1,187 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// GraphicFieldsList /// - [DataContract] - public partial class GraphicFieldsList : IEquatable, IValidatableObject + public partial class GraphicFieldsList : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected GraphicFieldsList() { } - /// - /// Initializes a new instance of the class. - /// - /// pArrayFields (required). - public GraphicFieldsList(List pArrayFields = default(List)) + /// pArrayFields + /// Number of pArrayFields array elements + [JsonConstructor] + public GraphicFieldsList(List pArrayFields, decimal nFields) { - // to ensure "pArrayFields" is required (not null) - if (pArrayFields == null) - { - throw new InvalidDataException("pArrayFields is a required property for GraphicFieldsList and cannot be null"); - } - else - { - this.PArrayFields = pArrayFields; - } - + PArrayFields = pArrayFields; + NFields = nFields; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets PArrayFields /// - [DataMember(Name="pArrayFields", EmitDefaultValue=true)] + [JsonPropertyName("pArrayFields")] public List PArrayFields { get; set; } + /// + /// Number of pArrayFields array elements + /// + /// Number of pArrayFields array elements + [JsonPropertyName("nFields")] + public decimal NFields { get; set; } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GraphicFieldsList {\n"); sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); + sb.Append(" NFields: ").Append(NFields).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as GraphicFieldsList); + yield break; } + } + /// + /// A Json converter for type + /// + public class GraphicFieldsListJsonConverter : JsonConverter + { /// - /// Returns true if GraphicFieldsList instances are equal + /// Deserializes json to /// - /// Instance of GraphicFieldsList to be compared - /// Boolean - public bool Equals(GraphicFieldsList input) + /// + /// + /// + /// + /// + public override GraphicFieldsList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.PArrayFields == input.PArrayFields || - this.PArrayFields != null && - input.PArrayFields != null && - this.PArrayFields.SequenceEqual(input.PArrayFields) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> pArrayFields = default; + Option nFields = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "pArrayFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pArrayFields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "nFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + nFields = new Option(utf8JsonReader.GetDecimal()); + break; + default: + break; + } + } + } + + if (!pArrayFields.IsSet) + throw new ArgumentException("Property is required for class GraphicFieldsList.", nameof(pArrayFields)); + + if (!nFields.IsSet) + throw new ArgumentException("Property is required for class GraphicFieldsList.", nameof(nFields)); + + if (pArrayFields.IsSet && pArrayFields.Value == null) + throw new ArgumentNullException(nameof(pArrayFields), "Property is not nullable for class GraphicFieldsList."); + + if (nFields.IsSet && nFields.Value == null) + throw new ArgumentNullException(nameof(nFields), "Property is not nullable for class GraphicFieldsList."); + + return new GraphicFieldsList(pArrayFields.Value!, nFields.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GraphicFieldsList graphicFieldsList, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PArrayFields != null) - hashCode = hashCode * 59 + this.PArrayFields.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, graphicFieldsList, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, GraphicFieldsList graphicFieldsList, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (graphicFieldsList.PArrayFields == null) + throw new ArgumentNullException(nameof(graphicFieldsList.PArrayFields), "Property is required for class GraphicFieldsList."); + + writer.WritePropertyName("pArrayFields"); + JsonSerializer.Serialize(writer, graphicFieldsList.PArrayFields, jsonSerializerOptions); + writer.WriteNumber("nFields", graphicFieldsList.NFields); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs index 6713880..53f1970 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs @@ -1,62 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Graphic fields extracted from one of the document sources. Returns separate results for each provided page. /// - [DataContract] - public partial class GraphicsResult : ResultItem, IEquatable, IValidatableObject + public partial class GraphicsResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected GraphicsResult() { } - /// - /// Initializes a new instance of the class. - /// - /// docGraphicsInfo (required). - public GraphicsResult(GraphicFieldsList docGraphicsInfo = default(GraphicFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// docGraphicsInfo + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public GraphicsResult(GraphicFieldsList docGraphicsInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "docGraphicsInfo" is required (not null) - if (docGraphicsInfo == null) - { - throw new InvalidDataException("docGraphicsInfo is a required property for GraphicsResult and cannot be null"); - } - else - { - this.DocGraphicsInfo = docGraphicsInfo; - } - + DocGraphicsInfo = docGraphicsInfo; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets DocGraphicsInfo /// - [DataMember(Name="DocGraphicsInfo", EmitDefaultValue=true)] + [JsonPropertyName("DocGraphicsInfo")] public GraphicFieldsList DocGraphicsInfo { get; set; } /// @@ -65,76 +59,158 @@ protected GraphicsResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class GraphicsResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" DocGraphicsInfo: ").Append(DocGraphicsInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class GraphicsResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override GraphicsResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as GraphicsResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if GraphicsResult instances are equal - /// - /// Instance of GraphicsResult to be compared - /// Boolean - public bool Equals(GraphicsResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.DocGraphicsInfo == input.DocGraphicsInfo || - (this.DocGraphicsInfo != null && - this.DocGraphicsInfo.Equals(input.DocGraphicsInfo)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docGraphicsInfo = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocGraphicsInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docGraphicsInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!docGraphicsInfo.IsSet) + throw new ArgumentException("Property is required for class GraphicsResult.", nameof(docGraphicsInfo)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class GraphicsResult.", nameof(resultType)); + + if (docGraphicsInfo.IsSet && docGraphicsInfo.Value == null) + throw new ArgumentNullException(nameof(docGraphicsInfo), "Property is not nullable for class GraphicsResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class GraphicsResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class GraphicsResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class GraphicsResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class GraphicsResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class GraphicsResult."); + + return new GraphicsResult(docGraphicsInfo.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, GraphicsResult graphicsResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.DocGraphicsInfo != null) - hashCode = hashCode * 59 + this.DocGraphicsInfo.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, graphicsResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, GraphicsResult graphicsResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (graphicsResult.DocGraphicsInfo == null) + throw new ArgumentNullException(nameof(graphicsResult.DocGraphicsInfo), "Property is required for class GraphicsResult."); + + writer.WritePropertyName("DocGraphicsInfo"); + JsonSerializer.Serialize(writer, graphicsResult.DocGraphicsInfo, jsonSerializerOptions); + if (graphicsResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", graphicsResult.BufLengthOption.Value!.Value); + + if (graphicsResult.LightOption.IsSet) + writer.WriteNumber("light", graphicsResult.LightOption.Value!.Value); + + if (graphicsResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", graphicsResult.ListIdxOption.Value!.Value); + + if (graphicsResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", graphicsResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", graphicsResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs index 3bb58d7..0f075b6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs @@ -1,186 +1,138 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Healthcheck /// - [DataContract] - public partial class Healthcheck : IEquatable, IValidatableObject + public partial class Healthcheck : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Healthcheck() { } - /// - /// Initializes a new instance of the class. - /// - /// Application name. (required). - /// Unique license identifier. (required). - /// License type. (required). - /// License serial number. (required). - /// License validity date. (required). - /// List of supported scenarios. (required). - /// Product version. (required). - /// documentsDatabase. - public Healthcheck(string app = default(string), string licenseId = default(string), string licenseType = default(string), string licenseSerial = default(string), DateTime? licenseValidUntil = default(DateTime?), List scenarios = default(List), string version = default(string), HealthcheckDocumentsDatabase documentsDatabase = default(HealthcheckDocumentsDatabase)) + /// Application name. + /// Unique license identifier. + /// License type. + /// License serial number. + /// License validity date. + /// List of supported scenarios. + /// Product version. + /// metadata + /// documentsDatabase + [JsonConstructor] + public Healthcheck(string app, string? licenseId = default, string? licenseType = default, string? licenseSerial = default, DateTime? licenseValidUntil = default, List? scenarios = default, string? varVersion = default, Option?> metadata = default, Option documentsDatabase = default) { - // to ensure "app" is required (not null) - if (app == null) - { - throw new InvalidDataException("app is a required property for Healthcheck and cannot be null"); - } - else - { - this.App = app; - } - - // to ensure "licenseId" is required (not null) - if (licenseId == null) - { - throw new InvalidDataException("licenseId is a required property for Healthcheck and cannot be null"); - } - else - { - this.LicenseId = licenseId; - } - - this.LicenseId = licenseId; - // to ensure "licenseType" is required (not null) - if (licenseType == null) - { - throw new InvalidDataException("licenseType is a required property for Healthcheck and cannot be null"); - } - else - { - this.LicenseType = licenseType; - } - - this.LicenseType = licenseType; - // to ensure "licenseSerial" is required (not null) - if (licenseSerial == null) - { - throw new InvalidDataException("licenseSerial is a required property for Healthcheck and cannot be null"); - } - else - { - this.LicenseSerial = licenseSerial; - } - - this.LicenseSerial = licenseSerial; - // to ensure "licenseValidUntil" is required (not null) - if (licenseValidUntil == null) - { - throw new InvalidDataException("licenseValidUntil is a required property for Healthcheck and cannot be null"); - } - else - { - this.LicenseValidUntil = licenseValidUntil; - } - - this.LicenseValidUntil = licenseValidUntil; - // to ensure "scenarios" is required (not null) - if (scenarios == null) - { - throw new InvalidDataException("scenarios is a required property for Healthcheck and cannot be null"); - } - else - { - this.Scenarios = scenarios; - } - - this.Scenarios = scenarios; - // to ensure "version" is required (not null) - if (version == null) - { - throw new InvalidDataException("version is a required property for Healthcheck and cannot be null"); - } - else - { - this.Version = version; - } - - this.Version = version; - this.DocumentsDatabase = documentsDatabase; + App = app; + LicenseId = licenseId; + LicenseType = licenseType; + LicenseSerial = licenseSerial; + LicenseValidUntil = licenseValidUntil; + Scenarios = scenarios; + VarVersion = varVersion; + MetadataOption = metadata; + DocumentsDatabaseOption = documentsDatabase; + OnCreated(); } - + + partial void OnCreated(); + /// /// Application name. /// /// Application name. - [DataMember(Name="app", EmitDefaultValue=true)] + [JsonPropertyName("app")] public string App { get; set; } /// /// Unique license identifier. /// /// Unique license identifier. - [DataMember(Name="licenseId", EmitDefaultValue=true)] - public string LicenseId { get; set; } + [JsonPropertyName("licenseId")] + public string? LicenseId { get; set; } /// /// License type. /// /// License type. - [DataMember(Name="licenseType", EmitDefaultValue=true)] - public string LicenseType { get; set; } + [JsonPropertyName("licenseType")] + public string? LicenseType { get; set; } /// /// License serial number. /// /// License serial number. - [DataMember(Name="licenseSerial", EmitDefaultValue=true)] - public string LicenseSerial { get; set; } + [JsonPropertyName("licenseSerial")] + public string? LicenseSerial { get; set; } /// /// License validity date. /// /// License validity date. - [DataMember(Name="licenseValidUntil", EmitDefaultValue=true)] + [JsonPropertyName("licenseValidUntil")] public DateTime? LicenseValidUntil { get; set; } /// /// List of supported scenarios. /// /// List of supported scenarios. - [DataMember(Name="scenarios", EmitDefaultValue=true)] - public List Scenarios { get; set; } + [JsonPropertyName("scenarios")] + public List? Scenarios { get; set; } /// /// Product version. /// /// Product version. - [DataMember(Name="version", EmitDefaultValue=true)] - public string Version { get; set; } + [JsonPropertyName("version")] + public string? VarVersion { get; set; } + + /// + /// Used to track the state of Metadata + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> MetadataOption { get; private set; } + + /// + /// Gets or Sets Metadata + /// + [JsonPropertyName("metadata")] + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } + + /// + /// Used to track the state of DocumentsDatabase + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DocumentsDatabaseOption { get; private set; } /// /// Gets or Sets DocumentsDatabase /// - [DataMember(Name="documentsDatabase", EmitDefaultValue=false)] - public HealthcheckDocumentsDatabase DocumentsDatabase { get; set; } + [JsonPropertyName("documentsDatabase")] + public HealthcheckDocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new(value); } } /// /// Returns the string presentation of the object @@ -188,7 +140,7 @@ protected Healthcheck() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Healthcheck {\n"); sb.Append(" App: ").Append(App).Append("\n"); sb.Append(" LicenseId: ").Append(LicenseId).Append("\n"); @@ -196,123 +148,223 @@ public override string ToString() sb.Append(" LicenseSerial: ").Append(LicenseSerial).Append("\n"); sb.Append(" LicenseValidUntil: ").Append(LicenseValidUntil).Append("\n"); sb.Append(" Scenarios: ").Append(Scenarios).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); sb.Append(" DocumentsDatabase: ").Append(DocumentsDatabase).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class HealthcheckJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// The format to use to serialize LicenseValidUntil /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Healthcheck); - } + public static string LicenseValidUntilFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; /// - /// Returns true if Healthcheck instances are equal + /// Deserializes json to /// - /// Instance of Healthcheck to be compared - /// Boolean - public bool Equals(Healthcheck input) + /// + /// + /// + /// + /// + public override Healthcheck Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.App == input.App || - (this.App != null && - this.App.Equals(input.App)) - ) && - ( - this.LicenseId == input.LicenseId || - (this.LicenseId != null && - this.LicenseId.Equals(input.LicenseId)) - ) && - ( - this.LicenseType == input.LicenseType || - (this.LicenseType != null && - this.LicenseType.Equals(input.LicenseType)) - ) && - ( - this.LicenseSerial == input.LicenseSerial || - (this.LicenseSerial != null && - this.LicenseSerial.Equals(input.LicenseSerial)) - ) && - ( - this.LicenseValidUntil == input.LicenseValidUntil || - (this.LicenseValidUntil != null && - this.LicenseValidUntil.Equals(input.LicenseValidUntil)) - ) && - ( - this.Scenarios == input.Scenarios || - this.Scenarios != null && - input.Scenarios != null && - this.Scenarios.SequenceEqual(input.Scenarios) - ) && - ( - this.Version == input.Version || - (this.Version != null && - this.Version.Equals(input.Version)) - ) && - ( - this.DocumentsDatabase == input.DocumentsDatabase || - (this.DocumentsDatabase != null && - this.DocumentsDatabase.Equals(input.DocumentsDatabase)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option app = default; + Option licenseId = default; + Option licenseType = default; + Option licenseSerial = default; + Option licenseValidUntil = default; + Option?> scenarios = default; + Option varVersion = default; + Option?> metadata = default; + Option documentsDatabase = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "app": + app = new Option(utf8JsonReader.GetString()!); + break; + case "licenseId": + licenseId = new Option(utf8JsonReader.GetString()); + break; + case "licenseType": + licenseType = new Option(utf8JsonReader.GetString()); + break; + case "licenseSerial": + licenseSerial = new Option(utf8JsonReader.GetString()); + break; + case "licenseValidUntil": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + licenseValidUntil = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + case "scenarios": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + scenarios = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)); + break; + case "version": + varVersion = new Option(utf8JsonReader.GetString()); + break; + case "metadata": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "documentsDatabase": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + documentsDatabase = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!app.IsSet) + throw new ArgumentException("Property is required for class Healthcheck.", nameof(app)); + + if (!licenseId.IsSet) + throw new ArgumentException("Property is required for class Healthcheck.", nameof(licenseId)); + + if (!licenseType.IsSet) + throw new ArgumentException("Property is required for class Healthcheck.", nameof(licenseType)); + + if (!licenseSerial.IsSet) + throw new ArgumentException("Property is required for class Healthcheck.", nameof(licenseSerial)); + + if (!licenseValidUntil.IsSet) + throw new ArgumentException("Property is required for class Healthcheck.", nameof(licenseValidUntil)); + + if (!scenarios.IsSet) + throw new ArgumentException("Property is required for class Healthcheck.", nameof(scenarios)); + + if (!varVersion.IsSet) + throw new ArgumentException("Property is required for class Healthcheck.", nameof(varVersion)); + + if (app.IsSet && app.Value == null) + throw new ArgumentNullException(nameof(app), "Property is not nullable for class Healthcheck."); + + if (metadata.IsSet && metadata.Value == null) + throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class Healthcheck."); + + if (documentsDatabase.IsSet && documentsDatabase.Value == null) + throw new ArgumentNullException(nameof(documentsDatabase), "Property is not nullable for class Healthcheck."); + + return new Healthcheck(app.Value!, licenseId.Value!, licenseType.Value!, licenseSerial.Value!, licenseValidUntil.Value!, scenarios.Value!, varVersion.Value!, metadata, documentsDatabase); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Healthcheck healthcheck, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.App != null) - hashCode = hashCode * 59 + this.App.GetHashCode(); - if (this.LicenseId != null) - hashCode = hashCode * 59 + this.LicenseId.GetHashCode(); - if (this.LicenseType != null) - hashCode = hashCode * 59 + this.LicenseType.GetHashCode(); - if (this.LicenseSerial != null) - hashCode = hashCode * 59 + this.LicenseSerial.GetHashCode(); - if (this.LicenseValidUntil != null) - hashCode = hashCode * 59 + this.LicenseValidUntil.GetHashCode(); - if (this.Scenarios != null) - hashCode = hashCode * 59 + this.Scenarios.GetHashCode(); - if (this.Version != null) - hashCode = hashCode * 59 + this.Version.GetHashCode(); - if (this.DocumentsDatabase != null) - hashCode = hashCode * 59 + this.DocumentsDatabase.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, healthcheck, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, Healthcheck healthcheck, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (healthcheck.App == null) + throw new ArgumentNullException(nameof(healthcheck.App), "Property is required for class Healthcheck."); + + if (healthcheck.MetadataOption.IsSet && healthcheck.Metadata == null) + throw new ArgumentNullException(nameof(healthcheck.Metadata), "Property is required for class Healthcheck."); + + if (healthcheck.DocumentsDatabaseOption.IsSet && healthcheck.DocumentsDatabase == null) + throw new ArgumentNullException(nameof(healthcheck.DocumentsDatabase), "Property is required for class Healthcheck."); + + writer.WriteString("app", healthcheck.App); + + if (healthcheck.LicenseId != null) + writer.WriteString("licenseId", healthcheck.LicenseId); + else + writer.WriteNull("licenseId"); + + if (healthcheck.LicenseType != null) + writer.WriteString("licenseType", healthcheck.LicenseType); + else + writer.WriteNull("licenseType"); + + if (healthcheck.LicenseSerial != null) + writer.WriteString("licenseSerial", healthcheck.LicenseSerial); + else + writer.WriteNull("licenseSerial"); + + if (healthcheck.LicenseValidUntil != null) + writer.WriteString("licenseValidUntil", healthcheck.LicenseValidUntil.Value.ToString(LicenseValidUntilFormat)); + else + writer.WriteNull("licenseValidUntil"); + + if (healthcheck.Scenarios != null) + { + writer.WritePropertyName("scenarios"); + JsonSerializer.Serialize(writer, healthcheck.Scenarios, jsonSerializerOptions); + } + else + writer.WriteNull("scenarios"); + if (healthcheck.VarVersion != null) + writer.WriteString("version", healthcheck.VarVersion); + else + writer.WriteNull("version"); + + if (healthcheck.MetadataOption.IsSet) + { + writer.WritePropertyName("metadata"); + JsonSerializer.Serialize(writer, healthcheck.Metadata, jsonSerializerOptions); + } + if (healthcheck.DocumentsDatabaseOption.IsSet) + { + writer.WritePropertyName("documentsDatabase"); + JsonSerializer.Serialize(writer, healthcheck.DocumentsDatabase, jsonSerializerOptions); + } } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs index 8374551..bcf7d4e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs @@ -1,123 +1,81 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Database information. /// - [DataContract] - public partial class HealthcheckDocumentsDatabase : IEquatable, IValidatableObject + public partial class HealthcheckDocumentsDatabase : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected HealthcheckDocumentsDatabase() { } - /// - /// Initializes a new instance of the class. - /// - /// Database identifier. (required). - /// Database version. (required). - /// Date of database creation. (required). - /// Description of the database contents, such as the list of supported countries and documents. (required). - public HealthcheckDocumentsDatabase(string id = default(string), string version = default(string), DateTime? exportDate = default(DateTime?), string description = default(string)) + /// Database identifier. + /// Database version. + /// Date of database creation. + /// Description of the database contents, such as the list of supported countries and documents. + [JsonConstructor] + public HealthcheckDocumentsDatabase(string? id = default, string? varVersion = default, DateOnly? exportDate = default, string? description = default) { - // to ensure "id" is required (not null) - if (id == null) - { - throw new InvalidDataException("id is a required property for HealthcheckDocumentsDatabase and cannot be null"); - } - else - { - this.Id = id; - } - - this.Id = id; - // to ensure "version" is required (not null) - if (version == null) - { - throw new InvalidDataException("version is a required property for HealthcheckDocumentsDatabase and cannot be null"); - } - else - { - this.Version = version; - } - - this.Version = version; - // to ensure "exportDate" is required (not null) - if (exportDate == null) - { - throw new InvalidDataException("exportDate is a required property for HealthcheckDocumentsDatabase and cannot be null"); - } - else - { - this.ExportDate = exportDate; - } - - this.ExportDate = exportDate; - // to ensure "description" is required (not null) - if (description == null) - { - throw new InvalidDataException("description is a required property for HealthcheckDocumentsDatabase and cannot be null"); - } - else - { - this.Description = description; - } - - this.Description = description; + Id = id; + VarVersion = varVersion; + ExportDate = exportDate; + Description = description; + OnCreated(); } - + + partial void OnCreated(); + /// /// Database identifier. /// /// Database identifier. - [DataMember(Name="id", EmitDefaultValue=true)] - public string Id { get; set; } + [JsonPropertyName("id")] + public string? Id { get; set; } /// /// Database version. /// /// Database version. - [DataMember(Name="version", EmitDefaultValue=true)] - public string Version { get; set; } + [JsonPropertyName("version")] + public string? VarVersion { get; set; } /// /// Date of database creation. /// /// Date of database creation. - [DataMember(Name="exportDate", EmitDefaultValue=true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? ExportDate { get; set; } + [JsonPropertyName("exportDate")] + public DateOnly? ExportDate { get; set; } /// /// Description of the database contents, such as the list of supported countries and documents. /// /// Description of the database contents, such as the list of supported countries and documents. - [DataMember(Name="description", EmitDefaultValue=true)] - public string Description { get; set; } + [JsonPropertyName("description")] + public string? Description { get; set; } /// /// Returns the string presentation of the object @@ -125,98 +83,151 @@ protected HealthcheckDocumentsDatabase() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class HealthcheckDocumentsDatabase {\n"); sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); sb.Append(" ExportDate: ").Append(ExportDate).Append("\n"); sb.Append(" Description: ").Append(Description).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class HealthcheckDocumentsDatabaseJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// The format to use to serialize ExportDate /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HealthcheckDocumentsDatabase); - } + public static string ExportDateFormat { get; set; } = "yyyy'-'MM'-'dd"; /// - /// Returns true if HealthcheckDocumentsDatabase instances are equal + /// Deserializes json to /// - /// Instance of HealthcheckDocumentsDatabase to be compared - /// Boolean - public bool Equals(HealthcheckDocumentsDatabase input) + /// + /// + /// + /// + /// + public override HealthcheckDocumentsDatabase Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Version == input.Version || - (this.Version != null && - this.Version.Equals(input.Version)) - ) && - ( - this.ExportDate == input.ExportDate || - (this.ExportDate != null && - this.ExportDate.Equals(input.ExportDate)) - ) && - ( - this.Description == input.Description || - (this.Description != null && - this.Description.Equals(input.Description)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option id = default; + Option varVersion = default; + Option exportDate = default; + Option description = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "id": + id = new Option(utf8JsonReader.GetString()); + break; + case "version": + varVersion = new Option(utf8JsonReader.GetString()); + break; + case "exportDate": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + exportDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + case "description": + description = new Option(utf8JsonReader.GetString()); + break; + default: + break; + } + } + } + + if (!id.IsSet) + throw new ArgumentException("Property is required for class HealthcheckDocumentsDatabase.", nameof(id)); + + if (!varVersion.IsSet) + throw new ArgumentException("Property is required for class HealthcheckDocumentsDatabase.", nameof(varVersion)); + + if (!exportDate.IsSet) + throw new ArgumentException("Property is required for class HealthcheckDocumentsDatabase.", nameof(exportDate)); + + if (!description.IsSet) + throw new ArgumentException("Property is required for class HealthcheckDocumentsDatabase.", nameof(description)); + + return new HealthcheckDocumentsDatabase(id.Value!, varVersion.Value!, exportDate.Value!, description.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, HealthcheckDocumentsDatabase healthcheckDocumentsDatabase, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Version != null) - hashCode = hashCode * 59 + this.Version.GetHashCode(); - if (this.ExportDate != null) - hashCode = hashCode * 59 + this.ExportDate.GetHashCode(); - if (this.Description != null) - hashCode = hashCode * 59 + this.Description.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, healthcheckDocumentsDatabase, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, HealthcheckDocumentsDatabase healthcheckDocumentsDatabase, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (healthcheckDocumentsDatabase.Id != null) + writer.WriteString("id", healthcheckDocumentsDatabase.Id); + else + writer.WriteNull("id"); + + if (healthcheckDocumentsDatabase.VarVersion != null) + writer.WriteString("version", healthcheckDocumentsDatabase.VarVersion); + else + writer.WriteNull("version"); + + if (healthcheckDocumentsDatabase.ExportDate != null) + writer.WriteString("exportDate", healthcheckDocumentsDatabase.ExportDate.Value.ToString(ExportDateFormat)); + else + writer.WriteNull("exportDate"); + + if (healthcheckDocumentsDatabase.Description != null) + writer.WriteString("description", healthcheckDocumentsDatabase.Description); + else + writer.WriteNull("description"); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs new file mode 100644 index 0000000..99bb4ef --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs @@ -0,0 +1,302 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// IdentItem + /// + public partial class IdentItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// elementType + /// lightIndex + /// image + /// etalonImage + /// area + /// areaList + [JsonConstructor] + public IdentItem(SecurityFeatureType elementType, Light lightIndex, ImageData image, ImageData etalonImage, Option area = default, Option areaList = default) + { + ElementType = elementType; + LightIndex = lightIndex; + Image = image; + EtalonImage = etalonImage; + AreaOption = area; + AreaListOption = areaList; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ElementType + /// + [JsonPropertyName("ElementType")] + public SecurityFeatureType ElementType { get; set; } + + /// + /// Gets or Sets LightIndex + /// + [JsonPropertyName("LightIndex")] + public Light LightIndex { get; set; } + + /// + /// Gets or Sets Image + /// + [JsonPropertyName("Image")] + public ImageData Image { get; set; } + + /// + /// Gets or Sets EtalonImage + /// + [JsonPropertyName("EtalonImage")] + public ImageData EtalonImage { get; set; } + + /// + /// Used to track the state of Area + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AreaOption { get; private set; } + + /// + /// Gets or Sets Area + /// + [JsonPropertyName("Area")] + public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new(value); } } + + /// + /// Used to track the state of AreaList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AreaListOption { get; private set; } + + /// + /// Gets or Sets AreaList + /// + [JsonPropertyName("AreaList")] + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class IdentItem {\n"); + sb.Append(" ElementType: ").Append(ElementType).Append("\n"); + sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); + sb.Append(" Image: ").Append(Image).Append("\n"); + sb.Append(" EtalonImage: ").Append(EtalonImage).Append("\n"); + sb.Append(" Area: ").Append(Area).Append("\n"); + sb.Append(" AreaList: ").Append(AreaList).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class IdentItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override IdentItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option elementType = default; + Option lightIndex = default; + Option image = default; + Option etalonImage = default; + Option area = default; + Option areaList = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ElementType": + string? elementTypeRawValue = utf8JsonReader.GetString(); + if (elementTypeRawValue != null) + elementType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(elementTypeRawValue)); + break; + case "LightIndex": + string? lightIndexRawValue = utf8JsonReader.GetString(); + if (lightIndexRawValue != null) + lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); + break; + case "Image": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "EtalonImage": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Area": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + area = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "AreaList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + areaList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!elementType.IsSet) + throw new ArgumentException("Property is required for class IdentItem.", nameof(elementType)); + + if (!lightIndex.IsSet) + throw new ArgumentException("Property is required for class IdentItem.", nameof(lightIndex)); + + if (!image.IsSet) + throw new ArgumentException("Property is required for class IdentItem.", nameof(image)); + + if (!etalonImage.IsSet) + throw new ArgumentException("Property is required for class IdentItem.", nameof(etalonImage)); + + if (elementType.IsSet && elementType.Value == null) + throw new ArgumentNullException(nameof(elementType), "Property is not nullable for class IdentItem."); + + if (lightIndex.IsSet && lightIndex.Value == null) + throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class IdentItem."); + + if (image.IsSet && image.Value == null) + throw new ArgumentNullException(nameof(image), "Property is not nullable for class IdentItem."); + + if (etalonImage.IsSet && etalonImage.Value == null) + throw new ArgumentNullException(nameof(etalonImage), "Property is not nullable for class IdentItem."); + + if (area.IsSet && area.Value == null) + throw new ArgumentNullException(nameof(area), "Property is not nullable for class IdentItem."); + + if (areaList.IsSet && areaList.Value == null) + throw new ArgumentNullException(nameof(areaList), "Property is not nullable for class IdentItem."); + + return new IdentItem(elementType.Value!.Value!, lightIndex.Value!.Value!, image.Value!, etalonImage.Value!, area, areaList); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, IdentItem identItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, identItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, IdentItem identItem, JsonSerializerOptions jsonSerializerOptions) + { + if (identItem.Image == null) + throw new ArgumentNullException(nameof(identItem.Image), "Property is required for class IdentItem."); + + if (identItem.EtalonImage == null) + throw new ArgumentNullException(nameof(identItem.EtalonImage), "Property is required for class IdentItem."); + + if (identItem.AreaOption.IsSet && identItem.Area == null) + throw new ArgumentNullException(nameof(identItem.Area), "Property is required for class IdentItem."); + + if (identItem.AreaListOption.IsSet && identItem.AreaList == null) + throw new ArgumentNullException(nameof(identItem.AreaList), "Property is required for class IdentItem."); + + var elementTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(identItem.ElementType); + writer.WriteNumber("ElementType", elementTypeRawValue); + + var lightIndexRawValue = LightValueConverter.ToJsonValue(identItem.LightIndex); + writer.WriteNumber("LightIndex", lightIndexRawValue); + + writer.WritePropertyName("Image"); + JsonSerializer.Serialize(writer, identItem.Image, jsonSerializerOptions); + writer.WritePropertyName("EtalonImage"); + JsonSerializer.Serialize(writer, identItem.EtalonImage, jsonSerializerOptions); + if (identItem.AreaOption.IsSet) + { + writer.WritePropertyName("Area"); + JsonSerializer.Serialize(writer, identItem.Area, jsonSerializerOptions); + } + if (identItem.AreaListOption.IsSet) + { + writer.WritePropertyName("AreaList"); + JsonSerializer.Serialize(writer, identItem.AreaList, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs index bacec7f..8b56f85 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs @@ -1,94 +1,110 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// IdentResult /// - [DataContract] - public partial class IdentResult : AuthenticityCheckResultItem, IEquatable, IValidatableObject + public partial class IdentResult : AuthenticityCheckResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected IdentResult() { } - /// - /// Initializes a new instance of the class. - /// - /// elementType. - /// lightIndex. - /// area. - /// image. - /// etalonImage. - /// areaList. - public IdentResult(int elementType = default(int), int lightIndex = default(int), RectangleCoordinates area = default(RectangleCoordinates), ImageData image = default(ImageData), ImageData etalonImage = default(ImageData), AreaContainer areaList = default(AreaContainer), int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + /// elementType + /// lightIndex + /// image + /// etalonImage + /// elementResult + /// elementDiagnose + /// percentValue + /// area + /// areaList + [JsonConstructor] + public IdentResult(SecurityFeatureType elementType, Light lightIndex, ImageData image, ImageData etalonImage, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option area = default, Option areaList = default) : base(elementResult, elementDiagnose, percentValue) { - this.ElementType = elementType; - this.LightIndex = lightIndex; - this.Area = area; - this.Image = image; - this.EtalonImage = etalonImage; - this.AreaList = areaList; + ElementType = elementType; + LightIndex = lightIndex; + Image = image; + EtalonImage = etalonImage; + AreaOption = area; + AreaListOption = areaList; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets ElementType /// - [DataMember(Name="ElementType", EmitDefaultValue=false)] - public int ElementType { get; set; } + [JsonPropertyName("ElementType")] + public SecurityFeatureType ElementType { get; set; } /// /// Gets or Sets LightIndex /// - [DataMember(Name="LightIndex", EmitDefaultValue=false)] - public int LightIndex { get; set; } - - /// - /// Gets or Sets Area - /// - [DataMember(Name="Area", EmitDefaultValue=false)] - public RectangleCoordinates Area { get; set; } + [JsonPropertyName("LightIndex")] + public Light LightIndex { get; set; } /// /// Gets or Sets Image /// - [DataMember(Name="Image", EmitDefaultValue=false)] + [JsonPropertyName("Image")] public ImageData Image { get; set; } /// /// Gets or Sets EtalonImage /// - [DataMember(Name="EtalonImage", EmitDefaultValue=false)] + [JsonPropertyName("EtalonImage")] public ImageData EtalonImage { get; set; } + /// + /// Used to track the state of Area + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AreaOption { get; private set; } + + /// + /// Gets or Sets Area + /// + [JsonPropertyName("Area")] + public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new(value); } } + + /// + /// Used to track the state of AreaList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AreaListOption { get; private set; } + /// /// Gets or Sets AreaList /// - [DataMember(Name="AreaList", EmitDefaultValue=false)] - public AreaContainer AreaList { get; set; } + [JsonPropertyName("AreaList")] + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } /// /// Returns the string presentation of the object @@ -96,116 +112,237 @@ protected IdentResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class IdentResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" ElementType: ").Append(ElementType).Append("\n"); sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); - sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" Image: ").Append(Image).Append("\n"); sb.Append(" EtalonImage: ").Append(EtalonImage).Append("\n"); + sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" AreaList: ").Append(AreaList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class IdentResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override IdentResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as IdentResult); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option elementType = default; + Option lightIndex = default; + Option image = default; + Option etalonImage = default; + Option type = default; + Option elementResult = default; + Option elementDiagnose = default; + Option percentValue = default; + Option area = default; + Option areaList = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ElementType": + string? elementTypeRawValue = utf8JsonReader.GetString(); + if (elementTypeRawValue != null) + elementType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(elementTypeRawValue)); + break; + case "LightIndex": + string? lightIndexRawValue = utf8JsonReader.GetString(); + if (lightIndexRawValue != null) + lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); + break; + case "Image": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "EtalonImage": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + case "ElementResult": + string? elementResultRawValue = utf8JsonReader.GetString(); + if (elementResultRawValue != null) + elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); + break; + case "ElementDiagnose": + string? elementDiagnoseRawValue = utf8JsonReader.GetString(); + if (elementDiagnoseRawValue != null) + elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); + break; + case "PercentValue": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + percentValue = new Option(utf8JsonReader.GetInt32()); + break; + case "Area": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + area = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "AreaList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + areaList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!elementType.IsSet) + throw new ArgumentException("Property is required for class IdentResult.", nameof(elementType)); + + if (!lightIndex.IsSet) + throw new ArgumentException("Property is required for class IdentResult.", nameof(lightIndex)); + + if (!image.IsSet) + throw new ArgumentException("Property is required for class IdentResult.", nameof(image)); + + if (!etalonImage.IsSet) + throw new ArgumentException("Property is required for class IdentResult.", nameof(etalonImage)); + + if (!type.IsSet) + throw new ArgumentException("Property is required for class IdentResult.", nameof(type)); + + if (elementType.IsSet && elementType.Value == null) + throw new ArgumentNullException(nameof(elementType), "Property is not nullable for class IdentResult."); + + if (lightIndex.IsSet && lightIndex.Value == null) + throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class IdentResult."); + + if (image.IsSet && image.Value == null) + throw new ArgumentNullException(nameof(image), "Property is not nullable for class IdentResult."); + + if (etalonImage.IsSet && etalonImage.Value == null) + throw new ArgumentNullException(nameof(etalonImage), "Property is not nullable for class IdentResult."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class IdentResult."); + + if (elementResult.IsSet && elementResult.Value == null) + throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class IdentResult."); + + if (elementDiagnose.IsSet && elementDiagnose.Value == null) + throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class IdentResult."); + + if (percentValue.IsSet && percentValue.Value == null) + throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class IdentResult."); + + if (area.IsSet && area.Value == null) + throw new ArgumentNullException(nameof(area), "Property is not nullable for class IdentResult."); + + if (areaList.IsSet && areaList.Value == null) + throw new ArgumentNullException(nameof(areaList), "Property is not nullable for class IdentResult."); + + return new IdentResult(elementType.Value!.Value!, lightIndex.Value!.Value!, image.Value!, etalonImage.Value!, elementResult, elementDiagnose, percentValue, area, areaList); } /// - /// Returns true if IdentResult instances are equal + /// Serializes a /// - /// Instance of IdentResult to be compared - /// Boolean - public bool Equals(IdentResult input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, IdentResult identResult, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.ElementType == input.ElementType || - (this.ElementType != null && - this.ElementType.Equals(input.ElementType)) - ) && base.Equals(input) && - ( - this.LightIndex == input.LightIndex || - (this.LightIndex != null && - this.LightIndex.Equals(input.LightIndex)) - ) && base.Equals(input) && - ( - this.Area == input.Area || - (this.Area != null && - this.Area.Equals(input.Area)) - ) && base.Equals(input) && - ( - this.Image == input.Image || - (this.Image != null && - this.Image.Equals(input.Image)) - ) && base.Equals(input) && - ( - this.EtalonImage == input.EtalonImage || - (this.EtalonImage != null && - this.EtalonImage.Equals(input.EtalonImage)) - ) && base.Equals(input) && - ( - this.AreaList == input.AreaList || - (this.AreaList != null && - this.AreaList.Equals(input.AreaList)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, identResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, IdentResult identResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (identResult.Image == null) + throw new ArgumentNullException(nameof(identResult.Image), "Property is required for class IdentResult."); + + if (identResult.EtalonImage == null) + throw new ArgumentNullException(nameof(identResult.EtalonImage), "Property is required for class IdentResult."); + + if (identResult.AreaOption.IsSet && identResult.Area == null) + throw new ArgumentNullException(nameof(identResult.Area), "Property is required for class IdentResult."); + + if (identResult.AreaListOption.IsSet && identResult.AreaList == null) + throw new ArgumentNullException(nameof(identResult.AreaList), "Property is required for class IdentResult."); + + var elementTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(identResult.ElementType); + writer.WriteNumber("ElementType", elementTypeRawValue); + + var lightIndexRawValue = LightValueConverter.ToJsonValue(identResult.LightIndex); + writer.WriteNumber("LightIndex", lightIndexRawValue); + + writer.WritePropertyName("Image"); + JsonSerializer.Serialize(writer, identResult.Image, jsonSerializerOptions); + writer.WritePropertyName("EtalonImage"); + JsonSerializer.Serialize(writer, identResult.EtalonImage, jsonSerializerOptions); + writer.WriteString("Type", identResult.Type); + + if (identResult.ElementResultOption.IsSet) { - int hashCode = base.GetHashCode(); - if (this.ElementType != null) - hashCode = hashCode * 59 + this.ElementType.GetHashCode(); - if (this.LightIndex != null) - hashCode = hashCode * 59 + this.LightIndex.GetHashCode(); - if (this.Area != null) - hashCode = hashCode * 59 + this.Area.GetHashCode(); - if (this.Image != null) - hashCode = hashCode * 59 + this.Image.GetHashCode(); - if (this.EtalonImage != null) - hashCode = hashCode * 59 + this.EtalonImage.GetHashCode(); - if (this.AreaList != null) - hashCode = hashCode * 59 + this.AreaList.GetHashCode(); - return hashCode; + var elementResultRawValue = CheckResultValueConverter.ToJsonValue(identResult.ElementResult!.Value); + writer.WriteNumber("ElementResult", elementResultRawValue); } - } + if (identResult.ElementDiagnoseOption.IsSet) + { + var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(identResult.ElementDiagnose!.Value); + writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); + } + if (identResult.PercentValueOption.IsSet) + writer.WriteNumber("PercentValue", identResult.PercentValueOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (identResult.AreaOption.IsSet) + { + writer.WritePropertyName("Area"); + JsonSerializer.Serialize(writer, identResult.Area, jsonSerializerOptions); + } + if (identResult.AreaListOption.IsSet) + { + writer.WritePropertyName("AreaList"); + JsonSerializer.Serialize(writer, identResult.AreaList, jsonSerializerOptions); + } } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs index 9dd1825..6d45c03 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs @@ -1,73 +1,71 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageData /// - [DataContract] - public partial class ImageData : IEquatable, IValidatableObject + public partial class ImageData : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ImageData() { } - /// - /// Initializes a new instance of the class. - /// - /// Base64 encoded image (required). - /// Image format. - public ImageData(string image = default(string), string format = default(string)) + /// Base64 encoded image + /// Image format + [JsonConstructor] + public ImageData(string image, Option format = default) { - // to ensure "image" is required (not null) - if (image == null) - { - throw new InvalidDataException("image is a required property for ImageData and cannot be null"); - } - else - { - this.Image = image; - } - - this.Format = format; + Image = image; + FormatOption = format; + OnCreated(); } - + + partial void OnCreated(); + /// /// Base64 encoded image /// /// Base64 encoded image - [DataMember(Name="image", EmitDefaultValue=true)] + /* Base64 encoded image */ + [JsonPropertyName("image")] public string Image { get; set; } + /// + /// Used to track the state of Format + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FormatOption { get; private set; } + /// /// Image format /// /// Image format - [DataMember(Name="format", EmitDefaultValue=false)] - public string Format { get; set; } + [JsonPropertyName("format")] + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } /// /// Returns the string presentation of the object @@ -75,82 +73,123 @@ protected ImageData() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImageData {\n"); sb.Append(" Image: ").Append(Image).Append("\n"); sb.Append(" Format: ").Append(Format).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ImageData); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImageDataJsonConverter : JsonConverter + { /// - /// Returns true if ImageData instances are equal + /// Deserializes json to /// - /// Instance of ImageData to be compared - /// Boolean - public bool Equals(ImageData input) + /// + /// + /// + /// + /// + public override ImageData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Image == input.Image || - (this.Image != null && - this.Image.Equals(input.Image)) - ) && - ( - this.Format == input.Format || - (this.Format != null && - this.Format.Equals(input.Format)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option image = default; + Option format = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "image": + image = new Option(utf8JsonReader.GetString()!); + break; + case "format": + format = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!image.IsSet) + throw new ArgumentException("Property is required for class ImageData.", nameof(image)); + + if (image.IsSet && image.Value == null) + throw new ArgumentNullException(nameof(image), "Property is not nullable for class ImageData."); + + if (format.IsSet && format.Value == null) + throw new ArgumentNullException(nameof(format), "Property is not nullable for class ImageData."); + + return new ImageData(image.Value!, format); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageData imageData, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Image != null) - hashCode = hashCode * 59 + this.Image.GetHashCode(); - if (this.Format != null) - hashCode = hashCode * 59 + this.Format.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, imageData, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImageData imageData, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (imageData.Image == null) + throw new ArgumentNullException(nameof(imageData.Image), "Property is required for class ImageData."); + + if (imageData.FormatOption.IsSet && imageData.Format == null) + throw new ArgumentNullException(nameof(imageData.Format), "Property is required for class ImageData."); + + writer.WriteString("image", imageData.Image); + + if (imageData.FormatOption.IsSet) + writer.WriteString("format", imageData.Format); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs index b8eba50..1d89d05 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs @@ -1,113 +1,189 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQA /// - [DataContract] - public partial class ImageQA : IEquatable, IValidatableObject + public partial class ImageQA : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Set the threshold for an actual document brightness below which the check fails. - /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail.. - /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail.. - /// This option enables focus check while performing image quality validation.. - /// This option enables glares check while performing image quality validation.. - /// This option enables colorness check while performing image quality validation.. - /// This parameter specifies the necessary margin. Default 0.. - /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process.. - public ImageQA(double brightnessThreshold = default(double), int dpiThreshold = default(int), int angleThreshold = default(int), bool? focusCheck = default(bool?), bool? glaresCheck = default(bool?), bool? colornessCheck = default(bool?), int documentPositionIndent = default(int), List expectedPass = default(List)) + /// Set the threshold for an actual document brightness below which the check fails + /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. + /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. + /// This option enables focus check while performing image quality validation. + /// This option enables glares check while performing image quality validation. + /// This option enables colorness check while performing image quality validation. + /// This option enables screen capture (moire patterns) check while performing image quality validation. + /// This parameter specifies the necessary margin. Default 0. + /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. + [JsonConstructor] + public ImageQA(Option brightnessThreshold = default, Option dpiThreshold = default, Option angleThreshold = default, Option focusCheck = default, Option glaresCheck = default, Option colornessCheck = default, Option moireCheck = default, Option documentPositionIndent = default, Option?> expectedPass = default) { - this.BrightnessThreshold = brightnessThreshold; - this.DpiThreshold = dpiThreshold; - this.AngleThreshold = angleThreshold; - this.FocusCheck = focusCheck; - this.GlaresCheck = glaresCheck; - this.ColornessCheck = colornessCheck; - this.DocumentPositionIndent = documentPositionIndent; - this.ExpectedPass = expectedPass; + BrightnessThresholdOption = brightnessThreshold; + DpiThresholdOption = dpiThreshold; + AngleThresholdOption = angleThreshold; + FocusCheckOption = focusCheck; + GlaresCheckOption = glaresCheck; + ColornessCheckOption = colornessCheck; + MoireCheckOption = moireCheck; + DocumentPositionIndentOption = documentPositionIndent; + ExpectedPassOption = expectedPass; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of BrightnessThreshold + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BrightnessThresholdOption { get; private set; } + /// /// Set the threshold for an actual document brightness below which the check fails /// /// Set the threshold for an actual document brightness below which the check fails - [DataMember(Name="brightnessThreshold", EmitDefaultValue=false)] - public double BrightnessThreshold { get; set; } + [JsonPropertyName("brightnessThreshold")] + public double? BrightnessThreshold { get { return this.BrightnessThresholdOption; } set { this.BrightnessThresholdOption = new(value); } } + + /// + /// Used to track the state of DpiThreshold + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DpiThresholdOption { get; private set; } /// /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. /// /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. - [DataMember(Name="dpiThreshold", EmitDefaultValue=false)] - public int DpiThreshold { get; set; } + [JsonPropertyName("dpiThreshold")] + public int? DpiThreshold { get { return this.DpiThresholdOption; } set { this.DpiThresholdOption = new(value); } } + + /// + /// Used to track the state of AngleThreshold + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AngleThresholdOption { get; private set; } /// /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. /// /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. - [DataMember(Name="angleThreshold", EmitDefaultValue=false)] - public int AngleThreshold { get; set; } + [JsonPropertyName("angleThreshold")] + public int? AngleThreshold { get { return this.AngleThresholdOption; } set { this.AngleThresholdOption = new(value); } } + + /// + /// Used to track the state of FocusCheck + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FocusCheckOption { get; private set; } /// /// This option enables focus check while performing image quality validation. /// /// This option enables focus check while performing image quality validation. - [DataMember(Name="focusCheck", EmitDefaultValue=false)] - public bool? FocusCheck { get; set; } + [JsonPropertyName("focusCheck")] + public bool? FocusCheck { get { return this.FocusCheckOption; } set { this.FocusCheckOption = new(value); } } + + /// + /// Used to track the state of GlaresCheck + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option GlaresCheckOption { get; private set; } /// /// This option enables glares check while performing image quality validation. /// /// This option enables glares check while performing image quality validation. - [DataMember(Name="glaresCheck", EmitDefaultValue=false)] - public bool? GlaresCheck { get; set; } + [JsonPropertyName("glaresCheck")] + public bool? GlaresCheck { get { return this.GlaresCheckOption; } set { this.GlaresCheckOption = new(value); } } + + /// + /// Used to track the state of ColornessCheck + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ColornessCheckOption { get; private set; } /// /// This option enables colorness check while performing image quality validation. /// /// This option enables colorness check while performing image quality validation. - [DataMember(Name="colornessCheck", EmitDefaultValue=false)] - public bool? ColornessCheck { get; set; } + [JsonPropertyName("colornessCheck")] + public bool? ColornessCheck { get { return this.ColornessCheckOption; } set { this.ColornessCheckOption = new(value); } } + + /// + /// Used to track the state of MoireCheck + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option MoireCheckOption { get; private set; } + + /// + /// This option enables screen capture (moire patterns) check while performing image quality validation. + /// + /// This option enables screen capture (moire patterns) check while performing image quality validation. + [JsonPropertyName("moireCheck")] + public bool? MoireCheck { get { return this.MoireCheckOption; } set { this.MoireCheckOption = new(value); } } + + /// + /// Used to track the state of DocumentPositionIndent + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DocumentPositionIndentOption { get; private set; } /// /// This parameter specifies the necessary margin. Default 0. /// /// This parameter specifies the necessary margin. Default 0. - [DataMember(Name="documentPositionIndent", EmitDefaultValue=false)] - public int DocumentPositionIndent { get; set; } + [JsonPropertyName("documentPositionIndent")] + public int? DocumentPositionIndent { get { return this.DocumentPositionIndentOption; } set { this.DocumentPositionIndentOption = new(value); } } + + /// + /// Used to track the state of ExpectedPass + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ExpectedPassOption { get; private set; } /// /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. /// /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. - [DataMember(Name="expectedPass", EmitDefaultValue=false)] - public List ExpectedPass { get; set; } + [JsonPropertyName("expectedPass")] + public List? ExpectedPass { get { return this.ExpectedPassOption; } set { this.ExpectedPassOption = new(value); } } /// /// Returns the string presentation of the object @@ -115,7 +191,7 @@ public partial class ImageQA : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImageQA {\n"); sb.Append(" BrightnessThreshold: ").Append(BrightnessThreshold).Append("\n"); sb.Append(" DpiThreshold: ").Append(DpiThreshold).Append("\n"); @@ -123,123 +199,199 @@ public override string ToString() sb.Append(" FocusCheck: ").Append(FocusCheck).Append("\n"); sb.Append(" GlaresCheck: ").Append(GlaresCheck).Append("\n"); sb.Append(" ColornessCheck: ").Append(ColornessCheck).Append("\n"); + sb.Append(" MoireCheck: ").Append(MoireCheck).Append("\n"); sb.Append(" DocumentPositionIndent: ").Append(DocumentPositionIndent).Append("\n"); sb.Append(" ExpectedPass: ").Append(ExpectedPass).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImageQAJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ImageQA Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ImageQA); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option brightnessThreshold = default; + Option dpiThreshold = default; + Option angleThreshold = default; + Option focusCheck = default; + Option glaresCheck = default; + Option colornessCheck = default; + Option moireCheck = default; + Option documentPositionIndent = default; + Option?> expectedPass = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "brightnessThreshold": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + brightnessThreshold = new Option(utf8JsonReader.GetDouble()); + break; + case "dpiThreshold": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + dpiThreshold = new Option(utf8JsonReader.GetInt32()); + break; + case "angleThreshold": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + angleThreshold = new Option(utf8JsonReader.GetInt32()); + break; + case "focusCheck": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + focusCheck = new Option(utf8JsonReader.GetBoolean()); + break; + case "glaresCheck": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + glaresCheck = new Option(utf8JsonReader.GetBoolean()); + break; + case "colornessCheck": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + colornessCheck = new Option(utf8JsonReader.GetBoolean()); + break; + case "moireCheck": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + moireCheck = new Option(utf8JsonReader.GetBoolean()); + break; + case "documentPositionIndent": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + documentPositionIndent = new Option(utf8JsonReader.GetInt32()); + break; + case "expectedPass": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + expectedPass = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (brightnessThreshold.IsSet && brightnessThreshold.Value == null) + throw new ArgumentNullException(nameof(brightnessThreshold), "Property is not nullable for class ImageQA."); + + if (dpiThreshold.IsSet && dpiThreshold.Value == null) + throw new ArgumentNullException(nameof(dpiThreshold), "Property is not nullable for class ImageQA."); + + if (angleThreshold.IsSet && angleThreshold.Value == null) + throw new ArgumentNullException(nameof(angleThreshold), "Property is not nullable for class ImageQA."); + + if (focusCheck.IsSet && focusCheck.Value == null) + throw new ArgumentNullException(nameof(focusCheck), "Property is not nullable for class ImageQA."); + + if (glaresCheck.IsSet && glaresCheck.Value == null) + throw new ArgumentNullException(nameof(glaresCheck), "Property is not nullable for class ImageQA."); + + if (colornessCheck.IsSet && colornessCheck.Value == null) + throw new ArgumentNullException(nameof(colornessCheck), "Property is not nullable for class ImageQA."); + + if (moireCheck.IsSet && moireCheck.Value == null) + throw new ArgumentNullException(nameof(moireCheck), "Property is not nullable for class ImageQA."); + + if (documentPositionIndent.IsSet && documentPositionIndent.Value == null) + throw new ArgumentNullException(nameof(documentPositionIndent), "Property is not nullable for class ImageQA."); + + if (expectedPass.IsSet && expectedPass.Value == null) + throw new ArgumentNullException(nameof(expectedPass), "Property is not nullable for class ImageQA."); + + return new ImageQA(brightnessThreshold, dpiThreshold, angleThreshold, focusCheck, glaresCheck, colornessCheck, moireCheck, documentPositionIndent, expectedPass); } /// - /// Returns true if ImageQA instances are equal + /// Serializes a /// - /// Instance of ImageQA to be compared - /// Boolean - public bool Equals(ImageQA input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageQA imageQA, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.BrightnessThreshold == input.BrightnessThreshold || - (this.BrightnessThreshold != null && - this.BrightnessThreshold.Equals(input.BrightnessThreshold)) - ) && - ( - this.DpiThreshold == input.DpiThreshold || - (this.DpiThreshold != null && - this.DpiThreshold.Equals(input.DpiThreshold)) - ) && - ( - this.AngleThreshold == input.AngleThreshold || - (this.AngleThreshold != null && - this.AngleThreshold.Equals(input.AngleThreshold)) - ) && - ( - this.FocusCheck == input.FocusCheck || - (this.FocusCheck != null && - this.FocusCheck.Equals(input.FocusCheck)) - ) && - ( - this.GlaresCheck == input.GlaresCheck || - (this.GlaresCheck != null && - this.GlaresCheck.Equals(input.GlaresCheck)) - ) && - ( - this.ColornessCheck == input.ColornessCheck || - (this.ColornessCheck != null && - this.ColornessCheck.Equals(input.ColornessCheck)) - ) && - ( - this.DocumentPositionIndent == input.DocumentPositionIndent || - (this.DocumentPositionIndent != null && - this.DocumentPositionIndent.Equals(input.DocumentPositionIndent)) - ) && - ( - this.ExpectedPass == input.ExpectedPass || - this.ExpectedPass != null && - input.ExpectedPass != null && - this.ExpectedPass.SequenceEqual(input.ExpectedPass) - ); + writer.WriteStartObject(); + + WriteProperties(writer, imageQA, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImageQA imageQA, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (imageQA.ExpectedPassOption.IsSet && imageQA.ExpectedPass == null) + throw new ArgumentNullException(nameof(imageQA.ExpectedPass), "Property is required for class ImageQA."); + + if (imageQA.BrightnessThresholdOption.IsSet) + writer.WriteNumber("brightnessThreshold", imageQA.BrightnessThresholdOption.Value!.Value); + + if (imageQA.DpiThresholdOption.IsSet) + writer.WriteNumber("dpiThreshold", imageQA.DpiThresholdOption.Value!.Value); + + if (imageQA.AngleThresholdOption.IsSet) + writer.WriteNumber("angleThreshold", imageQA.AngleThresholdOption.Value!.Value); + + if (imageQA.FocusCheckOption.IsSet) + writer.WriteBoolean("focusCheck", imageQA.FocusCheckOption.Value!.Value); + + if (imageQA.GlaresCheckOption.IsSet) + writer.WriteBoolean("glaresCheck", imageQA.GlaresCheckOption.Value!.Value); + + if (imageQA.ColornessCheckOption.IsSet) + writer.WriteBoolean("colornessCheck", imageQA.ColornessCheckOption.Value!.Value); + + if (imageQA.MoireCheckOption.IsSet) + writer.WriteBoolean("moireCheck", imageQA.MoireCheckOption.Value!.Value); + + if (imageQA.DocumentPositionIndentOption.IsSet) + writer.WriteNumber("documentPositionIndent", imageQA.DocumentPositionIndentOption.Value!.Value); + + if (imageQA.ExpectedPassOption.IsSet) { - int hashCode = 41; - if (this.BrightnessThreshold != null) - hashCode = hashCode * 59 + this.BrightnessThreshold.GetHashCode(); - if (this.DpiThreshold != null) - hashCode = hashCode * 59 + this.DpiThreshold.GetHashCode(); - if (this.AngleThreshold != null) - hashCode = hashCode * 59 + this.AngleThreshold.GetHashCode(); - if (this.FocusCheck != null) - hashCode = hashCode * 59 + this.FocusCheck.GetHashCode(); - if (this.GlaresCheck != null) - hashCode = hashCode * 59 + this.GlaresCheck.GetHashCode(); - if (this.ColornessCheck != null) - hashCode = hashCode * 59 + this.ColornessCheck.GetHashCode(); - if (this.DocumentPositionIndent != null) - hashCode = hashCode * 59 + this.DocumentPositionIndent.GetHashCode(); - if (this.ExpectedPass != null) - hashCode = hashCode * 59 + this.ExpectedPass.GetHashCode(); - return hashCode; + writer.WritePropertyName("expectedPass"); + JsonSerializer.Serialize(writer, imageQA.ExpectedPass, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs index 21a6566..7cdbbf7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs @@ -1,220 +1,313 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQualityCheck /// - [DataContract] - public partial class ImageQualityCheck : IEquatable, IValidatableObject + public partial class ImageQualityCheck : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// type. - /// result. - /// featureType. - /// areas. - /// mean. - /// stdDev. - /// probability. - public ImageQualityCheck(int type = default(int), int result = default(int), int featureType = default(int), AreaArray areas = default(AreaArray), float mean = default(float), float stdDev = default(float), int probability = default(int)) + /// type + /// result + /// featureType + /// Check mean value + /// Check deviation value + /// Check probability value + /// areas + [JsonConstructor] + public ImageQualityCheck(ImageQualityCheckType type, CheckResult result, SecurityFeatureType featureType, float mean, float stdDev, int probability, Option areas = default) { - this.Type = type; - this.Result = result; - this.FeatureType = featureType; - this.Areas = areas; - this.Mean = mean; - this.StdDev = stdDev; - this.Probability = probability; + Type = type; + Result = result; + FeatureType = featureType; + Mean = mean; + StdDev = stdDev; + Probability = probability; + AreasOption = areas; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Type /// - [DataMember(Name="type", EmitDefaultValue=false)] - public int Type { get; set; } + [JsonPropertyName("type")] + public ImageQualityCheckType Type { get; set; } /// /// Gets or Sets Result /// - [DataMember(Name="result", EmitDefaultValue=false)] - public int Result { get; set; } + [JsonPropertyName("result")] + public CheckResult Result { get; set; } /// /// Gets or Sets FeatureType /// - [DataMember(Name="featureType", EmitDefaultValue=false)] - public int FeatureType { get; set; } + [JsonPropertyName("featureType")] + public SecurityFeatureType FeatureType { get; set; } /// - /// Gets or Sets Areas + /// Check mean value /// - [DataMember(Name="areas", EmitDefaultValue=false)] - public AreaArray Areas { get; set; } - - /// - /// Gets or Sets Mean - /// - [DataMember(Name="mean", EmitDefaultValue=false)] + /// Check mean value + [JsonPropertyName("mean")] public float Mean { get; set; } /// - /// Gets or Sets StdDev + /// Check deviation value /// - [DataMember(Name="std_dev", EmitDefaultValue=false)] + /// Check deviation value + [JsonPropertyName("std_dev")] public float StdDev { get; set; } /// - /// Gets or Sets Probability + /// Check probability value /// - [DataMember(Name="probability", EmitDefaultValue=false)] + /// Check probability value + [JsonPropertyName("probability")] public int Probability { get; set; } + /// + /// Used to track the state of Areas + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AreasOption { get; private set; } + + /// + /// Gets or Sets Areas + /// + [JsonPropertyName("areas")] + public AreaArray? Areas { get { return this.AreasOption; } set { this.AreasOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImageQualityCheck {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Result: ").Append(Result).Append("\n"); sb.Append(" FeatureType: ").Append(FeatureType).Append("\n"); - sb.Append(" Areas: ").Append(Areas).Append("\n"); sb.Append(" Mean: ").Append(Mean).Append("\n"); sb.Append(" StdDev: ").Append(StdDev).Append("\n"); sb.Append(" Probability: ").Append(Probability).Append("\n"); + sb.Append(" Areas: ").Append(Areas).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImageQualityCheckJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ImageQualityCheck Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ImageQualityCheck); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option result = default; + Option featureType = default; + Option mean = default; + Option stdDev = default; + Option probability = default; + Option areas = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "type": + string? typeRawValue = utf8JsonReader.GetString(); + if (typeRawValue != null) + type = new Option(ImageQualityCheckTypeValueConverter.FromStringOrDefault(typeRawValue)); + break; + case "result": + string? resultRawValue = utf8JsonReader.GetString(); + if (resultRawValue != null) + result = new Option(CheckResultValueConverter.FromStringOrDefault(resultRawValue)); + break; + case "featureType": + string? featureTypeRawValue = utf8JsonReader.GetString(); + if (featureTypeRawValue != null) + featureType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(featureTypeRawValue)); + break; + case "mean": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mean = new Option((float)utf8JsonReader.GetDouble()); + break; + case "std_dev": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stdDev = new Option((float)utf8JsonReader.GetDouble()); + break; + case "probability": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + probability = new Option(utf8JsonReader.GetInt32()); + break; + case "areas": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + areas = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(type)); + + if (!result.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(result)); + + if (!featureType.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(featureType)); + + if (!mean.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(mean)); + + if (!stdDev.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(stdDev)); + + if (!probability.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(probability)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class ImageQualityCheck."); + + if (result.IsSet && result.Value == null) + throw new ArgumentNullException(nameof(result), "Property is not nullable for class ImageQualityCheck."); + + if (featureType.IsSet && featureType.Value == null) + throw new ArgumentNullException(nameof(featureType), "Property is not nullable for class ImageQualityCheck."); + + if (mean.IsSet && mean.Value == null) + throw new ArgumentNullException(nameof(mean), "Property is not nullable for class ImageQualityCheck."); + + if (stdDev.IsSet && stdDev.Value == null) + throw new ArgumentNullException(nameof(stdDev), "Property is not nullable for class ImageQualityCheck."); + + if (probability.IsSet && probability.Value == null) + throw new ArgumentNullException(nameof(probability), "Property is not nullable for class ImageQualityCheck."); + + if (areas.IsSet && areas.Value == null) + throw new ArgumentNullException(nameof(areas), "Property is not nullable for class ImageQualityCheck."); + + return new ImageQualityCheck(type.Value!.Value!, result.Value!.Value!, featureType.Value!.Value!, mean.Value!.Value!, stdDev.Value!.Value!, probability.Value!.Value!, areas); } /// - /// Returns true if ImageQualityCheck instances are equal + /// Serializes a /// - /// Instance of ImageQualityCheck to be compared - /// Boolean - public bool Equals(ImageQualityCheck input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageQualityCheck imageQualityCheck, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ) && - ( - this.FeatureType == input.FeatureType || - (this.FeatureType != null && - this.FeatureType.Equals(input.FeatureType)) - ) && - ( - this.Areas == input.Areas || - (this.Areas != null && - this.Areas.Equals(input.Areas)) - ) && - ( - this.Mean == input.Mean || - (this.Mean != null && - this.Mean.Equals(input.Mean)) - ) && - ( - this.StdDev == input.StdDev || - (this.StdDev != null && - this.StdDev.Equals(input.StdDev)) - ) && - ( - this.Probability == input.Probability || - (this.Probability != null && - this.Probability.Equals(input.Probability)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, imageQualityCheck, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImageQualityCheck imageQualityCheck, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (imageQualityCheck.AreasOption.IsSet && imageQualityCheck.Areas == null) + throw new ArgumentNullException(nameof(imageQualityCheck.Areas), "Property is required for class ImageQualityCheck."); + + var typeRawValue = ImageQualityCheckTypeValueConverter.ToJsonValue(imageQualityCheck.Type); + writer.WriteNumber("type", typeRawValue); + + var resultRawValue = CheckResultValueConverter.ToJsonValue(imageQualityCheck.Result); + writer.WriteNumber("result", resultRawValue); + + var featureTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(imageQualityCheck.FeatureType); + writer.WriteNumber("featureType", featureTypeRawValue); + + writer.WriteNumber("mean", imageQualityCheck.Mean); + + writer.WriteNumber("std_dev", imageQualityCheck.StdDev); + + writer.WriteNumber("probability", imageQualityCheck.Probability); + + if (imageQualityCheck.AreasOption.IsSet) { - int hashCode = 41; - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Result != null) - hashCode = hashCode * 59 + this.Result.GetHashCode(); - if (this.FeatureType != null) - hashCode = hashCode * 59 + this.FeatureType.GetHashCode(); - if (this.Areas != null) - hashCode = hashCode * 59 + this.Areas.GetHashCode(); - if (this.Mean != null) - hashCode = hashCode * 59 + this.Mean.GetHashCode(); - if (this.StdDev != null) - hashCode = hashCode * 59 + this.StdDev.GetHashCode(); - if (this.Probability != null) - hashCode = hashCode * 59 + this.Probability.GetHashCode(); - return hashCode; + writer.WritePropertyName("areas"); + JsonSerializer.Serialize(writer, imageQualityCheck.Areas, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs index 168aedb..706eb91 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs @@ -1,164 +1,211 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQualityCheckList /// - [DataContract] - public partial class ImageQualityCheckList : IEquatable, IValidatableObject + public partial class ImageQualityCheckList : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ImageQualityCheckList() { } - /// - /// Initializes a new instance of the class. - /// - /// result (required). - /// list (required). - public ImageQualityCheckList(int result = default(int), List list = default(List)) + /// result + /// list + /// Number of List array elements + [JsonConstructor] + public ImageQualityCheckList(CheckResult result, List list, decimal count) { - // to ensure "result" is required (not null) - if (result == null) - { - throw new InvalidDataException("result is a required property for ImageQualityCheckList and cannot be null"); - } - else - { - this.Result = result; - } - - // to ensure "list" is required (not null) - if (list == null) - { - throw new InvalidDataException("list is a required property for ImageQualityCheckList and cannot be null"); - } - else - { - this.List = list; - } - + Result = result; + List = list; + Count = count; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Result /// - [DataMember(Name="result", EmitDefaultValue=true)] - public int Result { get; set; } + [JsonPropertyName("result")] + public CheckResult Result { get; set; } /// /// Gets or Sets List /// - [DataMember(Name="List", EmitDefaultValue=true)] + [JsonPropertyName("List")] public List List { get; set; } + /// + /// Number of List array elements + /// + /// Number of List array elements + [JsonPropertyName("Count")] + public decimal Count { get; set; } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImageQualityCheckList {\n"); sb.Append(" Result: ").Append(Result).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ImageQualityCheckList); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImageQualityCheckListJsonConverter : JsonConverter + { /// - /// Returns true if ImageQualityCheckList instances are equal + /// Deserializes json to /// - /// Instance of ImageQualityCheckList to be compared - /// Boolean - public bool Equals(ImageQualityCheckList input) + /// + /// + /// + /// + /// + public override ImageQualityCheckList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option result = default; + Option?> list = default; + Option count = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "result": + string? resultRawValue = utf8JsonReader.GetString(); + if (resultRawValue != null) + result = new Option(CheckResultValueConverter.FromStringOrDefault(resultRawValue)); + break; + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetDecimal()); + break; + default: + break; + } + } + } + + if (!result.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheckList.", nameof(result)); + + if (!list.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheckList.", nameof(list)); + + if (!count.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheckList.", nameof(count)); + + if (result.IsSet && result.Value == null) + throw new ArgumentNullException(nameof(result), "Property is not nullable for class ImageQualityCheckList."); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class ImageQualityCheckList."); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class ImageQualityCheckList."); + + return new ImageQualityCheckList(result.Value!.Value!, list.Value!, count.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageQualityCheckList imageQualityCheckList, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Result != null) - hashCode = hashCode * 59 + this.Result.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, imageQualityCheckList, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImageQualityCheckList imageQualityCheckList, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (imageQualityCheckList.List == null) + throw new ArgumentNullException(nameof(imageQualityCheckList.List), "Property is required for class ImageQualityCheckList."); + + var resultRawValue = CheckResultValueConverter.ToJsonValue(imageQualityCheckList.Result); + writer.WriteNumber("result", resultRawValue); + + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, imageQualityCheckList.List, jsonSerializerOptions); + writer.WriteNumber("Count", imageQualityCheckList.Count); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs new file mode 100644 index 0000000..56af399 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ImageQualityCheckListItem + /// + public partial class ImageQualityCheckListItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// imageQualityCheckList + [JsonConstructor] + public ImageQualityCheckListItem(ImageQualityCheckList imageQualityCheckList) + { + ImageQualityCheckList = imageQualityCheckList; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ImageQualityCheckList + /// + [JsonPropertyName("ImageQualityCheckList")] + public ImageQualityCheckList ImageQualityCheckList { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ImageQualityCheckListItem {\n"); + sb.Append(" ImageQualityCheckList: ").Append(ImageQualityCheckList).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ImageQualityCheckListItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ImageQualityCheckListItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option imageQualityCheckList = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ImageQualityCheckList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + imageQualityCheckList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!imageQualityCheckList.IsSet) + throw new ArgumentException("Property is required for class ImageQualityCheckListItem.", nameof(imageQualityCheckList)); + + if (imageQualityCheckList.IsSet && imageQualityCheckList.Value == null) + throw new ArgumentNullException(nameof(imageQualityCheckList), "Property is not nullable for class ImageQualityCheckListItem."); + + return new ImageQualityCheckListItem(imageQualityCheckList.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageQualityCheckListItem imageQualityCheckListItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, imageQualityCheckListItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImageQualityCheckListItem imageQualityCheckListItem, JsonSerializerOptions jsonSerializerOptions) + { + if (imageQualityCheckListItem.ImageQualityCheckList == null) + throw new ArgumentNullException(nameof(imageQualityCheckListItem.ImageQualityCheckList), "Property is required for class ImageQualityCheckListItem."); + + writer.WritePropertyName("ImageQualityCheckList"); + JsonSerializer.Serialize(writer, imageQualityCheckListItem.ImageQualityCheckList, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs index 3cb1718..2200271 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs @@ -1,56 +1,236 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Image quality check type - public class ImageQualityCheckType + /// + /// Image quality check type + public enum ImageQualityCheckType + { + /// + /// Enum ImageGlares for value: 0 + /// + ImageGlares = 0, + + /// + /// Enum ImageFocus for value: 1 + /// + ImageFocus = 1, + + /// + /// Enum ImageResolution for value: 2 + /// + ImageResolution = 2, + + /// + /// Enum ImageColorness for value: 3 + /// + ImageColorness = 3, + + /// + /// Enum Perspective for value: 4 + /// + Perspective = 4, + + /// + /// Enum Bounds for value: 5 + /// + Bounds = 5, + + /// + /// Enum Portrait for value: 7 + /// + Portrait = 7, + + /// + /// Enum Brightness for value: 9 + /// + Brightness = 9 + } + + /// + /// Converts to and from the JSON value + /// + public static class ImageQualityCheckTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static ImageQualityCheckType FromString(string value) + { + if (value.Equals((0).ToString())) + return ImageQualityCheckType.ImageGlares; + + if (value.Equals((1).ToString())) + return ImageQualityCheckType.ImageFocus; + + if (value.Equals((2).ToString())) + return ImageQualityCheckType.ImageResolution; + + if (value.Equals((3).ToString())) + return ImageQualityCheckType.ImageColorness; + + if (value.Equals((4).ToString())) + return ImageQualityCheckType.Perspective; + + if (value.Equals((5).ToString())) + return ImageQualityCheckType.Bounds; + + if (value.Equals((7).ToString())) + return ImageQualityCheckType.Portrait; + + if (value.Equals((9).ToString())) + return ImageQualityCheckType.Brightness; + + throw new NotImplementedException($"Could not convert value to type ImageQualityCheckType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static ImageQualityCheckType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return ImageQualityCheckType.ImageGlares; + + if (value.Equals((1).ToString())) + return ImageQualityCheckType.ImageFocus; + + if (value.Equals((2).ToString())) + return ImageQualityCheckType.ImageResolution; + + if (value.Equals((3).ToString())) + return ImageQualityCheckType.ImageColorness; + + if (value.Equals((4).ToString())) + return ImageQualityCheckType.Perspective; + + if (value.Equals((5).ToString())) + return ImageQualityCheckType.Bounds; + + if (value.Equals((7).ToString())) + return ImageQualityCheckType.Portrait; + + if (value.Equals((9).ToString())) + return ImageQualityCheckType.Brightness; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(ImageQualityCheckType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class ImageQualityCheckTypeJsonConverter : JsonConverter { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override ImageQualityCheckType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** Signals glare presence on the image */ - public const int ImageGlares = 0; + ImageQualityCheckType? result = rawValue == null + ? null + : ImageQualityCheckTypeValueConverter.FromStringOrDefault(rawValue); - /** Signals whether image is in focus */ - public const int ImageFocus = 1; + if (result != null) + return result.Value; - /** Signals if image resolution is below threshold */ - public const int ImageResolution = 2; + throw new JsonException(); + } - /** Signals if image is colorless */ - public const int ImageColorness = 3; + /// + /// Writes the ImageQualityCheckType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageQualityCheckType imageQualityCheckType, JsonSerializerOptions options) + { + writer.WriteStringValue(imageQualityCheckType.ToString()); + } + } - /** Signals if document in the image has prespective distortion above threshold */ - public const int Perspective = 4; + /// + /// A Json converter for type + /// + public class ImageQualityCheckTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a ImageQualityCheckType from the Json object + /// + /// + /// + /// + /// + public override ImageQualityCheckType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** Signals if document is not fully present in the image */ - public const int Bounds = 5; + ImageQualityCheckType? result = rawValue == null + ? null + : ImageQualityCheckTypeValueConverter.FromStringOrDefault(rawValue); - /** Signals if an image is captured from screen */ - public const int ScreenCapture = 6; + if (result != null) + return result.Value; - /** Signals if the portrait is present */ - public const int Portrait = 7; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageQualityCheckType? imageQualityCheckType, JsonSerializerOptions options) + { + writer.WriteStringValue(imageQualityCheckType?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityChecks.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityChecks.cs deleted file mode 100644 index 871c31d..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityChecks.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 5.5.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// ImageQualityChecks - /// - [DataContract] - public partial class ImageQualityChecks : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ImageQualityChecks() { } - /// - /// Initializes a new instance of the class. - /// - /// result (required). - /// list (required). - public ImageQualityChecks(int result = default(int), List list = default(List)) - { - // to ensure "result" is required (not null) - if (result == null) - { - throw new InvalidDataException("result is a required property for ImageQualityChecks and cannot be null"); - } - else - { - this.Result = result; - } - - // to ensure "list" is required (not null) - if (list == null) - { - throw new InvalidDataException("list is a required property for ImageQualityChecks and cannot be null"); - } - else - { - this.List = list; - } - - } - - /// - /// Gets or Sets Result - /// - [DataMember(Name="result", EmitDefaultValue=true)] - public int Result { get; set; } - - /// - /// Gets or Sets List - /// - [DataMember(Name="List", EmitDefaultValue=true)] - public List List { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ImageQualityChecks {\n"); - sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" List: ").Append(List).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ImageQualityChecks); - } - - /// - /// Returns true if ImageQualityChecks instances are equal - /// - /// Instance of ImageQualityChecks to be compared - /// Boolean - public bool Equals(ImageQualityChecks input) - { - if (input == null) - return false; - - return - ( - this.Result == input.Result || - (this.Result != null && - this.Result.Equals(input.Result)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Result != null) - hashCode = hashCode * 59 + this.Result.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs index 3bf8fd2..d4bb04f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs @@ -1,62 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQualityResult /// - [DataContract] - public partial class ImageQualityResult : ResultItem, IEquatable, IValidatableObject + public partial class ImageQualityResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ImageQualityResult() { } - /// - /// Initializes a new instance of the class. - /// - /// imageQualityCheckList (required). - public ImageQualityResult(ImageQualityCheckList imageQualityCheckList = default(ImageQualityCheckList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// imageQualityCheckList + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public ImageQualityResult(ImageQualityCheckList imageQualityCheckList, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "imageQualityCheckList" is required (not null) - if (imageQualityCheckList == null) - { - throw new InvalidDataException("imageQualityCheckList is a required property for ImageQualityResult and cannot be null"); - } - else - { - this.ImageQualityCheckList = imageQualityCheckList; - } - + ImageQualityCheckList = imageQualityCheckList; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets ImageQualityCheckList /// - [DataMember(Name="ImageQualityCheckList", EmitDefaultValue=true)] + [JsonPropertyName("ImageQualityCheckList")] public ImageQualityCheckList ImageQualityCheckList { get; set; } /// @@ -65,76 +59,158 @@ protected ImageQualityResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImageQualityResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" ImageQualityCheckList: ").Append(ImageQualityCheckList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class ImageQualityResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ImageQualityResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ImageQualityResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if ImageQualityResult instances are equal - /// - /// Instance of ImageQualityResult to be compared - /// Boolean - public bool Equals(ImageQualityResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.ImageQualityCheckList == input.ImageQualityCheckList || - (this.ImageQualityCheckList != null && - this.ImageQualityCheckList.Equals(input.ImageQualityCheckList)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option imageQualityCheckList = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ImageQualityCheckList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + imageQualityCheckList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!imageQualityCheckList.IsSet) + throw new ArgumentException("Property is required for class ImageQualityResult.", nameof(imageQualityCheckList)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class ImageQualityResult.", nameof(resultType)); + + if (imageQualityCheckList.IsSet && imageQualityCheckList.Value == null) + throw new ArgumentNullException(nameof(imageQualityCheckList), "Property is not nullable for class ImageQualityResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ImageQualityResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class ImageQualityResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ImageQualityResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ImageQualityResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ImageQualityResult."); + + return new ImageQualityResult(imageQualityCheckList.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageQualityResult imageQualityResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ImageQualityCheckList != null) - hashCode = hashCode * 59 + this.ImageQualityCheckList.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, imageQualityResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImageQualityResult imageQualityResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (imageQualityResult.ImageQualityCheckList == null) + throw new ArgumentNullException(nameof(imageQualityResult.ImageQualityCheckList), "Property is required for class ImageQualityResult."); + + writer.WritePropertyName("ImageQualityCheckList"); + JsonSerializer.Serialize(writer, imageQualityResult.ImageQualityCheckList, jsonSerializerOptions); + if (imageQualityResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", imageQualityResult.BufLengthOption.Value!.Value); + + if (imageQualityResult.LightOption.IsSet) + writer.WriteNumber("light", imageQualityResult.LightOption.Value!.Value); + + if (imageQualityResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", imageQualityResult.ListIdxOption.Value!.Value); + + if (imageQualityResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", imageQualityResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", imageQualityResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs index 9267b54..3ef3636 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs @@ -1,49 +1,60 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageTransactionData /// - [DataContract] - public partial class ImageTransactionData : IEquatable, IValidatableObject + public partial class ImageTransactionData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// image. - public ImageTransactionData(ImagesFieldValue image = default(ImagesFieldValue)) + /// image + [JsonConstructor] + public ImageTransactionData(Option image = default) { - this.Image = image; + ImageOption = image; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Image + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ImageOption { get; private set; } + /// /// Gets or Sets Image /// - [DataMember(Name="image", EmitDefaultValue=false)] - public ImagesFieldValue Image { get; set; } + [JsonPropertyName("image")] + public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new(value); } } /// /// Returns the string presentation of the object @@ -51,74 +62,111 @@ public partial class ImageTransactionData : IEquatable, I /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImageTransactionData {\n"); sb.Append(" Image: ").Append(Image).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImageTransactionDataJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ImageTransactionData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ImageTransactionData); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option image = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "image": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (image.IsSet && image.Value == null) + throw new ArgumentNullException(nameof(image), "Property is not nullable for class ImageTransactionData."); + + return new ImageTransactionData(image); } /// - /// Returns true if ImageTransactionData instances are equal + /// Serializes a /// - /// Instance of ImageTransactionData to be compared - /// Boolean - public bool Equals(ImageTransactionData input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImageTransactionData imageTransactionData, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Image == input.Image || - (this.Image != null && - this.Image.Equals(input.Image)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, imageTransactionData, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImageTransactionData imageTransactionData, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (imageTransactionData.ImageOption.IsSet && imageTransactionData.Image == null) + throw new ArgumentNullException(nameof(imageTransactionData.Image), "Property is required for class ImageTransactionData."); + + if (imageTransactionData.ImageOption.IsSet) { - int hashCode = 41; - if (this.Image != null) - hashCode = hashCode * 59 + this.Image.GetHashCode(); - return hashCode; + writer.WritePropertyName("image"); + JsonSerializer.Serialize(writer, imageTransactionData.Image, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/Images.cs b/src/Regula.DocumentReader.WebClient/Model/Images.cs index deb51b7..170165c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Images.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Images.cs @@ -1,165 +1,245 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Images /// - [DataContract] - public partial class Images : IEquatable, IValidatableObject + public partial class Images : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Images() { } - /// - /// Initializes a new instance of the class. - /// - /// availableSourceList (required). - /// fieldList (required). - public Images(List availableSourceList = default(List), List fieldList = default(List)) + /// availableSourceList + /// fieldList + /// Fields count + /// Available sources count + [JsonConstructor] + public Images(List availableSourceList, List fieldList, Option fieldCount = default, Option availableSourceCount = default) { - // to ensure "availableSourceList" is required (not null) - if (availableSourceList == null) - { - throw new InvalidDataException("availableSourceList is a required property for Images and cannot be null"); - } - else - { - this.AvailableSourceList = availableSourceList; - } - - // to ensure "fieldList" is required (not null) - if (fieldList == null) - { - throw new InvalidDataException("fieldList is a required property for Images and cannot be null"); - } - else - { - this.FieldList = fieldList; - } - + AvailableSourceList = availableSourceList; + FieldList = fieldList; + FieldCountOption = fieldCount; + AvailableSourceCountOption = availableSourceCount; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets AvailableSourceList /// - [DataMember(Name="availableSourceList", EmitDefaultValue=true)] + [JsonPropertyName("availableSourceList")] public List AvailableSourceList { get; set; } /// /// Gets or Sets FieldList /// - [DataMember(Name="fieldList", EmitDefaultValue=true)] + [JsonPropertyName("fieldList")] public List FieldList { get; set; } + /// + /// Used to track the state of FieldCount + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldCountOption { get; private set; } + + /// + /// Fields count + /// + /// Fields count + [JsonPropertyName("fieldCount")] + public int? FieldCount { get { return this.FieldCountOption; } set { this.FieldCountOption = new(value); } } + + /// + /// Used to track the state of AvailableSourceCount + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AvailableSourceCountOption { get; private set; } + + /// + /// Available sources count + /// + /// Available sources count + [JsonPropertyName("availableSourceCount")] + public int? AvailableSourceCount { get { return this.AvailableSourceCountOption; } set { this.AvailableSourceCountOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Images {\n"); sb.Append(" AvailableSourceList: ").Append(AvailableSourceList).Append("\n"); sb.Append(" FieldList: ").Append(FieldList).Append("\n"); + sb.Append(" FieldCount: ").Append(FieldCount).Append("\n"); + sb.Append(" AvailableSourceCount: ").Append(AvailableSourceCount).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as Images); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImagesJsonConverter : JsonConverter + { /// - /// Returns true if Images instances are equal + /// Deserializes json to /// - /// Instance of Images to be compared - /// Boolean - public bool Equals(Images input) + /// + /// + /// + /// + /// + public override Images Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.AvailableSourceList == input.AvailableSourceList || - this.AvailableSourceList != null && - input.AvailableSourceList != null && - this.AvailableSourceList.SequenceEqual(input.AvailableSourceList) - ) && - ( - this.FieldList == input.FieldList || - this.FieldList != null && - input.FieldList != null && - this.FieldList.SequenceEqual(input.FieldList) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> availableSourceList = default; + Option?> fieldList = default; + Option fieldCount = default; + Option availableSourceCount = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "availableSourceList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + availableSourceList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "fieldList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "fieldCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldCount = new Option(utf8JsonReader.GetInt32()); + break; + case "availableSourceCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + availableSourceCount = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!availableSourceList.IsSet) + throw new ArgumentException("Property is required for class Images.", nameof(availableSourceList)); + + if (!fieldList.IsSet) + throw new ArgumentException("Property is required for class Images.", nameof(fieldList)); + + if (availableSourceList.IsSet && availableSourceList.Value == null) + throw new ArgumentNullException(nameof(availableSourceList), "Property is not nullable for class Images."); + + if (fieldList.IsSet && fieldList.Value == null) + throw new ArgumentNullException(nameof(fieldList), "Property is not nullable for class Images."); + + if (fieldCount.IsSet && fieldCount.Value == null) + throw new ArgumentNullException(nameof(fieldCount), "Property is not nullable for class Images."); + + if (availableSourceCount.IsSet && availableSourceCount.Value == null) + throw new ArgumentNullException(nameof(availableSourceCount), "Property is not nullable for class Images."); + + return new Images(availableSourceList.Value!, fieldList.Value!, fieldCount, availableSourceCount); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Images images, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AvailableSourceList != null) - hashCode = hashCode * 59 + this.AvailableSourceList.GetHashCode(); - if (this.FieldList != null) - hashCode = hashCode * 59 + this.FieldList.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, images, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, Images images, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (images.AvailableSourceList == null) + throw new ArgumentNullException(nameof(images.AvailableSourceList), "Property is required for class Images."); + + if (images.FieldList == null) + throw new ArgumentNullException(nameof(images.FieldList), "Property is required for class Images."); + + writer.WritePropertyName("availableSourceList"); + JsonSerializer.Serialize(writer, images.AvailableSourceList, jsonSerializerOptions); + writer.WritePropertyName("fieldList"); + JsonSerializer.Serialize(writer, images.FieldList, jsonSerializerOptions); + if (images.FieldCountOption.IsSet) + writer.WriteNumber("fieldCount", images.FieldCountOption.Value!.Value); + + if (images.AvailableSourceCountOption.IsSet) + writer.WriteNumber("availableSourceCount", images.AvailableSourceCountOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs index fb6c082..f27b7e5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs @@ -1,80 +1,62 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesAvailableSource /// - [DataContract] - public partial class ImagesAvailableSource : IEquatable, IValidatableObject + public partial class ImagesAvailableSource : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ImagesAvailableSource() { } - /// - /// Initializes a new instance of the class. - /// - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0). - /// source (required). - public ImagesAvailableSource(int containerType = 0, string source = default(string)) + /// source + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0) + [JsonConstructor] + public ImagesAvailableSource(Source source, int containerType = 0) { - // to ensure "source" is required (not null) - if (source == null) - { - throw new InvalidDataException("source is a required property for ImagesAvailableSource and cannot be null"); - } - else - { - this.Source = source; - } - - // use default value if no "containerType" provided - if (containerType == null) - { - this.ContainerType = 0; - } - else - { - this.ContainerType = containerType; - } + Source = source; + ContainerType = containerType; + OnCreated(); } - + + partial void OnCreated(); + /// - /// Same as Result type, but used for safe parsing of not-described values. See Result type. + /// Gets or Sets Source /// - /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [DataMember(Name="containerType", EmitDefaultValue=false)] - public int ContainerType { get; set; } + [JsonPropertyName("source")] + public Source Source { get; set; } /// - /// Gets or Sets Source + /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// - [DataMember(Name="source", EmitDefaultValue=true)] - public string Source { get; set; } + /// Same as Result type, but used for safe parsing of not-described values. See Result type. + [JsonPropertyName("containerType")] + public int ContainerType { get; set; } /// /// Returns the string presentation of the object @@ -82,82 +64,123 @@ protected ImagesAvailableSource() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImagesAvailableSource {\n"); - sb.Append(" ContainerType: ").Append(ContainerType).Append("\n"); sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" ContainerType: ").Append(ContainerType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ImagesAvailableSource); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImagesAvailableSourceJsonConverter : JsonConverter + { /// - /// Returns true if ImagesAvailableSource instances are equal + /// Deserializes json to /// - /// Instance of ImagesAvailableSource to be compared - /// Boolean - public bool Equals(ImagesAvailableSource input) + /// + /// + /// + /// + /// + public override ImagesAvailableSource Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.ContainerType == input.ContainerType || - (this.ContainerType != null && - this.ContainerType.Equals(input.ContainerType)) - ) && - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option source = default; + Option containerType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "source": + string? sourceRawValue = utf8JsonReader.GetString(); + if (sourceRawValue != null) + source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); + break; + case "containerType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + containerType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!source.IsSet) + throw new ArgumentException("Property is required for class ImagesAvailableSource.", nameof(source)); + + if (!containerType.IsSet) + throw new ArgumentException("Property is required for class ImagesAvailableSource.", nameof(containerType)); + + if (source.IsSet && source.Value == null) + throw new ArgumentNullException(nameof(source), "Property is not nullable for class ImagesAvailableSource."); + + if (containerType.IsSet && containerType.Value == null) + throw new ArgumentNullException(nameof(containerType), "Property is not nullable for class ImagesAvailableSource."); + + return new ImagesAvailableSource(source.Value!.Value!, containerType.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImagesAvailableSource imagesAvailableSource, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ContainerType != null) - hashCode = hashCode * 59 + this.ContainerType.GetHashCode(); - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, imagesAvailableSource, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImagesAvailableSource imagesAvailableSource, JsonSerializerOptions jsonSerializerOptions) { - yield break; + var sourceRawValue = SourceValueConverter.ToJsonValue(imagesAvailableSource.Source); + writer.WriteString("source", sourceRawValue); + + writer.WriteNumber("containerType", imagesAvailableSource.ContainerType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs index 5af43c0..ee67470 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs @@ -1,98 +1,86 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesField /// - [DataContract] - public partial class ImagesField : IEquatable, IValidatableObject + public partial class ImagesField : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ImagesField() { } - /// - /// Initializes a new instance of the class. - /// - /// Human readable field name. Do not bind to this name - use GraphicFieldType instead. (required). - /// fieldType (required). - /// valueList (required). - public ImagesField(string fieldName = default(string), int fieldType = default(int), List valueList = default(List)) + /// Human readable field name. Do not bind to this name - use GraphicFieldType instead. + /// fieldType + /// valueList + /// Field value count + [JsonConstructor] + public ImagesField(string fieldName, GraphicFieldType fieldType, List valueList, Option valueCount = default) { - // to ensure "fieldName" is required (not null) - if (fieldName == null) - { - throw new InvalidDataException("fieldName is a required property for ImagesField and cannot be null"); - } - else - { - this.FieldName = fieldName; - } - - // to ensure "fieldType" is required (not null) - if (fieldType == null) - { - throw new InvalidDataException("fieldType is a required property for ImagesField and cannot be null"); - } - else - { - this.FieldType = fieldType; - } - - // to ensure "valueList" is required (not null) - if (valueList == null) - { - throw new InvalidDataException("valueList is a required property for ImagesField and cannot be null"); - } - else - { - this.ValueList = valueList; - } - + FieldName = fieldName; + FieldType = fieldType; + ValueList = valueList; + ValueCountOption = valueCount; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Gets or Sets FieldType + /// + [JsonPropertyName("fieldType")] + public GraphicFieldType FieldType { get; set; } + /// /// Human readable field name. Do not bind to this name - use GraphicFieldType instead. /// /// Human readable field name. Do not bind to this name - use GraphicFieldType instead. - [DataMember(Name="fieldName", EmitDefaultValue=true)] + [JsonPropertyName("fieldName")] public string FieldName { get; set; } /// - /// Gets or Sets FieldType + /// Gets or Sets ValueList /// - [DataMember(Name="fieldType", EmitDefaultValue=true)] - public int FieldType { get; set; } + [JsonPropertyName("valueList")] + public List ValueList { get; set; } /// - /// Gets or Sets ValueList + /// Used to track the state of ValueCount /// - [DataMember(Name="valueList", EmitDefaultValue=true)] - public List ValueList { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ValueCountOption { get; private set; } + + /// + /// Field value count + /// + /// Field value count + [JsonPropertyName("valueCount")] + public decimal? ValueCount { get { return this.ValueCountOption; } set { this.ValueCountOption = new(value); } } /// /// Returns the string presentation of the object @@ -100,91 +88,154 @@ protected ImagesField() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImagesField {\n"); sb.Append(" FieldName: ").Append(FieldName).Append("\n"); sb.Append(" FieldType: ").Append(FieldType).Append("\n"); sb.Append(" ValueList: ").Append(ValueList).Append("\n"); + sb.Append(" ValueCount: ").Append(ValueCount).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ImagesField); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImagesFieldJsonConverter : JsonConverter + { /// - /// Returns true if ImagesField instances are equal + /// Deserializes json to /// - /// Instance of ImagesField to be compared - /// Boolean - public bool Equals(ImagesField input) + /// + /// + /// + /// + /// + public override ImagesField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.FieldName == input.FieldName || - (this.FieldName != null && - this.FieldName.Equals(input.FieldName)) - ) && - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ) && - ( - this.ValueList == input.ValueList || - this.ValueList != null && - input.ValueList != null && - this.ValueList.SequenceEqual(input.ValueList) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldName = default; + Option fieldType = default; + Option?> valueList = default; + Option valueCount = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "fieldName": + fieldName = new Option(utf8JsonReader.GetString()!); + break; + case "fieldType": + string? fieldTypeRawValue = utf8JsonReader.GetString(); + if (fieldTypeRawValue != null) + fieldType = new Option(GraphicFieldTypeValueConverter.FromStringOrDefault(fieldTypeRawValue)); + break; + case "valueList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + valueList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "valueCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + valueCount = new Option(utf8JsonReader.GetDecimal()); + break; + default: + break; + } + } + } + + if (!fieldName.IsSet) + throw new ArgumentException("Property is required for class ImagesField.", nameof(fieldName)); + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class ImagesField.", nameof(fieldType)); + + if (!valueList.IsSet) + throw new ArgumentException("Property is required for class ImagesField.", nameof(valueList)); + + if (fieldName.IsSet && fieldName.Value == null) + throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class ImagesField."); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class ImagesField."); + + if (valueList.IsSet && valueList.Value == null) + throw new ArgumentNullException(nameof(valueList), "Property is not nullable for class ImagesField."); + + if (valueCount.IsSet && valueCount.Value == null) + throw new ArgumentNullException(nameof(valueCount), "Property is not nullable for class ImagesField."); + + return new ImagesField(fieldName.Value!, fieldType.Value!.Value!, valueList.Value!, valueCount); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImagesField imagesField, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FieldName != null) - hashCode = hashCode * 59 + this.FieldName.GetHashCode(); - if (this.FieldType != null) - hashCode = hashCode * 59 + this.FieldType.GetHashCode(); - if (this.ValueList != null) - hashCode = hashCode * 59 + this.ValueList.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, imagesField, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImagesField imagesField, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (imagesField.FieldName == null) + throw new ArgumentNullException(nameof(imagesField.FieldName), "Property is required for class ImagesField."); + + if (imagesField.ValueList == null) + throw new ArgumentNullException(nameof(imagesField.ValueList), "Property is required for class ImagesField."); + + writer.WriteString("fieldName", imagesField.FieldName); + + var fieldTypeRawValue = GraphicFieldTypeValueConverter.ToJsonValue(imagesField.FieldType); + writer.WriteNumber("fieldType", fieldTypeRawValue); + + writer.WritePropertyName("valueList"); + JsonSerializer.Serialize(writer, imagesField.ValueList, jsonSerializerOptions); + if (imagesField.ValueCountOption.IsSet) + writer.WriteNumber("valueCount", imagesField.ValueCountOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs index 0e3f49e..b9d189e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs @@ -1,168 +1,159 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesFieldValue /// - [DataContract] - public partial class ImagesFieldValue : IEquatable, IValidatableObject + public partial class ImagesFieldValue : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ImagesFieldValue() { } - /// - /// Initializes a new instance of the class. - /// - /// source (required). - /// Base64 encoded image (required). - /// Base64 encoded image. - /// Original page index. - /// Page index of the image from input list (required). - /// lightIndex (required). - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - /// fieldRect. - /// rfidOrigin. - public ImagesFieldValue(string source = default(string), string value = default(string), string originalValue = default(string), int originalPageIndex = default(int), int pageIndex = default(int), int lightIndex = default(int), int containerType = 0, RectangleCoordinates fieldRect = default(RectangleCoordinates), RfidOrigin rfidOrigin = default(RfidOrigin)) + /// source + /// Page index of the image from input list + /// lightIndex + /// Base64 encoded image + /// Base64 encoded image + /// Original page index + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0) + /// fieldRect + /// rfidOrigin + [JsonConstructor] + public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, Option value = default, Option originalValue = default, Option originalPageIndex = default, int containerType = 0, Option fieldRect = default, Option rfidOrigin = default) { - // to ensure "source" is required (not null) - if (source == null) - { - throw new InvalidDataException("source is a required property for ImagesFieldValue and cannot be null"); - } - else - { - this.Source = source; - } - - // to ensure "value" is required (not null) - if (value == null) - { - throw new InvalidDataException("value is a required property for ImagesFieldValue and cannot be null"); - } - else - { - this.Value = value; - } - - // to ensure "pageIndex" is required (not null) - if (pageIndex == null) - { - throw new InvalidDataException("pageIndex is a required property for ImagesFieldValue and cannot be null"); - } - else - { - this.PageIndex = pageIndex; - } - - // to ensure "lightIndex" is required (not null) - if (lightIndex == null) - { - throw new InvalidDataException("lightIndex is a required property for ImagesFieldValue and cannot be null"); - } - else - { - this.LightIndex = lightIndex; - } - - // to ensure "containerType" is required (not null) - if (containerType == null) - { - throw new InvalidDataException("containerType is a required property for ImagesFieldValue and cannot be null"); - } - else - { - this.ContainerType = containerType; - } - - this.OriginalValue = originalValue; - this.OriginalPageIndex = originalPageIndex; - this.FieldRect = fieldRect; - this.RfidOrigin = rfidOrigin; + Source = source; + PageIndex = pageIndex; + LightIndex = lightIndex; + ValueOption = value; + OriginalValueOption = originalValue; + OriginalPageIndexOption = originalPageIndex; + ContainerType = containerType; + FieldRectOption = fieldRect; + RfidOriginOption = rfidOrigin; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Source /// - [DataMember(Name="source", EmitDefaultValue=true)] - public string Source { get; set; } + [JsonPropertyName("source")] + public Source Source { get; set; } /// - /// Base64 encoded image + /// Gets or Sets LightIndex /// - /// Base64 encoded image - [DataMember(Name="value", EmitDefaultValue=true)] - public string Value { get; set; } + [JsonPropertyName("lightIndex")] + public Light LightIndex { get; set; } + + /// + /// Page index of the image from input list + /// + /// Page index of the image from input list + [JsonPropertyName("pageIndex")] + public int PageIndex { get; set; } + + /// + /// Used to track the state of Value + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ValueOption { get; private set; } /// /// Base64 encoded image /// /// Base64 encoded image - [DataMember(Name="originalValue", EmitDefaultValue=false)] - public string OriginalValue { get; set; } + /* Base64 encoded image */ + [JsonPropertyName("value")] + public string? Value { get { return this.ValueOption; } set { this.ValueOption = new(value); } } /// - /// Original page index + /// Used to track the state of OriginalValue /// - /// Original page index - [DataMember(Name="originalPageIndex", EmitDefaultValue=false)] - public int OriginalPageIndex { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OriginalValueOption { get; private set; } /// - /// Page index of the image from input list + /// Base64 encoded image /// - /// Page index of the image from input list - [DataMember(Name="pageIndex", EmitDefaultValue=true)] - public int PageIndex { get; set; } + /// Base64 encoded image + /* Base64 encoded image */ + [JsonPropertyName("originalValue")] + public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new(value); } } /// - /// Gets or Sets LightIndex + /// Used to track the state of OriginalPageIndex /// - [DataMember(Name="lightIndex", EmitDefaultValue=true)] - public int LightIndex { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OriginalPageIndexOption { get; private set; } + + /// + /// Original page index + /// + /// Original page index + [JsonPropertyName("originalPageIndex")] + public int? OriginalPageIndex { get { return this.OriginalPageIndexOption; } set { this.OriginalPageIndexOption = new(value); } } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [DataMember(Name="containerType", EmitDefaultValue=true)] + [JsonPropertyName("containerType")] public int ContainerType { get; set; } + /// + /// Used to track the state of FieldRect + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldRectOption { get; private set; } + /// /// Gets or Sets FieldRect /// - [DataMember(Name="fieldRect", EmitDefaultValue=false)] - public RectangleCoordinates FieldRect { get; set; } + [JsonPropertyName("fieldRect")] + public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new(value); } } + + /// + /// Used to track the state of RfidOrigin + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RfidOriginOption { get; private set; } /// /// Gets or Sets RfidOrigin /// - [DataMember(Name="rfidOrigin", EmitDefaultValue=false)] - public RfidOrigin RfidOrigin { get; set; } + [JsonPropertyName("rfidOrigin")] + public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new(value); } } /// /// Returns the string presentation of the object @@ -170,138 +161,228 @@ protected ImagesFieldValue() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImagesFieldValue {\n"); sb.Append(" Source: ").Append(Source).Append("\n"); + sb.Append(" PageIndex: ").Append(PageIndex).Append("\n"); + sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append(" OriginalValue: ").Append(OriginalValue).Append("\n"); sb.Append(" OriginalPageIndex: ").Append(OriginalPageIndex).Append("\n"); - sb.Append(" PageIndex: ").Append(PageIndex).Append("\n"); - sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); sb.Append(" ContainerType: ").Append(ContainerType).Append("\n"); sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); sb.Append(" RfidOrigin: ").Append(RfidOrigin).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ImagesFieldValueJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ImagesFieldValue Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ImagesFieldValue); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option source = default; + Option pageIndex = default; + Option lightIndex = default; + Option value = default; + Option originalValue = default; + Option originalPageIndex = default; + Option containerType = default; + Option fieldRect = default; + Option rfidOrigin = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "source": + string? sourceRawValue = utf8JsonReader.GetString(); + if (sourceRawValue != null) + source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); + break; + case "pageIndex": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIndex = new Option(utf8JsonReader.GetInt32()); + break; + case "lightIndex": + string? lightIndexRawValue = utf8JsonReader.GetString(); + if (lightIndexRawValue != null) + lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); + break; + case "value": + value = new Option(utf8JsonReader.GetString()!); + break; + case "originalValue": + originalValue = new Option(utf8JsonReader.GetString()!); + break; + case "originalPageIndex": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originalPageIndex = new Option(utf8JsonReader.GetInt32()); + break; + case "containerType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + containerType = new Option(utf8JsonReader.GetInt32()); + break; + case "fieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "rfidOrigin": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rfidOrigin = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!source.IsSet) + throw new ArgumentException("Property is required for class ImagesFieldValue.", nameof(source)); + + if (!pageIndex.IsSet) + throw new ArgumentException("Property is required for class ImagesFieldValue.", nameof(pageIndex)); + + if (!lightIndex.IsSet) + throw new ArgumentException("Property is required for class ImagesFieldValue.", nameof(lightIndex)); + + if (!containerType.IsSet) + throw new ArgumentException("Property is required for class ImagesFieldValue.", nameof(containerType)); + + if (source.IsSet && source.Value == null) + throw new ArgumentNullException(nameof(source), "Property is not nullable for class ImagesFieldValue."); + + if (pageIndex.IsSet && pageIndex.Value == null) + throw new ArgumentNullException(nameof(pageIndex), "Property is not nullable for class ImagesFieldValue."); + + if (lightIndex.IsSet && lightIndex.Value == null) + throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class ImagesFieldValue."); + + if (value.IsSet && value.Value == null) + throw new ArgumentNullException(nameof(value), "Property is not nullable for class ImagesFieldValue."); + + if (originalValue.IsSet && originalValue.Value == null) + throw new ArgumentNullException(nameof(originalValue), "Property is not nullable for class ImagesFieldValue."); + + if (originalPageIndex.IsSet && originalPageIndex.Value == null) + throw new ArgumentNullException(nameof(originalPageIndex), "Property is not nullable for class ImagesFieldValue."); + + if (containerType.IsSet && containerType.Value == null) + throw new ArgumentNullException(nameof(containerType), "Property is not nullable for class ImagesFieldValue."); + + if (fieldRect.IsSet && fieldRect.Value == null) + throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class ImagesFieldValue."); + + if (rfidOrigin.IsSet && rfidOrigin.Value == null) + throw new ArgumentNullException(nameof(rfidOrigin), "Property is not nullable for class ImagesFieldValue."); + + return new ImagesFieldValue(source.Value!.Value!, pageIndex.Value!.Value!, lightIndex.Value!.Value!, value, originalValue, originalPageIndex, containerType.Value!.Value!, fieldRect, rfidOrigin); } /// - /// Returns true if ImagesFieldValue instances are equal + /// Serializes a /// - /// Instance of ImagesFieldValue to be compared - /// Boolean - public bool Equals(ImagesFieldValue input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImagesFieldValue imagesFieldValue, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.OriginalValue == input.OriginalValue || - (this.OriginalValue != null && - this.OriginalValue.Equals(input.OriginalValue)) - ) && - ( - this.OriginalPageIndex == input.OriginalPageIndex || - (this.OriginalPageIndex != null && - this.OriginalPageIndex.Equals(input.OriginalPageIndex)) - ) && - ( - this.PageIndex == input.PageIndex || - (this.PageIndex != null && - this.PageIndex.Equals(input.PageIndex)) - ) && - ( - this.LightIndex == input.LightIndex || - (this.LightIndex != null && - this.LightIndex.Equals(input.LightIndex)) - ) && - ( - this.ContainerType == input.ContainerType || - (this.ContainerType != null && - this.ContainerType.Equals(input.ContainerType)) - ) && - ( - this.FieldRect == input.FieldRect || - (this.FieldRect != null && - this.FieldRect.Equals(input.FieldRect)) - ) && - ( - this.RfidOrigin == input.RfidOrigin || - (this.RfidOrigin != null && - this.RfidOrigin.Equals(input.RfidOrigin)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, imagesFieldValue, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImagesFieldValue imagesFieldValue, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (imagesFieldValue.ValueOption.IsSet && imagesFieldValue.Value == null) + throw new ArgumentNullException(nameof(imagesFieldValue.Value), "Property is required for class ImagesFieldValue."); + + if (imagesFieldValue.OriginalValueOption.IsSet && imagesFieldValue.OriginalValue == null) + throw new ArgumentNullException(nameof(imagesFieldValue.OriginalValue), "Property is required for class ImagesFieldValue."); + + if (imagesFieldValue.FieldRectOption.IsSet && imagesFieldValue.FieldRect == null) + throw new ArgumentNullException(nameof(imagesFieldValue.FieldRect), "Property is required for class ImagesFieldValue."); + + if (imagesFieldValue.RfidOriginOption.IsSet && imagesFieldValue.RfidOrigin == null) + throw new ArgumentNullException(nameof(imagesFieldValue.RfidOrigin), "Property is required for class ImagesFieldValue."); + + var sourceRawValue = SourceValueConverter.ToJsonValue(imagesFieldValue.Source); + writer.WriteString("source", sourceRawValue); + + writer.WriteNumber("pageIndex", imagesFieldValue.PageIndex); + + var lightIndexRawValue = LightValueConverter.ToJsonValue(imagesFieldValue.LightIndex); + writer.WriteNumber("lightIndex", lightIndexRawValue); + + if (imagesFieldValue.ValueOption.IsSet) + writer.WriteString("value", imagesFieldValue.Value); + + if (imagesFieldValue.OriginalValueOption.IsSet) + writer.WriteString("originalValue", imagesFieldValue.OriginalValue); + + if (imagesFieldValue.OriginalPageIndexOption.IsSet) + writer.WriteNumber("originalPageIndex", imagesFieldValue.OriginalPageIndexOption.Value!.Value); + + writer.WriteNumber("containerType", imagesFieldValue.ContainerType); + + if (imagesFieldValue.FieldRectOption.IsSet) { - int hashCode = 41; - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.OriginalValue != null) - hashCode = hashCode * 59 + this.OriginalValue.GetHashCode(); - if (this.OriginalPageIndex != null) - hashCode = hashCode * 59 + this.OriginalPageIndex.GetHashCode(); - if (this.PageIndex != null) - hashCode = hashCode * 59 + this.PageIndex.GetHashCode(); - if (this.LightIndex != null) - hashCode = hashCode * 59 + this.LightIndex.GetHashCode(); - if (this.ContainerType != null) - hashCode = hashCode * 59 + this.ContainerType.GetHashCode(); - if (this.FieldRect != null) - hashCode = hashCode * 59 + this.FieldRect.GetHashCode(); - if (this.RfidOrigin != null) - hashCode = hashCode * 59 + this.RfidOrigin.GetHashCode(); - return hashCode; + writer.WritePropertyName("fieldRect"); + JsonSerializer.Serialize(writer, imagesFieldValue.FieldRect, jsonSerializerOptions); + } + if (imagesFieldValue.RfidOriginOption.IsSet) + { + writer.WritePropertyName("rfidOrigin"); + JsonSerializer.Serialize(writer, imagesFieldValue.RfidOrigin, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs new file mode 100644 index 0000000..0acfaf9 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ImagesItem + /// + public partial class ImagesItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// images + [JsonConstructor] + public ImagesItem(Images images) + { + Images = images; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Images + /// + [JsonPropertyName("Images")] + public Images Images { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ImagesItem {\n"); + sb.Append(" Images: ").Append(Images).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ImagesItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ImagesItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option images = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Images": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + images = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!images.IsSet) + throw new ArgumentException("Property is required for class ImagesItem.", nameof(images)); + + if (images.IsSet && images.Value == null) + throw new ArgumentNullException(nameof(images), "Property is not nullable for class ImagesItem."); + + return new ImagesItem(images.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImagesItem imagesItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, imagesItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImagesItem imagesItem, JsonSerializerOptions jsonSerializerOptions) + { + if (imagesItem.Images == null) + throw new ArgumentNullException(nameof(imagesItem.Images), "Property is required for class ImagesItem."); + + writer.WritePropertyName("Images"); + JsonSerializer.Serialize(writer, imagesItem.Images, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs index 9bfc43c..a86d2c2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs @@ -1,62 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesResult /// - [DataContract] - public partial class ImagesResult : ResultItem, IEquatable, IValidatableObject + public partial class ImagesResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ImagesResult() { } - /// - /// Initializes a new instance of the class. - /// - /// images (required). - public ImagesResult(Images images = default(Images), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// images + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public ImagesResult(Images images, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "images" is required (not null) - if (images == null) - { - throw new InvalidDataException("images is a required property for ImagesResult and cannot be null"); - } - else - { - this.Images = images; - } - + Images = images; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Images /// - [DataMember(Name="Images", EmitDefaultValue=true)] + [JsonPropertyName("Images")] public Images Images { get; set; } /// @@ -65,76 +59,158 @@ protected ImagesResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ImagesResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" Images: ").Append(Images).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class ImagesResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ImagesResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ImagesResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if ImagesResult instances are equal - /// - /// Instance of ImagesResult to be compared - /// Boolean - public bool Equals(ImagesResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Images == input.Images || - (this.Images != null && - this.Images.Equals(input.Images)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option images = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Images": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + images = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!images.IsSet) + throw new ArgumentException("Property is required for class ImagesResult.", nameof(images)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class ImagesResult.", nameof(resultType)); + + if (images.IsSet && images.Value == null) + throw new ArgumentNullException(nameof(images), "Property is not nullable for class ImagesResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ImagesResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class ImagesResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ImagesResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ImagesResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ImagesResult."); + + return new ImagesResult(images.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ImagesResult imagesResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Images != null) - hashCode = hashCode * 59 + this.Images.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, imagesResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ImagesResult imagesResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (imagesResult.Images == null) + throw new ArgumentNullException(nameof(imagesResult.Images), "Property is required for class ImagesResult."); + + writer.WritePropertyName("Images"); + JsonSerializer.Serialize(writer, imagesResult.Images, jsonSerializerOptions); + if (imagesResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", imagesResult.BufLengthOption.Value!.Value); + + if (imagesResult.LightOption.IsSet) + writer.WriteNumber("light", imagesResult.LightOption.Value!.Value); + + if (imagesResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", imagesResult.ListIdxOption.Value!.Value); + + if (imagesResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", imagesResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", imagesResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/InData.cs b/src/Regula.DocumentReader.WebClient/Model/InData.cs index 07198cf..a9fe4ff 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InData.cs @@ -1,57 +1,75 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// InData /// - [DataContract] - public partial class InData : IEquatable, IValidatableObject + public partial class InData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// video. - /// images. - public InData(InDataVideo video = default(InDataVideo), List images = default(List)) + /// video + /// images + [JsonConstructor] + public InData(Option video = default, Option?> images = default) { - this.Video = video; - this.Images = images; + VideoOption = video; + ImagesOption = images; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Video + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option VideoOption { get; private set; } + /// /// Gets or Sets Video /// - [DataMember(Name="video", EmitDefaultValue=false)] - public InDataVideo Video { get; set; } + [JsonPropertyName("video")] + public InDataVideo? Video { get { return this.VideoOption; } set { this.VideoOption = new(value); } } + + /// + /// Used to track the state of Images + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ImagesOption { get; private set; } /// /// Gets or Sets Images /// - [DataMember(Name="images", EmitDefaultValue=false)] - public List Images { get; set; } + [JsonPropertyName("images")] + public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new(value); } } /// /// Returns the string presentation of the object @@ -59,83 +77,128 @@ public partial class InData : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class InData {\n"); sb.Append(" Video: ").Append(Video).Append("\n"); sb.Append(" Images: ").Append(Images).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class InDataJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override InData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as InData); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option video = default; + Option?> images = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "video": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + video = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "images": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + images = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (video.IsSet && video.Value == null) + throw new ArgumentNullException(nameof(video), "Property is not nullable for class InData."); + + if (images.IsSet && images.Value == null) + throw new ArgumentNullException(nameof(images), "Property is not nullable for class InData."); + + return new InData(video, images); } /// - /// Returns true if InData instances are equal + /// Serializes a /// - /// Instance of InData to be compared - /// Boolean - public bool Equals(InData input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, InData inData, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Video == input.Video || - (this.Video != null && - this.Video.Equals(input.Video)) - ) && - ( - this.Images == input.Images || - this.Images != null && - input.Images != null && - this.Images.SequenceEqual(input.Images) - ); + writer.WriteStartObject(); + + WriteProperties(writer, inData, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, InData inData, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (inData.VideoOption.IsSet && inData.Video == null) + throw new ArgumentNullException(nameof(inData.Video), "Property is required for class InData."); + + if (inData.ImagesOption.IsSet && inData.Images == null) + throw new ArgumentNullException(nameof(inData.Images), "Property is required for class InData."); + + if (inData.VideoOption.IsSet) { - int hashCode = 41; - if (this.Video != null) - hashCode = hashCode * 59 + this.Video.GetHashCode(); - if (this.Images != null) - hashCode = hashCode * 59 + this.Images.GetHashCode(); - return hashCode; + writer.WritePropertyName("video"); + JsonSerializer.Serialize(writer, inData.Video, jsonSerializerOptions); + } + if (inData.ImagesOption.IsSet) + { + writer.WritePropertyName("images"); + JsonSerializer.Serialize(writer, inData.Images, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataRfidSession.cs b/src/Regula.DocumentReader.WebClient/Model/InDataRfidSession.cs deleted file mode 100644 index 8eceb64..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/InDataRfidSession.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.1.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// InDataRfidSession - /// - [DataContract] - public partial class InDataRfidSession : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Image url. - public InDataRfidSession(string url = default(string)) - { - this.Url = url; - } - - /// - /// Image url - /// - /// Image url - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class InDataRfidSession {\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InDataRfidSession); - } - - /// - /// Returns true if InDataRfidSession instances are equal - /// - /// Instance of InDataRfidSession to be compared - /// Boolean - public bool Equals(InDataRfidSession input) - { - if (input == null) - return false; - - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs index 1ecd17b..44608d5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs @@ -1,75 +1,107 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// InDataTransactionImagesFieldValue /// - [DataContract] - public partial class InDataTransactionImagesFieldValue : IEquatable, IValidatableObject + public partial class InDataTransactionImagesFieldValue : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// light. - /// listIdx. - /// Page index of the image from input list. - /// Image url. - public InDataTransactionImagesFieldValue(int light = default(int), int listIdx = default(int), int pageIdx = default(int), string url = default(string)) + /// light + /// listIdx + /// Page index of the image from input list + /// Image url + [JsonConstructor] + public InDataTransactionImagesFieldValue(Option light = default, Option listIdx = default, Option pageIdx = default, Option url = default) { - this.Light = light; - this.ListIdx = listIdx; - this.PageIdx = pageIdx; - this.Url = url; + LightOption = light; + ListIdxOption = listIdx; + PageIdxOption = pageIdx; + UrlOption = url; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Light + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LightOption { get; private set; } + /// /// Gets or Sets Light /// - [DataMember(Name="light", EmitDefaultValue=false)] - public int Light { get; set; } + [JsonPropertyName("light")] + public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } + + /// + /// Used to track the state of ListIdx + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ListIdxOption { get; private set; } /// /// Gets or Sets ListIdx /// - [DataMember(Name="listIdx", EmitDefaultValue=false)] - public int ListIdx { get; set; } + [JsonPropertyName("listIdx")] + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } + + /// + /// Used to track the state of PageIdx + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PageIdxOption { get; private set; } /// /// Page index of the image from input list /// /// Page index of the image from input list - [DataMember(Name="pageIdx", EmitDefaultValue=false)] - public int PageIdx { get; set; } + [JsonPropertyName("pageIdx")] + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } + + /// + /// Used to track the state of Url + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UrlOption { get; private set; } /// /// Image url /// /// Image url - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } + [JsonPropertyName("url")] + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } /// /// Returns the string presentation of the object @@ -77,7 +109,7 @@ public partial class InDataTransactionImagesFieldValue : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class InDataTransactionImagesFieldValue {\n"); sb.Append(" Light: ").Append(Light).Append("\n"); sb.Append(" ListIdx: ").Append(ListIdx).Append("\n"); @@ -86,89 +118,137 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class InDataTransactionImagesFieldValueJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override InDataTransactionImagesFieldValue Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as InDataTransactionImagesFieldValue); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option url = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "light": + string? lightRawValue = utf8JsonReader.GetString(); + if (lightRawValue != null) + light = new Option(LightValueConverter.FromStringOrDefault(lightRawValue)); + break; + case "listIdx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "pageIdx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "url": + url = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class InDataTransactionImagesFieldValue."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class InDataTransactionImagesFieldValue."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class InDataTransactionImagesFieldValue."); + + if (url.IsSet && url.Value == null) + throw new ArgumentNullException(nameof(url), "Property is not nullable for class InDataTransactionImagesFieldValue."); + + return new InDataTransactionImagesFieldValue(light, listIdx, pageIdx, url); } /// - /// Returns true if InDataTransactionImagesFieldValue instances are equal + /// Serializes a /// - /// Instance of InDataTransactionImagesFieldValue to be compared - /// Boolean - public bool Equals(InDataTransactionImagesFieldValue input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, InDataTransactionImagesFieldValue inDataTransactionImagesFieldValue, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Light == input.Light || - (this.Light != null && - this.Light.Equals(input.Light)) - ) && - ( - this.ListIdx == input.ListIdx || - (this.ListIdx != null && - this.ListIdx.Equals(input.ListIdx)) - ) && - ( - this.PageIdx == input.PageIdx || - (this.PageIdx != null && - this.PageIdx.Equals(input.PageIdx)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, inDataTransactionImagesFieldValue, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, InDataTransactionImagesFieldValue inDataTransactionImagesFieldValue, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (inDataTransactionImagesFieldValue.UrlOption.IsSet && inDataTransactionImagesFieldValue.Url == null) + throw new ArgumentNullException(nameof(inDataTransactionImagesFieldValue.Url), "Property is required for class InDataTransactionImagesFieldValue."); + + if (inDataTransactionImagesFieldValue.LightOption.IsSet) { - int hashCode = 41; - if (this.Light != null) - hashCode = hashCode * 59 + this.Light.GetHashCode(); - if (this.ListIdx != null) - hashCode = hashCode * 59 + this.ListIdx.GetHashCode(); - if (this.PageIdx != null) - hashCode = hashCode * 59 + this.PageIdx.GetHashCode(); - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - return hashCode; + var lightRawValue = LightValueConverter.ToJsonValue(inDataTransactionImagesFieldValue.Light!.Value); + writer.WriteNumber("light", lightRawValue); } - } + if (inDataTransactionImagesFieldValue.ListIdxOption.IsSet) + writer.WriteNumber("listIdx", inDataTransactionImagesFieldValue.ListIdxOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (inDataTransactionImagesFieldValue.PageIdxOption.IsSet) + writer.WriteNumber("pageIdx", inDataTransactionImagesFieldValue.PageIdxOption.Value!.Value); + + if (inDataTransactionImagesFieldValue.UrlOption.IsSet) + writer.WriteString("url", inDataTransactionImagesFieldValue.Url); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs index d423b9f..d1199d6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs @@ -1,59 +1,77 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Video /// - [DataContract] - public partial class InDataVideo : IEquatable, IValidatableObject + public partial class InDataVideo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// A free-form object containing video's extended attributes.. - /// Video url. - public InDataVideo(Dictionary metadata = default(Dictionary), string url = default(string)) + /// A free-form object containing video's extended attributes. + /// Video url + [JsonConstructor] + public InDataVideo(Option?> metadata = default, Option url = default) { - this.Metadata = metadata; - this.Url = url; + MetadataOption = metadata; + UrlOption = url; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Metadata + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> MetadataOption { get; private set; } + /// /// A free-form object containing video's extended attributes. /// /// A free-form object containing video's extended attributes. - [DataMember(Name="metadata", EmitDefaultValue=false)] - public Dictionary Metadata { get; set; } + [JsonPropertyName("metadata")] + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } + + /// + /// Used to track the state of Url + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UrlOption { get; private set; } /// /// Video url /// /// Video url - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } + [JsonPropertyName("url")] + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } /// /// Returns the string presentation of the object @@ -61,83 +79,124 @@ public partial class InDataVideo : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class InDataVideo {\n"); sb.Append(" Metadata: ").Append(Metadata).Append("\n"); sb.Append(" Url: ").Append(Url).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class InDataVideoJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override InDataVideo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as InDataVideo); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> metadata = default; + Option url = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "metadata": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "url": + url = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (metadata.IsSet && metadata.Value == null) + throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class InDataVideo."); + + if (url.IsSet && url.Value == null) + throw new ArgumentNullException(nameof(url), "Property is not nullable for class InDataVideo."); + + return new InDataVideo(metadata, url); } /// - /// Returns true if InDataVideo instances are equal + /// Serializes a /// - /// Instance of InDataVideo to be compared - /// Boolean - public bool Equals(InDataVideo input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, InDataVideo inDataVideo, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, inDataVideo, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, InDataVideo inDataVideo, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (inDataVideo.MetadataOption.IsSet && inDataVideo.Metadata == null) + throw new ArgumentNullException(nameof(inDataVideo.Metadata), "Property is required for class InDataVideo."); + + if (inDataVideo.UrlOption.IsSet && inDataVideo.Url == null) + throw new ArgumentNullException(nameof(inDataVideo.Url), "Property is required for class InDataVideo."); + + if (inDataVideo.MetadataOption.IsSet) { - int hashCode = 41; - if (this.Metadata != null) - hashCode = hashCode * 59 + this.Metadata.GetHashCode(); - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - return hashCode; + writer.WritePropertyName("metadata"); + JsonSerializer.Serialize(writer, inDataVideo.Metadata, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (inDataVideo.UrlOption.IsSet) + writer.WriteString("url", inDataVideo.Url); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/InlineResponse200.cs b/src/Regula.DocumentReader.WebClient/Model/InlineResponse200.cs deleted file mode 100644 index ca603c0..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/InlineResponse200.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// InlineResponse200 - /// - [DataContract] - public partial class InlineResponse200 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// outData. - /// inData. - /// tag. - /// transactionId. - public InlineResponse200(OutData outData = default(OutData), InData inData = default(InData), string tag = default(string), Guid transactionId = default(Guid)) - { - this.OutData = outData; - this.InData = inData; - this.Tag = tag; - this.TransactionId = transactionId; - } - - /// - /// Gets or Sets OutData - /// - [DataMember(Name="OutData", EmitDefaultValue=false)] - public OutData OutData { get; set; } - - /// - /// Gets or Sets InData - /// - [DataMember(Name="InData", EmitDefaultValue=false)] - public InData InData { get; set; } - - /// - /// Gets or Sets Tag - /// - [DataMember(Name="tag", EmitDefaultValue=false)] - public string Tag { get; set; } - - /// - /// Gets or Sets TransactionId - /// - [DataMember(Name="transactionId", EmitDefaultValue=false)] - public Guid TransactionId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class InlineResponse200 {\n"); - sb.Append(" OutData: ").Append(OutData).Append("\n"); - sb.Append(" InData: ").Append(InData).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineResponse200); - } - - /// - /// Returns true if InlineResponse200 instances are equal - /// - /// Instance of InlineResponse200 to be compared - /// Boolean - public bool Equals(InlineResponse200 input) - { - if (input == null) - return false; - - return - ( - this.OutData == input.OutData || - (this.OutData != null && - this.OutData.Equals(input.OutData)) - ) && - ( - this.InData == input.InData || - (this.InData != null && - this.InData.Equals(input.InData)) - ) && - ( - this.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && - ( - this.TransactionId == input.TransactionId || - (this.TransactionId != null && - this.TransactionId.Equals(input.TransactionId)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.OutData != null) - hashCode = hashCode * 59 + this.OutData.GetHashCode(); - if (this.InData != null) - hashCode = hashCode * 59 + this.InData.GetHashCode(); - if (this.Tag != null) - hashCode = hashCode * 59 + this.Tag.GetHashCode(); - if (this.TransactionId != null) - hashCode = hashCode * 59 + this.TransactionId.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/InlineResponse2001.cs b/src/Regula.DocumentReader.WebClient/Model/InlineResponse2001.cs deleted file mode 100644 index d520767..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/InlineResponse2001.cs +++ /dev/null @@ -1,256 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// InlineResponse2001 - /// - [DataContract] - public partial class InlineResponse2001 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// chipPage. - /// processingFinished. - /// containerList. - /// transactionInfo. - /// Base64 encoded transaction processing log. - /// Free-form object provided in request. See passBackObject property of ProcessRequest.. - /// morePagesAvailable. - /// Time the document processing has taken, ms.. - /// coreLibResultCode. - public InlineResponse2001(int chipPage = default(int), int processingFinished = default(int), ContainerList containerList = default(ContainerList), TransactionInfo transactionInfo = default(TransactionInfo), string log = default(string), Dictionary passBackObject = default(Dictionary), int morePagesAvailable = default(int), int elapsedTime = default(int), int coreLibResultCode = default(int)) - { - this.ChipPage = chipPage; - this.ProcessingFinished = processingFinished; - this.ContainerList = containerList; - this.TransactionInfo = transactionInfo; - this.Log = log; - this.PassBackObject = passBackObject; - this.MorePagesAvailable = morePagesAvailable; - this.ElapsedTime = elapsedTime; - this.CoreLibResultCode = coreLibResultCode; - } - - /// - /// Gets or Sets ChipPage - /// - [DataMember(Name="ChipPage", EmitDefaultValue=false)] - public int ChipPage { get; set; } - - /// - /// Gets or Sets ProcessingFinished - /// - [DataMember(Name="ProcessingFinished", EmitDefaultValue=false)] - public int ProcessingFinished { get; set; } - - /// - /// Gets or Sets ContainerList - /// - [DataMember(Name="ContainerList", EmitDefaultValue=false)] - public ContainerList ContainerList { get; set; } - - /// - /// Gets or Sets TransactionInfo - /// - [DataMember(Name="TransactionInfo", EmitDefaultValue=false)] - public TransactionInfo TransactionInfo { get; set; } - - /// - /// Base64 encoded transaction processing log - /// - /// Base64 encoded transaction processing log - [DataMember(Name="log", EmitDefaultValue=false)] - public string Log { get; set; } - - /// - /// Free-form object provided in request. See passBackObject property of ProcessRequest. - /// - /// Free-form object provided in request. See passBackObject property of ProcessRequest. - [DataMember(Name="passBackObject", EmitDefaultValue=false)] - public Dictionary PassBackObject { get; set; } - - /// - /// Gets or Sets MorePagesAvailable - /// - [DataMember(Name="morePagesAvailable", EmitDefaultValue=false)] - public int MorePagesAvailable { get; set; } - - /// - /// Time the document processing has taken, ms. - /// - /// Time the document processing has taken, ms. - [DataMember(Name="elapsedTime", EmitDefaultValue=false)] - public int ElapsedTime { get; set; } - - /// - /// Gets or Sets CoreLibResultCode - /// - [DataMember(Name="CoreLibResultCode", EmitDefaultValue=false)] - public int CoreLibResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2001 {\n"); - sb.Append(" ChipPage: ").Append(ChipPage).Append("\n"); - sb.Append(" ProcessingFinished: ").Append(ProcessingFinished).Append("\n"); - sb.Append(" ContainerList: ").Append(ContainerList).Append("\n"); - sb.Append(" TransactionInfo: ").Append(TransactionInfo).Append("\n"); - sb.Append(" Log: ").Append(Log).Append("\n"); - sb.Append(" PassBackObject: ").Append(PassBackObject).Append("\n"); - sb.Append(" MorePagesAvailable: ").Append(MorePagesAvailable).Append("\n"); - sb.Append(" ElapsedTime: ").Append(ElapsedTime).Append("\n"); - sb.Append(" CoreLibResultCode: ").Append(CoreLibResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineResponse2001); - } - - /// - /// Returns true if InlineResponse2001 instances are equal - /// - /// Instance of InlineResponse2001 to be compared - /// Boolean - public bool Equals(InlineResponse2001 input) - { - if (input == null) - return false; - - return - ( - this.ChipPage == input.ChipPage || - (this.ChipPage != null && - this.ChipPage.Equals(input.ChipPage)) - ) && - ( - this.ProcessingFinished == input.ProcessingFinished || - (this.ProcessingFinished != null && - this.ProcessingFinished.Equals(input.ProcessingFinished)) - ) && - ( - this.ContainerList == input.ContainerList || - (this.ContainerList != null && - this.ContainerList.Equals(input.ContainerList)) - ) && - ( - this.TransactionInfo == input.TransactionInfo || - (this.TransactionInfo != null && - this.TransactionInfo.Equals(input.TransactionInfo)) - ) && - ( - this.Log == input.Log || - (this.Log != null && - this.Log.Equals(input.Log)) - ) && - ( - this.PassBackObject == input.PassBackObject || - this.PassBackObject != null && - input.PassBackObject != null && - this.PassBackObject.SequenceEqual(input.PassBackObject) - ) && - ( - this.MorePagesAvailable == input.MorePagesAvailable || - (this.MorePagesAvailable != null && - this.MorePagesAvailable.Equals(input.MorePagesAvailable)) - ) && - ( - this.ElapsedTime == input.ElapsedTime || - (this.ElapsedTime != null && - this.ElapsedTime.Equals(input.ElapsedTime)) - ) && - ( - this.CoreLibResultCode == input.CoreLibResultCode || - (this.CoreLibResultCode != null && - this.CoreLibResultCode.Equals(input.CoreLibResultCode)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ChipPage != null) - hashCode = hashCode * 59 + this.ChipPage.GetHashCode(); - if (this.ProcessingFinished != null) - hashCode = hashCode * 59 + this.ProcessingFinished.GetHashCode(); - if (this.ContainerList != null) - hashCode = hashCode * 59 + this.ContainerList.GetHashCode(); - if (this.TransactionInfo != null) - hashCode = hashCode * 59 + this.TransactionInfo.GetHashCode(); - if (this.Log != null) - hashCode = hashCode * 59 + this.Log.GetHashCode(); - if (this.PassBackObject != null) - hashCode = hashCode * 59 + this.PassBackObject.GetHashCode(); - if (this.MorePagesAvailable != null) - hashCode = hashCode * 59 + this.MorePagesAvailable.GetHashCode(); - if (this.ElapsedTime != null) - hashCode = hashCode * 59 + this.ElapsedTime.GetHashCode(); - if (this.CoreLibResultCode != null) - hashCode = hashCode * 59 + this.CoreLibResultCode.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs b/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs new file mode 100644 index 0000000..c1e241e --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs @@ -0,0 +1,428 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains the types of barcodes that can be processed + /// + /// Enumeration contains the types of barcodes that can be processed + public enum InputBarcodeType + { + /// + /// Enum UNKNOWN for value: bct_unknown + /// + UNKNOWN = 1, + + /// + /// Enum CODE128 for value: bct_Code128 + /// + CODE128 = 2, + + /// + /// Enum CODE39 for value: bct_Code39 + /// + CODE39 = 3, + + /// + /// Enum EAN8 for value: bct_EAN8 + /// + EAN8 = 4, + + /// + /// Enum ITF for value: bct_ITF + /// + ITF = 5, + + /// + /// Enum PDF417 for value: bct_PDF417 + /// + PDF417 = 6, + + /// + /// Enum STF for value: bct_STF + /// + STF = 7, + + /// + /// Enum MTF for value: bct_MTF + /// + MTF = 8, + + /// + /// Enum IATA for value: bct_IATA + /// + IATA = 9, + + /// + /// Enum CODABAR for value: bct_CODABAR + /// + CODABAR = 10, + + /// + /// Enum UPCA for value: bct_UPCA + /// + UPCA = 11, + + /// + /// Enum CODE93 for value: bct_CODE93 + /// + CODE93 = 12, + + /// + /// Enum UPCE for value: bct_UPCE + /// + UPCE = 13, + + /// + /// Enum EAN13 for value: bct_EAN13 + /// + EAN13 = 14, + + /// + /// Enum QRCODE for value: bct_QRCODE + /// + QRCODE = 15, + + /// + /// Enum AZTEC for value: bct_AZTEC + /// + AZTEC = 16, + + /// + /// Enum DATAMATRIX for value: bct_DATAMATRIX + /// + DATAMATRIX = 17, + + /// + /// Enum ALL_1D for value: bct_ALL_1D + /// + ALL_1D = 18, + + /// + /// Enum CODE11 for value: bct_Code11 + /// + CODE11 = 19, + + /// + /// Enum JABCODE for value: bct_JABCODE + /// + JABCODE = 20 + } + + /// + /// Converts to and from the JSON value + /// + public static class InputBarcodeTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static InputBarcodeType FromString(string value) + { + if (value.Equals("bct_unknown")) + return InputBarcodeType.UNKNOWN; + + if (value.Equals("bct_Code128")) + return InputBarcodeType.CODE128; + + if (value.Equals("bct_Code39")) + return InputBarcodeType.CODE39; + + if (value.Equals("bct_EAN8")) + return InputBarcodeType.EAN8; + + if (value.Equals("bct_ITF")) + return InputBarcodeType.ITF; + + if (value.Equals("bct_PDF417")) + return InputBarcodeType.PDF417; + + if (value.Equals("bct_STF")) + return InputBarcodeType.STF; + + if (value.Equals("bct_MTF")) + return InputBarcodeType.MTF; + + if (value.Equals("bct_IATA")) + return InputBarcodeType.IATA; + + if (value.Equals("bct_CODABAR")) + return InputBarcodeType.CODABAR; + + if (value.Equals("bct_UPCA")) + return InputBarcodeType.UPCA; + + if (value.Equals("bct_CODE93")) + return InputBarcodeType.CODE93; + + if (value.Equals("bct_UPCE")) + return InputBarcodeType.UPCE; + + if (value.Equals("bct_EAN13")) + return InputBarcodeType.EAN13; + + if (value.Equals("bct_QRCODE")) + return InputBarcodeType.QRCODE; + + if (value.Equals("bct_AZTEC")) + return InputBarcodeType.AZTEC; + + if (value.Equals("bct_DATAMATRIX")) + return InputBarcodeType.DATAMATRIX; + + if (value.Equals("bct_ALL_1D")) + return InputBarcodeType.ALL_1D; + + if (value.Equals("bct_Code11")) + return InputBarcodeType.CODE11; + + if (value.Equals("bct_JABCODE")) + return InputBarcodeType.JABCODE; + + throw new NotImplementedException($"Could not convert value to type InputBarcodeType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static InputBarcodeType? FromStringOrDefault(string value) + { + if (value.Equals("bct_unknown")) + return InputBarcodeType.UNKNOWN; + + if (value.Equals("bct_Code128")) + return InputBarcodeType.CODE128; + + if (value.Equals("bct_Code39")) + return InputBarcodeType.CODE39; + + if (value.Equals("bct_EAN8")) + return InputBarcodeType.EAN8; + + if (value.Equals("bct_ITF")) + return InputBarcodeType.ITF; + + if (value.Equals("bct_PDF417")) + return InputBarcodeType.PDF417; + + if (value.Equals("bct_STF")) + return InputBarcodeType.STF; + + if (value.Equals("bct_MTF")) + return InputBarcodeType.MTF; + + if (value.Equals("bct_IATA")) + return InputBarcodeType.IATA; + + if (value.Equals("bct_CODABAR")) + return InputBarcodeType.CODABAR; + + if (value.Equals("bct_UPCA")) + return InputBarcodeType.UPCA; + + if (value.Equals("bct_CODE93")) + return InputBarcodeType.CODE93; + + if (value.Equals("bct_UPCE")) + return InputBarcodeType.UPCE; + + if (value.Equals("bct_EAN13")) + return InputBarcodeType.EAN13; + + if (value.Equals("bct_QRCODE")) + return InputBarcodeType.QRCODE; + + if (value.Equals("bct_AZTEC")) + return InputBarcodeType.AZTEC; + + if (value.Equals("bct_DATAMATRIX")) + return InputBarcodeType.DATAMATRIX; + + if (value.Equals("bct_ALL_1D")) + return InputBarcodeType.ALL_1D; + + if (value.Equals("bct_Code11")) + return InputBarcodeType.CODE11; + + if (value.Equals("bct_JABCODE")) + return InputBarcodeType.JABCODE; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static string ToJsonValue(InputBarcodeType value) + { + if (value == InputBarcodeType.UNKNOWN) + return "bct_unknown"; + + if (value == InputBarcodeType.CODE128) + return "bct_Code128"; + + if (value == InputBarcodeType.CODE39) + return "bct_Code39"; + + if (value == InputBarcodeType.EAN8) + return "bct_EAN8"; + + if (value == InputBarcodeType.ITF) + return "bct_ITF"; + + if (value == InputBarcodeType.PDF417) + return "bct_PDF417"; + + if (value == InputBarcodeType.STF) + return "bct_STF"; + + if (value == InputBarcodeType.MTF) + return "bct_MTF"; + + if (value == InputBarcodeType.IATA) + return "bct_IATA"; + + if (value == InputBarcodeType.CODABAR) + return "bct_CODABAR"; + + if (value == InputBarcodeType.UPCA) + return "bct_UPCA"; + + if (value == InputBarcodeType.CODE93) + return "bct_CODE93"; + + if (value == InputBarcodeType.UPCE) + return "bct_UPCE"; + + if (value == InputBarcodeType.EAN13) + return "bct_EAN13"; + + if (value == InputBarcodeType.QRCODE) + return "bct_QRCODE"; + + if (value == InputBarcodeType.AZTEC) + return "bct_AZTEC"; + + if (value == InputBarcodeType.DATAMATRIX) + return "bct_DATAMATRIX"; + + if (value == InputBarcodeType.ALL_1D) + return "bct_ALL_1D"; + + if (value == InputBarcodeType.CODE11) + return "bct_Code11"; + + if (value == InputBarcodeType.JABCODE) + return "bct_JABCODE"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + } + + /// + /// A Json converter for type + /// + /// + public class InputBarcodeTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override InputBarcodeType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + InputBarcodeType? result = rawValue == null + ? null + : InputBarcodeTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the InputBarcodeType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, InputBarcodeType inputBarcodeType, JsonSerializerOptions options) + { + writer.WriteStringValue(inputBarcodeType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class InputBarcodeTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a InputBarcodeType from the Json object + /// + /// + /// + /// + /// + public override InputBarcodeType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + InputBarcodeType? result = rawValue == null + ? null + : InputBarcodeTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, InputBarcodeType? inputBarcodeType, JsonSerializerOptions options) + { + writer.WriteStringValue(inputBarcodeType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs b/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs index 91e0515..7b08493 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs @@ -1,26 +1,27 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { @@ -28,59 +29,232 @@ namespace Regula.DocumentReader.WebClient.Model /// Input image quality checks for the document processing /// /// Input image quality checks for the document processing - - [JsonConverter(typeof(StringEnumConverter))] - public enum InputImageQualityChecks { /// /// Enum Glares for value: glaresCheck /// - [EnumMember(Value = "glaresCheck")] Glares = 1, /// /// Enum Focus for value: focusCheck /// - [EnumMember(Value = "focusCheck")] Focus = 2, /// /// Enum Resolution for value: dpiThreshold /// - [EnumMember(Value = "dpiThreshold")] Resolution = 3, /// /// Enum Colorness for value: colornessCheck /// - [EnumMember(Value = "colornessCheck")] Colorness = 4, /// /// Enum Perspective for value: perspectiveCheck /// - [EnumMember(Value = "perspectiveCheck")] Perspective = 5, /// /// Enum Bounds for value: documentPosition /// - [EnumMember(Value = "documentPosition")] Bounds = 6, /// /// Enum Portrait for value: portraitCheck /// - [EnumMember(Value = "portraitCheck")] Portrait = 7, /// /// Enum Brightness for value: brightnessCheck /// - [EnumMember(Value = "brightnessCheck")] Brightness = 8 + } + + /// + /// Converts to and from the JSON value + /// + public static class InputImageQualityChecksValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static InputImageQualityChecks FromString(string value) + { + if (value.Equals("glaresCheck")) + return InputImageQualityChecks.Glares; + + if (value.Equals("focusCheck")) + return InputImageQualityChecks.Focus; + + if (value.Equals("dpiThreshold")) + return InputImageQualityChecks.Resolution; + + if (value.Equals("colornessCheck")) + return InputImageQualityChecks.Colorness; + + if (value.Equals("perspectiveCheck")) + return InputImageQualityChecks.Perspective; + + if (value.Equals("documentPosition")) + return InputImageQualityChecks.Bounds; + + if (value.Equals("portraitCheck")) + return InputImageQualityChecks.Portrait; + + if (value.Equals("brightnessCheck")) + return InputImageQualityChecks.Brightness; + + throw new NotImplementedException($"Could not convert value to type InputImageQualityChecks: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static InputImageQualityChecks? FromStringOrDefault(string value) + { + if (value.Equals("glaresCheck")) + return InputImageQualityChecks.Glares; + + if (value.Equals("focusCheck")) + return InputImageQualityChecks.Focus; + + if (value.Equals("dpiThreshold")) + return InputImageQualityChecks.Resolution; + + if (value.Equals("colornessCheck")) + return InputImageQualityChecks.Colorness; + + if (value.Equals("perspectiveCheck")) + return InputImageQualityChecks.Perspective; + + if (value.Equals("documentPosition")) + return InputImageQualityChecks.Bounds; + + if (value.Equals("portraitCheck")) + return InputImageQualityChecks.Portrait; + + if (value.Equals("brightnessCheck")) + return InputImageQualityChecks.Brightness; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static string ToJsonValue(InputImageQualityChecks value) + { + if (value == InputImageQualityChecks.Glares) + return "glaresCheck"; + + if (value == InputImageQualityChecks.Focus) + return "focusCheck"; + + if (value == InputImageQualityChecks.Resolution) + return "dpiThreshold"; + + if (value == InputImageQualityChecks.Colorness) + return "colornessCheck"; + + if (value == InputImageQualityChecks.Perspective) + return "perspectiveCheck"; + + if (value == InputImageQualityChecks.Bounds) + return "documentPosition"; + + if (value == InputImageQualityChecks.Portrait) + return "portraitCheck"; + + if (value == InputImageQualityChecks.Brightness) + return "brightnessCheck"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + } + + /// + /// A Json converter for type + /// + /// + public class InputImageQualityChecksJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override InputImageQualityChecks Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + InputImageQualityChecks? result = rawValue == null + ? null + : InputImageQualityChecksValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the InputImageQualityChecks to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, InputImageQualityChecks inputImageQualityChecks, JsonSerializerOptions options) + { + writer.WriteStringValue(inputImageQualityChecks.ToString()); + } } + /// + /// A Json converter for type + /// + public class InputImageQualityChecksNullableJsonConverter : JsonConverter + { + /// + /// Returns a InputImageQualityChecks from the Json object + /// + /// + /// + /// + /// + public override InputImageQualityChecks? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + InputImageQualityChecks? result = rawValue == null + ? null + : InputImageQualityChecksValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, InputImageQualityChecks? inputImageQualityChecks, JsonSerializerOptions options) + { + writer.WriteStringValue(inputImageQualityChecks?.ToString() ?? "null"); + } + } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LCID.cs b/src/Regula.DocumentReader.WebClient/Model/LCID.cs index 5f11262..ea53b31 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LCID.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LCID.cs @@ -1,455 +1,1974 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Locale id. Used to tag same typed fields declared in several languages. For example: name can be provided in both native and latin variants. Based on Microsoft locale id (https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f). - public class LCID + /// + /// Locale id. Used to tag same typed fields declared in several languages. For example: name can be provided in both native and latin variants. Based on Microsoft locale id (https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-lcid/70feba9f-294e-491e-b6eb-56532684c37f). + public enum LCID { + /// + /// Enum LATIN for value: 0 + /// + LATIN = 0, + + /// + /// Enum AFRIKAANS for value: 1078 + /// + AFRIKAANS = 1078, + + /// + /// Enum ALBANIAN for value: 1052 + /// + ALBANIAN = 1052, + + /// + /// Enum ARABIC_ALGERIA for value: 5121 + /// + ARABIC_ALGERIA = 5121, + + /// + /// Enum ARABIC_BAHRAIN for value: 15361 + /// + ARABIC_BAHRAIN = 15361, + + /// + /// Enum ARABIC_EGYPT for value: 3073 + /// + ARABIC_EGYPT = 3073, + + /// + /// Enum ARABIC_IRAQ for value: 2049 + /// + ARABIC_IRAQ = 2049, + + /// + /// Enum ARABIC_JORDAN for value: 11265 + /// + ARABIC_JORDAN = 11265, + + /// + /// Enum ARABIC_KUWAIT for value: 13313 + /// + ARABIC_KUWAIT = 13313, + + /// + /// Enum ARABIC_LEBANON for value: 12289 + /// + ARABIC_LEBANON = 12289, + + /// + /// Enum ARABIC_LIBYA for value: 4097 + /// + ARABIC_LIBYA = 4097, + + /// + /// Enum ARABIC_MOROCCO for value: 6145 + /// + ARABIC_MOROCCO = 6145, + + /// + /// Enum ARABIC_OMAN for value: 8193 + /// + ARABIC_OMAN = 8193, + + /// + /// Enum ARABIC_QATAR for value: 16385 + /// + ARABIC_QATAR = 16385, + + /// + /// Enum ARABIC_SAUDI_ARABIA for value: 1025 + /// + ARABIC_SAUDI_ARABIA = 1025, + + /// + /// Enum ARABIC_SYRIA for value: 10241 + /// + ARABIC_SYRIA = 10241, + + /// + /// Enum ARABIC_TUNISIA for value: 7169 + /// + ARABIC_TUNISIA = 7169, + + /// + /// Enum ARABIC_UAE for value: 14337 + /// + ARABIC_UAE = 14337, + + /// + /// Enum ARABIC_YEMEN for value: 9217 + /// + ARABIC_YEMEN = 9217, + + /// + /// Enum ARABIC_ARMENIAN for value: 1067 + /// + ARABIC_ARMENIAN = 1067, + + /// + /// Enum AZERI_CYRILIC for value: 2092 + /// + AZERI_CYRILIC = 2092, + + /// + /// Enum AZERI_LATIN for value: 1068 + /// + AZERI_LATIN = 1068, + + /// + /// Enum BASQUE for value: 1069 + /// + BASQUE = 1069, + + /// + /// Enum BELARUSIAN for value: 1059 + /// + BELARUSIAN = 1059, + + /// + /// Enum BULGARIAN for value: 1026 + /// + BULGARIAN = 1026, + + /// + /// Enum BURMESE for value: 1109 + /// + BURMESE = 1109, + + /// + /// Enum CATALAN for value: 1027 + /// + CATALAN = 1027, + + /// + /// Enum CHINESE_HONGKONG_SAR for value: 3076 + /// + CHINESE_HONGKONG_SAR = 3076, + + /// + /// Enum CHINESE_MACAO_SAR for value: 5124 + /// + CHINESE_MACAO_SAR = 5124, + + /// + /// Enum CHINESE for value: 2052 + /// + CHINESE = 2052, + + /// + /// Enum CHINESE_SINGAPORE for value: 4100 + /// + CHINESE_SINGAPORE = 4100, + + /// + /// Enum CHINESE_TAIWAN for value: 1028 + /// + CHINESE_TAIWAN = 1028, + + /// + /// Enum CROATIAN for value: 1050 + /// + CROATIAN = 1050, + + /// + /// Enum CZECH for value: 1029 + /// + CZECH = 1029, + + /// + /// Enum DANISH for value: 1030 + /// + DANISH = 1030, + + /// + /// Enum DIVEHI for value: 1125 + /// + DIVEHI = 1125, + + /// + /// Enum DUTCH_BELGIUM for value: 2067 + /// + DUTCH_BELGIUM = 2067, + + /// + /// Enum DUTCH_NETHERLANDS for value: 1043 + /// + DUTCH_NETHERLANDS = 1043, + + /// + /// Enum ENGLISH_AUSTRALIA for value: 3081 + /// + ENGLISH_AUSTRALIA = 3081, + + /// + /// Enum ENGLISH_BELIZE for value: 10249 + /// + ENGLISH_BELIZE = 10249, + + /// + /// Enum ENGLISH_CANADA for value: 4105 + /// + ENGLISH_CANADA = 4105, + + /// + /// Enum ENGLISH_CARRIBEAN for value: 9225 + /// + ENGLISH_CARRIBEAN = 9225, + + /// + /// Enum ENGLISH_IRELAND for value: 6153 + /// + ENGLISH_IRELAND = 6153, + + /// + /// Enum ENGLISH_JAMAICA for value: 8201 + /// + ENGLISH_JAMAICA = 8201, + + /// + /// Enum ENGLISH_NEW_ZEALAND for value: 5129 + /// + ENGLISH_NEW_ZEALAND = 5129, + + /// + /// Enum ENGLISH_PHILIPPINES for value: 13321 + /// + ENGLISH_PHILIPPINES = 13321, + + /// + /// Enum ENGLISH_SOUTH_AFRICA for value: 7177 + /// + ENGLISH_SOUTH_AFRICA = 7177, + + /// + /// Enum ENGLISH_TRINIDAD for value: 11273 + /// + ENGLISH_TRINIDAD = 11273, + + /// + /// Enum ENGLISH_UK for value: 2057 + /// + ENGLISH_UK = 2057, + + /// + /// Enum ENGLISH_US for value: 1033 + /// + ENGLISH_US = 1033, + + /// + /// Enum ENGLISH_ZIMBABWE for value: 12297 + /// + ENGLISH_ZIMBABWE = 12297, + + /// + /// Enum ESTONIAN for value: 1061 + /// + ESTONIAN = 1061, + + /// + /// Enum FAEROESE for value: 1080 + /// + FAEROESE = 1080, + + /// + /// Enum FARSI for value: 1065 + /// + FARSI = 1065, + + /// + /// Enum FINNISH for value: 1035 + /// + FINNISH = 1035, + + /// + /// Enum FRENCH_BELGIUM for value: 2060 + /// + FRENCH_BELGIUM = 2060, + + /// + /// Enum FRENCH_CANADA for value: 3084 + /// + FRENCH_CANADA = 3084, + + /// + /// Enum FRENCH_FRANCE for value: 1036 + /// + FRENCH_FRANCE = 1036, + + /// + /// Enum FRENCH_LUXEMBOURG for value: 5132 + /// + FRENCH_LUXEMBOURG = 5132, + + /// + /// Enum FRENCH_MONACO for value: 6156 + /// + FRENCH_MONACO = 6156, + + /// + /// Enum FRENCH_SWITZERLAND for value: 4108 + /// + FRENCH_SWITZERLAND = 4108, + + /// + /// Enum FYRO_MACEDONIAN for value: 1071 + /// + FYRO_MACEDONIAN = 1071, + + /// + /// Enum GALICIAN for value: 1110 + /// + GALICIAN = 1110, + + /// + /// Enum GEORGIAN for value: 1079 + /// + GEORGIAN = 1079, + + /// + /// Enum GERMAN_AUSTRIA for value: 3079 + /// + GERMAN_AUSTRIA = 3079, + + /// + /// Enum GERMAN_GERMANY for value: 1031 + /// + GERMAN_GERMANY = 1031, + + /// + /// Enum GERMAN_LIECHTENSTEIN for value: 5127 + /// + GERMAN_LIECHTENSTEIN = 5127, + + /// + /// Enum GERMAN_LUXEMBOURG for value: 4103 + /// + GERMAN_LUXEMBOURG = 4103, + + /// + /// Enum GERMAN_SWITZERLAND for value: 2055 + /// + GERMAN_SWITZERLAND = 2055, + + /// + /// Enum GREEK for value: 1032 + /// + GREEK = 1032, + + /// + /// Enum GUJARATI for value: 1095 + /// + GUJARATI = 1095, + + /// + /// Enum HEBREW for value: 1037 + /// + HEBREW = 1037, + + /// + /// Enum HINDI_INDIA for value: 1081 + /// + HINDI_INDIA = 1081, + + /// + /// Enum HUNGARIAN for value: 1038 + /// + HUNGARIAN = 1038, + + /// + /// Enum ICELANDIC for value: 1039 + /// + ICELANDIC = 1039, + + /// + /// Enum INDONESIAN for value: 1057 + /// + INDONESIAN = 1057, + + /// + /// Enum ITALIAN_ITALY for value: 1040 + /// + ITALIAN_ITALY = 1040, + + /// + /// Enum ITALIAN_SWITZERLAND for value: 2064 + /// + ITALIAN_SWITZERLAND = 2064, + + /// + /// Enum JAPANESE for value: 1041 + /// + JAPANESE = 1041, + + /// + /// Enum KANNADA for value: 1099 + /// + KANNADA = 1099, + + /// + /// Enum KAZAKH for value: 1087 + /// + KAZAKH = 1087, + + /// + /// Enum KHMER for value: 1107 + /// + KHMER = 1107, + + /// + /// Enum KONKANI for value: 1111 + /// + KONKANI = 1111, + + /// + /// Enum KOREAN for value: 1042 + /// + KOREAN = 1042, + + /// + /// Enum KYRGYZ_CYRILICK for value: 1088 + /// + KYRGYZ_CYRILICK = 1088, + + /// + /// Enum LATVIAN for value: 1062 + /// + LATVIAN = 1062, + + /// + /// Enum LITHUANIAN for value: 1063 + /// + LITHUANIAN = 1063, + + /// + /// Enum MALAY_MALAYSIA for value: 1086 + /// + MALAY_MALAYSIA = 1086, + + /// + /// Enum MALAY_BRUNEI_DARUSSALAM for value: 2110 + /// + MALAY_BRUNEI_DARUSSALAM = 2110, + + /// + /// Enum MALTESE for value: 1082 + /// + MALTESE = 1082, + + /// + /// Enum MARATHI for value: 1102 + /// + MARATHI = 1102, + + /// + /// Enum MONGOLIAN_CYRILIC for value: 1104 + /// + MONGOLIAN_CYRILIC = 1104, + + /// + /// Enum NORWEGIAN_BOKMAL for value: 1044 + /// + NORWEGIAN_BOKMAL = 1044, + + /// + /// Enum NORWEGIAN_NYORSK for value: 2068 + /// + NORWEGIAN_NYORSK = 2068, + + /// + /// Enum POLISH for value: 1045 + /// + POLISH = 1045, + + /// + /// Enum PORTUGUESE_BRAZIL for value: 1046 + /// + PORTUGUESE_BRAZIL = 1046, + + /// + /// Enum PORTUGUESE_PORTUGAL for value: 2070 + /// + PORTUGUESE_PORTUGAL = 2070, + + /// + /// Enum PUNJABI for value: 1094 + /// + PUNJABI = 1094, + + /// + /// Enum RHAETO_ROMANIC for value: 1047 + /// + RHAETO_ROMANIC = 1047, + + /// + /// Enum ROMANIAN for value: 1048 + /// + ROMANIAN = 1048, + + /// + /// Enum RUSSIAN for value: 1049 + /// + RUSSIAN = 1049, + + /// + /// Enum SANSKRIT for value: 1103 + /// + SANSKRIT = 1103, + + /// + /// Enum SERBIAN_CYRILIC for value: 3098 + /// + SERBIAN_CYRILIC = 3098, + + /// + /// Enum SERBIAN_LATIN for value: 2074 + /// + SERBIAN_LATIN = 2074, + + /// + /// Enum SINHALA for value: 1115 + /// + SINHALA = 1115, + + /// + /// Enum SLOVAK for value: 1051 + /// + SLOVAK = 1051, + + /// + /// Enum SLOVENIAN for value: 1060 + /// + SLOVENIAN = 1060, + + /// + /// Enum SPANISH_ARGENTINA for value: 11274 + /// + SPANISH_ARGENTINA = 11274, + + /// + /// Enum SPANISH_BOLIVIA for value: 16394 + /// + SPANISH_BOLIVIA = 16394, + + /// + /// Enum SPANISH_CHILE for value: 13322 + /// + SPANISH_CHILE = 13322, + + /// + /// Enum SPANICH_COLOMBIA for value: 9226 + /// + SPANICH_COLOMBIA = 9226, + + /// + /// Enum SPANISH_COSTA_RICA for value: 5130 + /// + SPANISH_COSTA_RICA = 5130, + + /// + /// Enum SPANISH_DOMINICAN_REPUBLIC for value: 7178 + /// + SPANISH_DOMINICAN_REPUBLIC = 7178, + + /// + /// Enum SPANISH_ECUADOR for value: 12298 + /// + SPANISH_ECUADOR = 12298, + + /// + /// Enum SPANISH_EL_SALVADOR for value: 17418 + /// + SPANISH_EL_SALVADOR = 17418, + + /// + /// Enum SPANISH_GUATEMALA for value: 4106 + /// + SPANISH_GUATEMALA = 4106, + + /// + /// Enum SPANISH_HONDURAS for value: 18442 + /// + SPANISH_HONDURAS = 18442, + + /// + /// Enum SPANISH_MEXICO for value: 2058 + /// + SPANISH_MEXICO = 2058, + + /// + /// Enum SPANISH_NICARAGUA for value: 19466 + /// + SPANISH_NICARAGUA = 19466, + + /// + /// Enum SPANISH_PANAMA for value: 6154 + /// + SPANISH_PANAMA = 6154, + + /// + /// Enum SPANISH_PARAGUAY for value: 15370 + /// + SPANISH_PARAGUAY = 15370, + + /// + /// Enum SPANISH_PERU for value: 10250 + /// + SPANISH_PERU = 10250, + + /// + /// Enum SPANISH_PUERTO_RICO for value: 20490 + /// + SPANISH_PUERTO_RICO = 20490, + + /// + /// Enum SPANISH_TRADITIONAL_SORT for value: 1034 + /// + SPANISH_TRADITIONAL_SORT = 1034, + + /// + /// Enum SPANISH_INTERNATIONAL_SORT for value: 3082 + /// + SPANISH_INTERNATIONAL_SORT = 3082, + + /// + /// Enum SPANISH_URUGUAY for value: 14346 + /// + SPANISH_URUGUAY = 14346, + + /// + /// Enum SPANISH_VENEZUELA for value: 8202 + /// + SPANISH_VENEZUELA = 8202, + + /// + /// Enum SWAHILI for value: 1089 + /// + SWAHILI = 1089, + + /// + /// Enum SWEDISH for value: 1053 + /// + SWEDISH = 1053, + + /// + /// Enum SWEDISH_FINLAND for value: 2077 + /// + SWEDISH_FINLAND = 2077, + + /// + /// Enum SYRIAC for value: 1114 + /// + SYRIAC = 1114, + + /// + /// Enum TAMIL for value: 1097 + /// + TAMIL = 1097, + + /// + /// Enum TATAR for value: 1092 + /// + TATAR = 1092, + + /// + /// Enum TELUGU for value: 1098 + /// + TELUGU = 1098, + + /// + /// Enum THAI_THAILAND for value: 1054 + /// + THAI_THAILAND = 1054, + + /// + /// Enum TURKISH for value: 1055 + /// + TURKISH = 1055, + + /// + /// Enum TAJIK_CYRILLIC for value: 1064 + /// + TAJIK_CYRILLIC = 1064, + + /// + /// Enum TURKMEN for value: 1090 + /// + TURKMEN = 1090, + + /// + /// Enum UKRAINIAN for value: 1058 + /// + UKRAINIAN = 1058, + + /// + /// Enum URDU for value: 1056 + /// + URDU = 1056, + + /// + /// Enum UZBEK_CYRILIC for value: 2115 + /// + UZBEK_CYRILIC = 2115, + + /// + /// Enum UZBEK_LATIN for value: 1091 + /// + UZBEK_LATIN = 1091, + + /// + /// Enum VIETNAMESE for value: 1066 + /// + VIETNAMESE = 1066, + + /// + /// Enum CTC_SIMPLIFIED for value: 50001 + /// + CTC_SIMPLIFIED = 50001, + + /// + /// Enum CTC_TRADITIONAL for value: 50002 + /// + CTC_TRADITIONAL = 50002, + + /// + /// Enum BENGALI_BANGLADESH for value: 2117 + /// + BENGALI_BANGLADESH = 2117, + + /// + /// Enum BENGALI_INDIA for value: 1093 + /// + BENGALI_INDIA = 1093, + + /// + /// Enum ASSAMESE for value: 1101 + /// + ASSAMESE = 1101, + + /// + /// Enum ORIYA for value: 1096 + /// + ORIYA = 1096, + + /// + /// Enum MALAYALAM for value: 1100 + /// + MALAYALAM = 1100, + + /// + /// Enum LAO for value: 1108 + /// + LAO = 1108, + + /// + /// Enum SINDHI_INDIA for value: 1113 + /// + SINDHI_INDIA = 1113, + + /// + /// Enum AMHARIC for value: 1118 + /// + AMHARIC = 1118, + + /// + /// Enum KASHMIRI for value: 1120 + /// + KASHMIRI = 1120, + + /// + /// Enum NEPALI for value: 1121 + /// + NEPALI = 1121, + + /// + /// Enum PASHTO for value: 1123 + /// + PASHTO = 1123, + + /// + /// Enum SINDHI for value: 2137 + /// + SINDHI = 2137, + + /// + /// Enum ARABIC for value: 4096 + /// + ARABIC = 4096, + + /// + /// Enum BANK_CARD_NUMBER for value: 10000 + /// + BANK_CARD_NUMBER = 10000, + + /// + /// Enum BANK_CARD_EXPIRY_DATE for value: 10001 + /// + BANK_CARD_EXPIRY_DATE = 10001, + + /// + /// Enum BANK_CARD_NAME for value: 10002 + /// + BANK_CARD_NAME = 10002, + + /// + /// Enum BANK_CARD for value: 10003 + /// + BANK_CARD = 10003, + + /// + /// Enum BANK_CARD_CVV2 for value: 10004 + /// + BANK_CARD_CVV2 = 10004, + + /// + /// Enum ABKHAZIAN for value: 10011 + /// + ABKHAZIAN = 10011, + + /// + /// Enum KARAKALPAK for value: 10012 + /// + KARAKALPAK = 10012, + + /// + /// Enum URDU_DETECTION for value: 10560 + /// + URDU_DETECTION = 10560 + } + + /// + /// Converts to and from the JSON value + /// + public static class LCIDValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static LCID FromString(string value) + { + if (value.Equals((0).ToString())) + return LCID.LATIN; + + if (value.Equals((1078).ToString())) + return LCID.AFRIKAANS; + + if (value.Equals((1052).ToString())) + return LCID.ALBANIAN; + + if (value.Equals((5121).ToString())) + return LCID.ARABIC_ALGERIA; + + if (value.Equals((15361).ToString())) + return LCID.ARABIC_BAHRAIN; + + if (value.Equals((3073).ToString())) + return LCID.ARABIC_EGYPT; + + if (value.Equals((2049).ToString())) + return LCID.ARABIC_IRAQ; + + if (value.Equals((11265).ToString())) + return LCID.ARABIC_JORDAN; + + if (value.Equals((13313).ToString())) + return LCID.ARABIC_KUWAIT; + + if (value.Equals((12289).ToString())) + return LCID.ARABIC_LEBANON; + + if (value.Equals((4097).ToString())) + return LCID.ARABIC_LIBYA; + + if (value.Equals((6145).ToString())) + return LCID.ARABIC_MOROCCO; + + if (value.Equals((8193).ToString())) + return LCID.ARABIC_OMAN; + + if (value.Equals((16385).ToString())) + return LCID.ARABIC_QATAR; + + if (value.Equals((1025).ToString())) + return LCID.ARABIC_SAUDI_ARABIA; + + if (value.Equals((10241).ToString())) + return LCID.ARABIC_SYRIA; + + if (value.Equals((7169).ToString())) + return LCID.ARABIC_TUNISIA; + + if (value.Equals((14337).ToString())) + return LCID.ARABIC_UAE; + + if (value.Equals((9217).ToString())) + return LCID.ARABIC_YEMEN; + + if (value.Equals((1067).ToString())) + return LCID.ARABIC_ARMENIAN; + + if (value.Equals((2092).ToString())) + return LCID.AZERI_CYRILIC; + + if (value.Equals((1068).ToString())) + return LCID.AZERI_LATIN; + + if (value.Equals((1069).ToString())) + return LCID.BASQUE; + + if (value.Equals((1059).ToString())) + return LCID.BELARUSIAN; + + if (value.Equals((1026).ToString())) + return LCID.BULGARIAN; + + if (value.Equals((1109).ToString())) + return LCID.BURMESE; + + if (value.Equals((1027).ToString())) + return LCID.CATALAN; + + if (value.Equals((3076).ToString())) + return LCID.CHINESE_HONGKONG_SAR; + + if (value.Equals((5124).ToString())) + return LCID.CHINESE_MACAO_SAR; + + if (value.Equals((2052).ToString())) + return LCID.CHINESE; + + if (value.Equals((4100).ToString())) + return LCID.CHINESE_SINGAPORE; + + if (value.Equals((1028).ToString())) + return LCID.CHINESE_TAIWAN; + + if (value.Equals((1050).ToString())) + return LCID.CROATIAN; + + if (value.Equals((1029).ToString())) + return LCID.CZECH; + + if (value.Equals((1030).ToString())) + return LCID.DANISH; + + if (value.Equals((1125).ToString())) + return LCID.DIVEHI; + + if (value.Equals((2067).ToString())) + return LCID.DUTCH_BELGIUM; + + if (value.Equals((1043).ToString())) + return LCID.DUTCH_NETHERLANDS; + + if (value.Equals((3081).ToString())) + return LCID.ENGLISH_AUSTRALIA; + + if (value.Equals((10249).ToString())) + return LCID.ENGLISH_BELIZE; + + if (value.Equals((4105).ToString())) + return LCID.ENGLISH_CANADA; + + if (value.Equals((9225).ToString())) + return LCID.ENGLISH_CARRIBEAN; + + if (value.Equals((6153).ToString())) + return LCID.ENGLISH_IRELAND; + + if (value.Equals((8201).ToString())) + return LCID.ENGLISH_JAMAICA; + + if (value.Equals((5129).ToString())) + return LCID.ENGLISH_NEW_ZEALAND; + + if (value.Equals((13321).ToString())) + return LCID.ENGLISH_PHILIPPINES; + + if (value.Equals((7177).ToString())) + return LCID.ENGLISH_SOUTH_AFRICA; + + if (value.Equals((11273).ToString())) + return LCID.ENGLISH_TRINIDAD; + + if (value.Equals((2057).ToString())) + return LCID.ENGLISH_UK; + + if (value.Equals((1033).ToString())) + return LCID.ENGLISH_US; + + if (value.Equals((12297).ToString())) + return LCID.ENGLISH_ZIMBABWE; + + if (value.Equals((1061).ToString())) + return LCID.ESTONIAN; + + if (value.Equals((1080).ToString())) + return LCID.FAEROESE; + + if (value.Equals((1065).ToString())) + return LCID.FARSI; + + if (value.Equals((1035).ToString())) + return LCID.FINNISH; + + if (value.Equals((2060).ToString())) + return LCID.FRENCH_BELGIUM; + + if (value.Equals((3084).ToString())) + return LCID.FRENCH_CANADA; + + if (value.Equals((1036).ToString())) + return LCID.FRENCH_FRANCE; + + if (value.Equals((5132).ToString())) + return LCID.FRENCH_LUXEMBOURG; + + if (value.Equals((6156).ToString())) + return LCID.FRENCH_MONACO; + + if (value.Equals((4108).ToString())) + return LCID.FRENCH_SWITZERLAND; + + if (value.Equals((1071).ToString())) + return LCID.FYRO_MACEDONIAN; + + if (value.Equals((1110).ToString())) + return LCID.GALICIAN; + + if (value.Equals((1079).ToString())) + return LCID.GEORGIAN; + + if (value.Equals((3079).ToString())) + return LCID.GERMAN_AUSTRIA; + + if (value.Equals((1031).ToString())) + return LCID.GERMAN_GERMANY; + + if (value.Equals((5127).ToString())) + return LCID.GERMAN_LIECHTENSTEIN; + + if (value.Equals((4103).ToString())) + return LCID.GERMAN_LUXEMBOURG; + + if (value.Equals((2055).ToString())) + return LCID.GERMAN_SWITZERLAND; + + if (value.Equals((1032).ToString())) + return LCID.GREEK; + + if (value.Equals((1095).ToString())) + return LCID.GUJARATI; + + if (value.Equals((1037).ToString())) + return LCID.HEBREW; + + if (value.Equals((1081).ToString())) + return LCID.HINDI_INDIA; + + if (value.Equals((1038).ToString())) + return LCID.HUNGARIAN; + + if (value.Equals((1039).ToString())) + return LCID.ICELANDIC; + + if (value.Equals((1057).ToString())) + return LCID.INDONESIAN; + + if (value.Equals((1040).ToString())) + return LCID.ITALIAN_ITALY; + + if (value.Equals((2064).ToString())) + return LCID.ITALIAN_SWITZERLAND; + + if (value.Equals((1041).ToString())) + return LCID.JAPANESE; + + if (value.Equals((1099).ToString())) + return LCID.KANNADA; + + if (value.Equals((1087).ToString())) + return LCID.KAZAKH; + + if (value.Equals((1107).ToString())) + return LCID.KHMER; + + if (value.Equals((1111).ToString())) + return LCID.KONKANI; + + if (value.Equals((1042).ToString())) + return LCID.KOREAN; + + if (value.Equals((1088).ToString())) + return LCID.KYRGYZ_CYRILICK; + + if (value.Equals((1062).ToString())) + return LCID.LATVIAN; + + if (value.Equals((1063).ToString())) + return LCID.LITHUANIAN; + + if (value.Equals((1086).ToString())) + return LCID.MALAY_MALAYSIA; + + if (value.Equals((2110).ToString())) + return LCID.MALAY_BRUNEI_DARUSSALAM; + + if (value.Equals((1082).ToString())) + return LCID.MALTESE; + + if (value.Equals((1102).ToString())) + return LCID.MARATHI; + + if (value.Equals((1104).ToString())) + return LCID.MONGOLIAN_CYRILIC; + + if (value.Equals((1044).ToString())) + return LCID.NORWEGIAN_BOKMAL; + + if (value.Equals((2068).ToString())) + return LCID.NORWEGIAN_NYORSK; + + if (value.Equals((1045).ToString())) + return LCID.POLISH; - /** Latin */ - public const int LATIN = 0; + if (value.Equals((1046).ToString())) + return LCID.PORTUGUESE_BRAZIL; - /** Afrikaans */ - public const int AFRIKAANS = 1078; + if (value.Equals((2070).ToString())) + return LCID.PORTUGUESE_PORTUGAL; - /** Albanian */ - public const int ALBANIAN = 1052; + if (value.Equals((1094).ToString())) + return LCID.PUNJABI; - /** Arabic (Algeria) */ - public const int ARABIC_ALGERIA = 5121; + if (value.Equals((1047).ToString())) + return LCID.RHAETO_ROMANIC; - /** Arabic (Bahrain) */ - public const int ARABIC_BAHRAIN = 15361; + if (value.Equals((1048).ToString())) + return LCID.ROMANIAN; - /** Arabic (Egypt) */ - public const int ARABIC_EGYPT = 3073; + if (value.Equals((1049).ToString())) + return LCID.RUSSIAN; - /** Arabic (Iraq) */ - public const int ARABIC_IRAQ = 2049; + if (value.Equals((1103).ToString())) + return LCID.SANSKRIT; - /** Arabic (Jordan) */ - public const int ARABIC_JORDAN = 11265; + if (value.Equals((3098).ToString())) + return LCID.SERBIAN_CYRILIC; - /** Arabic (Kuwait) */ - public const int ARABIC_KUWAIT = 13313; + if (value.Equals((2074).ToString())) + return LCID.SERBIAN_LATIN; - /** Arabic (Lebanon) */ - public const int ARABIC_LEBANON = 12289; + if (value.Equals((1115).ToString())) + return LCID.SINHALA; - /** Arabic (Libya) */ - public const int ARABIC_LIBYA = 4097; + if (value.Equals((1051).ToString())) + return LCID.SLOVAK; - /** Arabic (Morocco) */ - public const int ARABIC_MOROCCO = 6145; + if (value.Equals((1060).ToString())) + return LCID.SLOVENIAN; - /** Arabic (Oman) */ - public const int ARABIC_OMAN = 8193; + if (value.Equals((11274).ToString())) + return LCID.SPANISH_ARGENTINA; - /** Arabic (Qatar) */ - public const int ARABIC_QATAR = 16385; + if (value.Equals((16394).ToString())) + return LCID.SPANISH_BOLIVIA; - /** Arabic (Saudi Arabia) */ - public const int ARABIC_SAUDI_ARABIA = 1025; + if (value.Equals((13322).ToString())) + return LCID.SPANISH_CHILE; - /** Arabic (Syria) */ - public const int ARABIC_SYRIA = 10241; + if (value.Equals((9226).ToString())) + return LCID.SPANICH_COLOMBIA; - /** Arabic (Tunisia) */ - public const int ARABIC_TUNISIA = 7169; + if (value.Equals((5130).ToString())) + return LCID.SPANISH_COSTA_RICA; - /** Arabic (U.A.E.) */ - public const int ARABIC_UAE = 14337; + if (value.Equals((7178).ToString())) + return LCID.SPANISH_DOMINICAN_REPUBLIC; - /** Arabic (Yemen) */ - public const int ARABIC_YEMEN = 9217; + if (value.Equals((12298).ToString())) + return LCID.SPANISH_ECUADOR; - /** Armenian */ - public const int ARABIC_ARMENIAN = 1067; + if (value.Equals((17418).ToString())) + return LCID.SPANISH_EL_SALVADOR; - /** Azeri (Cyrillic) */ - public const int AZERI_CYRILIC = 2092; + if (value.Equals((4106).ToString())) + return LCID.SPANISH_GUATEMALA; - /** Azeri (Latin) */ - public const int AZERI_LATIN = 1068; + if (value.Equals((18442).ToString())) + return LCID.SPANISH_HONDURAS; - /** Basque */ - public const int BASQUE = 1069; + if (value.Equals((2058).ToString())) + return LCID.SPANISH_MEXICO; - /** Belarusian */ - public const int BELARUSIAN = 1059; + if (value.Equals((19466).ToString())) + return LCID.SPANISH_NICARAGUA; - /** Bulgarian */ - public const int BULGARIAN = 1026; + if (value.Equals((6154).ToString())) + return LCID.SPANISH_PANAMA; - /** Catalan */ - public const int CATALAN = 1027; + if (value.Equals((15370).ToString())) + return LCID.SPANISH_PARAGUAY; - /** Chinese (HongKong S.A.R.) */ - public const int CHINESE_HONGKONG_SAR = 3076; + if (value.Equals((10250).ToString())) + return LCID.SPANISH_PERU; - /** Chinese (Macao S.A.R.) */ - public const int CHINESE_MACAO_SAR = 5124; + if (value.Equals((20490).ToString())) + return LCID.SPANISH_PUERTO_RICO; - /** Chinese */ - public const int CHINESE = 2052; + if (value.Equals((1034).ToString())) + return LCID.SPANISH_TRADITIONAL_SORT; - /** Chinese (Singapore) */ - public const int CHINESE_SINGAPORE = 4100; + if (value.Equals((3082).ToString())) + return LCID.SPANISH_INTERNATIONAL_SORT; - /** Chinese (Taiwan) */ - public const int CHINESE_TAIWAN = 1028; + if (value.Equals((14346).ToString())) + return LCID.SPANISH_URUGUAY; - /** Croatian */ - public const int CROATIAN = 1050; + if (value.Equals((8202).ToString())) + return LCID.SPANISH_VENEZUELA; - /** Czech */ - public const int CZECH = 1029; + if (value.Equals((1089).ToString())) + return LCID.SWAHILI; - /** Danish */ - public const int DANISH = 1030; + if (value.Equals((1053).ToString())) + return LCID.SWEDISH; - /** Divehi */ - public const int DIVEHI = 1125; + if (value.Equals((2077).ToString())) + return LCID.SWEDISH_FINLAND; - /** Dutch (Belgium) */ - public const int DUTCH_BELGIUM = 2067; + if (value.Equals((1114).ToString())) + return LCID.SYRIAC; - /** Dutch (Netherlands) */ - public const int DUTCH_NETHERLANDS = 1043; + if (value.Equals((1097).ToString())) + return LCID.TAMIL; - /** English (Australia) */ - public const int ENGLISH_AUSTRALIA = 3081; + if (value.Equals((1092).ToString())) + return LCID.TATAR; - /** English (Belize) */ - public const int ENGLISH_BELIZE = 10249; + if (value.Equals((1098).ToString())) + return LCID.TELUGU; - /** English (Canada) */ - public const int ENGLISH_CANADA = 4105; + if (value.Equals((1054).ToString())) + return LCID.THAI_THAILAND; - /** English (Caribbean) */ - public const int ENGLISH_CARRIBEAN = 9225; + if (value.Equals((1055).ToString())) + return LCID.TURKISH; - /** English (Ireland) */ - public const int ENGLISH_IRELAND = 6153; + if (value.Equals((1064).ToString())) + return LCID.TAJIK_CYRILLIC; - /** English (Jamaica) */ - public const int ENGLISH_JAMAICA = 8201; + if (value.Equals((1090).ToString())) + return LCID.TURKMEN; - /** English (New Zealand) */ - public const int ENGLISH_NEW_ZEALAND = 5129; + if (value.Equals((1058).ToString())) + return LCID.UKRAINIAN; - /** English (Philippines) */ - public const int ENGLISH_PHILIPPINES = 13321; + if (value.Equals((1056).ToString())) + return LCID.URDU; - /** English (South Africa) */ - public const int ENGLISH_SOUTH_AFRICA = 7177; + if (value.Equals((2115).ToString())) + return LCID.UZBEK_CYRILIC; - /** English (Trinidad) */ - public const int ENGLISH_TRINIDAD = 11273; + if (value.Equals((1091).ToString())) + return LCID.UZBEK_LATIN; - /** English (United Kingdom) */ - public const int ENGLISH_UK = 2057; + if (value.Equals((1066).ToString())) + return LCID.VIETNAMESE; - /** English (United States) */ - public const int ENGLISH_US = 1033; + if (value.Equals((50001).ToString())) + return LCID.CTC_SIMPLIFIED; - /** English (Zimbabwe) */ - public const int ENGLISH_ZIMBABWE = 12297; + if (value.Equals((50002).ToString())) + return LCID.CTC_TRADITIONAL; - /** Estonian */ - public const int ESTONIAN = 1061; + if (value.Equals((2117).ToString())) + return LCID.BENGALI_BANGLADESH; - /** Faeroese */ - public const int FAEROESE = 1080; + if (value.Equals((1093).ToString())) + return LCID.BENGALI_INDIA; - /** Farsi */ - public const int FARSI = 1065; + if (value.Equals((1101).ToString())) + return LCID.ASSAMESE; - /** Finnish */ - public const int FINNISH = 1035; + if (value.Equals((1096).ToString())) + return LCID.ORIYA; - /** French (Belgium) */ - public const int FRENCH_BELGIUM = 2060; + if (value.Equals((1100).ToString())) + return LCID.MALAYALAM; - /** French (Canada) */ - public const int FRENCH_CANADA = 3084; + if (value.Equals((1108).ToString())) + return LCID.LAO; - /** French (France) */ - public const int FRENCH_FRANCE = 1036; + if (value.Equals((1113).ToString())) + return LCID.SINDHI_INDIA; - /** French (Luxembourg) */ - public const int FRENCH_LUXEMBOURG = 5132; + if (value.Equals((1118).ToString())) + return LCID.AMHARIC; - /** French (Monaco) */ - public const int FRENCH_MONACO = 6156; + if (value.Equals((1120).ToString())) + return LCID.KASHMIRI; - /** French (Switzerland) */ - public const int FRENCH_SWITZERLAND = 4108; + if (value.Equals((1121).ToString())) + return LCID.NEPALI; - /** Galician */ - public const int FYRO_MACEDONIAN = 1071; + if (value.Equals((1123).ToString())) + return LCID.PASHTO; - /** Georgian */ - public const int GALICIAN = 1110; + if (value.Equals((2137).ToString())) + return LCID.SINDHI; - /** German (Austria) */ - public const int GEORGIAN = 1079; + if (value.Equals((4096).ToString())) + return LCID.ARABIC; - /** German (Germany) */ - public const int GERMAN_AUSTRIA = 3079; + if (value.Equals((10000).ToString())) + return LCID.BANK_CARD_NUMBER; - /** German (Liechtenstein) */ - public const int GERMAN_GERMANY = 1031; + if (value.Equals((10001).ToString())) + return LCID.BANK_CARD_EXPIRY_DATE; - /** German (Luxembourg) */ - public const int GERMAN_LIECHTENSTEIN = 5127; + if (value.Equals((10002).ToString())) + return LCID.BANK_CARD_NAME; - /** German (Switzerland) */ - public const int GERMAN_LUXEMBOURG = 4103; + if (value.Equals((10003).ToString())) + return LCID.BANK_CARD; - /** Greek */ - public const int GERMAN_SWITZERLAND = 2055; + if (value.Equals((10004).ToString())) + return LCID.BANK_CARD_CVV2; - /** Gujarati */ - public const int GREEK = 1032; + if (value.Equals((10011).ToString())) + return LCID.ABKHAZIAN; - /** Hebrew */ - public const int GUJARATI = 1095; + if (value.Equals((10012).ToString())) + return LCID.KARAKALPAK; - /** Hindi (India) */ - public const int HEBREW = 1037; + if (value.Equals((10560).ToString())) + return LCID.URDU_DETECTION; - /** Hungarian */ - public const int HINDI_INDIA = 1081; + throw new NotImplementedException($"Could not convert value to type LCID: '{value}'"); + } - /** Icelandic */ - public const int HUNGARIAN = 1038; + /// + /// Parses a given value to + /// + /// + /// + public static LCID? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return LCID.LATIN; - /** Indonesian */ - public const int ICELANDIC = 1039; + if (value.Equals((1078).ToString())) + return LCID.AFRIKAANS; - /** Italian (Italy) */ - public const int INDONESIAN = 1057; + if (value.Equals((1052).ToString())) + return LCID.ALBANIAN; - /** Italian (Switzerland) */ - public const int ITALIAN_ITALY = 1040; + if (value.Equals((5121).ToString())) + return LCID.ARABIC_ALGERIA; - /** Japanese */ - public const int ITALIAN_SWITZERLAND = 2064; + if (value.Equals((15361).ToString())) + return LCID.ARABIC_BAHRAIN; - /** Kannada */ - public const int JAPANESE = 1041; + if (value.Equals((3073).ToString())) + return LCID.ARABIC_EGYPT; - /** Kazakh */ - public const int KANNADA = 1099; + if (value.Equals((2049).ToString())) + return LCID.ARABIC_IRAQ; - /** Konkani */ - public const int KAZAKH = 1087; + if (value.Equals((11265).ToString())) + return LCID.ARABIC_JORDAN; - /** Korean */ - public const int KONKANI = 1111; + if (value.Equals((13313).ToString())) + return LCID.ARABIC_KUWAIT; - /** Kyrgyz (Cyrillic) */ - public const int KOREAN = 1042; + if (value.Equals((12289).ToString())) + return LCID.ARABIC_LEBANON; - /** Latvian */ - public const int KYRGYZ_CYRILICK = 1088; + if (value.Equals((4097).ToString())) + return LCID.ARABIC_LIBYA; - /** Lithuanian */ - public const int LATVIAN = 1062; + if (value.Equals((6145).ToString())) + return LCID.ARABIC_MOROCCO; - /** FYRO Macedonian */ - public const int LITHUANIAN = 1063; + if (value.Equals((8193).ToString())) + return LCID.ARABIC_OMAN; - /** Malay (Malaysia) */ - public const int MALAY_MALAYSIA = 1086; + if (value.Equals((16385).ToString())) + return LCID.ARABIC_QATAR; - /** Malay (Brunei Darussalam) */ - public const int MALAY_BRUNEI_DARUSSALAM = 2110; + if (value.Equals((1025).ToString())) + return LCID.ARABIC_SAUDI_ARABIA; - /** Marathi */ - public const int MARATHI = 1102; + if (value.Equals((10241).ToString())) + return LCID.ARABIC_SYRIA; - /** Mongolian (Cyrillic) */ - public const int MONGOLIAN_CYRILIC = 1104; + if (value.Equals((7169).ToString())) + return LCID.ARABIC_TUNISIA; - /** Norwegian (Bokmal) */ - public const int NORWEGIAN_BOKMAL = 1044; + if (value.Equals((14337).ToString())) + return LCID.ARABIC_UAE; - /** Norwegian (Nynorsk) */ - public const int NORWEGIAN_NYORSK = 2068; + if (value.Equals((9217).ToString())) + return LCID.ARABIC_YEMEN; - /** Polish */ - public const int POLISH = 1045; + if (value.Equals((1067).ToString())) + return LCID.ARABIC_ARMENIAN; - /** Portuguese (Brazil) */ - public const int PORTUGUESE_BRAZIL = 1046; + if (value.Equals((2092).ToString())) + return LCID.AZERI_CYRILIC; - /** Portuguese (Portugal) */ - public const int PORTUGUESE_PORTUGAL = 2070; + if (value.Equals((1068).ToString())) + return LCID.AZERI_LATIN; - /** Punjabi */ - public const int PUNJABI = 1094; + if (value.Equals((1069).ToString())) + return LCID.BASQUE; - /** Rhaeto-Romanic */ - public const int RHAETO_ROMANIC = 1047; + if (value.Equals((1059).ToString())) + return LCID.BELARUSIAN; - /** Romanian */ - public const int ROMANIAN = 1048; + if (value.Equals((1026).ToString())) + return LCID.BULGARIAN; - /** Russian */ - public const int RUSSIAN = 1049; + if (value.Equals((1109).ToString())) + return LCID.BURMESE; - /** Sanskrit */ - public const int SANSKRIT = 1103; + if (value.Equals((1027).ToString())) + return LCID.CATALAN; - /** Serbian (Cyrillic) */ - public const int SERBIAN_CYRILIC = 3098; + if (value.Equals((3076).ToString())) + return LCID.CHINESE_HONGKONG_SAR; - /** Serbian (Latin) */ - public const int SERBIAN_LATIN = 2074; + if (value.Equals((5124).ToString())) + return LCID.CHINESE_MACAO_SAR; - /** Slovak */ - public const int SLOVAK = 1051; + if (value.Equals((2052).ToString())) + return LCID.CHINESE; - /** Slovenian */ - public const int SLOVENIAN = 1060; + if (value.Equals((4100).ToString())) + return LCID.CHINESE_SINGAPORE; - /** Spanish (Argentina) */ - public const int SPANISH_ARGENTINA = 11274; + if (value.Equals((1028).ToString())) + return LCID.CHINESE_TAIWAN; - /** Spanish (Bolivia) */ - public const int SPANISH_BOLIVIA = 16394; + if (value.Equals((1050).ToString())) + return LCID.CROATIAN; - /** Spanish (Chile) */ - public const int SPANISH_CHILE = 13322; + if (value.Equals((1029).ToString())) + return LCID.CZECH; - /** Spanish (Colombia) */ - public const int SPANICH_COLOMBIA = 9226; + if (value.Equals((1030).ToString())) + return LCID.DANISH; - /** Spanish (Costa Rica) */ - public const int SPANISH_COSTA_RICA = 5130; + if (value.Equals((1125).ToString())) + return LCID.DIVEHI; - /** Spanish (Dominican Republic) */ - public const int SPANISH_DOMINICAN_REPUBLIC = 7178; + if (value.Equals((2067).ToString())) + return LCID.DUTCH_BELGIUM; - /** Spanish (Ecuador) */ - public const int SPANISH_ECUADOR = 12298; + if (value.Equals((1043).ToString())) + return LCID.DUTCH_NETHERLANDS; - /** Spanish (El Salvador) */ - public const int SPANISH_EL_SALVADOR = 17418; + if (value.Equals((3081).ToString())) + return LCID.ENGLISH_AUSTRALIA; - /** Spanish (Guatemala) */ - public const int SPANISH_GUATEMALA = 4106; + if (value.Equals((10249).ToString())) + return LCID.ENGLISH_BELIZE; - /** Spanish (Honduras) */ - public const int SPANISH_HONDURAS = 18442; + if (value.Equals((4105).ToString())) + return LCID.ENGLISH_CANADA; - /** Spanish (Mexico) */ - public const int SPANISH_MEXICO = 2058; + if (value.Equals((9225).ToString())) + return LCID.ENGLISH_CARRIBEAN; - /** Spanish (Nicaragua) */ - public const int SPANISH_NICARAGUA = 19466; + if (value.Equals((6153).ToString())) + return LCID.ENGLISH_IRELAND; - /** Spanish (Panama) */ - public const int SPANISH_PANAMA = 6154; + if (value.Equals((8201).ToString())) + return LCID.ENGLISH_JAMAICA; - /** Spanish (Paraguay) */ - public const int SPANISH_PARAGUAY = 15370; + if (value.Equals((5129).ToString())) + return LCID.ENGLISH_NEW_ZEALAND; - /** Spanish (Peru) */ - public const int SPANISH_PERU = 10250; + if (value.Equals((13321).ToString())) + return LCID.ENGLISH_PHILIPPINES; - /** Spanish (Puerto Rico) */ - public const int SPANISH_PUERTO_RICO = 20490; + if (value.Equals((7177).ToString())) + return LCID.ENGLISH_SOUTH_AFRICA; - /** Spanish (Traditional Sort) */ - public const int SPANISH_TRADITIONAL_SORT = 1034; + if (value.Equals((11273).ToString())) + return LCID.ENGLISH_TRINIDAD; - /** Spanish (International Sort) */ - public const int SPANISH_INTERNATIONAL_SORT = 3082; + if (value.Equals((2057).ToString())) + return LCID.ENGLISH_UK; - /** Spanish (Uruguay) */ - public const int SPANISH_URUGUAY = 14346; + if (value.Equals((1033).ToString())) + return LCID.ENGLISH_US; - /** Spanish (Venezuela) */ - public const int SPANISH_VENEZUELA = 8202; + if (value.Equals((12297).ToString())) + return LCID.ENGLISH_ZIMBABWE; - /** Swahili */ - public const int SWAHILI = 1089; + if (value.Equals((1061).ToString())) + return LCID.ESTONIAN; - /** Swedish */ - public const int SWEDISH = 1053; + if (value.Equals((1080).ToString())) + return LCID.FAEROESE; - /** Swedish (Finland) */ - public const int SWEDISH_FINLAND = 2077; + if (value.Equals((1065).ToString())) + return LCID.FARSI; - /** Syriac */ - public const int SYRIAC = 1114; + if (value.Equals((1035).ToString())) + return LCID.FINNISH; - /** Tamil */ - public const int TAMIL = 1097; + if (value.Equals((2060).ToString())) + return LCID.FRENCH_BELGIUM; - /** Tatar */ - public const int TATAR = 1092; + if (value.Equals((3084).ToString())) + return LCID.FRENCH_CANADA; - /** Telugu */ - public const int TELUGU = 1098; + if (value.Equals((1036).ToString())) + return LCID.FRENCH_FRANCE; - /** Thai (Thailand) */ - public const int THAI_THAILAND = 1054; + if (value.Equals((5132).ToString())) + return LCID.FRENCH_LUXEMBOURG; - /** Turkish */ - public const int TURKISH = 1055; + if (value.Equals((6156).ToString())) + return LCID.FRENCH_MONACO; - /** Tajik (Cyrillic) */ - public const int TAJIK_CYRILLIC = 1064; + if (value.Equals((4108).ToString())) + return LCID.FRENCH_SWITZERLAND; - /** Turkmen */ - public const int TURKMEN = 1090; + if (value.Equals((1071).ToString())) + return LCID.FYRO_MACEDONIAN; - /** Ukrainian */ - public const int UKRAINIAN = 1058; + if (value.Equals((1110).ToString())) + return LCID.GALICIAN; - /** Urdu */ - public const int URDU = 1056; + if (value.Equals((1079).ToString())) + return LCID.GEORGIAN; - /** Uzbek (Cyrillic) */ - public const int UZBEK_CYRILIC = 2115; + if (value.Equals((3079).ToString())) + return LCID.GERMAN_AUSTRIA; - /** Uzbek (Latin) */ - public const int UZBEK_LATIN = 1091; + if (value.Equals((1031).ToString())) + return LCID.GERMAN_GERMANY; - /** Vietnamese */ - public const int VIETNAMESE = 1066; + if (value.Equals((5127).ToString())) + return LCID.GERMAN_LIECHTENSTEIN; - /** CTC Simplified */ - public const int CTC_SIMPLIFIED = 50001; + if (value.Equals((4103).ToString())) + return LCID.GERMAN_LUXEMBOURG; - /** CTC Traditional */ - public const int CTC_TRADITIONAL = 50002; + if (value.Equals((2055).ToString())) + return LCID.GERMAN_SWITZERLAND; + if (value.Equals((1032).ToString())) + return LCID.GREEK; + + if (value.Equals((1095).ToString())) + return LCID.GUJARATI; + + if (value.Equals((1037).ToString())) + return LCID.HEBREW; + + if (value.Equals((1081).ToString())) + return LCID.HINDI_INDIA; + + if (value.Equals((1038).ToString())) + return LCID.HUNGARIAN; + + if (value.Equals((1039).ToString())) + return LCID.ICELANDIC; + + if (value.Equals((1057).ToString())) + return LCID.INDONESIAN; + + if (value.Equals((1040).ToString())) + return LCID.ITALIAN_ITALY; + + if (value.Equals((2064).ToString())) + return LCID.ITALIAN_SWITZERLAND; + + if (value.Equals((1041).ToString())) + return LCID.JAPANESE; + + if (value.Equals((1099).ToString())) + return LCID.KANNADA; + + if (value.Equals((1087).ToString())) + return LCID.KAZAKH; + + if (value.Equals((1107).ToString())) + return LCID.KHMER; + + if (value.Equals((1111).ToString())) + return LCID.KONKANI; + + if (value.Equals((1042).ToString())) + return LCID.KOREAN; + + if (value.Equals((1088).ToString())) + return LCID.KYRGYZ_CYRILICK; + + if (value.Equals((1062).ToString())) + return LCID.LATVIAN; + + if (value.Equals((1063).ToString())) + return LCID.LITHUANIAN; + + if (value.Equals((1086).ToString())) + return LCID.MALAY_MALAYSIA; + + if (value.Equals((2110).ToString())) + return LCID.MALAY_BRUNEI_DARUSSALAM; + + if (value.Equals((1082).ToString())) + return LCID.MALTESE; + + if (value.Equals((1102).ToString())) + return LCID.MARATHI; + + if (value.Equals((1104).ToString())) + return LCID.MONGOLIAN_CYRILIC; + + if (value.Equals((1044).ToString())) + return LCID.NORWEGIAN_BOKMAL; + + if (value.Equals((2068).ToString())) + return LCID.NORWEGIAN_NYORSK; + + if (value.Equals((1045).ToString())) + return LCID.POLISH; + + if (value.Equals((1046).ToString())) + return LCID.PORTUGUESE_BRAZIL; + + if (value.Equals((2070).ToString())) + return LCID.PORTUGUESE_PORTUGAL; + + if (value.Equals((1094).ToString())) + return LCID.PUNJABI; + + if (value.Equals((1047).ToString())) + return LCID.RHAETO_ROMANIC; + + if (value.Equals((1048).ToString())) + return LCID.ROMANIAN; + + if (value.Equals((1049).ToString())) + return LCID.RUSSIAN; + + if (value.Equals((1103).ToString())) + return LCID.SANSKRIT; + + if (value.Equals((3098).ToString())) + return LCID.SERBIAN_CYRILIC; + + if (value.Equals((2074).ToString())) + return LCID.SERBIAN_LATIN; + + if (value.Equals((1115).ToString())) + return LCID.SINHALA; + + if (value.Equals((1051).ToString())) + return LCID.SLOVAK; + + if (value.Equals((1060).ToString())) + return LCID.SLOVENIAN; + + if (value.Equals((11274).ToString())) + return LCID.SPANISH_ARGENTINA; + + if (value.Equals((16394).ToString())) + return LCID.SPANISH_BOLIVIA; + + if (value.Equals((13322).ToString())) + return LCID.SPANISH_CHILE; + + if (value.Equals((9226).ToString())) + return LCID.SPANICH_COLOMBIA; + + if (value.Equals((5130).ToString())) + return LCID.SPANISH_COSTA_RICA; + + if (value.Equals((7178).ToString())) + return LCID.SPANISH_DOMINICAN_REPUBLIC; + + if (value.Equals((12298).ToString())) + return LCID.SPANISH_ECUADOR; + + if (value.Equals((17418).ToString())) + return LCID.SPANISH_EL_SALVADOR; + + if (value.Equals((4106).ToString())) + return LCID.SPANISH_GUATEMALA; + + if (value.Equals((18442).ToString())) + return LCID.SPANISH_HONDURAS; + + if (value.Equals((2058).ToString())) + return LCID.SPANISH_MEXICO; + + if (value.Equals((19466).ToString())) + return LCID.SPANISH_NICARAGUA; + + if (value.Equals((6154).ToString())) + return LCID.SPANISH_PANAMA; + + if (value.Equals((15370).ToString())) + return LCID.SPANISH_PARAGUAY; + + if (value.Equals((10250).ToString())) + return LCID.SPANISH_PERU; + + if (value.Equals((20490).ToString())) + return LCID.SPANISH_PUERTO_RICO; + + if (value.Equals((1034).ToString())) + return LCID.SPANISH_TRADITIONAL_SORT; + + if (value.Equals((3082).ToString())) + return LCID.SPANISH_INTERNATIONAL_SORT; + + if (value.Equals((14346).ToString())) + return LCID.SPANISH_URUGUAY; + + if (value.Equals((8202).ToString())) + return LCID.SPANISH_VENEZUELA; + + if (value.Equals((1089).ToString())) + return LCID.SWAHILI; + + if (value.Equals((1053).ToString())) + return LCID.SWEDISH; + + if (value.Equals((2077).ToString())) + return LCID.SWEDISH_FINLAND; + + if (value.Equals((1114).ToString())) + return LCID.SYRIAC; + + if (value.Equals((1097).ToString())) + return LCID.TAMIL; + + if (value.Equals((1092).ToString())) + return LCID.TATAR; + + if (value.Equals((1098).ToString())) + return LCID.TELUGU; + + if (value.Equals((1054).ToString())) + return LCID.THAI_THAILAND; + + if (value.Equals((1055).ToString())) + return LCID.TURKISH; + + if (value.Equals((1064).ToString())) + return LCID.TAJIK_CYRILLIC; + + if (value.Equals((1090).ToString())) + return LCID.TURKMEN; + + if (value.Equals((1058).ToString())) + return LCID.UKRAINIAN; + + if (value.Equals((1056).ToString())) + return LCID.URDU; + + if (value.Equals((2115).ToString())) + return LCID.UZBEK_CYRILIC; + + if (value.Equals((1091).ToString())) + return LCID.UZBEK_LATIN; + + if (value.Equals((1066).ToString())) + return LCID.VIETNAMESE; + + if (value.Equals((50001).ToString())) + return LCID.CTC_SIMPLIFIED; + + if (value.Equals((50002).ToString())) + return LCID.CTC_TRADITIONAL; + + if (value.Equals((2117).ToString())) + return LCID.BENGALI_BANGLADESH; + + if (value.Equals((1093).ToString())) + return LCID.BENGALI_INDIA; + + if (value.Equals((1101).ToString())) + return LCID.ASSAMESE; + + if (value.Equals((1096).ToString())) + return LCID.ORIYA; + + if (value.Equals((1100).ToString())) + return LCID.MALAYALAM; + + if (value.Equals((1108).ToString())) + return LCID.LAO; + + if (value.Equals((1113).ToString())) + return LCID.SINDHI_INDIA; + + if (value.Equals((1118).ToString())) + return LCID.AMHARIC; + + if (value.Equals((1120).ToString())) + return LCID.KASHMIRI; + + if (value.Equals((1121).ToString())) + return LCID.NEPALI; + + if (value.Equals((1123).ToString())) + return LCID.PASHTO; + + if (value.Equals((2137).ToString())) + return LCID.SINDHI; + + if (value.Equals((4096).ToString())) + return LCID.ARABIC; + + if (value.Equals((10000).ToString())) + return LCID.BANK_CARD_NUMBER; + + if (value.Equals((10001).ToString())) + return LCID.BANK_CARD_EXPIRY_DATE; + + if (value.Equals((10002).ToString())) + return LCID.BANK_CARD_NAME; + + if (value.Equals((10003).ToString())) + return LCID.BANK_CARD; + + if (value.Equals((10004).ToString())) + return LCID.BANK_CARD_CVV2; + + if (value.Equals((10011).ToString())) + return LCID.ABKHAZIAN; + + if (value.Equals((10012).ToString())) + return LCID.KARAKALPAK; + + if (value.Equals((10560).ToString())) + return LCID.URDU_DETECTION; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(LCID value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class LCIDJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override LCID Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + LCID? result = rawValue == null + ? null + : LCIDValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the LCID to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, LCID lCID, JsonSerializerOptions options) + { + writer.WriteStringValue(lCID.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class LCIDNullableJsonConverter : JsonConverter + { + /// + /// Returns a LCID from the Json object + /// + /// + /// + /// + /// + public override LCID? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + LCID? result = rawValue == null + ? null + : LCIDValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, LCID? lCID, JsonSerializerOptions options) + { + writer.WriteStringValue(lCID?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs index d0425d9..bb627ee 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs @@ -1,53 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Lexical data analysis allows you to compare the results of reading the text data of the MRZ, the document filling area, barcodes and data from the memory of the RFID chip for an additional assessment of the authenticity of the document. Single result for all pages. Consider using Result.TEXT type for more simplicity. /// - [DataContract] - public partial class LexicalAnalysisResult : ResultItem, IEquatable, IValidatableObject + public partial class LexicalAnalysisResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected LexicalAnalysisResult() { } - /// - /// Initializes a new instance of the class. - /// - /// listVerifiedFields. - public LexicalAnalysisResult(ListVerifiedFields listVerifiedFields = default(ListVerifiedFields), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// listVerifiedFields + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public LexicalAnalysisResult(ListVerifiedFields listVerifiedFields, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - this.ListVerifiedFields = listVerifiedFields; + ListVerifiedFields = listVerifiedFields; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets ListVerifiedFields /// - [DataMember(Name="ListVerifiedFields", EmitDefaultValue=false)] + [JsonPropertyName("ListVerifiedFields")] public ListVerifiedFields ListVerifiedFields { get; set; } /// @@ -56,76 +59,158 @@ protected LexicalAnalysisResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class LexicalAnalysisResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" ListVerifiedFields: ").Append(ListVerifiedFields).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class LexicalAnalysisResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override LexicalAnalysisResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as LexicalAnalysisResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if LexicalAnalysisResult instances are equal - /// - /// Instance of LexicalAnalysisResult to be compared - /// Boolean - public bool Equals(LexicalAnalysisResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.ListVerifiedFields == input.ListVerifiedFields || - (this.ListVerifiedFields != null && - this.ListVerifiedFields.Equals(input.ListVerifiedFields)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option listVerifiedFields = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ListVerifiedFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listVerifiedFields = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!listVerifiedFields.IsSet) + throw new ArgumentException("Property is required for class LexicalAnalysisResult.", nameof(listVerifiedFields)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class LexicalAnalysisResult.", nameof(resultType)); + + if (listVerifiedFields.IsSet && listVerifiedFields.Value == null) + throw new ArgumentNullException(nameof(listVerifiedFields), "Property is not nullable for class LexicalAnalysisResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class LexicalAnalysisResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class LexicalAnalysisResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class LexicalAnalysisResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class LexicalAnalysisResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class LexicalAnalysisResult."); + + return new LexicalAnalysisResult(listVerifiedFields.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, LexicalAnalysisResult lexicalAnalysisResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.ListVerifiedFields != null) - hashCode = hashCode * 59 + this.ListVerifiedFields.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, lexicalAnalysisResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, LexicalAnalysisResult lexicalAnalysisResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (lexicalAnalysisResult.ListVerifiedFields == null) + throw new ArgumentNullException(nameof(lexicalAnalysisResult.ListVerifiedFields), "Property is required for class LexicalAnalysisResult."); + + writer.WritePropertyName("ListVerifiedFields"); + JsonSerializer.Serialize(writer, lexicalAnalysisResult.ListVerifiedFields, jsonSerializerOptions); + if (lexicalAnalysisResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", lexicalAnalysisResult.BufLengthOption.Value!.Value); + + if (lexicalAnalysisResult.LightOption.IsSet) + writer.WriteNumber("light", lexicalAnalysisResult.LightOption.Value!.Value); + + if (lexicalAnalysisResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", lexicalAnalysisResult.ListIdxOption.Value!.Value); + + if (lexicalAnalysisResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", lexicalAnalysisResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", lexicalAnalysisResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs new file mode 100644 index 0000000..bc34f2e --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs @@ -0,0 +1,167 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// LicenseItem + /// + public partial class LicenseItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded data + [JsonConstructor] + public LicenseItem(byte[] license) + { + License = license; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Base64 encoded data + /// + /// Base64 encoded data + /* [B@528027e0 */ + [JsonPropertyName("License")] + public byte[] License { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class LicenseItem {\n"); + sb.Append(" License: ").Append(License).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class LicenseItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override LicenseItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option license = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "License": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + license = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!license.IsSet) + throw new ArgumentException("Property is required for class LicenseItem.", nameof(license)); + + if (license.IsSet && license.Value == null) + throw new ArgumentNullException(nameof(license), "Property is not nullable for class LicenseItem."); + + return new LicenseItem(license.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, LicenseItem licenseItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, licenseItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, LicenseItem licenseItem, JsonSerializerOptions jsonSerializerOptions) + { + if (licenseItem.License == null) + throw new ArgumentNullException(nameof(licenseItem.License), "Property is required for class LicenseItem."); + + writer.WritePropertyName("License"); + JsonSerializer.Serialize(writer, licenseItem.License, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs index ab65b9c..e8f4547 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs @@ -1,63 +1,58 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// - /// LicenseResult + /// Contains license /// - [DataContract] - public partial class LicenseResult : ResultItem, IEquatable, IValidatableObject + public partial class LicenseResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected LicenseResult() { } - /// - /// Initializes a new instance of the class. - /// - /// Base64 encoded data (required). - public LicenseResult(byte[] license = default(byte[]), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// Base64 encoded data + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public LicenseResult(byte[] license, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "license" is required (not null) - if (license == null) - { - throw new InvalidDataException("license is a required property for LicenseResult and cannot be null"); - } - else - { - this.License = license; - } - + License = license; + OnCreated(); } - + + partial void OnCreated(); + /// /// Base64 encoded data /// /// Base64 encoded data - [DataMember(Name="License", EmitDefaultValue=true)] + /* [B@528027e0 */ + [JsonPropertyName("License")] public byte[] License { get; set; } /// @@ -66,76 +61,158 @@ protected LicenseResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class LicenseResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" License: ").Append(License).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class LicenseResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override LicenseResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as LicenseResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if LicenseResult instances are equal - /// - /// Instance of LicenseResult to be compared - /// Boolean - public bool Equals(LicenseResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option license = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "License": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + license = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!license.IsSet) + throw new ArgumentException("Property is required for class LicenseResult.", nameof(license)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class LicenseResult.", nameof(resultType)); + + if (license.IsSet && license.Value == null) + throw new ArgumentNullException(nameof(license), "Property is not nullable for class LicenseResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class LicenseResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class LicenseResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class LicenseResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class LicenseResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class LicenseResult."); + + return new LicenseResult(license.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, LicenseResult licenseResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.License != null) - hashCode = hashCode * 59 + this.License.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, licenseResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, LicenseResult licenseResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (licenseResult.License == null) + throw new ArgumentNullException(nameof(licenseResult.License), "Property is required for class LicenseResult."); + + writer.WritePropertyName("License"); + JsonSerializer.Serialize(writer, licenseResult.License, jsonSerializerOptions); + if (licenseResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", licenseResult.BufLengthOption.Value!.Value); + + if (licenseResult.LightOption.IsSet) + writer.WriteNumber("light", licenseResult.LightOption.Value!.Value); + + if (licenseResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", licenseResult.ListIdxOption.Value!.Value); + + if (licenseResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", licenseResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", licenseResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/Light.cs b/src/Regula.DocumentReader.WebClient/Model/Light.cs index cc278a8..1e3aef4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Light.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Light.cs @@ -1,44 +1,610 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Image light index - public class Light + /// + /// Image light index + public enum Light + { + /// + /// Enum OFF for value: 0 + /// + OFF = 0, + + /// + /// Enum OVI for value: 1 + /// + OVI = 1, + + /// + /// Enum WHITE_TOP for value: 2 + /// + WHITE_TOP = 2, + + /// + /// Enum WHITE_SIDE for value: 4 + /// + WHITE_SIDE = 4, + + /// + /// Enum WHITE_FRONT for value: 8388608 + /// + WHITE_FRONT = 8388608, + + /// + /// Enum WHITE for value: 6 + /// + WHITE = 6, + + /// + /// Enum IR_TOP for value: 8 + /// + IR_TOP = 8, + + /// + /// Enum IR_SIDE for value: 16 + /// + IR_SIDE = 16, + + /// + /// Enum IR_FRONT for value: 16777216 + /// + IR_FRONT = 16777216, + + /// + /// Enum IR for value: 24 + /// + IR = 24, + + /// + /// Enum WHITE_GRAY for value: 33554432 + /// + WHITE_GRAY = 33554432, + + /// + /// Enum UV for value: 128 + /// + UV = 128, + + /// + /// Enum OVD for value: 67108864 + /// + OVD = 67108864, + + /// + /// Enum VIDEODETECTION for value: 134217728 + /// + VIDEODETECTION = 134217728, + + /// + /// Enum IR_870_OBL for value: 268435456 + /// + IR_870_OBL = 268435456, + + /// + /// Enum IR_LUMINESCENCE for value: 256 + /// + IR_LUMINESCENCE = 256, + + /// + /// Enum AXIAL_WHITE_LEFT for value: 1024 + /// + AXIAL_WHITE_LEFT = 1024, + + /// + /// Enum AXIAL_WHITE_RIGHT for value: 2048 + /// + AXIAL_WHITE_RIGHT = 2048, + + /// + /// Enum AXIAL_WHITE_FRONT for value: 512 + /// + AXIAL_WHITE_FRONT = 512, + + /// + /// Enum IR_720 for value: 4096 + /// + IR_720 = 4096, + + /// + /// Enum IR_940 for value: 8192 + /// + IR_940 = 8192, + + /// + /// Enum AXIAL_WHITE_FULL for value: 3072 + /// + AXIAL_WHITE_FULL = 3072, + + /// + /// Enum RAW_DATA for value: 2147483648 + /// + RAW_DATA = 2147483648, + + /// + /// Enum RAW_DATA_GRBG for value: 2415919104 + /// + RAW_DATA_GRBG = 2415919104, + + /// + /// Enum RAW_DATA_GBGR for value: 2684354560 + /// + RAW_DATA_GBGR = 2684354560, + + /// + /// Enum RAW_DATA_RGGB for value: 2952790016 + /// + RAW_DATA_RGGB = 2952790016, + + /// + /// Enum RAW_DATA_BGGR for value: 3221225472 + /// + RAW_DATA_BGGR = 3221225472, + + /// + /// Enum TRANSMITTED for value: 32 + /// + TRANSMITTED = 32, + + /// + /// Enum TRANSMITTED_IR for value: 64 + /// + TRANSMITTED_IR = 64, + + /// + /// Enum ANTI_STOKES for value: 65536 + /// + ANTI_STOKES = 65536, + + /// + /// Enum TRANSMITTED_IR940 for value: 16384 + /// + TRANSMITTED_IR940 = 16384, + + /// + /// Enum OVD_RIGHT for value: 262144 + /// + OVD_RIGHT = 262144, + + /// + /// Enum OVD_LEFT for value: 131072 + /// + OVD_LEFT = 131072, + + /// + /// Enum IR_700 for value: 32768 + /// + IR_700 = 32768, + + /// + /// Enum IR_870 for value: 16777216 + /// + IR_870 = 16777216, + + /// + /// Enum HOLO for value: 67108864 + /// + HOLO = 67108864, + + /// + /// Enum IR_BOTTOM for value: 64 + /// + IR_BOTTOM = 64, + + /// + /// Enum WHITE_BOTTOM for value: 32 + /// + WHITE_BOTTOM = 32, + + /// + /// Enum UVC for value: 524288 + /// + UVC = 524288, + + /// + /// Enum UVB for value: 1048576 + /// + UVB = 1048576, + + /// + /// Enum WHITE_OBL for value: 2097152 + /// + WHITE_OBL = 2097152, + + /// + /// Enum WHITE_SPECIAL for value: 4194304 + /// + WHITE_SPECIAL = 4194304 + } + + /// + /// Converts to and from the JSON value + /// + public static class LightValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static Light FromString(string value) + { + if (value.Equals((0).ToString())) + return Light.OFF; + + if (value.Equals((1).ToString())) + return Light.OVI; + + if (value.Equals((2).ToString())) + return Light.WHITE_TOP; + + if (value.Equals((4).ToString())) + return Light.WHITE_SIDE; + + if (value.Equals((8388608).ToString())) + return Light.WHITE_FRONT; + + if (value.Equals((6).ToString())) + return Light.WHITE; + + if (value.Equals((8).ToString())) + return Light.IR_TOP; + + if (value.Equals((16).ToString())) + return Light.IR_SIDE; + + if (value.Equals((16777216).ToString())) + return Light.IR_FRONT; + + if (value.Equals((24).ToString())) + return Light.IR; + + if (value.Equals((33554432).ToString())) + return Light.WHITE_GRAY; + + if (value.Equals((128).ToString())) + return Light.UV; + + if (value.Equals((67108864).ToString())) + return Light.OVD; + + if (value.Equals((134217728).ToString())) + return Light.VIDEODETECTION; + + if (value.Equals((268435456).ToString())) + return Light.IR_870_OBL; + + if (value.Equals((256).ToString())) + return Light.IR_LUMINESCENCE; + + if (value.Equals((1024).ToString())) + return Light.AXIAL_WHITE_LEFT; + + if (value.Equals((2048).ToString())) + return Light.AXIAL_WHITE_RIGHT; + + if (value.Equals((512).ToString())) + return Light.AXIAL_WHITE_FRONT; + + if (value.Equals((4096).ToString())) + return Light.IR_720; + + if (value.Equals((8192).ToString())) + return Light.IR_940; + + if (value.Equals((3072).ToString())) + return Light.AXIAL_WHITE_FULL; + + if (value.Equals((2147483648).ToString())) + return Light.RAW_DATA; + + if (value.Equals((2415919104).ToString())) + return Light.RAW_DATA_GRBG; + + if (value.Equals((2684354560).ToString())) + return Light.RAW_DATA_GBGR; + + if (value.Equals((2952790016).ToString())) + return Light.RAW_DATA_RGGB; + + if (value.Equals((3221225472).ToString())) + return Light.RAW_DATA_BGGR; + + if (value.Equals((32).ToString())) + return Light.TRANSMITTED; + + if (value.Equals((64).ToString())) + return Light.TRANSMITTED_IR; + + if (value.Equals((65536).ToString())) + return Light.ANTI_STOKES; + + if (value.Equals((16384).ToString())) + return Light.TRANSMITTED_IR940; + + if (value.Equals((262144).ToString())) + return Light.OVD_RIGHT; + + if (value.Equals((131072).ToString())) + return Light.OVD_LEFT; + + if (value.Equals((32768).ToString())) + return Light.IR_700; + + if (value.Equals((16777216).ToString())) + return Light.IR_870; + + if (value.Equals((67108864).ToString())) + return Light.HOLO; + + if (value.Equals((64).ToString())) + return Light.IR_BOTTOM; + + if (value.Equals((32).ToString())) + return Light.WHITE_BOTTOM; + + if (value.Equals((524288).ToString())) + return Light.UVC; + + if (value.Equals((1048576).ToString())) + return Light.UVB; + + if (value.Equals((2097152).ToString())) + return Light.WHITE_OBL; + + if (value.Equals((4194304).ToString())) + return Light.WHITE_SPECIAL; + + throw new NotImplementedException($"Could not convert value to type Light: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static Light? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return Light.OFF; + + if (value.Equals((1).ToString())) + return Light.OVI; + + if (value.Equals((2).ToString())) + return Light.WHITE_TOP; + + if (value.Equals((4).ToString())) + return Light.WHITE_SIDE; + + if (value.Equals((8388608).ToString())) + return Light.WHITE_FRONT; + + if (value.Equals((6).ToString())) + return Light.WHITE; + + if (value.Equals((8).ToString())) + return Light.IR_TOP; + + if (value.Equals((16).ToString())) + return Light.IR_SIDE; + + if (value.Equals((16777216).ToString())) + return Light.IR_FRONT; + + if (value.Equals((24).ToString())) + return Light.IR; + + if (value.Equals((33554432).ToString())) + return Light.WHITE_GRAY; + + if (value.Equals((128).ToString())) + return Light.UV; + + if (value.Equals((67108864).ToString())) + return Light.OVD; + + if (value.Equals((134217728).ToString())) + return Light.VIDEODETECTION; + + if (value.Equals((268435456).ToString())) + return Light.IR_870_OBL; + + if (value.Equals((256).ToString())) + return Light.IR_LUMINESCENCE; + + if (value.Equals((1024).ToString())) + return Light.AXIAL_WHITE_LEFT; + + if (value.Equals((2048).ToString())) + return Light.AXIAL_WHITE_RIGHT; + + if (value.Equals((512).ToString())) + return Light.AXIAL_WHITE_FRONT; + + if (value.Equals((4096).ToString())) + return Light.IR_720; + + if (value.Equals((8192).ToString())) + return Light.IR_940; + + if (value.Equals((3072).ToString())) + return Light.AXIAL_WHITE_FULL; + + if (value.Equals((2147483648).ToString())) + return Light.RAW_DATA; + + if (value.Equals((2415919104).ToString())) + return Light.RAW_DATA_GRBG; + + if (value.Equals((2684354560).ToString())) + return Light.RAW_DATA_GBGR; + + if (value.Equals((2952790016).ToString())) + return Light.RAW_DATA_RGGB; + + if (value.Equals((3221225472).ToString())) + return Light.RAW_DATA_BGGR; + + if (value.Equals((32).ToString())) + return Light.TRANSMITTED; + + if (value.Equals((64).ToString())) + return Light.TRANSMITTED_IR; + + if (value.Equals((65536).ToString())) + return Light.ANTI_STOKES; + + if (value.Equals((16384).ToString())) + return Light.TRANSMITTED_IR940; + + if (value.Equals((262144).ToString())) + return Light.OVD_RIGHT; + + if (value.Equals((131072).ToString())) + return Light.OVD_LEFT; + + if (value.Equals((32768).ToString())) + return Light.IR_700; + + if (value.Equals((16777216).ToString())) + return Light.IR_870; + + if (value.Equals((67108864).ToString())) + return Light.HOLO; + + if (value.Equals((64).ToString())) + return Light.IR_BOTTOM; + + if (value.Equals((32).ToString())) + return Light.WHITE_BOTTOM; + + if (value.Equals((524288).ToString())) + return Light.UVC; + + if (value.Equals((1048576).ToString())) + return Light.UVB; + + if (value.Equals((2097152).ToString())) + return Light.WHITE_OBL; + + if (value.Equals((4194304).ToString())) + return Light.WHITE_SPECIAL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static long ToJsonValue(Light value) + { + return (long) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class LightJsonConverter : JsonConverter { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override Light Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + Light? result = rawValue == null + ? null + : LightValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; - /** No Light */ - public const int OFF = 0; + throw new JsonException(); + } + + /// + /// Writes the Light to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Light light, JsonSerializerOptions options) + { + writer.WriteStringValue(light.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class LightNullableJsonConverter : JsonConverter + { + /// + /// Returns a Light from the Json object + /// + /// + /// + /// + /// + public override Light? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** White */ - public const int WHITE = 6; + Light? result = rawValue == null + ? null + : LightValueConverter.FromStringOrDefault(rawValue); - /** Infrared */ - public const int IR = 24; + if (result != null) + return result.Value; - /** Ultraviolet */ - public const int UV = 128; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Light? light, JsonSerializerOptions options) + { + writer.WriteStringValue(light?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs index ce5be83..3f8802e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs @@ -1,57 +1,75 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ListTransactionsByTagResponse /// - [DataContract] - public partial class ListTransactionsByTagResponse : IEquatable, IValidatableObject + public partial class ListTransactionsByTagResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// items. - /// metadata. - public ListTransactionsByTagResponse(List items = default(List), Dictionary metadata = default(Dictionary)) + /// items + /// metadata + [JsonConstructor] + public ListTransactionsByTagResponse(Option?> items = default, Option?> metadata = default) { - this.Items = items; - this.Metadata = metadata; + ItemsOption = items; + MetadataOption = metadata; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Items + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ItemsOption { get; private set; } + /// /// Gets or Sets Items /// - [DataMember(Name="items", EmitDefaultValue=false)] - public List Items { get; set; } + [JsonPropertyName("items")] + public List? Items { get { return this.ItemsOption; } set { this.ItemsOption = new(value); } } + + /// + /// Used to track the state of Metadata + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> MetadataOption { get; private set; } /// /// Gets or Sets Metadata /// - [DataMember(Name="metadata", EmitDefaultValue=false)] - public Dictionary Metadata { get; set; } + [JsonPropertyName("metadata")] + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } /// /// Returns the string presentation of the object @@ -59,84 +77,128 @@ public partial class ListTransactionsByTagResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ListTransactionsByTagResponse {\n"); sb.Append(" Items: ").Append(Items).Append("\n"); sb.Append(" Metadata: ").Append(Metadata).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ListTransactionsByTagResponseJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ListTransactionsByTagResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ListTransactionsByTagResponse); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> items = default; + Option?> metadata = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "items": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + items = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "metadata": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (items.IsSet && items.Value == null) + throw new ArgumentNullException(nameof(items), "Property is not nullable for class ListTransactionsByTagResponse."); + + if (metadata.IsSet && metadata.Value == null) + throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class ListTransactionsByTagResponse."); + + return new ListTransactionsByTagResponse(items, metadata); } /// - /// Returns true if ListTransactionsByTagResponse instances are equal + /// Serializes a /// - /// Instance of ListTransactionsByTagResponse to be compared - /// Boolean - public bool Equals(ListTransactionsByTagResponse input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ListTransactionsByTagResponse listTransactionsByTagResponse, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Items == input.Items || - this.Items != null && - input.Items != null && - this.Items.SequenceEqual(input.Items) - ) && - ( - this.Metadata == input.Metadata || - this.Metadata != null && - input.Metadata != null && - this.Metadata.SequenceEqual(input.Metadata) - ); + writer.WriteStartObject(); + + WriteProperties(writer, listTransactionsByTagResponse, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ListTransactionsByTagResponse listTransactionsByTagResponse, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (listTransactionsByTagResponse.ItemsOption.IsSet && listTransactionsByTagResponse.Items == null) + throw new ArgumentNullException(nameof(listTransactionsByTagResponse.Items), "Property is required for class ListTransactionsByTagResponse."); + + if (listTransactionsByTagResponse.MetadataOption.IsSet && listTransactionsByTagResponse.Metadata == null) + throw new ArgumentNullException(nameof(listTransactionsByTagResponse.Metadata), "Property is required for class ListTransactionsByTagResponse."); + + if (listTransactionsByTagResponse.ItemsOption.IsSet) { - int hashCode = 41; - if (this.Items != null) - hashCode = hashCode * 59 + this.Items.GetHashCode(); - if (this.Metadata != null) - hashCode = hashCode * 59 + this.Metadata.GetHashCode(); - return hashCode; + writer.WritePropertyName("items"); + JsonSerializer.Serialize(writer, listTransactionsByTagResponse.Items, jsonSerializerOptions); + } + if (listTransactionsByTagResponse.MetadataOption.IsSet) + { + writer.WritePropertyName("metadata"); + JsonSerializer.Serialize(writer, listTransactionsByTagResponse.Metadata, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs index 850e92e..98c965f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs @@ -1,125 +1,216 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ListVerifiedFields /// - [DataContract] - public partial class ListVerifiedFields : IEquatable, IValidatableObject + public partial class ListVerifiedFields : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// pFieldMaps. - public ListVerifiedFields(List pFieldMaps = default(List)) + /// Number of pFieldMaps array elements + /// pFieldMaps + /// pDateFormat + [JsonConstructor] + public ListVerifiedFields(decimal count, List pFieldMaps, Option pDateFormat = default) { - this.PFieldMaps = pFieldMaps; + Count = count; + PFieldMaps = pFieldMaps; + PDateFormatOption = pDateFormat; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Number of pFieldMaps array elements + /// + /// Number of pFieldMaps array elements + [JsonPropertyName("Count")] + public decimal Count { get; set; } + /// /// Gets or Sets PFieldMaps /// - [DataMember(Name="pFieldMaps", EmitDefaultValue=false)] + [JsonPropertyName("pFieldMaps")] public List PFieldMaps { get; set; } + /// + /// Used to track the state of PDateFormat + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PDateFormatOption { get; private set; } + + /// + /// Gets or Sets PDateFormat + /// + [JsonPropertyName("pDateFormat")] + public string? PDateFormat { get { return this.PDateFormatOption; } set { this.PDateFormatOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ListVerifiedFields {\n"); + sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append(" PFieldMaps: ").Append(PFieldMaps).Append("\n"); + sb.Append(" PDateFormat: ").Append(PDateFormat).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ListVerifiedFields); + yield break; } + } + /// + /// A Json converter for type + /// + public class ListVerifiedFieldsJsonConverter : JsonConverter + { /// - /// Returns true if ListVerifiedFields instances are equal + /// Deserializes json to /// - /// Instance of ListVerifiedFields to be compared - /// Boolean - public bool Equals(ListVerifiedFields input) + /// + /// + /// + /// + /// + public override ListVerifiedFields Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.PFieldMaps == input.PFieldMaps || - this.PFieldMaps != null && - input.PFieldMaps != null && - this.PFieldMaps.SequenceEqual(input.PFieldMaps) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option count = default; + Option?> pFieldMaps = default; + Option pDateFormat = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetDecimal()); + break; + case "pFieldMaps": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pFieldMaps = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "pDateFormat": + pDateFormat = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!count.IsSet) + throw new ArgumentException("Property is required for class ListVerifiedFields.", nameof(count)); + + if (!pFieldMaps.IsSet) + throw new ArgumentException("Property is required for class ListVerifiedFields.", nameof(pFieldMaps)); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class ListVerifiedFields."); + + if (pFieldMaps.IsSet && pFieldMaps.Value == null) + throw new ArgumentNullException(nameof(pFieldMaps), "Property is not nullable for class ListVerifiedFields."); + + if (pDateFormat.IsSet && pDateFormat.Value == null) + throw new ArgumentNullException(nameof(pDateFormat), "Property is not nullable for class ListVerifiedFields."); + + return new ListVerifiedFields(count.Value!.Value!, pFieldMaps.Value!, pDateFormat); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ListVerifiedFields listVerifiedFields, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PFieldMaps != null) - hashCode = hashCode * 59 + this.PFieldMaps.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, listVerifiedFields, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ListVerifiedFields listVerifiedFields, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (listVerifiedFields.PFieldMaps == null) + throw new ArgumentNullException(nameof(listVerifiedFields.PFieldMaps), "Property is required for class ListVerifiedFields."); + + if (listVerifiedFields.PDateFormatOption.IsSet && listVerifiedFields.PDateFormat == null) + throw new ArgumentNullException(nameof(listVerifiedFields.PDateFormat), "Property is required for class ListVerifiedFields."); + + writer.WriteNumber("Count", listVerifiedFields.Count); + + writer.WritePropertyName("pFieldMaps"); + JsonSerializer.Serialize(writer, listVerifiedFields.PFieldMaps, jsonSerializerOptions); + if (listVerifiedFields.PDateFormatOption.IsSet) + writer.WriteString("pDateFormat", listVerifiedFields.PDateFormat); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs new file mode 100644 index 0000000..cab4ad2 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ListVerifiedFieldsItem + /// + public partial class ListVerifiedFieldsItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// listVerifiedFields + [JsonConstructor] + public ListVerifiedFieldsItem(ListVerifiedFields listVerifiedFields) + { + ListVerifiedFields = listVerifiedFields; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ListVerifiedFields + /// + [JsonPropertyName("ListVerifiedFields")] + public ListVerifiedFields ListVerifiedFields { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ListVerifiedFieldsItem {\n"); + sb.Append(" ListVerifiedFields: ").Append(ListVerifiedFields).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ListVerifiedFieldsItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ListVerifiedFieldsItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option listVerifiedFields = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ListVerifiedFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listVerifiedFields = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!listVerifiedFields.IsSet) + throw new ArgumentException("Property is required for class ListVerifiedFieldsItem.", nameof(listVerifiedFields)); + + if (listVerifiedFields.IsSet && listVerifiedFields.Value == null) + throw new ArgumentNullException(nameof(listVerifiedFields), "Property is not nullable for class ListVerifiedFieldsItem."); + + return new ListVerifiedFieldsItem(listVerifiedFields.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ListVerifiedFieldsItem listVerifiedFieldsItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, listVerifiedFieldsItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ListVerifiedFieldsItem listVerifiedFieldsItem, JsonSerializerOptions jsonSerializerOptions) + { + if (listVerifiedFieldsItem.ListVerifiedFields == null) + throw new ArgumentNullException(nameof(listVerifiedFieldsItem.ListVerifiedFields), "Property is required for class ListVerifiedFieldsItem."); + + writer.WritePropertyName("ListVerifiedFields"); + JsonSerializer.Serialize(writer, listVerifiedFieldsItem.ListVerifiedFields, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs index c269a15..ef65161 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs @@ -1,77 +1,125 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// LivenessParams /// - [DataContract] - public partial class LivenessParams : IEquatable, IValidatableObject + public partial class LivenessParams : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// This parameter is used to enable OVI check. - /// This parameter is used to enable MLI check. - /// This parameter is used to enable Hologram detection. - /// This parameter is used to enable Electronic device detection. - public LivenessParams(bool? checkOVI = default(bool?), bool? checkMLI = default(bool?), bool? checkHolo = default(bool?), bool? checkED = default(bool?)) + /// This parameter is used to enable OVI check + /// This parameter is used to enable MLI check + /// This parameter is used to enable Hologram detection + /// This parameter is used to enable Electronic device detection + /// This parameter is used to enable Black and white copy check + [JsonConstructor] + public LivenessParams(Option checkOVI = default, Option checkMLI = default, Option checkHolo = default, Option checkED = default, Option checkBlackAndWhiteCopy = default) { - this.CheckOVI = checkOVI; - this.CheckMLI = checkMLI; - this.CheckHolo = checkHolo; - this.CheckED = checkED; + CheckOVIOption = checkOVI; + CheckMLIOption = checkMLI; + CheckHoloOption = checkHolo; + CheckEDOption = checkED; + CheckBlackAndWhiteCopyOption = checkBlackAndWhiteCopy; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of CheckOVI + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckOVIOption { get; private set; } + /// /// This parameter is used to enable OVI check /// /// This parameter is used to enable OVI check - [DataMember(Name="checkOVI", EmitDefaultValue=false)] - public bool? CheckOVI { get; set; } + [JsonPropertyName("checkOVI")] + public bool? CheckOVI { get { return this.CheckOVIOption; } set { this.CheckOVIOption = new(value); } } + + /// + /// Used to track the state of CheckMLI + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckMLIOption { get; private set; } /// /// This parameter is used to enable MLI check /// /// This parameter is used to enable MLI check - [DataMember(Name="checkMLI", EmitDefaultValue=false)] - public bool? CheckMLI { get; set; } + [JsonPropertyName("checkMLI")] + public bool? CheckMLI { get { return this.CheckMLIOption; } set { this.CheckMLIOption = new(value); } } + + /// + /// Used to track the state of CheckHolo + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckHoloOption { get; private set; } /// /// This parameter is used to enable Hologram detection /// /// This parameter is used to enable Hologram detection - [DataMember(Name="checkHolo", EmitDefaultValue=false)] - public bool? CheckHolo { get; set; } + [JsonPropertyName("checkHolo")] + public bool? CheckHolo { get { return this.CheckHoloOption; } set { this.CheckHoloOption = new(value); } } + + /// + /// Used to track the state of CheckED + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckEDOption { get; private set; } /// /// This parameter is used to enable Electronic device detection /// /// This parameter is used to enable Electronic device detection - [DataMember(Name="checkED", EmitDefaultValue=false)] - public bool? CheckED { get; set; } + [JsonPropertyName("checkED")] + public bool? CheckED { get { return this.CheckEDOption; } set { this.CheckEDOption = new(value); } } + + /// + /// Used to track the state of CheckBlackAndWhiteCopy + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckBlackAndWhiteCopyOption { get; private set; } + + /// + /// This parameter is used to enable Black and white copy check + /// + /// This parameter is used to enable Black and white copy check + [JsonPropertyName("checkBlackAndWhiteCopy")] + public bool? CheckBlackAndWhiteCopy { get { return this.CheckBlackAndWhiteCopyOption; } set { this.CheckBlackAndWhiteCopyOption = new(value); } } /// /// Returns the string presentation of the object @@ -79,98 +127,153 @@ public partial class LivenessParams : IEquatable, IValidatableO /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class LivenessParams {\n"); sb.Append(" CheckOVI: ").Append(CheckOVI).Append("\n"); sb.Append(" CheckMLI: ").Append(CheckMLI).Append("\n"); sb.Append(" CheckHolo: ").Append(CheckHolo).Append("\n"); sb.Append(" CheckED: ").Append(CheckED).Append("\n"); + sb.Append(" CheckBlackAndWhiteCopy: ").Append(CheckBlackAndWhiteCopy).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as LivenessParams); + yield break; } + } + /// + /// A Json converter for type + /// + public class LivenessParamsJsonConverter : JsonConverter + { /// - /// Returns true if LivenessParams instances are equal + /// Deserializes json to /// - /// Instance of LivenessParams to be compared - /// Boolean - public bool Equals(LivenessParams input) + /// + /// + /// + /// + /// + public override LivenessParams Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.CheckOVI == input.CheckOVI || - (this.CheckOVI != null && - this.CheckOVI.Equals(input.CheckOVI)) - ) && - ( - this.CheckMLI == input.CheckMLI || - (this.CheckMLI != null && - this.CheckMLI.Equals(input.CheckMLI)) - ) && - ( - this.CheckHolo == input.CheckHolo || - (this.CheckHolo != null && - this.CheckHolo.Equals(input.CheckHolo)) - ) && - ( - this.CheckED == input.CheckED || - (this.CheckED != null && - this.CheckED.Equals(input.CheckED)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option checkOVI = default; + Option checkMLI = default; + Option checkHolo = default; + Option checkED = default; + Option checkBlackAndWhiteCopy = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "checkOVI": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkOVI = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkMLI": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkMLI = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkHolo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkHolo = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkED": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkED = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkBlackAndWhiteCopy": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkBlackAndWhiteCopy = new Option(utf8JsonReader.GetBoolean()); + break; + default: + break; + } + } + } + + if (checkOVI.IsSet && checkOVI.Value == null) + throw new ArgumentNullException(nameof(checkOVI), "Property is not nullable for class LivenessParams."); + + if (checkMLI.IsSet && checkMLI.Value == null) + throw new ArgumentNullException(nameof(checkMLI), "Property is not nullable for class LivenessParams."); + + if (checkHolo.IsSet && checkHolo.Value == null) + throw new ArgumentNullException(nameof(checkHolo), "Property is not nullable for class LivenessParams."); + + if (checkED.IsSet && checkED.Value == null) + throw new ArgumentNullException(nameof(checkED), "Property is not nullable for class LivenessParams."); + + if (checkBlackAndWhiteCopy.IsSet && checkBlackAndWhiteCopy.Value == null) + throw new ArgumentNullException(nameof(checkBlackAndWhiteCopy), "Property is not nullable for class LivenessParams."); + + return new LivenessParams(checkOVI, checkMLI, checkHolo, checkED, checkBlackAndWhiteCopy); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, LivenessParams livenessParams, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.CheckOVI != null) - hashCode = hashCode * 59 + this.CheckOVI.GetHashCode(); - if (this.CheckMLI != null) - hashCode = hashCode * 59 + this.CheckMLI.GetHashCode(); - if (this.CheckHolo != null) - hashCode = hashCode * 59 + this.CheckHolo.GetHashCode(); - if (this.CheckED != null) - hashCode = hashCode * 59 + this.CheckED.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, livenessParams, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, LivenessParams livenessParams, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (livenessParams.CheckOVIOption.IsSet) + writer.WriteBoolean("checkOVI", livenessParams.CheckOVIOption.Value!.Value); + + if (livenessParams.CheckMLIOption.IsSet) + writer.WriteBoolean("checkMLI", livenessParams.CheckMLIOption.Value!.Value); + + if (livenessParams.CheckHoloOption.IsSet) + writer.WriteBoolean("checkHolo", livenessParams.CheckHoloOption.Value!.Value); + + if (livenessParams.CheckEDOption.IsSet) + writer.WriteBoolean("checkED", livenessParams.CheckEDOption.Value!.Value); + + if (livenessParams.CheckBlackAndWhiteCopyOption.IsSet) + writer.WriteBoolean("checkBlackAndWhiteCopy", livenessParams.CheckBlackAndWhiteCopyOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs b/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs index 97e4688..9f305c8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs @@ -1,46 +1,217 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class LogLevel + /// + /// Defines LogLevel + /// + public enum LogLevel + { + /// + /// Enum FATAL_ERROR for value: FatalError + /// + FATAL_ERROR = 1, + + /// + /// Enum ERROR for value: Error + /// + ERROR = 2, + + /// + /// Enum WARNING for value: Warning + /// + WARNING = 3, + + /// + /// Enum INFO for value: Info + /// + INFO = 4, + + /// + /// Enum DEBUG for value: Debug + /// + DEBUG = 5 + } + + /// + /// Converts to and from the JSON value + /// + public static class LogLevelValueConverter { + /// + /// Parses a given value to + /// + /// + /// + public static LogLevel FromString(string value) + { + if (value.Equals("FatalError")) + return LogLevel.FATAL_ERROR; + + if (value.Equals("Error")) + return LogLevel.ERROR; + + if (value.Equals("Warning")) + return LogLevel.WARNING; + + if (value.Equals("Info")) + return LogLevel.INFO; + + if (value.Equals("Debug")) + return LogLevel.DEBUG; + + throw new NotImplementedException($"Could not convert value to type LogLevel: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static LogLevel? FromStringOrDefault(string value) + { + if (value.Equals("FatalError")) + return LogLevel.FATAL_ERROR; - - public const string FATAL_ERROR = "FatalError"; + if (value.Equals("Error")) + return LogLevel.ERROR; - - public const string ERROR = "Error"; + if (value.Equals("Warning")) + return LogLevel.WARNING; + + if (value.Equals("Info")) + return LogLevel.INFO; + + if (value.Equals("Debug")) + return LogLevel.DEBUG; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static string ToJsonValue(LogLevel value) + { + if (value == LogLevel.FATAL_ERROR) + return "FatalError"; + + if (value == LogLevel.ERROR) + return "Error"; + + if (value == LogLevel.WARNING) + return "Warning"; + + if (value == LogLevel.INFO) + return "Info"; + + if (value == LogLevel.DEBUG) + return "Debug"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + } + + /// + /// A Json converter for type + /// + /// + public class LogLevelJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override LogLevel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + LogLevel? result = rawValue == null + ? null + : LogLevelValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the LogLevel to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, LogLevel logLevel, JsonSerializerOptions options) + { + writer.WriteStringValue(logLevel.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class LogLevelNullableJsonConverter : JsonConverter + { + /// + /// Returns a LogLevel from the Json object + /// + /// + /// + /// + /// + public override LogLevel? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - - public const string WARNING = "Warning"; + LogLevel? result = rawValue == null + ? null + : LogLevelValueConverter.FromStringOrDefault(rawValue); - - public const string INFO = "Info"; + if (result != null) + return result.Value; - - public const string DEBUG = "Debug"; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, LogLevel? logLevel, JsonSerializerOptions options) + { + writer.WriteStringValue(logLevel?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs new file mode 100644 index 0000000..3f3321a --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs @@ -0,0 +1,216 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// MRZDetectorResult + /// + public partial class MRZDetectorResult : ResultItem, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// resultMRZDetector + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public MRZDetectorResult(ResultMRZDetector resultMRZDetector, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + { + ResultMRZDetector = resultMRZDetector; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ResultMRZDetector + /// + [JsonPropertyName("ResultMRZDetector")] + public ResultMRZDetector ResultMRZDetector { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MRZDetectorResult {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ResultMRZDetector: ").Append(ResultMRZDetector).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class MRZDetectorResultJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override MRZDetectorResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option resultMRZDetector = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ResultMRZDetector": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultMRZDetector = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!resultMRZDetector.IsSet) + throw new ArgumentException("Property is required for class MRZDetectorResult.", nameof(resultMRZDetector)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class MRZDetectorResult.", nameof(resultType)); + + if (resultMRZDetector.IsSet && resultMRZDetector.Value == null) + throw new ArgumentNullException(nameof(resultMRZDetector), "Property is not nullable for class MRZDetectorResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class MRZDetectorResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class MRZDetectorResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class MRZDetectorResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class MRZDetectorResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class MRZDetectorResult."); + + return new MRZDetectorResult(resultMRZDetector.Value!, bufLength, light, listIdx, pageIdx); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MRZDetectorResult mRZDetectorResult, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, mRZDetectorResult, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, MRZDetectorResult mRZDetectorResult, JsonSerializerOptions jsonSerializerOptions) + { + if (mRZDetectorResult.ResultMRZDetector == null) + throw new ArgumentNullException(nameof(mRZDetectorResult.ResultMRZDetector), "Property is required for class MRZDetectorResult."); + + writer.WritePropertyName("ResultMRZDetector"); + JsonSerializer.Serialize(writer, mRZDetectorResult.ResultMRZDetector, jsonSerializerOptions); + if (mRZDetectorResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", mRZDetectorResult.BufLengthOption.Value!.Value); + + if (mRZDetectorResult.LightOption.IsSet) + writer.WriteNumber("light", mRZDetectorResult.LightOption.Value!.Value); + + if (mRZDetectorResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", mRZDetectorResult.ListIdxOption.Value!.Value); + + if (mRZDetectorResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", mRZDetectorResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", mRZDetectorResult.ResultType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs b/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs index eef6dc5..86652d3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs @@ -1,49 +1,231 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class MRZFormat + /// + /// Defines MRZFormat + /// + public enum MRZFormat + { + /// + /// Enum IDL for value: 1x30 + /// + IDL = 1, + + /// + /// Enum ID1 for value: 3x30 + /// + ID1 = 2, + + /// + /// Enum ID2 for value: 2x36 + /// + ID2 = 3, + + /// + /// Enum ID3 for value: 2x44 + /// + ID3 = 4, + + /// + /// Enum CAN for value: 1x6 + /// + CAN = 5, + + /// + /// Enum ID1_2_30 for value: 2x30 + /// + ID1_2_30 = 6 + } + + /// + /// Converts to and from the JSON value + /// + public static class MRZFormatValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static MRZFormat FromString(string value) + { + if (value.Equals("1x30")) + return MRZFormat.IDL; + + if (value.Equals("3x30")) + return MRZFormat.ID1; + + if (value.Equals("2x36")) + return MRZFormat.ID2; + + if (value.Equals("2x44")) + return MRZFormat.ID3; + + if (value.Equals("1x6")) + return MRZFormat.CAN; + + if (value.Equals("2x30")) + return MRZFormat.ID1_2_30; + + throw new NotImplementedException($"Could not convert value to type MRZFormat: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static MRZFormat? FromStringOrDefault(string value) + { + if (value.Equals("1x30")) + return MRZFormat.IDL; + + if (value.Equals("3x30")) + return MRZFormat.ID1; + + if (value.Equals("2x36")) + return MRZFormat.ID2; + + if (value.Equals("2x44")) + return MRZFormat.ID3; + + if (value.Equals("1x6")) + return MRZFormat.CAN; + + if (value.Equals("2x30")) + return MRZFormat.ID1_2_30; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static string ToJsonValue(MRZFormat value) + { + if (value == MRZFormat.IDL) + return "1x30"; + + if (value == MRZFormat.ID1) + return "3x30"; + + if (value == MRZFormat.ID2) + return "2x36"; + + if (value == MRZFormat.ID3) + return "2x44"; + + if (value == MRZFormat.CAN) + return "1x6"; + + if (value == MRZFormat.ID1_2_30) + return "2x30"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + } + + /// + /// A Json converter for type + /// + /// + public class MRZFormatJsonConverter : JsonConverter { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override MRZFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + MRZFormat? result = rawValue == null + ? null + : MRZFormatValueConverter.FromStringOrDefault(rawValue); - - public const string IDL = "1x30"; + if (result != null) + return result.Value; - - public const string ID1 = "3x30"; + throw new JsonException(); + } - - public const string ID2 = "2x36"; + /// + /// Writes the MRZFormat to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MRZFormat mRZFormat, JsonSerializerOptions options) + { + writer.WriteStringValue(mRZFormat.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class MRZFormatNullableJsonConverter : JsonConverter + { + /// + /// Returns a MRZFormat from the Json object + /// + /// + /// + /// + /// + public override MRZFormat? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - - public const string ID3 = "2x44"; + MRZFormat? result = rawValue == null + ? null + : MRZFormatValueConverter.FromStringOrDefault(rawValue); - - public const string CAN = "1x6"; + if (result != null) + return result.Value; - - public const string ID1_2_30 = "2x30"; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MRZFormat? mRZFormat, JsonSerializerOptions options) + { + writer.WriteStringValue(mRZFormat?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs new file mode 100644 index 0000000..6cec704 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs @@ -0,0 +1,216 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// MRZPositionResult + /// + public partial class MRZPositionResult : ResultItem, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// mrzPosition + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public MRZPositionResult(MrzPosition mrzPosition, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + { + MrzPosition = mrzPosition; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets MrzPosition + /// + [JsonPropertyName("MrzPosition")] + public MrzPosition MrzPosition { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MRZPositionResult {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" MrzPosition: ").Append(MrzPosition).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class MRZPositionResultJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override MRZPositionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option mrzPosition = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "MrzPosition": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mrzPosition = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!mrzPosition.IsSet) + throw new ArgumentException("Property is required for class MRZPositionResult.", nameof(mrzPosition)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class MRZPositionResult.", nameof(resultType)); + + if (mrzPosition.IsSet && mrzPosition.Value == null) + throw new ArgumentNullException(nameof(mrzPosition), "Property is not nullable for class MRZPositionResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class MRZPositionResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class MRZPositionResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class MRZPositionResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class MRZPositionResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class MRZPositionResult."); + + return new MRZPositionResult(mrzPosition.Value!, bufLength, light, listIdx, pageIdx); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MRZPositionResult mRZPositionResult, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, mRZPositionResult, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, MRZPositionResult mRZPositionResult, JsonSerializerOptions jsonSerializerOptions) + { + if (mRZPositionResult.MrzPosition == null) + throw new ArgumentNullException(nameof(mRZPositionResult.MrzPosition), "Property is required for class MRZPositionResult."); + + writer.WritePropertyName("MrzPosition"); + JsonSerializer.Serialize(writer, mRZPositionResult.MrzPosition, jsonSerializerOptions); + if (mRZPositionResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", mRZPositionResult.BufLengthOption.Value!.Value); + + if (mRZPositionResult.LightOption.IsSet) + writer.WriteNumber("light", mRZPositionResult.LightOption.Value!.Value); + + if (mRZPositionResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", mRZPositionResult.ListIdxOption.Value!.Value); + + if (mRZPositionResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", mRZPositionResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", mRZPositionResult.ResultType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs b/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs new file mode 100644 index 0000000..bd76f83 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs @@ -0,0 +1,209 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// MRZRowsItem + /// + public partial class MRZRowsItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// length + /// maxLength + /// symbols + [JsonConstructor] + public MRZRowsItem(int length, int maxLength, List symbols) + { + Length = length; + MaxLength = maxLength; + Symbols = symbols; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Length + /// + [JsonPropertyName("length")] + public int Length { get; set; } + + /// + /// Gets or Sets MaxLength + /// + [JsonPropertyName("maxLength")] + public int MaxLength { get; set; } + + /// + /// Gets or Sets Symbols + /// + [JsonPropertyName("symbols")] + public List Symbols { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MRZRowsItem {\n"); + sb.Append(" Length: ").Append(Length).Append("\n"); + sb.Append(" MaxLength: ").Append(MaxLength).Append("\n"); + sb.Append(" Symbols: ").Append(Symbols).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class MRZRowsItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override MRZRowsItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option length = default; + Option maxLength = default; + Option?> symbols = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + length = new Option(utf8JsonReader.GetInt32()); + break; + case "maxLength": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + maxLength = new Option(utf8JsonReader.GetInt32()); + break; + case "symbols": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + symbols = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!length.IsSet) + throw new ArgumentException("Property is required for class MRZRowsItem.", nameof(length)); + + if (!maxLength.IsSet) + throw new ArgumentException("Property is required for class MRZRowsItem.", nameof(maxLength)); + + if (!symbols.IsSet) + throw new ArgumentException("Property is required for class MRZRowsItem.", nameof(symbols)); + + if (length.IsSet && length.Value == null) + throw new ArgumentNullException(nameof(length), "Property is not nullable for class MRZRowsItem."); + + if (maxLength.IsSet && maxLength.Value == null) + throw new ArgumentNullException(nameof(maxLength), "Property is not nullable for class MRZRowsItem."); + + if (symbols.IsSet && symbols.Value == null) + throw new ArgumentNullException(nameof(symbols), "Property is not nullable for class MRZRowsItem."); + + return new MRZRowsItem(length.Value!.Value!, maxLength.Value!.Value!, symbols.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MRZRowsItem mRZRowsItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, mRZRowsItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, MRZRowsItem mRZRowsItem, JsonSerializerOptions jsonSerializerOptions) + { + if (mRZRowsItem.Symbols == null) + throw new ArgumentNullException(nameof(mRZRowsItem.Symbols), "Property is required for class MRZRowsItem."); + + writer.WriteNumber("length", mRZRowsItem.Length); + + writer.WriteNumber("maxLength", mRZRowsItem.MaxLength); + + writer.WritePropertyName("symbols"); + JsonSerializer.Serialize(writer, mRZRowsItem.Symbols, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs new file mode 100644 index 0000000..efd4469 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs @@ -0,0 +1,362 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// MRZTestQuality + /// + public partial class MRZTestQuality : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// cHECKSUMS + /// cONTRASTPRINT + /// dOCFORMAT + /// mRZFORMAT + /// pRINTPOSITION + /// sTAINMRZ + /// sYMBOLSPARAM + /// strCount + /// strings + /// tEXTUALFILLING + [JsonConstructor] + public MRZTestQuality(int cHECKSUMS, int cONTRASTPRINT, int dOCFORMAT, int mRZFORMAT, int pRINTPOSITION, int sTAINMRZ, int sYMBOLSPARAM, int strCount, List strings, int tEXTUALFILLING) + { + CHECK_SUMS = cHECKSUMS; + CONTRAST_PRINT = cONTRASTPRINT; + DOC_FORMAT = dOCFORMAT; + MRZ_FORMAT = mRZFORMAT; + PRINT_POSITION = pRINTPOSITION; + STAIN_MRZ = sTAINMRZ; + SYMBOLS_PARAM = sYMBOLSPARAM; + StrCount = strCount; + Strings = strings; + TEXTUAL_FILLING = tEXTUALFILLING; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets CHECK_SUMS + /// + [JsonPropertyName("CHECK_SUMS")] + public int CHECK_SUMS { get; set; } + + /// + /// Gets or Sets CONTRAST_PRINT + /// + [JsonPropertyName("CONTRAST_PRINT")] + public int CONTRAST_PRINT { get; set; } + + /// + /// Gets or Sets DOC_FORMAT + /// + [JsonPropertyName("DOC_FORMAT")] + public int DOC_FORMAT { get; set; } + + /// + /// Gets or Sets MRZ_FORMAT + /// + [JsonPropertyName("MRZ_FORMAT")] + public int MRZ_FORMAT { get; set; } + + /// + /// Gets or Sets PRINT_POSITION + /// + [JsonPropertyName("PRINT_POSITION")] + public int PRINT_POSITION { get; set; } + + /// + /// Gets or Sets STAIN_MRZ + /// + [JsonPropertyName("STAIN_MRZ")] + public int STAIN_MRZ { get; set; } + + /// + /// Gets or Sets SYMBOLS_PARAM + /// + [JsonPropertyName("SYMBOLS_PARAM")] + public int SYMBOLS_PARAM { get; set; } + + /// + /// Gets or Sets StrCount + /// + [JsonPropertyName("StrCount")] + public int StrCount { get; set; } + + /// + /// Gets or Sets Strings + /// + [JsonPropertyName("Strings")] + public List Strings { get; set; } + + /// + /// Gets or Sets TEXTUAL_FILLING + /// + [JsonPropertyName("TEXTUAL_FILLING")] + public int TEXTUAL_FILLING { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MRZTestQuality {\n"); + sb.Append(" CHECK_SUMS: ").Append(CHECK_SUMS).Append("\n"); + sb.Append(" CONTRAST_PRINT: ").Append(CONTRAST_PRINT).Append("\n"); + sb.Append(" DOC_FORMAT: ").Append(DOC_FORMAT).Append("\n"); + sb.Append(" MRZ_FORMAT: ").Append(MRZ_FORMAT).Append("\n"); + sb.Append(" PRINT_POSITION: ").Append(PRINT_POSITION).Append("\n"); + sb.Append(" STAIN_MRZ: ").Append(STAIN_MRZ).Append("\n"); + sb.Append(" SYMBOLS_PARAM: ").Append(SYMBOLS_PARAM).Append("\n"); + sb.Append(" StrCount: ").Append(StrCount).Append("\n"); + sb.Append(" Strings: ").Append(Strings).Append("\n"); + sb.Append(" TEXTUAL_FILLING: ").Append(TEXTUAL_FILLING).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class MRZTestQualityJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override MRZTestQuality Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option cHECKSUMS = default; + Option cONTRASTPRINT = default; + Option dOCFORMAT = default; + Option mRZFORMAT = default; + Option pRINTPOSITION = default; + Option sTAINMRZ = default; + Option sYMBOLSPARAM = default; + Option strCount = default; + Option?> strings = default; + Option tEXTUALFILLING = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "CHECK_SUMS": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + cHECKSUMS = new Option(utf8JsonReader.GetInt32()); + break; + case "CONTRAST_PRINT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + cONTRASTPRINT = new Option(utf8JsonReader.GetInt32()); + break; + case "DOC_FORMAT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + dOCFORMAT = new Option(utf8JsonReader.GetInt32()); + break; + case "MRZ_FORMAT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mRZFORMAT = new Option(utf8JsonReader.GetInt32()); + break; + case "PRINT_POSITION": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pRINTPOSITION = new Option(utf8JsonReader.GetInt32()); + break; + case "STAIN_MRZ": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sTAINMRZ = new Option(utf8JsonReader.GetInt32()); + break; + case "SYMBOLS_PARAM": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sYMBOLSPARAM = new Option(utf8JsonReader.GetInt32()); + break; + case "StrCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + strCount = new Option(utf8JsonReader.GetInt32()); + break; + case "Strings": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + strings = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "TEXTUAL_FILLING": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + tEXTUALFILLING = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!cHECKSUMS.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(cHECKSUMS)); + + if (!cONTRASTPRINT.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(cONTRASTPRINT)); + + if (!dOCFORMAT.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(dOCFORMAT)); + + if (!mRZFORMAT.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(mRZFORMAT)); + + if (!pRINTPOSITION.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(pRINTPOSITION)); + + if (!sTAINMRZ.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(sTAINMRZ)); + + if (!sYMBOLSPARAM.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(sYMBOLSPARAM)); + + if (!strCount.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(strCount)); + + if (!strings.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(strings)); + + if (!tEXTUALFILLING.IsSet) + throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(tEXTUALFILLING)); + + if (cHECKSUMS.IsSet && cHECKSUMS.Value == null) + throw new ArgumentNullException(nameof(cHECKSUMS), "Property is not nullable for class MRZTestQuality."); + + if (cONTRASTPRINT.IsSet && cONTRASTPRINT.Value == null) + throw new ArgumentNullException(nameof(cONTRASTPRINT), "Property is not nullable for class MRZTestQuality."); + + if (dOCFORMAT.IsSet && dOCFORMAT.Value == null) + throw new ArgumentNullException(nameof(dOCFORMAT), "Property is not nullable for class MRZTestQuality."); + + if (mRZFORMAT.IsSet && mRZFORMAT.Value == null) + throw new ArgumentNullException(nameof(mRZFORMAT), "Property is not nullable for class MRZTestQuality."); + + if (pRINTPOSITION.IsSet && pRINTPOSITION.Value == null) + throw new ArgumentNullException(nameof(pRINTPOSITION), "Property is not nullable for class MRZTestQuality."); + + if (sTAINMRZ.IsSet && sTAINMRZ.Value == null) + throw new ArgumentNullException(nameof(sTAINMRZ), "Property is not nullable for class MRZTestQuality."); + + if (sYMBOLSPARAM.IsSet && sYMBOLSPARAM.Value == null) + throw new ArgumentNullException(nameof(sYMBOLSPARAM), "Property is not nullable for class MRZTestQuality."); + + if (strCount.IsSet && strCount.Value == null) + throw new ArgumentNullException(nameof(strCount), "Property is not nullable for class MRZTestQuality."); + + if (strings.IsSet && strings.Value == null) + throw new ArgumentNullException(nameof(strings), "Property is not nullable for class MRZTestQuality."); + + if (tEXTUALFILLING.IsSet && tEXTUALFILLING.Value == null) + throw new ArgumentNullException(nameof(tEXTUALFILLING), "Property is not nullable for class MRZTestQuality."); + + return new MRZTestQuality(cHECKSUMS.Value!.Value!, cONTRASTPRINT.Value!.Value!, dOCFORMAT.Value!.Value!, mRZFORMAT.Value!.Value!, pRINTPOSITION.Value!.Value!, sTAINMRZ.Value!.Value!, sYMBOLSPARAM.Value!.Value!, strCount.Value!.Value!, strings.Value!, tEXTUALFILLING.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MRZTestQuality mRZTestQuality, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, mRZTestQuality, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, MRZTestQuality mRZTestQuality, JsonSerializerOptions jsonSerializerOptions) + { + if (mRZTestQuality.Strings == null) + throw new ArgumentNullException(nameof(mRZTestQuality.Strings), "Property is required for class MRZTestQuality."); + + writer.WriteNumber("CHECK_SUMS", mRZTestQuality.CHECK_SUMS); + + writer.WriteNumber("CONTRAST_PRINT", mRZTestQuality.CONTRAST_PRINT); + + writer.WriteNumber("DOC_FORMAT", mRZTestQuality.DOC_FORMAT); + + writer.WriteNumber("MRZ_FORMAT", mRZTestQuality.MRZ_FORMAT); + + writer.WriteNumber("PRINT_POSITION", mRZTestQuality.PRINT_POSITION); + + writer.WriteNumber("STAIN_MRZ", mRZTestQuality.STAIN_MRZ); + + writer.WriteNumber("SYMBOLS_PARAM", mRZTestQuality.SYMBOLS_PARAM); + + writer.WriteNumber("StrCount", mRZTestQuality.StrCount); + + writer.WritePropertyName("Strings"); + JsonSerializer.Serialize(writer, mRZTestQuality.Strings, jsonSerializerOptions); + writer.WriteNumber("TEXTUAL_FILLING", mRZTestQuality.TEXTUAL_FILLING); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs new file mode 100644 index 0000000..d2cda30 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// MRZTestQualityItem + /// + public partial class MRZTestQualityItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// mRZTestQuality + [JsonConstructor] + public MRZTestQualityItem(MRZTestQuality mRZTestQuality) + { + MRZTestQuality = mRZTestQuality; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets MRZTestQuality + /// + [JsonPropertyName("MRZTestQuality")] + public MRZTestQuality MRZTestQuality { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MRZTestQualityItem {\n"); + sb.Append(" MRZTestQuality: ").Append(MRZTestQuality).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class MRZTestQualityItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override MRZTestQualityItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option mRZTestQuality = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "MRZTestQuality": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mRZTestQuality = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!mRZTestQuality.IsSet) + throw new ArgumentException("Property is required for class MRZTestQualityItem.", nameof(mRZTestQuality)); + + if (mRZTestQuality.IsSet && mRZTestQuality.Value == null) + throw new ArgumentNullException(nameof(mRZTestQuality), "Property is not nullable for class MRZTestQualityItem."); + + return new MRZTestQualityItem(mRZTestQuality.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MRZTestQualityItem mRZTestQualityItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, mRZTestQualityItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, MRZTestQualityItem mRZTestQualityItem, JsonSerializerOptions jsonSerializerOptions) + { + if (mRZTestQualityItem.MRZTestQuality == null) + throw new ArgumentNullException(nameof(mRZTestQualityItem.MRZTestQuality), "Property is required for class MRZTestQualityItem."); + + writer.WritePropertyName("MRZTestQuality"); + JsonSerializer.Serialize(writer, mRZTestQualityItem.MRZTestQuality, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs new file mode 100644 index 0000000..d0b9140 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs @@ -0,0 +1,216 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// MRZTestQualityResult + /// + public partial class MRZTestQualityResult : ResultItem, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// mRZTestQuality + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public MRZTestQualityResult(MRZTestQuality mRZTestQuality, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + { + MRZTestQuality = mRZTestQuality; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets MRZTestQuality + /// + [JsonPropertyName("MRZTestQuality")] + public MRZTestQuality MRZTestQuality { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MRZTestQualityResult {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" MRZTestQuality: ").Append(MRZTestQuality).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class MRZTestQualityResultJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override MRZTestQualityResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option mRZTestQuality = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "MRZTestQuality": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mRZTestQuality = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!mRZTestQuality.IsSet) + throw new ArgumentException("Property is required for class MRZTestQualityResult.", nameof(mRZTestQuality)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class MRZTestQualityResult.", nameof(resultType)); + + if (mRZTestQuality.IsSet && mRZTestQuality.Value == null) + throw new ArgumentNullException(nameof(mRZTestQuality), "Property is not nullable for class MRZTestQualityResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class MRZTestQualityResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class MRZTestQualityResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class MRZTestQualityResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class MRZTestQualityResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class MRZTestQualityResult."); + + return new MRZTestQualityResult(mRZTestQuality.Value!, bufLength, light, listIdx, pageIdx); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MRZTestQualityResult mRZTestQualityResult, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, mRZTestQualityResult, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, MRZTestQualityResult mRZTestQualityResult, JsonSerializerOptions jsonSerializerOptions) + { + if (mRZTestQualityResult.MRZTestQuality == null) + throw new ArgumentNullException(nameof(mRZTestQualityResult.MRZTestQuality), "Property is required for class MRZTestQualityResult."); + + writer.WritePropertyName("MRZTestQuality"); + JsonSerializer.Serialize(writer, mRZTestQualityResult.MRZTestQuality, jsonSerializerOptions); + if (mRZTestQualityResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", mRZTestQualityResult.BufLengthOption.Value!.Value); + + if (mRZTestQualityResult.LightOption.IsSet) + writer.WriteNumber("light", mRZTestQualityResult.LightOption.Value!.Value); + + if (mRZTestQualityResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", mRZTestQualityResult.ListIdxOption.Value!.Value); + + if (mRZTestQualityResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", mRZTestQualityResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", mRZTestQualityResult.ResultType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs b/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs index 9534ac2..046f1b2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs @@ -1,37 +1,169 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class MeasureSystem + /// + /// Defines MeasureSystem + /// + public enum MeasureSystem + { + /// + /// Enum METRIC for value: 0 + /// + METRIC = 0, + + /// + /// Enum IMPERIAL for value: 1 + /// + IMPERIAL = 1 + } + + /// + /// Converts to and from the JSON value + /// + public static class MeasureSystemValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static MeasureSystem FromString(string value) + { + if (value.Equals((0).ToString())) + return MeasureSystem.METRIC; + + if (value.Equals((1).ToString())) + return MeasureSystem.IMPERIAL; + + throw new NotImplementedException($"Could not convert value to type MeasureSystem: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static MeasureSystem? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return MeasureSystem.METRIC; + + if (value.Equals((1).ToString())) + return MeasureSystem.IMPERIAL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(MeasureSystem value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class MeasureSystemJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override MeasureSystem Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + MeasureSystem? result = rawValue == null + ? null + : MeasureSystemValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the MeasureSystem to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MeasureSystem measureSystem, JsonSerializerOptions options) + { + writer.WriteStringValue(measureSystem.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class MeasureSystemNullableJsonConverter : JsonConverter { + /// + /// Returns a MeasureSystem from the Json object + /// + /// + /// + /// + /// + public override MeasureSystem? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + MeasureSystem? result = rawValue == null + ? null + : MeasureSystemValueConverter.FromStringOrDefault(rawValue); - /** Metric system of measurement, where things are measured in meters and grams */ - public const int METRIC = 0; + if (result != null) + return result.Value; - /** Imperial System of Measurement, where things are measured in feet, inches and pounds */ - public const int IMPERIAL = 1; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MeasureSystem? measureSystem, JsonSerializerOptions options) + { + writer.WriteStringValue(measureSystem?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs b/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs index 201fb38..177cf92 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs @@ -1,26 +1,27 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { @@ -28,29 +29,153 @@ namespace Regula.DocumentReader.WebClient.Model /// Make better MRZ detection on complex noisy backgrounds, like BW photocopy of some documents. /// /// Make better MRZ detection on complex noisy backgrounds, like BW photocopy of some documents. - - [JsonConverter(typeof(StringEnumConverter))] - public enum MrzDetectModeEnum { /// /// Enum eMDM_Default for value: 0 /// - [EnumMember(Value = "0")] - eMDM_Default = 1, + eMDM_Default = 0, /// /// Enum eMDM_ResizeBinarizeWindow for value: 1 /// - [EnumMember(Value = "1")] - eMDM_ResizeBinarizeWindow = 2, + eMDM_ResizeBinarizeWindow = 1, /// /// Enum eMDM_BlurBeforeBinarization for value: 2 /// - [EnumMember(Value = "2")] - eMDM_BlurBeforeBinarization = 3 + eMDM_BlurBeforeBinarization = 2 + } + + /// + /// Converts to and from the JSON value + /// + public static class MrzDetectModeEnumValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static MrzDetectModeEnum FromString(string value) + { + if (value.Equals((0).ToString())) + return MrzDetectModeEnum.eMDM_Default; + + if (value.Equals((1).ToString())) + return MrzDetectModeEnum.eMDM_ResizeBinarizeWindow; + + if (value.Equals((2).ToString())) + return MrzDetectModeEnum.eMDM_BlurBeforeBinarization; + + throw new NotImplementedException($"Could not convert value to type MrzDetectModeEnum: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static MrzDetectModeEnum? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return MrzDetectModeEnum.eMDM_Default; + + if (value.Equals((1).ToString())) + return MrzDetectModeEnum.eMDM_ResizeBinarizeWindow; + + if (value.Equals((2).ToString())) + return MrzDetectModeEnum.eMDM_BlurBeforeBinarization; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(MrzDetectModeEnum value) + { + return (int) value; + } + } + /// + /// A Json converter for type + /// + /// + public class MrzDetectModeEnumJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override MrzDetectModeEnum Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + MrzDetectModeEnum? result = rawValue == null + ? null + : MrzDetectModeEnumValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the MrzDetectModeEnum to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MrzDetectModeEnum mrzDetectModeEnum, JsonSerializerOptions options) + { + writer.WriteStringValue(mrzDetectModeEnum.ToString()); + } } + /// + /// A Json converter for type + /// + public class MrzDetectModeEnumNullableJsonConverter : JsonConverter + { + /// + /// Returns a MrzDetectModeEnum from the Json object + /// + /// + /// + /// + /// + public override MrzDetectModeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + MrzDetectModeEnum? result = rawValue == null + ? null + : MrzDetectModeEnumValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MrzDetectModeEnum? mrzDetectModeEnum, JsonSerializerOptions options) + { + writer.WriteStringValue(mrzDetectModeEnum?.ToString() ?? "null"); + } + } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs new file mode 100644 index 0000000..cba74cc --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs @@ -0,0 +1,514 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// MrzPosition + /// + public partial class MrzPosition : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// docFormat + /// Document rotation angle + /// Document width + /// Document height + /// center + /// leftBottom + /// leftTop + /// rightBottom + /// rightTop + /// dpi + /// inverse + /// objArea + /// objIntAngleDev + /// perspectiveTr + /// resultStatus + [JsonConstructor] + public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int height, Point center, Point leftBottom, Point leftTop, Point rightBottom, Point rightTop, int dpi, Option inverse = default, Option objArea = default, Option objIntAngleDev = default, Option perspectiveTr = default, Option resultStatus = default) + { + DocFormat = docFormat; + Angle = angle; + Width = width; + Height = height; + Center = center; + LeftBottom = leftBottom; + LeftTop = leftTop; + RightBottom = rightBottom; + RightTop = rightTop; + Dpi = dpi; + InverseOption = inverse; + ObjAreaOption = objArea; + ObjIntAngleDevOption = objIntAngleDev; + PerspectiveTrOption = perspectiveTr; + ResultStatusOption = resultStatus; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets DocFormat + /// + [JsonPropertyName("docFormat")] + public DocumentFormat DocFormat { get; set; } + + /// + /// Document rotation angle + /// + /// Document rotation angle + [JsonPropertyName("Angle")] + public decimal Angle { get; set; } + + /// + /// Document width + /// + /// Document width + [JsonPropertyName("Width")] + public int Width { get; set; } + + /// + /// Document height + /// + /// Document height + [JsonPropertyName("Height")] + public int Height { get; set; } + + /// + /// Gets or Sets Center + /// + [JsonPropertyName("Center")] + public Point Center { get; set; } + + /// + /// Gets or Sets LeftBottom + /// + [JsonPropertyName("LeftBottom")] + public Point LeftBottom { get; set; } + + /// + /// Gets or Sets LeftTop + /// + [JsonPropertyName("LeftTop")] + public Point LeftTop { get; set; } + + /// + /// Gets or Sets RightBottom + /// + [JsonPropertyName("RightBottom")] + public Point RightBottom { get; set; } + + /// + /// Gets or Sets RightTop + /// + [JsonPropertyName("RightTop")] + public Point RightTop { get; set; } + + /// + /// Gets or Sets Dpi + /// + [JsonPropertyName("Dpi")] + public int Dpi { get; set; } + + /// + /// Used to track the state of Inverse + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option InverseOption { get; private set; } + + /// + /// Gets or Sets Inverse + /// + [JsonPropertyName("Inverse")] + public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new(value); } } + + /// + /// Used to track the state of ObjArea + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ObjAreaOption { get; private set; } + + /// + /// Gets or Sets ObjArea + /// + [JsonPropertyName("ObjArea")] + public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new(value); } } + + /// + /// Used to track the state of ObjIntAngleDev + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ObjIntAngleDevOption { get; private set; } + + /// + /// Gets or Sets ObjIntAngleDev + /// + [JsonPropertyName("ObjIntAngleDev")] + public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new(value); } } + + /// + /// Used to track the state of PerspectiveTr + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PerspectiveTrOption { get; private set; } + + /// + /// Gets or Sets PerspectiveTr + /// + [JsonPropertyName("PerspectiveTr")] + public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new(value); } } + + /// + /// Used to track the state of ResultStatus + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ResultStatusOption { get; private set; } + + /// + /// Gets or Sets ResultStatus + /// + [JsonPropertyName("ResultStatus")] + public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MrzPosition {\n"); + sb.Append(" DocFormat: ").Append(DocFormat).Append("\n"); + sb.Append(" Angle: ").Append(Angle).Append("\n"); + sb.Append(" Width: ").Append(Width).Append("\n"); + sb.Append(" Height: ").Append(Height).Append("\n"); + sb.Append(" Center: ").Append(Center).Append("\n"); + sb.Append(" LeftBottom: ").Append(LeftBottom).Append("\n"); + sb.Append(" LeftTop: ").Append(LeftTop).Append("\n"); + sb.Append(" RightBottom: ").Append(RightBottom).Append("\n"); + sb.Append(" RightTop: ").Append(RightTop).Append("\n"); + sb.Append(" Dpi: ").Append(Dpi).Append("\n"); + sb.Append(" Inverse: ").Append(Inverse).Append("\n"); + sb.Append(" ObjArea: ").Append(ObjArea).Append("\n"); + sb.Append(" ObjIntAngleDev: ").Append(ObjIntAngleDev).Append("\n"); + sb.Append(" PerspectiveTr: ").Append(PerspectiveTr).Append("\n"); + sb.Append(" ResultStatus: ").Append(ResultStatus).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class MrzPositionJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override MrzPosition Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docFormat = default; + Option angle = default; + Option width = default; + Option height = default; + Option center = default; + Option leftBottom = default; + Option leftTop = default; + Option rightBottom = default; + Option rightTop = default; + Option dpi = default; + Option inverse = default; + Option objArea = default; + Option objIntAngleDev = default; + Option perspectiveTr = default; + Option resultStatus = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "docFormat": + string? docFormatRawValue = utf8JsonReader.GetString(); + if (docFormatRawValue != null) + docFormat = new Option(DocumentFormatValueConverter.FromStringOrDefault(docFormatRawValue)); + break; + case "Angle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + angle = new Option(utf8JsonReader.GetDecimal()); + break; + case "Width": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + width = new Option(utf8JsonReader.GetInt32()); + break; + case "Height": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + height = new Option(utf8JsonReader.GetInt32()); + break; + case "Center": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + center = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "LeftBottom": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + leftBottom = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "LeftTop": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + leftTop = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RightBottom": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rightBottom = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RightTop": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rightTop = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Dpi": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + dpi = new Option(utf8JsonReader.GetInt32()); + break; + case "Inverse": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + inverse = new Option(utf8JsonReader.GetInt32()); + break; + case "ObjArea": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + objArea = new Option(utf8JsonReader.GetInt32()); + break; + case "ObjIntAngleDev": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + objIntAngleDev = new Option(utf8JsonReader.GetInt32()); + break; + case "PerspectiveTr": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + perspectiveTr = new Option(utf8JsonReader.GetInt32()); + break; + case "ResultStatus": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultStatus = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!docFormat.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(docFormat)); + + if (!angle.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(angle)); + + if (!width.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(width)); + + if (!height.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(height)); + + if (!center.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(center)); + + if (!leftBottom.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(leftBottom)); + + if (!leftTop.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(leftTop)); + + if (!rightBottom.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(rightBottom)); + + if (!rightTop.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(rightTop)); + + if (!dpi.IsSet) + throw new ArgumentException("Property is required for class MrzPosition.", nameof(dpi)); + + if (docFormat.IsSet && docFormat.Value == null) + throw new ArgumentNullException(nameof(docFormat), "Property is not nullable for class MrzPosition."); + + if (angle.IsSet && angle.Value == null) + throw new ArgumentNullException(nameof(angle), "Property is not nullable for class MrzPosition."); + + if (width.IsSet && width.Value == null) + throw new ArgumentNullException(nameof(width), "Property is not nullable for class MrzPosition."); + + if (height.IsSet && height.Value == null) + throw new ArgumentNullException(nameof(height), "Property is not nullable for class MrzPosition."); + + if (center.IsSet && center.Value == null) + throw new ArgumentNullException(nameof(center), "Property is not nullable for class MrzPosition."); + + if (leftBottom.IsSet && leftBottom.Value == null) + throw new ArgumentNullException(nameof(leftBottom), "Property is not nullable for class MrzPosition."); + + if (leftTop.IsSet && leftTop.Value == null) + throw new ArgumentNullException(nameof(leftTop), "Property is not nullable for class MrzPosition."); + + if (rightBottom.IsSet && rightBottom.Value == null) + throw new ArgumentNullException(nameof(rightBottom), "Property is not nullable for class MrzPosition."); + + if (rightTop.IsSet && rightTop.Value == null) + throw new ArgumentNullException(nameof(rightTop), "Property is not nullable for class MrzPosition."); + + if (dpi.IsSet && dpi.Value == null) + throw new ArgumentNullException(nameof(dpi), "Property is not nullable for class MrzPosition."); + + if (inverse.IsSet && inverse.Value == null) + throw new ArgumentNullException(nameof(inverse), "Property is not nullable for class MrzPosition."); + + if (objArea.IsSet && objArea.Value == null) + throw new ArgumentNullException(nameof(objArea), "Property is not nullable for class MrzPosition."); + + if (objIntAngleDev.IsSet && objIntAngleDev.Value == null) + throw new ArgumentNullException(nameof(objIntAngleDev), "Property is not nullable for class MrzPosition."); + + if (perspectiveTr.IsSet && perspectiveTr.Value == null) + throw new ArgumentNullException(nameof(perspectiveTr), "Property is not nullable for class MrzPosition."); + + if (resultStatus.IsSet && resultStatus.Value == null) + throw new ArgumentNullException(nameof(resultStatus), "Property is not nullable for class MrzPosition."); + + return new MrzPosition(docFormat.Value!.Value!, angle.Value!.Value!, width.Value!.Value!, height.Value!.Value!, center.Value!, leftBottom.Value!, leftTop.Value!, rightBottom.Value!, rightTop.Value!, dpi.Value!.Value!, inverse, objArea, objIntAngleDev, perspectiveTr, resultStatus); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MrzPosition mrzPosition, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, mrzPosition, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, MrzPosition mrzPosition, JsonSerializerOptions jsonSerializerOptions) + { + if (mrzPosition.Center == null) + throw new ArgumentNullException(nameof(mrzPosition.Center), "Property is required for class MrzPosition."); + + if (mrzPosition.LeftBottom == null) + throw new ArgumentNullException(nameof(mrzPosition.LeftBottom), "Property is required for class MrzPosition."); + + if (mrzPosition.LeftTop == null) + throw new ArgumentNullException(nameof(mrzPosition.LeftTop), "Property is required for class MrzPosition."); + + if (mrzPosition.RightBottom == null) + throw new ArgumentNullException(nameof(mrzPosition.RightBottom), "Property is required for class MrzPosition."); + + if (mrzPosition.RightTop == null) + throw new ArgumentNullException(nameof(mrzPosition.RightTop), "Property is required for class MrzPosition."); + + var docFormatRawValue = DocumentFormatValueConverter.ToJsonValue(mrzPosition.DocFormat); + writer.WriteNumber("docFormat", docFormatRawValue); + + writer.WriteNumber("Angle", mrzPosition.Angle); + + writer.WriteNumber("Width", mrzPosition.Width); + + writer.WriteNumber("Height", mrzPosition.Height); + + writer.WritePropertyName("Center"); + JsonSerializer.Serialize(writer, mrzPosition.Center, jsonSerializerOptions); + writer.WritePropertyName("LeftBottom"); + JsonSerializer.Serialize(writer, mrzPosition.LeftBottom, jsonSerializerOptions); + writer.WritePropertyName("LeftTop"); + JsonSerializer.Serialize(writer, mrzPosition.LeftTop, jsonSerializerOptions); + writer.WritePropertyName("RightBottom"); + JsonSerializer.Serialize(writer, mrzPosition.RightBottom, jsonSerializerOptions); + writer.WritePropertyName("RightTop"); + JsonSerializer.Serialize(writer, mrzPosition.RightTop, jsonSerializerOptions); + writer.WriteNumber("Dpi", mrzPosition.Dpi); + + if (mrzPosition.InverseOption.IsSet) + writer.WriteNumber("Inverse", mrzPosition.InverseOption.Value!.Value); + + if (mrzPosition.ObjAreaOption.IsSet) + writer.WriteNumber("ObjArea", mrzPosition.ObjAreaOption.Value!.Value); + + if (mrzPosition.ObjIntAngleDevOption.IsSet) + writer.WriteNumber("ObjIntAngleDev", mrzPosition.ObjIntAngleDevOption.Value!.Value); + + if (mrzPosition.PerspectiveTrOption.IsSet) + writer.WriteNumber("PerspectiveTr", mrzPosition.PerspectiveTrOption.Value!.Value); + + if (mrzPosition.ResultStatusOption.IsSet) + writer.WriteNumber("ResultStatus", mrzPosition.ResultStatusOption.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs new file mode 100644 index 0000000..2f0c495 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// MrzPositionItem + /// + public partial class MrzPositionItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// mrzPosition + [JsonConstructor] + public MrzPositionItem(MrzPosition mrzPosition) + { + MrzPosition = mrzPosition; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets MrzPosition + /// + [JsonPropertyName("MrzPosition")] + public MrzPosition MrzPosition { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class MrzPositionItem {\n"); + sb.Append(" MrzPosition: ").Append(MrzPosition).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class MrzPositionItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override MrzPositionItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option mrzPosition = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "MrzPosition": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mrzPosition = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!mrzPosition.IsSet) + throw new ArgumentException("Property is required for class MrzPositionItem.", nameof(mrzPosition)); + + if (mrzPosition.IsSet && mrzPosition.Value == null) + throw new ArgumentNullException(nameof(mrzPosition), "Property is not nullable for class MrzPositionItem."); + + return new MrzPositionItem(mrzPosition.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, MrzPositionItem mrzPositionItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, mrzPositionItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, MrzPositionItem mrzPositionItem, JsonSerializerOptions jsonSerializerOptions) + { + if (mrzPositionItem.MrzPosition == null) + throw new ArgumentNullException(nameof(mrzPositionItem.MrzPosition), "Property is required for class MrzPositionItem."); + + writer.WritePropertyName("MrzPosition"); + JsonSerializer.Serialize(writer, mrzPositionItem.MrzPosition, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs new file mode 100644 index 0000000..c572b0a --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs @@ -0,0 +1,405 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// OCRSecurityTextItem + /// + public partial class OCRSecurityTextItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// criticalFlag + /// lightType + /// fieldRect + /// etalonResultType + /// etalonFieldType + /// etalonLightType + /// etalonFieldRect + /// securityTextResultOCR + /// etalonResultOCR + /// reserved1 + /// reserved2 + [JsonConstructor] + public OCRSecurityTextItem(Critical criticalFlag, Light lightType, RectangleCoordinates fieldRect, int etalonResultType, int etalonFieldType, int etalonLightType, RectangleCoordinates etalonFieldRect, string securityTextResultOCR, string etalonResultOCR, Option reserved1 = default, Option reserved2 = default) + { + CriticalFlag = criticalFlag; + LightType = lightType; + FieldRect = fieldRect; + EtalonResultType = etalonResultType; + EtalonFieldType = etalonFieldType; + EtalonLightType = etalonLightType; + EtalonFieldRect = etalonFieldRect; + SecurityTextResultOCR = securityTextResultOCR; + EtalonResultOCR = etalonResultOCR; + Reserved1Option = reserved1; + Reserved2Option = reserved2; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets CriticalFlag + /// + [JsonPropertyName("CriticalFlag")] + public Critical CriticalFlag { get; set; } + + /// + /// Gets or Sets LightType + /// + [JsonPropertyName("LightType")] + public Light LightType { get; set; } + + /// + /// Gets or Sets FieldRect + /// + [JsonPropertyName("FieldRect")] + public RectangleCoordinates FieldRect { get; set; } + + /// + /// Gets or Sets EtalonResultType + /// + [JsonPropertyName("EtalonResultType")] + public int EtalonResultType { get; set; } + + /// + /// Gets or Sets EtalonFieldType + /// + [JsonPropertyName("EtalonFieldType")] + public int EtalonFieldType { get; set; } + + /// + /// Gets or Sets EtalonLightType + /// + [JsonPropertyName("EtalonLightType")] + public int EtalonLightType { get; set; } + + /// + /// Gets or Sets EtalonFieldRect + /// + [JsonPropertyName("EtalonFieldRect")] + public RectangleCoordinates EtalonFieldRect { get; set; } + + /// + /// Gets or Sets SecurityTextResultOCR + /// + [JsonPropertyName("SecurityTextResultOCR")] + public string SecurityTextResultOCR { get; set; } + + /// + /// Gets or Sets EtalonResultOCR + /// + [JsonPropertyName("EtalonResultOCR")] + public string EtalonResultOCR { get; set; } + + /// + /// Used to track the state of Reserved1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved1Option { get; private set; } + + /// + /// Gets or Sets Reserved1 + /// + [JsonPropertyName("Reserved1")] + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + + /// + /// Used to track the state of Reserved2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved2Option { get; private set; } + + /// + /// Gets or Sets Reserved2 + /// + [JsonPropertyName("Reserved2")] + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OCRSecurityTextItem {\n"); + sb.Append(" CriticalFlag: ").Append(CriticalFlag).Append("\n"); + sb.Append(" LightType: ").Append(LightType).Append("\n"); + sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); + sb.Append(" EtalonResultType: ").Append(EtalonResultType).Append("\n"); + sb.Append(" EtalonFieldType: ").Append(EtalonFieldType).Append("\n"); + sb.Append(" EtalonLightType: ").Append(EtalonLightType).Append("\n"); + sb.Append(" EtalonFieldRect: ").Append(EtalonFieldRect).Append("\n"); + sb.Append(" SecurityTextResultOCR: ").Append(SecurityTextResultOCR).Append("\n"); + sb.Append(" EtalonResultOCR: ").Append(EtalonResultOCR).Append("\n"); + sb.Append(" Reserved1: ").Append(Reserved1).Append("\n"); + sb.Append(" Reserved2: ").Append(Reserved2).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class OCRSecurityTextItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override OCRSecurityTextItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option criticalFlag = default; + Option lightType = default; + Option fieldRect = default; + Option etalonResultType = default; + Option etalonFieldType = default; + Option etalonLightType = default; + Option etalonFieldRect = default; + Option securityTextResultOCR = default; + Option etalonResultOCR = default; + Option reserved1 = default; + Option reserved2 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "CriticalFlag": + string? criticalFlagRawValue = utf8JsonReader.GetString(); + if (criticalFlagRawValue != null) + criticalFlag = new Option(CriticalValueConverter.FromStringOrDefault(criticalFlagRawValue)); + break; + case "LightType": + string? lightTypeRawValue = utf8JsonReader.GetString(); + if (lightTypeRawValue != null) + lightType = new Option(LightValueConverter.FromStringOrDefault(lightTypeRawValue)); + break; + case "FieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "EtalonResultType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonResultType = new Option(utf8JsonReader.GetInt32()); + break; + case "EtalonFieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonFieldType = new Option(utf8JsonReader.GetInt32()); + break; + case "EtalonLightType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonLightType = new Option(utf8JsonReader.GetInt32()); + break; + case "EtalonFieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonFieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SecurityTextResultOCR": + securityTextResultOCR = new Option(utf8JsonReader.GetString()!); + break; + case "EtalonResultOCR": + etalonResultOCR = new Option(utf8JsonReader.GetString()!); + break; + case "Reserved1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved1 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!criticalFlag.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(criticalFlag)); + + if (!lightType.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(lightType)); + + if (!fieldRect.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(fieldRect)); + + if (!etalonResultType.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonResultType)); + + if (!etalonFieldType.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonFieldType)); + + if (!etalonLightType.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonLightType)); + + if (!etalonFieldRect.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonFieldRect)); + + if (!securityTextResultOCR.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(securityTextResultOCR)); + + if (!etalonResultOCR.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonResultOCR)); + + if (criticalFlag.IsSet && criticalFlag.Value == null) + throw new ArgumentNullException(nameof(criticalFlag), "Property is not nullable for class OCRSecurityTextItem."); + + if (lightType.IsSet && lightType.Value == null) + throw new ArgumentNullException(nameof(lightType), "Property is not nullable for class OCRSecurityTextItem."); + + if (fieldRect.IsSet && fieldRect.Value == null) + throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class OCRSecurityTextItem."); + + if (etalonResultType.IsSet && etalonResultType.Value == null) + throw new ArgumentNullException(nameof(etalonResultType), "Property is not nullable for class OCRSecurityTextItem."); + + if (etalonFieldType.IsSet && etalonFieldType.Value == null) + throw new ArgumentNullException(nameof(etalonFieldType), "Property is not nullable for class OCRSecurityTextItem."); + + if (etalonLightType.IsSet && etalonLightType.Value == null) + throw new ArgumentNullException(nameof(etalonLightType), "Property is not nullable for class OCRSecurityTextItem."); + + if (etalonFieldRect.IsSet && etalonFieldRect.Value == null) + throw new ArgumentNullException(nameof(etalonFieldRect), "Property is not nullable for class OCRSecurityTextItem."); + + if (securityTextResultOCR.IsSet && securityTextResultOCR.Value == null) + throw new ArgumentNullException(nameof(securityTextResultOCR), "Property is not nullable for class OCRSecurityTextItem."); + + if (etalonResultOCR.IsSet && etalonResultOCR.Value == null) + throw new ArgumentNullException(nameof(etalonResultOCR), "Property is not nullable for class OCRSecurityTextItem."); + + if (reserved1.IsSet && reserved1.Value == null) + throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class OCRSecurityTextItem."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class OCRSecurityTextItem."); + + return new OCRSecurityTextItem(criticalFlag.Value!.Value!, lightType.Value!.Value!, fieldRect.Value!, etalonResultType.Value!.Value!, etalonFieldType.Value!.Value!, etalonLightType.Value!.Value!, etalonFieldRect.Value!, securityTextResultOCR.Value!, etalonResultOCR.Value!, reserved1, reserved2); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OCRSecurityTextItem oCRSecurityTextItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, oCRSecurityTextItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, OCRSecurityTextItem oCRSecurityTextItem, JsonSerializerOptions jsonSerializerOptions) + { + if (oCRSecurityTextItem.FieldRect == null) + throw new ArgumentNullException(nameof(oCRSecurityTextItem.FieldRect), "Property is required for class OCRSecurityTextItem."); + + if (oCRSecurityTextItem.EtalonFieldRect == null) + throw new ArgumentNullException(nameof(oCRSecurityTextItem.EtalonFieldRect), "Property is required for class OCRSecurityTextItem."); + + if (oCRSecurityTextItem.SecurityTextResultOCR == null) + throw new ArgumentNullException(nameof(oCRSecurityTextItem.SecurityTextResultOCR), "Property is required for class OCRSecurityTextItem."); + + if (oCRSecurityTextItem.EtalonResultOCR == null) + throw new ArgumentNullException(nameof(oCRSecurityTextItem.EtalonResultOCR), "Property is required for class OCRSecurityTextItem."); + + var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(oCRSecurityTextItem.CriticalFlag); + writer.WriteNumber("CriticalFlag", criticalFlagRawValue); + + var lightTypeRawValue = LightValueConverter.ToJsonValue(oCRSecurityTextItem.LightType); + writer.WriteNumber("LightType", lightTypeRawValue); + + writer.WritePropertyName("FieldRect"); + JsonSerializer.Serialize(writer, oCRSecurityTextItem.FieldRect, jsonSerializerOptions); + writer.WriteNumber("EtalonResultType", oCRSecurityTextItem.EtalonResultType); + + writer.WriteNumber("EtalonFieldType", oCRSecurityTextItem.EtalonFieldType); + + writer.WriteNumber("EtalonLightType", oCRSecurityTextItem.EtalonLightType); + + writer.WritePropertyName("EtalonFieldRect"); + JsonSerializer.Serialize(writer, oCRSecurityTextItem.EtalonFieldRect, jsonSerializerOptions); + writer.WriteString("SecurityTextResultOCR", oCRSecurityTextItem.SecurityTextResultOCR); + + writer.WriteString("EtalonResultOCR", oCRSecurityTextItem.EtalonResultOCR); + + if (oCRSecurityTextItem.Reserved1Option.IsSet) + writer.WriteNumber("Reserved1", oCRSecurityTextItem.Reserved1Option.Value!.Value); + + if (oCRSecurityTextItem.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", oCRSecurityTextItem.Reserved2Option.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs index 1119507..1fb71a2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs @@ -1,126 +1,150 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// OCRSecurityTextResult /// - [DataContract] - public partial class OCRSecurityTextResult : AuthenticityCheckResultItem, IEquatable, IValidatableObject + public partial class OCRSecurityTextResult : AuthenticityCheckResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected OCRSecurityTextResult() { } - /// - /// Initializes a new instance of the class. - /// - /// criticalFlag. - /// lightType. - /// fieldRect. - /// etalonResultType. - /// etalonFieldType. - /// etalonLightType. - /// securityTextResultOCR. - /// etalonResultOCR. - /// reserved1. - /// reserved2. - public OCRSecurityTextResult(int criticalFlag = default(int), int lightType = default(int), RectangleCoordinates fieldRect = default(RectangleCoordinates), int etalonResultType = default(int), int etalonFieldType = default(int), int etalonLightType = default(int), string securityTextResultOCR = default(string), string etalonResultOCR = default(string), int reserved1 = default(int), int reserved2 = default(int), int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + /// criticalFlag + /// lightType + /// fieldRect + /// etalonResultType + /// etalonFieldType + /// etalonLightType + /// etalonFieldRect + /// securityTextResultOCR + /// etalonResultOCR + /// elementResult + /// elementDiagnose + /// percentValue + /// reserved1 + /// reserved2 + [JsonConstructor] + public OCRSecurityTextResult(Critical criticalFlag, Light lightType, RectangleCoordinates fieldRect, int etalonResultType, int etalonFieldType, int etalonLightType, RectangleCoordinates etalonFieldRect, string securityTextResultOCR, string etalonResultOCR, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option reserved1 = default, Option reserved2 = default) : base(elementResult, elementDiagnose, percentValue) { - this.CriticalFlag = criticalFlag; - this.LightType = lightType; - this.FieldRect = fieldRect; - this.EtalonResultType = etalonResultType; - this.EtalonFieldType = etalonFieldType; - this.EtalonLightType = etalonLightType; - this.SecurityTextResultOCR = securityTextResultOCR; - this.EtalonResultOCR = etalonResultOCR; - this.Reserved1 = reserved1; - this.Reserved2 = reserved2; + CriticalFlag = criticalFlag; + LightType = lightType; + FieldRect = fieldRect; + EtalonResultType = etalonResultType; + EtalonFieldType = etalonFieldType; + EtalonLightType = etalonLightType; + EtalonFieldRect = etalonFieldRect; + SecurityTextResultOCR = securityTextResultOCR; + EtalonResultOCR = etalonResultOCR; + Reserved1Option = reserved1; + Reserved2Option = reserved2; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets CriticalFlag /// - [DataMember(Name="CriticalFlag", EmitDefaultValue=false)] - public int CriticalFlag { get; set; } + [JsonPropertyName("CriticalFlag")] + public Critical CriticalFlag { get; set; } /// /// Gets or Sets LightType /// - [DataMember(Name="LightType", EmitDefaultValue=false)] - public int LightType { get; set; } + [JsonPropertyName("LightType")] + public Light LightType { get; set; } /// /// Gets or Sets FieldRect /// - [DataMember(Name="FieldRect", EmitDefaultValue=false)] + [JsonPropertyName("FieldRect")] public RectangleCoordinates FieldRect { get; set; } /// /// Gets or Sets EtalonResultType /// - [DataMember(Name="EtalonResultType", EmitDefaultValue=false)] + [JsonPropertyName("EtalonResultType")] public int EtalonResultType { get; set; } /// /// Gets or Sets EtalonFieldType /// - [DataMember(Name="EtalonFieldType", EmitDefaultValue=false)] + [JsonPropertyName("EtalonFieldType")] public int EtalonFieldType { get; set; } /// /// Gets or Sets EtalonLightType /// - [DataMember(Name="EtalonLightType", EmitDefaultValue=false)] + [JsonPropertyName("EtalonLightType")] public int EtalonLightType { get; set; } + /// + /// Gets or Sets EtalonFieldRect + /// + [JsonPropertyName("EtalonFieldRect")] + public RectangleCoordinates EtalonFieldRect { get; set; } + /// /// Gets or Sets SecurityTextResultOCR /// - [DataMember(Name="SecurityTextResultOCR", EmitDefaultValue=false)] + [JsonPropertyName("SecurityTextResultOCR")] public string SecurityTextResultOCR { get; set; } /// /// Gets or Sets EtalonResultOCR /// - [DataMember(Name="EtalonResultOCR", EmitDefaultValue=false)] + [JsonPropertyName("EtalonResultOCR")] public string EtalonResultOCR { get; set; } + /// + /// Used to track the state of Reserved1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved1Option { get; private set; } + /// /// Gets or Sets Reserved1 /// - [DataMember(Name="Reserved1", EmitDefaultValue=false)] - public int Reserved1 { get; set; } + [JsonPropertyName("Reserved1")] + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + + /// + /// Used to track the state of Reserved2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved2Option { get; private set; } /// /// Gets or Sets Reserved2 /// - [DataMember(Name="Reserved2", EmitDefaultValue=false)] - public int Reserved2 { get; set; } + [JsonPropertyName("Reserved2")] + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Returns the string presentation of the object @@ -128,15 +152,16 @@ protected OCRSecurityTextResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class OCRSecurityTextResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" CriticalFlag: ").Append(CriticalFlag).Append("\n"); sb.Append(" LightType: ").Append(LightType).Append("\n"); sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); sb.Append(" EtalonResultType: ").Append(EtalonResultType).Append("\n"); sb.Append(" EtalonFieldType: ").Append(EtalonFieldType).Append("\n"); sb.Append(" EtalonLightType: ").Append(EtalonLightType).Append("\n"); + sb.Append(" EtalonFieldRect: ").Append(EtalonFieldRect).Append("\n"); sb.Append(" SecurityTextResultOCR: ").Append(SecurityTextResultOCR).Append("\n"); sb.Append(" EtalonResultOCR: ").Append(EtalonResultOCR).Append("\n"); sb.Append(" Reserved1: ").Append(Reserved1).Append("\n"); @@ -144,132 +169,283 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class OCRSecurityTextResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override OCRSecurityTextResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as OCRSecurityTextResult); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option criticalFlag = default; + Option lightType = default; + Option fieldRect = default; + Option etalonResultType = default; + Option etalonFieldType = default; + Option etalonLightType = default; + Option etalonFieldRect = default; + Option securityTextResultOCR = default; + Option etalonResultOCR = default; + Option type = default; + Option elementResult = default; + Option elementDiagnose = default; + Option percentValue = default; + Option reserved1 = default; + Option reserved2 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "CriticalFlag": + string? criticalFlagRawValue = utf8JsonReader.GetString(); + if (criticalFlagRawValue != null) + criticalFlag = new Option(CriticalValueConverter.FromStringOrDefault(criticalFlagRawValue)); + break; + case "LightType": + string? lightTypeRawValue = utf8JsonReader.GetString(); + if (lightTypeRawValue != null) + lightType = new Option(LightValueConverter.FromStringOrDefault(lightTypeRawValue)); + break; + case "FieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "EtalonResultType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonResultType = new Option(utf8JsonReader.GetInt32()); + break; + case "EtalonFieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonFieldType = new Option(utf8JsonReader.GetInt32()); + break; + case "EtalonLightType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonLightType = new Option(utf8JsonReader.GetInt32()); + break; + case "EtalonFieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + etalonFieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SecurityTextResultOCR": + securityTextResultOCR = new Option(utf8JsonReader.GetString()!); + break; + case "EtalonResultOCR": + etalonResultOCR = new Option(utf8JsonReader.GetString()!); + break; + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + case "ElementResult": + string? elementResultRawValue = utf8JsonReader.GetString(); + if (elementResultRawValue != null) + elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); + break; + case "ElementDiagnose": + string? elementDiagnoseRawValue = utf8JsonReader.GetString(); + if (elementDiagnoseRawValue != null) + elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); + break; + case "PercentValue": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + percentValue = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved1 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!criticalFlag.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(criticalFlag)); + + if (!lightType.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(lightType)); + + if (!fieldRect.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(fieldRect)); + + if (!etalonResultType.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonResultType)); + + if (!etalonFieldType.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonFieldType)); + + if (!etalonLightType.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonLightType)); + + if (!etalonFieldRect.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonFieldRect)); + + if (!securityTextResultOCR.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(securityTextResultOCR)); + + if (!etalonResultOCR.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonResultOCR)); + + if (!type.IsSet) + throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(type)); + + if (criticalFlag.IsSet && criticalFlag.Value == null) + throw new ArgumentNullException(nameof(criticalFlag), "Property is not nullable for class OCRSecurityTextResult."); + + if (lightType.IsSet && lightType.Value == null) + throw new ArgumentNullException(nameof(lightType), "Property is not nullable for class OCRSecurityTextResult."); + + if (fieldRect.IsSet && fieldRect.Value == null) + throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class OCRSecurityTextResult."); + + if (etalonResultType.IsSet && etalonResultType.Value == null) + throw new ArgumentNullException(nameof(etalonResultType), "Property is not nullable for class OCRSecurityTextResult."); + + if (etalonFieldType.IsSet && etalonFieldType.Value == null) + throw new ArgumentNullException(nameof(etalonFieldType), "Property is not nullable for class OCRSecurityTextResult."); + + if (etalonLightType.IsSet && etalonLightType.Value == null) + throw new ArgumentNullException(nameof(etalonLightType), "Property is not nullable for class OCRSecurityTextResult."); + + if (etalonFieldRect.IsSet && etalonFieldRect.Value == null) + throw new ArgumentNullException(nameof(etalonFieldRect), "Property is not nullable for class OCRSecurityTextResult."); + + if (securityTextResultOCR.IsSet && securityTextResultOCR.Value == null) + throw new ArgumentNullException(nameof(securityTextResultOCR), "Property is not nullable for class OCRSecurityTextResult."); + + if (etalonResultOCR.IsSet && etalonResultOCR.Value == null) + throw new ArgumentNullException(nameof(etalonResultOCR), "Property is not nullable for class OCRSecurityTextResult."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class OCRSecurityTextResult."); + + if (elementResult.IsSet && elementResult.Value == null) + throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class OCRSecurityTextResult."); + + if (elementDiagnose.IsSet && elementDiagnose.Value == null) + throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class OCRSecurityTextResult."); + + if (percentValue.IsSet && percentValue.Value == null) + throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class OCRSecurityTextResult."); + + if (reserved1.IsSet && reserved1.Value == null) + throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class OCRSecurityTextResult."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class OCRSecurityTextResult."); + + return new OCRSecurityTextResult(criticalFlag.Value!.Value!, lightType.Value!.Value!, fieldRect.Value!, etalonResultType.Value!.Value!, etalonFieldType.Value!.Value!, etalonLightType.Value!.Value!, etalonFieldRect.Value!, securityTextResultOCR.Value!, etalonResultOCR.Value!, elementResult, elementDiagnose, percentValue, reserved1, reserved2); } /// - /// Returns true if OCRSecurityTextResult instances are equal + /// Serializes a /// - /// Instance of OCRSecurityTextResult to be compared - /// Boolean - public bool Equals(OCRSecurityTextResult input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OCRSecurityTextResult oCRSecurityTextResult, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.CriticalFlag == input.CriticalFlag || - (this.CriticalFlag != null && - this.CriticalFlag.Equals(input.CriticalFlag)) - ) && base.Equals(input) && - ( - this.LightType == input.LightType || - (this.LightType != null && - this.LightType.Equals(input.LightType)) - ) && base.Equals(input) && - ( - this.FieldRect == input.FieldRect || - (this.FieldRect != null && - this.FieldRect.Equals(input.FieldRect)) - ) && base.Equals(input) && - ( - this.EtalonResultType == input.EtalonResultType || - (this.EtalonResultType != null && - this.EtalonResultType.Equals(input.EtalonResultType)) - ) && base.Equals(input) && - ( - this.EtalonFieldType == input.EtalonFieldType || - (this.EtalonFieldType != null && - this.EtalonFieldType.Equals(input.EtalonFieldType)) - ) && base.Equals(input) && - ( - this.EtalonLightType == input.EtalonLightType || - (this.EtalonLightType != null && - this.EtalonLightType.Equals(input.EtalonLightType)) - ) && base.Equals(input) && - ( - this.SecurityTextResultOCR == input.SecurityTextResultOCR || - (this.SecurityTextResultOCR != null && - this.SecurityTextResultOCR.Equals(input.SecurityTextResultOCR)) - ) && base.Equals(input) && - ( - this.EtalonResultOCR == input.EtalonResultOCR || - (this.EtalonResultOCR != null && - this.EtalonResultOCR.Equals(input.EtalonResultOCR)) - ) && base.Equals(input) && - ( - this.Reserved1 == input.Reserved1 || - (this.Reserved1 != null && - this.Reserved1.Equals(input.Reserved1)) - ) && base.Equals(input) && - ( - this.Reserved2 == input.Reserved2 || - (this.Reserved2 != null && - this.Reserved2.Equals(input.Reserved2)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, oCRSecurityTextResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, OCRSecurityTextResult oCRSecurityTextResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (oCRSecurityTextResult.FieldRect == null) + throw new ArgumentNullException(nameof(oCRSecurityTextResult.FieldRect), "Property is required for class OCRSecurityTextResult."); + + if (oCRSecurityTextResult.EtalonFieldRect == null) + throw new ArgumentNullException(nameof(oCRSecurityTextResult.EtalonFieldRect), "Property is required for class OCRSecurityTextResult."); + + if (oCRSecurityTextResult.SecurityTextResultOCR == null) + throw new ArgumentNullException(nameof(oCRSecurityTextResult.SecurityTextResultOCR), "Property is required for class OCRSecurityTextResult."); + + if (oCRSecurityTextResult.EtalonResultOCR == null) + throw new ArgumentNullException(nameof(oCRSecurityTextResult.EtalonResultOCR), "Property is required for class OCRSecurityTextResult."); + + var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(oCRSecurityTextResult.CriticalFlag); + writer.WriteNumber("CriticalFlag", criticalFlagRawValue); + + var lightTypeRawValue = LightValueConverter.ToJsonValue(oCRSecurityTextResult.LightType); + writer.WriteNumber("LightType", lightTypeRawValue); + + writer.WritePropertyName("FieldRect"); + JsonSerializer.Serialize(writer, oCRSecurityTextResult.FieldRect, jsonSerializerOptions); + writer.WriteNumber("EtalonResultType", oCRSecurityTextResult.EtalonResultType); + + writer.WriteNumber("EtalonFieldType", oCRSecurityTextResult.EtalonFieldType); + + writer.WriteNumber("EtalonLightType", oCRSecurityTextResult.EtalonLightType); + + writer.WritePropertyName("EtalonFieldRect"); + JsonSerializer.Serialize(writer, oCRSecurityTextResult.EtalonFieldRect, jsonSerializerOptions); + writer.WriteString("SecurityTextResultOCR", oCRSecurityTextResult.SecurityTextResultOCR); + + writer.WriteString("EtalonResultOCR", oCRSecurityTextResult.EtalonResultOCR); + + writer.WriteString("Type", oCRSecurityTextResult.Type); + + if (oCRSecurityTextResult.ElementResultOption.IsSet) { - int hashCode = base.GetHashCode(); - if (this.CriticalFlag != null) - hashCode = hashCode * 59 + this.CriticalFlag.GetHashCode(); - if (this.LightType != null) - hashCode = hashCode * 59 + this.LightType.GetHashCode(); - if (this.FieldRect != null) - hashCode = hashCode * 59 + this.FieldRect.GetHashCode(); - if (this.EtalonResultType != null) - hashCode = hashCode * 59 + this.EtalonResultType.GetHashCode(); - if (this.EtalonFieldType != null) - hashCode = hashCode * 59 + this.EtalonFieldType.GetHashCode(); - if (this.EtalonLightType != null) - hashCode = hashCode * 59 + this.EtalonLightType.GetHashCode(); - if (this.SecurityTextResultOCR != null) - hashCode = hashCode * 59 + this.SecurityTextResultOCR.GetHashCode(); - if (this.EtalonResultOCR != null) - hashCode = hashCode * 59 + this.EtalonResultOCR.GetHashCode(); - if (this.Reserved1 != null) - hashCode = hashCode * 59 + this.Reserved1.GetHashCode(); - if (this.Reserved2 != null) - hashCode = hashCode * 59 + this.Reserved2.GetHashCode(); - return hashCode; + var elementResultRawValue = CheckResultValueConverter.ToJsonValue(oCRSecurityTextResult.ElementResult!.Value); + writer.WriteNumber("ElementResult", elementResultRawValue); } - } + if (oCRSecurityTextResult.ElementDiagnoseOption.IsSet) + { + var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(oCRSecurityTextResult.ElementDiagnose!.Value); + writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); + } + if (oCRSecurityTextResult.PercentValueOption.IsSet) + writer.WriteNumber("PercentValue", oCRSecurityTextResult.PercentValueOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (oCRSecurityTextResult.Reserved1Option.IsSet) + writer.WriteNumber("Reserved1", oCRSecurityTextResult.Reserved1Option.Value!.Value); + + if (oCRSecurityTextResult.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", oCRSecurityTextResult.Reserved2Option.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs index bb5232d..ffd9292 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs @@ -1,273 +1,437 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains information about one document type candidate /// - [DataContract] - public partial class OneCandidate : IEquatable, IValidatableObject + public partial class OneCandidate : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Document name. - /// Unique document type template identifier (Regula's internal numeric code). - /// A measure of the likelihood of correct recognition in the analysis of this type of document. - /// rFIDPresence. - /// fDSIDList. - /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document. - /// Set of authentication options provided for this type of document (combination of Authenticity enum). - /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme. - /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity. - public OneCandidate(string documentName = default(string), int iD = default(int), decimal p = default(decimal), int rFIDPresence = default(int), FDSIDList fDSIDList = default(FDSIDList), int necessaryLights = default(int), int checkAuthenticity = default(int), int uVExp = default(int), int authenticityNecessaryLights = default(int)) + /// Document name + /// Unique document type template identifier (Regula's internal numeric code) + /// A measure of the likelihood of correct recognition in the analysis of this type of document + /// true if the document of the given type is rotated by 180 degrees + /// rFIDPresence + /// fDSIDList + /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document + /// Set of authentication options provided for this type of document (combination of Authenticity enum) + /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme + /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity + /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme + /// rotationAngle + [JsonConstructor] + public OneCandidate(string documentName, int iD, decimal p, int rotated180, RfidLocation rFIDPresence, FDSIDList fDSIDList, int necessaryLights, int checkAuthenticity, int uVExp, int authenticityNecessaryLights, decimal oVIExp, Option rotationAngle = default) { - this.DocumentName = documentName; - this.ID = iD; - this.P = p; - this.RFIDPresence = rFIDPresence; - this.FDSIDList = fDSIDList; - this.NecessaryLights = necessaryLights; - this.CheckAuthenticity = checkAuthenticity; - this.UVExp = uVExp; - this.AuthenticityNecessaryLights = authenticityNecessaryLights; + DocumentName = documentName; + ID = iD; + P = p; + Rotated180 = rotated180; + RFIDPresence = rFIDPresence; + FDSIDList = fDSIDList; + NecessaryLights = necessaryLights; + CheckAuthenticity = checkAuthenticity; + UVExp = uVExp; + AuthenticityNecessaryLights = authenticityNecessaryLights; + OVIExp = oVIExp; + RotationAngleOption = rotationAngle; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Gets or Sets RFIDPresence + /// + [JsonPropertyName("RFID_Presence")] + public RfidLocation RFIDPresence { get; set; } + /// /// Document name /// /// Document name - [DataMember(Name="DocumentName", EmitDefaultValue=false)] + [JsonPropertyName("DocumentName")] public string DocumentName { get; set; } /// /// Unique document type template identifier (Regula's internal numeric code) /// /// Unique document type template identifier (Regula's internal numeric code) - [DataMember(Name="ID", EmitDefaultValue=false)] + [JsonPropertyName("ID")] public int ID { get; set; } /// /// A measure of the likelihood of correct recognition in the analysis of this type of document /// /// A measure of the likelihood of correct recognition in the analysis of this type of document - [DataMember(Name="P", EmitDefaultValue=false)] + /* 0.9913095831871032 */ + [JsonPropertyName("P")] public decimal P { get; set; } /// - /// Gets or Sets RFIDPresence + /// true if the document of the given type is rotated by 180 degrees /// - [DataMember(Name="RFID_Presence", EmitDefaultValue=false)] - public int RFIDPresence { get; set; } + /// true if the document of the given type is rotated by 180 degrees + [JsonPropertyName("Rotated180")] + public int Rotated180 { get; set; } /// /// Gets or Sets FDSIDList /// - [DataMember(Name="FDSIDList", EmitDefaultValue=false)] + [JsonPropertyName("FDSIDList")] public FDSIDList FDSIDList { get; set; } /// /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document /// /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document - [DataMember(Name="NecessaryLights", EmitDefaultValue=false)] + [JsonPropertyName("NecessaryLights")] public int NecessaryLights { get; set; } /// /// Set of authentication options provided for this type of document (combination of Authenticity enum) /// /// Set of authentication options provided for this type of document (combination of Authenticity enum) - [DataMember(Name="CheckAuthenticity", EmitDefaultValue=false)] + [JsonPropertyName("CheckAuthenticity")] public int CheckAuthenticity { get; set; } /// /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme /// /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme - [DataMember(Name="UVExp", EmitDefaultValue=false)] + [JsonPropertyName("UVExp")] public int UVExp { get; set; } /// /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity /// /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity - [DataMember(Name="AuthenticityNecessaryLights", EmitDefaultValue=false)] + [JsonPropertyName("AuthenticityNecessaryLights")] public int AuthenticityNecessaryLights { get; set; } + /// + /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme + /// + /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme + [JsonPropertyName("OVIExp")] + public decimal OVIExp { get; set; } + + /// + /// Used to track the state of RotationAngle + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RotationAngleOption { get; private set; } + + /// + /// Gets or Sets RotationAngle + /// + [JsonPropertyName("RotationAngle")] + public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class OneCandidate {\n"); sb.Append(" DocumentName: ").Append(DocumentName).Append("\n"); sb.Append(" ID: ").Append(ID).Append("\n"); sb.Append(" P: ").Append(P).Append("\n"); + sb.Append(" Rotated180: ").Append(Rotated180).Append("\n"); sb.Append(" RFIDPresence: ").Append(RFIDPresence).Append("\n"); sb.Append(" FDSIDList: ").Append(FDSIDList).Append("\n"); sb.Append(" NecessaryLights: ").Append(NecessaryLights).Append("\n"); sb.Append(" CheckAuthenticity: ").Append(CheckAuthenticity).Append("\n"); sb.Append(" UVExp: ").Append(UVExp).Append("\n"); sb.Append(" AuthenticityNecessaryLights: ").Append(AuthenticityNecessaryLights).Append("\n"); + sb.Append(" OVIExp: ").Append(OVIExp).Append("\n"); + sb.Append(" RotationAngle: ").Append(RotationAngle).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as OneCandidate); + // P (decimal) maximum + if (this.P > (decimal)1) + { + yield return new ValidationResult("Invalid value for P, must be a value less than or equal to 1.", new [] { "P" }); + } + + // P (decimal) minimum + if (this.P < (decimal)0) + { + yield return new ValidationResult("Invalid value for P, must be a value greater than or equal to 0.", new [] { "P" }); + } + + yield break; } + } + /// + /// A Json converter for type + /// + public class OneCandidateJsonConverter : JsonConverter + { /// - /// Returns true if OneCandidate instances are equal + /// Deserializes json to /// - /// Instance of OneCandidate to be compared - /// Boolean - public bool Equals(OneCandidate input) + /// + /// + /// + /// + /// + public override OneCandidate Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.DocumentName == input.DocumentName || - (this.DocumentName != null && - this.DocumentName.Equals(input.DocumentName)) - ) && - ( - this.ID == input.ID || - (this.ID != null && - this.ID.Equals(input.ID)) - ) && - ( - this.P == input.P || - (this.P != null && - this.P.Equals(input.P)) - ) && - ( - this.RFIDPresence == input.RFIDPresence || - (this.RFIDPresence != null && - this.RFIDPresence.Equals(input.RFIDPresence)) - ) && - ( - this.FDSIDList == input.FDSIDList || - (this.FDSIDList != null && - this.FDSIDList.Equals(input.FDSIDList)) - ) && - ( - this.NecessaryLights == input.NecessaryLights || - (this.NecessaryLights != null && - this.NecessaryLights.Equals(input.NecessaryLights)) - ) && - ( - this.CheckAuthenticity == input.CheckAuthenticity || - (this.CheckAuthenticity != null && - this.CheckAuthenticity.Equals(input.CheckAuthenticity)) - ) && - ( - this.UVExp == input.UVExp || - (this.UVExp != null && - this.UVExp.Equals(input.UVExp)) - ) && - ( - this.AuthenticityNecessaryLights == input.AuthenticityNecessaryLights || - (this.AuthenticityNecessaryLights != null && - this.AuthenticityNecessaryLights.Equals(input.AuthenticityNecessaryLights)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option documentName = default; + Option iD = default; + Option p = default; + Option rotated180 = default; + Option rFIDPresence = default; + Option fDSIDList = default; + Option necessaryLights = default; + Option checkAuthenticity = default; + Option uVExp = default; + Option authenticityNecessaryLights = default; + Option oVIExp = default; + Option rotationAngle = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocumentName": + documentName = new Option(utf8JsonReader.GetString()!); + break; + case "ID": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + iD = new Option(utf8JsonReader.GetInt32()); + break; + case "P": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + p = new Option(utf8JsonReader.GetDecimal()); + break; + case "Rotated180": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rotated180 = new Option(utf8JsonReader.GetInt32()); + break; + case "RFID_Presence": + string? rFIDPresenceRawValue = utf8JsonReader.GetString(); + if (rFIDPresenceRawValue != null) + rFIDPresence = new Option(RfidLocationValueConverter.FromStringOrDefault(rFIDPresenceRawValue)); + break; + case "FDSIDList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fDSIDList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "NecessaryLights": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + necessaryLights = new Option(utf8JsonReader.GetInt32()); + break; + case "CheckAuthenticity": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkAuthenticity = new Option(utf8JsonReader.GetInt32()); + break; + case "UVExp": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + uVExp = new Option(utf8JsonReader.GetInt32()); + break; + case "AuthenticityNecessaryLights": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + authenticityNecessaryLights = new Option(utf8JsonReader.GetInt32()); + break; + case "OVIExp": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + oVIExp = new Option(utf8JsonReader.GetDecimal()); + break; + case "RotationAngle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rotationAngle = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!documentName.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(documentName)); + + if (!iD.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(iD)); + + if (!p.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(p)); + + if (!rotated180.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(rotated180)); + + if (!rFIDPresence.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(rFIDPresence)); + + if (!fDSIDList.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(fDSIDList)); + + if (!necessaryLights.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(necessaryLights)); + + if (!checkAuthenticity.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(checkAuthenticity)); + + if (!uVExp.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(uVExp)); + + if (!authenticityNecessaryLights.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(authenticityNecessaryLights)); + + if (!oVIExp.IsSet) + throw new ArgumentException("Property is required for class OneCandidate.", nameof(oVIExp)); + + if (documentName.IsSet && documentName.Value == null) + throw new ArgumentNullException(nameof(documentName), "Property is not nullable for class OneCandidate."); + + if (iD.IsSet && iD.Value == null) + throw new ArgumentNullException(nameof(iD), "Property is not nullable for class OneCandidate."); + + if (p.IsSet && p.Value == null) + throw new ArgumentNullException(nameof(p), "Property is not nullable for class OneCandidate."); + + if (rotated180.IsSet && rotated180.Value == null) + throw new ArgumentNullException(nameof(rotated180), "Property is not nullable for class OneCandidate."); + + if (rFIDPresence.IsSet && rFIDPresence.Value == null) + throw new ArgumentNullException(nameof(rFIDPresence), "Property is not nullable for class OneCandidate."); + + if (fDSIDList.IsSet && fDSIDList.Value == null) + throw new ArgumentNullException(nameof(fDSIDList), "Property is not nullable for class OneCandidate."); + + if (necessaryLights.IsSet && necessaryLights.Value == null) + throw new ArgumentNullException(nameof(necessaryLights), "Property is not nullable for class OneCandidate."); + + if (checkAuthenticity.IsSet && checkAuthenticity.Value == null) + throw new ArgumentNullException(nameof(checkAuthenticity), "Property is not nullable for class OneCandidate."); + + if (uVExp.IsSet && uVExp.Value == null) + throw new ArgumentNullException(nameof(uVExp), "Property is not nullable for class OneCandidate."); + + if (authenticityNecessaryLights.IsSet && authenticityNecessaryLights.Value == null) + throw new ArgumentNullException(nameof(authenticityNecessaryLights), "Property is not nullable for class OneCandidate."); + + if (oVIExp.IsSet && oVIExp.Value == null) + throw new ArgumentNullException(nameof(oVIExp), "Property is not nullable for class OneCandidate."); + + if (rotationAngle.IsSet && rotationAngle.Value == null) + throw new ArgumentNullException(nameof(rotationAngle), "Property is not nullable for class OneCandidate."); + + return new OneCandidate(documentName.Value!, iD.Value!.Value!, p.Value!.Value!, rotated180.Value!.Value!, rFIDPresence.Value!.Value!, fDSIDList.Value!, necessaryLights.Value!.Value!, checkAuthenticity.Value!.Value!, uVExp.Value!.Value!, authenticityNecessaryLights.Value!.Value!, oVIExp.Value!.Value!, rotationAngle); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OneCandidate oneCandidate, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.DocumentName != null) - hashCode = hashCode * 59 + this.DocumentName.GetHashCode(); - if (this.ID != null) - hashCode = hashCode * 59 + this.ID.GetHashCode(); - if (this.P != null) - hashCode = hashCode * 59 + this.P.GetHashCode(); - if (this.RFIDPresence != null) - hashCode = hashCode * 59 + this.RFIDPresence.GetHashCode(); - if (this.FDSIDList != null) - hashCode = hashCode * 59 + this.FDSIDList.GetHashCode(); - if (this.NecessaryLights != null) - hashCode = hashCode * 59 + this.NecessaryLights.GetHashCode(); - if (this.CheckAuthenticity != null) - hashCode = hashCode * 59 + this.CheckAuthenticity.GetHashCode(); - if (this.UVExp != null) - hashCode = hashCode * 59 + this.UVExp.GetHashCode(); - if (this.AuthenticityNecessaryLights != null) - hashCode = hashCode * 59 + this.AuthenticityNecessaryLights.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, oneCandidate, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, OneCandidate oneCandidate, JsonSerializerOptions jsonSerializerOptions) { + if (oneCandidate.DocumentName == null) + throw new ArgumentNullException(nameof(oneCandidate.DocumentName), "Property is required for class OneCandidate."); - - // P (decimal) maximum - if(this.P > (decimal)1) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for P, must be a value less than or equal to 1.", new [] { "P" }); - } + if (oneCandidate.FDSIDList == null) + throw new ArgumentNullException(nameof(oneCandidate.FDSIDList), "Property is required for class OneCandidate."); - // P (decimal) minimum - if(this.P < (decimal)0) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for P, must be a value greater than or equal to 0.", new [] { "P" }); - } + writer.WriteString("DocumentName", oneCandidate.DocumentName); - yield break; + writer.WriteNumber("ID", oneCandidate.ID); + + writer.WriteNumber("P", oneCandidate.P); + + writer.WriteNumber("Rotated180", oneCandidate.Rotated180); + + var rFIDPresenceRawValue = RfidLocationValueConverter.ToJsonValue(oneCandidate.RFIDPresence); + writer.WriteNumber("RFID_Presence", rFIDPresenceRawValue); + + writer.WritePropertyName("FDSIDList"); + JsonSerializer.Serialize(writer, oneCandidate.FDSIDList, jsonSerializerOptions); + writer.WriteNumber("NecessaryLights", oneCandidate.NecessaryLights); + + writer.WriteNumber("CheckAuthenticity", oneCandidate.CheckAuthenticity); + + writer.WriteNumber("UVExp", oneCandidate.UVExp); + + writer.WriteNumber("AuthenticityNecessaryLights", oneCandidate.AuthenticityNecessaryLights); + + writer.WriteNumber("OVIExp", oneCandidate.OVIExp); + + if (oneCandidate.RotationAngleOption.IsSet) + writer.WriteNumber("RotationAngle", oneCandidate.RotationAngleOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs new file mode 100644 index 0000000..faa4fb4 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs @@ -0,0 +1,193 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// OneCandidateItem + /// + public partial class OneCandidateItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// oneCandidate + /// xMLBuffer + [JsonConstructor] + public OneCandidateItem(OneCandidate oneCandidate, Option xMLBuffer = default) + { + OneCandidate = oneCandidate; + XMLBufferOption = xMLBuffer; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets OneCandidate + /// + [JsonPropertyName("OneCandidate")] + public OneCandidate OneCandidate { get; set; } + + /// + /// Used to track the state of XMLBuffer + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option XMLBufferOption { get; } + + /// + /// Gets or Sets XMLBuffer + /// + [JsonPropertyName("XML_buffer")] + public string? XMLBuffer { get { return this.XMLBufferOption; } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class OneCandidateItem {\n"); + sb.Append(" OneCandidate: ").Append(OneCandidate).Append("\n"); + sb.Append(" XMLBuffer: ").Append(XMLBuffer).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class OneCandidateItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override OneCandidateItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option oneCandidate = default; + Option xMLBuffer = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "OneCandidate": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + oneCandidate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "XML_buffer": + xMLBuffer = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!oneCandidate.IsSet) + throw new ArgumentException("Property is required for class OneCandidateItem.", nameof(oneCandidate)); + + if (oneCandidate.IsSet && oneCandidate.Value == null) + throw new ArgumentNullException(nameof(oneCandidate), "Property is not nullable for class OneCandidateItem."); + + if (xMLBuffer.IsSet && xMLBuffer.Value == null) + throw new ArgumentNullException(nameof(xMLBuffer), "Property is not nullable for class OneCandidateItem."); + + return new OneCandidateItem(oneCandidate.Value!, xMLBuffer); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OneCandidateItem oneCandidateItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, oneCandidateItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, OneCandidateItem oneCandidateItem, JsonSerializerOptions jsonSerializerOptions) + { + if (oneCandidateItem.OneCandidate == null) + throw new ArgumentNullException(nameof(oneCandidateItem.OneCandidate), "Property is required for class OneCandidateItem."); + + if (oneCandidateItem.XMLBufferOption.IsSet && oneCandidateItem.XMLBuffer == null) + throw new ArgumentNullException(nameof(oneCandidateItem.XMLBuffer), "Property is required for class OneCandidateItem."); + + writer.WritePropertyName("OneCandidate"); + JsonSerializer.Serialize(writer, oneCandidateItem.OneCandidate, jsonSerializerOptions); + if (oneCandidateItem.XMLBufferOption.IsSet) + writer.WriteString("XML_buffer", oneCandidateItem.XMLBuffer); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/OriginalGraphicsResult.cs b/src/Regula.DocumentReader.WebClient/Model/OriginalGraphicsResult.cs deleted file mode 100644 index bf0edf6..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/OriginalGraphicsResult.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// OriginalGraphicsResult - /// - [DataContract] - public partial class OriginalGraphicsResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Count of array fields. - /// pArrayFields. - public OriginalGraphicsResult(int nFields = default(int), List pArrayFields = default(List)) - { - this.NFields = nFields; - this.PArrayFields = pArrayFields; - } - - /// - /// Count of array fields - /// - /// Count of array fields - [DataMember(Name="nFields", EmitDefaultValue=false)] - public int NFields { get; set; } - - /// - /// Gets or Sets PArrayFields - /// - [DataMember(Name="pArrayFields", EmitDefaultValue=false)] - public List PArrayFields { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OriginalGraphicsResult {\n"); - sb.Append(" NFields: ").Append(NFields).Append("\n"); - sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OriginalGraphicsResult); - } - - /// - /// Returns true if OriginalGraphicsResult instances are equal - /// - /// Instance of OriginalGraphicsResult to be compared - /// Boolean - public bool Equals(OriginalGraphicsResult input) - { - if (input == null) - return false; - - return - ( - this.NFields == input.NFields || - (this.NFields != null && - this.NFields.Equals(input.NFields)) - ) && - ( - this.PArrayFields == input.PArrayFields || - this.PArrayFields != null && - input.PArrayFields != null && - this.PArrayFields.SequenceEqual(input.PArrayFields) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NFields != null) - hashCode = hashCode * 59 + this.NFields.GetHashCode(); - if (this.PArrayFields != null) - hashCode = hashCode * 59 + this.PArrayFields.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs index b304e9a..70243c9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs @@ -1,67 +1,78 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// OriginalSymbol /// - [DataContract] - public partial class OriginalSymbol : IEquatable, IValidatableObject + public partial class OriginalSymbol : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Unicode symbol code. - /// Probability of correctness reading of a single character. - /// rect. - public OriginalSymbol(long code = default(long), int probability = default(int), RectangleCoordinates rect = default(RectangleCoordinates)) + /// Unicode symbol code + /// Probability of correctness reading of a single character + /// rect + [JsonConstructor] + public OriginalSymbol(long code, int probability, Option rect = default) { - this.Code = code; - this.Probability = probability; - this.Rect = rect; + Code = code; + Probability = probability; + RectOption = rect; + OnCreated(); } - + + partial void OnCreated(); + /// /// Unicode symbol code /// /// Unicode symbol code - [DataMember(Name="code", EmitDefaultValue=false)] + [JsonPropertyName("code")] public long Code { get; set; } /// /// Probability of correctness reading of a single character /// /// Probability of correctness reading of a single character - [DataMember(Name="probability", EmitDefaultValue=false)] + [JsonPropertyName("probability")] public int Probability { get; set; } + /// + /// Used to track the state of Rect + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RectOption { get; private set; } + /// /// Gets or Sets Rect /// - [DataMember(Name="rect", EmitDefaultValue=false)] - public RectangleCoordinates Rect { get; set; } + [JsonPropertyName("rect")] + public RectangleCoordinates? Rect { get { return this.RectOption; } set { this.RectOption = new(value); } } /// /// Returns the string presentation of the object @@ -69,7 +80,7 @@ public partial class OriginalSymbol : IEquatable, IValidatableO /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class OriginalSymbol {\n"); sb.Append(" Code: ").Append(Code).Append("\n"); sb.Append(" Probability: ").Append(Probability).Append("\n"); @@ -77,96 +88,143 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as OriginalSymbol); + // Probability (int) maximum + if (this.Probability > (int)100) + { + yield return new ValidationResult("Invalid value for Probability, must be a value less than or equal to 100.", new [] { "Probability" }); + } + + // Probability (int) minimum + if (this.Probability < (int)0) + { + yield return new ValidationResult("Invalid value for Probability, must be a value greater than or equal to 0.", new [] { "Probability" }); + } + + yield break; } + } + /// + /// A Json converter for type + /// + public class OriginalSymbolJsonConverter : JsonConverter + { /// - /// Returns true if OriginalSymbol instances are equal + /// Deserializes json to /// - /// Instance of OriginalSymbol to be compared - /// Boolean - public bool Equals(OriginalSymbol input) + /// + /// + /// + /// + /// + public override OriginalSymbol Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Probability == input.Probability || - (this.Probability != null && - this.Probability.Equals(input.Probability)) - ) && - ( - this.Rect == input.Rect || - (this.Rect != null && - this.Rect.Equals(input.Rect)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option code = default; + Option probability = default; + Option rect = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "code": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + code = new Option(utf8JsonReader.GetInt64()); + break; + case "probability": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + probability = new Option(utf8JsonReader.GetInt32()); + break; + case "rect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!code.IsSet) + throw new ArgumentException("Property is required for class OriginalSymbol.", nameof(code)); + + if (!probability.IsSet) + throw new ArgumentException("Property is required for class OriginalSymbol.", nameof(probability)); + + if (code.IsSet && code.Value == null) + throw new ArgumentNullException(nameof(code), "Property is not nullable for class OriginalSymbol."); + + if (probability.IsSet && probability.Value == null) + throw new ArgumentNullException(nameof(probability), "Property is not nullable for class OriginalSymbol."); + + if (rect.IsSet && rect.Value == null) + throw new ArgumentNullException(nameof(rect), "Property is not nullable for class OriginalSymbol."); + + return new OriginalSymbol(code.Value!.Value!, probability.Value!.Value!, rect); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OriginalSymbol originalSymbol, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - hashCode = hashCode * 59 + this.Code.GetHashCode(); - if (this.Probability != null) - hashCode = hashCode * 59 + this.Probability.GetHashCode(); - if (this.Rect != null) - hashCode = hashCode * 59 + this.Rect.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, originalSymbol, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, OriginalSymbol originalSymbol, JsonSerializerOptions jsonSerializerOptions) { + if (originalSymbol.RectOption.IsSet && originalSymbol.Rect == null) + throw new ArgumentNullException(nameof(originalSymbol.Rect), "Property is required for class OriginalSymbol."); - - // Probability (int) maximum - if(this.Probability > (int)100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Probability, must be a value less than or equal to 100.", new [] { "Probability" }); - } + writer.WriteNumber("code", originalSymbol.Code); - // Probability (int) minimum - if(this.Probability < (int)0) + writer.WriteNumber("probability", originalSymbol.Probability); + + if (originalSymbol.RectOption.IsSet) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Probability, must be a value greater than or equal to 0.", new [] { "Probability" }); + writer.WritePropertyName("rect"); + JsonSerializer.Serialize(writer, originalSymbol.Rect, jsonSerializerOptions); } - - yield break; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/OutData.cs b/src/Regula.DocumentReader.WebClient/Model/OutData.cs index 07b1811..4f32df5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutData.cs @@ -1,58 +1,76 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// OutData /// - [DataContract] - public partial class OutData : IEquatable, IValidatableObject + public partial class OutData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Response url. - /// images. - public OutData(string url = default(string), List images = default(List)) + /// Response url + /// images + [JsonConstructor] + public OutData(Option url = default, Option?> images = default) { - this.Url = url; - this.Images = images; + UrlOption = url; + ImagesOption = images; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Url + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UrlOption { get; private set; } + /// /// Response url /// /// Response url - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } + [JsonPropertyName("url")] + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + + /// + /// Used to track the state of Images + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ImagesOption { get; private set; } /// /// Gets or Sets Images /// - [DataMember(Name="images", EmitDefaultValue=false)] - public List Images { get; set; } + [JsonPropertyName("images")] + public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new(value); } } /// /// Returns the string presentation of the object @@ -60,83 +78,125 @@ public partial class OutData : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class OutData {\n"); sb.Append(" Url: ").Append(Url).Append("\n"); sb.Append(" Images: ").Append(Images).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class OutDataJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override OutData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as OutData); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option url = default; + Option?> images = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "url": + url = new Option(utf8JsonReader.GetString()!); + break; + case "images": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + images = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (url.IsSet && url.Value == null) + throw new ArgumentNullException(nameof(url), "Property is not nullable for class OutData."); + + if (images.IsSet && images.Value == null) + throw new ArgumentNullException(nameof(images), "Property is not nullable for class OutData."); + + return new OutData(url, images); } /// - /// Returns true if OutData instances are equal + /// Serializes a /// - /// Instance of OutData to be compared - /// Boolean - public bool Equals(OutData input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OutData outData, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ) && - ( - this.Images == input.Images || - this.Images != null && - input.Images != null && - this.Images.SequenceEqual(input.Images) - ); + writer.WriteStartObject(); + + WriteProperties(writer, outData, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, OutData outData, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (outData.UrlOption.IsSet && outData.Url == null) + throw new ArgumentNullException(nameof(outData.Url), "Property is required for class OutData."); + + if (outData.ImagesOption.IsSet && outData.Images == null) + throw new ArgumentNullException(nameof(outData.Images), "Property is required for class OutData."); + + if (outData.UrlOption.IsSet) + writer.WriteString("url", outData.Url); + + if (outData.ImagesOption.IsSet) { - int hashCode = 41; - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - if (this.Images != null) - hashCode = hashCode * 59 + this.Images.GetHashCode(); - return hashCode; + writer.WritePropertyName("images"); + JsonSerializer.Serialize(writer, outData.Images, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs index 8b747da..247bf32 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs @@ -1,83 +1,122 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// OutDataTransactionImagesFieldValue /// - [DataContract] - public partial class OutDataTransactionImagesFieldValue : IEquatable, IValidatableObject + public partial class OutDataTransactionImagesFieldValue : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// fieldType. - /// light. - /// listIdx. - /// Page index of the image from input list. - /// Image url. - public OutDataTransactionImagesFieldValue(int fieldType = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), string url = default(string)) + /// fieldType + /// light + /// listIdx + /// Page index of the image from input list + /// Image url + [JsonConstructor] + public OutDataTransactionImagesFieldValue(Option fieldType = default, Option light = default, Option listIdx = default, Option pageIdx = default, Option url = default) { - this.FieldType = fieldType; - this.Light = light; - this.ListIdx = listIdx; - this.PageIdx = pageIdx; - this.Url = url; + FieldTypeOption = fieldType; + LightOption = light; + ListIdxOption = listIdx; + PageIdxOption = pageIdx; + UrlOption = url; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of FieldType + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldTypeOption { get; private set; } + /// /// Gets or Sets FieldType /// - [DataMember(Name="fieldType", EmitDefaultValue=false)] - public int FieldType { get; set; } + [JsonPropertyName("fieldType")] + public GraphicFieldType? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new(value); } } + + /// + /// Used to track the state of Light + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LightOption { get; private set; } /// /// Gets or Sets Light /// - [DataMember(Name="light", EmitDefaultValue=false)] - public int Light { get; set; } + [JsonPropertyName("light")] + public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } + + /// + /// Used to track the state of ListIdx + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ListIdxOption { get; private set; } /// /// Gets or Sets ListIdx /// - [DataMember(Name="listIdx", EmitDefaultValue=false)] - public int ListIdx { get; set; } + [JsonPropertyName("listIdx")] + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } + + /// + /// Used to track the state of PageIdx + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PageIdxOption { get; private set; } /// /// Page index of the image from input list /// /// Page index of the image from input list - [DataMember(Name="pageIdx", EmitDefaultValue=false)] - public int PageIdx { get; set; } + [JsonPropertyName("pageIdx")] + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } + + /// + /// Used to track the state of Url + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UrlOption { get; private set; } /// /// Image url /// /// Image url - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } + [JsonPropertyName("url")] + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } /// /// Returns the string presentation of the object @@ -85,7 +124,7 @@ public partial class OutDataTransactionImagesFieldValue : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class OutDataTransactionImagesFieldValue {\n"); sb.Append(" FieldType: ").Append(FieldType).Append("\n"); sb.Append(" Light: ").Append(Light).Append("\n"); @@ -95,96 +134,151 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class OutDataTransactionImagesFieldValueJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override OutDataTransactionImagesFieldValue Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as OutDataTransactionImagesFieldValue); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldType = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option url = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "fieldType": + string? fieldTypeRawValue = utf8JsonReader.GetString(); + if (fieldTypeRawValue != null) + fieldType = new Option(GraphicFieldTypeValueConverter.FromStringOrDefault(fieldTypeRawValue)); + break; + case "light": + string? lightRawValue = utf8JsonReader.GetString(); + if (lightRawValue != null) + light = new Option(LightValueConverter.FromStringOrDefault(lightRawValue)); + break; + case "listIdx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "pageIdx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "url": + url = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class OutDataTransactionImagesFieldValue."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class OutDataTransactionImagesFieldValue."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class OutDataTransactionImagesFieldValue."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class OutDataTransactionImagesFieldValue."); + + if (url.IsSet && url.Value == null) + throw new ArgumentNullException(nameof(url), "Property is not nullable for class OutDataTransactionImagesFieldValue."); + + return new OutDataTransactionImagesFieldValue(fieldType, light, listIdx, pageIdx, url); } /// - /// Returns true if OutDataTransactionImagesFieldValue instances are equal + /// Serializes a /// - /// Instance of OutDataTransactionImagesFieldValue to be compared - /// Boolean - public bool Equals(OutDataTransactionImagesFieldValue input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, OutDataTransactionImagesFieldValue outDataTransactionImagesFieldValue, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ) && - ( - this.Light == input.Light || - (this.Light != null && - this.Light.Equals(input.Light)) - ) && - ( - this.ListIdx == input.ListIdx || - (this.ListIdx != null && - this.ListIdx.Equals(input.ListIdx)) - ) && - ( - this.PageIdx == input.PageIdx || - (this.PageIdx != null && - this.PageIdx.Equals(input.PageIdx)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, outDataTransactionImagesFieldValue, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, OutDataTransactionImagesFieldValue outDataTransactionImagesFieldValue, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (outDataTransactionImagesFieldValue.UrlOption.IsSet && outDataTransactionImagesFieldValue.Url == null) + throw new ArgumentNullException(nameof(outDataTransactionImagesFieldValue.Url), "Property is required for class OutDataTransactionImagesFieldValue."); + + if (outDataTransactionImagesFieldValue.FieldTypeOption.IsSet) { - int hashCode = 41; - if (this.FieldType != null) - hashCode = hashCode * 59 + this.FieldType.GetHashCode(); - if (this.Light != null) - hashCode = hashCode * 59 + this.Light.GetHashCode(); - if (this.ListIdx != null) - hashCode = hashCode * 59 + this.ListIdx.GetHashCode(); - if (this.PageIdx != null) - hashCode = hashCode * 59 + this.PageIdx.GetHashCode(); - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - return hashCode; + var fieldTypeRawValue = GraphicFieldTypeValueConverter.ToJsonValue(outDataTransactionImagesFieldValue.FieldType!.Value); + writer.WriteNumber("fieldType", fieldTypeRawValue); } - } + if (outDataTransactionImagesFieldValue.LightOption.IsSet) + { + var lightRawValue = LightValueConverter.ToJsonValue(outDataTransactionImagesFieldValue.Light!.Value); + writer.WriteNumber("light", lightRawValue); + } + if (outDataTransactionImagesFieldValue.ListIdxOption.IsSet) + writer.WriteNumber("listIdx", outDataTransactionImagesFieldValue.ListIdxOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (outDataTransactionImagesFieldValue.PageIdxOption.IsSet) + writer.WriteNumber("pageIdx", outDataTransactionImagesFieldValue.PageIdxOption.Value!.Value); + + if (outDataTransactionImagesFieldValue.UrlOption.IsSet) + writer.WriteString("url", outDataTransactionImagesFieldValue.Url); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs index ef7e66b..c1387e5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs @@ -1,121 +1,146 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// PArrayField /// - [DataContract] - public partial class PArrayField : IEquatable, IValidatableObject + public partial class PArrayField : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// bcAngleDETECT. - /// bcCodeResult. - /// bcCountModule. - /// bcDataModule. - /// bcPDF417INFO. - /// bcROIDETECT. - /// bcTextDecoderTypes. - /// bcTextFieldType. - /// bcTypeDECODE. - /// bcTypeDETECT. - public PArrayField(float bcAngleDETECT = default(float), int bcCodeResult = default(int), int bcCountModule = default(int), List bcDataModule = default(List), BcPDF417INFO bcPDF417INFO = default(BcPDF417INFO), BcROIDETECT bcROIDETECT = default(BcROIDETECT), int bcTextDecoderTypes = default(int), int bcTextFieldType = default(int), int bcTypeDECODE = default(int), int bcTypeDETECT = default(int)) + /// bcAngleDETECT + /// bcCodeResult + /// bcCountModule + /// bcDataModule + /// bcROIDETECT + /// bcTypeDECODE + /// bcTypeDETECT + /// bcPDF417INFO + /// bcTextDecoderTypes + /// bcTextFieldType + [JsonConstructor] + public PArrayField(float bcAngleDETECT, int bcCodeResult, int bcCountModule, List bcDataModule, BcROIDETECT bcROIDETECT, BarcodeType bcTypeDECODE, int bcTypeDETECT, Option bcPDF417INFO = default, Option bcTextDecoderTypes = default, Option bcTextFieldType = default) { - this.BcAngleDETECT = bcAngleDETECT; - this.BcCodeResult = bcCodeResult; - this.BcCountModule = bcCountModule; - this.BcDataModule = bcDataModule; - this.BcPDF417INFO = bcPDF417INFO; - this.BcROIDETECT = bcROIDETECT; - this.BcTextDecoderTypes = bcTextDecoderTypes; - this.BcTextFieldType = bcTextFieldType; - this.BcTypeDECODE = bcTypeDECODE; - this.BcTypeDETECT = bcTypeDETECT; + BcAngleDETECT = bcAngleDETECT; + BcCodeResult = bcCodeResult; + BcCountModule = bcCountModule; + BcDataModule = bcDataModule; + BcROIDETECT = bcROIDETECT; + BcTypeDECODE = bcTypeDECODE; + BcTypeDETECT = bcTypeDETECT; + BcPDF417INFOOption = bcPDF417INFO; + BcTextDecoderTypesOption = bcTextDecoderTypes; + BcTextFieldTypeOption = bcTextFieldType; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Gets or Sets BcTypeDECODE + /// + [JsonPropertyName("bcType_DECODE")] + public BarcodeType BcTypeDECODE { get; set; } + /// /// Gets or Sets BcAngleDETECT /// - [DataMember(Name="bcAngle_DETECT", EmitDefaultValue=false)] + [JsonPropertyName("bcAngle_DETECT")] public float BcAngleDETECT { get; set; } /// /// Gets or Sets BcCodeResult /// - [DataMember(Name="bcCodeResult", EmitDefaultValue=false)] + [JsonPropertyName("bcCodeResult")] public int BcCodeResult { get; set; } /// /// Gets or Sets BcCountModule /// - [DataMember(Name="bcCountModule", EmitDefaultValue=false)] + [JsonPropertyName("bcCountModule")] public int BcCountModule { get; set; } /// /// Gets or Sets BcDataModule /// - [DataMember(Name="bcDataModule", EmitDefaultValue=false)] + [JsonPropertyName("bcDataModule")] public List BcDataModule { get; set; } /// - /// Gets or Sets BcPDF417INFO + /// Gets or Sets BcROIDETECT /// - [DataMember(Name="bcPDF417INFO", EmitDefaultValue=false)] - public BcPDF417INFO BcPDF417INFO { get; set; } + [JsonPropertyName("bcROI_DETECT")] + public BcROIDETECT BcROIDETECT { get; set; } /// - /// Gets or Sets BcROIDETECT + /// Gets or Sets BcTypeDETECT /// - [DataMember(Name="bcROI_DETECT", EmitDefaultValue=false)] - public BcROIDETECT BcROIDETECT { get; set; } + [JsonPropertyName("bcType_DETECT")] + public int BcTypeDETECT { get; set; } /// - /// Gets or Sets BcTextDecoderTypes + /// Used to track the state of BcPDF417INFO /// - [DataMember(Name="bcTextDecoderTypes", EmitDefaultValue=false)] - public int BcTextDecoderTypes { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BcPDF417INFOOption { get; private set; } /// - /// Gets or Sets BcTextFieldType + /// Gets or Sets BcPDF417INFO /// - [DataMember(Name="bcTextFieldType", EmitDefaultValue=false)] - public int BcTextFieldType { get; set; } + [JsonPropertyName("bcPDF417INFO")] + public BcPDF417INFO? BcPDF417INFO { get { return this.BcPDF417INFOOption; } set { this.BcPDF417INFOOption = new(value); } } /// - /// Gets or Sets BcTypeDECODE + /// Used to track the state of BcTextDecoderTypes /// - [DataMember(Name="bcType_DECODE", EmitDefaultValue=false)] - public int BcTypeDECODE { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BcTextDecoderTypesOption { get; private set; } /// - /// Gets or Sets BcTypeDETECT + /// Gets or Sets BcTextDecoderTypes /// - [DataMember(Name="bcType_DETECT", EmitDefaultValue=false)] - public int BcTypeDETECT { get; set; } + [JsonPropertyName("bcTextDecoderTypes")] + public int? BcTextDecoderTypes { get { return this.BcTextDecoderTypesOption; } set { this.BcTextDecoderTypesOption = new(value); } } + + /// + /// Used to track the state of BcTextFieldType + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BcTextFieldTypeOption { get; private set; } + + /// + /// Gets or Sets BcTextFieldType + /// + [JsonPropertyName("bcTextFieldType")] + public int? BcTextFieldType { get { return this.BcTextFieldTypeOption; } set { this.BcTextFieldTypeOption = new(value); } } /// /// Returns the string presentation of the object @@ -123,147 +148,240 @@ public partial class PArrayField : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class PArrayField {\n"); sb.Append(" BcAngleDETECT: ").Append(BcAngleDETECT).Append("\n"); sb.Append(" BcCodeResult: ").Append(BcCodeResult).Append("\n"); sb.Append(" BcCountModule: ").Append(BcCountModule).Append("\n"); sb.Append(" BcDataModule: ").Append(BcDataModule).Append("\n"); - sb.Append(" BcPDF417INFO: ").Append(BcPDF417INFO).Append("\n"); sb.Append(" BcROIDETECT: ").Append(BcROIDETECT).Append("\n"); - sb.Append(" BcTextDecoderTypes: ").Append(BcTextDecoderTypes).Append("\n"); - sb.Append(" BcTextFieldType: ").Append(BcTextFieldType).Append("\n"); sb.Append(" BcTypeDECODE: ").Append(BcTypeDECODE).Append("\n"); sb.Append(" BcTypeDETECT: ").Append(BcTypeDETECT).Append("\n"); + sb.Append(" BcPDF417INFO: ").Append(BcPDF417INFO).Append("\n"); + sb.Append(" BcTextDecoderTypes: ").Append(BcTextDecoderTypes).Append("\n"); + sb.Append(" BcTextFieldType: ").Append(BcTextFieldType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class PArrayFieldJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override PArrayField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as PArrayField); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option bcAngleDETECT = default; + Option bcCodeResult = default; + Option bcCountModule = default; + Option?> bcDataModule = default; + Option bcROIDETECT = default; + Option bcTypeDECODE = default; + Option bcTypeDETECT = default; + Option bcPDF417INFO = default; + Option bcTextDecoderTypes = default; + Option bcTextFieldType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "bcAngle_DETECT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcAngleDETECT = new Option((float)utf8JsonReader.GetDouble()); + break; + case "bcCodeResult": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcCodeResult = new Option(utf8JsonReader.GetInt32()); + break; + case "bcCountModule": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcCountModule = new Option(utf8JsonReader.GetInt32()); + break; + case "bcDataModule": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcDataModule = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "bcROI_DETECT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcROIDETECT = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "bcType_DECODE": + string? bcTypeDECODERawValue = utf8JsonReader.GetString(); + if (bcTypeDECODERawValue != null) + bcTypeDECODE = new Option(BarcodeTypeValueConverter.FromStringOrDefault(bcTypeDECODERawValue)); + break; + case "bcType_DETECT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcTypeDETECT = new Option(utf8JsonReader.GetInt32()); + break; + case "bcPDF417INFO": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcPDF417INFO = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "bcTextDecoderTypes": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcTextDecoderTypes = new Option(utf8JsonReader.GetInt32()); + break; + case "bcTextFieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bcTextFieldType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!bcAngleDETECT.IsSet) + throw new ArgumentException("Property is required for class PArrayField.", nameof(bcAngleDETECT)); + + if (!bcCodeResult.IsSet) + throw new ArgumentException("Property is required for class PArrayField.", nameof(bcCodeResult)); + + if (!bcCountModule.IsSet) + throw new ArgumentException("Property is required for class PArrayField.", nameof(bcCountModule)); + + if (!bcDataModule.IsSet) + throw new ArgumentException("Property is required for class PArrayField.", nameof(bcDataModule)); + + if (!bcROIDETECT.IsSet) + throw new ArgumentException("Property is required for class PArrayField.", nameof(bcROIDETECT)); + + if (!bcTypeDECODE.IsSet) + throw new ArgumentException("Property is required for class PArrayField.", nameof(bcTypeDECODE)); + + if (!bcTypeDETECT.IsSet) + throw new ArgumentException("Property is required for class PArrayField.", nameof(bcTypeDETECT)); + + if (bcAngleDETECT.IsSet && bcAngleDETECT.Value == null) + throw new ArgumentNullException(nameof(bcAngleDETECT), "Property is not nullable for class PArrayField."); + + if (bcCodeResult.IsSet && bcCodeResult.Value == null) + throw new ArgumentNullException(nameof(bcCodeResult), "Property is not nullable for class PArrayField."); + + if (bcCountModule.IsSet && bcCountModule.Value == null) + throw new ArgumentNullException(nameof(bcCountModule), "Property is not nullable for class PArrayField."); + + if (bcDataModule.IsSet && bcDataModule.Value == null) + throw new ArgumentNullException(nameof(bcDataModule), "Property is not nullable for class PArrayField."); + + if (bcROIDETECT.IsSet && bcROIDETECT.Value == null) + throw new ArgumentNullException(nameof(bcROIDETECT), "Property is not nullable for class PArrayField."); + + if (bcTypeDECODE.IsSet && bcTypeDECODE.Value == null) + throw new ArgumentNullException(nameof(bcTypeDECODE), "Property is not nullable for class PArrayField."); + + if (bcTypeDETECT.IsSet && bcTypeDETECT.Value == null) + throw new ArgumentNullException(nameof(bcTypeDETECT), "Property is not nullable for class PArrayField."); + + if (bcPDF417INFO.IsSet && bcPDF417INFO.Value == null) + throw new ArgumentNullException(nameof(bcPDF417INFO), "Property is not nullable for class PArrayField."); + + if (bcTextDecoderTypes.IsSet && bcTextDecoderTypes.Value == null) + throw new ArgumentNullException(nameof(bcTextDecoderTypes), "Property is not nullable for class PArrayField."); + + if (bcTextFieldType.IsSet && bcTextFieldType.Value == null) + throw new ArgumentNullException(nameof(bcTextFieldType), "Property is not nullable for class PArrayField."); + + return new PArrayField(bcAngleDETECT.Value!.Value!, bcCodeResult.Value!.Value!, bcCountModule.Value!.Value!, bcDataModule.Value!, bcROIDETECT.Value!, bcTypeDECODE.Value!.Value!, bcTypeDETECT.Value!.Value!, bcPDF417INFO, bcTextDecoderTypes, bcTextFieldType); } /// - /// Returns true if PArrayField instances are equal + /// Serializes a /// - /// Instance of PArrayField to be compared - /// Boolean - public bool Equals(PArrayField input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PArrayField pArrayField, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.BcAngleDETECT == input.BcAngleDETECT || - (this.BcAngleDETECT != null && - this.BcAngleDETECT.Equals(input.BcAngleDETECT)) - ) && - ( - this.BcCodeResult == input.BcCodeResult || - (this.BcCodeResult != null && - this.BcCodeResult.Equals(input.BcCodeResult)) - ) && - ( - this.BcCountModule == input.BcCountModule || - (this.BcCountModule != null && - this.BcCountModule.Equals(input.BcCountModule)) - ) && - ( - this.BcDataModule == input.BcDataModule || - this.BcDataModule != null && - input.BcDataModule != null && - this.BcDataModule.SequenceEqual(input.BcDataModule) - ) && - ( - this.BcPDF417INFO == input.BcPDF417INFO || - (this.BcPDF417INFO != null && - this.BcPDF417INFO.Equals(input.BcPDF417INFO)) - ) && - ( - this.BcROIDETECT == input.BcROIDETECT || - (this.BcROIDETECT != null && - this.BcROIDETECT.Equals(input.BcROIDETECT)) - ) && - ( - this.BcTextDecoderTypes == input.BcTextDecoderTypes || - (this.BcTextDecoderTypes != null && - this.BcTextDecoderTypes.Equals(input.BcTextDecoderTypes)) - ) && - ( - this.BcTextFieldType == input.BcTextFieldType || - (this.BcTextFieldType != null && - this.BcTextFieldType.Equals(input.BcTextFieldType)) - ) && - ( - this.BcTypeDECODE == input.BcTypeDECODE || - (this.BcTypeDECODE != null && - this.BcTypeDECODE.Equals(input.BcTypeDECODE)) - ) && - ( - this.BcTypeDETECT == input.BcTypeDETECT || - (this.BcTypeDETECT != null && - this.BcTypeDETECT.Equals(input.BcTypeDETECT)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, pArrayField, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, PArrayField pArrayField, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (pArrayField.BcDataModule == null) + throw new ArgumentNullException(nameof(pArrayField.BcDataModule), "Property is required for class PArrayField."); + + if (pArrayField.BcROIDETECT == null) + throw new ArgumentNullException(nameof(pArrayField.BcROIDETECT), "Property is required for class PArrayField."); + + if (pArrayField.BcPDF417INFOOption.IsSet && pArrayField.BcPDF417INFO == null) + throw new ArgumentNullException(nameof(pArrayField.BcPDF417INFO), "Property is required for class PArrayField."); + + writer.WriteNumber("bcAngle_DETECT", pArrayField.BcAngleDETECT); + + writer.WriteNumber("bcCodeResult", pArrayField.BcCodeResult); + + writer.WriteNumber("bcCountModule", pArrayField.BcCountModule); + + writer.WritePropertyName("bcDataModule"); + JsonSerializer.Serialize(writer, pArrayField.BcDataModule, jsonSerializerOptions); + writer.WritePropertyName("bcROI_DETECT"); + JsonSerializer.Serialize(writer, pArrayField.BcROIDETECT, jsonSerializerOptions); + var bcTypeDECODERawValue = BarcodeTypeValueConverter.ToJsonValue(pArrayField.BcTypeDECODE); + writer.WriteNumber("bcType_DECODE", bcTypeDECODERawValue); + + writer.WriteNumber("bcType_DETECT", pArrayField.BcTypeDETECT); + + if (pArrayField.BcPDF417INFOOption.IsSet) { - int hashCode = 41; - if (this.BcAngleDETECT != null) - hashCode = hashCode * 59 + this.BcAngleDETECT.GetHashCode(); - if (this.BcCodeResult != null) - hashCode = hashCode * 59 + this.BcCodeResult.GetHashCode(); - if (this.BcCountModule != null) - hashCode = hashCode * 59 + this.BcCountModule.GetHashCode(); - if (this.BcDataModule != null) - hashCode = hashCode * 59 + this.BcDataModule.GetHashCode(); - if (this.BcPDF417INFO != null) - hashCode = hashCode * 59 + this.BcPDF417INFO.GetHashCode(); - if (this.BcROIDETECT != null) - hashCode = hashCode * 59 + this.BcROIDETECT.GetHashCode(); - if (this.BcTextDecoderTypes != null) - hashCode = hashCode * 59 + this.BcTextDecoderTypes.GetHashCode(); - if (this.BcTextFieldType != null) - hashCode = hashCode * 59 + this.BcTextFieldType.GetHashCode(); - if (this.BcTypeDECODE != null) - hashCode = hashCode * 59 + this.BcTypeDECODE.GetHashCode(); - if (this.BcTypeDETECT != null) - hashCode = hashCode * 59 + this.BcTypeDETECT.GetHashCode(); - return hashCode; + writer.WritePropertyName("bcPDF417INFO"); + JsonSerializer.Serialize(writer, pArrayField.BcPDF417INFO, jsonSerializerOptions); } - } + if (pArrayField.BcTextDecoderTypesOption.IsSet) + writer.WriteNumber("bcTextDecoderTypes", pArrayField.BcTextDecoderTypesOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (pArrayField.BcTextFieldTypeOption.IsSet) + writer.WriteNumber("bcTextFieldType", pArrayField.BcTextFieldTypeOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs new file mode 100644 index 0000000..6fe6250 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs @@ -0,0 +1,172 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ParsedData + /// + public partial class ParsedData : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// parsingNotifications + [JsonConstructor] + public ParsedData(Option?> parsingNotifications = default) + { + ParsingNotificationsOption = parsingNotifications; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Used to track the state of ParsingNotifications + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ParsingNotificationsOption { get; private set; } + + /// + /// Gets or Sets ParsingNotifications + /// + [JsonPropertyName("ParsingNotifications")] + public List? ParsingNotifications { get { return this.ParsingNotificationsOption; } set { this.ParsingNotificationsOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ParsedData {\n"); + sb.Append(" ParsingNotifications: ").Append(ParsingNotifications).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ParsedDataJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ParsedData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> parsingNotifications = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ParsingNotifications": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + parsingNotifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (parsingNotifications.IsSet && parsingNotifications.Value == null) + throw new ArgumentNullException(nameof(parsingNotifications), "Property is not nullable for class ParsedData."); + + return new ParsedData(parsingNotifications); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ParsedData parsedData, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, parsedData, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ParsedData parsedData, JsonSerializerOptions jsonSerializerOptions) + { + if (parsedData.ParsingNotificationsOption.IsSet && parsedData.ParsingNotifications == null) + throw new ArgumentNullException(nameof(parsedData.ParsingNotifications), "Property is required for class ParsedData."); + + if (parsedData.ParsingNotificationsOption.IsSet) + { + writer.WritePropertyName("ParsingNotifications"); + JsonSerializer.Serialize(writer, parsedData.ParsingNotifications, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs b/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs index a28e301..17c9d1a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs @@ -1,26 +1,27 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { @@ -28,1343 +29,2562 @@ namespace Regula.DocumentReader.WebClient.Model /// The enumeration contains possible values of notification codes returned during the RFID chip processing. /// /// The enumeration contains possible values of notification codes returned during the RFID chip processing. - - [JsonConverter(typeof(StringEnumConverter))] - public enum ParsingNotificationCodes { /// - /// Enum ntfLDS_ASN_Certificate_IncorrectVersion for value: -1879048191 + /// Enum ntfLDS_ASN_Certificate_IncorrectVersion for value: 2415919105 /// - [EnumMember(Value = "-1879048191")] - ntfLDS_ASN_Certificate_IncorrectVersion = 1, + ntfLDS_ASN_Certificate_IncorrectVersion = 2415919105, /// - /// Enum ntfLDS_ASN_Certificate_NonMatchingSignatureAlgorithm for value: -1879048190 + /// Enum ntfLDS_ASN_Certificate_NonMatchingSignatureAlgorithm for value: 2415919106 /// - [EnumMember(Value = "-1879048190")] - ntfLDS_ASN_Certificate_NonMatchingSignatureAlgorithm = 2, + ntfLDS_ASN_Certificate_NonMatchingSignatureAlgorithm = 2415919106, /// - /// Enum ntfLDS_ASN_Certificate_IncorrectTimeCoding for value: -1879048189 + /// Enum ntfLDS_ASN_Certificate_IncorrectTimeCoding for value: 2415919107 /// - [EnumMember(Value = "-1879048189")] - ntfLDS_ASN_Certificate_IncorrectTimeCoding = 3, + ntfLDS_ASN_Certificate_IncorrectTimeCoding = 2415919107, /// - /// Enum ntfLDS_ASN_Certificate_IncorrectUseOfGeneralizedTime for value: -1879048188 + /// Enum ntfLDS_ASN_Certificate_IncorrectUseOfGeneralizedTime for value: 2415919108 /// - [EnumMember(Value = "-1879048188")] - ntfLDS_ASN_Certificate_IncorrectUseOfGeneralizedTime = 4, + ntfLDS_ASN_Certificate_IncorrectUseOfGeneralizedTime = 2415919108, /// - /// Enum ntfLDS_ASN_Certificate_EmptyIssuer for value: -1879048187 + /// Enum ntfLDS_ASN_Certificate_EmptyIssuer for value: 2415919109 /// - [EnumMember(Value = "-1879048187")] - ntfLDS_ASN_Certificate_EmptyIssuer = 5, + ntfLDS_ASN_Certificate_EmptyIssuer = 2415919109, /// - /// Enum ntfLDS_ASN_Certificate_EmptySubject for value: -1879048186 + /// Enum ntfLDS_ASN_Certificate_EmptySubject for value: 2415919110 /// - [EnumMember(Value = "-1879048186")] - ntfLDS_ASN_Certificate_EmptySubject = 6, + ntfLDS_ASN_Certificate_EmptySubject = 2415919110, /// - /// Enum ntfLDS_ASN_Certificate_UnsupportedCriticalExtension for value: -1879048184 + /// Enum ntfLDS_ASN_Certificate_UnsupportedCriticalExtension for value: 2415919112 /// - [EnumMember(Value = "-1879048184")] - ntfLDS_ASN_Certificate_UnsupportedCriticalExtension = 7, + ntfLDS_ASN_Certificate_UnsupportedCriticalExtension = 2415919112, /// - /// Enum ntfLDS_ASN_Certificate_ForcedDefaultCSCARole for value: -1879048178 + /// Enum ntfLDS_ASN_Certificate_ForcedDefaultCSCARole for value: 2415919118 /// - [EnumMember(Value = "-1879048178")] - ntfLDS_ASN_Certificate_ForcedDefaultCSCARole = 8, + ntfLDS_ASN_Certificate_ForcedDefaultCSCARole = 2415919118, /// - /// Enum ntfLDS_ASN_Certificate_ForcedDefaultDSRole for value: -1879048177 + /// Enum ntfLDS_ASN_Certificate_ForcedDefaultDSRole for value: 2415919119 /// - [EnumMember(Value = "-1879048177")] - ntfLDS_ASN_Certificate_ForcedDefaultDSRole = 9, + ntfLDS_ASN_Certificate_ForcedDefaultDSRole = 2415919119, /// - /// Enum ntfLDS_ASN_Certificate_IncorrectIssuerSubjectDS for value: -1879048176 + /// Enum ntfLDS_ASN_Certificate_IncorrectIssuerSubjectDS for value: 2415919120 /// - [EnumMember(Value = "-1879048176")] - ntfLDS_ASN_Certificate_IncorrectIssuerSubjectDS = 10, + ntfLDS_ASN_Certificate_IncorrectIssuerSubjectDS = 2415919120, /// - /// Enum ntfLDS_ASN_Certificate_DuplicatingExtensions for value: -1879048169 + /// Enum ntfLDS_ASN_Certificate_DuplicatingExtensions for value: 2415919127 /// - [EnumMember(Value = "-1879048169")] - ntfLDS_ASN_Certificate_DuplicatingExtensions = 11, + ntfLDS_ASN_Certificate_DuplicatingExtensions = 2415919127, /// - /// Enum ntfLDS_ICAO_Certificate_Version_Missed for value: -1879047680 + /// Enum ntfLDS_ICAO_Certificate_Version_Missed for value: 2415919616 /// - [EnumMember(Value = "-1879047680")] - ntfLDS_ICAO_Certificate_Version_Missed = 12, + ntfLDS_ICAO_Certificate_Version_Missed = 2415919616, /// - /// Enum ntfLDS_ICAO_Certificate_Version_Incorrect for value: -1879047679 + /// Enum ntfLDS_ICAO_Certificate_Version_Incorrect for value: 2415919617 /// - [EnumMember(Value = "-1879047679")] - ntfLDS_ICAO_Certificate_Version_Incorrect = 13, + ntfLDS_ICAO_Certificate_Version_Incorrect = 2415919617, /// - /// Enum ntfLDS_ICAO_Certificate_Issuer_Country_Missed for value: -1879047678 + /// Enum ntfLDS_ICAO_Certificate_Issuer_Country_Missed for value: 2415919618 /// - [EnumMember(Value = "-1879047678")] - ntfLDS_ICAO_Certificate_Issuer_Country_Missed = 14, + ntfLDS_ICAO_Certificate_Issuer_Country_Missed = 2415919618, /// - /// Enum ntfLDS_ICAO_Certificate_Issuer_CommonName_Missed for value: -1879047677 + /// Enum ntfLDS_ICAO_Certificate_Issuer_CommonName_Missed for value: 2415919619 /// - [EnumMember(Value = "-1879047677")] - ntfLDS_ICAO_Certificate_Issuer_CommonName_Missed = 15, + ntfLDS_ICAO_Certificate_Issuer_CommonName_Missed = 2415919619, /// - /// Enum ntfLDS_ICAO_Certificate_Issuer_CountryNonCompliant for value: -1879047676 + /// Enum ntfLDS_ICAO_Certificate_Issuer_CountryNonCompliant for value: 2415919620 /// - [EnumMember(Value = "-1879047676")] - ntfLDS_ICAO_Certificate_Issuer_CountryNonCompliant = 16, + ntfLDS_ICAO_Certificate_Issuer_CountryNonCompliant = 2415919620, /// - /// Enum ntfLDS_ICAO_Certificate_Subject_Country_Missed for value: -1879047675 + /// Enum ntfLDS_ICAO_Certificate_Subject_Country_Missed for value: 2415919621 /// - [EnumMember(Value = "-1879047675")] - ntfLDS_ICAO_Certificate_Subject_Country_Missed = 17, + ntfLDS_ICAO_Certificate_Subject_Country_Missed = 2415919621, /// - /// Enum ntfLDS_ICAO_Certificate_Subject_CommonName_Missed for value: -1879047674 + /// Enum ntfLDS_ICAO_Certificate_Subject_CommonName_Missed for value: 2415919622 /// - [EnumMember(Value = "-1879047674")] - ntfLDS_ICAO_Certificate_Subject_CommonName_Missed = 18, + ntfLDS_ICAO_Certificate_Subject_CommonName_Missed = 2415919622, /// - /// Enum ntfLDS_ICAO_Certificate_Subject_CountryNonCompliant for value: -1879047673 + /// Enum ntfLDS_ICAO_Certificate_Subject_CountryNonCompliant for value: 2415919623 /// - [EnumMember(Value = "-1879047673")] - ntfLDS_ICAO_Certificate_Subject_CountryNonCompliant = 19, + ntfLDS_ICAO_Certificate_Subject_CountryNonCompliant = 2415919623, /// - /// Enum ntfLDS_ICAO_Certificate_UsingNonCompliantData for value: -1879047672 + /// Enum ntfLDS_ICAO_Certificate_UsingNonCompliantData for value: 2415919624 /// - [EnumMember(Value = "-1879047672")] - ntfLDS_ICAO_Certificate_UsingNonCompliantData = 20, + ntfLDS_ICAO_Certificate_UsingNonCompliantData = 2415919624, /// - /// Enum ntfLDS_ICAO_Certificate_UnsupportedSignatureAlgorithm for value: -1879047671 + /// Enum ntfLDS_ICAO_Certificate_UnsupportedSignatureAlgorithm for value: 2415919625 /// - [EnumMember(Value = "-1879047671")] - ntfLDS_ICAO_Certificate_UnsupportedSignatureAlgorithm = 21, + ntfLDS_ICAO_Certificate_UnsupportedSignatureAlgorithm = 2415919625, /// - /// Enum ntfLDS_ICAO_Certificate_UnsupportedPublicKeyAlgorithm for value: -1879047670 + /// Enum ntfLDS_ICAO_Certificate_UnsupportedPublicKeyAlgorithm for value: 2415919626 /// - [EnumMember(Value = "-1879047670")] - ntfLDS_ICAO_Certificate_UnsupportedPublicKeyAlgorithm = 22, + ntfLDS_ICAO_Certificate_UnsupportedPublicKeyAlgorithm = 2415919626, /// - /// Enum ntfLDS_ICAO_Certificate_MissedExtensions for value: -1879047669 + /// Enum ntfLDS_ICAO_Certificate_MissedExtensions for value: 2415919627 /// - [EnumMember(Value = "-1879047669")] - ntfLDS_ICAO_Certificate_MissedExtensions = 23, + ntfLDS_ICAO_Certificate_MissedExtensions = 2415919627, /// - /// Enum ntfLDS_ICAO_Certificate_Validity for value: -1879047668 + /// Enum ntfLDS_ICAO_Certificate_Validity for value: 2415919628 /// - [EnumMember(Value = "-1879047668")] - ntfLDS_ICAO_Certificate_Validity = 24, + ntfLDS_ICAO_Certificate_Validity = 2415919628, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_UsingNonCompliantData for value: -1879047667 + /// Enum ntfLDS_ICAO_Certificate_Ext_UsingNonCompliantData for value: 2415919629 /// - [EnumMember(Value = "-1879047667")] - ntfLDS_ICAO_Certificate_Ext_UsingNonCompliantData = 25, + ntfLDS_ICAO_Certificate_Ext_UsingNonCompliantData = 2415919629, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_KeyUsage_Missed for value: -1879047666 + /// Enum ntfLDS_ICAO_Certificate_Ext_KeyUsage_Missed for value: 2415919630 /// - [EnumMember(Value = "-1879047666")] - ntfLDS_ICAO_Certificate_Ext_KeyUsage_Missed = 26, + ntfLDS_ICAO_Certificate_Ext_KeyUsage_Missed = 2415919630, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_KeyUsage_NotCritical for value: -1879047665 + /// Enum ntfLDS_ICAO_Certificate_Ext_KeyUsage_NotCritical for value: 2415919631 /// - [EnumMember(Value = "-1879047665")] - ntfLDS_ICAO_Certificate_Ext_KeyUsage_NotCritical = 27, + ntfLDS_ICAO_Certificate_Ext_KeyUsage_NotCritical = 2415919631, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_KeyUsage_IncorrectData for value: -1879047664 + /// Enum ntfLDS_ICAO_Certificate_Ext_KeyUsage_IncorrectData for value: 2415919632 /// - [EnumMember(Value = "-1879047664")] - ntfLDS_ICAO_Certificate_Ext_KeyUsage_IncorrectData = 28, + ntfLDS_ICAO_Certificate_Ext_KeyUsage_IncorrectData = 2415919632, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_Missed for value: -1879047663 + /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_Missed for value: 2415919633 /// - [EnumMember(Value = "-1879047663")] - ntfLDS_ICAO_Certificate_Ext_BasicC_Missed = 29, + ntfLDS_ICAO_Certificate_Ext_BasicC_Missed = 2415919633, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage1 for value: -1879047662 + /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage1 for value: 2415919634 /// - [EnumMember(Value = "-1879047662")] - ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage1 = 30, + ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage1 = 2415919634, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage2 for value: -1879047661 + /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage2 for value: 2415919635 /// - [EnumMember(Value = "-1879047661")] - ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage2 = 31, + ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage2 = 2415919635, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_NotCritical for value: -1879047660 + /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_NotCritical for value: 2415919636 /// - [EnumMember(Value = "-1879047660")] - ntfLDS_ICAO_Certificate_Ext_BasicC_NotCritical = 32, + ntfLDS_ICAO_Certificate_Ext_BasicC_NotCritical = 2415919636, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectData for value: -1879047659 + /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectData for value: 2415919637 /// - [EnumMember(Value = "-1879047659")] - ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectData = 33, + ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectData = 2415919637, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Missed for value: -1879047658 + /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Missed for value: 2415919638 /// - [EnumMember(Value = "-1879047658")] - ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Missed = 34, + ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Missed = 2415919638, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Incorrect for value: -1879047657 + /// Enum ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Incorrect for value: 2415919639 /// - [EnumMember(Value = "-1879047657")] - ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Incorrect = 35, + ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Incorrect = 2415919639, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_NotCritical for value: -1879047656 + /// Enum ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_NotCritical for value: 2415919640 /// - [EnumMember(Value = "-1879047656")] - ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_NotCritical = 36, + ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_NotCritical = 2415919640, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectUsage for value: -1879047655 + /// Enum ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectUsage for value: 2415919641 /// - [EnumMember(Value = "-1879047655")] - ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectUsage = 37, + ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectUsage = 2415919641, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectData for value: -1879047654 + /// Enum ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectData for value: 2415919642 /// - [EnumMember(Value = "-1879047654")] - ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectData = 38, + ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectData = 2415919642, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_AuthKeyID_Missed for value: -1879047653 + /// Enum ntfLDS_ICAO_Certificate_Ext_AuthKeyID_Missed for value: 2415919643 /// - [EnumMember(Value = "-1879047653")] - ntfLDS_ICAO_Certificate_Ext_AuthKeyID_Missed = 39, + ntfLDS_ICAO_Certificate_Ext_AuthKeyID_Missed = 2415919643, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_AuthKeyID_IncorrectData for value: -1879047652 + /// Enum ntfLDS_ICAO_Certificate_Ext_AuthKeyID_IncorrectData for value: 2415919644 /// - [EnumMember(Value = "-1879047652")] - ntfLDS_ICAO_Certificate_Ext_AuthKeyID_IncorrectData = 40, + ntfLDS_ICAO_Certificate_Ext_AuthKeyID_IncorrectData = 2415919644, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_AuthKeyID_KeyID_Missed for value: -1879047651 + /// Enum ntfLDS_ICAO_Certificate_Ext_AuthKeyID_KeyID_Missed for value: 2415919645 /// - [EnumMember(Value = "-1879047651")] - ntfLDS_ICAO_Certificate_Ext_AuthKeyID_KeyID_Missed = 41, + ntfLDS_ICAO_Certificate_Ext_AuthKeyID_KeyID_Missed = 2415919645, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_Missed for value: -1879047650 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_Missed for value: 2415919646 /// - [EnumMember(Value = "-1879047650")] - ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_Missed = 42, + ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_Missed = 2415919646, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_IncorrectData for value: -1879047649 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_IncorrectData for value: 2415919647 /// - [EnumMember(Value = "-1879047649")] - ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_IncorrectData = 43, + ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_IncorrectData = 2415919647, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Missed for value: -1879047648 + /// Enum ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Missed for value: 2415919648 /// - [EnumMember(Value = "-1879047648")] - ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Missed = 44, + ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Missed = 2415919648, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_IncorrectData for value: -1879047647 + /// Enum ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_IncorrectData for value: 2415919649 /// - [EnumMember(Value = "-1879047647")] - ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_IncorrectData = 45, + ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_IncorrectData = 2415919649, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Empty for value: -1879047646 + /// Enum ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Empty for value: 2415919650 /// - [EnumMember(Value = "-1879047646")] - ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Empty = 46, + ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Empty = 2415919650, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Missed for value: -1879047645 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Missed for value: 2415919651 /// - [EnumMember(Value = "-1879047645")] - ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Missed = 47, + ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Missed = 2415919651, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_IncorrectData for value: -1879047644 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_IncorrectData for value: 2415919652 /// - [EnumMember(Value = "-1879047644")] - ntfLDS_ICAO_Certificate_Ext_SubjectAltName_IncorrectData = 48, + ntfLDS_ICAO_Certificate_Ext_SubjectAltName_IncorrectData = 2415919652, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Empty for value: -1879047643 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Empty for value: 2415919653 /// - [EnumMember(Value = "-1879047643")] - ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Empty = 49, + ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Empty = 2415919653, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_NonCompliant for value: -1879047642 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_NonCompliant for value: 2415919654 /// - [EnumMember(Value = "-1879047642")] - ntfLDS_ICAO_Certificate_Ext_SubjectAltName_NonCompliant = 50, + ntfLDS_ICAO_Certificate_Ext_SubjectAltName_NonCompliant = 2415919654, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Critical for value: -1879047640 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Critical for value: 2415919656 /// - [EnumMember(Value = "-1879047640")] - ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Critical = 51, + ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Critical = 2415919656, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Empty for value: -1879047639 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Empty for value: 2415919657 /// - [EnumMember(Value = "-1879047639")] - ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Empty = 52, + ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Empty = 2415919657, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Incorrect for value: -1879047638 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Incorrect for value: 2415919658 /// - [EnumMember(Value = "-1879047638")] - ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Incorrect = 53, + ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Incorrect = 2415919658, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_NonCompliant for value: -1879047637 + /// Enum ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_NonCompliant for value: 2415919659 /// - [EnumMember(Value = "-1879047637")] - ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_NonCompliant = 54, + ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_NonCompliant = 2415919659, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Missed for value: -1879047636 + /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Missed for value: 2415919660 /// - [EnumMember(Value = "-1879047636")] - ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Missed = 55, + ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Missed = 2415919660, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_IncorrectData for value: -1879047635 + /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_IncorrectData for value: 2415919661 /// - [EnumMember(Value = "-1879047635")] - ntfLDS_ICAO_Certificate_Ext_IssuerAltName_IncorrectData = 56, + ntfLDS_ICAO_Certificate_Ext_IssuerAltName_IncorrectData = 2415919661, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Empty for value: -1879047634 + /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Empty for value: 2415919662 /// - [EnumMember(Value = "-1879047634")] - ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Empty = 57, + ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Empty = 2415919662, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_NonCompliant for value: -1879047633 + /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_NonCompliant for value: 2415919663 /// - [EnumMember(Value = "-1879047633")] - ntfLDS_ICAO_Certificate_Ext_IssuerAltName_NonCompliant = 58, + ntfLDS_ICAO_Certificate_Ext_IssuerAltName_NonCompliant = 2415919663, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Critical for value: -1879047631 + /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Critical for value: 2415919665 /// - [EnumMember(Value = "-1879047631")] - ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Critical = 59, + ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Critical = 2415919665, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Empty for value: -1879047630 + /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Empty for value: 2415919666 /// - [EnumMember(Value = "-1879047630")] - ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Empty = 60, + ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Empty = 2415919666, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Incorrect for value: -1879047629 + /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Incorrect for value: 2415919667 /// - [EnumMember(Value = "-1879047629")] - ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Incorrect = 61, + ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Incorrect = 2415919667, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_NonCompliant for value: -1879047628 + /// Enum ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_NonCompliant for value: 2415919668 /// - [EnumMember(Value = "-1879047628")] - ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_NonCompliant = 62, + ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_NonCompliant = 2415919668, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_Missed for value: -1879047627 + /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_Missed for value: 2415919669 /// - [EnumMember(Value = "-1879047627")] - ntfLDS_ICAO_Certificate_Ext_DocTypeList_Missed = 63, + ntfLDS_ICAO_Certificate_Ext_DocTypeList_Missed = 2415919669, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_IncorrectData for value: -1879047626 + /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_IncorrectData for value: 2415919670 /// - [EnumMember(Value = "-1879047626")] - ntfLDS_ICAO_Certificate_Ext_DocTypeList_IncorrectData = 64, + ntfLDS_ICAO_Certificate_Ext_DocTypeList_IncorrectData = 2415919670, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_Version for value: -1879047625 + /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_Version for value: 2415919671 /// - [EnumMember(Value = "-1879047625")] - ntfLDS_ICAO_Certificate_Ext_DocTypeList_Version = 65, + ntfLDS_ICAO_Certificate_Ext_DocTypeList_Version = 2415919671, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes for value: -1879047624 + /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes for value: 2415919672 /// - [EnumMember(Value = "-1879047624")] - ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes = 66, + ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes = 2415919672, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes_Empty for value: -1879047623 + /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes_Empty for value: 2415919673 /// - [EnumMember(Value = "-1879047623")] - ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes_Empty = 67, + ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes_Empty = 2415919673, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_CertPolicies_IncorrectData for value: -1879047622 + /// Enum ntfLDS_ICAO_Certificate_Ext_CertPolicies_IncorrectData for value: 2415919674 /// - [EnumMember(Value = "-1879047622")] - ntfLDS_ICAO_Certificate_Ext_CertPolicies_IncorrectData = 68, + ntfLDS_ICAO_Certificate_Ext_CertPolicies_IncorrectData = 2415919674, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_CertPolicies_Empty for value: -1879047621 + /// Enum ntfLDS_ICAO_Certificate_Ext_CertPolicies_Empty for value: 2415919675 /// - [EnumMember(Value = "-1879047621")] - ntfLDS_ICAO_Certificate_Ext_CertPolicies_Empty = 69, + ntfLDS_ICAO_Certificate_Ext_CertPolicies_Empty = 2415919675, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_CertPolicies_PolicyID_Missed for value: -1879047620 + /// Enum ntfLDS_ICAO_Certificate_Ext_CertPolicies_PolicyID_Missed for value: 2415919676 /// - [EnumMember(Value = "-1879047620")] - ntfLDS_ICAO_Certificate_Ext_CertPolicies_PolicyID_Missed = 70, + ntfLDS_ICAO_Certificate_Ext_CertPolicies_PolicyID_Missed = 2415919676, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Missed for value: -1879047619 + /// Enum ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Missed for value: 2415919677 /// - [EnumMember(Value = "-1879047619")] - ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Missed = 71, + ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Missed = 2415919677, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_IncorrectData for value: -1879047618 + /// Enum ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_IncorrectData for value: 2415919678 /// - [EnumMember(Value = "-1879047618")] - ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_IncorrectData = 72, + ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_IncorrectData = 2415919678, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Empty for value: -1879047617 + /// Enum ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Empty for value: 2415919679 /// - [EnumMember(Value = "-1879047617")] - ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Empty = 73, + ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Empty = 2415919679, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_PointMissed for value: -1879047616 + /// Enum ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_PointMissed for value: 2415919680 /// - [EnumMember(Value = "-1879047616")] - ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_PointMissed = 74, + ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_PointMissed = 2415919680, /// - /// Enum ntfLDS_ICAO_Certificate_SN_NonCompliant for value: -1879047615 + /// Enum ntfLDS_ICAO_Certificate_SN_NonCompliant for value: 2415919681 /// - [EnumMember(Value = "-1879047615")] - ntfLDS_ICAO_Certificate_SN_NonCompliant = 75, + ntfLDS_ICAO_Certificate_SN_NonCompliant = 2415919681, /// - /// Enum ntfLDS_ICAO_Certificate_Issuer_SN_NonCompliant for value: -1879047614 + /// Enum ntfLDS_ICAO_Certificate_Issuer_SN_NonCompliant for value: 2415919682 /// - [EnumMember(Value = "-1879047614")] - ntfLDS_ICAO_Certificate_Issuer_SN_NonCompliant = 76, + ntfLDS_ICAO_Certificate_Issuer_SN_NonCompliant = 2415919682, /// - /// Enum ntfLDS_ICAO_Certificate_Subject_SN_NonCompliant for value: -1879047613 + /// Enum ntfLDS_ICAO_Certificate_Subject_SN_NonCompliant for value: 2415919683 /// - [EnumMember(Value = "-1879047613")] - ntfLDS_ICAO_Certificate_Subject_SN_NonCompliant = 77, + ntfLDS_ICAO_Certificate_Subject_SN_NonCompliant = 2415919683, /// - /// Enum ntfLDS_ICAO_Certificate_Issuer_AttributeNonCompliant for value: -1879047612 + /// Enum ntfLDS_ICAO_Certificate_Issuer_AttributeNonCompliant for value: 2415919684 /// - [EnumMember(Value = "-1879047612")] - ntfLDS_ICAO_Certificate_Issuer_AttributeNonCompliant = 78, + ntfLDS_ICAO_Certificate_Issuer_AttributeNonCompliant = 2415919684, /// - /// Enum ntfLDS_ICAO_Certificate_Subject_AttributeNonCompliant for value: -1879047611 + /// Enum ntfLDS_ICAO_Certificate_Subject_AttributeNonCompliant for value: 2415919685 /// - [EnumMember(Value = "-1879047611")] - ntfLDS_ICAO_Certificate_Subject_AttributeNonCompliant = 79, + ntfLDS_ICAO_Certificate_Subject_AttributeNonCompliant = 2415919685, /// - /// Enum ntfLDS_ICAO_Certificate_IssuerSubject_Country_NonMatching for value: -1879047610 + /// Enum ntfLDS_ICAO_Certificate_IssuerSubject_Country_NonMatching for value: 2415919686 /// - [EnumMember(Value = "-1879047610")] - ntfLDS_ICAO_Certificate_IssuerSubject_Country_NonMatching = 80, + ntfLDS_ICAO_Certificate_IssuerSubject_Country_NonMatching = 2415919686, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_CSCA_AltNames_NonMatching for value: -1879047609 + /// Enum ntfLDS_ICAO_Certificate_Ext_CSCA_AltNames_NonMatching for value: 2415919687 /// - [EnumMember(Value = "-1879047609")] - ntfLDS_ICAO_Certificate_Ext_CSCA_AltNames_NonMatching = 81, + ntfLDS_ICAO_Certificate_Ext_CSCA_AltNames_NonMatching = 2415919687, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_NameChange_IncorrectData for value: -1879047608 + /// Enum ntfLDS_ICAO_Certificate_Ext_NameChange_IncorrectData for value: 2415919688 /// - [EnumMember(Value = "-1879047608")] - ntfLDS_ICAO_Certificate_Ext_NameChange_IncorrectData = 82, + ntfLDS_ICAO_Certificate_Ext_NameChange_IncorrectData = 2415919688, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_NameChange_NonCompliant for value: -1879047607 + /// Enum ntfLDS_ICAO_Certificate_Ext_NameChange_NonCompliant for value: 2415919689 /// - [EnumMember(Value = "-1879047607")] - ntfLDS_ICAO_Certificate_Ext_NameChange_NonCompliant = 83, + ntfLDS_ICAO_Certificate_Ext_NameChange_NonCompliant = 2415919689, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_NameChange_Critical for value: -1879047606 + /// Enum ntfLDS_ICAO_Certificate_Ext_NameChange_Critical for value: 2415919690 /// - [EnumMember(Value = "-1879047606")] - ntfLDS_ICAO_Certificate_Ext_NameChange_Critical = 84, + ntfLDS_ICAO_Certificate_Ext_NameChange_Critical = 2415919690, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_NonCompliant for value: -1879047605 + /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_NonCompliant for value: 2415919691 /// - [EnumMember(Value = "-1879047605")] - ntfLDS_ICAO_Certificate_Ext_DocTypeList_NonCompliant = 85, + ntfLDS_ICAO_Certificate_Ext_DocTypeList_NonCompliant = 2415919691, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_Critical for value: -1879047604 + /// Enum ntfLDS_ICAO_Certificate_Ext_DocTypeList_Critical for value: 2415919692 /// - [EnumMember(Value = "-1879047604")] - ntfLDS_ICAO_Certificate_Ext_DocTypeList_Critical = 86, + ntfLDS_ICAO_Certificate_Ext_DocTypeList_Critical = 2415919692, /// - /// Enum ntfLDS_ICAO_Certificate_Ext_Optional_Critical for value: -1879047603 + /// Enum ntfLDS_ICAO_Certificate_Ext_Optional_Critical for value: 2415919693 /// - [EnumMember(Value = "-1879047603")] - ntfLDS_ICAO_Certificate_Ext_Optional_Critical = 87, + ntfLDS_ICAO_Certificate_Ext_Optional_Critical = 2415919693, /// - /// Enum ntfLDS_ICAO_Certificate_Subject_NonCompliant for value: -1879047602 + /// Enum ntfLDS_ICAO_Certificate_Subject_NonCompliant for value: 2415919694 /// - [EnumMember(Value = "-1879047602")] - ntfLDS_ICAO_Certificate_Subject_NonCompliant = 88, + ntfLDS_ICAO_Certificate_Subject_NonCompliant = 2415919694, /// - /// Enum ntfLDS_ICAO_Certificate_Subject_CommonNameNonCompliant for value: -1879047601 + /// Enum ntfLDS_ICAO_Certificate_Subject_CommonNameNonCompliant for value: 2415919695 /// - [EnumMember(Value = "-1879047601")] - ntfLDS_ICAO_Certificate_Subject_CommonNameNonCompliant = 89, + ntfLDS_ICAO_Certificate_Subject_CommonNameNonCompliant = 2415919695, /// - /// Enum ntfLDS_ICAO_COM_LDS_Version_Incorrect for value: -1879048160 + /// Enum ntfLDS_ICAO_COM_LDS_Version_Incorrect for value: 2415919136 /// - [EnumMember(Value = "-1879048160")] - ntfLDS_ICAO_COM_LDS_Version_Incorrect = 90, + ntfLDS_ICAO_COM_LDS_Version_Incorrect = 2415919136, /// - /// Enum ntfLDS_ICAO_COM_LDS_Version_Missing for value: -1879048159 + /// Enum ntfLDS_ICAO_COM_LDS_Version_Missing for value: 2415919137 /// - [EnumMember(Value = "-1879048159")] - ntfLDS_ICAO_COM_LDS_Version_Missing = 91, + ntfLDS_ICAO_COM_LDS_Version_Missing = 2415919137, /// - /// Enum ntfLDS_ICAO_COM_Unicode_Version_Incorrect for value: -1879048158 + /// Enum ntfLDS_ICAO_COM_Unicode_Version_Incorrect for value: 2415919138 /// - [EnumMember(Value = "-1879048158")] - ntfLDS_ICAO_COM_Unicode_Version_Incorrect = 92, + ntfLDS_ICAO_COM_Unicode_Version_Incorrect = 2415919138, /// - /// Enum ntfLDS_ICAO_COM_Unicode_Version_Missing for value: -1879048157 + /// Enum ntfLDS_ICAO_COM_Unicode_Version_Missing for value: 2415919139 /// - [EnumMember(Value = "-1879048157")] - ntfLDS_ICAO_COM_Unicode_Version_Missing = 93, + ntfLDS_ICAO_COM_Unicode_Version_Missing = 2415919139, /// - /// Enum ntfLDS_ICAO_COM_DGPM_Incorrect for value: -1879048156 + /// Enum ntfLDS_ICAO_COM_DGPM_Incorrect for value: 2415919140 /// - [EnumMember(Value = "-1879048156")] - ntfLDS_ICAO_COM_DGPM_Incorrect = 94, + ntfLDS_ICAO_COM_DGPM_Incorrect = 2415919140, /// - /// Enum ntfLDS_ICAO_COM_DGPM_Missing for value: -1879048155 + /// Enum ntfLDS_ICAO_COM_DGPM_Missing for value: 2415919141 /// - [EnumMember(Value = "-1879048155")] - ntfLDS_ICAO_COM_DGPM_Missing = 95, + ntfLDS_ICAO_COM_DGPM_Missing = 2415919141, /// - /// Enum ntfLDS_ICAO_COM_DGPM_Unexpected for value: -1879048154 + /// Enum ntfLDS_ICAO_COM_DGPM_Unexpected for value: 2415919142 /// - [EnumMember(Value = "-1879048154")] - ntfLDS_ICAO_COM_DGPM_Unexpected = 96, + ntfLDS_ICAO_COM_DGPM_Unexpected = 2415919142, /// - /// Enum ntfLDS_ICAO_Application_LDSVersion_Unsupported for value: -1879048144 + /// Enum ntfLDS_ICAO_Application_LDSVersion_Unsupported for value: 2415919152 /// - [EnumMember(Value = "-1879048144")] - ntfLDS_ICAO_Application_LDSVersion_Unsupported = 97, + ntfLDS_ICAO_Application_LDSVersion_Unsupported = 2415919152, /// - /// Enum ntfLDS_ICAO_Application_UnicodeVersion_Unsupported for value: -1879048143 + /// Enum ntfLDS_ICAO_Application_UnicodeVersion_Unsupported for value: 2415919153 /// - [EnumMember(Value = "-1879048143")] - ntfLDS_ICAO_Application_UnicodeVersion_Unsupported = 98, + ntfLDS_ICAO_Application_UnicodeVersion_Unsupported = 2415919153, /// - /// Enum ntfLDS_ICAO_Application_LDSVersion_Inconsistent for value: -1879048142 + /// Enum ntfLDS_ICAO_Application_LDSVersion_Inconsistent for value: 2415919154 /// - [EnumMember(Value = "-1879048142")] - ntfLDS_ICAO_Application_LDSVersion_Inconsistent = 99, + ntfLDS_ICAO_Application_LDSVersion_Inconsistent = 2415919154, /// - /// Enum ntfLDS_ICAO_Application_UnicodeVersion_Inconsistent for value: -1879048141 + /// Enum ntfLDS_ICAO_Application_UnicodeVersion_Inconsistent for value: 2415919155 /// - [EnumMember(Value = "-1879048141")] - ntfLDS_ICAO_Application_UnicodeVersion_Inconsistent = 100, + ntfLDS_ICAO_Application_UnicodeVersion_Inconsistent = 2415919155, /// - /// Enum ntfLDS_ASN_SignedData_OID_Incorrect for value: -1879047936 + /// Enum ntfLDS_ASN_SignedData_OID_Incorrect for value: 2415919360 /// - [EnumMember(Value = "-1879047936")] - ntfLDS_ASN_SignedData_OID_Incorrect = 101, + ntfLDS_ASN_SignedData_OID_Incorrect = 2415919360, /// - /// Enum ntfLDS_ASN_SignedData_Version_Incorrect for value: -1879047776 + /// Enum ntfLDS_ASN_SignedData_Version_Incorrect for value: 2415919520 /// - [EnumMember(Value = "-1879047776")] - ntfLDS_ASN_SignedData_Version_Incorrect = 102, + ntfLDS_ASN_SignedData_Version_Incorrect = 2415919520, /// - /// Enum ntfLDS_ASN_SignedData_ContentOID_Incorrect for value: -1879047775 + /// Enum ntfLDS_ASN_SignedData_ContentOID_Incorrect for value: 2415919521 /// - [EnumMember(Value = "-1879047775")] - ntfLDS_ASN_SignedData_ContentOID_Incorrect = 103, + ntfLDS_ASN_SignedData_ContentOID_Incorrect = 2415919521, /// - /// Enum ntfLDS_ICAO_SignedData_Version_Incorrect for value: -1879047935 + /// Enum ntfLDS_ICAO_SignedData_Version_Incorrect for value: 2415919361 /// - [EnumMember(Value = "-1879047935")] - ntfLDS_ICAO_SignedData_Version_Incorrect = 104, + ntfLDS_ICAO_SignedData_Version_Incorrect = 2415919361, /// - /// Enum ntfLDS_ICAO_SignedData_DigestAlgorithms_Empty for value: -1879047934 + /// Enum ntfLDS_ICAO_SignedData_DigestAlgorithms_Empty for value: 2415919362 /// - [EnumMember(Value = "-1879047934")] - ntfLDS_ICAO_SignedData_DigestAlgorithms_Empty = 105, + ntfLDS_ICAO_SignedData_DigestAlgorithms_Empty = 2415919362, /// - /// Enum ntfLDS_ICAO_SignedData_DigestAlgorithms_Unsupported for value: -1879047933 + /// Enum ntfLDS_ICAO_SignedData_DigestAlgorithms_Unsupported for value: 2415919363 /// - [EnumMember(Value = "-1879047933")] - ntfLDS_ICAO_SignedData_DigestAlgorithms_Unsupported = 106, + ntfLDS_ICAO_SignedData_DigestAlgorithms_Unsupported = 2415919363, /// - /// Enum ntfLDS_ICAO_SignedData_SignerInfos_MultipleEntries for value: -1879047927 + /// Enum ntfLDS_ICAO_SignedData_SignerInfos_MultipleEntries for value: 2415919369 /// - [EnumMember(Value = "-1879047927")] - ntfLDS_ICAO_SignedData_SignerInfos_MultipleEntries = 107, + ntfLDS_ICAO_SignedData_SignerInfos_MultipleEntries = 2415919369, /// - /// Enum ntfLDS_ICAO_SignedData_Certificates_Missed for value: -1879047760 + /// Enum ntfLDS_ICAO_SignedData_Certificates_Missed for value: 2415919536 /// - [EnumMember(Value = "-1879047760")] - ntfLDS_ICAO_SignedData_Certificates_Missed = 108, + ntfLDS_ICAO_SignedData_Certificates_Missed = 2415919536, /// - /// Enum ntfLDS_ICAO_SignedData_Certificates_Empty for value: -1879047759 + /// Enum ntfLDS_ICAO_SignedData_Certificates_Empty for value: 2415919537 /// - [EnumMember(Value = "-1879047759")] - ntfLDS_ICAO_SignedData_Certificates_Empty = 109, + ntfLDS_ICAO_SignedData_Certificates_Empty = 2415919537, /// - /// Enum ntfLDS_ICAO_SignedData_CRLs_IncorrectUsage for value: -1879047758 + /// Enum ntfLDS_ICAO_SignedData_CRLs_IncorrectUsage for value: 2415919538 /// - [EnumMember(Value = "-1879047758")] - ntfLDS_ICAO_SignedData_CRLs_IncorrectUsage = 110, + ntfLDS_ICAO_SignedData_CRLs_IncorrectUsage = 2415919538, /// - /// Enum ntfLDS_ICAO_LDSObject_IncorrectContentOID for value: -1879047932 + /// Enum ntfLDS_ICAO_LDSObject_IncorrectContentOID for value: 2415919364 /// - [EnumMember(Value = "-1879047932")] - ntfLDS_ICAO_LDSObject_IncorrectContentOID = 111, + ntfLDS_ICAO_LDSObject_IncorrectContentOID = 2415919364, /// - /// Enum ntfLDS_ICAO_LDSObject_DGNumber_Incorrect for value: -1879047931 + /// Enum ntfLDS_ICAO_LDSObject_DGNumber_Incorrect for value: 2415919365 /// - [EnumMember(Value = "-1879047931")] - ntfLDS_ICAO_LDSObject_DGNumber_Incorrect = 112, + ntfLDS_ICAO_LDSObject_DGNumber_Incorrect = 2415919365, /// - /// Enum ntfLDS_ICAO_LDSObject_DGHash_Missing for value: -1879047930 + /// Enum ntfLDS_ICAO_LDSObject_DGHash_Missing for value: 2415919366 /// - [EnumMember(Value = "-1879047930")] - ntfLDS_ICAO_LDSObject_DGHash_Missing = 113, + ntfLDS_ICAO_LDSObject_DGHash_Missing = 2415919366, /// - /// Enum ntfLDS_ICAO_LDSObject_DGHash_Extra for value: -1879047929 + /// Enum ntfLDS_ICAO_LDSObject_DGHash_Extra for value: 2415919367 /// - [EnumMember(Value = "-1879047929")] - ntfLDS_ICAO_LDSObject_DGHash_Extra = 114, + ntfLDS_ICAO_LDSObject_DGHash_Extra = 2415919367, /// - /// Enum ntfLDS_ICAO_LDSObject_Version_Incorrect for value: -1879047928 + /// Enum ntfLDS_ICAO_LDSObject_Version_Incorrect for value: 2415919368 /// - [EnumMember(Value = "-1879047928")] - ntfLDS_ICAO_LDSObject_Version_Incorrect = 115, + ntfLDS_ICAO_LDSObject_Version_Incorrect = 2415919368, /// - /// Enum ntfLDS_ICAO_MasterList_Version_Incorrect for value: -1879047744 + /// Enum ntfLDS_ICAO_MasterList_Version_Incorrect for value: 2415919552 /// - [EnumMember(Value = "-1879047744")] - ntfLDS_ICAO_MasterList_Version_Incorrect = 116, + ntfLDS_ICAO_MasterList_Version_Incorrect = 2415919552, /// - /// Enum ntfLDS_ICAO_DeviationList_Version_Incorrect for value: -1879047736 + /// Enum ntfLDS_ICAO_DeviationList_Version_Incorrect for value: 2415919560 /// - [EnumMember(Value = "-1879047736")] - ntfLDS_ICAO_DeviationList_Version_Incorrect = 117, + ntfLDS_ICAO_DeviationList_Version_Incorrect = 2415919560, /// - /// Enum ntfLDS_BSI_DefectList_Version_Incorrect for value: -1879047728 + /// Enum ntfLDS_BSI_DefectList_Version_Incorrect for value: 2415919568 /// - [EnumMember(Value = "-1879047728")] - ntfLDS_BSI_DefectList_Version_Incorrect = 118, + ntfLDS_BSI_DefectList_Version_Incorrect = 2415919568, /// - /// Enum ntfLDS_BSI_BlackList_Version_Incorrect for value: -1879047720 + /// Enum ntfLDS_BSI_BlackList_Version_Incorrect for value: 2415919576 /// - [EnumMember(Value = "-1879047720")] - ntfLDS_BSI_BlackList_Version_Incorrect = 119, + ntfLDS_BSI_BlackList_Version_Incorrect = 2415919576, /// - /// Enum ntfLDS_ASN_SignerInfo_Version_Incorrect for value: -1879047926 + /// Enum ntfLDS_ASN_SignerInfo_Version_Incorrect for value: 2415919370 /// - [EnumMember(Value = "-1879047926")] - ntfLDS_ASN_SignerInfo_Version_Incorrect = 120, + ntfLDS_ASN_SignerInfo_Version_Incorrect = 2415919370, /// - /// Enum ntfLDS_ASN_SignerInfo_SID_IncorrectChoice for value: -1879047925 + /// Enum ntfLDS_ASN_SignerInfo_SID_IncorrectChoice for value: 2415919371 /// - [EnumMember(Value = "-1879047925")] - ntfLDS_ASN_SignerInfo_SID_IncorrectChoice = 121, + ntfLDS_ASN_SignerInfo_SID_IncorrectChoice = 2415919371, /// - /// Enum ntfLDS_ASN_SignerInfo_SID_DigestAlgorithmNotListed for value: -1879047924 + /// Enum ntfLDS_ASN_SignerInfo_SID_DigestAlgorithmNotListed for value: 2415919372 /// - [EnumMember(Value = "-1879047924")] - ntfLDS_ASN_SignerInfo_SID_DigestAlgorithmNotListed = 122, + ntfLDS_ASN_SignerInfo_SID_DigestAlgorithmNotListed = 2415919372, /// - /// Enum ntfLDS_ASN_SignerInfo_MessageDigestAttr_Missing for value: -1879047923 + /// Enum ntfLDS_ASN_SignerInfo_MessageDigestAttr_Missing for value: 2415919373 /// - [EnumMember(Value = "-1879047923")] - ntfLDS_ASN_SignerInfo_MessageDigestAttr_Missing = 123, + ntfLDS_ASN_SignerInfo_MessageDigestAttr_Missing = 2415919373, /// - /// Enum ntfLDS_ASN_SignerInfo_MessageDigestAttr_Data for value: -1879047922 + /// Enum ntfLDS_ASN_SignerInfo_MessageDigestAttr_Data for value: 2415919374 /// - [EnumMember(Value = "-1879047922")] - ntfLDS_ASN_SignerInfo_MessageDigestAttr_Data = 124, + ntfLDS_ASN_SignerInfo_MessageDigestAttr_Data = 2415919374, /// - /// Enum ntfLDS_ASN_SignerInfo_MessageDigestAttr_Value for value: -1879047921 + /// Enum ntfLDS_ASN_SignerInfo_MessageDigestAttr_Value for value: 2415919375 /// - [EnumMember(Value = "-1879047921")] - ntfLDS_ASN_SignerInfo_MessageDigestAttr_Value = 125, + ntfLDS_ASN_SignerInfo_MessageDigestAttr_Value = 2415919375, /// - /// Enum ntfLDS_ASN_SignerInfo_ContentTypeAttr_Missing for value: -1879047920 + /// Enum ntfLDS_ASN_SignerInfo_ContentTypeAttr_Missing for value: 2415919376 /// - [EnumMember(Value = "-1879047920")] - ntfLDS_ASN_SignerInfo_ContentTypeAttr_Missing = 126, + ntfLDS_ASN_SignerInfo_ContentTypeAttr_Missing = 2415919376, /// - /// Enum ntfLDS_ASN_SignerInfo_ContentTypeAttr_Data for value: -1879047919 + /// Enum ntfLDS_ASN_SignerInfo_ContentTypeAttr_Data for value: 2415919377 /// - [EnumMember(Value = "-1879047919")] - ntfLDS_ASN_SignerInfo_ContentTypeAttr_Data = 127, + ntfLDS_ASN_SignerInfo_ContentTypeAttr_Data = 2415919377, /// - /// Enum ntfLDS_ASN_SignerInfo_ContentTypeAttr_Value for value: -1879047918 + /// Enum ntfLDS_ASN_SignerInfo_ContentTypeAttr_Value for value: 2415919378 /// - [EnumMember(Value = "-1879047918")] - ntfLDS_ASN_SignerInfo_ContentTypeAttr_Value = 128, + ntfLDS_ASN_SignerInfo_ContentTypeAttr_Value = 2415919378, /// - /// Enum ntfLDS_ASN_SignerInfo_SigningTimeAttr_Missing for value: -1879047909 + /// Enum ntfLDS_ASN_SignerInfo_SigningTimeAttr_Missing for value: 2415919387 /// - [EnumMember(Value = "-1879047909")] - ntfLDS_ASN_SignerInfo_SigningTimeAttr_Missing = 129, + ntfLDS_ASN_SignerInfo_SigningTimeAttr_Missing = 2415919387, /// - /// Enum ntfLDS_ASN_SignerInfo_SigningTimeAttr_Data for value: -1879047908 + /// Enum ntfLDS_ASN_SignerInfo_SigningTimeAttr_Data for value: 2415919388 /// - [EnumMember(Value = "-1879047908")] - ntfLDS_ASN_SignerInfo_SigningTimeAttr_Data = 130, + ntfLDS_ASN_SignerInfo_SigningTimeAttr_Data = 2415919388, /// - /// Enum ntfLDS_ASN_SignerInfo_SigningTimeAttr_Value for value: -1879047907 + /// Enum ntfLDS_ASN_SignerInfo_SigningTimeAttr_Value for value: 2415919389 /// - [EnumMember(Value = "-1879047907")] - ntfLDS_ASN_SignerInfo_SigningTimeAttr_Value = 131, + ntfLDS_ASN_SignerInfo_SigningTimeAttr_Value = 2415919389, /// - /// Enum ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Missing for value: -1879047906 + /// Enum ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Missing for value: 2415919390 /// - [EnumMember(Value = "-1879047906")] - ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Missing = 132, + ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Missing = 2415919390, /// - /// Enum ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Data for value: -1879047905 + /// Enum ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Data for value: 2415919391 /// - [EnumMember(Value = "-1879047905")] - ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Data = 133, + ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Data = 2415919391, /// - /// Enum ntfLDS_Auth_SignerInfo_Certificate_Validity for value: -1879047915 + /// Enum ntfLDS_Auth_SignerInfo_Certificate_Validity for value: 2415919381 /// - [EnumMember(Value = "-1879047915")] - ntfLDS_Auth_SignerInfo_Certificate_Validity = 134, + ntfLDS_Auth_SignerInfo_Certificate_Validity = 2415919381, /// - /// Enum ntfLDS_Auth_SignerInfo_Certificate_RootIsNotTrusted for value: -1879047914 + /// Enum ntfLDS_Auth_SignerInfo_Certificate_RootIsNotTrusted for value: 2415919382 /// - [EnumMember(Value = "-1879047914")] - ntfLDS_Auth_SignerInfo_Certificate_RootIsNotTrusted = 135, + ntfLDS_Auth_SignerInfo_Certificate_RootIsNotTrusted = 2415919382, /// - /// Enum ntfLDS_Auth_SignerInfo_Certificate_CantFindCSCA for value: -1879047913 + /// Enum ntfLDS_Auth_SignerInfo_Certificate_CantFindCSCA for value: 2415919383 /// - [EnumMember(Value = "-1879047913")] - ntfLDS_Auth_SignerInfo_Certificate_CantFindCSCA = 136, + ntfLDS_Auth_SignerInfo_Certificate_CantFindCSCA = 2415919383, /// - /// Enum ntfLDS_Auth_SignerInfo_Certificate_Revoked for value: -1879047912 + /// Enum ntfLDS_Auth_SignerInfo_Certificate_Revoked for value: 2415919384 /// - [EnumMember(Value = "-1879047912")] - ntfLDS_Auth_SignerInfo_Certificate_Revoked = 137, + ntfLDS_Auth_SignerInfo_Certificate_Revoked = 2415919384, /// - /// Enum ntfLDS_Auth_SignerInfo_Certificate_SignatureInvalid for value: -1879047911 + /// Enum ntfLDS_Auth_SignerInfo_Certificate_SignatureInvalid for value: 2415919385 /// - [EnumMember(Value = "-1879047911")] - ntfLDS_Auth_SignerInfo_Certificate_SignatureInvalid = 138, + ntfLDS_Auth_SignerInfo_Certificate_SignatureInvalid = 2415919385, /// - /// Enum ntfLDS_UnsupportedImageFormat for value: -1879047910 + /// Enum ntfLDS_UnsupportedImageFormat for value: 2415919386 /// - [EnumMember(Value = "-1879047910")] - ntfLDS_UnsupportedImageFormat = 139, + ntfLDS_UnsupportedImageFormat = 2415919386, /// /// Enum ntfLDS_MRZ_DocumentType_Unknown for value: 139272 /// - [EnumMember(Value = "139272")] - ntfLDS_MRZ_DocumentType_Unknown = 140, + ntfLDS_MRZ_DocumentType_Unknown = 139272, /// /// Enum ntfLDS_MRZ_IssuingState_SyntaxError for value: 139273 /// - [EnumMember(Value = "139273")] - ntfLDS_MRZ_IssuingState_SyntaxError = 141, + ntfLDS_MRZ_IssuingState_SyntaxError = 139273, /// /// Enum ntfLDS_MRZ_Name_IsVoid for value: 139274 /// - [EnumMember(Value = "139274")] - ntfLDS_MRZ_Name_IsVoid = 142, + ntfLDS_MRZ_Name_IsVoid = 139274, /// /// Enum ntfLDS_MRZ_Number_IncorrectChecksum for value: 139277 /// - [EnumMember(Value = "139277")] - ntfLDS_MRZ_Number_IncorrectChecksum = 143, + ntfLDS_MRZ_Number_IncorrectChecksum = 139277, /// /// Enum ntfLDS_MRZ_Nationality_SyntaxError for value: 139278 /// - [EnumMember(Value = "139278")] - ntfLDS_MRZ_Nationality_SyntaxError = 144, + ntfLDS_MRZ_Nationality_SyntaxError = 139278, /// /// Enum ntfLDS_MRZ_DOB_SyntaxError for value: 139279 /// - [EnumMember(Value = "139279")] - ntfLDS_MRZ_DOB_SyntaxError = 145, + ntfLDS_MRZ_DOB_SyntaxError = 139279, /// /// Enum ntfLDS_MRZ_DOB_Error for value: 139280 /// - [EnumMember(Value = "139280")] - ntfLDS_MRZ_DOB_Error = 146, + ntfLDS_MRZ_DOB_Error = 139280, /// /// Enum ntfLDS_MRZ_DOB_IncorrectChecksum for value: 139281 /// - [EnumMember(Value = "139281")] - ntfLDS_MRZ_DOB_IncorrectChecksum = 147, + ntfLDS_MRZ_DOB_IncorrectChecksum = 139281, /// /// Enum ntfLDS_MRZ_Sex_Incorrect for value: 139282 /// - [EnumMember(Value = "139282")] - ntfLDS_MRZ_Sex_Incorrect = 148, + ntfLDS_MRZ_Sex_Incorrect = 139282, /// /// Enum ntfLDS_MRZ_DOE_SyntaxError for value: 139283 /// - [EnumMember(Value = "139283")] - ntfLDS_MRZ_DOE_SyntaxError = 149, + ntfLDS_MRZ_DOE_SyntaxError = 139283, /// /// Enum ntfLDS_MRZ_DOE_Error for value: 139284 /// - [EnumMember(Value = "139284")] - ntfLDS_MRZ_DOE_Error = 150, + ntfLDS_MRZ_DOE_Error = 139284, /// /// Enum ntfLDS_MRZ_DOE_IncorrectChecksum for value: 139285 /// - [EnumMember(Value = "139285")] - ntfLDS_MRZ_DOE_IncorrectChecksum = 151, + ntfLDS_MRZ_DOE_IncorrectChecksum = 139285, /// /// Enum ntfLDS_MRZ_OptionalData_IncorrectChecksum for value: 139286 /// - [EnumMember(Value = "139286")] - ntfLDS_MRZ_OptionalData_IncorrectChecksum = 152, + ntfLDS_MRZ_OptionalData_IncorrectChecksum = 139286, /// /// Enum ntfLDS_MRZ_IncorrectChecksum for value: 139287 /// - [EnumMember(Value = "139287")] - ntfLDS_MRZ_IncorrectChecksum = 153, + ntfLDS_MRZ_IncorrectChecksum = 139287, /// /// Enum ntfLDS_MRZ_Incorrect for value: 139288 /// - [EnumMember(Value = "139288")] - ntfLDS_MRZ_Incorrect = 154, + ntfLDS_MRZ_Incorrect = 139288, /// - /// Enum ntfLDS_Biometrics_FormatOwner_Missing for value: -1878982656 + /// Enum ntfLDS_Biometrics_FormatOwner_Missing for value: 2415984640 /// - [EnumMember(Value = "-1878982656")] - ntfLDS_Biometrics_FormatOwner_Missing = 155, + ntfLDS_Biometrics_FormatOwner_Missing = 2415984640, /// - /// Enum ntfLDS_Biometrics_FormatOwner_Incorrect for value: -1878917120 + /// Enum ntfLDS_Biometrics_FormatOwner_Incorrect for value: 2416050176 /// - [EnumMember(Value = "-1878917120")] - ntfLDS_Biometrics_FormatOwner_Incorrect = 156, + ntfLDS_Biometrics_FormatOwner_Incorrect = 2416050176, /// - /// Enum ntfLDS_Biometrics_FormatType_Missing for value: -1878851584 + /// Enum ntfLDS_Biometrics_FormatType_Missing for value: 2416115712 /// - [EnumMember(Value = "-1878851584")] - ntfLDS_Biometrics_FormatType_Missing = 157, + ntfLDS_Biometrics_FormatType_Missing = 2416115712, /// - /// Enum ntfLDS_Biometrics_FormatType_Incorrect for value: -1878786048 + /// Enum ntfLDS_Biometrics_FormatType_Incorrect for value: 2416181248 /// - [EnumMember(Value = "-1878786048")] - ntfLDS_Biometrics_FormatType_Incorrect = 158, + ntfLDS_Biometrics_FormatType_Incorrect = 2416181248, /// - /// Enum ntfLDS_Biometrics_Type_Incorrect for value: -1878720512 + /// Enum ntfLDS_Biometrics_Type_Incorrect for value: 2416246784 /// - [EnumMember(Value = "-1878720512")] - ntfLDS_Biometrics_Type_Incorrect = 159, + ntfLDS_Biometrics_Type_Incorrect = 2416246784, /// - /// Enum ntfLDS_Biometrics_SubType_Missing for value: -1878654976 + /// Enum ntfLDS_Biometrics_SubType_Missing for value: 2416312320 /// - [EnumMember(Value = "-1878654976")] - ntfLDS_Biometrics_SubType_Missing = 160, + ntfLDS_Biometrics_SubType_Missing = 2416312320, /// - /// Enum ntfLDS_Biometrics_SubType_Incorrect for value: -1878589440 + /// Enum ntfLDS_Biometrics_SubType_Incorrect for value: 2416377856 /// - [EnumMember(Value = "-1878589440")] - ntfLDS_Biometrics_SubType_Incorrect = 161, + ntfLDS_Biometrics_SubType_Incorrect = 2416377856, /// - /// Enum ntfLDS_Biometrics_BDB_Image_Missing for value: -1878523904 + /// Enum ntfLDS_Biometrics_BDB_Image_Missing for value: 2416443392 /// - [EnumMember(Value = "-1878523904")] - ntfLDS_Biometrics_BDB_Image_Missing = 162, + ntfLDS_Biometrics_BDB_Image_Missing = 2416443392, /// - /// Enum ntfLDS_Biometrics_BDB_FormatID_Incorrect for value: -1878458368 + /// Enum ntfLDS_Biometrics_BDB_FormatID_Incorrect for value: 2416508928 /// - [EnumMember(Value = "-1878458368")] - ntfLDS_Biometrics_BDB_FormatID_Incorrect = 163, + ntfLDS_Biometrics_BDB_FormatID_Incorrect = 2416508928, /// - /// Enum ntfLDS_Biometrics_BDB_Version_Incorrect for value: -1878392832 + /// Enum ntfLDS_Biometrics_BDB_Version_Incorrect for value: 2416574464 /// - [EnumMember(Value = "-1878392832")] - ntfLDS_Biometrics_BDB_Version_Incorrect = 164, + ntfLDS_Biometrics_BDB_Version_Incorrect = 2416574464, /// - /// Enum ntfLDS_Biometrics_BDB_DataLength_Incorrect for value: -1878327296 + /// Enum ntfLDS_Biometrics_BDB_DataLength_Incorrect for value: 2416640000 /// - [EnumMember(Value = "-1878327296")] - ntfLDS_Biometrics_BDB_DataLength_Incorrect = 165, + ntfLDS_Biometrics_BDB_DataLength_Incorrect = 2416640000, /// - /// Enum ntfLDS_Biometrics_BDB_Data_Gender for value: -1877999616 + /// Enum ntfLDS_Biometrics_BDB_Data_Gender for value: 2416967680 /// - [EnumMember(Value = "-1877999616")] - ntfLDS_Biometrics_BDB_Data_Gender = 166, + ntfLDS_Biometrics_BDB_Data_Gender = 2416967680, /// - /// Enum ntfLDS_Biometrics_BDB_Data_EyeColor for value: -1877934080 + /// Enum ntfLDS_Biometrics_BDB_Data_EyeColor for value: 2417033216 /// - [EnumMember(Value = "-1877934080")] - ntfLDS_Biometrics_BDB_Data_EyeColor = 167, + ntfLDS_Biometrics_BDB_Data_EyeColor = 2417033216, /// - /// Enum ntfLDS_Biometrics_BDB_Data_HairColor for value: -1877868544 + /// Enum ntfLDS_Biometrics_BDB_Data_HairColor for value: 2417098752 /// - [EnumMember(Value = "-1877868544")] - ntfLDS_Biometrics_BDB_Data_HairColor = 168, + ntfLDS_Biometrics_BDB_Data_HairColor = 2417098752, /// - /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngle_Yaw for value: -1877803008 + /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngle_Yaw for value: 2417164288 /// - [EnumMember(Value = "-1877803008")] - ntfLDS_Biometrics_BDB_Data_PoseAngle_Yaw = 169, + ntfLDS_Biometrics_BDB_Data_PoseAngle_Yaw = 2417164288, /// - /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngle_Pitch for value: -1877737472 + /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngle_Pitch for value: 2417229824 /// - [EnumMember(Value = "-1877737472")] - ntfLDS_Biometrics_BDB_Data_PoseAngle_Pitch = 170, + ntfLDS_Biometrics_BDB_Data_PoseAngle_Pitch = 2417229824, /// - /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngle_Roll for value: -1877671936 + /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngle_Roll for value: 2417295360 /// - [EnumMember(Value = "-1877671936")] - ntfLDS_Biometrics_BDB_Data_PoseAngle_Roll = 171, + ntfLDS_Biometrics_BDB_Data_PoseAngle_Roll = 2417295360, /// - /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngleU_Yaw for value: -1877606400 + /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngleU_Yaw for value: 2417360896 /// - [EnumMember(Value = "-1877606400")] - ntfLDS_Biometrics_BDB_Data_PoseAngleU_Yaw = 172, + ntfLDS_Biometrics_BDB_Data_PoseAngleU_Yaw = 2417360896, /// - /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngleU_Pitch for value: -1877540864 + /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngleU_Pitch for value: 2417426432 /// - [EnumMember(Value = "-1877540864")] - ntfLDS_Biometrics_BDB_Data_PoseAngleU_Pitch = 173, + ntfLDS_Biometrics_BDB_Data_PoseAngleU_Pitch = 2417426432, /// - /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngleU_Roll for value: -1877475328 + /// Enum ntfLDS_Biometrics_BDB_Data_PoseAngleU_Roll for value: 2417491968 /// - [EnumMember(Value = "-1877475328")] - ntfLDS_Biometrics_BDB_Data_PoseAngleU_Roll = 174, + ntfLDS_Biometrics_BDB_Data_PoseAngleU_Roll = 2417491968, /// - /// Enum ntfLDS_Biometrics_BDB_Data_FaceImageType for value: -1877409792 + /// Enum ntfLDS_Biometrics_BDB_Data_FaceImageType for value: 2417557504 /// - [EnumMember(Value = "-1877409792")] - ntfLDS_Biometrics_BDB_Data_FaceImageType = 175, + ntfLDS_Biometrics_BDB_Data_FaceImageType = 2417557504, /// - /// Enum ntfLDS_Biometrics_BDB_Data_ImageDataType for value: -1877344256 + /// Enum ntfLDS_Biometrics_BDB_Data_ImageDataType for value: 2417623040 /// - [EnumMember(Value = "-1877344256")] - ntfLDS_Biometrics_BDB_Data_ImageDataType = 176, + ntfLDS_Biometrics_BDB_Data_ImageDataType = 2417623040, /// - /// Enum ntfLDS_SI_PACE_Info_UnsupportedStdParameters for value: -1862270976 + /// Enum ntfLDS_SI_PACE_Info_UnsupportedStdParameters for value: 2432696320 /// - [EnumMember(Value = "-1862270976")] - ntfLDS_SI_PACE_Info_UnsupportedStdParameters = 177, + ntfLDS_SI_PACE_Info_UnsupportedStdParameters = 2432696320, /// - /// Enum ntfLDS_SI_PACE_Info_DeprecatedVersion for value: -1862270975 + /// Enum ntfLDS_SI_PACE_Info_DeprecatedVersion for value: 2432696321 /// - [EnumMember(Value = "-1862270975")] - ntfLDS_SI_PACE_Info_DeprecatedVersion = 178, + ntfLDS_SI_PACE_Info_DeprecatedVersion = 2432696321, /// - /// Enum ntfLDS_SI_PACE_DomainParams_UsingStdRef for value: -1862270974 + /// Enum ntfLDS_SI_PACE_DomainParams_UsingStdRef for value: 2432696322 /// - [EnumMember(Value = "-1862270974")] - ntfLDS_SI_PACE_DomainParams_UsingStdRef = 179, + ntfLDS_SI_PACE_DomainParams_UsingStdRef = 2432696322, /// - /// Enum ntfLDS_SI_PACE_DomainParams_UnsupportedAlgorithm for value: -1862270973 + /// Enum ntfLDS_SI_PACE_DomainParams_UnsupportedAlgorithm for value: 2432696323 /// - [EnumMember(Value = "-1862270973")] - ntfLDS_SI_PACE_DomainParams_UnsupportedAlgorithm = 180, + ntfLDS_SI_PACE_DomainParams_UnsupportedAlgorithm = 2432696323, /// - /// Enum ntfLDS_SI_CA_Info_IncorrectVersion for value: -1862270972 + /// Enum ntfLDS_SI_CA_Info_IncorrectVersion for value: 2432696324 /// - [EnumMember(Value = "-1862270972")] - ntfLDS_SI_CA_Info_IncorrectVersion = 181, + ntfLDS_SI_CA_Info_IncorrectVersion = 2432696324, /// - /// Enum ntfLDS_SI_CA_PublicKey_UnsupportedAlgorithm for value: -1862270971 + /// Enum ntfLDS_SI_CA_PublicKey_UnsupportedAlgorithm for value: 2432696325 /// - [EnumMember(Value = "-1862270971")] - ntfLDS_SI_CA_PublicKey_UnsupportedAlgorithm = 182, + ntfLDS_SI_CA_PublicKey_UnsupportedAlgorithm = 2432696325, /// - /// Enum ntfLDS_SI_CA_DomainParams_UnsupportedAlgorithm for value: -1862270970 + /// Enum ntfLDS_SI_CA_DomainParams_UnsupportedAlgorithm for value: 2432696326 /// - [EnumMember(Value = "-1862270970")] - ntfLDS_SI_CA_DomainParams_UnsupportedAlgorithm = 183, + ntfLDS_SI_CA_DomainParams_UnsupportedAlgorithm = 2432696326, /// - /// Enum ntfLDS_SI_TA_Info_IncorrectVersion for value: -1862270969 + /// Enum ntfLDS_SI_TA_Info_IncorrectVersion for value: 2432696327 /// - [EnumMember(Value = "-1862270969")] - ntfLDS_SI_TA_Info_IncorrectVersion = 184, + ntfLDS_SI_TA_Info_IncorrectVersion = 2432696327, /// - /// Enum ntfLDS_SI_TA_Info_FileIDForVersion2 for value: -1862270968 + /// Enum ntfLDS_SI_TA_Info_FileIDForVersion2 for value: 2432696328 /// - [EnumMember(Value = "-1862270968")] - ntfLDS_SI_TA_Info_FileIDForVersion2 = 185, + ntfLDS_SI_TA_Info_FileIDForVersion2 = 2432696328, /// - /// Enum ntfLDS_SI_eIDSecurity_UnsupportedDigestAlgorithm for value: -1862270967 + /// Enum ntfLDS_SI_eIDSecurity_UnsupportedDigestAlgorithm for value: 2432696329 /// - [EnumMember(Value = "-1862270967")] - ntfLDS_SI_eIDSecurity_UnsupportedDigestAlgorithm = 186, + ntfLDS_SI_eIDSecurity_UnsupportedDigestAlgorithm = 2432696329, /// - /// Enum ntfLDS_SI_RI_Info_IncorrectVersion for value: -1862270966 + /// Enum ntfLDS_SI_RI_Info_IncorrectVersion for value: 2432696330 /// - [EnumMember(Value = "-1862270966")] - ntfLDS_SI_RI_Info_IncorrectVersion = 187, + ntfLDS_SI_RI_Info_IncorrectVersion = 2432696330, /// - /// Enum ntfLDS_SI_RI_DomainParams_UnsupportedAlgorithm for value: -1862270965 + /// Enum ntfLDS_SI_RI_DomainParams_UnsupportedAlgorithm for value: 2432696331 /// - [EnumMember(Value = "-1862270965")] - ntfLDS_SI_RI_DomainParams_UnsupportedAlgorithm = 188, + ntfLDS_SI_RI_DomainParams_UnsupportedAlgorithm = 2432696331, /// - /// Enum ntfLDS_SI_AA_Info_IncorrectVersion for value: -1862270964 + /// Enum ntfLDS_SI_AA_Info_IncorrectVersion for value: 2432696332 /// - [EnumMember(Value = "-1862270964")] - ntfLDS_SI_AA_Info_IncorrectVersion = 189, + ntfLDS_SI_AA_Info_IncorrectVersion = 2432696332, /// - /// Enum ntfLDS_SI_AA_Info_UnsupportedAlgorithm for value: -1862270963 + /// Enum ntfLDS_SI_AA_Info_UnsupportedAlgorithm for value: 2432696333 /// - [EnumMember(Value = "-1862270963")] - ntfLDS_SI_AA_Info_UnsupportedAlgorithm = 190, + ntfLDS_SI_AA_Info_UnsupportedAlgorithm = 2432696333, /// - /// Enum ntfLDS_SI_AA_Info_InconsistentAlgorithmReference for value: -1862270962 + /// Enum ntfLDS_SI_AA_Info_InconsistentAlgorithmReference for value: 2432696334 /// - [EnumMember(Value = "-1862270962")] - ntfLDS_SI_AA_Info_InconsistentAlgorithmReference = 191, + ntfLDS_SI_AA_Info_InconsistentAlgorithmReference = 2432696334, /// - /// Enum ntfLDS_SI_Storage_PACE_Info_NotAvailable for value: -1862270720 + /// Enum ntfLDS_SI_Storage_PACE_Info_NotAvailable for value: 2432696576 /// - [EnumMember(Value = "-1862270720")] - ntfLDS_SI_Storage_PACE_Info_NotAvailable = 192, + ntfLDS_SI_Storage_PACE_Info_NotAvailable = 2432696576, /// - /// Enum ntfLDS_SI_Storage_PACE_Info_NoStdParameters for value: -1862270719 + /// Enum ntfLDS_SI_Storage_PACE_Info_NoStdParameters for value: 2432696577 /// - [EnumMember(Value = "-1862270719")] - ntfLDS_SI_Storage_PACE_Info_NoStdParameters = 193, + ntfLDS_SI_Storage_PACE_Info_NoStdParameters = 2432696577, /// - /// Enum ntfLDS_SI_Storage_PACE_Info_NoMatchingDomainParams for value: -1862270718 + /// Enum ntfLDS_SI_Storage_PACE_Info_NoMatchingDomainParams for value: 2432696578 /// - [EnumMember(Value = "-1862270718")] - ntfLDS_SI_Storage_PACE_Info_NoMatchingDomainParams = 194, + ntfLDS_SI_Storage_PACE_Info_NoMatchingDomainParams = 2432696578, /// - /// Enum ntfLDS_SI_Storage_CA_Info_NotAvailable for value: -1862270717 + /// Enum ntfLDS_SI_Storage_CA_Info_NotAvailable for value: 2432696579 /// - [EnumMember(Value = "-1862270717")] - ntfLDS_SI_Storage_CA_Info_NotAvailable = 195, + ntfLDS_SI_Storage_CA_Info_NotAvailable = 2432696579, /// - /// Enum ntfLDS_SI_Storage_CA_DomainParams_NoRequiredOption for value: -1862270716 + /// Enum ntfLDS_SI_Storage_CA_DomainParams_NoRequiredOption for value: 2432696580 /// - [EnumMember(Value = "-1862270716")] - ntfLDS_SI_Storage_CA_DomainParams_NoRequiredOption = 196, + ntfLDS_SI_Storage_CA_DomainParams_NoRequiredOption = 2432696580, /// - /// Enum ntfLDS_SI_Storage_CA_DomainParams_NotAvailable for value: -1862270715 + /// Enum ntfLDS_SI_Storage_CA_DomainParams_NotAvailable for value: 2432696581 /// - [EnumMember(Value = "-1862270715")] - ntfLDS_SI_Storage_CA_DomainParams_NotAvailable = 197, + ntfLDS_SI_Storage_CA_DomainParams_NotAvailable = 2432696581, /// - /// Enum ntfLDS_SI_Storage_CA_AnonymousInfos for value: -1862270714 + /// Enum ntfLDS_SI_Storage_CA_AnonymousInfos for value: 2432696582 /// - [EnumMember(Value = "-1862270714")] - ntfLDS_SI_Storage_CA_AnonymousInfos = 198, + ntfLDS_SI_Storage_CA_AnonymousInfos = 2432696582, /// - /// Enum ntfLDS_SI_Storage_CA_Info_NoMatchingDomainParams for value: -1862270713 + /// Enum ntfLDS_SI_Storage_CA_Info_NoMatchingDomainParams for value: 2432696583 /// - [EnumMember(Value = "-1862270713")] - ntfLDS_SI_Storage_CA_Info_NoMatchingDomainParams = 199, + ntfLDS_SI_Storage_CA_Info_NoMatchingDomainParams = 2432696583, /// - /// Enum ntfLDS_SI_Storage_CA_Info_NoMatchingPublicKey for value: -1862270712 + /// Enum ntfLDS_SI_Storage_CA_Info_NoMatchingPublicKey for value: 2432696584 /// - [EnumMember(Value = "-1862270712")] - ntfLDS_SI_Storage_CA_Info_NoMatchingPublicKey = 200, + ntfLDS_SI_Storage_CA_Info_NoMatchingPublicKey = 2432696584, /// - /// Enum ntfLDS_SI_Storage_CA_IncorrectInfosQuantity for value: -1862270711 + /// Enum ntfLDS_SI_Storage_CA_IncorrectInfosQuantity for value: 2432696585 /// - [EnumMember(Value = "-1862270711")] - ntfLDS_SI_Storage_CA_IncorrectInfosQuantity = 201, + ntfLDS_SI_Storage_CA_IncorrectInfosQuantity = 2432696585, /// - /// Enum ntfLDS_SI_Storage_TA_Info_NotAvailable for value: -1862270710 + /// Enum ntfLDS_SI_Storage_TA_Info_NotAvailable for value: 2432696586 /// - [EnumMember(Value = "-1862270710")] - ntfLDS_SI_Storage_TA_Info_NotAvailable = 202, + ntfLDS_SI_Storage_TA_Info_NotAvailable = 2432696586, /// - /// Enum ntfLDS_SI_Storage_CardInfoLocator_MultipleEntries for value: -1862270709 + /// Enum ntfLDS_SI_Storage_CardInfoLocator_MultipleEntries for value: 2432696587 /// - [EnumMember(Value = "-1862270709")] - ntfLDS_SI_Storage_CardInfoLocator_MultipleEntries = 203, + ntfLDS_SI_Storage_CardInfoLocator_MultipleEntries = 2432696587, /// - /// Enum ntfLDS_SI_Storage_eIDSecurityInfo_MultipleEntries for value: -1862270708 + /// Enum ntfLDS_SI_Storage_eIDSecurityInfo_MultipleEntries for value: 2432696588 /// - [EnumMember(Value = "-1862270708")] - ntfLDS_SI_Storage_eIDSecurityInfo_MultipleEntries = 204, + ntfLDS_SI_Storage_eIDSecurityInfo_MultipleEntries = 2432696588, /// - /// Enum ntfLDS_SI_Storage_PrivilegedTI_MultipleEntries for value: -1862270707 + /// Enum ntfLDS_SI_Storage_PrivilegedTI_MultipleEntries for value: 2432696589 /// - [EnumMember(Value = "-1862270707")] - ntfLDS_SI_Storage_PrivilegedTI_MultipleEntries = 205, + ntfLDS_SI_Storage_PrivilegedTI_MultipleEntries = 2432696589, /// - /// Enum ntfLDS_SI_Storage_PrivilegedTI_IncorrectUsage for value: -1862270706 + /// Enum ntfLDS_SI_Storage_PrivilegedTI_IncorrectUsage for value: 2432696590 /// - [EnumMember(Value = "-1862270706")] - ntfLDS_SI_Storage_PrivilegedTI_IncorrectUsage = 206, + ntfLDS_SI_Storage_PrivilegedTI_IncorrectUsage = 2432696590, /// - /// Enum ntfLDS_SI_Storage_RI_DomainParams_MultipleEntries for value: -1862270705 + /// Enum ntfLDS_SI_Storage_RI_DomainParams_MultipleEntries for value: 2432696591 /// - [EnumMember(Value = "-1862270705")] - ntfLDS_SI_Storage_RI_DomainParams_MultipleEntries = 207, + ntfLDS_SI_Storage_RI_DomainParams_MultipleEntries = 2432696591, /// - /// Enum ntfLDS_SI_Storage_PACEInfos_NonConsistant for value: -1862270704 + /// Enum ntfLDS_SI_Storage_PACEInfos_NonConsistant for value: 2432696592 /// - [EnumMember(Value = "-1862270704")] - ntfLDS_SI_Storage_PACEInfos_NonConsistant = 208, + ntfLDS_SI_Storage_PACEInfos_NonConsistant = 2432696592, /// - /// Enum ntfLDS_CVCertificate_Profile_IncorrectVersion for value: -1862270463 + /// Enum ntfLDS_CVCertificate_Profile_IncorrectVersion for value: 2432696833 /// - [EnumMember(Value = "-1862270463")] - ntfLDS_CVCertificate_Profile_IncorrectVersion = 209, + ntfLDS_CVCertificate_Profile_IncorrectVersion = 2432696833, /// - /// Enum ntfLDS_CVCertificate_Validity for value: -1862270462 + /// Enum ntfLDS_CVCertificate_Validity for value: 2432696834 /// - [EnumMember(Value = "-1862270462")] - ntfLDS_CVCertificate_Validity = 210, + ntfLDS_CVCertificate_Validity = 2432696834, /// - /// Enum ntfLDS_CVCertificate_NonCVCADomainParameters for value: -1862270461 + /// Enum ntfLDS_CVCertificate_NonCVCADomainParameters for value: 2432696835 /// - [EnumMember(Value = "-1862270461")] - ntfLDS_CVCertificate_NonCVCADomainParameters = 211, + ntfLDS_CVCertificate_NonCVCADomainParameters = 2432696835, /// - /// Enum ntfLDS_CV_Certificate_PrivateKey_IncorrectVersion for value: -1862270460 + /// Enum ntfLDS_CV_Certificate_PrivateKey_IncorrectVersion for value: 2432696836 /// - [EnumMember(Value = "-1862270460")] - ntfLDS_CV_Certificate_PrivateKey_IncorrectVersion = 212, + ntfLDS_CV_Certificate_PrivateKey_IncorrectVersion = 2432696836, /// - /// Enum ntfLDS_TA_PACEStaticBindingUsed for value: -1862270208 + /// Enum ntfLDS_TA_PACEStaticBindingUsed for value: 2432697088 /// - [EnumMember(Value = "-1862270208")] - ntfLDS_TA_PACEStaticBindingUsed = 213, + ntfLDS_TA_PACEStaticBindingUsed = 2432697088, /// - /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_Validity for value: -1845493483 + /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_Validity for value: 2449473813 /// - [EnumMember(Value = "-1845493483")] - ntfLDS_Auth_MLSignerInfo_Certificate_Validity = 214, + ntfLDS_Auth_MLSignerInfo_Certificate_Validity = 2449473813, /// - /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_RootIsNotTrusted for value: -1845493482 + /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_RootIsNotTrusted for value: 2449473814 /// - [EnumMember(Value = "-1845493482")] - ntfLDS_Auth_MLSignerInfo_Certificate_RootIsNotTrusted = 215, + ntfLDS_Auth_MLSignerInfo_Certificate_RootIsNotTrusted = 2449473814, /// - /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_CantFindCSCA for value: -1845493481 + /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_CantFindCSCA for value: 2449473815 /// - [EnumMember(Value = "-1845493481")] - ntfLDS_Auth_MLSignerInfo_Certificate_CantFindCSCA = 216, + ntfLDS_Auth_MLSignerInfo_Certificate_CantFindCSCA = 2449473815, /// - /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_Revoked for value: -1845493480 + /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_Revoked for value: 2449473816 /// - [EnumMember(Value = "-1845493480")] - ntfLDS_Auth_MLSignerInfo_Certificate_Revoked = 217, + ntfLDS_Auth_MLSignerInfo_Certificate_Revoked = 2449473816, /// - /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_SignatureInvalid for value: -1845493479 + /// Enum ntfLDS_Auth_MLSignerInfo_Certificate_SignatureInvalid for value: 2449473817 /// - [EnumMember(Value = "-1845493479")] - ntfLDS_Auth_MLSignerInfo_Certificate_SignatureInvalid = 218, + ntfLDS_Auth_MLSignerInfo_Certificate_SignatureInvalid = 2449473817, /// - /// Enum ntfLDS_ICAO_Certificate_Chain_Country_NonMatching for value: -1879047600 + /// Enum ntfLDS_ICAO_Certificate_Chain_Country_NonMatching for value: 2415919696 /// - [EnumMember(Value = "-1879047600")] - ntfLDS_ICAO_Certificate_Chain_Country_NonMatching = 219, + ntfLDS_ICAO_Certificate_Chain_Country_NonMatching = 2415919696, /// - /// Enum ntfLDS_ICAO_Certificate_VisualMrz_Country_NonMatching for value: -1879047599 + /// Enum ntfLDS_ICAO_Certificate_VisualMrz_Country_NonMatching for value: 2415919697 /// - [EnumMember(Value = "-1879047599")] - ntfLDS_ICAO_Certificate_VisualMrz_Country_NonMatching = 220, + ntfLDS_ICAO_Certificate_VisualMrz_Country_NonMatching = 2415919697, /// /// Enum ntfLDS_MRZ_CountryCode_VisualMrz_NonMatching for value: 139289 /// - [EnumMember(Value = "139289")] - ntfLDS_MRZ_CountryCode_VisualMrz_NonMatching = 221, + ntfLDS_MRZ_CountryCode_VisualMrz_NonMatching = 139289, + + /// + /// Enum ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching for value: 2415919698 + /// + ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching = 2415919698 + } + + /// + /// Converts to and from the JSON value + /// + public static class ParsingNotificationCodesValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static ParsingNotificationCodes FromString(string value) + { + if (value.Equals((2415919105).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectVersion; + + if (value.Equals((2415919106).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_NonMatchingSignatureAlgorithm; + + if (value.Equals((2415919107).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectTimeCoding; + + if (value.Equals((2415919108).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectUseOfGeneralizedTime; + + if (value.Equals((2415919109).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_EmptyIssuer; + + if (value.Equals((2415919110).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_EmptySubject; + + if (value.Equals((2415919112).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_UnsupportedCriticalExtension; + + if (value.Equals((2415919118).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_ForcedDefaultCSCARole; + + if (value.Equals((2415919119).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_ForcedDefaultDSRole; + + if (value.Equals((2415919120).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectIssuerSubjectDS; + + if (value.Equals((2415919127).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_DuplicatingExtensions; + + if (value.Equals((2415919616).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Version_Missed; + + if (value.Equals((2415919617).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Version_Incorrect; + + if (value.Equals((2415919618).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_Country_Missed; + + if (value.Equals((2415919619).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_CommonName_Missed; + + if (value.Equals((2415919620).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_CountryNonCompliant; + + if (value.Equals((2415919621).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_Country_Missed; + + if (value.Equals((2415919622).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CommonName_Missed; + + if (value.Equals((2415919623).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CountryNonCompliant; + + if (value.Equals((2415919624).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UsingNonCompliantData; + + if (value.Equals((2415919625).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UnsupportedSignatureAlgorithm; + + if (value.Equals((2415919626).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UnsupportedPublicKeyAlgorithm; + + if (value.Equals((2415919627).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_MissedExtensions; + + if (value.Equals((2415919628).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Validity; + + if (value.Equals((2415919629).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_UsingNonCompliantData; + + if (value.Equals((2415919630).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_Missed; + + if (value.Equals((2415919631).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_NotCritical; + + if (value.Equals((2415919632).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_IncorrectData; + + if (value.Equals((2415919633).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_Missed; + + if (value.Equals((2415919634).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage1; + + if (value.Equals((2415919635).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage2; + + if (value.Equals((2415919636).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_NotCritical; + + if (value.Equals((2415919637).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectData; + + if (value.Equals((2415919638).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Missed; + + if (value.Equals((2415919639).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Incorrect; + + if (value.Equals((2415919640).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_NotCritical; + + if (value.Equals((2415919641).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectUsage; + + if (value.Equals((2415919642).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectData; + + if (value.Equals((2415919643).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_Missed; + + if (value.Equals((2415919644).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_IncorrectData; + + if (value.Equals((2415919645).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_KeyID_Missed; + + if (value.Equals((2415919646).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_Missed; + + if (value.Equals((2415919647).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_IncorrectData; + + if (value.Equals((2415919648).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Missed; + + if (value.Equals((2415919649).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_IncorrectData; + + if (value.Equals((2415919650).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Empty; + + if (value.Equals((2415919651).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Missed; + + if (value.Equals((2415919652).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_IncorrectData; + + if (value.Equals((2415919653).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Empty; + + if (value.Equals((2415919654).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_NonCompliant; + + if (value.Equals((2415919656).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Critical; + + if (value.Equals((2415919657).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Empty; + + if (value.Equals((2415919658).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Incorrect; + + if (value.Equals((2415919659).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_NonCompliant; + + if (value.Equals((2415919660).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Missed; + + if (value.Equals((2415919661).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_IncorrectData; + + if (value.Equals((2415919662).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Empty; + + if (value.Equals((2415919663).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_NonCompliant; + + if (value.Equals((2415919665).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Critical; + + if (value.Equals((2415919666).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Empty; + + if (value.Equals((2415919667).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Incorrect; + + if (value.Equals((2415919668).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_NonCompliant; + + if (value.Equals((2415919669).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Missed; + + if (value.Equals((2415919670).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_IncorrectData; + + if (value.Equals((2415919671).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Version; + + if (value.Equals((2415919672).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes; + + if (value.Equals((2415919673).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes_Empty; + + if (value.Equals((2415919674).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_IncorrectData; + + if (value.Equals((2415919675).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_Empty; + + if (value.Equals((2415919676).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_PolicyID_Missed; + + if (value.Equals((2415919677).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Missed; + + if (value.Equals((2415919678).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_IncorrectData; + + if (value.Equals((2415919679).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Empty; + + if (value.Equals((2415919680).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_PointMissed; + + if (value.Equals((2415919681).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_SN_NonCompliant; + + if (value.Equals((2415919682).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_SN_NonCompliant; + + if (value.Equals((2415919683).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_SN_NonCompliant; + + if (value.Equals((2415919684).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_AttributeNonCompliant; + + if (value.Equals((2415919685).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_AttributeNonCompliant; + + if (value.Equals((2415919686).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_IssuerSubject_Country_NonMatching; + + if (value.Equals((2415919687).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CSCA_AltNames_NonMatching; + + if (value.Equals((2415919688).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_IncorrectData; + + if (value.Equals((2415919689).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_NonCompliant; + + if (value.Equals((2415919690).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_Critical; + + if (value.Equals((2415919691).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_NonCompliant; + + if (value.Equals((2415919692).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Critical; + + if (value.Equals((2415919693).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_Optional_Critical; + + if (value.Equals((2415919694).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_NonCompliant; + + if (value.Equals((2415919695).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CommonNameNonCompliant; + + if (value.Equals((2415919136).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_LDS_Version_Incorrect; + + if (value.Equals((2415919137).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_LDS_Version_Missing; + + if (value.Equals((2415919138).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_Unicode_Version_Incorrect; + + if (value.Equals((2415919139).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_Unicode_Version_Missing; + + if (value.Equals((2415919140).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Incorrect; + + if (value.Equals((2415919141).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Missing; + + if (value.Equals((2415919142).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Unexpected; + + if (value.Equals((2415919152).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Application_LDSVersion_Unsupported; + + if (value.Equals((2415919153).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Application_UnicodeVersion_Unsupported; + + if (value.Equals((2415919154).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Application_LDSVersion_Inconsistent; + + if (value.Equals((2415919155).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Application_UnicodeVersion_Inconsistent; + + if (value.Equals((2415919360).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignedData_OID_Incorrect; + + if (value.Equals((2415919520).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignedData_Version_Incorrect; + + if (value.Equals((2415919521).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignedData_ContentOID_Incorrect; + + if (value.Equals((2415919361).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Version_Incorrect; + + if (value.Equals((2415919362).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_DigestAlgorithms_Empty; + + if (value.Equals((2415919363).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_DigestAlgorithms_Unsupported; + + if (value.Equals((2415919369).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_SignerInfos_MultipleEntries; + + if (value.Equals((2415919536).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Certificates_Missed; + + if (value.Equals((2415919537).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Certificates_Empty; + + if (value.Equals((2415919538).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_CRLs_IncorrectUsage; + + if (value.Equals((2415919364).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_IncorrectContentOID; + + if (value.Equals((2415919365).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGNumber_Incorrect; + + if (value.Equals((2415919366).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGHash_Missing; + + if (value.Equals((2415919367).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGHash_Extra; + + if (value.Equals((2415919368).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_Version_Incorrect; + + if (value.Equals((2415919552).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_MasterList_Version_Incorrect; + + if (value.Equals((2415919560).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_DeviationList_Version_Incorrect; + + if (value.Equals((2415919568).ToString())) + return ParsingNotificationCodes.ntfLDS_BSI_DefectList_Version_Incorrect; + + if (value.Equals((2415919576).ToString())) + return ParsingNotificationCodes.ntfLDS_BSI_BlackList_Version_Incorrect; + + if (value.Equals((2415919370).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_Version_Incorrect; + + if (value.Equals((2415919371).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SID_IncorrectChoice; + + if (value.Equals((2415919372).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SID_DigestAlgorithmNotListed; + + if (value.Equals((2415919373).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Missing; + + if (value.Equals((2415919374).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Data; + + if (value.Equals((2415919375).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Value; + + if (value.Equals((2415919376).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Missing; + + if (value.Equals((2415919377).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Data; + + if (value.Equals((2415919378).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Value; + + if (value.Equals((2415919387).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Missing; + + if (value.Equals((2415919388).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Data; + + if (value.Equals((2415919389).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Value; + + if (value.Equals((2415919390).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Missing; + + if (value.Equals((2415919391).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Data; + + if (value.Equals((2415919381).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_Validity; + + if (value.Equals((2415919382).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_RootIsNotTrusted; + + if (value.Equals((2415919383).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_CantFindCSCA; + + if (value.Equals((2415919384).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_Revoked; + + if (value.Equals((2415919385).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_SignatureInvalid; + + if (value.Equals((2415919386).ToString())) + return ParsingNotificationCodes.ntfLDS_UnsupportedImageFormat; + + if (value.Equals((139272).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DocumentType_Unknown; + + if (value.Equals((139273).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_IssuingState_SyntaxError; + + if (value.Equals((139274).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Name_IsVoid; + + if (value.Equals((139277).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Number_IncorrectChecksum; + + if (value.Equals((139278).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Nationality_SyntaxError; + + if (value.Equals((139279).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOB_SyntaxError; + + if (value.Equals((139280).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOB_Error; + + if (value.Equals((139281).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOB_IncorrectChecksum; + + if (value.Equals((139282).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Sex_Incorrect; + + if (value.Equals((139283).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOE_SyntaxError; + + if (value.Equals((139284).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOE_Error; + + if (value.Equals((139285).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOE_IncorrectChecksum; + + if (value.Equals((139286).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_OptionalData_IncorrectChecksum; + + if (value.Equals((139287).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_IncorrectChecksum; + + if (value.Equals((139288).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Incorrect; + + if (value.Equals((2415984640).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_FormatOwner_Missing; + + if (value.Equals((2416050176).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_FormatOwner_Incorrect; + + if (value.Equals((2416115712).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_FormatType_Missing; + + if (value.Equals((2416181248).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_FormatType_Incorrect; + + if (value.Equals((2416246784).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_Type_Incorrect; + + if (value.Equals((2416312320).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_SubType_Missing; + + if (value.Equals((2416377856).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_SubType_Incorrect; + + if (value.Equals((2416443392).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Image_Missing; + + if (value.Equals((2416508928).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_FormatID_Incorrect; + + if (value.Equals((2416574464).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Version_Incorrect; + + if (value.Equals((2416640000).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_DataLength_Incorrect; + + if (value.Equals((2416967680).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_Gender; + + if (value.Equals((2417033216).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_EyeColor; + + if (value.Equals((2417098752).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_HairColor; + + if (value.Equals((2417164288).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Yaw; + + if (value.Equals((2417229824).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Pitch; + + if (value.Equals((2417295360).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Roll; + + if (value.Equals((2417360896).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Yaw; + + if (value.Equals((2417426432).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Pitch; + + if (value.Equals((2417491968).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Roll; + + if (value.Equals((2417557504).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_FaceImageType; + + if (value.Equals((2417623040).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_ImageDataType; + + if (value.Equals((2432696320).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_PACE_Info_UnsupportedStdParameters; + + if (value.Equals((2432696321).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_PACE_Info_DeprecatedVersion; + + if (value.Equals((2432696322).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_PACE_DomainParams_UsingStdRef; + + if (value.Equals((2432696323).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_PACE_DomainParams_UnsupportedAlgorithm; + + if (value.Equals((2432696324).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_CA_Info_IncorrectVersion; + + if (value.Equals((2432696325).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_CA_PublicKey_UnsupportedAlgorithm; + + if (value.Equals((2432696326).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_CA_DomainParams_UnsupportedAlgorithm; + + if (value.Equals((2432696327).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_TA_Info_IncorrectVersion; + + if (value.Equals((2432696328).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_TA_Info_FileIDForVersion2; + + if (value.Equals((2432696329).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_eIDSecurity_UnsupportedDigestAlgorithm; + + if (value.Equals((2432696330).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_RI_Info_IncorrectVersion; + + if (value.Equals((2432696331).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_RI_DomainParams_UnsupportedAlgorithm; + + if (value.Equals((2432696332).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_AA_Info_IncorrectVersion; + + if (value.Equals((2432696333).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_AA_Info_UnsupportedAlgorithm; + + if (value.Equals((2432696334).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_AA_Info_InconsistentAlgorithmReference; + + if (value.Equals((2432696576).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NotAvailable; + + if (value.Equals((2432696577).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NoStdParameters; + + if (value.Equals((2432696578).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NoMatchingDomainParams; + + if (value.Equals((2432696579).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NotAvailable; + + if (value.Equals((2432696580).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_DomainParams_NoRequiredOption; + + if (value.Equals((2432696581).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_DomainParams_NotAvailable; + + if (value.Equals((2432696582).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_AnonymousInfos; + + if (value.Equals((2432696583).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NoMatchingDomainParams; + + if (value.Equals((2432696584).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NoMatchingPublicKey; + + if (value.Equals((2432696585).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_IncorrectInfosQuantity; + + if (value.Equals((2432696586).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_TA_Info_NotAvailable; + + if (value.Equals((2432696587).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CardInfoLocator_MultipleEntries; + + if (value.Equals((2432696588).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_eIDSecurityInfo_MultipleEntries; + + if (value.Equals((2432696589).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PrivilegedTI_MultipleEntries; + + if (value.Equals((2432696590).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PrivilegedTI_IncorrectUsage; + + if (value.Equals((2432696591).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_RI_DomainParams_MultipleEntries; + + if (value.Equals((2432696592).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PACEInfos_NonConsistant; + + if (value.Equals((2432696833).ToString())) + return ParsingNotificationCodes.ntfLDS_CVCertificate_Profile_IncorrectVersion; + + if (value.Equals((2432696834).ToString())) + return ParsingNotificationCodes.ntfLDS_CVCertificate_Validity; + + if (value.Equals((2432696835).ToString())) + return ParsingNotificationCodes.ntfLDS_CVCertificate_NonCVCADomainParameters; + + if (value.Equals((2432696836).ToString())) + return ParsingNotificationCodes.ntfLDS_CV_Certificate_PrivateKey_IncorrectVersion; + + if (value.Equals((2432697088).ToString())) + return ParsingNotificationCodes.ntfLDS_TA_PACEStaticBindingUsed; + + if (value.Equals((2449473813).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_Validity; + + if (value.Equals((2449473814).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_RootIsNotTrusted; + + if (value.Equals((2449473815).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_CantFindCSCA; + + if (value.Equals((2449473816).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_Revoked; + + if (value.Equals((2449473817).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_SignatureInvalid; + + if (value.Equals((2415919696).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Chain_Country_NonMatching; + + if (value.Equals((2415919697).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_VisualMrz_Country_NonMatching; + + if (value.Equals((139289).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_CountryCode_VisualMrz_NonMatching; + + if (value.Equals((2415919698).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching; + + throw new NotImplementedException($"Could not convert value to type ParsingNotificationCodes: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static ParsingNotificationCodes? FromStringOrDefault(string value) + { + if (value.Equals((2415919105).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectVersion; + + if (value.Equals((2415919106).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_NonMatchingSignatureAlgorithm; + + if (value.Equals((2415919107).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectTimeCoding; + + if (value.Equals((2415919108).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectUseOfGeneralizedTime; + + if (value.Equals((2415919109).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_EmptyIssuer; + + if (value.Equals((2415919110).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_EmptySubject; + + if (value.Equals((2415919112).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_UnsupportedCriticalExtension; + + if (value.Equals((2415919118).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_ForcedDefaultCSCARole; + + if (value.Equals((2415919119).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_ForcedDefaultDSRole; + + if (value.Equals((2415919120).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectIssuerSubjectDS; + + if (value.Equals((2415919127).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_Certificate_DuplicatingExtensions; + + if (value.Equals((2415919616).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Version_Missed; + + if (value.Equals((2415919617).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Version_Incorrect; + + if (value.Equals((2415919618).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_Country_Missed; + + if (value.Equals((2415919619).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_CommonName_Missed; + + if (value.Equals((2415919620).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_CountryNonCompliant; + + if (value.Equals((2415919621).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_Country_Missed; + + if (value.Equals((2415919622).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CommonName_Missed; + + if (value.Equals((2415919623).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CountryNonCompliant; + + if (value.Equals((2415919624).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UsingNonCompliantData; + + if (value.Equals((2415919625).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UnsupportedSignatureAlgorithm; + + if (value.Equals((2415919626).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UnsupportedPublicKeyAlgorithm; + + if (value.Equals((2415919627).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_MissedExtensions; + + if (value.Equals((2415919628).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Validity; + + if (value.Equals((2415919629).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_UsingNonCompliantData; + + if (value.Equals((2415919630).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_Missed; + + if (value.Equals((2415919631).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_NotCritical; + + if (value.Equals((2415919632).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_IncorrectData; + + if (value.Equals((2415919633).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_Missed; + + if (value.Equals((2415919634).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage1; + + if (value.Equals((2415919635).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage2; + + if (value.Equals((2415919636).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_NotCritical; + + if (value.Equals((2415919637).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectData; + + if (value.Equals((2415919638).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Missed; + + if (value.Equals((2415919639).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Incorrect; + + if (value.Equals((2415919640).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_NotCritical; + + if (value.Equals((2415919641).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectUsage; + + if (value.Equals((2415919642).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectData; + + if (value.Equals((2415919643).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_Missed; + + if (value.Equals((2415919644).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_IncorrectData; + + if (value.Equals((2415919645).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_KeyID_Missed; + + if (value.Equals((2415919646).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_Missed; + + if (value.Equals((2415919647).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_IncorrectData; + + if (value.Equals((2415919648).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Missed; + + if (value.Equals((2415919649).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_IncorrectData; + + if (value.Equals((2415919650).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Empty; + + if (value.Equals((2415919651).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Missed; + + if (value.Equals((2415919652).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_IncorrectData; + + if (value.Equals((2415919653).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Empty; + + if (value.Equals((2415919654).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_NonCompliant; + + if (value.Equals((2415919656).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Critical; + + if (value.Equals((2415919657).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Empty; + + if (value.Equals((2415919658).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Incorrect; + + if (value.Equals((2415919659).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_NonCompliant; + + if (value.Equals((2415919660).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Missed; + + if (value.Equals((2415919661).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_IncorrectData; + + if (value.Equals((2415919662).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Empty; + + if (value.Equals((2415919663).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_NonCompliant; + + if (value.Equals((2415919665).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Critical; + + if (value.Equals((2415919666).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Empty; + + if (value.Equals((2415919667).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Incorrect; + + if (value.Equals((2415919668).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_NonCompliant; + + if (value.Equals((2415919669).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Missed; + + if (value.Equals((2415919670).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_IncorrectData; + + if (value.Equals((2415919671).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Version; + + if (value.Equals((2415919672).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes; + + if (value.Equals((2415919673).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes_Empty; + + if (value.Equals((2415919674).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_IncorrectData; + + if (value.Equals((2415919675).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_Empty; + + if (value.Equals((2415919676).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_PolicyID_Missed; + + if (value.Equals((2415919677).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Missed; + + if (value.Equals((2415919678).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_IncorrectData; + + if (value.Equals((2415919679).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Empty; + + if (value.Equals((2415919680).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_PointMissed; + + if (value.Equals((2415919681).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_SN_NonCompliant; + + if (value.Equals((2415919682).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_SN_NonCompliant; + + if (value.Equals((2415919683).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_SN_NonCompliant; + + if (value.Equals((2415919684).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_AttributeNonCompliant; + + if (value.Equals((2415919685).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_AttributeNonCompliant; + + if (value.Equals((2415919686).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_IssuerSubject_Country_NonMatching; + + if (value.Equals((2415919687).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CSCA_AltNames_NonMatching; + + if (value.Equals((2415919688).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_IncorrectData; + + if (value.Equals((2415919689).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_NonCompliant; + + if (value.Equals((2415919690).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_Critical; + + if (value.Equals((2415919691).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_NonCompliant; + + if (value.Equals((2415919692).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Critical; + + if (value.Equals((2415919693).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_Optional_Critical; + + if (value.Equals((2415919694).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_NonCompliant; + + if (value.Equals((2415919695).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CommonNameNonCompliant; + + if (value.Equals((2415919136).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_LDS_Version_Incorrect; + + if (value.Equals((2415919137).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_LDS_Version_Missing; + + if (value.Equals((2415919138).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_Unicode_Version_Incorrect; + + if (value.Equals((2415919139).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_Unicode_Version_Missing; + + if (value.Equals((2415919140).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Incorrect; + + if (value.Equals((2415919141).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Missing; + + if (value.Equals((2415919142).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Unexpected; + + if (value.Equals((2415919152).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Application_LDSVersion_Unsupported; + + if (value.Equals((2415919153).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Application_UnicodeVersion_Unsupported; + + if (value.Equals((2415919154).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Application_LDSVersion_Inconsistent; + + if (value.Equals((2415919155).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Application_UnicodeVersion_Inconsistent; + + if (value.Equals((2415919360).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignedData_OID_Incorrect; + + if (value.Equals((2415919520).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignedData_Version_Incorrect; + + if (value.Equals((2415919521).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignedData_ContentOID_Incorrect; + + if (value.Equals((2415919361).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Version_Incorrect; + + if (value.Equals((2415919362).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_DigestAlgorithms_Empty; + + if (value.Equals((2415919363).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_DigestAlgorithms_Unsupported; + + if (value.Equals((2415919369).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_SignerInfos_MultipleEntries; + + if (value.Equals((2415919536).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Certificates_Missed; + + if (value.Equals((2415919537).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Certificates_Empty; + + if (value.Equals((2415919538).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_CRLs_IncorrectUsage; + + if (value.Equals((2415919364).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_IncorrectContentOID; + + if (value.Equals((2415919365).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGNumber_Incorrect; + + if (value.Equals((2415919366).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGHash_Missing; + + if (value.Equals((2415919367).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGHash_Extra; + + if (value.Equals((2415919368).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_Version_Incorrect; + + if (value.Equals((2415919552).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_MasterList_Version_Incorrect; + + if (value.Equals((2415919560).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_DeviationList_Version_Incorrect; + + if (value.Equals((2415919568).ToString())) + return ParsingNotificationCodes.ntfLDS_BSI_DefectList_Version_Incorrect; + + if (value.Equals((2415919576).ToString())) + return ParsingNotificationCodes.ntfLDS_BSI_BlackList_Version_Incorrect; + + if (value.Equals((2415919370).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_Version_Incorrect; + + if (value.Equals((2415919371).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SID_IncorrectChoice; + + if (value.Equals((2415919372).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SID_DigestAlgorithmNotListed; + + if (value.Equals((2415919373).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Missing; + + if (value.Equals((2415919374).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Data; + + if (value.Equals((2415919375).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Value; + + if (value.Equals((2415919376).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Missing; + + if (value.Equals((2415919377).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Data; + + if (value.Equals((2415919378).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Value; + + if (value.Equals((2415919387).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Missing; + + if (value.Equals((2415919388).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Data; + + if (value.Equals((2415919389).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Value; + + if (value.Equals((2415919390).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Missing; + + if (value.Equals((2415919391).ToString())) + return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Data; + + if (value.Equals((2415919381).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_Validity; + + if (value.Equals((2415919382).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_RootIsNotTrusted; + + if (value.Equals((2415919383).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_CantFindCSCA; + + if (value.Equals((2415919384).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_Revoked; + + if (value.Equals((2415919385).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_SignatureInvalid; + + if (value.Equals((2415919386).ToString())) + return ParsingNotificationCodes.ntfLDS_UnsupportedImageFormat; + + if (value.Equals((139272).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DocumentType_Unknown; + + if (value.Equals((139273).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_IssuingState_SyntaxError; + + if (value.Equals((139274).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Name_IsVoid; + + if (value.Equals((139277).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Number_IncorrectChecksum; + + if (value.Equals((139278).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Nationality_SyntaxError; + + if (value.Equals((139279).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOB_SyntaxError; + + if (value.Equals((139280).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOB_Error; + + if (value.Equals((139281).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOB_IncorrectChecksum; + + if (value.Equals((139282).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Sex_Incorrect; + + if (value.Equals((139283).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOE_SyntaxError; + + if (value.Equals((139284).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOE_Error; + + if (value.Equals((139285).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_DOE_IncorrectChecksum; + + if (value.Equals((139286).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_OptionalData_IncorrectChecksum; + + if (value.Equals((139287).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_IncorrectChecksum; + + if (value.Equals((139288).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_Incorrect; + + if (value.Equals((2415984640).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_FormatOwner_Missing; + + if (value.Equals((2416050176).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_FormatOwner_Incorrect; + + if (value.Equals((2416115712).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_FormatType_Missing; + + if (value.Equals((2416181248).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_FormatType_Incorrect; + + if (value.Equals((2416246784).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_Type_Incorrect; + + if (value.Equals((2416312320).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_SubType_Missing; + + if (value.Equals((2416377856).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_SubType_Incorrect; + + if (value.Equals((2416443392).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Image_Missing; + + if (value.Equals((2416508928).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_FormatID_Incorrect; + + if (value.Equals((2416574464).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Version_Incorrect; + + if (value.Equals((2416640000).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_DataLength_Incorrect; + + if (value.Equals((2416967680).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_Gender; + + if (value.Equals((2417033216).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_EyeColor; + + if (value.Equals((2417098752).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_HairColor; + + if (value.Equals((2417164288).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Yaw; + + if (value.Equals((2417229824).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Pitch; + + if (value.Equals((2417295360).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Roll; + + if (value.Equals((2417360896).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Yaw; + + if (value.Equals((2417426432).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Pitch; + + if (value.Equals((2417491968).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Roll; + + if (value.Equals((2417557504).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_FaceImageType; + + if (value.Equals((2417623040).ToString())) + return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_ImageDataType; + + if (value.Equals((2432696320).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_PACE_Info_UnsupportedStdParameters; + + if (value.Equals((2432696321).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_PACE_Info_DeprecatedVersion; + + if (value.Equals((2432696322).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_PACE_DomainParams_UsingStdRef; + + if (value.Equals((2432696323).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_PACE_DomainParams_UnsupportedAlgorithm; + + if (value.Equals((2432696324).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_CA_Info_IncorrectVersion; + + if (value.Equals((2432696325).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_CA_PublicKey_UnsupportedAlgorithm; + + if (value.Equals((2432696326).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_CA_DomainParams_UnsupportedAlgorithm; + + if (value.Equals((2432696327).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_TA_Info_IncorrectVersion; + + if (value.Equals((2432696328).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_TA_Info_FileIDForVersion2; + + if (value.Equals((2432696329).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_eIDSecurity_UnsupportedDigestAlgorithm; + + if (value.Equals((2432696330).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_RI_Info_IncorrectVersion; + + if (value.Equals((2432696331).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_RI_DomainParams_UnsupportedAlgorithm; + + if (value.Equals((2432696332).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_AA_Info_IncorrectVersion; + + if (value.Equals((2432696333).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_AA_Info_UnsupportedAlgorithm; + + if (value.Equals((2432696334).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_AA_Info_InconsistentAlgorithmReference; + + if (value.Equals((2432696576).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NotAvailable; + + if (value.Equals((2432696577).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NoStdParameters; + + if (value.Equals((2432696578).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NoMatchingDomainParams; + + if (value.Equals((2432696579).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NotAvailable; + + if (value.Equals((2432696580).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_DomainParams_NoRequiredOption; + + if (value.Equals((2432696581).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_DomainParams_NotAvailable; + + if (value.Equals((2432696582).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_AnonymousInfos; + + if (value.Equals((2432696583).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NoMatchingDomainParams; + + if (value.Equals((2432696584).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NoMatchingPublicKey; + + if (value.Equals((2432696585).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_IncorrectInfosQuantity; + + if (value.Equals((2432696586).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_TA_Info_NotAvailable; + + if (value.Equals((2432696587).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_CardInfoLocator_MultipleEntries; + + if (value.Equals((2432696588).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_eIDSecurityInfo_MultipleEntries; + + if (value.Equals((2432696589).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PrivilegedTI_MultipleEntries; + + if (value.Equals((2432696590).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PrivilegedTI_IncorrectUsage; + + if (value.Equals((2432696591).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_RI_DomainParams_MultipleEntries; + + if (value.Equals((2432696592).ToString())) + return ParsingNotificationCodes.ntfLDS_SI_Storage_PACEInfos_NonConsistant; + + if (value.Equals((2432696833).ToString())) + return ParsingNotificationCodes.ntfLDS_CVCertificate_Profile_IncorrectVersion; + + if (value.Equals((2432696834).ToString())) + return ParsingNotificationCodes.ntfLDS_CVCertificate_Validity; + + if (value.Equals((2432696835).ToString())) + return ParsingNotificationCodes.ntfLDS_CVCertificate_NonCVCADomainParameters; + + if (value.Equals((2432696836).ToString())) + return ParsingNotificationCodes.ntfLDS_CV_Certificate_PrivateKey_IncorrectVersion; + + if (value.Equals((2432697088).ToString())) + return ParsingNotificationCodes.ntfLDS_TA_PACEStaticBindingUsed; + + if (value.Equals((2449473813).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_Validity; + + if (value.Equals((2449473814).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_RootIsNotTrusted; + + if (value.Equals((2449473815).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_CantFindCSCA; + + if (value.Equals((2449473816).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_Revoked; + + if (value.Equals((2449473817).ToString())) + return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_SignatureInvalid; + + if (value.Equals((2415919696).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Chain_Country_NonMatching; + + if (value.Equals((2415919697).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_VisualMrz_Country_NonMatching; + + if (value.Equals((139289).ToString())) + return ParsingNotificationCodes.ntfLDS_MRZ_CountryCode_VisualMrz_NonMatching; + + if (value.Equals((2415919698).ToString())) + return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static long ToJsonValue(ParsingNotificationCodes value) + { + return (long) value; + } + } + /// + /// A Json converter for type + /// + /// + public class ParsingNotificationCodesJsonConverter : JsonConverter + { /// - /// Enum ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching for value: -1879047598 + /// Returns a from the Json object /// - [EnumMember(Value = "-1879047598")] - ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching = 222 + /// + /// + /// + /// + public override ParsingNotificationCodes Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + ParsingNotificationCodes? result = rawValue == null + ? null + : ParsingNotificationCodesValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + throw new JsonException(); + } + + /// + /// Writes the ParsingNotificationCodes to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ParsingNotificationCodes parsingNotificationCodes, JsonSerializerOptions options) + { + writer.WriteStringValue(parsingNotificationCodes.ToString()); + } } + /// + /// A Json converter for type + /// + public class ParsingNotificationCodesNullableJsonConverter : JsonConverter + { + /// + /// Returns a ParsingNotificationCodes from the Json object + /// + /// + /// + /// + /// + public override ParsingNotificationCodes? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + ParsingNotificationCodes? result = rawValue == null + ? null + : ParsingNotificationCodesValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ParsingNotificationCodes? parsingNotificationCodes, JsonSerializerOptions options) + { + writer.WriteStringValue(parsingNotificationCodes?.ToString() ?? "null"); + } + } } diff --git a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs index 6ab4246..b897f5f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs @@ -1,59 +1,78 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// PerDocumentConfig /// - [DataContract] - public partial class PerDocumentConfig : IEquatable, IValidatableObject + public partial class PerDocumentConfig : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Specific template IDs, for which apply current custom configuration. - /// Contains items from AuthenticityResultType as sum via OR operation. - public PerDocumentConfig(List docID = default(List), int excludeAuthChecks = default(int)) + /// Specific template IDs, for which apply current custom configuration + /// Contains items from AuthenticityResultType as sum via OR operation + [JsonConstructor] + public PerDocumentConfig(Option?> docID = default, Option excludeAuthChecks = default) { - this.DocID = docID; - this.ExcludeAuthChecks = excludeAuthChecks; + DocIDOption = docID; + ExcludeAuthChecksOption = excludeAuthChecks; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of DocID + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> DocIDOption { get; private set; } + /// /// Specific template IDs, for which apply current custom configuration /// /// Specific template IDs, for which apply current custom configuration - [DataMember(Name="docID", EmitDefaultValue=false)] - public List DocID { get; set; } + [JsonPropertyName("docID")] + public List? DocID { get { return this.DocIDOption; } set { this.DocIDOption = new(value); } } + + /// + /// Used to track the state of ExcludeAuthChecks + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ExcludeAuthChecksOption { get; private set; } /// /// Contains items from AuthenticityResultType as sum via OR operation /// /// Contains items from AuthenticityResultType as sum via OR operation - [DataMember(Name="excludeAuthChecks", EmitDefaultValue=false)] - public int ExcludeAuthChecks { get; set; } + /* 2 */ + [JsonPropertyName("excludeAuthChecks")] + public int? ExcludeAuthChecks { get { return this.ExcludeAuthChecksOption; } set { this.ExcludeAuthChecksOption = new(value); } } /// /// Returns the string presentation of the object @@ -61,83 +80,122 @@ public partial class PerDocumentConfig : IEquatable, IValida /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class PerDocumentConfig {\n"); sb.Append(" DocID: ").Append(DocID).Append("\n"); sb.Append(" ExcludeAuthChecks: ").Append(ExcludeAuthChecks).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class PerDocumentConfigJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override PerDocumentConfig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as PerDocumentConfig); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> docID = default; + Option excludeAuthChecks = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "docID": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docID = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "excludeAuthChecks": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + excludeAuthChecks = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (docID.IsSet && docID.Value == null) + throw new ArgumentNullException(nameof(docID), "Property is not nullable for class PerDocumentConfig."); + + if (excludeAuthChecks.IsSet && excludeAuthChecks.Value == null) + throw new ArgumentNullException(nameof(excludeAuthChecks), "Property is not nullable for class PerDocumentConfig."); + + return new PerDocumentConfig(docID, excludeAuthChecks); } /// - /// Returns true if PerDocumentConfig instances are equal + /// Serializes a /// - /// Instance of PerDocumentConfig to be compared - /// Boolean - public bool Equals(PerDocumentConfig input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PerDocumentConfig perDocumentConfig, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.DocID == input.DocID || - this.DocID != null && - input.DocID != null && - this.DocID.SequenceEqual(input.DocID) - ) && - ( - this.ExcludeAuthChecks == input.ExcludeAuthChecks || - (this.ExcludeAuthChecks != null && - this.ExcludeAuthChecks.Equals(input.ExcludeAuthChecks)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, perDocumentConfig, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, PerDocumentConfig perDocumentConfig, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (perDocumentConfig.DocIDOption.IsSet && perDocumentConfig.DocID == null) + throw new ArgumentNullException(nameof(perDocumentConfig.DocID), "Property is required for class PerDocumentConfig."); + + if (perDocumentConfig.DocIDOption.IsSet) { - int hashCode = 41; - if (this.DocID != null) - hashCode = hashCode * 59 + this.DocID.GetHashCode(); - if (this.ExcludeAuthChecks != null) - hashCode = hashCode * 59 + this.ExcludeAuthChecks.GetHashCode(); - return hashCode; + writer.WritePropertyName("docID"); + JsonSerializer.Serialize(writer, perDocumentConfig.DocID, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (perDocumentConfig.ExcludeAuthChecksOption.IsSet) + writer.WriteNumber("excludeAuthChecks", perDocumentConfig.ExcludeAuthChecksOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs new file mode 100644 index 0000000..1fa1fcf --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs @@ -0,0 +1,432 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// PhotoIdentItem + /// + public partial class PhotoIdentItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// lightIndex + /// area + /// sourceImage + /// resultImages + /// fieldTypesCount + /// fieldTypesList + /// step + /// angle + /// reserved1 + /// reserved2 + /// reserved3 + [JsonConstructor] + public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sourceImage, RawImageContainerList resultImages, Option fieldTypesCount = default, Option?> fieldTypesList = default, Option step = default, Option angle = default, Option reserved1 = default, Option reserved2 = default, Option reserved3 = default) + { + LightIndex = lightIndex; + Area = area; + SourceImage = sourceImage; + ResultImages = resultImages; + FieldTypesCountOption = fieldTypesCount; + FieldTypesListOption = fieldTypesList; + StepOption = step; + AngleOption = angle; + Reserved1Option = reserved1; + Reserved2Option = reserved2; + Reserved3Option = reserved3; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets LightIndex + /// + [JsonPropertyName("LightIndex")] + public Light LightIndex { get; set; } + + /// + /// Gets or Sets Area + /// + [JsonPropertyName("Area")] + public RectangleCoordinates Area { get; set; } + + /// + /// Gets or Sets SourceImage + /// + [JsonPropertyName("SourceImage")] + public ImageData SourceImage { get; set; } + + /// + /// Gets or Sets ResultImages + /// + [JsonPropertyName("ResultImages")] + public RawImageContainerList ResultImages { get; set; } + + /// + /// Used to track the state of FieldTypesCount + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldTypesCountOption { get; private set; } + + /// + /// Gets or Sets FieldTypesCount + /// + [JsonPropertyName("FieldTypesCount")] + public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new(value); } } + + /// + /// Used to track the state of FieldTypesList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> FieldTypesListOption { get; private set; } + + /// + /// Gets or Sets FieldTypesList + /// + [JsonPropertyName("FieldTypesList")] + public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new(value); } } + + /// + /// Used to track the state of Step + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option StepOption { get; private set; } + + /// + /// Gets or Sets Step + /// + [JsonPropertyName("Step")] + public int? Step { get { return this.StepOption; } set { this.StepOption = new(value); } } + + /// + /// Used to track the state of Angle + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AngleOption { get; private set; } + + /// + /// Gets or Sets Angle + /// + [JsonPropertyName("Angle")] + public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new(value); } } + + /// + /// Used to track the state of Reserved1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved1Option { get; private set; } + + /// + /// Gets or Sets Reserved1 + /// + [JsonPropertyName("Reserved1")] + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + + /// + /// Used to track the state of Reserved2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved2Option { get; private set; } + + /// + /// Gets or Sets Reserved2 + /// + [JsonPropertyName("Reserved2")] + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + + /// + /// Used to track the state of Reserved3 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved3Option { get; private set; } + + /// + /// Gets or Sets Reserved3 + /// + [JsonPropertyName("Reserved3")] + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class PhotoIdentItem {\n"); + sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); + sb.Append(" Area: ").Append(Area).Append("\n"); + sb.Append(" SourceImage: ").Append(SourceImage).Append("\n"); + sb.Append(" ResultImages: ").Append(ResultImages).Append("\n"); + sb.Append(" FieldTypesCount: ").Append(FieldTypesCount).Append("\n"); + sb.Append(" FieldTypesList: ").Append(FieldTypesList).Append("\n"); + sb.Append(" Step: ").Append(Step).Append("\n"); + sb.Append(" Angle: ").Append(Angle).Append("\n"); + sb.Append(" Reserved1: ").Append(Reserved1).Append("\n"); + sb.Append(" Reserved2: ").Append(Reserved2).Append("\n"); + sb.Append(" Reserved3: ").Append(Reserved3).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class PhotoIdentItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override PhotoIdentItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option lightIndex = default; + Option area = default; + Option sourceImage = default; + Option resultImages = default; + Option fieldTypesCount = default; + Option?> fieldTypesList = default; + Option step = default; + Option angle = default; + Option reserved1 = default; + Option reserved2 = default; + Option reserved3 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "LightIndex": + string? lightIndexRawValue = utf8JsonReader.GetString(); + if (lightIndexRawValue != null) + lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); + break; + case "Area": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + area = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SourceImage": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sourceImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "ResultImages": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultImages = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "FieldTypesCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldTypesCount = new Option(utf8JsonReader.GetInt32()); + break; + case "FieldTypesList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldTypesList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Step": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + step = new Option(utf8JsonReader.GetInt32()); + break; + case "Angle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + angle = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved1 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved3": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved3 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!lightIndex.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentItem.", nameof(lightIndex)); + + if (!area.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentItem.", nameof(area)); + + if (!sourceImage.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentItem.", nameof(sourceImage)); + + if (!resultImages.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentItem.", nameof(resultImages)); + + if (lightIndex.IsSet && lightIndex.Value == null) + throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class PhotoIdentItem."); + + if (area.IsSet && area.Value == null) + throw new ArgumentNullException(nameof(area), "Property is not nullable for class PhotoIdentItem."); + + if (sourceImage.IsSet && sourceImage.Value == null) + throw new ArgumentNullException(nameof(sourceImage), "Property is not nullable for class PhotoIdentItem."); + + if (resultImages.IsSet && resultImages.Value == null) + throw new ArgumentNullException(nameof(resultImages), "Property is not nullable for class PhotoIdentItem."); + + if (fieldTypesCount.IsSet && fieldTypesCount.Value == null) + throw new ArgumentNullException(nameof(fieldTypesCount), "Property is not nullable for class PhotoIdentItem."); + + if (fieldTypesList.IsSet && fieldTypesList.Value == null) + throw new ArgumentNullException(nameof(fieldTypesList), "Property is not nullable for class PhotoIdentItem."); + + if (step.IsSet && step.Value == null) + throw new ArgumentNullException(nameof(step), "Property is not nullable for class PhotoIdentItem."); + + if (angle.IsSet && angle.Value == null) + throw new ArgumentNullException(nameof(angle), "Property is not nullable for class PhotoIdentItem."); + + if (reserved1.IsSet && reserved1.Value == null) + throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class PhotoIdentItem."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class PhotoIdentItem."); + + if (reserved3.IsSet && reserved3.Value == null) + throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class PhotoIdentItem."); + + return new PhotoIdentItem(lightIndex.Value!.Value!, area.Value!, sourceImage.Value!, resultImages.Value!, fieldTypesCount, fieldTypesList, step, angle, reserved1, reserved2, reserved3); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PhotoIdentItem photoIdentItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, photoIdentItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, PhotoIdentItem photoIdentItem, JsonSerializerOptions jsonSerializerOptions) + { + if (photoIdentItem.Area == null) + throw new ArgumentNullException(nameof(photoIdentItem.Area), "Property is required for class PhotoIdentItem."); + + if (photoIdentItem.SourceImage == null) + throw new ArgumentNullException(nameof(photoIdentItem.SourceImage), "Property is required for class PhotoIdentItem."); + + if (photoIdentItem.ResultImages == null) + throw new ArgumentNullException(nameof(photoIdentItem.ResultImages), "Property is required for class PhotoIdentItem."); + + if (photoIdentItem.FieldTypesListOption.IsSet && photoIdentItem.FieldTypesList == null) + throw new ArgumentNullException(nameof(photoIdentItem.FieldTypesList), "Property is required for class PhotoIdentItem."); + + var lightIndexRawValue = LightValueConverter.ToJsonValue(photoIdentItem.LightIndex); + writer.WriteNumber("LightIndex", lightIndexRawValue); + + writer.WritePropertyName("Area"); + JsonSerializer.Serialize(writer, photoIdentItem.Area, jsonSerializerOptions); + writer.WritePropertyName("SourceImage"); + JsonSerializer.Serialize(writer, photoIdentItem.SourceImage, jsonSerializerOptions); + writer.WritePropertyName("ResultImages"); + JsonSerializer.Serialize(writer, photoIdentItem.ResultImages, jsonSerializerOptions); + if (photoIdentItem.FieldTypesCountOption.IsSet) + writer.WriteNumber("FieldTypesCount", photoIdentItem.FieldTypesCountOption.Value!.Value); + + if (photoIdentItem.FieldTypesListOption.IsSet) + { + writer.WritePropertyName("FieldTypesList"); + JsonSerializer.Serialize(writer, photoIdentItem.FieldTypesList, jsonSerializerOptions); + } + if (photoIdentItem.StepOption.IsSet) + writer.WriteNumber("Step", photoIdentItem.StepOption.Value!.Value); + + if (photoIdentItem.AngleOption.IsSet) + writer.WriteNumber("Angle", photoIdentItem.AngleOption.Value!.Value); + + if (photoIdentItem.Reserved1Option.IsSet) + writer.WriteNumber("Reserved1", photoIdentItem.Reserved1Option.Value!.Value); + + if (photoIdentItem.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", photoIdentItem.Reserved2Option.Value!.Value); + + if (photoIdentItem.Reserved3Option.IsSet) + writer.WriteNumber("Reserved3", photoIdentItem.Reserved3Option.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs index 4b3d55e..f24abdf 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs @@ -1,118 +1,185 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// PhotoIdentResult /// - [DataContract] - public partial class PhotoIdentResult : AuthenticityCheckResultItem, IEquatable, IValidatableObject + public partial class PhotoIdentResult : AuthenticityCheckResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected PhotoIdentResult() { } - /// - /// Initializes a new instance of the class. - /// - /// lightIndex. - /// area. - /// sourceImage. - /// resultImages. - /// fieldTypesCount. - /// fieldTypesList. - /// step. - /// angle. - /// reserved3. - public PhotoIdentResult(int lightIndex = default(int), RectangleCoordinates area = default(RectangleCoordinates), ImageData sourceImage = default(ImageData), RawImageContainerList resultImages = default(RawImageContainerList), int fieldTypesCount = default(int), List fieldTypesList = default(List), int step = default(int), int angle = default(int), int reserved3 = default(int), int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + /// lightIndex + /// area + /// sourceImage + /// resultImages + /// elementResult + /// elementDiagnose + /// percentValue + /// fieldTypesCount + /// fieldTypesList + /// step + /// angle + /// reserved1 + /// reserved2 + /// reserved3 + [JsonConstructor] + public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData sourceImage, RawImageContainerList resultImages, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option fieldTypesCount = default, Option?> fieldTypesList = default, Option step = default, Option angle = default, Option reserved1 = default, Option reserved2 = default, Option reserved3 = default) : base(elementResult, elementDiagnose, percentValue) { - this.LightIndex = lightIndex; - this.Area = area; - this.SourceImage = sourceImage; - this.ResultImages = resultImages; - this.FieldTypesCount = fieldTypesCount; - this.FieldTypesList = fieldTypesList; - this.Step = step; - this.Angle = angle; - this.Reserved3 = reserved3; + LightIndex = lightIndex; + Area = area; + SourceImage = sourceImage; + ResultImages = resultImages; + FieldTypesCountOption = fieldTypesCount; + FieldTypesListOption = fieldTypesList; + StepOption = step; + AngleOption = angle; + Reserved1Option = reserved1; + Reserved2Option = reserved2; + Reserved3Option = reserved3; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets LightIndex /// - [DataMember(Name="LightIndex", EmitDefaultValue=false)] - public int LightIndex { get; set; } + [JsonPropertyName("LightIndex")] + public Light LightIndex { get; set; } /// /// Gets or Sets Area /// - [DataMember(Name="Area", EmitDefaultValue=false)] + [JsonPropertyName("Area")] public RectangleCoordinates Area { get; set; } /// /// Gets or Sets SourceImage /// - [DataMember(Name="SourceImage", EmitDefaultValue=false)] + [JsonPropertyName("SourceImage")] public ImageData SourceImage { get; set; } /// /// Gets or Sets ResultImages /// - [DataMember(Name="ResultImages", EmitDefaultValue=false)] + [JsonPropertyName("ResultImages")] public RawImageContainerList ResultImages { get; set; } + /// + /// Used to track the state of FieldTypesCount + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldTypesCountOption { get; private set; } + /// /// Gets or Sets FieldTypesCount /// - [DataMember(Name="FieldTypesCount", EmitDefaultValue=false)] - public int FieldTypesCount { get; set; } + [JsonPropertyName("FieldTypesCount")] + public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new(value); } } + + /// + /// Used to track the state of FieldTypesList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> FieldTypesListOption { get; private set; } /// /// Gets or Sets FieldTypesList /// - [DataMember(Name="FieldTypesList", EmitDefaultValue=false)] - public List FieldTypesList { get; set; } + [JsonPropertyName("FieldTypesList")] + public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new(value); } } + + /// + /// Used to track the state of Step + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option StepOption { get; private set; } /// /// Gets or Sets Step /// - [DataMember(Name="Step", EmitDefaultValue=false)] - public int Step { get; set; } + [JsonPropertyName("Step")] + public int? Step { get { return this.StepOption; } set { this.StepOption = new(value); } } + + /// + /// Used to track the state of Angle + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AngleOption { get; private set; } /// /// Gets or Sets Angle /// - [DataMember(Name="Angle", EmitDefaultValue=false)] - public int Angle { get; set; } + [JsonPropertyName("Angle")] + public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new(value); } } + + /// + /// Used to track the state of Reserved1 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved1Option { get; private set; } + + /// + /// Gets or Sets Reserved1 + /// + [JsonPropertyName("Reserved1")] + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + + /// + /// Used to track the state of Reserved2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved2Option { get; private set; } + + /// + /// Gets or Sets Reserved2 + /// + [JsonPropertyName("Reserved2")] + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + + /// + /// Used to track the state of Reserved3 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved3Option { get; private set; } /// /// Gets or Sets Reserved3 /// - [DataMember(Name="Reserved3", EmitDefaultValue=false)] - public int Reserved3 { get; set; } + [JsonPropertyName("Reserved3")] + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } /// /// Returns the string presentation of the object @@ -120,9 +187,9 @@ protected PhotoIdentResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class PhotoIdentResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" SourceImage: ").Append(SourceImage).Append("\n"); @@ -131,130 +198,281 @@ public override string ToString() sb.Append(" FieldTypesList: ").Append(FieldTypesList).Append("\n"); sb.Append(" Step: ").Append(Step).Append("\n"); sb.Append(" Angle: ").Append(Angle).Append("\n"); + sb.Append(" Reserved1: ").Append(Reserved1).Append("\n"); + sb.Append(" Reserved2: ").Append(Reserved2).Append("\n"); sb.Append(" Reserved3: ").Append(Reserved3).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class PhotoIdentResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override PhotoIdentResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as PhotoIdentResult); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option lightIndex = default; + Option area = default; + Option sourceImage = default; + Option resultImages = default; + Option type = default; + Option elementResult = default; + Option elementDiagnose = default; + Option percentValue = default; + Option fieldTypesCount = default; + Option?> fieldTypesList = default; + Option step = default; + Option angle = default; + Option reserved1 = default; + Option reserved2 = default; + Option reserved3 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "LightIndex": + string? lightIndexRawValue = utf8JsonReader.GetString(); + if (lightIndexRawValue != null) + lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); + break; + case "Area": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + area = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SourceImage": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sourceImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "ResultImages": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultImages = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + case "ElementResult": + string? elementResultRawValue = utf8JsonReader.GetString(); + if (elementResultRawValue != null) + elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); + break; + case "ElementDiagnose": + string? elementDiagnoseRawValue = utf8JsonReader.GetString(); + if (elementDiagnoseRawValue != null) + elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); + break; + case "PercentValue": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + percentValue = new Option(utf8JsonReader.GetInt32()); + break; + case "FieldTypesCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldTypesCount = new Option(utf8JsonReader.GetInt32()); + break; + case "FieldTypesList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldTypesList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Step": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + step = new Option(utf8JsonReader.GetInt32()); + break; + case "Angle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + angle = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved1": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved1 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved3": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved3 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!lightIndex.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(lightIndex)); + + if (!area.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(area)); + + if (!sourceImage.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(sourceImage)); + + if (!resultImages.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(resultImages)); + + if (!type.IsSet) + throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(type)); + + if (lightIndex.IsSet && lightIndex.Value == null) + throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class PhotoIdentResult."); + + if (area.IsSet && area.Value == null) + throw new ArgumentNullException(nameof(area), "Property is not nullable for class PhotoIdentResult."); + + if (sourceImage.IsSet && sourceImage.Value == null) + throw new ArgumentNullException(nameof(sourceImage), "Property is not nullable for class PhotoIdentResult."); + + if (resultImages.IsSet && resultImages.Value == null) + throw new ArgumentNullException(nameof(resultImages), "Property is not nullable for class PhotoIdentResult."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class PhotoIdentResult."); + + if (elementResult.IsSet && elementResult.Value == null) + throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class PhotoIdentResult."); + + if (elementDiagnose.IsSet && elementDiagnose.Value == null) + throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class PhotoIdentResult."); + + if (percentValue.IsSet && percentValue.Value == null) + throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class PhotoIdentResult."); + + if (fieldTypesCount.IsSet && fieldTypesCount.Value == null) + throw new ArgumentNullException(nameof(fieldTypesCount), "Property is not nullable for class PhotoIdentResult."); + + if (fieldTypesList.IsSet && fieldTypesList.Value == null) + throw new ArgumentNullException(nameof(fieldTypesList), "Property is not nullable for class PhotoIdentResult."); + + if (step.IsSet && step.Value == null) + throw new ArgumentNullException(nameof(step), "Property is not nullable for class PhotoIdentResult."); + + if (angle.IsSet && angle.Value == null) + throw new ArgumentNullException(nameof(angle), "Property is not nullable for class PhotoIdentResult."); + + if (reserved1.IsSet && reserved1.Value == null) + throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class PhotoIdentResult."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class PhotoIdentResult."); + + if (reserved3.IsSet && reserved3.Value == null) + throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class PhotoIdentResult."); + + return new PhotoIdentResult(lightIndex.Value!.Value!, area.Value!, sourceImage.Value!, resultImages.Value!, elementResult, elementDiagnose, percentValue, fieldTypesCount, fieldTypesList, step, angle, reserved1, reserved2, reserved3); } /// - /// Returns true if PhotoIdentResult instances are equal + /// Serializes a /// - /// Instance of PhotoIdentResult to be compared - /// Boolean - public bool Equals(PhotoIdentResult input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PhotoIdentResult photoIdentResult, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.LightIndex == input.LightIndex || - (this.LightIndex != null && - this.LightIndex.Equals(input.LightIndex)) - ) && base.Equals(input) && - ( - this.Area == input.Area || - (this.Area != null && - this.Area.Equals(input.Area)) - ) && base.Equals(input) && - ( - this.SourceImage == input.SourceImage || - (this.SourceImage != null && - this.SourceImage.Equals(input.SourceImage)) - ) && base.Equals(input) && - ( - this.ResultImages == input.ResultImages || - (this.ResultImages != null && - this.ResultImages.Equals(input.ResultImages)) - ) && base.Equals(input) && - ( - this.FieldTypesCount == input.FieldTypesCount || - (this.FieldTypesCount != null && - this.FieldTypesCount.Equals(input.FieldTypesCount)) - ) && base.Equals(input) && - ( - this.FieldTypesList == input.FieldTypesList || - this.FieldTypesList != null && - input.FieldTypesList != null && - this.FieldTypesList.SequenceEqual(input.FieldTypesList) - ) && base.Equals(input) && - ( - this.Step == input.Step || - (this.Step != null && - this.Step.Equals(input.Step)) - ) && base.Equals(input) && - ( - this.Angle == input.Angle || - (this.Angle != null && - this.Angle.Equals(input.Angle)) - ) && base.Equals(input) && - ( - this.Reserved3 == input.Reserved3 || - (this.Reserved3 != null && - this.Reserved3.Equals(input.Reserved3)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, photoIdentResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, PhotoIdentResult photoIdentResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (photoIdentResult.Area == null) + throw new ArgumentNullException(nameof(photoIdentResult.Area), "Property is required for class PhotoIdentResult."); + + if (photoIdentResult.SourceImage == null) + throw new ArgumentNullException(nameof(photoIdentResult.SourceImage), "Property is required for class PhotoIdentResult."); + + if (photoIdentResult.ResultImages == null) + throw new ArgumentNullException(nameof(photoIdentResult.ResultImages), "Property is required for class PhotoIdentResult."); + + if (photoIdentResult.FieldTypesListOption.IsSet && photoIdentResult.FieldTypesList == null) + throw new ArgumentNullException(nameof(photoIdentResult.FieldTypesList), "Property is required for class PhotoIdentResult."); + + var lightIndexRawValue = LightValueConverter.ToJsonValue(photoIdentResult.LightIndex); + writer.WriteNumber("LightIndex", lightIndexRawValue); + + writer.WritePropertyName("Area"); + JsonSerializer.Serialize(writer, photoIdentResult.Area, jsonSerializerOptions); + writer.WritePropertyName("SourceImage"); + JsonSerializer.Serialize(writer, photoIdentResult.SourceImage, jsonSerializerOptions); + writer.WritePropertyName("ResultImages"); + JsonSerializer.Serialize(writer, photoIdentResult.ResultImages, jsonSerializerOptions); + writer.WriteString("Type", photoIdentResult.Type); + + if (photoIdentResult.ElementResultOption.IsSet) { - int hashCode = base.GetHashCode(); - if (this.LightIndex != null) - hashCode = hashCode * 59 + this.LightIndex.GetHashCode(); - if (this.Area != null) - hashCode = hashCode * 59 + this.Area.GetHashCode(); - if (this.SourceImage != null) - hashCode = hashCode * 59 + this.SourceImage.GetHashCode(); - if (this.ResultImages != null) - hashCode = hashCode * 59 + this.ResultImages.GetHashCode(); - if (this.FieldTypesCount != null) - hashCode = hashCode * 59 + this.FieldTypesCount.GetHashCode(); - if (this.FieldTypesList != null) - hashCode = hashCode * 59 + this.FieldTypesList.GetHashCode(); - if (this.Step != null) - hashCode = hashCode * 59 + this.Step.GetHashCode(); - if (this.Angle != null) - hashCode = hashCode * 59 + this.Angle.GetHashCode(); - if (this.Reserved3 != null) - hashCode = hashCode * 59 + this.Reserved3.GetHashCode(); - return hashCode; + var elementResultRawValue = CheckResultValueConverter.ToJsonValue(photoIdentResult.ElementResult!.Value); + writer.WriteNumber("ElementResult", elementResultRawValue); } - } + if (photoIdentResult.ElementDiagnoseOption.IsSet) + { + var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(photoIdentResult.ElementDiagnose!.Value); + writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); + } + if (photoIdentResult.PercentValueOption.IsSet) + writer.WriteNumber("PercentValue", photoIdentResult.PercentValueOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (photoIdentResult.FieldTypesCountOption.IsSet) + writer.WriteNumber("FieldTypesCount", photoIdentResult.FieldTypesCountOption.Value!.Value); + + if (photoIdentResult.FieldTypesListOption.IsSet) + { + writer.WritePropertyName("FieldTypesList"); + JsonSerializer.Serialize(writer, photoIdentResult.FieldTypesList, jsonSerializerOptions); + } + if (photoIdentResult.StepOption.IsSet) + writer.WriteNumber("Step", photoIdentResult.StepOption.Value!.Value); + + if (photoIdentResult.AngleOption.IsSet) + writer.WriteNumber("Angle", photoIdentResult.AngleOption.Value!.Value); + + if (photoIdentResult.Reserved1Option.IsSet) + writer.WriteNumber("Reserved1", photoIdentResult.Reserved1Option.Value!.Value); + + if (photoIdentResult.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", photoIdentResult.Reserved2Option.Value!.Value); + + if (photoIdentResult.Reserved3Option.IsSet) + writer.WriteNumber("Reserved3", photoIdentResult.Reserved3Option.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/Point.cs b/src/Regula.DocumentReader.WebClient/Model/Point.cs index e1fe496..eacbedb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Point.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Point.cs @@ -1,56 +1,60 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Point /// - [DataContract] - public partial class Point : IEquatable, IValidatableObject + public partial class Point : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// x. - /// y. - public Point(int x = default(int), int y = default(int)) + /// x + /// y + [JsonConstructor] + public Point(int x, int y) { - this.X = x; - this.Y = y; + X = x; + Y = y; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets X /// - [DataMember(Name="x", EmitDefaultValue=false)] + [JsonPropertyName("x")] public int X { get; set; } /// /// Gets or Sets Y /// - [DataMember(Name="y", EmitDefaultValue=false)] + [JsonPropertyName("y")] public int Y { get; set; } /// @@ -59,82 +63,121 @@ public partial class Point : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Point {\n"); sb.Append(" X: ").Append(X).Append("\n"); sb.Append(" Y: ").Append(Y).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as Point); + yield break; } + } + /// + /// A Json converter for type + /// + public class PointJsonConverter : JsonConverter + { /// - /// Returns true if Point instances are equal + /// Deserializes json to /// - /// Instance of Point to be compared - /// Boolean - public bool Equals(Point input) + /// + /// + /// + /// + /// + public override Point Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.X == input.X || - (this.X != null && - this.X.Equals(input.X)) - ) && - ( - this.Y == input.Y || - (this.Y != null && - this.Y.Equals(input.Y)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option x = default; + Option y = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "x": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + x = new Option(utf8JsonReader.GetInt32()); + break; + case "y": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + y = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!x.IsSet) + throw new ArgumentException("Property is required for class Point.", nameof(x)); + + if (!y.IsSet) + throw new ArgumentException("Property is required for class Point.", nameof(y)); + + if (x.IsSet && x.Value == null) + throw new ArgumentNullException(nameof(x), "Property is not nullable for class Point."); + + if (y.IsSet && y.Value == null) + throw new ArgumentNullException(nameof(y), "Property is not nullable for class Point."); + + return new Point(x.Value!.Value!, y.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Point point, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.X != null) - hashCode = hashCode * 59 + this.X.GetHashCode(); - if (this.Y != null) - hashCode = hashCode * 59 + this.Y.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, point, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, Point point, JsonSerializerOptions jsonSerializerOptions) { - yield break; + writer.WriteNumber("x", point.X); + + writer.WriteNumber("y", point.Y); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/PointArray.cs b/src/Regula.DocumentReader.WebClient/Model/PointArray.cs index 4e82cbc..ac65367 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointArray.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointArray.cs @@ -1,48 +1,52 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// PointArray /// - [DataContract] - public partial class PointArray : IEquatable, IValidatableObject + public partial class PointArray : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// pointsList. - public PointArray(List pointsList = default(List)) + /// pointsList + [JsonConstructor] + public PointArray(List pointsList) { - this.PointsList = pointsList; + PointsList = pointsList; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets PointsList /// - [DataMember(Name="PointsList", EmitDefaultValue=false)] + [JsonPropertyName("PointsList")] public List PointsList { get; set; } /// @@ -51,75 +55,111 @@ public partial class PointArray : IEquatable, IValidatableObject /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class PointArray {\n"); sb.Append(" PointsList: ").Append(PointsList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as PointArray); + yield break; } + } + /// + /// A Json converter for type + /// + public class PointArrayJsonConverter : JsonConverter + { /// - /// Returns true if PointArray instances are equal + /// Deserializes json to /// - /// Instance of PointArray to be compared - /// Boolean - public bool Equals(PointArray input) + /// + /// + /// + /// + /// + public override PointArray Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.PointsList == input.PointsList || - this.PointsList != null && - input.PointsList != null && - this.PointsList.SequenceEqual(input.PointsList) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> pointsList = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "PointsList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pointsList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!pointsList.IsSet) + throw new ArgumentException("Property is required for class PointArray.", nameof(pointsList)); + + if (pointsList.IsSet && pointsList.Value == null) + throw new ArgumentNullException(nameof(pointsList), "Property is not nullable for class PointArray."); + + return new PointArray(pointsList.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PointArray pointArray, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PointsList != null) - hashCode = hashCode * 59 + this.PointsList.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, pointArray, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, PointArray pointArray, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (pointArray.PointsList == null) + throw new ArgumentNullException(nameof(pointArray.PointsList), "Property is required for class PointArray."); + + writer.WritePropertyName("PointsList"); + JsonSerializer.Serialize(writer, pointArray.PointsList, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs index 6ac3aa5..4bd34fb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs @@ -1,141 +1,191 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// PointsContainer /// - [DataContract] - public partial class PointsContainer : IEquatable, IValidatableObject + public partial class PointsContainer : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// pointCount. - /// pointsList. - public PointsContainer(int pointCount = default(int), List pointsList = default(List)) + /// pointsList + /// pointCount + [JsonConstructor] + public PointsContainer(List pointsList, Option pointCount = default) { - this.PointCount = pointCount; - this.PointsList = pointsList; + PointsList = pointsList; + PointCountOption = pointCount; + OnCreated(); } - - /// - /// Gets or Sets PointCount - /// - [DataMember(Name="PointCount", EmitDefaultValue=false)] - public int PointCount { get; set; } + + partial void OnCreated(); /// /// Gets or Sets PointsList /// - [DataMember(Name="PointsList", EmitDefaultValue=false)] + [JsonPropertyName("PointsList")] public List PointsList { get; set; } + /// + /// Used to track the state of PointCount + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PointCountOption { get; private set; } + + /// + /// Gets or Sets PointCount + /// + [JsonPropertyName("PointCount")] + public int? PointCount { get { return this.PointCountOption; } set { this.PointCountOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class PointsContainer {\n"); - sb.Append(" PointCount: ").Append(PointCount).Append("\n"); sb.Append(" PointsList: ").Append(PointsList).Append("\n"); + sb.Append(" PointCount: ").Append(PointCount).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as PointsContainer); + yield break; } + } + /// + /// A Json converter for type + /// + public class PointsContainerJsonConverter : JsonConverter + { /// - /// Returns true if PointsContainer instances are equal + /// Deserializes json to /// - /// Instance of PointsContainer to be compared - /// Boolean - public bool Equals(PointsContainer input) + /// + /// + /// + /// + /// + public override PointsContainer Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.PointCount == input.PointCount || - (this.PointCount != null && - this.PointCount.Equals(input.PointCount)) - ) && - ( - this.PointsList == input.PointsList || - this.PointsList != null && - input.PointsList != null && - this.PointsList.SequenceEqual(input.PointsList) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> pointsList = default; + Option pointCount = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "PointsList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pointsList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "PointCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pointCount = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!pointsList.IsSet) + throw new ArgumentException("Property is required for class PointsContainer.", nameof(pointsList)); + + if (pointsList.IsSet && pointsList.Value == null) + throw new ArgumentNullException(nameof(pointsList), "Property is not nullable for class PointsContainer."); + + if (pointCount.IsSet && pointCount.Value == null) + throw new ArgumentNullException(nameof(pointCount), "Property is not nullable for class PointsContainer."); + + return new PointsContainer(pointsList.Value!, pointCount); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, PointsContainer pointsContainer, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.PointCount != null) - hashCode = hashCode * 59 + this.PointCount.GetHashCode(); - if (this.PointsList != null) - hashCode = hashCode * 59 + this.PointsList.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, pointsContainer, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, PointsContainer pointsContainer, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (pointsContainer.PointsList == null) + throw new ArgumentNullException(nameof(pointsContainer.PointsList), "Property is required for class PointsContainer."); + + writer.WritePropertyName("PointsList"); + JsonSerializer.Serialize(writer, pointsContainer.PointsList, jsonSerializerOptions); + if (pointsContainer.PointCountOption.IsSet) + writer.WriteNumber("PointCount", pointsContainer.PointCountOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index 955da82..19f0a39 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -1,567 +1,992 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessParams /// - [DataContract] - public partial class ProcessParams : IEquatable, IValidatableObject + public partial class ProcessParams : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ProcessParams() { } - /// - /// Initializes a new instance of the class. - /// - /// This parameter is used to generate separate DTC-VC data container from RFID session data.. - /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default.. - /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default.. - /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face. - /// This parameter allows comparing faces on Regula Face Web Service. - /// faceApi. - /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario.. - /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0.. - /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0.. - /// scenario (required). - /// Types of results to return in response. See 'Result' enum for available options. - /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default.. - /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default.. - /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default.. - /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running).. - /// measureSystem. - /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default.. - /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default.. - /// This option allows passing custom processing parameters that can be implemented in future without changing API.. - /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration.. - /// When enabled, results will contain transaction processing log. Disabled by default. - /// logLevel. - /// Force use of specific template ID and skip document type identification step.. - /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default.. - /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default.. - /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default.. - /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default.. - /// When enabled, returns cropped barcode images for unknown documents. Disabled by default.. - /// imageQa. - /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default.. - /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default.. - /// forceDocFormat. - /// When enabled, no graphic fields will be cropped from document image. Disabled by default.. - /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default.. - /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default.. - /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default. - /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid.. - /// When enabled, returns input images in output. Disabled by default.. - /// This option allows limiting MRZ formats to be recognized by specifying them in array.. - /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default.. - /// This option can be disabled to stop parsing after barcode is read. Enabled by default.. - /// convertCase. - /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default.. - /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default.. - /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default.. - /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. . - /// This parameter is used to specify the document reader device type from which input images were captured. Default 0.. - /// This parameter is used to specify the document reader device type from which input images were captured. Default 0.. - /// This parameter is used to specify the document reader device type from which input images were captured. - /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false. - /// List of the document ID's to process. All documents will be processed, if empty.. - /// rfid. - /// This parameter is used to enable authenticity checks. - /// authParams. - /// mrzDetectMode. - /// This parameter is used to generate numeric representation for issuing state and nationality codes. - /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed.. - /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc.. - public ProcessParams(bool? generateDTCVC = default(bool?), List lcidFilter = default(List), List lcidIgnoreFilter = default(List), bool? oneShotIdentification = default(bool?), bool? useFaceApi = default(bool?), FaceApi faceApi = default(FaceApi), bool? doDetectCan = default(bool?), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), string scenario = default(string), List resultTypeOutput = default(List), bool? doublePageSpread = default(bool?), bool? generateDoublePageSpreadImage = default(bool?), List fieldTypesFilter = default(List), string dateFormat = default(string), int measureSystem = default(int), int imageDpiOutMax = default(int), bool? alreadyCropped = default(bool?), Dictionary customParams = default(Dictionary), List config = default(List), bool? log = default(bool?), string logLevel = default(string), int forceDocID = default(int), bool? matchTextFieldMask = default(bool?), bool? fastDocDetect = default(bool?), bool? updateOCRValidityByGlare = default(bool?), bool? checkRequiredTextFields = default(bool?), bool? returnCroppedBarcode = default(bool?), ImageQA imageQa = default(ImageQA), bool? strictImageQuality = default(bool?), bool? respectImageQuality = default(bool?), int forceDocFormat = default(int), bool? noGraphics = default(bool?), bool? depersonalizeLog = default(bool?), bool? multiDocOnImage = default(bool?), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool? returnUncroppedImage = default(bool?), List mrzFormatsFilter = default(List), bool? forceReadMrzBeforeLocate = default(bool?), bool? parseBarcodes = default(bool?), int convertCase = default(int), bool? splitNames = default(bool?), bool? disablePerforationOCR = default(bool?), List documentGroupFilter = default(List), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool? ignoreDeviceIdFromImage = default(bool?), List documentIdList = default(List), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool? checkAuth = default(bool?), AuthParams authParams = default(AuthParams), MrzDetectModeEnum mrzDetectMode = default(MrzDetectModeEnum), bool? generateNumericCodes = default(bool?), bool? strictBarcodeDigitalSignatureCheck = default(bool?), bool? selectLongestNames = default(bool?)) + /// scenario + /// This parameter is used to generate separate DTC-VC data container from RFID session data. + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. + /// This parameter is used to enable document liveness check. + /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. + /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face + /// This parameter allows comparing faces on Regula Face Web Service + /// faceApi + /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. + /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. + /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. + /// Types of results to return in response. See 'Result' enum for available options + /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. + /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. + /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. + /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). + /// measureSystem + /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. + /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. + /// This option allows passing custom processing parameters that can be implemented in future without changing API. + /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. + /// When enabled, results will contain transaction processing log. Disabled by default + /// logLevel + /// Force use of specific template ID and skip document type identification step. + /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. + /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. + /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. + /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. + /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. + /// imageQa + /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. + /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. + /// forceDocFormat + /// When enabled, no graphic fields will be cropped from document image. Disabled by default. + /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. + /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. + /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default + /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. + /// When enabled, returns input images in output. Disabled by default. + /// This option allows limiting MRZ formats to be recognized by specifying them in array. + /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. + /// This option can be disabled to stop parsing after barcode is read. Enabled by default. + /// convertCase + /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. + /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. + /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. + /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. + /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. + /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. + /// This parameter is used to specify the document reader device type from which input images were captured + /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false + /// List of the document ID's to process. All documents will be processed, if empty. + /// rfid + /// This parameter is used to enable authenticity checks + /// authParams + /// mrzDetectMode + /// This parameter is used to generate numeric representation for issuing state and nationality codes + /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. + /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. + /// Set the types of barcodes to process. + [JsonConstructor] + public ProcessParams(Scenario scenario, Option generateDTCVC = default, Option?> lcidFilter = default, Option checkLiveness = default, Option?> lcidIgnoreFilter = default, Option oneShotIdentification = default, Option useFaceApi = default, Option faceApi = default, Option doDetectCan = default, Option imageOutputMaxHeight = default, Option imageOutputMaxWidth = default, Option?> resultTypeOutput = default, Option doublePageSpread = default, Option generateDoublePageSpreadImage = default, Option?> fieldTypesFilter = default, Option dateFormat = default, Option measureSystem = default, Option imageDpiOutMax = default, Option alreadyCropped = default, Option?> customParams = default, Option?> config = default, Option log = default, Option logLevel = default, Option forceDocID = default, Option matchTextFieldMask = default, Option fastDocDetect = default, Option updateOCRValidityByGlare = default, Option checkRequiredTextFields = default, Option returnCroppedBarcode = default, Option imageQa = default, Option strictImageQuality = default, Option respectImageQuality = default, Option forceDocFormat = default, Option noGraphics = default, Option depersonalizeLog = default, Option multiDocOnImage = default, Option shiftExpiryDate = default, Option minimalHolderAge = default, Option returnUncroppedImage = default, Option?> mrzFormatsFilter = default, Option forceReadMrzBeforeLocate = default, Option parseBarcodes = default, Option convertCase = default, Option splitNames = default, Option disablePerforationOCR = default, Option?> documentGroupFilter = default, Option processAuth = default, Option deviceId = default, Option deviceType = default, Option deviceTypeHex = default, Option ignoreDeviceIdFromImage = default, Option?> documentIdList = default, Option rfid = default, Option checkAuth = default, Option authParams = default, Option mrzDetectMode = default, Option generateNumericCodes = default, Option strictBarcodeDigitalSignatureCheck = default, Option selectLongestNames = default, Option?> doBarcodes = default) { - // to ensure "scenario" is required (not null) - if (scenario == null) - { - throw new InvalidDataException("scenario is a required property for ProcessParams and cannot be null"); - } - else - { - this.Scenario = scenario; - } - - this.GenerateDTCVC = generateDTCVC; - this.LcidFilter = lcidFilter; - this.LcidIgnoreFilter = lcidIgnoreFilter; - this.OneShotIdentification = oneShotIdentification; - this.UseFaceApi = useFaceApi; - this.FaceApi = faceApi; - this.DoDetectCan = doDetectCan; - this.ImageOutputMaxHeight = imageOutputMaxHeight; - this.ImageOutputMaxWidth = imageOutputMaxWidth; - this.ResultTypeOutput = resultTypeOutput; - this.DoublePageSpread = doublePageSpread; - this.GenerateDoublePageSpreadImage = generateDoublePageSpreadImage; - this.FieldTypesFilter = fieldTypesFilter; - this.DateFormat = dateFormat; - this.MeasureSystem = measureSystem; - this.ImageDpiOutMax = imageDpiOutMax; - this.AlreadyCropped = alreadyCropped; - this.CustomParams = customParams; - this.Config = config; - this.Log = log; - this.LogLevel = logLevel; - this.ForceDocID = forceDocID; - this.MatchTextFieldMask = matchTextFieldMask; - this.FastDocDetect = fastDocDetect; - this.UpdateOCRValidityByGlare = updateOCRValidityByGlare; - this.CheckRequiredTextFields = checkRequiredTextFields; - this.ReturnCroppedBarcode = returnCroppedBarcode; - this.ImageQa = imageQa; - this.StrictImageQuality = strictImageQuality; - this.RespectImageQuality = respectImageQuality; - this.ForceDocFormat = forceDocFormat; - this.NoGraphics = noGraphics; - this.DepersonalizeLog = depersonalizeLog; - this.MultiDocOnImage = multiDocOnImage; - this.ShiftExpiryDate = shiftExpiryDate; - this.MinimalHolderAge = minimalHolderAge; - this.ReturnUncroppedImage = returnUncroppedImage; - this.MrzFormatsFilter = mrzFormatsFilter; - this.ForceReadMrzBeforeLocate = forceReadMrzBeforeLocate; - this.ParseBarcodes = parseBarcodes; - this.ConvertCase = convertCase; - this.SplitNames = splitNames; - this.DisablePerforationOCR = disablePerforationOCR; - this.DocumentGroupFilter = documentGroupFilter; - this.ProcessAuth = processAuth; - this.DeviceId = deviceId; - this.DeviceType = deviceType; - this.DeviceTypeHex = deviceTypeHex; - this.IgnoreDeviceIdFromImage = ignoreDeviceIdFromImage; - this.DocumentIdList = documentIdList; - this.Rfid = rfid; - this.CheckAuth = checkAuth; - this.AuthParams = authParams; - this.MrzDetectMode = mrzDetectMode; - this.GenerateNumericCodes = generateNumericCodes; - this.StrictBarcodeDigitalSignatureCheck = strictBarcodeDigitalSignatureCheck; - this.SelectLongestNames = selectLongestNames; + Scenario = scenario; + GenerateDTCVCOption = generateDTCVC; + LcidFilterOption = lcidFilter; + CheckLivenessOption = checkLiveness; + LcidIgnoreFilterOption = lcidIgnoreFilter; + OneShotIdentificationOption = oneShotIdentification; + UseFaceApiOption = useFaceApi; + FaceApiOption = faceApi; + DoDetectCanOption = doDetectCan; + ImageOutputMaxHeightOption = imageOutputMaxHeight; + ImageOutputMaxWidthOption = imageOutputMaxWidth; + ResultTypeOutputOption = resultTypeOutput; + DoublePageSpreadOption = doublePageSpread; + GenerateDoublePageSpreadImageOption = generateDoublePageSpreadImage; + FieldTypesFilterOption = fieldTypesFilter; + DateFormatOption = dateFormat; + MeasureSystemOption = measureSystem; + ImageDpiOutMaxOption = imageDpiOutMax; + AlreadyCroppedOption = alreadyCropped; + CustomParamsOption = customParams; + ConfigOption = config; + LogOption = log; + LogLevelOption = logLevel; + ForceDocIDOption = forceDocID; + MatchTextFieldMaskOption = matchTextFieldMask; + FastDocDetectOption = fastDocDetect; + UpdateOCRValidityByGlareOption = updateOCRValidityByGlare; + CheckRequiredTextFieldsOption = checkRequiredTextFields; + ReturnCroppedBarcodeOption = returnCroppedBarcode; + ImageQaOption = imageQa; + StrictImageQualityOption = strictImageQuality; + RespectImageQualityOption = respectImageQuality; + ForceDocFormatOption = forceDocFormat; + NoGraphicsOption = noGraphics; + DepersonalizeLogOption = depersonalizeLog; + MultiDocOnImageOption = multiDocOnImage; + ShiftExpiryDateOption = shiftExpiryDate; + MinimalHolderAgeOption = minimalHolderAge; + ReturnUncroppedImageOption = returnUncroppedImage; + MrzFormatsFilterOption = mrzFormatsFilter; + ForceReadMrzBeforeLocateOption = forceReadMrzBeforeLocate; + ParseBarcodesOption = parseBarcodes; + ConvertCaseOption = convertCase; + SplitNamesOption = splitNames; + DisablePerforationOCROption = disablePerforationOCR; + DocumentGroupFilterOption = documentGroupFilter; + ProcessAuthOption = processAuth; + DeviceIdOption = deviceId; + DeviceTypeOption = deviceType; + DeviceTypeHexOption = deviceTypeHex; + IgnoreDeviceIdFromImageOption = ignoreDeviceIdFromImage; + DocumentIdListOption = documentIdList; + RfidOption = rfid; + CheckAuthOption = checkAuth; + AuthParamsOption = authParams; + MrzDetectModeOption = mrzDetectMode; + GenerateNumericCodesOption = generateNumericCodes; + StrictBarcodeDigitalSignatureCheckOption = strictBarcodeDigitalSignatureCheck; + SelectLongestNamesOption = selectLongestNames; + DoBarcodesOption = doBarcodes; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Gets or Sets Scenario + /// + [JsonPropertyName("scenario")] + public Scenario Scenario { get; set; } + + /// + /// Used to track the state of MeasureSystem + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option MeasureSystemOption { get; private set; } + + /// + /// Gets or Sets MeasureSystem + /// + [JsonPropertyName("measureSystem")] + public MeasureSystem? MeasureSystem { get { return this.MeasureSystemOption; } set { this.MeasureSystemOption = new(value); } } + + /// + /// Used to track the state of LogLevel + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LogLevelOption { get; private set; } + + /// + /// Gets or Sets LogLevel + /// + [JsonPropertyName("logLevel")] + public LogLevel? LogLevel { get { return this.LogLevelOption; } set { this.LogLevelOption = new(value); } } + + /// + /// Used to track the state of ForceDocFormat + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ForceDocFormatOption { get; private set; } + + /// + /// Gets or Sets ForceDocFormat + /// + [JsonPropertyName("forceDocFormat")] + public DocumentFormat? ForceDocFormat { get { return this.ForceDocFormatOption; } set { this.ForceDocFormatOption = new(value); } } + + /// + /// Used to track the state of ConvertCase + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ConvertCaseOption { get; private set; } + + /// + /// Gets or Sets ConvertCase + /// + [JsonPropertyName("convertCase")] + public TextPostProcessing? ConvertCase { get { return this.ConvertCaseOption; } set { this.ConvertCaseOption = new(value); } } + + /// + /// Used to track the state of MrzDetectMode + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option MrzDetectModeOption { get; private set; } + + /// + /// Gets or Sets MrzDetectMode + /// + [JsonPropertyName("mrzDetectMode")] + public MrzDetectModeEnum? MrzDetectMode { get { return this.MrzDetectModeOption; } set { this.MrzDetectModeOption = new(value); } } + + /// + /// Used to track the state of GenerateDTCVC + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option GenerateDTCVCOption { get; private set; } + /// /// This parameter is used to generate separate DTC-VC data container from RFID session data. /// /// This parameter is used to generate separate DTC-VC data container from RFID session data. - [DataMember(Name="generateDTCVC", EmitDefaultValue=false)] - public bool? GenerateDTCVC { get; set; } + [JsonPropertyName("generateDTCVC")] + public bool? GenerateDTCVC { get { return this.GenerateDTCVCOption; } set { this.GenerateDTCVCOption = new(value); } } + + /// + /// Used to track the state of LcidFilter + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> LcidFilterOption { get; private set; } /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. - [DataMember(Name="lcidFilter", EmitDefaultValue=false)] - public List LcidFilter { get; set; } + [JsonPropertyName("lcidFilter")] + public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } + + /// + /// Used to track the state of CheckLiveness + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckLivenessOption { get; private set; } + + /// + /// This parameter is used to enable document liveness check. + /// + /// This parameter is used to enable document liveness check. + [JsonPropertyName("checkLiveness")] + public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new(value); } } + + /// + /// Used to track the state of LcidIgnoreFilter + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> LcidIgnoreFilterOption { get; private set; } /// /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. /// /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. - [DataMember(Name="lcidIgnoreFilter", EmitDefaultValue=false)] - public List LcidIgnoreFilter { get; set; } + [JsonPropertyName("lcidIgnoreFilter")] + public List? LcidIgnoreFilter { get { return this.LcidIgnoreFilterOption; } set { this.LcidIgnoreFilterOption = new(value); } } + + /// + /// Used to track the state of OneShotIdentification + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OneShotIdentificationOption { get; private set; } /// /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face /// /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face - [DataMember(Name="oneShotIdentification", EmitDefaultValue=false)] - public bool? OneShotIdentification { get; set; } + [JsonPropertyName("oneShotIdentification")] + public bool? OneShotIdentification { get { return this.OneShotIdentificationOption; } set { this.OneShotIdentificationOption = new(value); } } + + /// + /// Used to track the state of UseFaceApi + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UseFaceApiOption { get; private set; } /// /// This parameter allows comparing faces on Regula Face Web Service /// /// This parameter allows comparing faces on Regula Face Web Service - [DataMember(Name="useFaceApi", EmitDefaultValue=false)] - public bool? UseFaceApi { get; set; } + [JsonPropertyName("useFaceApi")] + public bool? UseFaceApi { get { return this.UseFaceApiOption; } set { this.UseFaceApiOption = new(value); } } + + /// + /// Used to track the state of FaceApi + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FaceApiOption { get; private set; } /// /// Gets or Sets FaceApi /// - [DataMember(Name="faceApi", EmitDefaultValue=false)] - public FaceApi FaceApi { get; set; } + [JsonPropertyName("faceApi")] + public FaceApi? FaceApi { get { return this.FaceApiOption; } set { this.FaceApiOption = new(value); } } + + /// + /// Used to track the state of DoDetectCan + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DoDetectCanOption { get; private set; } /// /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. /// /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. - [DataMember(Name="doDetectCan", EmitDefaultValue=false)] - public bool? DoDetectCan { get; set; } + [JsonPropertyName("doDetectCan")] + public bool? DoDetectCan { get { return this.DoDetectCanOption; } set { this.DoDetectCanOption = new(value); } } + + /// + /// Used to track the state of ImageOutputMaxHeight + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ImageOutputMaxHeightOption { get; private set; } /// /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. /// /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. - [DataMember(Name="imageOutputMaxHeight", EmitDefaultValue=false)] - public int ImageOutputMaxHeight { get; set; } + [JsonPropertyName("imageOutputMaxHeight")] + public int? ImageOutputMaxHeight { get { return this.ImageOutputMaxHeightOption; } set { this.ImageOutputMaxHeightOption = new(value); } } + + /// + /// Used to track the state of ImageOutputMaxWidth + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ImageOutputMaxWidthOption { get; private set; } /// /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. /// /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. - [DataMember(Name="imageOutputMaxWidth", EmitDefaultValue=false)] - public int ImageOutputMaxWidth { get; set; } + [JsonPropertyName("imageOutputMaxWidth")] + public int? ImageOutputMaxWidth { get { return this.ImageOutputMaxWidthOption; } set { this.ImageOutputMaxWidthOption = new(value); } } /// - /// Gets or Sets Scenario + /// Used to track the state of ResultTypeOutput /// - [DataMember(Name="scenario", EmitDefaultValue=true)] - public string Scenario { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ResultTypeOutputOption { get; private set; } /// /// Types of results to return in response. See 'Result' enum for available options /// /// Types of results to return in response. See 'Result' enum for available options - [DataMember(Name="resultTypeOutput", EmitDefaultValue=false)] - public List ResultTypeOutput { get; set; } + [JsonPropertyName("resultTypeOutput")] + public List? ResultTypeOutput { get { return this.ResultTypeOutputOption; } set { this.ResultTypeOutputOption = new(value); } } + + /// + /// Used to track the state of DoublePageSpread + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DoublePageSpreadOption { get; private set; } /// /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. /// /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. - [DataMember(Name="doublePageSpread", EmitDefaultValue=false)] - public bool? DoublePageSpread { get; set; } + [JsonPropertyName("doublePageSpread")] + [Obsolete] + public bool? DoublePageSpread { get { return this.DoublePageSpreadOption; } set { this.DoublePageSpreadOption = new(value); } } + + /// + /// Used to track the state of GenerateDoublePageSpreadImage + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option GenerateDoublePageSpreadImageOption { get; private set; } /// /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. /// /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. - [DataMember(Name="generateDoublePageSpreadImage", EmitDefaultValue=false)] - public bool? GenerateDoublePageSpreadImage { get; set; } + [JsonPropertyName("generateDoublePageSpreadImage")] + public bool? GenerateDoublePageSpreadImage { get { return this.GenerateDoublePageSpreadImageOption; } set { this.GenerateDoublePageSpreadImageOption = new(value); } } + + /// + /// Used to track the state of FieldTypesFilter + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> FieldTypesFilterOption { get; private set; } /// /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. /// /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. - [DataMember(Name="fieldTypesFilter", EmitDefaultValue=false)] - public List FieldTypesFilter { get; set; } + [JsonPropertyName("fieldTypesFilter")] + public List? FieldTypesFilter { get { return this.FieldTypesFilterOption; } set { this.FieldTypesFilterOption = new(value); } } + + /// + /// Used to track the state of DateFormat + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DateFormatOption { get; private set; } /// /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). /// /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). - [DataMember(Name="dateFormat", EmitDefaultValue=false)] - public string DateFormat { get; set; } + /* MM/dd/yyyy */ + [JsonPropertyName("dateFormat")] + public string? DateFormat { get { return this.DateFormatOption; } set { this.DateFormatOption = new(value); } } /// - /// Gets or Sets MeasureSystem + /// Used to track the state of ImageDpiOutMax /// - [DataMember(Name="measureSystem", EmitDefaultValue=false)] - public int MeasureSystem { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ImageDpiOutMaxOption { get; private set; } /// /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. /// /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. - [DataMember(Name="imageDpiOutMax", EmitDefaultValue=false)] - public int ImageDpiOutMax { get; set; } + [JsonPropertyName("imageDpiOutMax")] + public int? ImageDpiOutMax { get { return this.ImageDpiOutMaxOption; } set { this.ImageDpiOutMaxOption = new(value); } } + + /// + /// Used to track the state of AlreadyCropped + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AlreadyCroppedOption { get; private set; } /// /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. /// /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. - [DataMember(Name="alreadyCropped", EmitDefaultValue=false)] - public bool? AlreadyCropped { get; set; } + [JsonPropertyName("alreadyCropped")] + public bool? AlreadyCropped { get { return this.AlreadyCroppedOption; } set { this.AlreadyCroppedOption = new(value); } } + + /// + /// Used to track the state of CustomParams + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> CustomParamsOption { get; private set; } /// /// This option allows passing custom processing parameters that can be implemented in future without changing API. /// /// This option allows passing custom processing parameters that can be implemented in future without changing API. - [DataMember(Name="customParams", EmitDefaultValue=false)] - public Dictionary CustomParams { get; set; } + [JsonPropertyName("customParams")] + public Dictionary? CustomParams { get { return this.CustomParamsOption; } set { this.CustomParamsOption = new(value); } } + + /// + /// Used to track the state of Config + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ConfigOption { get; private set; } /// /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. /// /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. - [DataMember(Name="config", EmitDefaultValue=false)] - public List Config { get; set; } + [JsonPropertyName("config")] + public List? Config { get { return this.ConfigOption; } set { this.ConfigOption = new(value); } } + + /// + /// Used to track the state of Log + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LogOption { get; private set; } /// /// When enabled, results will contain transaction processing log. Disabled by default /// /// When enabled, results will contain transaction processing log. Disabled by default - [DataMember(Name="log", EmitDefaultValue=false)] - public bool? Log { get; set; } + [JsonPropertyName("log")] + public bool? Log { get { return this.LogOption; } set { this.LogOption = new(value); } } /// - /// Gets or Sets LogLevel + /// Used to track the state of ForceDocID /// - [DataMember(Name="logLevel", EmitDefaultValue=false)] - public string LogLevel { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ForceDocIDOption { get; private set; } /// /// Force use of specific template ID and skip document type identification step. /// /// Force use of specific template ID and skip document type identification step. - [DataMember(Name="forceDocID", EmitDefaultValue=false)] - public int ForceDocID { get; set; } + [JsonPropertyName("forceDocID")] + public int? ForceDocID { get { return this.ForceDocIDOption; } set { this.ForceDocIDOption = new(value); } } + + /// + /// Used to track the state of MatchTextFieldMask + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option MatchTextFieldMaskOption { get; private set; } /// /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. /// /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. - [DataMember(Name="matchTextFieldMask", EmitDefaultValue=false)] - public bool? MatchTextFieldMask { get; set; } + [JsonPropertyName("matchTextFieldMask")] + public bool? MatchTextFieldMask { get { return this.MatchTextFieldMaskOption; } set { this.MatchTextFieldMaskOption = new(value); } } + + /// + /// Used to track the state of FastDocDetect + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FastDocDetectOption { get; private set; } /// /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. /// /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. - [DataMember(Name="fastDocDetect", EmitDefaultValue=false)] - public bool? FastDocDetect { get; set; } + [JsonPropertyName("fastDocDetect")] + [Obsolete] + public bool? FastDocDetect { get { return this.FastDocDetectOption; } set { this.FastDocDetectOption = new(value); } } + + /// + /// Used to track the state of UpdateOCRValidityByGlare + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UpdateOCRValidityByGlareOption { get; private set; } /// /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. /// /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. - [DataMember(Name="updateOCRValidityByGlare", EmitDefaultValue=false)] - public bool? UpdateOCRValidityByGlare { get; set; } + [JsonPropertyName("updateOCRValidityByGlare")] + public bool? UpdateOCRValidityByGlare { get { return this.UpdateOCRValidityByGlareOption; } set { this.UpdateOCRValidityByGlareOption = new(value); } } + + /// + /// Used to track the state of CheckRequiredTextFields + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckRequiredTextFieldsOption { get; private set; } /// /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. /// /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. - [DataMember(Name="checkRequiredTextFields", EmitDefaultValue=false)] - public bool? CheckRequiredTextFields { get; set; } + [JsonPropertyName("checkRequiredTextFields")] + public bool? CheckRequiredTextFields { get { return this.CheckRequiredTextFieldsOption; } set { this.CheckRequiredTextFieldsOption = new(value); } } + + /// + /// Used to track the state of ReturnCroppedBarcode + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ReturnCroppedBarcodeOption { get; private set; } /// /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. /// /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. - [DataMember(Name="returnCroppedBarcode", EmitDefaultValue=false)] - public bool? ReturnCroppedBarcode { get; set; } + [JsonPropertyName("returnCroppedBarcode")] + public bool? ReturnCroppedBarcode { get { return this.ReturnCroppedBarcodeOption; } set { this.ReturnCroppedBarcodeOption = new(value); } } + + /// + /// Used to track the state of ImageQa + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ImageQaOption { get; private set; } /// /// Gets or Sets ImageQa /// - [DataMember(Name="imageQa", EmitDefaultValue=false)] - public ImageQA ImageQa { get; set; } + [JsonPropertyName("imageQa")] + public ImageQA? ImageQa { get { return this.ImageQaOption; } set { this.ImageQaOption = new(value); } } + + /// + /// Used to track the state of StrictImageQuality + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option StrictImageQualityOption { get; private set; } /// /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. /// /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. - [DataMember(Name="strictImageQuality", EmitDefaultValue=false)] - public bool? StrictImageQuality { get; set; } + [JsonPropertyName("strictImageQuality")] + public bool? StrictImageQuality { get { return this.StrictImageQualityOption; } set { this.StrictImageQualityOption = new(value); } } + + /// + /// Used to track the state of RespectImageQuality + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RespectImageQualityOption { get; private set; } /// /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. /// /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. - [DataMember(Name="respectImageQuality", EmitDefaultValue=false)] - public bool? RespectImageQuality { get; set; } + [JsonPropertyName("respectImageQuality")] + [Obsolete] + public bool? RespectImageQuality { get { return this.RespectImageQualityOption; } set { this.RespectImageQualityOption = new(value); } } /// - /// Gets or Sets ForceDocFormat + /// Used to track the state of NoGraphics /// - [DataMember(Name="forceDocFormat", EmitDefaultValue=false)] - public int ForceDocFormat { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option NoGraphicsOption { get; private set; } /// /// When enabled, no graphic fields will be cropped from document image. Disabled by default. /// /// When enabled, no graphic fields will be cropped from document image. Disabled by default. - [DataMember(Name="noGraphics", EmitDefaultValue=false)] - public bool? NoGraphics { get; set; } + [JsonPropertyName("noGraphics")] + public bool? NoGraphics { get { return this.NoGraphicsOption; } set { this.NoGraphicsOption = new(value); } } + + /// + /// Used to track the state of DepersonalizeLog + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DepersonalizeLogOption { get; private set; } /// /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. /// /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. - [DataMember(Name="depersonalizeLog", EmitDefaultValue=false)] - public bool? DepersonalizeLog { get; set; } + [JsonPropertyName("depersonalizeLog")] + public bool? DepersonalizeLog { get { return this.DepersonalizeLogOption; } set { this.DepersonalizeLogOption = new(value); } } + + /// + /// Used to track the state of MultiDocOnImage + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option MultiDocOnImageOption { get; private set; } /// /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. /// /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. - [DataMember(Name="multiDocOnImage", EmitDefaultValue=false)] - public bool? MultiDocOnImage { get; set; } + [JsonPropertyName("multiDocOnImage")] + public bool? MultiDocOnImage { get { return this.MultiDocOnImageOption; } set { this.MultiDocOnImageOption = new(value); } } + + /// + /// Used to track the state of ShiftExpiryDate + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ShiftExpiryDateOption { get; private set; } /// /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default /// /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default - [DataMember(Name="shiftExpiryDate", EmitDefaultValue=false)] - public int ShiftExpiryDate { get; set; } + [JsonPropertyName("shiftExpiryDate")] + public int? ShiftExpiryDate { get { return this.ShiftExpiryDateOption; } set { this.ShiftExpiryDateOption = new(value); } } + + /// + /// Used to track the state of MinimalHolderAge + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option MinimalHolderAgeOption { get; private set; } /// /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. /// /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. - [DataMember(Name="minimalHolderAge", EmitDefaultValue=false)] - public int MinimalHolderAge { get; set; } + [JsonPropertyName("minimalHolderAge")] + public int? MinimalHolderAge { get { return this.MinimalHolderAgeOption; } set { this.MinimalHolderAgeOption = new(value); } } + + /// + /// Used to track the state of ReturnUncroppedImage + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ReturnUncroppedImageOption { get; private set; } /// /// When enabled, returns input images in output. Disabled by default. /// /// When enabled, returns input images in output. Disabled by default. - [DataMember(Name="returnUncroppedImage", EmitDefaultValue=false)] - public bool? ReturnUncroppedImage { get; set; } + [JsonPropertyName("returnUncroppedImage")] + public bool? ReturnUncroppedImage { get { return this.ReturnUncroppedImageOption; } set { this.ReturnUncroppedImageOption = new(value); } } + + /// + /// Used to track the state of MrzFormatsFilter + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> MrzFormatsFilterOption { get; private set; } /// /// This option allows limiting MRZ formats to be recognized by specifying them in array. /// /// This option allows limiting MRZ formats to be recognized by specifying them in array. - [DataMember(Name="mrzFormatsFilter", EmitDefaultValue=false)] - public List MrzFormatsFilter { get; set; } + [JsonPropertyName("mrzFormatsFilter")] + public List? MrzFormatsFilter { get { return this.MrzFormatsFilterOption; } set { this.MrzFormatsFilterOption = new(value); } } + + /// + /// Used to track the state of ForceReadMrzBeforeLocate + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ForceReadMrzBeforeLocateOption { get; private set; } /// /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. /// /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. - [DataMember(Name="forceReadMrzBeforeLocate", EmitDefaultValue=false)] - public bool? ForceReadMrzBeforeLocate { get; set; } + [JsonPropertyName("forceReadMrzBeforeLocate")] + public bool? ForceReadMrzBeforeLocate { get { return this.ForceReadMrzBeforeLocateOption; } set { this.ForceReadMrzBeforeLocateOption = new(value); } } + + /// + /// Used to track the state of ParseBarcodes + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ParseBarcodesOption { get; private set; } /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. - [DataMember(Name="parseBarcodes", EmitDefaultValue=false)] - public bool? ParseBarcodes { get; set; } + [JsonPropertyName("parseBarcodes")] + public bool? ParseBarcodes { get { return this.ParseBarcodesOption; } set { this.ParseBarcodesOption = new(value); } } /// - /// Gets or Sets ConvertCase + /// Used to track the state of SplitNames /// - [DataMember(Name="convertCase", EmitDefaultValue=false)] - public int ConvertCase { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SplitNamesOption { get; private set; } /// /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. /// /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. - [DataMember(Name="splitNames", EmitDefaultValue=false)] - public bool? SplitNames { get; set; } + [JsonPropertyName("splitNames")] + public bool? SplitNames { get { return this.SplitNamesOption; } set { this.SplitNamesOption = new(value); } } + + /// + /// Used to track the state of DisablePerforationOCR + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DisablePerforationOCROption { get; private set; } /// /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. /// /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. - [DataMember(Name="disablePerforationOCR", EmitDefaultValue=false)] - public bool? DisablePerforationOCR { get; set; } + [JsonPropertyName("disablePerforationOCR")] + public bool? DisablePerforationOCR { get { return this.DisablePerforationOCROption; } set { this.DisablePerforationOCROption = new(value); } } + + /// + /// Used to track the state of DocumentGroupFilter + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> DocumentGroupFilterOption { get; private set; } /// /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. /// /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. - [DataMember(Name="documentGroupFilter", EmitDefaultValue=false)] - public List DocumentGroupFilter { get; set; } + [JsonPropertyName("documentGroupFilter")] + public List? DocumentGroupFilter { get { return this.DocumentGroupFilterOption; } set { this.DocumentGroupFilterOption = new(value); } } + + /// + /// Used to track the state of ProcessAuth + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ProcessAuthOption { get; private set; } /// /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. /// /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. - [DataMember(Name="processAuth", EmitDefaultValue=false)] - public long ProcessAuth { get; set; } + [JsonPropertyName("processAuth")] + public long? ProcessAuth { get { return this.ProcessAuthOption; } set { this.ProcessAuthOption = new(value); } } + + /// + /// Used to track the state of DeviceId + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DeviceIdOption { get; private set; } /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. - [DataMember(Name="deviceId", EmitDefaultValue=false)] - public int DeviceId { get; set; } + [JsonPropertyName("deviceId")] + public int? DeviceId { get { return this.DeviceIdOption; } set { this.DeviceIdOption = new(value); } } + + /// + /// Used to track the state of DeviceType + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DeviceTypeOption { get; private set; } /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. - [DataMember(Name="deviceType", EmitDefaultValue=false)] - public int DeviceType { get; set; } + [JsonPropertyName("deviceType")] + public int? DeviceType { get { return this.DeviceTypeOption; } set { this.DeviceTypeOption = new(value); } } + + /// + /// Used to track the state of DeviceTypeHex + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DeviceTypeHexOption { get; private set; } /// /// This parameter is used to specify the document reader device type from which input images were captured /// /// This parameter is used to specify the document reader device type from which input images were captured - [DataMember(Name="deviceTypeHex", EmitDefaultValue=false)] - public string DeviceTypeHex { get; set; } + [JsonPropertyName("deviceTypeHex")] + public string? DeviceTypeHex { get { return this.DeviceTypeHexOption; } set { this.DeviceTypeHexOption = new(value); } } + + /// + /// Used to track the state of IgnoreDeviceIdFromImage + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option IgnoreDeviceIdFromImageOption { get; private set; } /// /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false /// /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false - [DataMember(Name="ignoreDeviceIdFromImage", EmitDefaultValue=false)] - public bool? IgnoreDeviceIdFromImage { get; set; } + [JsonPropertyName("ignoreDeviceIdFromImage")] + public bool? IgnoreDeviceIdFromImage { get { return this.IgnoreDeviceIdFromImageOption; } set { this.IgnoreDeviceIdFromImageOption = new(value); } } + + /// + /// Used to track the state of DocumentIdList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> DocumentIdListOption { get; private set; } /// /// List of the document ID's to process. All documents will be processed, if empty. /// /// List of the document ID's to process. All documents will be processed, if empty. - [DataMember(Name="documentIdList", EmitDefaultValue=false)] - public List DocumentIdList { get; set; } + [JsonPropertyName("documentIdList")] + public List? DocumentIdList { get { return this.DocumentIdListOption; } set { this.DocumentIdListOption = new(value); } } + + /// + /// Used to track the state of Rfid + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RfidOption { get; private set; } /// /// Gets or Sets Rfid /// - [DataMember(Name="rfid", EmitDefaultValue=false)] - public ProcessParamsRfid Rfid { get; set; } + [JsonPropertyName("rfid")] + public ProcessParamsRfid? Rfid { get { return this.RfidOption; } set { this.RfidOption = new(value); } } + + /// + /// Used to track the state of CheckAuth + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckAuthOption { get; private set; } /// /// This parameter is used to enable authenticity checks /// /// This parameter is used to enable authenticity checks - [DataMember(Name="checkAuth", EmitDefaultValue=false)] - public bool? CheckAuth { get; set; } + [JsonPropertyName("checkAuth")] + public bool? CheckAuth { get { return this.CheckAuthOption; } set { this.CheckAuthOption = new(value); } } + + /// + /// Used to track the state of AuthParams + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AuthParamsOption { get; private set; } /// /// Gets or Sets AuthParams /// - [DataMember(Name="authParams", EmitDefaultValue=false)] - public AuthParams AuthParams { get; set; } + [JsonPropertyName("authParams")] + public AuthParams? AuthParams { get { return this.AuthParamsOption; } set { this.AuthParamsOption = new(value); } } /// - /// Gets or Sets MrzDetectMode + /// Used to track the state of GenerateNumericCodes /// - [DataMember(Name="mrzDetectMode", EmitDefaultValue=false)] - public MrzDetectModeEnum MrzDetectMode { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option GenerateNumericCodesOption { get; private set; } /// /// This parameter is used to generate numeric representation for issuing state and nationality codes /// /// This parameter is used to generate numeric representation for issuing state and nationality codes - [DataMember(Name="generateNumericCodes", EmitDefaultValue=false)] - public bool? GenerateNumericCodes { get; set; } + [JsonPropertyName("generateNumericCodes")] + public bool? GenerateNumericCodes { get { return this.GenerateNumericCodesOption; } set { this.GenerateNumericCodesOption = new(value); } } + + /// + /// Used to track the state of StrictBarcodeDigitalSignatureCheck + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option StrictBarcodeDigitalSignatureCheckOption { get; private set; } /// /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. /// /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. - [DataMember(Name="strictBarcodeDigitalSignatureCheck", EmitDefaultValue=false)] - public bool? StrictBarcodeDigitalSignatureCheck { get; set; } + [JsonPropertyName("strictBarcodeDigitalSignatureCheck")] + public bool? StrictBarcodeDigitalSignatureCheck { get { return this.StrictBarcodeDigitalSignatureCheckOption; } set { this.StrictBarcodeDigitalSignatureCheckOption = new(value); } } + + /// + /// Used to track the state of SelectLongestNames + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SelectLongestNamesOption { get; private set; } /// /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. /// /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. - [DataMember(Name="selectLongestNames", EmitDefaultValue=false)] - public bool? SelectLongestNames { get; set; } + [JsonPropertyName("selectLongestNames")] + public bool? SelectLongestNames { get { return this.SelectLongestNamesOption; } set { this.SelectLongestNamesOption = new(value); } } + + /// + /// Used to track the state of DoBarcodes + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> DoBarcodesOption { get; private set; } + + /// + /// Set the types of barcodes to process. + /// + /// Set the types of barcodes to process. + [JsonPropertyName("doBarcodes")] + public List? DoBarcodes { get { return this.DoBarcodesOption; } set { this.DoBarcodesOption = new(value); } } /// /// Returns the string presentation of the object @@ -569,10 +994,12 @@ protected ProcessParams() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ProcessParams {\n"); + sb.Append(" Scenario: ").Append(Scenario).Append("\n"); sb.Append(" GenerateDTCVC: ").Append(GenerateDTCVC).Append("\n"); sb.Append(" LcidFilter: ").Append(LcidFilter).Append("\n"); + sb.Append(" CheckLiveness: ").Append(CheckLiveness).Append("\n"); sb.Append(" LcidIgnoreFilter: ").Append(LcidIgnoreFilter).Append("\n"); sb.Append(" OneShotIdentification: ").Append(OneShotIdentification).Append("\n"); sb.Append(" UseFaceApi: ").Append(UseFaceApi).Append("\n"); @@ -580,7 +1007,6 @@ public override string ToString() sb.Append(" DoDetectCan: ").Append(DoDetectCan).Append("\n"); sb.Append(" ImageOutputMaxHeight: ").Append(ImageOutputMaxHeight).Append("\n"); sb.Append(" ImageOutputMaxWidth: ").Append(ImageOutputMaxWidth).Append("\n"); - sb.Append(" Scenario: ").Append(Scenario).Append("\n"); sb.Append(" ResultTypeOutput: ").Append(ResultTypeOutput).Append("\n"); sb.Append(" DoublePageSpread: ").Append(DoublePageSpread).Append("\n"); sb.Append(" GenerateDoublePageSpreadImage: ").Append(GenerateDoublePageSpreadImage).Append("\n"); @@ -629,479 +1055,846 @@ public override string ToString() sb.Append(" GenerateNumericCodes: ").Append(GenerateNumericCodes).Append("\n"); sb.Append(" StrictBarcodeDigitalSignatureCheck: ").Append(StrictBarcodeDigitalSignatureCheck).Append("\n"); sb.Append(" SelectLongestNames: ").Append(SelectLongestNames).Append("\n"); + sb.Append(" DoBarcodes: ").Append(DoBarcodes).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ProcessParamsJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ProcessParams Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ProcessParams); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option scenario = default; + Option generateDTCVC = default; + Option?> lcidFilter = default; + Option checkLiveness = default; + Option?> lcidIgnoreFilter = default; + Option oneShotIdentification = default; + Option useFaceApi = default; + Option faceApi = default; + Option doDetectCan = default; + Option imageOutputMaxHeight = default; + Option imageOutputMaxWidth = default; + Option?> resultTypeOutput = default; + Option doublePageSpread = default; + Option generateDoublePageSpreadImage = default; + Option?> fieldTypesFilter = default; + Option dateFormat = default; + Option measureSystem = default; + Option imageDpiOutMax = default; + Option alreadyCropped = default; + Option?> customParams = default; + Option?> config = default; + Option log = default; + Option logLevel = default; + Option forceDocID = default; + Option matchTextFieldMask = default; + Option fastDocDetect = default; + Option updateOCRValidityByGlare = default; + Option checkRequiredTextFields = default; + Option returnCroppedBarcode = default; + Option imageQa = default; + Option strictImageQuality = default; + Option respectImageQuality = default; + Option forceDocFormat = default; + Option noGraphics = default; + Option depersonalizeLog = default; + Option multiDocOnImage = default; + Option shiftExpiryDate = default; + Option minimalHolderAge = default; + Option returnUncroppedImage = default; + Option?> mrzFormatsFilter = default; + Option forceReadMrzBeforeLocate = default; + Option parseBarcodes = default; + Option convertCase = default; + Option splitNames = default; + Option disablePerforationOCR = default; + Option?> documentGroupFilter = default; + Option processAuth = default; + Option deviceId = default; + Option deviceType = default; + Option deviceTypeHex = default; + Option ignoreDeviceIdFromImage = default; + Option?> documentIdList = default; + Option rfid = default; + Option checkAuth = default; + Option authParams = default; + Option mrzDetectMode = default; + Option generateNumericCodes = default; + Option strictBarcodeDigitalSignatureCheck = default; + Option selectLongestNames = default; + Option?> doBarcodes = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "scenario": + string? scenarioRawValue = utf8JsonReader.GetString(); + if (scenarioRawValue != null) + scenario = new Option(ScenarioValueConverter.FromStringOrDefault(scenarioRawValue)); + break; + case "generateDTCVC": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + generateDTCVC = new Option(utf8JsonReader.GetBoolean()); + break; + case "lcidFilter": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + lcidFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "checkLiveness": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkLiveness = new Option(utf8JsonReader.GetBoolean()); + break; + case "lcidIgnoreFilter": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + lcidIgnoreFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "oneShotIdentification": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + oneShotIdentification = new Option(utf8JsonReader.GetBoolean()); + break; + case "useFaceApi": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + useFaceApi = new Option(utf8JsonReader.GetBoolean()); + break; + case "faceApi": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + faceApi = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "doDetectCan": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + doDetectCan = new Option(utf8JsonReader.GetBoolean()); + break; + case "imageOutputMaxHeight": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + imageOutputMaxHeight = new Option(utf8JsonReader.GetInt32()); + break; + case "imageOutputMaxWidth": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + imageOutputMaxWidth = new Option(utf8JsonReader.GetInt32()); + break; + case "resultTypeOutput": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultTypeOutput = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "doublePageSpread": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + doublePageSpread = new Option(utf8JsonReader.GetBoolean()); + break; + case "generateDoublePageSpreadImage": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + generateDoublePageSpreadImage = new Option(utf8JsonReader.GetBoolean()); + break; + case "fieldTypesFilter": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldTypesFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "dateFormat": + dateFormat = new Option(utf8JsonReader.GetString()!); + break; + case "measureSystem": + string? measureSystemRawValue = utf8JsonReader.GetString(); + if (measureSystemRawValue != null) + measureSystem = new Option(MeasureSystemValueConverter.FromStringOrDefault(measureSystemRawValue)); + break; + case "imageDpiOutMax": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + imageDpiOutMax = new Option(utf8JsonReader.GetInt32()); + break; + case "alreadyCropped": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + alreadyCropped = new Option(utf8JsonReader.GetBoolean()); + break; + case "customParams": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + customParams = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "config": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + config = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "log": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + log = new Option(utf8JsonReader.GetBoolean()); + break; + case "logLevel": + string? logLevelRawValue = utf8JsonReader.GetString(); + if (logLevelRawValue != null) + logLevel = new Option(LogLevelValueConverter.FromStringOrDefault(logLevelRawValue)); + break; + case "forceDocID": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + forceDocID = new Option(utf8JsonReader.GetInt32()); + break; + case "matchTextFieldMask": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + matchTextFieldMask = new Option(utf8JsonReader.GetBoolean()); + break; + case "fastDocDetect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fastDocDetect = new Option(utf8JsonReader.GetBoolean()); + break; + case "updateOCRValidityByGlare": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + updateOCRValidityByGlare = new Option(utf8JsonReader.GetBoolean()); + break; + case "checkRequiredTextFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkRequiredTextFields = new Option(utf8JsonReader.GetBoolean()); + break; + case "returnCroppedBarcode": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + returnCroppedBarcode = new Option(utf8JsonReader.GetBoolean()); + break; + case "imageQa": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + imageQa = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "strictImageQuality": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + strictImageQuality = new Option(utf8JsonReader.GetBoolean()); + break; + case "respectImageQuality": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + respectImageQuality = new Option(utf8JsonReader.GetBoolean()); + break; + case "forceDocFormat": + string? forceDocFormatRawValue = utf8JsonReader.GetString(); + if (forceDocFormatRawValue != null) + forceDocFormat = new Option(DocumentFormatValueConverter.FromStringOrDefault(forceDocFormatRawValue)); + break; + case "noGraphics": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + noGraphics = new Option(utf8JsonReader.GetBoolean()); + break; + case "depersonalizeLog": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + depersonalizeLog = new Option(utf8JsonReader.GetBoolean()); + break; + case "multiDocOnImage": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + multiDocOnImage = new Option(utf8JsonReader.GetBoolean()); + break; + case "shiftExpiryDate": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + shiftExpiryDate = new Option(utf8JsonReader.GetInt32()); + break; + case "minimalHolderAge": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + minimalHolderAge = new Option(utf8JsonReader.GetInt32()); + break; + case "returnUncroppedImage": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + returnUncroppedImage = new Option(utf8JsonReader.GetBoolean()); + break; + case "mrzFormatsFilter": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mrzFormatsFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "forceReadMrzBeforeLocate": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + forceReadMrzBeforeLocate = new Option(utf8JsonReader.GetBoolean()); + break; + case "parseBarcodes": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + parseBarcodes = new Option(utf8JsonReader.GetBoolean()); + break; + case "convertCase": + string? convertCaseRawValue = utf8JsonReader.GetString(); + if (convertCaseRawValue != null) + convertCase = new Option(TextPostProcessingValueConverter.FromStringOrDefault(convertCaseRawValue)); + break; + case "splitNames": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + splitNames = new Option(utf8JsonReader.GetBoolean()); + break; + case "disablePerforationOCR": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + disablePerforationOCR = new Option(utf8JsonReader.GetBoolean()); + break; + case "documentGroupFilter": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + documentGroupFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "processAuth": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + processAuth = new Option(utf8JsonReader.GetInt64()); + break; + case "deviceId": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + deviceId = new Option(utf8JsonReader.GetInt32()); + break; + case "deviceType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + deviceType = new Option(utf8JsonReader.GetInt32()); + break; + case "deviceTypeHex": + deviceTypeHex = new Option(utf8JsonReader.GetString()!); + break; + case "ignoreDeviceIdFromImage": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + ignoreDeviceIdFromImage = new Option(utf8JsonReader.GetBoolean()); + break; + case "documentIdList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + documentIdList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "rfid": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rfid = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "checkAuth": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkAuth = new Option(utf8JsonReader.GetBoolean()); + break; + case "authParams": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + authParams = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "mrzDetectMode": + string? mrzDetectModeRawValue = utf8JsonReader.GetString(); + if (mrzDetectModeRawValue != null) + mrzDetectMode = new Option(MrzDetectModeEnumValueConverter.FromStringOrDefault(mrzDetectModeRawValue)); + break; + case "generateNumericCodes": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + generateNumericCodes = new Option(utf8JsonReader.GetBoolean()); + break; + case "strictBarcodeDigitalSignatureCheck": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + strictBarcodeDigitalSignatureCheck = new Option(utf8JsonReader.GetBoolean()); + break; + case "selectLongestNames": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + selectLongestNames = new Option(utf8JsonReader.GetBoolean()); + break; + case "doBarcodes": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + doBarcodes = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!scenario.IsSet) + throw new ArgumentException("Property is required for class ProcessParams.", nameof(scenario)); + + if (scenario.IsSet && scenario.Value == null) + throw new ArgumentNullException(nameof(scenario), "Property is not nullable for class ProcessParams."); + + if (generateDTCVC.IsSet && generateDTCVC.Value == null) + throw new ArgumentNullException(nameof(generateDTCVC), "Property is not nullable for class ProcessParams."); + + if (lcidFilter.IsSet && lcidFilter.Value == null) + throw new ArgumentNullException(nameof(lcidFilter), "Property is not nullable for class ProcessParams."); + + if (checkLiveness.IsSet && checkLiveness.Value == null) + throw new ArgumentNullException(nameof(checkLiveness), "Property is not nullable for class ProcessParams."); + + if (lcidIgnoreFilter.IsSet && lcidIgnoreFilter.Value == null) + throw new ArgumentNullException(nameof(lcidIgnoreFilter), "Property is not nullable for class ProcessParams."); + + if (oneShotIdentification.IsSet && oneShotIdentification.Value == null) + throw new ArgumentNullException(nameof(oneShotIdentification), "Property is not nullable for class ProcessParams."); + + if (useFaceApi.IsSet && useFaceApi.Value == null) + throw new ArgumentNullException(nameof(useFaceApi), "Property is not nullable for class ProcessParams."); + + if (faceApi.IsSet && faceApi.Value == null) + throw new ArgumentNullException(nameof(faceApi), "Property is not nullable for class ProcessParams."); + + if (doDetectCan.IsSet && doDetectCan.Value == null) + throw new ArgumentNullException(nameof(doDetectCan), "Property is not nullable for class ProcessParams."); + + if (imageOutputMaxHeight.IsSet && imageOutputMaxHeight.Value == null) + throw new ArgumentNullException(nameof(imageOutputMaxHeight), "Property is not nullable for class ProcessParams."); + + if (imageOutputMaxWidth.IsSet && imageOutputMaxWidth.Value == null) + throw new ArgumentNullException(nameof(imageOutputMaxWidth), "Property is not nullable for class ProcessParams."); + + if (resultTypeOutput.IsSet && resultTypeOutput.Value == null) + throw new ArgumentNullException(nameof(resultTypeOutput), "Property is not nullable for class ProcessParams."); + + if (doublePageSpread.IsSet && doublePageSpread.Value == null) + throw new ArgumentNullException(nameof(doublePageSpread), "Property is not nullable for class ProcessParams."); + + if (generateDoublePageSpreadImage.IsSet && generateDoublePageSpreadImage.Value == null) + throw new ArgumentNullException(nameof(generateDoublePageSpreadImage), "Property is not nullable for class ProcessParams."); + + if (fieldTypesFilter.IsSet && fieldTypesFilter.Value == null) + throw new ArgumentNullException(nameof(fieldTypesFilter), "Property is not nullable for class ProcessParams."); + + if (dateFormat.IsSet && dateFormat.Value == null) + throw new ArgumentNullException(nameof(dateFormat), "Property is not nullable for class ProcessParams."); + + if (measureSystem.IsSet && measureSystem.Value == null) + throw new ArgumentNullException(nameof(measureSystem), "Property is not nullable for class ProcessParams."); + + if (imageDpiOutMax.IsSet && imageDpiOutMax.Value == null) + throw new ArgumentNullException(nameof(imageDpiOutMax), "Property is not nullable for class ProcessParams."); + + if (alreadyCropped.IsSet && alreadyCropped.Value == null) + throw new ArgumentNullException(nameof(alreadyCropped), "Property is not nullable for class ProcessParams."); + + if (customParams.IsSet && customParams.Value == null) + throw new ArgumentNullException(nameof(customParams), "Property is not nullable for class ProcessParams."); + + if (config.IsSet && config.Value == null) + throw new ArgumentNullException(nameof(config), "Property is not nullable for class ProcessParams."); + + if (log.IsSet && log.Value == null) + throw new ArgumentNullException(nameof(log), "Property is not nullable for class ProcessParams."); + + if (logLevel.IsSet && logLevel.Value == null) + throw new ArgumentNullException(nameof(logLevel), "Property is not nullable for class ProcessParams."); + + if (forceDocID.IsSet && forceDocID.Value == null) + throw new ArgumentNullException(nameof(forceDocID), "Property is not nullable for class ProcessParams."); + + if (matchTextFieldMask.IsSet && matchTextFieldMask.Value == null) + throw new ArgumentNullException(nameof(matchTextFieldMask), "Property is not nullable for class ProcessParams."); + + if (fastDocDetect.IsSet && fastDocDetect.Value == null) + throw new ArgumentNullException(nameof(fastDocDetect), "Property is not nullable for class ProcessParams."); + + if (updateOCRValidityByGlare.IsSet && updateOCRValidityByGlare.Value == null) + throw new ArgumentNullException(nameof(updateOCRValidityByGlare), "Property is not nullable for class ProcessParams."); + + if (checkRequiredTextFields.IsSet && checkRequiredTextFields.Value == null) + throw new ArgumentNullException(nameof(checkRequiredTextFields), "Property is not nullable for class ProcessParams."); + + if (returnCroppedBarcode.IsSet && returnCroppedBarcode.Value == null) + throw new ArgumentNullException(nameof(returnCroppedBarcode), "Property is not nullable for class ProcessParams."); + + if (imageQa.IsSet && imageQa.Value == null) + throw new ArgumentNullException(nameof(imageQa), "Property is not nullable for class ProcessParams."); + + if (strictImageQuality.IsSet && strictImageQuality.Value == null) + throw new ArgumentNullException(nameof(strictImageQuality), "Property is not nullable for class ProcessParams."); + + if (respectImageQuality.IsSet && respectImageQuality.Value == null) + throw new ArgumentNullException(nameof(respectImageQuality), "Property is not nullable for class ProcessParams."); + + if (forceDocFormat.IsSet && forceDocFormat.Value == null) + throw new ArgumentNullException(nameof(forceDocFormat), "Property is not nullable for class ProcessParams."); + + if (noGraphics.IsSet && noGraphics.Value == null) + throw new ArgumentNullException(nameof(noGraphics), "Property is not nullable for class ProcessParams."); + + if (depersonalizeLog.IsSet && depersonalizeLog.Value == null) + throw new ArgumentNullException(nameof(depersonalizeLog), "Property is not nullable for class ProcessParams."); + + if (multiDocOnImage.IsSet && multiDocOnImage.Value == null) + throw new ArgumentNullException(nameof(multiDocOnImage), "Property is not nullable for class ProcessParams."); + + if (shiftExpiryDate.IsSet && shiftExpiryDate.Value == null) + throw new ArgumentNullException(nameof(shiftExpiryDate), "Property is not nullable for class ProcessParams."); + + if (minimalHolderAge.IsSet && minimalHolderAge.Value == null) + throw new ArgumentNullException(nameof(minimalHolderAge), "Property is not nullable for class ProcessParams."); + + if (returnUncroppedImage.IsSet && returnUncroppedImage.Value == null) + throw new ArgumentNullException(nameof(returnUncroppedImage), "Property is not nullable for class ProcessParams."); + + if (mrzFormatsFilter.IsSet && mrzFormatsFilter.Value == null) + throw new ArgumentNullException(nameof(mrzFormatsFilter), "Property is not nullable for class ProcessParams."); + + if (forceReadMrzBeforeLocate.IsSet && forceReadMrzBeforeLocate.Value == null) + throw new ArgumentNullException(nameof(forceReadMrzBeforeLocate), "Property is not nullable for class ProcessParams."); + + if (parseBarcodes.IsSet && parseBarcodes.Value == null) + throw new ArgumentNullException(nameof(parseBarcodes), "Property is not nullable for class ProcessParams."); + + if (convertCase.IsSet && convertCase.Value == null) + throw new ArgumentNullException(nameof(convertCase), "Property is not nullable for class ProcessParams."); + + if (splitNames.IsSet && splitNames.Value == null) + throw new ArgumentNullException(nameof(splitNames), "Property is not nullable for class ProcessParams."); + + if (disablePerforationOCR.IsSet && disablePerforationOCR.Value == null) + throw new ArgumentNullException(nameof(disablePerforationOCR), "Property is not nullable for class ProcessParams."); + + if (documentGroupFilter.IsSet && documentGroupFilter.Value == null) + throw new ArgumentNullException(nameof(documentGroupFilter), "Property is not nullable for class ProcessParams."); + + if (processAuth.IsSet && processAuth.Value == null) + throw new ArgumentNullException(nameof(processAuth), "Property is not nullable for class ProcessParams."); + + if (deviceId.IsSet && deviceId.Value == null) + throw new ArgumentNullException(nameof(deviceId), "Property is not nullable for class ProcessParams."); + + if (deviceType.IsSet && deviceType.Value == null) + throw new ArgumentNullException(nameof(deviceType), "Property is not nullable for class ProcessParams."); + + if (deviceTypeHex.IsSet && deviceTypeHex.Value == null) + throw new ArgumentNullException(nameof(deviceTypeHex), "Property is not nullable for class ProcessParams."); + + if (ignoreDeviceIdFromImage.IsSet && ignoreDeviceIdFromImage.Value == null) + throw new ArgumentNullException(nameof(ignoreDeviceIdFromImage), "Property is not nullable for class ProcessParams."); + + if (documentIdList.IsSet && documentIdList.Value == null) + throw new ArgumentNullException(nameof(documentIdList), "Property is not nullable for class ProcessParams."); + + if (rfid.IsSet && rfid.Value == null) + throw new ArgumentNullException(nameof(rfid), "Property is not nullable for class ProcessParams."); + + if (checkAuth.IsSet && checkAuth.Value == null) + throw new ArgumentNullException(nameof(checkAuth), "Property is not nullable for class ProcessParams."); + + if (authParams.IsSet && authParams.Value == null) + throw new ArgumentNullException(nameof(authParams), "Property is not nullable for class ProcessParams."); + + if (mrzDetectMode.IsSet && mrzDetectMode.Value == null) + throw new ArgumentNullException(nameof(mrzDetectMode), "Property is not nullable for class ProcessParams."); + + if (generateNumericCodes.IsSet && generateNumericCodes.Value == null) + throw new ArgumentNullException(nameof(generateNumericCodes), "Property is not nullable for class ProcessParams."); + + if (strictBarcodeDigitalSignatureCheck.IsSet && strictBarcodeDigitalSignatureCheck.Value == null) + throw new ArgumentNullException(nameof(strictBarcodeDigitalSignatureCheck), "Property is not nullable for class ProcessParams."); + + if (selectLongestNames.IsSet && selectLongestNames.Value == null) + throw new ArgumentNullException(nameof(selectLongestNames), "Property is not nullable for class ProcessParams."); + + if (doBarcodes.IsSet && doBarcodes.Value == null) + throw new ArgumentNullException(nameof(doBarcodes), "Property is not nullable for class ProcessParams."); + + return new ProcessParams(scenario.Value!.Value!, generateDTCVC, lcidFilter, checkLiveness, lcidIgnoreFilter, oneShotIdentification, useFaceApi, faceApi, doDetectCan, imageOutputMaxHeight, imageOutputMaxWidth, resultTypeOutput, doublePageSpread, generateDoublePageSpreadImage, fieldTypesFilter, dateFormat, measureSystem, imageDpiOutMax, alreadyCropped, customParams, config, log, logLevel, forceDocID, matchTextFieldMask, fastDocDetect, updateOCRValidityByGlare, checkRequiredTextFields, returnCroppedBarcode, imageQa, strictImageQuality, respectImageQuality, forceDocFormat, noGraphics, depersonalizeLog, multiDocOnImage, shiftExpiryDate, minimalHolderAge, returnUncroppedImage, mrzFormatsFilter, forceReadMrzBeforeLocate, parseBarcodes, convertCase, splitNames, disablePerforationOCR, documentGroupFilter, processAuth, deviceId, deviceType, deviceTypeHex, ignoreDeviceIdFromImage, documentIdList, rfid, checkAuth, authParams, mrzDetectMode, generateNumericCodes, strictBarcodeDigitalSignatureCheck, selectLongestNames, doBarcodes); } /// - /// Returns true if ProcessParams instances are equal + /// Serializes a /// - /// Instance of ProcessParams to be compared - /// Boolean - public bool Equals(ProcessParams input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ProcessParams processParams, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.GenerateDTCVC == input.GenerateDTCVC || - (this.GenerateDTCVC != null && - this.GenerateDTCVC.Equals(input.GenerateDTCVC)) - ) && - ( - this.LcidFilter == input.LcidFilter || - this.LcidFilter != null && - input.LcidFilter != null && - this.LcidFilter.SequenceEqual(input.LcidFilter) - ) && - ( - this.LcidIgnoreFilter == input.LcidIgnoreFilter || - this.LcidIgnoreFilter != null && - input.LcidIgnoreFilter != null && - this.LcidIgnoreFilter.SequenceEqual(input.LcidIgnoreFilter) - ) && - ( - this.OneShotIdentification == input.OneShotIdentification || - (this.OneShotIdentification != null && - this.OneShotIdentification.Equals(input.OneShotIdentification)) - ) && - ( - this.UseFaceApi == input.UseFaceApi || - (this.UseFaceApi != null && - this.UseFaceApi.Equals(input.UseFaceApi)) - ) && - ( - this.FaceApi == input.FaceApi || - (this.FaceApi != null && - this.FaceApi.Equals(input.FaceApi)) - ) && - ( - this.DoDetectCan == input.DoDetectCan || - (this.DoDetectCan != null && - this.DoDetectCan.Equals(input.DoDetectCan)) - ) && - ( - this.ImageOutputMaxHeight == input.ImageOutputMaxHeight || - (this.ImageOutputMaxHeight != null && - this.ImageOutputMaxHeight.Equals(input.ImageOutputMaxHeight)) - ) && - ( - this.ImageOutputMaxWidth == input.ImageOutputMaxWidth || - (this.ImageOutputMaxWidth != null && - this.ImageOutputMaxWidth.Equals(input.ImageOutputMaxWidth)) - ) && - ( - this.Scenario == input.Scenario || - (this.Scenario != null && - this.Scenario.Equals(input.Scenario)) - ) && - ( - this.ResultTypeOutput == input.ResultTypeOutput || - this.ResultTypeOutput != null && - input.ResultTypeOutput != null && - this.ResultTypeOutput.SequenceEqual(input.ResultTypeOutput) - ) && - ( - this.DoublePageSpread == input.DoublePageSpread || - (this.DoublePageSpread != null && - this.DoublePageSpread.Equals(input.DoublePageSpread)) - ) && - ( - this.GenerateDoublePageSpreadImage == input.GenerateDoublePageSpreadImage || - (this.GenerateDoublePageSpreadImage != null && - this.GenerateDoublePageSpreadImage.Equals(input.GenerateDoublePageSpreadImage)) - ) && - ( - this.FieldTypesFilter == input.FieldTypesFilter || - this.FieldTypesFilter != null && - input.FieldTypesFilter != null && - this.FieldTypesFilter.SequenceEqual(input.FieldTypesFilter) - ) && - ( - this.DateFormat == input.DateFormat || - (this.DateFormat != null && - this.DateFormat.Equals(input.DateFormat)) - ) && - ( - this.MeasureSystem == input.MeasureSystem || - (this.MeasureSystem != null && - this.MeasureSystem.Equals(input.MeasureSystem)) - ) && - ( - this.ImageDpiOutMax == input.ImageDpiOutMax || - (this.ImageDpiOutMax != null && - this.ImageDpiOutMax.Equals(input.ImageDpiOutMax)) - ) && - ( - this.AlreadyCropped == input.AlreadyCropped || - (this.AlreadyCropped != null && - this.AlreadyCropped.Equals(input.AlreadyCropped)) - ) && - ( - this.CustomParams == input.CustomParams || - this.CustomParams != null && - input.CustomParams != null && - this.CustomParams.SequenceEqual(input.CustomParams) - ) && - ( - this.Config == input.Config || - this.Config != null && - input.Config != null && - this.Config.SequenceEqual(input.Config) - ) && - ( - this.Log == input.Log || - (this.Log != null && - this.Log.Equals(input.Log)) - ) && - ( - this.LogLevel == input.LogLevel || - (this.LogLevel != null && - this.LogLevel.Equals(input.LogLevel)) - ) && - ( - this.ForceDocID == input.ForceDocID || - (this.ForceDocID != null && - this.ForceDocID.Equals(input.ForceDocID)) - ) && - ( - this.MatchTextFieldMask == input.MatchTextFieldMask || - (this.MatchTextFieldMask != null && - this.MatchTextFieldMask.Equals(input.MatchTextFieldMask)) - ) && - ( - this.FastDocDetect == input.FastDocDetect || - (this.FastDocDetect != null && - this.FastDocDetect.Equals(input.FastDocDetect)) - ) && - ( - this.UpdateOCRValidityByGlare == input.UpdateOCRValidityByGlare || - (this.UpdateOCRValidityByGlare != null && - this.UpdateOCRValidityByGlare.Equals(input.UpdateOCRValidityByGlare)) - ) && - ( - this.CheckRequiredTextFields == input.CheckRequiredTextFields || - (this.CheckRequiredTextFields != null && - this.CheckRequiredTextFields.Equals(input.CheckRequiredTextFields)) - ) && - ( - this.ReturnCroppedBarcode == input.ReturnCroppedBarcode || - (this.ReturnCroppedBarcode != null && - this.ReturnCroppedBarcode.Equals(input.ReturnCroppedBarcode)) - ) && - ( - this.ImageQa == input.ImageQa || - (this.ImageQa != null && - this.ImageQa.Equals(input.ImageQa)) - ) && - ( - this.StrictImageQuality == input.StrictImageQuality || - (this.StrictImageQuality != null && - this.StrictImageQuality.Equals(input.StrictImageQuality)) - ) && - ( - this.RespectImageQuality == input.RespectImageQuality || - (this.RespectImageQuality != null && - this.RespectImageQuality.Equals(input.RespectImageQuality)) - ) && - ( - this.ForceDocFormat == input.ForceDocFormat || - (this.ForceDocFormat != null && - this.ForceDocFormat.Equals(input.ForceDocFormat)) - ) && - ( - this.NoGraphics == input.NoGraphics || - (this.NoGraphics != null && - this.NoGraphics.Equals(input.NoGraphics)) - ) && - ( - this.DepersonalizeLog == input.DepersonalizeLog || - (this.DepersonalizeLog != null && - this.DepersonalizeLog.Equals(input.DepersonalizeLog)) - ) && - ( - this.MultiDocOnImage == input.MultiDocOnImage || - (this.MultiDocOnImage != null && - this.MultiDocOnImage.Equals(input.MultiDocOnImage)) - ) && - ( - this.ShiftExpiryDate == input.ShiftExpiryDate || - (this.ShiftExpiryDate != null && - this.ShiftExpiryDate.Equals(input.ShiftExpiryDate)) - ) && - ( - this.MinimalHolderAge == input.MinimalHolderAge || - (this.MinimalHolderAge != null && - this.MinimalHolderAge.Equals(input.MinimalHolderAge)) - ) && - ( - this.ReturnUncroppedImage == input.ReturnUncroppedImage || - (this.ReturnUncroppedImage != null && - this.ReturnUncroppedImage.Equals(input.ReturnUncroppedImage)) - ) && - ( - this.MrzFormatsFilter == input.MrzFormatsFilter || - this.MrzFormatsFilter != null && - input.MrzFormatsFilter != null && - this.MrzFormatsFilter.SequenceEqual(input.MrzFormatsFilter) - ) && - ( - this.ForceReadMrzBeforeLocate == input.ForceReadMrzBeforeLocate || - (this.ForceReadMrzBeforeLocate != null && - this.ForceReadMrzBeforeLocate.Equals(input.ForceReadMrzBeforeLocate)) - ) && - ( - this.ParseBarcodes == input.ParseBarcodes || - (this.ParseBarcodes != null && - this.ParseBarcodes.Equals(input.ParseBarcodes)) - ) && - ( - this.ConvertCase == input.ConvertCase || - (this.ConvertCase != null && - this.ConvertCase.Equals(input.ConvertCase)) - ) && - ( - this.SplitNames == input.SplitNames || - (this.SplitNames != null && - this.SplitNames.Equals(input.SplitNames)) - ) && - ( - this.DisablePerforationOCR == input.DisablePerforationOCR || - (this.DisablePerforationOCR != null && - this.DisablePerforationOCR.Equals(input.DisablePerforationOCR)) - ) && - ( - this.DocumentGroupFilter == input.DocumentGroupFilter || - this.DocumentGroupFilter != null && - input.DocumentGroupFilter != null && - this.DocumentGroupFilter.SequenceEqual(input.DocumentGroupFilter) - ) && - ( - this.ProcessAuth == input.ProcessAuth || - (this.ProcessAuth != null && - this.ProcessAuth.Equals(input.ProcessAuth)) - ) && - ( - this.DeviceId == input.DeviceId || - (this.DeviceId != null && - this.DeviceId.Equals(input.DeviceId)) - ) && - ( - this.DeviceType == input.DeviceType || - (this.DeviceType != null && - this.DeviceType.Equals(input.DeviceType)) - ) && - ( - this.DeviceTypeHex == input.DeviceTypeHex || - (this.DeviceTypeHex != null && - this.DeviceTypeHex.Equals(input.DeviceTypeHex)) - ) && - ( - this.IgnoreDeviceIdFromImage == input.IgnoreDeviceIdFromImage || - (this.IgnoreDeviceIdFromImage != null && - this.IgnoreDeviceIdFromImage.Equals(input.IgnoreDeviceIdFromImage)) - ) && - ( - this.DocumentIdList == input.DocumentIdList || - this.DocumentIdList != null && - input.DocumentIdList != null && - this.DocumentIdList.SequenceEqual(input.DocumentIdList) - ) && - ( - this.Rfid == input.Rfid || - (this.Rfid != null && - this.Rfid.Equals(input.Rfid)) - ) && - ( - this.CheckAuth == input.CheckAuth || - (this.CheckAuth != null && - this.CheckAuth.Equals(input.CheckAuth)) - ) && - ( - this.AuthParams == input.AuthParams || - (this.AuthParams != null && - this.AuthParams.Equals(input.AuthParams)) - ) && - ( - this.MrzDetectMode == input.MrzDetectMode || - (this.MrzDetectMode != null && - this.MrzDetectMode.Equals(input.MrzDetectMode)) - ) && - ( - this.GenerateNumericCodes == input.GenerateNumericCodes || - (this.GenerateNumericCodes != null && - this.GenerateNumericCodes.Equals(input.GenerateNumericCodes)) - ) && - ( - this.StrictBarcodeDigitalSignatureCheck == input.StrictBarcodeDigitalSignatureCheck || - (this.StrictBarcodeDigitalSignatureCheck != null && - this.StrictBarcodeDigitalSignatureCheck.Equals(input.StrictBarcodeDigitalSignatureCheck)) - ) && - ( - this.SelectLongestNames == input.SelectLongestNames || - (this.SelectLongestNames != null && - this.SelectLongestNames.Equals(input.SelectLongestNames)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, processParams, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ProcessParams processParams, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (processParams.LcidFilterOption.IsSet && processParams.LcidFilter == null) + throw new ArgumentNullException(nameof(processParams.LcidFilter), "Property is required for class ProcessParams."); + + if (processParams.LcidIgnoreFilterOption.IsSet && processParams.LcidIgnoreFilter == null) + throw new ArgumentNullException(nameof(processParams.LcidIgnoreFilter), "Property is required for class ProcessParams."); + + if (processParams.FaceApiOption.IsSet && processParams.FaceApi == null) + throw new ArgumentNullException(nameof(processParams.FaceApi), "Property is required for class ProcessParams."); + + if (processParams.ResultTypeOutputOption.IsSet && processParams.ResultTypeOutput == null) + throw new ArgumentNullException(nameof(processParams.ResultTypeOutput), "Property is required for class ProcessParams."); + + if (processParams.FieldTypesFilterOption.IsSet && processParams.FieldTypesFilter == null) + throw new ArgumentNullException(nameof(processParams.FieldTypesFilter), "Property is required for class ProcessParams."); + + if (processParams.DateFormatOption.IsSet && processParams.DateFormat == null) + throw new ArgumentNullException(nameof(processParams.DateFormat), "Property is required for class ProcessParams."); + + if (processParams.CustomParamsOption.IsSet && processParams.CustomParams == null) + throw new ArgumentNullException(nameof(processParams.CustomParams), "Property is required for class ProcessParams."); + + if (processParams.ConfigOption.IsSet && processParams.Config == null) + throw new ArgumentNullException(nameof(processParams.Config), "Property is required for class ProcessParams."); + + if (processParams.ImageQaOption.IsSet && processParams.ImageQa == null) + throw new ArgumentNullException(nameof(processParams.ImageQa), "Property is required for class ProcessParams."); + + if (processParams.MrzFormatsFilterOption.IsSet && processParams.MrzFormatsFilter == null) + throw new ArgumentNullException(nameof(processParams.MrzFormatsFilter), "Property is required for class ProcessParams."); + + if (processParams.DocumentGroupFilterOption.IsSet && processParams.DocumentGroupFilter == null) + throw new ArgumentNullException(nameof(processParams.DocumentGroupFilter), "Property is required for class ProcessParams."); + + if (processParams.DeviceTypeHexOption.IsSet && processParams.DeviceTypeHex == null) + throw new ArgumentNullException(nameof(processParams.DeviceTypeHex), "Property is required for class ProcessParams."); + + if (processParams.DocumentIdListOption.IsSet && processParams.DocumentIdList == null) + throw new ArgumentNullException(nameof(processParams.DocumentIdList), "Property is required for class ProcessParams."); + + if (processParams.RfidOption.IsSet && processParams.Rfid == null) + throw new ArgumentNullException(nameof(processParams.Rfid), "Property is required for class ProcessParams."); + + if (processParams.AuthParamsOption.IsSet && processParams.AuthParams == null) + throw new ArgumentNullException(nameof(processParams.AuthParams), "Property is required for class ProcessParams."); + + if (processParams.DoBarcodesOption.IsSet && processParams.DoBarcodes == null) + throw new ArgumentNullException(nameof(processParams.DoBarcodes), "Property is required for class ProcessParams."); + + var scenarioRawValue = ScenarioValueConverter.ToJsonValue(processParams.Scenario); + writer.WriteString("scenario", scenarioRawValue); + + if (processParams.GenerateDTCVCOption.IsSet) + writer.WriteBoolean("generateDTCVC", processParams.GenerateDTCVCOption.Value!.Value); + + if (processParams.LcidFilterOption.IsSet) { - int hashCode = 41; - if (this.GenerateDTCVC != null) - hashCode = hashCode * 59 + this.GenerateDTCVC.GetHashCode(); - if (this.LcidFilter != null) - hashCode = hashCode * 59 + this.LcidFilter.GetHashCode(); - if (this.LcidIgnoreFilter != null) - hashCode = hashCode * 59 + this.LcidIgnoreFilter.GetHashCode(); - if (this.OneShotIdentification != null) - hashCode = hashCode * 59 + this.OneShotIdentification.GetHashCode(); - if (this.UseFaceApi != null) - hashCode = hashCode * 59 + this.UseFaceApi.GetHashCode(); - if (this.FaceApi != null) - hashCode = hashCode * 59 + this.FaceApi.GetHashCode(); - if (this.DoDetectCan != null) - hashCode = hashCode * 59 + this.DoDetectCan.GetHashCode(); - if (this.ImageOutputMaxHeight != null) - hashCode = hashCode * 59 + this.ImageOutputMaxHeight.GetHashCode(); - if (this.ImageOutputMaxWidth != null) - hashCode = hashCode * 59 + this.ImageOutputMaxWidth.GetHashCode(); - if (this.Scenario != null) - hashCode = hashCode * 59 + this.Scenario.GetHashCode(); - if (this.ResultTypeOutput != null) - hashCode = hashCode * 59 + this.ResultTypeOutput.GetHashCode(); - if (this.DoublePageSpread != null) - hashCode = hashCode * 59 + this.DoublePageSpread.GetHashCode(); - if (this.GenerateDoublePageSpreadImage != null) - hashCode = hashCode * 59 + this.GenerateDoublePageSpreadImage.GetHashCode(); - if (this.FieldTypesFilter != null) - hashCode = hashCode * 59 + this.FieldTypesFilter.GetHashCode(); - if (this.DateFormat != null) - hashCode = hashCode * 59 + this.DateFormat.GetHashCode(); - if (this.MeasureSystem != null) - hashCode = hashCode * 59 + this.MeasureSystem.GetHashCode(); - if (this.ImageDpiOutMax != null) - hashCode = hashCode * 59 + this.ImageDpiOutMax.GetHashCode(); - if (this.AlreadyCropped != null) - hashCode = hashCode * 59 + this.AlreadyCropped.GetHashCode(); - if (this.CustomParams != null) - hashCode = hashCode * 59 + this.CustomParams.GetHashCode(); - if (this.Config != null) - hashCode = hashCode * 59 + this.Config.GetHashCode(); - if (this.Log != null) - hashCode = hashCode * 59 + this.Log.GetHashCode(); - if (this.LogLevel != null) - hashCode = hashCode * 59 + this.LogLevel.GetHashCode(); - if (this.ForceDocID != null) - hashCode = hashCode * 59 + this.ForceDocID.GetHashCode(); - if (this.MatchTextFieldMask != null) - hashCode = hashCode * 59 + this.MatchTextFieldMask.GetHashCode(); - if (this.FastDocDetect != null) - hashCode = hashCode * 59 + this.FastDocDetect.GetHashCode(); - if (this.UpdateOCRValidityByGlare != null) - hashCode = hashCode * 59 + this.UpdateOCRValidityByGlare.GetHashCode(); - if (this.CheckRequiredTextFields != null) - hashCode = hashCode * 59 + this.CheckRequiredTextFields.GetHashCode(); - if (this.ReturnCroppedBarcode != null) - hashCode = hashCode * 59 + this.ReturnCroppedBarcode.GetHashCode(); - if (this.ImageQa != null) - hashCode = hashCode * 59 + this.ImageQa.GetHashCode(); - if (this.StrictImageQuality != null) - hashCode = hashCode * 59 + this.StrictImageQuality.GetHashCode(); - if (this.RespectImageQuality != null) - hashCode = hashCode * 59 + this.RespectImageQuality.GetHashCode(); - if (this.ForceDocFormat != null) - hashCode = hashCode * 59 + this.ForceDocFormat.GetHashCode(); - if (this.NoGraphics != null) - hashCode = hashCode * 59 + this.NoGraphics.GetHashCode(); - if (this.DepersonalizeLog != null) - hashCode = hashCode * 59 + this.DepersonalizeLog.GetHashCode(); - if (this.MultiDocOnImage != null) - hashCode = hashCode * 59 + this.MultiDocOnImage.GetHashCode(); - if (this.ShiftExpiryDate != null) - hashCode = hashCode * 59 + this.ShiftExpiryDate.GetHashCode(); - if (this.MinimalHolderAge != null) - hashCode = hashCode * 59 + this.MinimalHolderAge.GetHashCode(); - if (this.ReturnUncroppedImage != null) - hashCode = hashCode * 59 + this.ReturnUncroppedImage.GetHashCode(); - if (this.MrzFormatsFilter != null) - hashCode = hashCode * 59 + this.MrzFormatsFilter.GetHashCode(); - if (this.ForceReadMrzBeforeLocate != null) - hashCode = hashCode * 59 + this.ForceReadMrzBeforeLocate.GetHashCode(); - if (this.ParseBarcodes != null) - hashCode = hashCode * 59 + this.ParseBarcodes.GetHashCode(); - if (this.ConvertCase != null) - hashCode = hashCode * 59 + this.ConvertCase.GetHashCode(); - if (this.SplitNames != null) - hashCode = hashCode * 59 + this.SplitNames.GetHashCode(); - if (this.DisablePerforationOCR != null) - hashCode = hashCode * 59 + this.DisablePerforationOCR.GetHashCode(); - if (this.DocumentGroupFilter != null) - hashCode = hashCode * 59 + this.DocumentGroupFilter.GetHashCode(); - if (this.ProcessAuth != null) - hashCode = hashCode * 59 + this.ProcessAuth.GetHashCode(); - if (this.DeviceId != null) - hashCode = hashCode * 59 + this.DeviceId.GetHashCode(); - if (this.DeviceType != null) - hashCode = hashCode * 59 + this.DeviceType.GetHashCode(); - if (this.DeviceTypeHex != null) - hashCode = hashCode * 59 + this.DeviceTypeHex.GetHashCode(); - if (this.IgnoreDeviceIdFromImage != null) - hashCode = hashCode * 59 + this.IgnoreDeviceIdFromImage.GetHashCode(); - if (this.DocumentIdList != null) - hashCode = hashCode * 59 + this.DocumentIdList.GetHashCode(); - if (this.Rfid != null) - hashCode = hashCode * 59 + this.Rfid.GetHashCode(); - if (this.CheckAuth != null) - hashCode = hashCode * 59 + this.CheckAuth.GetHashCode(); - if (this.AuthParams != null) - hashCode = hashCode * 59 + this.AuthParams.GetHashCode(); - if (this.MrzDetectMode != null) - hashCode = hashCode * 59 + this.MrzDetectMode.GetHashCode(); - if (this.GenerateNumericCodes != null) - hashCode = hashCode * 59 + this.GenerateNumericCodes.GetHashCode(); - if (this.StrictBarcodeDigitalSignatureCheck != null) - hashCode = hashCode * 59 + this.StrictBarcodeDigitalSignatureCheck.GetHashCode(); - if (this.SelectLongestNames != null) - hashCode = hashCode * 59 + this.SelectLongestNames.GetHashCode(); - return hashCode; + writer.WritePropertyName("lcidFilter"); + JsonSerializer.Serialize(writer, processParams.LcidFilter, jsonSerializerOptions); } - } + if (processParams.CheckLivenessOption.IsSet) + writer.WriteBoolean("checkLiveness", processParams.CheckLivenessOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (processParams.LcidIgnoreFilterOption.IsSet) + { + writer.WritePropertyName("lcidIgnoreFilter"); + JsonSerializer.Serialize(writer, processParams.LcidIgnoreFilter, jsonSerializerOptions); + } + if (processParams.OneShotIdentificationOption.IsSet) + writer.WriteBoolean("oneShotIdentification", processParams.OneShotIdentificationOption.Value!.Value); + + if (processParams.UseFaceApiOption.IsSet) + writer.WriteBoolean("useFaceApi", processParams.UseFaceApiOption.Value!.Value); + + if (processParams.FaceApiOption.IsSet) + { + writer.WritePropertyName("faceApi"); + JsonSerializer.Serialize(writer, processParams.FaceApi, jsonSerializerOptions); + } + if (processParams.DoDetectCanOption.IsSet) + writer.WriteBoolean("doDetectCan", processParams.DoDetectCanOption.Value!.Value); + + if (processParams.ImageOutputMaxHeightOption.IsSet) + writer.WriteNumber("imageOutputMaxHeight", processParams.ImageOutputMaxHeightOption.Value!.Value); + + if (processParams.ImageOutputMaxWidthOption.IsSet) + writer.WriteNumber("imageOutputMaxWidth", processParams.ImageOutputMaxWidthOption.Value!.Value); + + if (processParams.ResultTypeOutputOption.IsSet) + { + writer.WritePropertyName("resultTypeOutput"); + JsonSerializer.Serialize(writer, processParams.ResultTypeOutput, jsonSerializerOptions); + } + if (processParams.DoublePageSpreadOption.IsSet) + writer.WriteBoolean("doublePageSpread", processParams.DoublePageSpreadOption.Value!.Value); + + if (processParams.GenerateDoublePageSpreadImageOption.IsSet) + writer.WriteBoolean("generateDoublePageSpreadImage", processParams.GenerateDoublePageSpreadImageOption.Value!.Value); + + if (processParams.FieldTypesFilterOption.IsSet) + { + writer.WritePropertyName("fieldTypesFilter"); + JsonSerializer.Serialize(writer, processParams.FieldTypesFilter, jsonSerializerOptions); + } + if (processParams.DateFormatOption.IsSet) + writer.WriteString("dateFormat", processParams.DateFormat); + + if (processParams.MeasureSystemOption.IsSet) + { + var measureSystemRawValue = MeasureSystemValueConverter.ToJsonValue(processParams.MeasureSystem!.Value); + writer.WriteNumber("measureSystem", measureSystemRawValue); + } + if (processParams.ImageDpiOutMaxOption.IsSet) + writer.WriteNumber("imageDpiOutMax", processParams.ImageDpiOutMaxOption.Value!.Value); + + if (processParams.AlreadyCroppedOption.IsSet) + writer.WriteBoolean("alreadyCropped", processParams.AlreadyCroppedOption.Value!.Value); + + if (processParams.CustomParamsOption.IsSet) + { + writer.WritePropertyName("customParams"); + JsonSerializer.Serialize(writer, processParams.CustomParams, jsonSerializerOptions); + } + if (processParams.ConfigOption.IsSet) + { + writer.WritePropertyName("config"); + JsonSerializer.Serialize(writer, processParams.Config, jsonSerializerOptions); + } + if (processParams.LogOption.IsSet) + writer.WriteBoolean("log", processParams.LogOption.Value!.Value); + + if (processParams.LogLevelOption.IsSet) + { + var logLevelRawValue = LogLevelValueConverter.ToJsonValue(processParams.LogLevel!.Value); + writer.WriteString("logLevel", logLevelRawValue); + } + if (processParams.ForceDocIDOption.IsSet) + writer.WriteNumber("forceDocID", processParams.ForceDocIDOption.Value!.Value); + + if (processParams.MatchTextFieldMaskOption.IsSet) + writer.WriteBoolean("matchTextFieldMask", processParams.MatchTextFieldMaskOption.Value!.Value); + + if (processParams.FastDocDetectOption.IsSet) + writer.WriteBoolean("fastDocDetect", processParams.FastDocDetectOption.Value!.Value); + + if (processParams.UpdateOCRValidityByGlareOption.IsSet) + writer.WriteBoolean("updateOCRValidityByGlare", processParams.UpdateOCRValidityByGlareOption.Value!.Value); + + if (processParams.CheckRequiredTextFieldsOption.IsSet) + writer.WriteBoolean("checkRequiredTextFields", processParams.CheckRequiredTextFieldsOption.Value!.Value); + + if (processParams.ReturnCroppedBarcodeOption.IsSet) + writer.WriteBoolean("returnCroppedBarcode", processParams.ReturnCroppedBarcodeOption.Value!.Value); + + if (processParams.ImageQaOption.IsSet) + { + writer.WritePropertyName("imageQa"); + JsonSerializer.Serialize(writer, processParams.ImageQa, jsonSerializerOptions); + } + if (processParams.StrictImageQualityOption.IsSet) + writer.WriteBoolean("strictImageQuality", processParams.StrictImageQualityOption.Value!.Value); + + if (processParams.RespectImageQualityOption.IsSet) + writer.WriteBoolean("respectImageQuality", processParams.RespectImageQualityOption.Value!.Value); + + if (processParams.ForceDocFormatOption.IsSet) + { + var forceDocFormatRawValue = DocumentFormatValueConverter.ToJsonValue(processParams.ForceDocFormat!.Value); + writer.WriteNumber("forceDocFormat", forceDocFormatRawValue); + } + if (processParams.NoGraphicsOption.IsSet) + writer.WriteBoolean("noGraphics", processParams.NoGraphicsOption.Value!.Value); + + if (processParams.DepersonalizeLogOption.IsSet) + writer.WriteBoolean("depersonalizeLog", processParams.DepersonalizeLogOption.Value!.Value); + + if (processParams.MultiDocOnImageOption.IsSet) + writer.WriteBoolean("multiDocOnImage", processParams.MultiDocOnImageOption.Value!.Value); + + if (processParams.ShiftExpiryDateOption.IsSet) + writer.WriteNumber("shiftExpiryDate", processParams.ShiftExpiryDateOption.Value!.Value); + + if (processParams.MinimalHolderAgeOption.IsSet) + writer.WriteNumber("minimalHolderAge", processParams.MinimalHolderAgeOption.Value!.Value); + + if (processParams.ReturnUncroppedImageOption.IsSet) + writer.WriteBoolean("returnUncroppedImage", processParams.ReturnUncroppedImageOption.Value!.Value); + + if (processParams.MrzFormatsFilterOption.IsSet) + { + writer.WritePropertyName("mrzFormatsFilter"); + JsonSerializer.Serialize(writer, processParams.MrzFormatsFilter, jsonSerializerOptions); + } + if (processParams.ForceReadMrzBeforeLocateOption.IsSet) + writer.WriteBoolean("forceReadMrzBeforeLocate", processParams.ForceReadMrzBeforeLocateOption.Value!.Value); + + if (processParams.ParseBarcodesOption.IsSet) + writer.WriteBoolean("parseBarcodes", processParams.ParseBarcodesOption.Value!.Value); + + if (processParams.ConvertCaseOption.IsSet) + { + var convertCaseRawValue = TextPostProcessingValueConverter.ToJsonValue(processParams.ConvertCase!.Value); + writer.WriteNumber("convertCase", convertCaseRawValue); + } + if (processParams.SplitNamesOption.IsSet) + writer.WriteBoolean("splitNames", processParams.SplitNamesOption.Value!.Value); + + if (processParams.DisablePerforationOCROption.IsSet) + writer.WriteBoolean("disablePerforationOCR", processParams.DisablePerforationOCROption.Value!.Value); + + if (processParams.DocumentGroupFilterOption.IsSet) + { + writer.WritePropertyName("documentGroupFilter"); + JsonSerializer.Serialize(writer, processParams.DocumentGroupFilter, jsonSerializerOptions); + } + if (processParams.ProcessAuthOption.IsSet) + writer.WriteNumber("processAuth", processParams.ProcessAuthOption.Value!.Value); + + if (processParams.DeviceIdOption.IsSet) + writer.WriteNumber("deviceId", processParams.DeviceIdOption.Value!.Value); + + if (processParams.DeviceTypeOption.IsSet) + writer.WriteNumber("deviceType", processParams.DeviceTypeOption.Value!.Value); + + if (processParams.DeviceTypeHexOption.IsSet) + writer.WriteString("deviceTypeHex", processParams.DeviceTypeHex); + + if (processParams.IgnoreDeviceIdFromImageOption.IsSet) + writer.WriteBoolean("ignoreDeviceIdFromImage", processParams.IgnoreDeviceIdFromImageOption.Value!.Value); + + if (processParams.DocumentIdListOption.IsSet) + { + writer.WritePropertyName("documentIdList"); + JsonSerializer.Serialize(writer, processParams.DocumentIdList, jsonSerializerOptions); + } + if (processParams.RfidOption.IsSet) + { + writer.WritePropertyName("rfid"); + JsonSerializer.Serialize(writer, processParams.Rfid, jsonSerializerOptions); + } + if (processParams.CheckAuthOption.IsSet) + writer.WriteBoolean("checkAuth", processParams.CheckAuthOption.Value!.Value); + + if (processParams.AuthParamsOption.IsSet) + { + writer.WritePropertyName("authParams"); + JsonSerializer.Serialize(writer, processParams.AuthParams, jsonSerializerOptions); + } + if (processParams.MrzDetectModeOption.IsSet) + { + var mrzDetectModeRawValue = MrzDetectModeEnumValueConverter.ToJsonValue(processParams.MrzDetectMode!.Value); + writer.WriteNumber("mrzDetectMode", mrzDetectModeRawValue); + } + if (processParams.GenerateNumericCodesOption.IsSet) + writer.WriteBoolean("generateNumericCodes", processParams.GenerateNumericCodesOption.Value!.Value); + + if (processParams.StrictBarcodeDigitalSignatureCheckOption.IsSet) + writer.WriteBoolean("strictBarcodeDigitalSignatureCheck", processParams.StrictBarcodeDigitalSignatureCheckOption.Value!.Value); + + if (processParams.SelectLongestNamesOption.IsSet) + writer.WriteBoolean("selectLongestNames", processParams.SelectLongestNamesOption.Value!.Value); + + if (processParams.DoBarcodesOption.IsSet) + { + writer.WritePropertyName("doBarcodes"); + JsonSerializer.Serialize(writer, processParams.DoBarcodes, jsonSerializerOptions); + } } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs index 9809f39..45c652d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs @@ -1,50 +1,61 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Params for the RFID chip data reprocessing /// - [DataContract] - public partial class ProcessParamsRfid : IEquatable, IValidatableObject + public partial class ProcessParamsRfid : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// A list of notification codes that should be ignored during passive authentication (PA). - public ProcessParamsRfid(List paSensitiveCodesDisable = default(List)) + /// A list of notification codes that should be ignored during passive authentication (PA) + [JsonConstructor] + public ProcessParamsRfid(Option?> paSensitiveCodesDisable = default) { - this.PaSensitiveCodesDisable = paSensitiveCodesDisable; + PaSensitiveCodesDisableOption = paSensitiveCodesDisable; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of PaSensitiveCodesDisable + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> PaSensitiveCodesDisableOption { get; private set; } + /// /// A list of notification codes that should be ignored during passive authentication (PA) /// /// A list of notification codes that should be ignored during passive authentication (PA) - [DataMember(Name="paSensitiveCodesDisable", EmitDefaultValue=false)] - public List PaSensitiveCodesDisable { get; set; } + [JsonPropertyName("paSensitiveCodesDisable")] + public List? PaSensitiveCodesDisable { get { return this.PaSensitiveCodesDisableOption; } set { this.PaSensitiveCodesDisableOption = new(value); } } /// /// Returns the string presentation of the object @@ -52,75 +63,111 @@ public partial class ProcessParamsRfid : IEquatable, IValida /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ProcessParamsRfid {\n"); sb.Append(" PaSensitiveCodesDisable: ").Append(PaSensitiveCodesDisable).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ProcessParamsRfidJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ProcessParamsRfid Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ProcessParamsRfid); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> paSensitiveCodesDisable = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "paSensitiveCodesDisable": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + paSensitiveCodesDisable = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (paSensitiveCodesDisable.IsSet && paSensitiveCodesDisable.Value == null) + throw new ArgumentNullException(nameof(paSensitiveCodesDisable), "Property is not nullable for class ProcessParamsRfid."); + + return new ProcessParamsRfid(paSensitiveCodesDisable); } /// - /// Returns true if ProcessParamsRfid instances are equal + /// Serializes a /// - /// Instance of ProcessParamsRfid to be compared - /// Boolean - public bool Equals(ProcessParamsRfid input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ProcessParamsRfid processParamsRfid, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.PaSensitiveCodesDisable == input.PaSensitiveCodesDisable || - this.PaSensitiveCodesDisable != null && - input.PaSensitiveCodesDisable != null && - this.PaSensitiveCodesDisable.SequenceEqual(input.PaSensitiveCodesDisable) - ); + writer.WriteStartObject(); + + WriteProperties(writer, processParamsRfid, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ProcessParamsRfid processParamsRfid, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (processParamsRfid.PaSensitiveCodesDisableOption.IsSet && processParamsRfid.PaSensitiveCodesDisable == null) + throw new ArgumentNullException(nameof(processParamsRfid.PaSensitiveCodesDisable), "Property is required for class ProcessParamsRfid."); + + if (processParamsRfid.PaSensitiveCodesDisableOption.IsSet) { - int hashCode = 41; - if (this.PaSensitiveCodesDisable != null) - hashCode = hashCode * 59 + this.PaSensitiveCodesDisable.GetHashCode(); - return hashCode; + writer.WritePropertyName("paSensitiveCodesDisable"); + JsonSerializer.Serialize(writer, processParamsRfid.PaSensitiveCodesDisable, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs index 856208a..7e8b2bc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs @@ -1,159 +1,244 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessRequest /// - [DataContract] - public partial class ProcessRequest : IEquatable, IValidatableObject + public partial class ProcessRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ProcessRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// processParam (required). - /// list. - /// Session ID. - /// Customer name. - /// Environment type. - /// Live portrait photo. - /// Portrait photo from an external source. - /// containerList. - /// systemInfo. - /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs.. - /// Digital Travel Credential (DTC-VC) data in base64 format for processing. - /// URLs to the document images for processing.. - public ProcessRequest(ProcessParams processParam = default(ProcessParams), List list = default(List), string tag = default(string), string tenant = default(string), string env = default(string), string livePortrait = default(string), string extPortrait = default(string), ContainerList containerList = default(ContainerList), ProcessSystemInfo systemInfo = default(ProcessSystemInfo), Dictionary passBackObject = default(Dictionary), string dtc = default(string), List imageUrls = default(List)) + /// processParam + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. + /// list + /// Session ID + /// Customer name + /// Environment type + /// Live portrait photo + /// Portrait photo from an external source + /// containerList + /// systemInfo + /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. + /// Digital Travel Credential (DTC-VC) data in base64 format for processing + /// URLs to the document images for processing. + [JsonConstructor] + public ProcessRequest(ProcessParams processParam, Option?> lcidFilter = default, Option?> list = default, Option tag = default, Option tenant = default, Option env = default, Option livePortrait = default, Option extPortrait = default, Option containerList = default, Option systemInfo = default, Option?> passBackObject = default, Option dtc = default, Option?> imageUrls = default) { - // to ensure "processParam" is required (not null) - if (processParam == null) - { - throw new InvalidDataException("processParam is a required property for ProcessRequest and cannot be null"); - } - else - { - this.ProcessParam = processParam; - } - - this.List = list; - this.Tag = tag; - this.Tenant = tenant; - this.Env = env; - this.LivePortrait = livePortrait; - this.ExtPortrait = extPortrait; - this.ContainerList = containerList; - this.SystemInfo = systemInfo; - this.PassBackObject = passBackObject; - this.Dtc = dtc; - this.ImageUrls = imageUrls; + ProcessParam = processParam; + LcidFilterOption = lcidFilter; + ListOption = list; + TagOption = tag; + TenantOption = tenant; + EnvOption = env; + LivePortraitOption = livePortrait; + ExtPortraitOption = extPortrait; + ContainerListOption = containerList; + SystemInfoOption = systemInfo; + PassBackObjectOption = passBackObject; + DtcOption = dtc; + ImageUrlsOption = imageUrls; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets ProcessParam /// - [DataMember(Name="processParam", EmitDefaultValue=true)] + [JsonPropertyName("processParam")] public ProcessParams ProcessParam { get; set; } + /// + /// Used to track the state of LcidFilter + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> LcidFilterOption { get; private set; } + + /// + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. + /// + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. + [JsonPropertyName("lcidFilter")] + public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } + + /// + /// Used to track the state of List + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ListOption { get; private set; } + /// /// Gets or Sets List /// - [DataMember(Name="List", EmitDefaultValue=false)] - public List List { get; set; } + [JsonPropertyName("List")] + public List? List { get { return this.ListOption; } set { this.ListOption = new(value); } } + + /// + /// Used to track the state of Tag + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TagOption { get; private set; } /// /// Session ID /// /// Session ID - [DataMember(Name="tag", EmitDefaultValue=false)] - public string Tag { get; set; } + [JsonPropertyName("tag")] + public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } + + /// + /// Used to track the state of Tenant + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TenantOption { get; private set; } /// /// Customer name /// /// Customer name - [DataMember(Name="tenant", EmitDefaultValue=false)] - public string Tenant { get; set; } + [JsonPropertyName("tenant")] + public string? Tenant { get { return this.TenantOption; } set { this.TenantOption = new(value); } } + + /// + /// Used to track the state of Env + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option EnvOption { get; private set; } /// /// Environment type /// /// Environment type - [DataMember(Name="env", EmitDefaultValue=false)] - public string Env { get; set; } + [JsonPropertyName("env")] + public string? Env { get { return this.EnvOption; } set { this.EnvOption = new(value); } } + + /// + /// Used to track the state of LivePortrait + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LivePortraitOption { get; private set; } /// /// Live portrait photo /// /// Live portrait photo - [DataMember(Name="livePortrait", EmitDefaultValue=false)] - public string LivePortrait { get; set; } + /* Base64 encoded data */ + [JsonPropertyName("livePortrait")] + public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new(value); } } + + /// + /// Used to track the state of ExtPortrait + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ExtPortraitOption { get; private set; } /// /// Portrait photo from an external source /// /// Portrait photo from an external source - [DataMember(Name="extPortrait", EmitDefaultValue=false)] - public string ExtPortrait { get; set; } + /* Base64 encoded data */ + [JsonPropertyName("extPortrait")] + public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new(value); } } + + /// + /// Used to track the state of ContainerList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ContainerListOption { get; private set; } /// /// Gets or Sets ContainerList /// - [DataMember(Name="ContainerList", EmitDefaultValue=false)] - public ContainerList ContainerList { get; set; } + [JsonPropertyName("ContainerList")] + public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new(value); } } + + /// + /// Used to track the state of SystemInfo + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SystemInfoOption { get; private set; } /// /// Gets or Sets SystemInfo /// - [DataMember(Name="systemInfo", EmitDefaultValue=false)] - public ProcessSystemInfo SystemInfo { get; set; } + [JsonPropertyName("systemInfo")] + public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } + + /// + /// Used to track the state of PassBackObject + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> PassBackObjectOption { get; private set; } /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. - [DataMember(Name="passBackObject", EmitDefaultValue=false)] - public Dictionary PassBackObject { get; set; } + [JsonPropertyName("passBackObject")] + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } + + /// + /// Used to track the state of Dtc + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DtcOption { get; private set; } /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing - [DataMember(Name="dtc", EmitDefaultValue=false)] - public string Dtc { get; set; } + [JsonPropertyName("dtc")] + public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new(value); } } + + /// + /// Used to track the state of ImageUrls + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ImageUrlsOption { get; private set; } /// /// URLs to the document images for processing. /// /// URLs to the document images for processing. - [DataMember(Name="ImageUrls", EmitDefaultValue=false)] - public List ImageUrls { get; set; } + [JsonPropertyName("ImageUrls")] + public List? ImageUrls { get { return this.ImageUrlsOption; } set { this.ImageUrlsOption = new(value); } } /// /// Returns the string presentation of the object @@ -161,9 +246,10 @@ protected ProcessRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ProcessRequest {\n"); sb.Append(" ProcessParam: ").Append(ProcessParam).Append("\n"); + sb.Append(" LcidFilter: ").Append(LcidFilter).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); sb.Append(" Tag: ").Append(Tag).Append("\n"); sb.Append(" Tenant: ").Append(Tenant).Append("\n"); @@ -178,148 +264,279 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ProcessRequestJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ProcessRequest); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option processParam = default; + Option?> lcidFilter = default; + Option?> list = default; + Option tag = default; + Option tenant = default; + Option env = default; + Option livePortrait = default; + Option extPortrait = default; + Option containerList = default; + Option systemInfo = default; + Option?> passBackObject = default; + Option dtc = default; + Option?> imageUrls = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "processParam": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + processParam = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "lcidFilter": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + lcidFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "tag": + tag = new Option(utf8JsonReader.GetString()!); + break; + case "tenant": + tenant = new Option(utf8JsonReader.GetString()!); + break; + case "env": + env = new Option(utf8JsonReader.GetString()!); + break; + case "livePortrait": + livePortrait = new Option(utf8JsonReader.GetString()!); + break; + case "extPortrait": + extPortrait = new Option(utf8JsonReader.GetString()!); + break; + case "ContainerList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + containerList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "systemInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + systemInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "passBackObject": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + passBackObject = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "dtc": + dtc = new Option(utf8JsonReader.GetString()!); + break; + case "ImageUrls": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + imageUrls = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!processParam.IsSet) + throw new ArgumentException("Property is required for class ProcessRequest.", nameof(processParam)); + + if (processParam.IsSet && processParam.Value == null) + throw new ArgumentNullException(nameof(processParam), "Property is not nullable for class ProcessRequest."); + + if (lcidFilter.IsSet && lcidFilter.Value == null) + throw new ArgumentNullException(nameof(lcidFilter), "Property is not nullable for class ProcessRequest."); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class ProcessRequest."); + + if (tag.IsSet && tag.Value == null) + throw new ArgumentNullException(nameof(tag), "Property is not nullable for class ProcessRequest."); + + if (tenant.IsSet && tenant.Value == null) + throw new ArgumentNullException(nameof(tenant), "Property is not nullable for class ProcessRequest."); + + if (env.IsSet && env.Value == null) + throw new ArgumentNullException(nameof(env), "Property is not nullable for class ProcessRequest."); + + if (livePortrait.IsSet && livePortrait.Value == null) + throw new ArgumentNullException(nameof(livePortrait), "Property is not nullable for class ProcessRequest."); + + if (extPortrait.IsSet && extPortrait.Value == null) + throw new ArgumentNullException(nameof(extPortrait), "Property is not nullable for class ProcessRequest."); + + if (containerList.IsSet && containerList.Value == null) + throw new ArgumentNullException(nameof(containerList), "Property is not nullable for class ProcessRequest."); + + if (systemInfo.IsSet && systemInfo.Value == null) + throw new ArgumentNullException(nameof(systemInfo), "Property is not nullable for class ProcessRequest."); + + if (passBackObject.IsSet && passBackObject.Value == null) + throw new ArgumentNullException(nameof(passBackObject), "Property is not nullable for class ProcessRequest."); + + if (dtc.IsSet && dtc.Value == null) + throw new ArgumentNullException(nameof(dtc), "Property is not nullable for class ProcessRequest."); + + if (imageUrls.IsSet && imageUrls.Value == null) + throw new ArgumentNullException(nameof(imageUrls), "Property is not nullable for class ProcessRequest."); + + return new ProcessRequest(processParam.Value!, lcidFilter, list, tag, tenant, env, livePortrait, extPortrait, containerList, systemInfo, passBackObject, dtc, imageUrls); } /// - /// Returns true if ProcessRequest instances are equal + /// Serializes a /// - /// Instance of ProcessRequest to be compared - /// Boolean - public bool Equals(ProcessRequest input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ProcessRequest processRequest, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.ProcessParam == input.ProcessParam || - (this.ProcessParam != null && - this.ProcessParam.Equals(input.ProcessParam)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ) && - ( - this.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && - ( - this.Tenant == input.Tenant || - (this.Tenant != null && - this.Tenant.Equals(input.Tenant)) - ) && - ( - this.Env == input.Env || - (this.Env != null && - this.Env.Equals(input.Env)) - ) && - ( - this.LivePortrait == input.LivePortrait || - (this.LivePortrait != null && - this.LivePortrait.Equals(input.LivePortrait)) - ) && - ( - this.ExtPortrait == input.ExtPortrait || - (this.ExtPortrait != null && - this.ExtPortrait.Equals(input.ExtPortrait)) - ) && - ( - this.ContainerList == input.ContainerList || - (this.ContainerList != null && - this.ContainerList.Equals(input.ContainerList)) - ) && - ( - this.SystemInfo == input.SystemInfo || - (this.SystemInfo != null && - this.SystemInfo.Equals(input.SystemInfo)) - ) && - ( - this.PassBackObject == input.PassBackObject || - this.PassBackObject != null && - input.PassBackObject != null && - this.PassBackObject.SequenceEqual(input.PassBackObject) - ) && - ( - this.Dtc == input.Dtc || - (this.Dtc != null && - this.Dtc.Equals(input.Dtc)) - ) && - ( - this.ImageUrls == input.ImageUrls || - this.ImageUrls != null && - input.ImageUrls != null && - this.ImageUrls.SequenceEqual(input.ImageUrls) - ); + writer.WriteStartObject(); + + WriteProperties(writer, processRequest, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ProcessRequest processRequest, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (processRequest.ProcessParam == null) + throw new ArgumentNullException(nameof(processRequest.ProcessParam), "Property is required for class ProcessRequest."); + + if (processRequest.LcidFilterOption.IsSet && processRequest.LcidFilter == null) + throw new ArgumentNullException(nameof(processRequest.LcidFilter), "Property is required for class ProcessRequest."); + + if (processRequest.ListOption.IsSet && processRequest.List == null) + throw new ArgumentNullException(nameof(processRequest.List), "Property is required for class ProcessRequest."); + + if (processRequest.TagOption.IsSet && processRequest.Tag == null) + throw new ArgumentNullException(nameof(processRequest.Tag), "Property is required for class ProcessRequest."); + + if (processRequest.TenantOption.IsSet && processRequest.Tenant == null) + throw new ArgumentNullException(nameof(processRequest.Tenant), "Property is required for class ProcessRequest."); + + if (processRequest.EnvOption.IsSet && processRequest.Env == null) + throw new ArgumentNullException(nameof(processRequest.Env), "Property is required for class ProcessRequest."); + + if (processRequest.LivePortraitOption.IsSet && processRequest.LivePortrait == null) + throw new ArgumentNullException(nameof(processRequest.LivePortrait), "Property is required for class ProcessRequest."); + + if (processRequest.ExtPortraitOption.IsSet && processRequest.ExtPortrait == null) + throw new ArgumentNullException(nameof(processRequest.ExtPortrait), "Property is required for class ProcessRequest."); + + if (processRequest.ContainerListOption.IsSet && processRequest.ContainerList == null) + throw new ArgumentNullException(nameof(processRequest.ContainerList), "Property is required for class ProcessRequest."); + + if (processRequest.SystemInfoOption.IsSet && processRequest.SystemInfo == null) + throw new ArgumentNullException(nameof(processRequest.SystemInfo), "Property is required for class ProcessRequest."); + + if (processRequest.PassBackObjectOption.IsSet && processRequest.PassBackObject == null) + throw new ArgumentNullException(nameof(processRequest.PassBackObject), "Property is required for class ProcessRequest."); + + if (processRequest.DtcOption.IsSet && processRequest.Dtc == null) + throw new ArgumentNullException(nameof(processRequest.Dtc), "Property is required for class ProcessRequest."); + + if (processRequest.ImageUrlsOption.IsSet && processRequest.ImageUrls == null) + throw new ArgumentNullException(nameof(processRequest.ImageUrls), "Property is required for class ProcessRequest."); + + writer.WritePropertyName("processParam"); + JsonSerializer.Serialize(writer, processRequest.ProcessParam, jsonSerializerOptions); + if (processRequest.LcidFilterOption.IsSet) { - int hashCode = 41; - if (this.ProcessParam != null) - hashCode = hashCode * 59 + this.ProcessParam.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - if (this.Tag != null) - hashCode = hashCode * 59 + this.Tag.GetHashCode(); - if (this.Tenant != null) - hashCode = hashCode * 59 + this.Tenant.GetHashCode(); - if (this.Env != null) - hashCode = hashCode * 59 + this.Env.GetHashCode(); - if (this.LivePortrait != null) - hashCode = hashCode * 59 + this.LivePortrait.GetHashCode(); - if (this.ExtPortrait != null) - hashCode = hashCode * 59 + this.ExtPortrait.GetHashCode(); - if (this.ContainerList != null) - hashCode = hashCode * 59 + this.ContainerList.GetHashCode(); - if (this.SystemInfo != null) - hashCode = hashCode * 59 + this.SystemInfo.GetHashCode(); - if (this.PassBackObject != null) - hashCode = hashCode * 59 + this.PassBackObject.GetHashCode(); - if (this.Dtc != null) - hashCode = hashCode * 59 + this.Dtc.GetHashCode(); - if (this.ImageUrls != null) - hashCode = hashCode * 59 + this.ImageUrls.GetHashCode(); - return hashCode; + writer.WritePropertyName("lcidFilter"); + JsonSerializer.Serialize(writer, processRequest.LcidFilter, jsonSerializerOptions); } - } + if (processRequest.ListOption.IsSet) + { + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, processRequest.List, jsonSerializerOptions); + } + if (processRequest.TagOption.IsSet) + writer.WriteString("tag", processRequest.Tag); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (processRequest.TenantOption.IsSet) + writer.WriteString("tenant", processRequest.Tenant); + + if (processRequest.EnvOption.IsSet) + writer.WriteString("env", processRequest.Env); + + if (processRequest.LivePortraitOption.IsSet) + writer.WriteString("livePortrait", processRequest.LivePortrait); + + if (processRequest.ExtPortraitOption.IsSet) + writer.WriteString("extPortrait", processRequest.ExtPortrait); + + if (processRequest.ContainerListOption.IsSet) + { + writer.WritePropertyName("ContainerList"); + JsonSerializer.Serialize(writer, processRequest.ContainerList, jsonSerializerOptions); + } + if (processRequest.SystemInfoOption.IsSet) + { + writer.WritePropertyName("systemInfo"); + JsonSerializer.Serialize(writer, processRequest.SystemInfo, jsonSerializerOptions); + } + if (processRequest.PassBackObjectOption.IsSet) + { + writer.WritePropertyName("passBackObject"); + JsonSerializer.Serialize(writer, processRequest.PassBackObject, jsonSerializerOptions); + } + if (processRequest.DtcOption.IsSet) + writer.WriteString("dtc", processRequest.Dtc); + + if (processRequest.ImageUrlsOption.IsSet) + { + writer.WritePropertyName("ImageUrls"); + JsonSerializer.Serialize(writer, processRequest.ImageUrls, jsonSerializerOptions); + } } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs index 901371b..76f0632 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs @@ -1,66 +1,91 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessRequestImage /// - [DataContract] - public partial class ProcessRequestImage : IEquatable, IValidatableObject + public partial class ProcessRequestImage : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// imageData. - /// light. - /// page/image number. - public ProcessRequestImage(ImageData imageData = default(ImageData), int light = default(int), int pageIdx = default(int)) + /// imageData + /// light + /// page/image number + [JsonConstructor] + public ProcessRequestImage(Option imageData = default, Option light = default, Option pageIdx = default) { - this.ImageData = imageData; - this.Light = light; - this.PageIdx = pageIdx; + ImageDataOption = imageData; + LightOption = light; + PageIdxOption = pageIdx; + OnCreated(); } - + + partial void OnCreated(); + /// - /// Gets or Sets ImageData + /// Used to track the state of Light /// - [DataMember(Name="ImageData", EmitDefaultValue=false)] - public ImageData ImageData { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LightOption { get; private set; } /// /// Gets or Sets Light /// - [DataMember(Name="light", EmitDefaultValue=false)] - public int Light { get; set; } + [JsonPropertyName("light")] + public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } + + /// + /// Used to track the state of ImageData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ImageDataOption { get; private set; } + + /// + /// Gets or Sets ImageData + /// + [JsonPropertyName("ImageData")] + public ImageData? ImageData { get { return this.ImageDataOption; } set { this.ImageDataOption = new(value); } } + + /// + /// Used to track the state of PageIdx + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PageIdxOption { get; private set; } /// /// page/image number /// /// page/image number - [DataMember(Name="page_idx", EmitDefaultValue=false)] - public int PageIdx { get; set; } + [JsonPropertyName("page_idx")] + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } /// /// Returns the string presentation of the object @@ -68,7 +93,7 @@ public partial class ProcessRequestImage : IEquatable, IVa /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ProcessRequestImage {\n"); sb.Append(" ImageData: ").Append(ImageData).Append("\n"); sb.Append(" Light: ").Append(Light).Append("\n"); @@ -76,82 +101,129 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ProcessRequestImageJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ProcessRequestImage Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ProcessRequestImage); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option imageData = default; + Option light = default; + Option pageIdx = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ImageData": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + imageData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "light": + string? lightRawValue = utf8JsonReader.GetString(); + if (lightRawValue != null) + light = new Option(LightValueConverter.FromStringOrDefault(lightRawValue)); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (imageData.IsSet && imageData.Value == null) + throw new ArgumentNullException(nameof(imageData), "Property is not nullable for class ProcessRequestImage."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class ProcessRequestImage."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ProcessRequestImage."); + + return new ProcessRequestImage(imageData, light, pageIdx); } /// - /// Returns true if ProcessRequestImage instances are equal + /// Serializes a /// - /// Instance of ProcessRequestImage to be compared - /// Boolean - public bool Equals(ProcessRequestImage input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ProcessRequestImage processRequestImage, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.ImageData == input.ImageData || - (this.ImageData != null && - this.ImageData.Equals(input.ImageData)) - ) && - ( - this.Light == input.Light || - (this.Light != null && - this.Light.Equals(input.Light)) - ) && - ( - this.PageIdx == input.PageIdx || - (this.PageIdx != null && - this.PageIdx.Equals(input.PageIdx)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, processRequestImage, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ProcessRequestImage processRequestImage, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (processRequestImage.ImageDataOption.IsSet && processRequestImage.ImageData == null) + throw new ArgumentNullException(nameof(processRequestImage.ImageData), "Property is required for class ProcessRequestImage."); + + if (processRequestImage.ImageDataOption.IsSet) { - int hashCode = 41; - if (this.ImageData != null) - hashCode = hashCode * 59 + this.ImageData.GetHashCode(); - if (this.Light != null) - hashCode = hashCode * 59 + this.Light.GetHashCode(); - if (this.PageIdx != null) - hashCode = hashCode * 59 + this.PageIdx.GetHashCode(); - return hashCode; + writer.WritePropertyName("ImageData"); + JsonSerializer.Serialize(writer, processRequestImage.ImageData, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (processRequestImage.LightOption.IsSet) + { + var lightRawValue = LightValueConverter.ToJsonValue(processRequestImage.Light!.Value); + writer.WriteNumber("light", lightRawValue); + } + if (processRequestImage.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", processRequestImage.PageIdxOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs index f29c160..884bb83 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs @@ -1,140 +1,156 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessResponse /// - [DataContract] - public partial class ProcessResponse : IEquatable, IValidatableObject + public partial class ProcessResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ProcessResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// chipPage. - /// processingFinished (required). - /// containerList (required). - /// transactionInfo (required). - /// Base64 encoded transaction processing log. - /// Free-form object provided in request. See passBackObject property of ProcessRequest.. - /// morePagesAvailable. - /// Time the document processing has taken, ms.. - public ProcessResponse(int chipPage = default(int), int processingFinished = default(int), ContainerList containerList = default(ContainerList), TransactionInfo transactionInfo = default(TransactionInfo), string log = default(string), Dictionary passBackObject = default(Dictionary), int morePagesAvailable = default(int), int elapsedTime = default(int)) + /// chipPage + /// processingFinished + /// containerList + /// transactionInfo + /// morePagesAvailable + /// Time the document processing has taken, ms. + /// coreLibResultCode + /// Base64 encoded transaction processing log + /// Free-form object provided in request. See passBackObject property of ProcessRequest. + /// metadata + [JsonConstructor] + public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinished, ContainerList containerList, TransactionInfo transactionInfo, int morePagesAvailable, int elapsedTime, Option coreLibResultCode = default, Option log = default, Option?> passBackObject = default, Option?> metadata = default) { - // to ensure "processingFinished" is required (not null) - if (processingFinished == null) - { - throw new InvalidDataException("processingFinished is a required property for ProcessResponse and cannot be null"); - } - else - { - this.ProcessingFinished = processingFinished; - } - - // to ensure "containerList" is required (not null) - if (containerList == null) - { - throw new InvalidDataException("containerList is a required property for ProcessResponse and cannot be null"); - } - else - { - this.ContainerList = containerList; - } - - // to ensure "transactionInfo" is required (not null) - if (transactionInfo == null) - { - throw new InvalidDataException("transactionInfo is a required property for ProcessResponse and cannot be null"); - } - else - { - this.TransactionInfo = transactionInfo; - } - - this.ChipPage = chipPage; - this.Log = log; - this.PassBackObject = passBackObject; - this.MorePagesAvailable = morePagesAvailable; - this.ElapsedTime = elapsedTime; + ChipPage = chipPage; + ProcessingFinished = processingFinished; + ContainerList = containerList; + TransactionInfo = transactionInfo; + MorePagesAvailable = morePagesAvailable; + ElapsedTime = elapsedTime; + CoreLibResultCodeOption = coreLibResultCode; + LogOption = log; + PassBackObjectOption = passBackObject; + MetadataOption = metadata; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets ChipPage /// - [DataMember(Name="ChipPage", EmitDefaultValue=false)] - public int ChipPage { get; set; } + [JsonPropertyName("ChipPage")] + public RfidLocation ChipPage { get; set; } /// /// Gets or Sets ProcessingFinished /// - [DataMember(Name="ProcessingFinished", EmitDefaultValue=true)] - public int ProcessingFinished { get; set; } + [JsonPropertyName("ProcessingFinished")] + public ProcessingStatus ProcessingFinished { get; set; } /// /// Gets or Sets ContainerList /// - [DataMember(Name="ContainerList", EmitDefaultValue=true)] + [JsonPropertyName("ContainerList")] public ContainerList ContainerList { get; set; } /// /// Gets or Sets TransactionInfo /// - [DataMember(Name="TransactionInfo", EmitDefaultValue=true)] + [JsonPropertyName("TransactionInfo")] public TransactionInfo TransactionInfo { get; set; } + /// + /// Gets or Sets MorePagesAvailable + /// + [JsonPropertyName("morePagesAvailable")] + public int MorePagesAvailable { get; set; } + + /// + /// Time the document processing has taken, ms. + /// + /// Time the document processing has taken, ms. + [JsonPropertyName("elapsedTime")] + public int ElapsedTime { get; set; } + + /// + /// Used to track the state of CoreLibResultCode + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CoreLibResultCodeOption { get; private set; } + + /// + /// Gets or Sets CoreLibResultCode + /// + [JsonPropertyName("CoreLibResultCode")] + public int? CoreLibResultCode { get { return this.CoreLibResultCodeOption; } set { this.CoreLibResultCodeOption = new(value); } } + + /// + /// Used to track the state of Log + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LogOption { get; private set; } + /// /// Base64 encoded transaction processing log /// /// Base64 encoded transaction processing log - [DataMember(Name="log", EmitDefaultValue=false)] - public string Log { get; set; } + [JsonPropertyName("log")] + public string? Log { get { return this.LogOption; } set { this.LogOption = new(value); } } + + /// + /// Used to track the state of PassBackObject + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> PassBackObjectOption { get; private set; } /// /// Free-form object provided in request. See passBackObject property of ProcessRequest. /// /// Free-form object provided in request. See passBackObject property of ProcessRequest. - [DataMember(Name="passBackObject", EmitDefaultValue=false)] - public Dictionary PassBackObject { get; set; } + [JsonPropertyName("passBackObject")] + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } /// - /// Gets or Sets MorePagesAvailable + /// Used to track the state of Metadata /// - [DataMember(Name="morePagesAvailable", EmitDefaultValue=false)] - public int MorePagesAvailable { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> MetadataOption { get; private set; } /// - /// Time the document processing has taken, ms. + /// Gets or Sets Metadata /// - /// Time the document processing has taken, ms. - [DataMember(Name="elapsedTime", EmitDefaultValue=false)] - public int ElapsedTime { get; set; } + [JsonPropertyName("metadata")] + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } /// /// Returns the string presentation of the object @@ -142,131 +158,248 @@ protected ProcessResponse() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ProcessResponse {\n"); sb.Append(" ChipPage: ").Append(ChipPage).Append("\n"); sb.Append(" ProcessingFinished: ").Append(ProcessingFinished).Append("\n"); sb.Append(" ContainerList: ").Append(ContainerList).Append("\n"); sb.Append(" TransactionInfo: ").Append(TransactionInfo).Append("\n"); - sb.Append(" Log: ").Append(Log).Append("\n"); - sb.Append(" PassBackObject: ").Append(PassBackObject).Append("\n"); sb.Append(" MorePagesAvailable: ").Append(MorePagesAvailable).Append("\n"); sb.Append(" ElapsedTime: ").Append(ElapsedTime).Append("\n"); + sb.Append(" CoreLibResultCode: ").Append(CoreLibResultCode).Append("\n"); + sb.Append(" Log: ").Append(Log).Append("\n"); + sb.Append(" PassBackObject: ").Append(PassBackObject).Append("\n"); + sb.Append(" Metadata: ").Append(Metadata).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class ProcessResponseJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override ProcessResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as ProcessResponse); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option chipPage = default; + Option processingFinished = default; + Option containerList = default; + Option transactionInfo = default; + Option morePagesAvailable = default; + Option elapsedTime = default; + Option coreLibResultCode = default; + Option log = default; + Option?> passBackObject = default; + Option?> metadata = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ChipPage": + string? chipPageRawValue = utf8JsonReader.GetString(); + if (chipPageRawValue != null) + chipPage = new Option(RfidLocationValueConverter.FromStringOrDefault(chipPageRawValue)); + break; + case "ProcessingFinished": + string? processingFinishedRawValue = utf8JsonReader.GetString(); + if (processingFinishedRawValue != null) + processingFinished = new Option(ProcessingStatusValueConverter.FromStringOrDefault(processingFinishedRawValue)); + break; + case "ContainerList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + containerList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "TransactionInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + transactionInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "morePagesAvailable": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + morePagesAvailable = new Option(utf8JsonReader.GetInt32()); + break; + case "elapsedTime": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + elapsedTime = new Option(utf8JsonReader.GetInt32()); + break; + case "CoreLibResultCode": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + coreLibResultCode = new Option(utf8JsonReader.GetInt32()); + break; + case "log": + log = new Option(utf8JsonReader.GetString()!); + break; + case "passBackObject": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + passBackObject = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "metadata": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!chipPage.IsSet) + throw new ArgumentException("Property is required for class ProcessResponse.", nameof(chipPage)); + + if (!processingFinished.IsSet) + throw new ArgumentException("Property is required for class ProcessResponse.", nameof(processingFinished)); + + if (!containerList.IsSet) + throw new ArgumentException("Property is required for class ProcessResponse.", nameof(containerList)); + + if (!transactionInfo.IsSet) + throw new ArgumentException("Property is required for class ProcessResponse.", nameof(transactionInfo)); + + if (!morePagesAvailable.IsSet) + throw new ArgumentException("Property is required for class ProcessResponse.", nameof(morePagesAvailable)); + + if (!elapsedTime.IsSet) + throw new ArgumentException("Property is required for class ProcessResponse.", nameof(elapsedTime)); + + if (chipPage.IsSet && chipPage.Value == null) + throw new ArgumentNullException(nameof(chipPage), "Property is not nullable for class ProcessResponse."); + + if (processingFinished.IsSet && processingFinished.Value == null) + throw new ArgumentNullException(nameof(processingFinished), "Property is not nullable for class ProcessResponse."); + + if (containerList.IsSet && containerList.Value == null) + throw new ArgumentNullException(nameof(containerList), "Property is not nullable for class ProcessResponse."); + + if (transactionInfo.IsSet && transactionInfo.Value == null) + throw new ArgumentNullException(nameof(transactionInfo), "Property is not nullable for class ProcessResponse."); + + if (morePagesAvailable.IsSet && morePagesAvailable.Value == null) + throw new ArgumentNullException(nameof(morePagesAvailable), "Property is not nullable for class ProcessResponse."); + + if (elapsedTime.IsSet && elapsedTime.Value == null) + throw new ArgumentNullException(nameof(elapsedTime), "Property is not nullable for class ProcessResponse."); + + if (coreLibResultCode.IsSet && coreLibResultCode.Value == null) + throw new ArgumentNullException(nameof(coreLibResultCode), "Property is not nullable for class ProcessResponse."); + + if (log.IsSet && log.Value == null) + throw new ArgumentNullException(nameof(log), "Property is not nullable for class ProcessResponse."); + + if (passBackObject.IsSet && passBackObject.Value == null) + throw new ArgumentNullException(nameof(passBackObject), "Property is not nullable for class ProcessResponse."); + + if (metadata.IsSet && metadata.Value == null) + throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class ProcessResponse."); + + return new ProcessResponse(chipPage.Value!.Value!, processingFinished.Value!.Value!, containerList.Value!, transactionInfo.Value!, morePagesAvailable.Value!.Value!, elapsedTime.Value!.Value!, coreLibResultCode, log, passBackObject, metadata); } /// - /// Returns true if ProcessResponse instances are equal + /// Serializes a /// - /// Instance of ProcessResponse to be compared - /// Boolean - public bool Equals(ProcessResponse input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ProcessResponse processResponse, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.ChipPage == input.ChipPage || - (this.ChipPage != null && - this.ChipPage.Equals(input.ChipPage)) - ) && - ( - this.ProcessingFinished == input.ProcessingFinished || - (this.ProcessingFinished != null && - this.ProcessingFinished.Equals(input.ProcessingFinished)) - ) && - ( - this.ContainerList == input.ContainerList || - (this.ContainerList != null && - this.ContainerList.Equals(input.ContainerList)) - ) && - ( - this.TransactionInfo == input.TransactionInfo || - (this.TransactionInfo != null && - this.TransactionInfo.Equals(input.TransactionInfo)) - ) && - ( - this.Log == input.Log || - (this.Log != null && - this.Log.Equals(input.Log)) - ) && - ( - this.PassBackObject == input.PassBackObject || - this.PassBackObject != null && - input.PassBackObject != null && - this.PassBackObject.SequenceEqual(input.PassBackObject) - ) && - ( - this.MorePagesAvailable == input.MorePagesAvailable || - (this.MorePagesAvailable != null && - this.MorePagesAvailable.Equals(input.MorePagesAvailable)) - ) && - ( - this.ElapsedTime == input.ElapsedTime || - (this.ElapsedTime != null && - this.ElapsedTime.Equals(input.ElapsedTime)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, processResponse, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ProcessResponse processResponse, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (processResponse.ContainerList == null) + throw new ArgumentNullException(nameof(processResponse.ContainerList), "Property is required for class ProcessResponse."); + + if (processResponse.TransactionInfo == null) + throw new ArgumentNullException(nameof(processResponse.TransactionInfo), "Property is required for class ProcessResponse."); + + if (processResponse.LogOption.IsSet && processResponse.Log == null) + throw new ArgumentNullException(nameof(processResponse.Log), "Property is required for class ProcessResponse."); + + if (processResponse.PassBackObjectOption.IsSet && processResponse.PassBackObject == null) + throw new ArgumentNullException(nameof(processResponse.PassBackObject), "Property is required for class ProcessResponse."); + + if (processResponse.MetadataOption.IsSet && processResponse.Metadata == null) + throw new ArgumentNullException(nameof(processResponse.Metadata), "Property is required for class ProcessResponse."); + + var chipPageRawValue = RfidLocationValueConverter.ToJsonValue(processResponse.ChipPage); + writer.WriteNumber("ChipPage", chipPageRawValue); + + var processingFinishedRawValue = ProcessingStatusValueConverter.ToJsonValue(processResponse.ProcessingFinished); + writer.WriteNumber("ProcessingFinished", processingFinishedRawValue); + + writer.WritePropertyName("ContainerList"); + JsonSerializer.Serialize(writer, processResponse.ContainerList, jsonSerializerOptions); + writer.WritePropertyName("TransactionInfo"); + JsonSerializer.Serialize(writer, processResponse.TransactionInfo, jsonSerializerOptions); + writer.WriteNumber("morePagesAvailable", processResponse.MorePagesAvailable); + + writer.WriteNumber("elapsedTime", processResponse.ElapsedTime); + + if (processResponse.CoreLibResultCodeOption.IsSet) + writer.WriteNumber("CoreLibResultCode", processResponse.CoreLibResultCodeOption.Value!.Value); + + if (processResponse.LogOption.IsSet) + writer.WriteString("log", processResponse.Log); + + if (processResponse.PassBackObjectOption.IsSet) { - int hashCode = 41; - if (this.ChipPage != null) - hashCode = hashCode * 59 + this.ChipPage.GetHashCode(); - if (this.ProcessingFinished != null) - hashCode = hashCode * 59 + this.ProcessingFinished.GetHashCode(); - if (this.ContainerList != null) - hashCode = hashCode * 59 + this.ContainerList.GetHashCode(); - if (this.TransactionInfo != null) - hashCode = hashCode * 59 + this.TransactionInfo.GetHashCode(); - if (this.Log != null) - hashCode = hashCode * 59 + this.Log.GetHashCode(); - if (this.PassBackObject != null) - hashCode = hashCode * 59 + this.PassBackObject.GetHashCode(); - if (this.MorePagesAvailable != null) - hashCode = hashCode * 59 + this.MorePagesAvailable.GetHashCode(); - if (this.ElapsedTime != null) - hashCode = hashCode * 59 + this.ElapsedTime.GetHashCode(); - return hashCode; + writer.WritePropertyName("passBackObject"); + JsonSerializer.Serialize(writer, processResponse.PassBackObject, jsonSerializerOptions); + } + if (processResponse.MetadataOption.IsSet) + { + writer.WritePropertyName("metadata"); + JsonSerializer.Serialize(writer, processResponse.Metadata, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs index 54f3235..5513997 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs @@ -1,59 +1,77 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessSystemInfo /// - [DataContract] - public partial class ProcessSystemInfo : IEquatable, IValidatableObject + public partial class ProcessSystemInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Base64 encoded license file. - /// For internal use. Demo-sites recaptcha token.. - public ProcessSystemInfo(string license = default(string), string recaptchaToken = default(string)) + /// Base64 encoded license file + /// For internal use. Demo-sites recaptcha token. + [JsonConstructor] + public ProcessSystemInfo(Option license = default, Option recaptchaToken = default) { - this.License = license; - this.RecaptchaToken = recaptchaToken; + LicenseOption = license; + RecaptchaTokenOption = recaptchaToken; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of License + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LicenseOption { get; private set; } + /// /// Base64 encoded license file /// /// Base64 encoded license file - [DataMember(Name="license", EmitDefaultValue=false)] - public string License { get; set; } + [JsonPropertyName("license")] + public string? License { get { return this.LicenseOption; } set { this.LicenseOption = new(value); } } + + /// + /// Used to track the state of RecaptchaToken + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RecaptchaTokenOption { get; private set; } /// /// For internal use. Demo-sites recaptcha token. /// /// For internal use. Demo-sites recaptcha token. - [DataMember(Name="recaptcha_token", EmitDefaultValue=false)] - public string RecaptchaToken { get; set; } + [JsonPropertyName("recaptcha_token")] + public string? RecaptchaToken { get { return this.RecaptchaTokenOption; } set { this.RecaptchaTokenOption = new(value); } } /// /// Returns the string presentation of the object @@ -61,82 +79,121 @@ public partial class ProcessSystemInfo : IEquatable, IValida /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ProcessSystemInfo {\n"); sb.Append(" License: ").Append(License).Append("\n"); sb.Append(" RecaptchaToken: ").Append(RecaptchaToken).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ProcessSystemInfo); + yield break; } + } + /// + /// A Json converter for type + /// + public class ProcessSystemInfoJsonConverter : JsonConverter + { /// - /// Returns true if ProcessSystemInfo instances are equal + /// Deserializes json to /// - /// Instance of ProcessSystemInfo to be compared - /// Boolean - public bool Equals(ProcessSystemInfo input) + /// + /// + /// + /// + /// + public override ProcessSystemInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.License == input.License || - (this.License != null && - this.License.Equals(input.License)) - ) && - ( - this.RecaptchaToken == input.RecaptchaToken || - (this.RecaptchaToken != null && - this.RecaptchaToken.Equals(input.RecaptchaToken)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option license = default; + Option recaptchaToken = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "license": + license = new Option(utf8JsonReader.GetString()!); + break; + case "recaptcha_token": + recaptchaToken = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (license.IsSet && license.Value == null) + throw new ArgumentNullException(nameof(license), "Property is not nullable for class ProcessSystemInfo."); + + if (recaptchaToken.IsSet && recaptchaToken.Value == null) + throw new ArgumentNullException(nameof(recaptchaToken), "Property is not nullable for class ProcessSystemInfo."); + + return new ProcessSystemInfo(license, recaptchaToken); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ProcessSystemInfo processSystemInfo, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.License != null) - hashCode = hashCode * 59 + this.License.GetHashCode(); - if (this.RecaptchaToken != null) - hashCode = hashCode * 59 + this.RecaptchaToken.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, processSystemInfo, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ProcessSystemInfo processSystemInfo, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (processSystemInfo.LicenseOption.IsSet && processSystemInfo.License == null) + throw new ArgumentNullException(nameof(processSystemInfo.License), "Property is required for class ProcessSystemInfo."); + + if (processSystemInfo.RecaptchaTokenOption.IsSet && processSystemInfo.RecaptchaToken == null) + throw new ArgumentNullException(nameof(processSystemInfo.RecaptchaToken), "Property is required for class ProcessSystemInfo."); + + if (processSystemInfo.LicenseOption.IsSet) + writer.WriteString("license", processSystemInfo.License); + + if (processSystemInfo.RecaptchaTokenOption.IsSet) + writer.WriteString("recaptcha_token", processSystemInfo.RecaptchaToken); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs index 7487282..f2ea7dd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs @@ -1,40 +1,180 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class ProcessingStatus + /// + /// Defines ProcessingStatus + /// + public enum ProcessingStatus + { + /// + /// Enum NOT_FINISHED for value: 0 + /// + NOT_FINISHED = 0, + + /// + /// Enum FINISHED for value: 1 + /// + FINISHED = 1, + + /// + /// Enum TIMEOUT for value: 2 + /// + TIMEOUT = 2 + } + + /// + /// Converts to and from the JSON value + /// + public static class ProcessingStatusValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static ProcessingStatus FromString(string value) + { + if (value.Equals((0).ToString())) + return ProcessingStatus.NOT_FINISHED; + + if (value.Equals((1).ToString())) + return ProcessingStatus.FINISHED; + + if (value.Equals((2).ToString())) + return ProcessingStatus.TIMEOUT; + + throw new NotImplementedException($"Could not convert value to type ProcessingStatus: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static ProcessingStatus? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return ProcessingStatus.NOT_FINISHED; + + if (value.Equals((1).ToString())) + return ProcessingStatus.FINISHED; + + if (value.Equals((2).ToString())) + return ProcessingStatus.TIMEOUT; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(ProcessingStatus value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class ProcessingStatusJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override ProcessingStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + ProcessingStatus? result = rawValue == null + ? null + : ProcessingStatusValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the ProcessingStatus to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ProcessingStatus processingStatus, JsonSerializerOptions options) + { + writer.WriteStringValue(processingStatus.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class ProcessingStatusNullableJsonConverter : JsonConverter { + /// + /// Returns a ProcessingStatus from the Json object + /// + /// + /// + /// + /// + public override ProcessingStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** Processing was not finished */ - public const int NOT_FINISHED = 0; + ProcessingStatus? result = rawValue == null + ? null + : ProcessingStatusValueConverter.FromStringOrDefault(rawValue); - /** Processing finished */ - public const int FINISHED = 1; + if (result != null) + return result.Value; - /** Processing finished by timeout */ - public const int TIMEOUT = 2; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ProcessingStatus? processingStatus, JsonSerializerOptions options) + { + writer.WriteStringValue(processingStatus?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs new file mode 100644 index 0000000..9c20e6b --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs @@ -0,0 +1,410 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// RFIDDocVisualExtendedField + /// + public partial class RFIDDocVisualExtendedField : VisualExtendedFieldItem, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// fieldType + /// wFieldType + /// Field symbolic name (null-terminated string) + /// Number of StringsResult array elements + /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. + /// Buf_Text text string length + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' + /// originDG + /// Record index of the text field source in the data group + /// fieldMask + /// validity + /// inComparison + /// wLCID + /// reserved2 + /// reserved3 + /// originDGTag + /// originEntryView + [JsonConstructor] + public RFIDDocVisualExtendedField(int fieldType, TextFieldType wFieldType, string fieldName, decimal stringsCount, List stringsResult, decimal bufLength, string bufText, int originDG, decimal originTagEntry, Option fieldMask = default, Option validity = default, Option inComparison = default, Option wLCID = default, Option reserved2 = default, Option reserved3 = default, Option originDGTag = default, Option originEntryView = default) : base(fieldType, wFieldType, fieldName, stringsCount, stringsResult, bufLength, bufText, fieldMask, validity, inComparison, wLCID, reserved2, reserved3) + { + OriginDG = originDG; + OriginTagEntry = originTagEntry; + OriginDGTagOption = originDGTag; + OriginEntryViewOption = originEntryView; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets OriginDG + /// + [JsonPropertyName("OriginDG")] + public int OriginDG { get; set; } + + /// + /// Record index of the text field source in the data group + /// + /// Record index of the text field source in the data group + [JsonPropertyName("OriginTagEntry")] + public decimal OriginTagEntry { get; set; } + + /// + /// Used to track the state of OriginDGTag + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OriginDGTagOption { get; private set; } + + /// + /// Gets or Sets OriginDGTag + /// + [JsonPropertyName("OriginDGTag")] + public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new(value); } } + + /// + /// Used to track the state of OriginEntryView + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OriginEntryViewOption { get; private set; } + + /// + /// Gets or Sets OriginEntryView + /// + [JsonPropertyName("OriginEntryView")] + public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RFIDDocVisualExtendedField {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" OriginDG: ").Append(OriginDG).Append("\n"); + sb.Append(" OriginTagEntry: ").Append(OriginTagEntry).Append("\n"); + sb.Append(" OriginDGTag: ").Append(OriginDGTag).Append("\n"); + sb.Append(" OriginEntryView: ").Append(OriginEntryView).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class RFIDDocVisualExtendedFieldJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RFIDDocVisualExtendedField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldType = default; + Option wFieldType = default; + Option fieldName = default; + Option stringsCount = default; + Option?> stringsResult = default; + Option bufLength = default; + Option bufText = default; + Option originDG = default; + Option originTagEntry = default; + Option fieldMask = default; + Option validity = default; + Option inComparison = default; + Option wLCID = default; + Option reserved2 = default; + Option reserved3 = default; + Option originDGTag = default; + Option originEntryView = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldType = new Option(utf8JsonReader.GetInt32()); + break; + case "wFieldType": + string? wFieldTypeRawValue = utf8JsonReader.GetString(); + if (wFieldTypeRawValue != null) + wFieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(wFieldTypeRawValue)); + break; + case "FieldName": + fieldName = new Option(utf8JsonReader.GetString()!); + break; + case "StringsCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringsCount = new Option(utf8JsonReader.GetDecimal()); + break; + case "StringsResult": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringsResult = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Buf_Length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetDecimal()); + break; + case "Buf_Text": + bufText = new Option(utf8JsonReader.GetString()!); + break; + case "OriginDG": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originDG = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginTagEntry": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originTagEntry = new Option(utf8JsonReader.GetDecimal()); + break; + case "FieldMask": + fieldMask = new Option(utf8JsonReader.GetString()!); + break; + case "Validity": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + validity = new Option(utf8JsonReader.GetInt32()); + break; + case "InComparison": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + inComparison = new Option(utf8JsonReader.GetInt32()); + break; + case "wLCID": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + wLCID = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved3": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved3 = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginDGTag": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originDGTag = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginEntryView": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originEntryView = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(fieldType)); + + if (!wFieldType.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(wFieldType)); + + if (!fieldName.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(fieldName)); + + if (!stringsCount.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(stringsCount)); + + if (!stringsResult.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(stringsResult)); + + if (!bufLength.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(bufLength)); + + if (!bufText.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(bufText)); + + if (!originDG.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(originDG)); + + if (!originTagEntry.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(originTagEntry)); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (wFieldType.IsSet && wFieldType.Value == null) + throw new ArgumentNullException(nameof(wFieldType), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (fieldName.IsSet && fieldName.Value == null) + throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (stringsCount.IsSet && stringsCount.Value == null) + throw new ArgumentNullException(nameof(stringsCount), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (stringsResult.IsSet && stringsResult.Value == null) + throw new ArgumentNullException(nameof(stringsResult), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (bufText.IsSet && bufText.Value == null) + throw new ArgumentNullException(nameof(bufText), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (originDG.IsSet && originDG.Value == null) + throw new ArgumentNullException(nameof(originDG), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (originTagEntry.IsSet && originTagEntry.Value == null) + throw new ArgumentNullException(nameof(originTagEntry), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (fieldMask.IsSet && fieldMask.Value == null) + throw new ArgumentNullException(nameof(fieldMask), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (validity.IsSet && validity.Value == null) + throw new ArgumentNullException(nameof(validity), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (inComparison.IsSet && inComparison.Value == null) + throw new ArgumentNullException(nameof(inComparison), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (wLCID.IsSet && wLCID.Value == null) + throw new ArgumentNullException(nameof(wLCID), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (reserved3.IsSet && reserved3.Value == null) + throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (originDGTag.IsSet && originDGTag.Value == null) + throw new ArgumentNullException(nameof(originDGTag), "Property is not nullable for class RFIDDocVisualExtendedField."); + + if (originEntryView.IsSet && originEntryView.Value == null) + throw new ArgumentNullException(nameof(originEntryView), "Property is not nullable for class RFIDDocVisualExtendedField."); + + return new RFIDDocVisualExtendedField(fieldType.Value!.Value!, wFieldType.Value!.Value!, fieldName.Value!, stringsCount.Value!.Value!, stringsResult.Value!, bufLength.Value!.Value!, bufText.Value!, originDG.Value!.Value!, originTagEntry.Value!.Value!, fieldMask, validity, inComparison, wLCID, reserved2, reserved3, originDGTag, originEntryView); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDDocVisualExtendedField rFIDDocVisualExtendedField, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rFIDDocVisualExtendedField, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RFIDDocVisualExtendedField rFIDDocVisualExtendedField, JsonSerializerOptions jsonSerializerOptions) + { + if (rFIDDocVisualExtendedField.FieldName == null) + throw new ArgumentNullException(nameof(rFIDDocVisualExtendedField.FieldName), "Property is required for class RFIDDocVisualExtendedField."); + + if (rFIDDocVisualExtendedField.StringsResult == null) + throw new ArgumentNullException(nameof(rFIDDocVisualExtendedField.StringsResult), "Property is required for class RFIDDocVisualExtendedField."); + + if (rFIDDocVisualExtendedField.BufText == null) + throw new ArgumentNullException(nameof(rFIDDocVisualExtendedField.BufText), "Property is required for class RFIDDocVisualExtendedField."); + + if (rFIDDocVisualExtendedField.FieldMaskOption.IsSet && rFIDDocVisualExtendedField.FieldMask == null) + throw new ArgumentNullException(nameof(rFIDDocVisualExtendedField.FieldMask), "Property is required for class RFIDDocVisualExtendedField."); + + writer.WriteNumber("FieldType", rFIDDocVisualExtendedField.FieldType); + + var wFieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(rFIDDocVisualExtendedField.WFieldType); + writer.WriteNumber("wFieldType", wFieldTypeRawValue); + + writer.WriteString("FieldName", rFIDDocVisualExtendedField.FieldName); + + writer.WriteNumber("StringsCount", rFIDDocVisualExtendedField.StringsCount); + + writer.WritePropertyName("StringsResult"); + JsonSerializer.Serialize(writer, rFIDDocVisualExtendedField.StringsResult, jsonSerializerOptions); + writer.WriteNumber("Buf_Length", rFIDDocVisualExtendedField.BufLength); + + writer.WriteString("Buf_Text", rFIDDocVisualExtendedField.BufText); + + writer.WriteNumber("OriginDG", rFIDDocVisualExtendedField.OriginDG); + + writer.WriteNumber("OriginTagEntry", rFIDDocVisualExtendedField.OriginTagEntry); + + if (rFIDDocVisualExtendedField.FieldMaskOption.IsSet) + writer.WriteString("FieldMask", rFIDDocVisualExtendedField.FieldMask); + + if (rFIDDocVisualExtendedField.ValidityOption.IsSet) + writer.WriteNumber("Validity", rFIDDocVisualExtendedField.ValidityOption.Value!.Value); + + if (rFIDDocVisualExtendedField.InComparisonOption.IsSet) + writer.WriteNumber("InComparison", rFIDDocVisualExtendedField.InComparisonOption.Value!.Value); + + if (rFIDDocVisualExtendedField.WLCIDOption.IsSet) + writer.WriteNumber("wLCID", rFIDDocVisualExtendedField.WLCIDOption.Value!.Value); + + if (rFIDDocVisualExtendedField.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", rFIDDocVisualExtendedField.Reserved2Option.Value!.Value); + + if (rFIDDocVisualExtendedField.Reserved3Option.IsSet) + writer.WriteNumber("Reserved3", rFIDDocVisualExtendedField.Reserved3Option.Value!.Value); + + if (rFIDDocVisualExtendedField.OriginDGTagOption.IsSet) + writer.WriteNumber("OriginDGTag", rFIDDocVisualExtendedField.OriginDGTagOption.Value!.Value); + + if (rFIDDocVisualExtendedField.OriginEntryViewOption.IsSet) + writer.WriteNumber("OriginEntryView", rFIDDocVisualExtendedField.OriginEntryViewOption.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs new file mode 100644 index 0000000..812377d --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs @@ -0,0 +1,238 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// RFIDDocVisualExtendedFieldItem + /// + public partial class RFIDDocVisualExtendedFieldItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// originDG + /// Record index of the text field source in the data group + /// originDGTag + /// originEntryView + [JsonConstructor] + public RFIDDocVisualExtendedFieldItem(int originDG, decimal originTagEntry, Option originDGTag = default, Option originEntryView = default) + { + OriginDG = originDG; + OriginTagEntry = originTagEntry; + OriginDGTagOption = originDGTag; + OriginEntryViewOption = originEntryView; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets OriginDG + /// + [JsonPropertyName("OriginDG")] + public int OriginDG { get; set; } + + /// + /// Record index of the text field source in the data group + /// + /// Record index of the text field source in the data group + [JsonPropertyName("OriginTagEntry")] + public decimal OriginTagEntry { get; set; } + + /// + /// Used to track the state of OriginDGTag + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OriginDGTagOption { get; private set; } + + /// + /// Gets or Sets OriginDGTag + /// + [JsonPropertyName("OriginDGTag")] + public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new(value); } } + + /// + /// Used to track the state of OriginEntryView + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OriginEntryViewOption { get; private set; } + + /// + /// Gets or Sets OriginEntryView + /// + [JsonPropertyName("OriginEntryView")] + public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RFIDDocVisualExtendedFieldItem {\n"); + sb.Append(" OriginDG: ").Append(OriginDG).Append("\n"); + sb.Append(" OriginTagEntry: ").Append(OriginTagEntry).Append("\n"); + sb.Append(" OriginDGTag: ").Append(OriginDGTag).Append("\n"); + sb.Append(" OriginEntryView: ").Append(OriginEntryView).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RFIDDocVisualExtendedFieldItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RFIDDocVisualExtendedFieldItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option originDG = default; + Option originTagEntry = default; + Option originDGTag = default; + Option originEntryView = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "OriginDG": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originDG = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginTagEntry": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originTagEntry = new Option(utf8JsonReader.GetDecimal()); + break; + case "OriginDGTag": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originDGTag = new Option(utf8JsonReader.GetInt32()); + break; + case "OriginEntryView": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originEntryView = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!originDG.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedFieldItem.", nameof(originDG)); + + if (!originTagEntry.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedFieldItem.", nameof(originTagEntry)); + + if (originDG.IsSet && originDG.Value == null) + throw new ArgumentNullException(nameof(originDG), "Property is not nullable for class RFIDDocVisualExtendedFieldItem."); + + if (originTagEntry.IsSet && originTagEntry.Value == null) + throw new ArgumentNullException(nameof(originTagEntry), "Property is not nullable for class RFIDDocVisualExtendedFieldItem."); + + if (originDGTag.IsSet && originDGTag.Value == null) + throw new ArgumentNullException(nameof(originDGTag), "Property is not nullable for class RFIDDocVisualExtendedFieldItem."); + + if (originEntryView.IsSet && originEntryView.Value == null) + throw new ArgumentNullException(nameof(originEntryView), "Property is not nullable for class RFIDDocVisualExtendedFieldItem."); + + return new RFIDDocVisualExtendedFieldItem(originDG.Value!.Value!, originTagEntry.Value!.Value!, originDGTag, originEntryView); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDDocVisualExtendedFieldItem rFIDDocVisualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rFIDDocVisualExtendedFieldItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RFIDDocVisualExtendedFieldItem rFIDDocVisualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteNumber("OriginDG", rFIDDocVisualExtendedFieldItem.OriginDG); + + writer.WriteNumber("OriginTagEntry", rFIDDocVisualExtendedFieldItem.OriginTagEntry); + + if (rFIDDocVisualExtendedFieldItem.OriginDGTagOption.IsSet) + writer.WriteNumber("OriginDGTag", rFIDDocVisualExtendedFieldItem.OriginDGTagOption.Value!.Value); + + if (rFIDDocVisualExtendedFieldItem.OriginEntryViewOption.IsSet) + writer.WriteNumber("OriginEntryView", rFIDDocVisualExtendedFieldItem.OriginEntryViewOption.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs new file mode 100644 index 0000000..16ddf23 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs @@ -0,0 +1,188 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Container for extracted text fields. Fields are identified by type and language + /// + public partial class RFIDDocVisualExtendedInfo : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Number of pArrayFields array elements + /// pArrayFields + [JsonConstructor] + public RFIDDocVisualExtendedInfo(decimal nFields, List pArrayFields) + { + NFields = nFields; + PArrayFields = pArrayFields; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Number of pArrayFields array elements + /// + /// Number of pArrayFields array elements + [JsonPropertyName("nFields")] + public decimal NFields { get; set; } + + /// + /// Gets or Sets PArrayFields + /// + [JsonPropertyName("pArrayFields")] + public List PArrayFields { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RFIDDocVisualExtendedInfo {\n"); + sb.Append(" NFields: ").Append(NFields).Append("\n"); + sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RFIDDocVisualExtendedInfoJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RFIDDocVisualExtendedInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option nFields = default; + Option?> pArrayFields = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "nFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + nFields = new Option(utf8JsonReader.GetDecimal()); + break; + case "pArrayFields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pArrayFields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!nFields.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedInfo.", nameof(nFields)); + + if (!pArrayFields.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedInfo.", nameof(pArrayFields)); + + if (nFields.IsSet && nFields.Value == null) + throw new ArgumentNullException(nameof(nFields), "Property is not nullable for class RFIDDocVisualExtendedInfo."); + + if (pArrayFields.IsSet && pArrayFields.Value == null) + throw new ArgumentNullException(nameof(pArrayFields), "Property is not nullable for class RFIDDocVisualExtendedInfo."); + + return new RFIDDocVisualExtendedInfo(nFields.Value!.Value!, pArrayFields.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDDocVisualExtendedInfo rFIDDocVisualExtendedInfo, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rFIDDocVisualExtendedInfo, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RFIDDocVisualExtendedInfo rFIDDocVisualExtendedInfo, JsonSerializerOptions jsonSerializerOptions) + { + if (rFIDDocVisualExtendedInfo.PArrayFields == null) + throw new ArgumentNullException(nameof(rFIDDocVisualExtendedInfo.PArrayFields), "Property is required for class RFIDDocVisualExtendedInfo."); + + writer.WriteNumber("nFields", rFIDDocVisualExtendedInfo.NFields); + + writer.WritePropertyName("pArrayFields"); + JsonSerializer.Serialize(writer, rFIDDocVisualExtendedInfo.PArrayFields, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs new file mode 100644 index 0000000..bc8d2da --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// RFIDDocVisualExtendedInfoItem + /// + public partial class RFIDDocVisualExtendedInfoItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// docVisualExtendedInfo + [JsonConstructor] + public RFIDDocVisualExtendedInfoItem(RFIDDocVisualExtendedInfo docVisualExtendedInfo) + { + DocVisualExtendedInfo = docVisualExtendedInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets DocVisualExtendedInfo + /// + [JsonPropertyName("DocVisualExtendedInfo")] + public RFIDDocVisualExtendedInfo DocVisualExtendedInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RFIDDocVisualExtendedInfoItem {\n"); + sb.Append(" DocVisualExtendedInfo: ").Append(DocVisualExtendedInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RFIDDocVisualExtendedInfoItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RFIDDocVisualExtendedInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docVisualExtendedInfo = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocVisualExtendedInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docVisualExtendedInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!docVisualExtendedInfo.IsSet) + throw new ArgumentException("Property is required for class RFIDDocVisualExtendedInfoItem.", nameof(docVisualExtendedInfo)); + + if (docVisualExtendedInfo.IsSet && docVisualExtendedInfo.Value == null) + throw new ArgumentNullException(nameof(docVisualExtendedInfo), "Property is not nullable for class RFIDDocVisualExtendedInfoItem."); + + return new RFIDDocVisualExtendedInfoItem(docVisualExtendedInfo.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDDocVisualExtendedInfoItem rFIDDocVisualExtendedInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rFIDDocVisualExtendedInfoItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RFIDDocVisualExtendedInfoItem rFIDDocVisualExtendedInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + if (rFIDDocVisualExtendedInfoItem.DocVisualExtendedInfo == null) + throw new ArgumentNullException(nameof(rFIDDocVisualExtendedInfoItem.DocVisualExtendedInfo), "Property is required for class RFIDDocVisualExtendedInfoItem."); + + writer.WritePropertyName("DocVisualExtendedInfo"); + JsonSerializer.Serialize(writer, rFIDDocVisualExtendedInfoItem.DocVisualExtendedInfo, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs new file mode 100644 index 0000000..18b7aa3 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs @@ -0,0 +1,1402 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of error codes returned by SDK + /// + /// Enumeration contains a set of error codes returned by SDK + public enum RFIDErrorCodes + { + /// + /// Enum RFID_ERROR_LAYER6_FILE_EOF1 for value: 2147508866 + /// + RFID_ERROR_LAYER6_FILE_EOF1 = 2147508866, + + /// + /// Enum RFID_ERROR_LAYER6_PWD_DEACTIVATED for value: 2147508867 + /// + RFID_ERROR_LAYER6_PWD_DEACTIVATED = 2147508867, + + /// + /// Enum RFID_ERROR_LAYER6_PWD_BLOCKED for value: 2147509184 + /// + RFID_ERROR_LAYER6_PWD_BLOCKED = 2147509184, + + /// + /// Enum RFID_ERROR_LAYER6_PWD_SUSPEND for value: 2147509185 + /// + RFID_ERROR_LAYER6_PWD_SUSPEND = 2147509185, + + /// + /// Enum RFID_ERROR_LAYER6_PWD_BLOCKED2 for value: 2147510659 + /// + RFID_ERROR_LAYER6_PWD_BLOCKED2 = 2147510659, + + /// + /// Enum RFID_ERROR_LAYER6_PWD_DEACTIVATED2 for value: 2147510660 + /// + RFID_ERROR_LAYER6_PWD_DEACTIVATED2 = 2147510660, + + /// + /// Enum RFID_ERROR_LAYER6_PWD_SUSPEND2 for value: 2147510661 + /// + RFID_ERROR_LAYER6_PWD_SUSPEND2 = 2147510661, + + /// + /// Enum RFID_ERROR_LAYER6_INCORRECT_PARAMS for value: 2147510912 + /// + RFID_ERROR_LAYER6_INCORRECT_PARAMS = 2147510912, + + /// + /// Enum RFID_ERROR_LAYER6_FILE_NOT_FOUND for value: 2147510914 + /// + RFID_ERROR_LAYER6_FILE_NOT_FOUND = 2147510914, + + /// + /// Enum RFID_ERROR_LAYER6_NO_REFERENCE_DATA for value: 2147510920 + /// + RFID_ERROR_LAYER6_NO_REFERENCE_DATA = 2147510920, + + /// + /// Enum RFID_ERROR_LAYER6_FILE_EOF2 for value: 2147511040 + /// + RFID_ERROR_LAYER6_FILE_EOF2 = 2147511040, + + /// + /// Enum RFID_ERROR_NO_CHIP_DETECTED for value: 2147549185 + /// + RFID_ERROR_NO_CHIP_DETECTED = 2147549185, + + /// + /// Enum RFID_ERROR_NOT_AVAILABLE for value: 2147549186 + /// + RFID_ERROR_NOT_AVAILABLE = 2147549186, + + /// + /// Enum RFID_ERROR_INVALID_PARAMETER for value: 2147549188 + /// + RFID_ERROR_INVALID_PARAMETER = 2147549188, + + /// + /// Enum RFID_ERROR_NOT_INITIALIZED for value: 2147549189 + /// + RFID_ERROR_NOT_INITIALIZED = 2147549189, + + /// + /// Enum RFID_ERROR_NOT_ENOUGH_MEMORY for value: 2147549190 + /// + RFID_ERROR_NOT_ENOUGH_MEMORY = 2147549190, + + /// + /// Enum RFID_ERROR_INVALID_DIRECTORY for value: 2147549192 + /// + RFID_ERROR_INVALID_DIRECTORY = 2147549192, + + /// + /// Enum RFID_ERROR_UNKNOWN_COMMAND for value: 2147549193 + /// + RFID_ERROR_UNKNOWN_COMMAND = 2147549193, + + /// + /// Enum RFID_ERROR_FILE_IO_ERROR for value: 2147549194 + /// + RFID_ERROR_FILE_IO_ERROR = 2147549194, + + /// + /// Enum RFID_ERROR_BUSY for value: 2147549195 + /// + RFID_ERROR_BUSY = 2147549195, + + /// + /// Enum RFID_ERROR_OLD_FIRMWARE for value: 2147549196 + /// + RFID_ERROR_OLD_FIRMWARE = 2147549196, + + /// + /// Enum RFID_ERROR_PCSC_FAILED for value: 2147614720 + /// + RFID_ERROR_PCSC_FAILED = 2147614720, + + /// + /// Enum RFID_ERROR_PCSC_READER_NOT_AVAILABLE for value: 2147614721 + /// + RFID_ERROR_PCSC_READER_NOT_AVAILABLE = 2147614721, + + /// + /// Enum RFID_ERROR_PCSC_CANT_CONNECT_CARD for value: 2147614722 + /// + RFID_ERROR_PCSC_CANT_CONNECT_CARD = 2147614722, + + /// + /// Enum RFID_ERROR_PCSC_CARD_IS_NOT_CONNECTED for value: 2147614723 + /// + RFID_ERROR_PCSC_CARD_IS_NOT_CONNECTED = 2147614723, + + /// + /// Enum RFID_ERROR_PCSC_OPERATION_CANCELLED for value: 2147614724 + /// + RFID_ERROR_PCSC_OPERATION_CANCELLED = 2147614724, + + /// + /// Enum RFID_ERROR_PCSC_CARD_IS_BUSY for value: 2147614725 + /// + RFID_ERROR_PCSC_CARD_IS_BUSY = 2147614725, + + /// + /// Enum RFID_ERROR_PCSC_FAILED_SCARD for value: 2147614726 + /// + RFID_ERROR_PCSC_FAILED_SCARD = 2147614726, + + /// + /// Enum RFID_ERROR_PCSC_EXT_LE_FAILED for value: 2147614736 + /// + RFID_ERROR_PCSC_EXT_LE_FAILED = 2147614736, + + /// + /// Enum RFID_ERROR_LAYER6_PWD_FAILED for value: 2148557760 + /// + RFID_ERROR_LAYER6_PWD_FAILED = 2148557760, + + /// + /// Enum RFID_ERROR_NOT_PERFORMED for value: 2197815296 + /// + RFID_ERROR_NOT_PERFORMED = 2197815296, + + /// + /// Enum RFID_ERROR_SESSION_IS_CLOSED for value: 2197815297 + /// + RFID_ERROR_SESSION_IS_CLOSED = 2197815297, + + /// + /// Enum RFID_ERROR_SESSION_TERMINAL_UNSUPPORTED_OPERATION for value: 2197815298 + /// + RFID_ERROR_SESSION_TERMINAL_UNSUPPORTED_OPERATION = 2197815298, + + /// + /// Enum RFID_ERROR_SESSION_TERMINAL_TYPE_UNKNOWN for value: 2197815312 + /// + RFID_ERROR_SESSION_TERMINAL_TYPE_UNKNOWN = 2197815312, + + /// + /// Enum RFID_ERROR_SESSION_TERMINAL_TYPE_BAD_CERTIFICATE for value: 2197815313 + /// + RFID_ERROR_SESSION_TERMINAL_TYPE_BAD_CERTIFICATE = 2197815313, + + /// + /// Enum RFID_ERROR_SESSION_TERMINAL_TYPE_NOT_SET for value: 2197815314 + /// + RFID_ERROR_SESSION_TERMINAL_TYPE_NOT_SET = 2197815314, + + /// + /// Enum RFID_ERROR_SESSION_PROCEDURE_TYPE_UNKNOWN for value: 2197815315 + /// + RFID_ERROR_SESSION_PROCEDURE_TYPE_UNKNOWN = 2197815315, + + /// + /// Enum RFID_ERROR_Session_Procedure_Type_Unsupported for value: 2197815316 + /// + RFID_ERROR_Session_Procedure_Type_Unsupported = 2197815316, + + /// + /// Enum RFID_ERROR_SESSION_PROCEDURE_TYPE_NOT_SET for value: 2197815317 + /// + RFID_ERROR_SESSION_PROCEDURE_TYPE_NOT_SET = 2197815317, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_KEY_UNKNOWN_TYPE for value: 2197815318 + /// + RFID_ERROR_SESSION_ACCESS_KEY_UNKNOWN_TYPE = 2197815318, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_KEY_UNSUPPORTED_SM_TYPE for value: 2197815319 + /// + RFID_ERROR_SESSION_ACCESS_KEY_UNSUPPORTED_SM_TYPE = 2197815319, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_SM_TYPE for value: 2197815320 + /// + RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_SM_TYPE = 2197815320, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_KEY_RESTRICTED for value: 2197815321 + /// + RFID_ERROR_SESSION_ACCESS_KEY_RESTRICTED = 2197815321, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_DATA for value: 2197815322 + /// + RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_DATA = 2197815322, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_KEY_NOT_SET for value: 2197815323 + /// + RFID_ERROR_SESSION_ACCESS_KEY_NOT_SET = 2197815323, + + /// + /// Enum RFID_ERROR_SESSION_PWD_MANAGEMENT_NOT_AUTHORIZED for value: 2197815324 + /// + RFID_ERROR_SESSION_PWD_MANAGEMENT_NOT_AUTHORIZED = 2197815324, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_UNKNOWN_TYPE for value: 2197815328 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_UNKNOWN_TYPE = 2197815328, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_SM for value: 2197815329 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_SM = 2197815329, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_PACE for value: 2197815330 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_PACE = 2197815330, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA_KEYS for value: 2197815331 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA_KEYS = 2197815331, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_TA for value: 2197815332 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_TA = 2197815332, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA for value: 2197815333 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA = 2197815333, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_INCORRECT_OPTION_CA for value: 2197815334 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_INCORRECT_OPTION_CA = 2197815334, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_CA_FAILED for value: 2197815335 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_CA_FAILED = 2197815335, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_TA_FAILED for value: 2197815336 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_TA_FAILED = 2197815336, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_AA_FAILED for value: 2197815337 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_AA_FAILED = 2197815337, + + /// + /// Enum RFID_ERROR_SESSION_ACCESS_CONTROL_RI_FAILED for value: 2197815338 + /// + RFID_ERROR_SESSION_ACCESS_CONTROL_RI_FAILED = 2197815338, + + /// + /// Enum RFID_ERROR_SESSION_PA_SIGNATURE_CHECK_FAILED for value: 2197815344 + /// + RFID_ERROR_SESSION_PA_SIGNATURE_CHECK_FAILED = 2197815344, + + /// + /// Enum RFID_ERROR_SESSION_PA_HASH_CHECK_FAILED for value: 2197815345 + /// + RFID_ERROR_SESSION_PA_HASH_CHECK_FAILED = 2197815345, + + /// + /// Enum RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_EXPIRY for value: 2197815360 + /// + RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_EXPIRY = 2197815360, + + /// + /// Enum RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_BIRTH for value: 2197815361 + /// + RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_BIRTH = 2197815361, + + /// + /// Enum RFID_ERROR_SESSION_INVALID_AUX_DATA_COMMUNITY_ID for value: 2197815362 + /// + RFID_ERROR_SESSION_INVALID_AUX_DATA_COMMUNITY_ID = 2197815362, + + /// + /// Enum RFID_ERROR_SESSION_E_SIGN_REQUIRES_APP_SELECTION for value: 2197815376 + /// + RFID_ERROR_SESSION_E_SIGN_REQUIRES_APP_SELECTION = 2197815376, + + /// + /// Enum RFID_ERROR_SESSION_E_SIGN_PIN_NOT_SET for value: 2197815377 + /// + RFID_ERROR_SESSION_E_SIGN_PIN_NOT_SET = 2197815377, + + /// + /// Enum RFID_ERROR_SESSION_E_SIGN_PIN_NOT_VERIFIED for value: 2197815378 + /// + RFID_ERROR_SESSION_E_SIGN_PIN_NOT_VERIFIED = 2197815378, + + /// + /// Enum RFID_ERROR_SESSION_INCORRECT_DATA for value: 2197815392 + /// + RFID_ERROR_SESSION_INCORRECT_DATA = 2197815392, + + /// + /// Enum RFID_ERROR_SESSION_FILE_NOT_ENOUGH_DATA for value: 2197880832 + /// + RFID_ERROR_SESSION_FILE_NOT_ENOUGH_DATA = 2197880832, + + /// + /// Enum RFID_ERROR_SESSION_FILE_INCORRECT_DATA for value: 2197946368 + /// + RFID_ERROR_SESSION_FILE_INCORRECT_DATA = 2197946368, + + /// + /// Enum RFID_ERROR_SESSION_FILE_UNEXPECTED_DATA for value: 2198011904 + /// + RFID_ERROR_SESSION_FILE_UNEXPECTED_DATA = 2198011904, + + /// + /// Enum RFID_ERROR_SESSION_FILE_CONTENTS_UNEXPECTED_DATA for value: 2198077440 + /// + RFID_ERROR_SESSION_FILE_CONTENTS_UNEXPECTED_DATA = 2198077440, + + /// + /// Enum RFID_ERROR_SESSION_FILE_WRONG_TAG for value: 2198142976 + /// + RFID_ERROR_SESSION_FILE_WRONG_TAG = 2198142976, + + /// + /// Enum RFID_ERROR_SESSION_FILE_CANT_USE_DATA for value: 2198208512 + /// + RFID_ERROR_SESSION_FILE_CANT_USE_DATA = 2198208512, + + /// + /// Enum RFID_ERROR_SESSION_FILE_CANT_READ_DATA for value: 2198274048 + /// + RFID_ERROR_SESSION_FILE_CANT_READ_DATA = 2198274048, + + /// + /// Enum RFID_ERROR_SESSION_FILE_ACCESS_DENIED for value: 2198339584 + /// + RFID_ERROR_SESSION_FILE_ACCESS_DENIED = 2198339584, + + /// + /// Enum RFID_ERROR_LAYER34_NO_ERROR for value: 2214592512 + /// + RFID_ERROR_LAYER34_NO_ERROR = 2214592512, + + /// + /// Enum RFID_ERROR_LAYER34_TIME_OUT for value: 2214658048 + /// + RFID_ERROR_LAYER34_TIME_OUT = 2214658048, + + /// + /// Enum RFID_ERROR_LAYER34_COLLISION for value: 2214723584 + /// + RFID_ERROR_LAYER34_COLLISION = 2214723584, + + /// + /// Enum RFID_ERROR_LAYER34_CRC for value: 2214789120 + /// + RFID_ERROR_LAYER34_CRC = 2214789120, + + /// + /// Enum RFID_ERROR_LAYER34_DATA_INTEGRITY for value: 2214854656 + /// + RFID_ERROR_LAYER34_DATA_INTEGRITY = 2214854656, + + /// + /// Enum RFID_ERROR_LAYER34_DATA_LENGTH for value: 2214920192 + /// + RFID_ERROR_LAYER34_DATA_LENGTH = 2214920192, + + /// + /// Enum RFID_ERROR_Layer34_RFU for value: 2214985728 + /// + RFID_ERROR_Layer34_RFU = 2214985728, + + /// + /// Enum RFID_ERROR_LAYER34_COLLISION_TOO_MANY for value: 2215051264 + /// + RFID_ERROR_LAYER34_COLLISION_TOO_MANY = 2215051264, + + /// + /// Enum RFID_ERROR_LAYER34_PROTOCOL_B for value: 2215116800 + /// + RFID_ERROR_LAYER34_PROTOCOL_B = 2215116800, + + /// + /// Enum RFID_ERROR_LAYER34_DATA_CONTENTS for value: 2215182336 + /// + RFID_ERROR_LAYER34_DATA_CONTENTS = 2215182336, + + /// + /// Enum RFID_ERROR_LAYER34_PROTOCOL for value: 2215247872 + /// + RFID_ERROR_LAYER34_PROTOCOL = 2215247872, + + /// + /// Enum RFID_ERROR_LAYER34_GLOBAL_TIME_OUT for value: 2215313408 + /// + RFID_ERROR_LAYER34_GLOBAL_TIME_OUT = 2215313408, + + /// + /// Enum RFID_ERROR_LAYER34_MIFARE_AUTH for value: 2215378944 + /// + RFID_ERROR_LAYER34_MIFARE_AUTH = 2215378944, + + /// + /// Enum RFID_ERROR_LAYER34_SAM_ERROR for value: 2215444480 + /// + RFID_ERROR_LAYER34_SAM_ERROR = 2215444480, + + /// + /// Enum RFID_ERROR_LAYER34_SAM_COLLISION for value: 2215510016 + /// + RFID_ERROR_LAYER34_SAM_COLLISION = 2215510016, + + /// + /// Enum RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE for value: 2215575552 + /// + RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE = 2215575552, + + /// + /// Enum RFID_ERROR_LAYER6_SECURITY_MANAGER for value: 2248146944 + /// + RFID_ERROR_LAYER6_SECURITY_MANAGER = 2248146944, + + /// + /// Enum RFID_ERROR_LAYER6_APP_SELECTION_FAILURE for value: 2248146945 + /// + RFID_ERROR_LAYER6_APP_SELECTION_FAILURE = 2248146945, + + /// + /// Enum RFID_ERROR_LAYER6_MUTUAL_AUTH_MAC_FAIL for value: 2248147200 + /// + RFID_ERROR_LAYER6_MUTUAL_AUTH_MAC_FAIL = 2248147200, + + /// + /// Enum RFID_ERROR_LAYER6_MUTUAL_AUTH_ENC_FAIL for value: 2248147201 + /// + RFID_ERROR_LAYER6_MUTUAL_AUTH_ENC_FAIL = 2248147201, + + /// + /// Enum RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE for value: 2248147202 + /// + RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE = 2248147202, + + /// + /// Enum RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE_DATA for value: 2248147203 + /// + RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE_DATA = 2248147203, + + /// + /// Enum RFID_ERROR_LAYER6_SM_DO_8E_MISSING for value: 2248147456 + /// + RFID_ERROR_LAYER6_SM_DO_8E_MISSING = 2248147456, + + /// + /// Enum RFID_ERROR_LAYER6_SM_DO_87_MISSING for value: 2248147457 + /// + RFID_ERROR_LAYER6_SM_DO_87_MISSING = 2248147457, + + /// + /// Enum RFID_ERROR_LAYER6_SM_DO_99_MISSING for value: 2248147458 + /// + RFID_ERROR_LAYER6_SM_DO_99_MISSING = 2248147458, + + /// + /// Enum RFID_ERROR_LAYER6_SM_MAC_INCORRECT for value: 2248147459 + /// + RFID_ERROR_LAYER6_SM_MAC_INCORRECT = 2248147459, + + /// + /// Enum RFID_ERROR_LAYER6_SM_DO_87_INCORRECT for value: 2248147460 + /// + RFID_ERROR_LAYER6_SM_DO_87_INCORRECT = 2248147460, + + /// + /// Enum RFID_ERROR_LAYER6_NON_TLV_RESPONSE_DATA for value: 2248147712 + /// + RFID_ERROR_LAYER6_NON_TLV_RESPONSE_DATA = 2248147712, + + /// + /// Enum RFID_ERROR_LAYER6_WRONG_RND_ICC_LENGTH for value: 2248147713 + /// + RFID_ERROR_LAYER6_WRONG_RND_ICC_LENGTH = 2248147713, + + /// + /// Enum RFID_ERROR_LAYER6_INT_AUTH_FAILURE for value: 2248147714 + /// + RFID_ERROR_LAYER6_INT_AUTH_FAILURE = 2248147714, + + /// + /// Enum RFID_ERROR_LAYER6_MSE_SET_KAT_FAILURE for value: 2248147715 + /// + RFID_ERROR_LAYER6_MSE_SET_KAT_FAILURE = 2248147715, + + /// + /// Enum RFID_ERROR_LAYER6_MSE_SET_DST_FAILURE for value: 2248147716 + /// + RFID_ERROR_LAYER6_MSE_SET_DST_FAILURE = 2248147716, + + /// + /// Enum RFID_ERROR_LAYER6_PSO_CERTIFICATE_FAILURE for value: 2248147717 + /// + RFID_ERROR_LAYER6_PSO_CERTIFICATE_FAILURE = 2248147717, + + /// + /// Enum RFID_ERROR_LAYER6_MSE_SET_AT_FAILURE for value: 2248147718 + /// + RFID_ERROR_LAYER6_MSE_SET_AT_FAILURE = 2248147718, + + /// + /// Enum RFID_ERROR_LAYER6_GET_CHALLENGE_FAILURE for value: 2248147719 + /// + RFID_ERROR_LAYER6_GET_CHALLENGE_FAILURE = 2248147719, + + /// + /// Enum RFID_ERROR_LAYER6_EXT_AUTH_FAILURE for value: 2248147720 + /// + RFID_ERROR_LAYER6_EXT_AUTH_FAILURE = 2248147720, + + /// + /// Enum RFID_ERROR_LAYER6_GENERAL_AUTH_FAILURE for value: 2248147721 + /// + RFID_ERROR_LAYER6_GENERAL_AUTH_FAILURE = 2248147721, + + /// + /// Enum RFID_ERROR_FAILED for value: 4294967295 + /// + RFID_ERROR_FAILED = 4294967295, + + /// + /// Enum RFID_ERROR_NO_ERROR for value: 1 + /// + RFID_ERROR_NO_ERROR = 1, + + /// + /// Enum RFID_ERROR_ALREADY_DONE for value: 2 + /// + RFID_ERROR_ALREADY_DONE = 2 + } + + /// + /// Converts to and from the JSON value + /// + public static class RFIDErrorCodesValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RFIDErrorCodes FromString(string value) + { + if (value.Equals((2147508866).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_EOF1; + + if (value.Equals((2147508867).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_DEACTIVATED; + + if (value.Equals((2147509184).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_BLOCKED; + + if (value.Equals((2147509185).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_SUSPEND; + + if (value.Equals((2147510659).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_BLOCKED2; + + if (value.Equals((2147510660).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_DEACTIVATED2; + + if (value.Equals((2147510661).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_SUSPEND2; + + if (value.Equals((2147510912).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_INCORRECT_PARAMS; + + if (value.Equals((2147510914).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_NOT_FOUND; + + if (value.Equals((2147510920).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_NO_REFERENCE_DATA; + + if (value.Equals((2147511040).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_EOF2; + + if (value.Equals((2147549185).ToString())) + return RFIDErrorCodes.RFID_ERROR_NO_CHIP_DETECTED; + + if (value.Equals((2147549186).ToString())) + return RFIDErrorCodes.RFID_ERROR_NOT_AVAILABLE; + + if (value.Equals((2147549188).ToString())) + return RFIDErrorCodes.RFID_ERROR_INVALID_PARAMETER; + + if (value.Equals((2147549189).ToString())) + return RFIDErrorCodes.RFID_ERROR_NOT_INITIALIZED; + + if (value.Equals((2147549190).ToString())) + return RFIDErrorCodes.RFID_ERROR_NOT_ENOUGH_MEMORY; + + if (value.Equals((2147549192).ToString())) + return RFIDErrorCodes.RFID_ERROR_INVALID_DIRECTORY; + + if (value.Equals((2147549193).ToString())) + return RFIDErrorCodes.RFID_ERROR_UNKNOWN_COMMAND; + + if (value.Equals((2147549194).ToString())) + return RFIDErrorCodes.RFID_ERROR_FILE_IO_ERROR; + + if (value.Equals((2147549195).ToString())) + return RFIDErrorCodes.RFID_ERROR_BUSY; + + if (value.Equals((2147549196).ToString())) + return RFIDErrorCodes.RFID_ERROR_OLD_FIRMWARE; + + if (value.Equals((2147614720).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_FAILED; + + if (value.Equals((2147614721).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_READER_NOT_AVAILABLE; + + if (value.Equals((2147614722).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_CANT_CONNECT_CARD; + + if (value.Equals((2147614723).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_CARD_IS_NOT_CONNECTED; + + if (value.Equals((2147614724).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_OPERATION_CANCELLED; + + if (value.Equals((2147614725).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_CARD_IS_BUSY; + + if (value.Equals((2147614726).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_FAILED_SCARD; + + if (value.Equals((2147614736).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_EXT_LE_FAILED; + + if (value.Equals((2148557760).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_FAILED; + + if (value.Equals((2197815296).ToString())) + return RFIDErrorCodes.RFID_ERROR_NOT_PERFORMED; + + if (value.Equals((2197815297).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_IS_CLOSED; + + if (value.Equals((2197815298).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_UNSUPPORTED_OPERATION; + + if (value.Equals((2197815312).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_UNKNOWN; + + if (value.Equals((2197815313).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_BAD_CERTIFICATE; + + if (value.Equals((2197815314).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_NOT_SET; + + if (value.Equals((2197815315).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PROCEDURE_TYPE_UNKNOWN; + + if (value.Equals((2197815316).ToString())) + return RFIDErrorCodes.RFID_ERROR_Session_Procedure_Type_Unsupported; + + if (value.Equals((2197815317).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PROCEDURE_TYPE_NOT_SET; + + if (value.Equals((2197815318).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_UNKNOWN_TYPE; + + if (value.Equals((2197815319).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_UNSUPPORTED_SM_TYPE; + + if (value.Equals((2197815320).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_SM_TYPE; + + if (value.Equals((2197815321).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_RESTRICTED; + + if (value.Equals((2197815322).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_DATA; + + if (value.Equals((2197815323).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_NOT_SET; + + if (value.Equals((2197815324).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PWD_MANAGEMENT_NOT_AUTHORIZED; + + if (value.Equals((2197815328).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_UNKNOWN_TYPE; + + if (value.Equals((2197815329).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_SM; + + if (value.Equals((2197815330).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_PACE; + + if (value.Equals((2197815331).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA_KEYS; + + if (value.Equals((2197815332).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_TA; + + if (value.Equals((2197815333).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA; + + if (value.Equals((2197815334).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_INCORRECT_OPTION_CA; + + if (value.Equals((2197815335).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_CA_FAILED; + + if (value.Equals((2197815336).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_TA_FAILED; + + if (value.Equals((2197815337).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_AA_FAILED; + + if (value.Equals((2197815338).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_RI_FAILED; + + if (value.Equals((2197815344).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PA_SIGNATURE_CHECK_FAILED; + + if (value.Equals((2197815345).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PA_HASH_CHECK_FAILED; + + if (value.Equals((2197815360).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_EXPIRY; + + if (value.Equals((2197815361).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_BIRTH; + + if (value.Equals((2197815362).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_COMMUNITY_ID; + + if (value.Equals((2197815376).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_REQUIRES_APP_SELECTION; + + if (value.Equals((2197815377).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_SET; + + if (value.Equals((2197815378).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_VERIFIED; + + if (value.Equals((2197815392).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_INCORRECT_DATA; + + if (value.Equals((2197880832).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_NOT_ENOUGH_DATA; + + if (value.Equals((2197946368).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_INCORRECT_DATA; + + if (value.Equals((2198011904).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_UNEXPECTED_DATA; + + if (value.Equals((2198077440).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CONTENTS_UNEXPECTED_DATA; + + if (value.Equals((2198142976).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_WRONG_TAG; + + if (value.Equals((2198208512).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CANT_USE_DATA; + + if (value.Equals((2198274048).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CANT_READ_DATA; + + if (value.Equals((2198339584).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_ACCESS_DENIED; + + if (value.Equals((2214592512).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_NO_ERROR; + + if (value.Equals((2214658048).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_TIME_OUT; + + if (value.Equals((2214723584).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_COLLISION; + + if (value.Equals((2214789120).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_CRC; + + if (value.Equals((2214854656).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_INTEGRITY; + + if (value.Equals((2214920192).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_LENGTH; + + if (value.Equals((2214985728).ToString())) + return RFIDErrorCodes.RFID_ERROR_Layer34_RFU; + + if (value.Equals((2215051264).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_COLLISION_TOO_MANY; + + if (value.Equals((2215116800).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_PROTOCOL_B; + + if (value.Equals((2215182336).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_CONTENTS; + + if (value.Equals((2215247872).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_PROTOCOL; + + if (value.Equals((2215313408).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_GLOBAL_TIME_OUT; + + if (value.Equals((2215378944).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_MIFARE_AUTH; + + if (value.Equals((2215444480).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_ERROR; + + if (value.Equals((2215510016).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_COLLISION; + + if (value.Equals((2215575552).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE; + + if (value.Equals((2248146944).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SECURITY_MANAGER; + + if (value.Equals((2248146945).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_APP_SELECTION_FAILURE; + + if (value.Equals((2248147200).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_MAC_FAIL; + + if (value.Equals((2248147201).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_ENC_FAIL; + + if (value.Equals((2248147202).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE; + + if (value.Equals((2248147203).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE_DATA; + + if (value.Equals((2248147456).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_8E_MISSING; + + if (value.Equals((2248147457).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_87_MISSING; + + if (value.Equals((2248147458).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_99_MISSING; + + if (value.Equals((2248147459).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_MAC_INCORRECT; + + if (value.Equals((2248147460).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_87_INCORRECT; + + if (value.Equals((2248147712).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_NON_TLV_RESPONSE_DATA; + + if (value.Equals((2248147713).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_WRONG_RND_ICC_LENGTH; + + if (value.Equals((2248147714).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_INT_AUTH_FAILURE; + + if (value.Equals((2248147715).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_KAT_FAILURE; + + if (value.Equals((2248147716).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_DST_FAILURE; + + if (value.Equals((2248147717).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PSO_CERTIFICATE_FAILURE; + + if (value.Equals((2248147718).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_AT_FAILURE; + + if (value.Equals((2248147719).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_GET_CHALLENGE_FAILURE; + + if (value.Equals((2248147720).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_EXT_AUTH_FAILURE; + + if (value.Equals((2248147721).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_GENERAL_AUTH_FAILURE; + + if (value.Equals((4294967295).ToString())) + return RFIDErrorCodes.RFID_ERROR_FAILED; + + if (value.Equals((1).ToString())) + return RFIDErrorCodes.RFID_ERROR_NO_ERROR; + + if (value.Equals((2).ToString())) + return RFIDErrorCodes.RFID_ERROR_ALREADY_DONE; + + throw new NotImplementedException($"Could not convert value to type RFIDErrorCodes: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RFIDErrorCodes? FromStringOrDefault(string value) + { + if (value.Equals((2147508866).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_EOF1; + + if (value.Equals((2147508867).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_DEACTIVATED; + + if (value.Equals((2147509184).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_BLOCKED; + + if (value.Equals((2147509185).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_SUSPEND; + + if (value.Equals((2147510659).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_BLOCKED2; + + if (value.Equals((2147510660).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_DEACTIVATED2; + + if (value.Equals((2147510661).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_SUSPEND2; + + if (value.Equals((2147510912).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_INCORRECT_PARAMS; + + if (value.Equals((2147510914).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_NOT_FOUND; + + if (value.Equals((2147510920).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_NO_REFERENCE_DATA; + + if (value.Equals((2147511040).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_EOF2; + + if (value.Equals((2147549185).ToString())) + return RFIDErrorCodes.RFID_ERROR_NO_CHIP_DETECTED; + + if (value.Equals((2147549186).ToString())) + return RFIDErrorCodes.RFID_ERROR_NOT_AVAILABLE; + + if (value.Equals((2147549188).ToString())) + return RFIDErrorCodes.RFID_ERROR_INVALID_PARAMETER; + + if (value.Equals((2147549189).ToString())) + return RFIDErrorCodes.RFID_ERROR_NOT_INITIALIZED; + + if (value.Equals((2147549190).ToString())) + return RFIDErrorCodes.RFID_ERROR_NOT_ENOUGH_MEMORY; + + if (value.Equals((2147549192).ToString())) + return RFIDErrorCodes.RFID_ERROR_INVALID_DIRECTORY; + + if (value.Equals((2147549193).ToString())) + return RFIDErrorCodes.RFID_ERROR_UNKNOWN_COMMAND; + + if (value.Equals((2147549194).ToString())) + return RFIDErrorCodes.RFID_ERROR_FILE_IO_ERROR; + + if (value.Equals((2147549195).ToString())) + return RFIDErrorCodes.RFID_ERROR_BUSY; + + if (value.Equals((2147549196).ToString())) + return RFIDErrorCodes.RFID_ERROR_OLD_FIRMWARE; + + if (value.Equals((2147614720).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_FAILED; + + if (value.Equals((2147614721).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_READER_NOT_AVAILABLE; + + if (value.Equals((2147614722).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_CANT_CONNECT_CARD; + + if (value.Equals((2147614723).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_CARD_IS_NOT_CONNECTED; + + if (value.Equals((2147614724).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_OPERATION_CANCELLED; + + if (value.Equals((2147614725).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_CARD_IS_BUSY; + + if (value.Equals((2147614726).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_FAILED_SCARD; + + if (value.Equals((2147614736).ToString())) + return RFIDErrorCodes.RFID_ERROR_PCSC_EXT_LE_FAILED; + + if (value.Equals((2148557760).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_FAILED; + + if (value.Equals((2197815296).ToString())) + return RFIDErrorCodes.RFID_ERROR_NOT_PERFORMED; + + if (value.Equals((2197815297).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_IS_CLOSED; + + if (value.Equals((2197815298).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_UNSUPPORTED_OPERATION; + + if (value.Equals((2197815312).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_UNKNOWN; + + if (value.Equals((2197815313).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_BAD_CERTIFICATE; + + if (value.Equals((2197815314).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_NOT_SET; + + if (value.Equals((2197815315).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PROCEDURE_TYPE_UNKNOWN; + + if (value.Equals((2197815316).ToString())) + return RFIDErrorCodes.RFID_ERROR_Session_Procedure_Type_Unsupported; + + if (value.Equals((2197815317).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PROCEDURE_TYPE_NOT_SET; + + if (value.Equals((2197815318).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_UNKNOWN_TYPE; + + if (value.Equals((2197815319).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_UNSUPPORTED_SM_TYPE; + + if (value.Equals((2197815320).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_SM_TYPE; + + if (value.Equals((2197815321).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_RESTRICTED; + + if (value.Equals((2197815322).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_DATA; + + if (value.Equals((2197815323).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_NOT_SET; + + if (value.Equals((2197815324).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PWD_MANAGEMENT_NOT_AUTHORIZED; + + if (value.Equals((2197815328).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_UNKNOWN_TYPE; + + if (value.Equals((2197815329).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_SM; + + if (value.Equals((2197815330).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_PACE; + + if (value.Equals((2197815331).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA_KEYS; + + if (value.Equals((2197815332).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_TA; + + if (value.Equals((2197815333).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA; + + if (value.Equals((2197815334).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_INCORRECT_OPTION_CA; + + if (value.Equals((2197815335).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_CA_FAILED; + + if (value.Equals((2197815336).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_TA_FAILED; + + if (value.Equals((2197815337).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_AA_FAILED; + + if (value.Equals((2197815338).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_RI_FAILED; + + if (value.Equals((2197815344).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PA_SIGNATURE_CHECK_FAILED; + + if (value.Equals((2197815345).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_PA_HASH_CHECK_FAILED; + + if (value.Equals((2197815360).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_EXPIRY; + + if (value.Equals((2197815361).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_BIRTH; + + if (value.Equals((2197815362).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_COMMUNITY_ID; + + if (value.Equals((2197815376).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_REQUIRES_APP_SELECTION; + + if (value.Equals((2197815377).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_SET; + + if (value.Equals((2197815378).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_VERIFIED; + + if (value.Equals((2197815392).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_INCORRECT_DATA; + + if (value.Equals((2197880832).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_NOT_ENOUGH_DATA; + + if (value.Equals((2197946368).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_INCORRECT_DATA; + + if (value.Equals((2198011904).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_UNEXPECTED_DATA; + + if (value.Equals((2198077440).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CONTENTS_UNEXPECTED_DATA; + + if (value.Equals((2198142976).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_WRONG_TAG; + + if (value.Equals((2198208512).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CANT_USE_DATA; + + if (value.Equals((2198274048).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CANT_READ_DATA; + + if (value.Equals((2198339584).ToString())) + return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_ACCESS_DENIED; + + if (value.Equals((2214592512).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_NO_ERROR; + + if (value.Equals((2214658048).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_TIME_OUT; + + if (value.Equals((2214723584).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_COLLISION; + + if (value.Equals((2214789120).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_CRC; + + if (value.Equals((2214854656).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_INTEGRITY; + + if (value.Equals((2214920192).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_LENGTH; + + if (value.Equals((2214985728).ToString())) + return RFIDErrorCodes.RFID_ERROR_Layer34_RFU; + + if (value.Equals((2215051264).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_COLLISION_TOO_MANY; + + if (value.Equals((2215116800).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_PROTOCOL_B; + + if (value.Equals((2215182336).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_CONTENTS; + + if (value.Equals((2215247872).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_PROTOCOL; + + if (value.Equals((2215313408).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_GLOBAL_TIME_OUT; + + if (value.Equals((2215378944).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_MIFARE_AUTH; + + if (value.Equals((2215444480).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_ERROR; + + if (value.Equals((2215510016).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_COLLISION; + + if (value.Equals((2215575552).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE; + + if (value.Equals((2248146944).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SECURITY_MANAGER; + + if (value.Equals((2248146945).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_APP_SELECTION_FAILURE; + + if (value.Equals((2248147200).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_MAC_FAIL; + + if (value.Equals((2248147201).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_ENC_FAIL; + + if (value.Equals((2248147202).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE; + + if (value.Equals((2248147203).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE_DATA; + + if (value.Equals((2248147456).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_8E_MISSING; + + if (value.Equals((2248147457).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_87_MISSING; + + if (value.Equals((2248147458).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_99_MISSING; + + if (value.Equals((2248147459).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_MAC_INCORRECT; + + if (value.Equals((2248147460).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_87_INCORRECT; + + if (value.Equals((2248147712).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_NON_TLV_RESPONSE_DATA; + + if (value.Equals((2248147713).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_WRONG_RND_ICC_LENGTH; + + if (value.Equals((2248147714).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_INT_AUTH_FAILURE; + + if (value.Equals((2248147715).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_KAT_FAILURE; + + if (value.Equals((2248147716).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_DST_FAILURE; + + if (value.Equals((2248147717).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_PSO_CERTIFICATE_FAILURE; + + if (value.Equals((2248147718).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_AT_FAILURE; + + if (value.Equals((2248147719).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_GET_CHALLENGE_FAILURE; + + if (value.Equals((2248147720).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_EXT_AUTH_FAILURE; + + if (value.Equals((2248147721).ToString())) + return RFIDErrorCodes.RFID_ERROR_LAYER6_GENERAL_AUTH_FAILURE; + + if (value.Equals((4294967295).ToString())) + return RFIDErrorCodes.RFID_ERROR_FAILED; + + if (value.Equals((1).ToString())) + return RFIDErrorCodes.RFID_ERROR_NO_ERROR; + + if (value.Equals((2).ToString())) + return RFIDErrorCodes.RFID_ERROR_ALREADY_DONE; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static long ToJsonValue(RFIDErrorCodes value) + { + return (long) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RFIDErrorCodesJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RFIDErrorCodes Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RFIDErrorCodes? result = rawValue == null + ? null + : RFIDErrorCodesValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RFIDErrorCodes to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDErrorCodes rFIDErrorCodes, JsonSerializerOptions options) + { + writer.WriteStringValue(rFIDErrorCodes.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RFIDErrorCodesNullableJsonConverter : JsonConverter + { + /// + /// Returns a RFIDErrorCodes from the Json object + /// + /// + /// + /// + /// + public override RFIDErrorCodes? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RFIDErrorCodes? result = rawValue == null + ? null + : RFIDErrorCodesValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDErrorCodes? rFIDErrorCodes, JsonSerializerOptions options) + { + writer.WriteStringValue(rFIDErrorCodes?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs new file mode 100644 index 0000000..c2ee226 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs @@ -0,0 +1,216 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// RFIDGraphicsInfoResult + /// + public partial class RFIDGraphicsInfoResult : ResultItem, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// tOriginalRFIDGraphicsInfo + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public RFIDGraphicsInfoResult(TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + { + TOriginalRFIDGraphicsInfo = tOriginalRFIDGraphicsInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets TOriginalRFIDGraphicsInfo + /// + [JsonPropertyName("TOriginalRFIDGraphicsInfo")] + public TOriginalRFIDGraphicsInfo TOriginalRFIDGraphicsInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RFIDGraphicsInfoResult {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" TOriginalRFIDGraphicsInfo: ").Append(TOriginalRFIDGraphicsInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class RFIDGraphicsInfoResultJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RFIDGraphicsInfoResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option tOriginalRFIDGraphicsInfo = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "TOriginalRFIDGraphicsInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + tOriginalRFIDGraphicsInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!tOriginalRFIDGraphicsInfo.IsSet) + throw new ArgumentException("Property is required for class RFIDGraphicsInfoResult.", nameof(tOriginalRFIDGraphicsInfo)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class RFIDGraphicsInfoResult.", nameof(resultType)); + + if (tOriginalRFIDGraphicsInfo.IsSet && tOriginalRFIDGraphicsInfo.Value == null) + throw new ArgumentNullException(nameof(tOriginalRFIDGraphicsInfo), "Property is not nullable for class RFIDGraphicsInfoResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class RFIDGraphicsInfoResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class RFIDGraphicsInfoResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class RFIDGraphicsInfoResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class RFIDGraphicsInfoResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class RFIDGraphicsInfoResult."); + + return new RFIDGraphicsInfoResult(tOriginalRFIDGraphicsInfo.Value!, bufLength, light, listIdx, pageIdx); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDGraphicsInfoResult rFIDGraphicsInfoResult, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rFIDGraphicsInfoResult, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RFIDGraphicsInfoResult rFIDGraphicsInfoResult, JsonSerializerOptions jsonSerializerOptions) + { + if (rFIDGraphicsInfoResult.TOriginalRFIDGraphicsInfo == null) + throw new ArgumentNullException(nameof(rFIDGraphicsInfoResult.TOriginalRFIDGraphicsInfo), "Property is required for class RFIDGraphicsInfoResult."); + + writer.WritePropertyName("TOriginalRFIDGraphicsInfo"); + JsonSerializer.Serialize(writer, rFIDGraphicsInfoResult.TOriginalRFIDGraphicsInfo, jsonSerializerOptions); + if (rFIDGraphicsInfoResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", rFIDGraphicsInfoResult.BufLengthOption.Value!.Value); + + if (rFIDGraphicsInfoResult.LightOption.IsSet) + writer.WriteNumber("light", rFIDGraphicsInfoResult.LightOption.Value!.Value); + + if (rFIDGraphicsInfoResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", rFIDGraphicsInfoResult.ListIdxOption.Value!.Value); + + if (rFIDGraphicsInfoResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", rFIDGraphicsInfoResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", rFIDGraphicsInfoResult.ResultType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs new file mode 100644 index 0000000..0cb9759 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs @@ -0,0 +1,236 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants that define the type of certificate + /// + /// Enumeration contains a set of constants that define the type of certificate + public enum RFIDPKDResourceType + { + /// + /// Enum CERTIFICATE_PA for value: 0 + /// + CERTIFICATE_PA = 0, + + /// + /// Enum CERTIFICATE_TA for value: 1 + /// + CERTIFICATE_TA = 1, + + /// + /// Enum LDIF for value: 2 + /// + LDIF = 2, + + /// + /// Enum CRL for value: 3 + /// + CRL = 3, + + /// + /// Enum ML for value: 4 + /// + ML = 4, + + /// + /// Enum DEFL for value: 5 + /// + DEFL = 5, + + /// + /// Enum DEVL for value: 6 + /// + DEVL = 6, + + /// + /// Enum BL for value: 7 + /// + BL = 7 + } + + /// + /// Converts to and from the JSON value + /// + public static class RFIDPKDResourceTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RFIDPKDResourceType FromString(string value) + { + if (value.Equals((0).ToString())) + return RFIDPKDResourceType.CERTIFICATE_PA; + + if (value.Equals((1).ToString())) + return RFIDPKDResourceType.CERTIFICATE_TA; + + if (value.Equals((2).ToString())) + return RFIDPKDResourceType.LDIF; + + if (value.Equals((3).ToString())) + return RFIDPKDResourceType.CRL; + + if (value.Equals((4).ToString())) + return RFIDPKDResourceType.ML; + + if (value.Equals((5).ToString())) + return RFIDPKDResourceType.DEFL; + + if (value.Equals((6).ToString())) + return RFIDPKDResourceType.DEVL; + + if (value.Equals((7).ToString())) + return RFIDPKDResourceType.BL; + + throw new NotImplementedException($"Could not convert value to type RFIDPKDResourceType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RFIDPKDResourceType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RFIDPKDResourceType.CERTIFICATE_PA; + + if (value.Equals((1).ToString())) + return RFIDPKDResourceType.CERTIFICATE_TA; + + if (value.Equals((2).ToString())) + return RFIDPKDResourceType.LDIF; + + if (value.Equals((3).ToString())) + return RFIDPKDResourceType.CRL; + + if (value.Equals((4).ToString())) + return RFIDPKDResourceType.ML; + + if (value.Equals((5).ToString())) + return RFIDPKDResourceType.DEFL; + + if (value.Equals((6).ToString())) + return RFIDPKDResourceType.DEVL; + + if (value.Equals((7).ToString())) + return RFIDPKDResourceType.BL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RFIDPKDResourceType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RFIDPKDResourceTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RFIDPKDResourceType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RFIDPKDResourceType? result = rawValue == null + ? null + : RFIDPKDResourceTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RFIDPKDResourceType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDPKDResourceType rFIDPKDResourceType, JsonSerializerOptions options) + { + writer.WriteStringValue(rFIDPKDResourceType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RFIDPKDResourceTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RFIDPKDResourceType from the Json object + /// + /// + /// + /// + /// + public override RFIDPKDResourceType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RFIDPKDResourceType? result = rawValue == null + ? null + : RFIDPKDResourceTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDPKDResourceType? rFIDPKDResourceType, JsonSerializerOptions options) + { + writer.WriteStringValue(rFIDPKDResourceType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs new file mode 100644 index 0000000..1fb6560 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs @@ -0,0 +1,216 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// RFIDTextDataResult + /// + public partial class RFIDTextDataResult : ResultItem, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// docVisualExtendedInfo + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public RFIDTextDataResult(RFIDDocVisualExtendedInfo docVisualExtendedInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + { + DocVisualExtendedInfo = docVisualExtendedInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets DocVisualExtendedInfo + /// + [JsonPropertyName("DocVisualExtendedInfo")] + public RFIDDocVisualExtendedInfo DocVisualExtendedInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RFIDTextDataResult {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" DocVisualExtendedInfo: ").Append(DocVisualExtendedInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class RFIDTextDataResultJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RFIDTextDataResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docVisualExtendedInfo = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocVisualExtendedInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docVisualExtendedInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!docVisualExtendedInfo.IsSet) + throw new ArgumentException("Property is required for class RFIDTextDataResult.", nameof(docVisualExtendedInfo)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class RFIDTextDataResult.", nameof(resultType)); + + if (docVisualExtendedInfo.IsSet && docVisualExtendedInfo.Value == null) + throw new ArgumentNullException(nameof(docVisualExtendedInfo), "Property is not nullable for class RFIDTextDataResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class RFIDTextDataResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class RFIDTextDataResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class RFIDTextDataResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class RFIDTextDataResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class RFIDTextDataResult."); + + return new RFIDTextDataResult(docVisualExtendedInfo.Value!, bufLength, light, listIdx, pageIdx); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RFIDTextDataResult rFIDTextDataResult, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rFIDTextDataResult, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RFIDTextDataResult rFIDTextDataResult, JsonSerializerOptions jsonSerializerOptions) + { + if (rFIDTextDataResult.DocVisualExtendedInfo == null) + throw new ArgumentNullException(nameof(rFIDTextDataResult.DocVisualExtendedInfo), "Property is required for class RFIDTextDataResult."); + + writer.WritePropertyName("DocVisualExtendedInfo"); + JsonSerializer.Serialize(writer, rFIDTextDataResult.DocVisualExtendedInfo, jsonSerializerOptions); + if (rFIDTextDataResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", rFIDTextDataResult.BufLengthOption.Value!.Value); + + if (rFIDTextDataResult.LightOption.IsSet) + writer.WriteNumber("light", rFIDTextDataResult.LightOption.Value!.Value); + + if (rFIDTextDataResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", rFIDTextDataResult.ListIdxOption.Value!.Value); + + if (rFIDTextDataResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", rFIDTextDataResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", rFIDTextDataResult.ResultType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RawDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/RawDataResult.cs deleted file mode 100644 index 09005b0..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/RawDataResult.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// RawDataResult - /// - [DataContract] - public partial class RawDataResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Count of array fields. - /// pArrayFields. - public RawDataResult(int nFields = default(int), List pArrayFields = default(List)) - { - this.NFields = nFields; - this.PArrayFields = pArrayFields; - } - - /// - /// Count of array fields - /// - /// Count of array fields - [DataMember(Name="nFields", EmitDefaultValue=false)] - public int NFields { get; set; } - - /// - /// Gets or Sets PArrayFields - /// - [DataMember(Name="pArrayFields", EmitDefaultValue=false)] - public List PArrayFields { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class RawDataResult {\n"); - sb.Append(" NFields: ").Append(NFields).Append("\n"); - sb.Append(" PArrayFields: ").Append(PArrayFields).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as RawDataResult); - } - - /// - /// Returns true if RawDataResult instances are equal - /// - /// Instance of RawDataResult to be compared - /// Boolean - public bool Equals(RawDataResult input) - { - if (input == null) - return false; - - return - ( - this.NFields == input.NFields || - (this.NFields != null && - this.NFields.Equals(input.NFields)) - ) && - ( - this.PArrayFields == input.PArrayFields || - this.PArrayFields != null && - input.PArrayFields != null && - this.PArrayFields.SequenceEqual(input.PArrayFields) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NFields != null) - hashCode = hashCode * 59 + this.NFields.GetHashCode(); - if (this.PArrayFields != null) - hashCode = hashCode * 59 + this.PArrayFields.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs new file mode 100644 index 0000000..01e7fe9 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// RawImageContainerItem + /// + public partial class RawImageContainerItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// rawImageContainer + [JsonConstructor] + public RawImageContainerItem(ImageData rawImageContainer) + { + RawImageContainer = rawImageContainer; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets RawImageContainer + /// + [JsonPropertyName("RawImageContainer")] + public ImageData RawImageContainer { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RawImageContainerItem {\n"); + sb.Append(" RawImageContainer: ").Append(RawImageContainer).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RawImageContainerItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RawImageContainerItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option rawImageContainer = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RawImageContainer": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rawImageContainer = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!rawImageContainer.IsSet) + throw new ArgumentException("Property is required for class RawImageContainerItem.", nameof(rawImageContainer)); + + if (rawImageContainer.IsSet && rawImageContainer.Value == null) + throw new ArgumentNullException(nameof(rawImageContainer), "Property is not nullable for class RawImageContainerItem."); + + return new RawImageContainerItem(rawImageContainer.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RawImageContainerItem rawImageContainerItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rawImageContainerItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RawImageContainerItem rawImageContainerItem, JsonSerializerOptions jsonSerializerOptions) + { + if (rawImageContainerItem.RawImageContainer == null) + throw new ArgumentNullException(nameof(rawImageContainerItem.RawImageContainer), "Property is required for class RawImageContainerItem."); + + writer.WritePropertyName("RawImageContainer"); + JsonSerializer.Serialize(writer, rawImageContainerItem.RawImageContainer, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs index 37eadba..5fe323d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs @@ -1,56 +1,60 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// RawImageContainerList /// - [DataContract] - public partial class RawImageContainerList : IEquatable, IValidatableObject + public partial class RawImageContainerList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// count. - /// images. - public RawImageContainerList(int count = default(int), List images = default(List)) + /// count + /// images + [JsonConstructor] + public RawImageContainerList(int count, List images) { - this.Count = count; - this.Images = images; + Count = count; + Images = images; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Count /// - [DataMember(Name="Count", EmitDefaultValue=false)] + [JsonPropertyName("Count")] public int Count { get; set; } /// /// Gets or Sets Images /// - [DataMember(Name="Images", EmitDefaultValue=false)] + [JsonPropertyName("Images")] public List Images { get; set; } /// @@ -59,83 +63,125 @@ public partial class RawImageContainerList : IEquatable, /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class RawImageContainerList {\n"); sb.Append(" Count: ").Append(Count).Append("\n"); sb.Append(" Images: ").Append(Images).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as RawImageContainerList); + yield break; } + } + /// + /// A Json converter for type + /// + public class RawImageContainerListJsonConverter : JsonConverter + { /// - /// Returns true if RawImageContainerList instances are equal + /// Deserializes json to /// - /// Instance of RawImageContainerList to be compared - /// Boolean - public bool Equals(RawImageContainerList input) + /// + /// + /// + /// + /// + public override RawImageContainerList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Count == input.Count || - (this.Count != null && - this.Count.Equals(input.Count)) - ) && - ( - this.Images == input.Images || - this.Images != null && - input.Images != null && - this.Images.SequenceEqual(input.Images) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option count = default; + Option?> images = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Count": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + count = new Option(utf8JsonReader.GetInt32()); + break; + case "Images": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + images = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!count.IsSet) + throw new ArgumentException("Property is required for class RawImageContainerList.", nameof(count)); + + if (!images.IsSet) + throw new ArgumentException("Property is required for class RawImageContainerList.", nameof(images)); + + if (count.IsSet && count.Value == null) + throw new ArgumentNullException(nameof(count), "Property is not nullable for class RawImageContainerList."); + + if (images.IsSet && images.Value == null) + throw new ArgumentNullException(nameof(images), "Property is not nullable for class RawImageContainerList."); + + return new RawImageContainerList(count.Value!.Value!, images.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RawImageContainerList rawImageContainerList, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Count != null) - hashCode = hashCode * 59 + this.Count.GetHashCode(); - if (this.Images != null) - hashCode = hashCode * 59 + this.Images.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, rawImageContainerList, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RawImageContainerList rawImageContainerList, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (rawImageContainerList.Images == null) + throw new ArgumentNullException(nameof(rawImageContainerList.Images), "Property is required for class RawImageContainerList."); + + writer.WriteNumber("Count", rawImageContainerList.Count); + + writer.WritePropertyName("Images"); + JsonSerializer.Serialize(writer, rawImageContainerList.Images, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/RawResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/RawResultItem.cs deleted file mode 100644 index 8b4d701..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/RawResultItem.cs +++ /dev/null @@ -1,99 +0,0 @@ -using System; -using System.Collections; -using System.Collections.Generic; -using System.Text.Json; -using RestSharp; - -namespace Regula.DocumentReader.WebClient.Model -{ - public class RawResultItem : ResultItem, IDictionary - { - private readonly Dictionary _members; - - public RawResultItem() - { - _members = new Dictionary(); - } - - public void Add(string key, object value) - { - _members.Add(key, value); - } - - public bool ContainsKey(string key) - { - return _members.ContainsKey(key); - } - - public ICollection Keys => _members.Keys; - - public bool Remove(string key) - { - return _members.Remove(key); - } - - public bool TryGetValue(string key, out object value) - { - return _members.TryGetValue(key, out value); - } - - public ICollection Values => _members.Values; - - public object this[string key] - { - get => _members[key]; - set => _members[key] = value; - } - - public void Add(KeyValuePair item) - { - _members.Add(item.Key, item.Value); - } - - public void Clear() - { - _members.Clear(); - } - - public bool Contains(KeyValuePair item) - { - return _members.TryGetValue(item.Key, out object value) && value == item.Value; - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - if (array == null) throw new ArgumentNullException(nameof(array)); - - int num = Count; - foreach (var kvp in this) - { - array[arrayIndex++] = kvp; - if (--num <= 0) return; - } - } - - public int Count => _members.Count; - - public bool IsReadOnly => false; - - public bool Remove(KeyValuePair item) - { - return _members.Remove(item.Key); - } - - public IEnumerator> GetEnumerator() - { - return _members.GetEnumerator(); - } - - IEnumerator IEnumerable.GetEnumerator() - { - return _members.GetEnumerator(); - } - - public override string ToString() - { - return JsonSerializer.Serialize(this); - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs index 43adbd9..f68eec0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs @@ -1,113 +1,76 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Coordinates of the rectangle region on a document image(result type 1). Represented by two points - (left, top) + (right, bottom) /// - [DataContract] - public partial class RectangleCoordinates : IEquatable, IValidatableObject + public partial class RectangleCoordinates : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected RectangleCoordinates() { } - /// - /// Initializes a new instance of the class. - /// - /// left (required). - /// top (required). - /// right (required). - /// bottom (required). - public RectangleCoordinates(int left = default(int), int top = default(int), int right = default(int), int bottom = default(int)) + /// left + /// top + /// right + /// bottom + [JsonConstructor] + public RectangleCoordinates(int left, int top, int right, int bottom) { - // to ensure "left" is required (not null) - if (left == null) - { - throw new InvalidDataException("left is a required property for RectangleCoordinates and cannot be null"); - } - else - { - this.Left = left; - } - - // to ensure "top" is required (not null) - if (top == null) - { - throw new InvalidDataException("top is a required property for RectangleCoordinates and cannot be null"); - } - else - { - this.Top = top; - } - - // to ensure "right" is required (not null) - if (right == null) - { - throw new InvalidDataException("right is a required property for RectangleCoordinates and cannot be null"); - } - else - { - this.Right = right; - } - - // to ensure "bottom" is required (not null) - if (bottom == null) - { - throw new InvalidDataException("bottom is a required property for RectangleCoordinates and cannot be null"); - } - else - { - this.Bottom = bottom; - } - + Left = left; + Top = top; + Right = right; + Bottom = bottom; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Left /// - [DataMember(Name="left", EmitDefaultValue=true)] + [JsonPropertyName("left")] public int Left { get; set; } /// /// Gets or Sets Top /// - [DataMember(Name="top", EmitDefaultValue=true)] + [JsonPropertyName("top")] public int Top { get; set; } /// /// Gets or Sets Right /// - [DataMember(Name="right", EmitDefaultValue=true)] + [JsonPropertyName("right")] public int Right { get; set; } /// /// Gets or Sets Bottom /// - [DataMember(Name="bottom", EmitDefaultValue=true)] + [JsonPropertyName("bottom")] public int Bottom { get; set; } /// @@ -116,7 +79,7 @@ protected RectangleCoordinates() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class RectangleCoordinates {\n"); sb.Append(" Left: ").Append(Left).Append("\n"); sb.Append(" Top: ").Append(Top).Append("\n"); @@ -125,89 +88,140 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as RectangleCoordinates); + yield break; } + } + /// + /// A Json converter for type + /// + public class RectangleCoordinatesJsonConverter : JsonConverter + { /// - /// Returns true if RectangleCoordinates instances are equal + /// Deserializes json to /// - /// Instance of RectangleCoordinates to be compared - /// Boolean - public bool Equals(RectangleCoordinates input) + /// + /// + /// + /// + /// + public override RectangleCoordinates Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Left == input.Left || - (this.Left != null && - this.Left.Equals(input.Left)) - ) && - ( - this.Top == input.Top || - (this.Top != null && - this.Top.Equals(input.Top)) - ) && - ( - this.Right == input.Right || - (this.Right != null && - this.Right.Equals(input.Right)) - ) && - ( - this.Bottom == input.Bottom || - (this.Bottom != null && - this.Bottom.Equals(input.Bottom)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option left = default; + Option top = default; + Option right = default; + Option bottom = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "left": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + left = new Option(utf8JsonReader.GetInt32()); + break; + case "top": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + top = new Option(utf8JsonReader.GetInt32()); + break; + case "right": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + right = new Option(utf8JsonReader.GetInt32()); + break; + case "bottom": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bottom = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!left.IsSet) + throw new ArgumentException("Property is required for class RectangleCoordinates.", nameof(left)); + + if (!top.IsSet) + throw new ArgumentException("Property is required for class RectangleCoordinates.", nameof(top)); + + if (!right.IsSet) + throw new ArgumentException("Property is required for class RectangleCoordinates.", nameof(right)); + + if (!bottom.IsSet) + throw new ArgumentException("Property is required for class RectangleCoordinates.", nameof(bottom)); + + if (left.IsSet && left.Value == null) + throw new ArgumentNullException(nameof(left), "Property is not nullable for class RectangleCoordinates."); + + if (top.IsSet && top.Value == null) + throw new ArgumentNullException(nameof(top), "Property is not nullable for class RectangleCoordinates."); + + if (right.IsSet && right.Value == null) + throw new ArgumentNullException(nameof(right), "Property is not nullable for class RectangleCoordinates."); + + if (bottom.IsSet && bottom.Value == null) + throw new ArgumentNullException(nameof(bottom), "Property is not nullable for class RectangleCoordinates."); + + return new RectangleCoordinates(left.Value!.Value!, top.Value!.Value!, right.Value!.Value!, bottom.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RectangleCoordinates rectangleCoordinates, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Left != null) - hashCode = hashCode * 59 + this.Left.GetHashCode(); - if (this.Top != null) - hashCode = hashCode * 59 + this.Top.GetHashCode(); - if (this.Right != null) - hashCode = hashCode * 59 + this.Right.GetHashCode(); - if (this.Bottom != null) - hashCode = hashCode * 59 + this.Bottom.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, rectangleCoordinates, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RectangleCoordinates rectangleCoordinates, JsonSerializerOptions jsonSerializerOptions) { - yield break; + writer.WriteNumber("left", rectangleCoordinates.Left); + + writer.WriteNumber("top", rectangleCoordinates.Top); + + writer.WriteNumber("right", rectangleCoordinates.Right); + + writer.WriteNumber("bottom", rectangleCoordinates.Bottom); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/Result.cs b/src/Regula.DocumentReader.WebClient/Model/Result.cs index cb06dcf..cd324cb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Result.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Result.cs @@ -1,95 +1,543 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - /// Describes possible extracted result types from documents - public class Result + /// + /// Defines Result + /// + public enum Result + { + /// + /// Enum DOCUMENT_IMAGE for value: 1 + /// + DOCUMENT_IMAGE = 1, + + /// + /// Enum MRZ_TEXT for value: 3 + /// + MRZ_TEXT = 3, + + /// + /// Enum BARCODES for value: 5 + /// + BARCODES = 5, + + /// + /// Enum VISUAL_GRAPHICS for value: 6 + /// + VISUAL_GRAPHICS = 6, + + /// + /// Enum MRZ_TEST_QUALITY for value: 7 + /// + MRZ_TEST_QUALITY = 7, + + /// + /// Enum DOCUMENT_TYPE_CANDIDATES for value: 8 + /// + DOCUMENT_TYPE_CANDIDATES = 8, + + /// + /// Enum DOCUMENT_TYPE for value: 9 + /// + DOCUMENT_TYPE = 9, + + /// + /// Enum LEXICAL_ANALYSIS for value: 15 + /// + LEXICAL_ANALYSIS = 15, + + /// + /// Enum RAW_UNCROPPED_IMAGE for value: 16 + /// + RAW_UNCROPPED_IMAGE = 16, + + /// + /// Enum VISUAL_TEXT for value: 17 + /// + VISUAL_TEXT = 17, + + /// + /// Enum BARCODE_TEXT for value: 18 + /// + BARCODE_TEXT = 18, + + /// + /// Enum BARCODE_GRAPHICS for value: 19 + /// + BARCODE_GRAPHICS = 19, + + /// + /// Enum AUTHENTICITY for value: 20 + /// + AUTHENTICITY = 20, + + /// + /// Enum MAGNETIC_STRIPE_TEXT_DATA for value: 26 + /// + MAGNETIC_STRIPE_TEXT_DATA = 26, + + /// + /// Enum IMAGE_QUALITY for value: 30 + /// + IMAGE_QUALITY = 30, + + /// + /// Enum LIVE_PORTRAIT for value: 32 + /// + LIVE_PORTRAIT = 32, + + /// + /// Enum STATUS for value: 33 + /// + STATUS = 33, + + /// + /// Enum PORTRAIT_COMPARISON for value: 34 + /// + PORTRAIT_COMPARISON = 34, + + /// + /// Enum EXT_PORTRAIT for value: 35 + /// + EXT_PORTRAIT = 35, + + /// + /// Enum TEXT for value: 36 + /// + TEXT = 36, + + /// + /// Enum IMAGES for value: 37 + /// + IMAGES = 37, + + /// + /// Enum FINGERPRINTS for value: 38 + /// + FINGERPRINTS = 38, + + /// + /// Enum FINGERPRINT_COMPARISON for value: 39 + /// + FINGERPRINT_COMPARISON = 39, + + /// + /// Enum ENCRYPTED_RCL for value: 49 + /// + ENCRYPTED_RCL = 49, + + /// + /// Enum LICENSE for value: 50 + /// + LICENSE = 50, + + /// + /// Enum MRZ_POSITION for value: 61 + /// + MRZ_POSITION = 61, + + /// + /// Enum BARCODE_POSITION for value: 62 + /// + BARCODE_POSITION = 62, + + /// + /// Enum DOCUMENT_POSITION for value: 85 + /// + DOCUMENT_POSITION = 85, + + /// + /// Enum MRZ_DETECTOR for value: 87 + /// + MRZ_DETECTOR = 87, + + /// + /// Enum FACE_DETECTION for value: 97 + /// + FACE_DETECTION = 97, + + /// + /// Enum RFID_RAW_DATA for value: 101 + /// + RFID_RAW_DATA = 101, + + /// + /// Enum RFID_TEXT for value: 102 + /// + RFID_TEXT = 102, + + /// + /// Enum RFID_GRAPHICS for value: 103 + /// + RFID_GRAPHICS = 103, + + /// + /// Enum RFID_BINARY_DATA for value: 104 + /// + RFID_BINARY_DATA = 104, + + /// + /// Enum RFID_ORIGINAL_GRAPHICS for value: 105 + /// + RFID_ORIGINAL_GRAPHICS = 105, + + /// + /// Enum DTC_VC for value: 109 + /// + DTC_VC = 109 + } + + /// + /// Converts to and from the JSON value + /// + public static class ResultValueConverter { + /// + /// Parses a given value to + /// + /// + /// + public static Result FromString(string value) + { + if (value.Equals((1).ToString())) + return Result.DOCUMENT_IMAGE; + + if (value.Equals((3).ToString())) + return Result.MRZ_TEXT; + + if (value.Equals((5).ToString())) + return Result.BARCODES; + + if (value.Equals((6).ToString())) + return Result.VISUAL_GRAPHICS; + + if (value.Equals((7).ToString())) + return Result.MRZ_TEST_QUALITY; + + if (value.Equals((8).ToString())) + return Result.DOCUMENT_TYPE_CANDIDATES; + + if (value.Equals((9).ToString())) + return Result.DOCUMENT_TYPE; + + if (value.Equals((15).ToString())) + return Result.LEXICAL_ANALYSIS; + + if (value.Equals((16).ToString())) + return Result.RAW_UNCROPPED_IMAGE; + + if (value.Equals((17).ToString())) + return Result.VISUAL_TEXT; + + if (value.Equals((18).ToString())) + return Result.BARCODE_TEXT; + + if (value.Equals((19).ToString())) + return Result.BARCODE_GRAPHICS; - /** Contains cropped and rotated with perspective compensation image of document. Single input image can contain multiple document side/pages, which will be returned as separated results. Most of coordinates in other types defined on that image */ - public const int DOCUMENT_IMAGE = 1; + if (value.Equals((20).ToString())) + return Result.AUTHENTICITY; - /** Contains image quality check results */ - public const int IMAGE_QUALITY = 30; + if (value.Equals((26).ToString())) + return Result.MAGNETIC_STRIPE_TEXT_DATA; - /** Contains check statuses with details, grouped by source */ - public const int STATUS = 33; + if (value.Equals((30).ToString())) + return Result.IMAGE_QUALITY; - /** Contains document textual fields from all sources (mrz, rfid, visual, barcode) with validity and cross-source compare checks */ - public const int TEXT = 36; + if (value.Equals((32).ToString())) + return Result.LIVE_PORTRAIT; - /** Contains images from all document sources (mrz, rfid, visual, barcode) */ - public const int IMAGES = 37; + if (value.Equals((33).ToString())) + return Result.STATUS; - /** Contains MRZ OCR results */ - public const int MRZ_TEXT = 3; + if (value.Equals((34).ToString())) + return Result.PORTRAIT_COMPARISON; - /** Contains Visual zone OCR results */ - public const int VISUAL_TEXT = 17; + if (value.Equals((35).ToString())) + return Result.EXT_PORTRAIT; - /** Contains barcode parsing result with text fields */ - public const int BARCODE_TEXT = 18; + if (value.Equals((36).ToString())) + return Result.TEXT; - /** Contains RFID parsing result with text fields */ - public const int RFID_TEXT = 102; + if (value.Equals((37).ToString())) + return Result.IMAGES; - /** Contains lexical data analysis results that allow you to compare MRZ OCR results, Visual zone OCR results, barcodes and RFID chip data for an additional assessment of the authenticity of the document (this is an old format, better use TEXT type) */ - public const int LEXICAL_ANALYSIS = 15; + if (value.Equals((38).ToString())) + return Result.FINGERPRINTS; - /** Contains cropped graphic fields from Visual zone */ - public const int VISUAL_GRAPHICS = 6; + if (value.Equals((39).ToString())) + return Result.FINGERPRINT_COMPARISON; - /** Contains barcode parsing result with graphic fields */ - public const int BARCODE_GRAPHICS = 19; + if (value.Equals((49).ToString())) + return Result.ENCRYPTED_RCL; - /** Contains RFID parsing result with graphic fields */ - public const int RFID_GRAPHICS = 103; + if (value.Equals((50).ToString())) + return Result.LICENSE; - /** Contains list of document type candidates with their probabilities and descriptions */ - public const int DOCUMENT_TYPE_CANDIDATES = 8; + if (value.Equals((61).ToString())) + return Result.MRZ_POSITION; - /** Contains description of determined document type, if any */ - public const int DOCUMENT_TYPE = 9; + if (value.Equals((62).ToString())) + return Result.BARCODE_POSITION; - /** Contains result of document authenticity checks */ - public const int AUTHENTICITY = 20; + if (value.Equals((85).ToString())) + return Result.DOCUMENT_POSITION; - /** Contains information about document position on the input image, its center, angle, etc */ - public const int DOCUMENT_POSITION = 85; + if (value.Equals((87).ToString())) + return Result.MRZ_DETECTOR; - /** Contains raw information about barcodes on the input image */ - public const int BARCODES = 5; + if (value.Equals((97).ToString())) + return Result.FACE_DETECTION; + + if (value.Equals((101).ToString())) + return Result.RFID_RAW_DATA; + + if (value.Equals((102).ToString())) + return Result.RFID_TEXT; + + if (value.Equals((103).ToString())) + return Result.RFID_GRAPHICS; + + if (value.Equals((104).ToString())) + return Result.RFID_BINARY_DATA; + + if (value.Equals((105).ToString())) + return Result.RFID_ORIGINAL_GRAPHICS; + + if (value.Equals((109).ToString())) + return Result.DTC_VC; + + throw new NotImplementedException($"Could not convert value to type Result: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static Result? FromStringOrDefault(string value) + { + if (value.Equals((1).ToString())) + return Result.DOCUMENT_IMAGE; + + if (value.Equals((3).ToString())) + return Result.MRZ_TEXT; + + if (value.Equals((5).ToString())) + return Result.BARCODES; + + if (value.Equals((6).ToString())) + return Result.VISUAL_GRAPHICS; + + if (value.Equals((7).ToString())) + return Result.MRZ_TEST_QUALITY; + + if (value.Equals((8).ToString())) + return Result.DOCUMENT_TYPE_CANDIDATES; + + if (value.Equals((9).ToString())) + return Result.DOCUMENT_TYPE; + + if (value.Equals((15).ToString())) + return Result.LEXICAL_ANALYSIS; + + if (value.Equals((16).ToString())) + return Result.RAW_UNCROPPED_IMAGE; + + if (value.Equals((17).ToString())) + return Result.VISUAL_TEXT; + + if (value.Equals((18).ToString())) + return Result.BARCODE_TEXT; + + if (value.Equals((19).ToString())) + return Result.BARCODE_GRAPHICS; + + if (value.Equals((20).ToString())) + return Result.AUTHENTICITY; + + if (value.Equals((26).ToString())) + return Result.MAGNETIC_STRIPE_TEXT_DATA; + + if (value.Equals((30).ToString())) + return Result.IMAGE_QUALITY; + + if (value.Equals((32).ToString())) + return Result.LIVE_PORTRAIT; + + if (value.Equals((33).ToString())) + return Result.STATUS; + + if (value.Equals((34).ToString())) + return Result.PORTRAIT_COMPARISON; + + if (value.Equals((35).ToString())) + return Result.EXT_PORTRAIT; + + if (value.Equals((36).ToString())) + return Result.TEXT; + + if (value.Equals((37).ToString())) + return Result.IMAGES; + + if (value.Equals((38).ToString())) + return Result.FINGERPRINTS; + + if (value.Equals((39).ToString())) + return Result.FINGERPRINT_COMPARISON; + + if (value.Equals((49).ToString())) + return Result.ENCRYPTED_RCL; + + if (value.Equals((50).ToString())) + return Result.LICENSE; + + if (value.Equals((61).ToString())) + return Result.MRZ_POSITION; + + if (value.Equals((62).ToString())) + return Result.BARCODE_POSITION; + + if (value.Equals((85).ToString())) + return Result.DOCUMENT_POSITION; + + if (value.Equals((87).ToString())) + return Result.MRZ_DETECTOR; + + if (value.Equals((97).ToString())) + return Result.FACE_DETECTION; + + if (value.Equals((101).ToString())) + return Result.RFID_RAW_DATA; + + if (value.Equals((102).ToString())) + return Result.RFID_TEXT; + + if (value.Equals((103).ToString())) + return Result.RFID_GRAPHICS; + + if (value.Equals((104).ToString())) + return Result.RFID_BINARY_DATA; + + if (value.Equals((105).ToString())) + return Result.RFID_ORIGINAL_GRAPHICS; + + if (value.Equals((109).ToString())) + return Result.DTC_VC; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(Result value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class ResultJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override Result Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + Result? result = rawValue == null + ? null + : ResultValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the Result to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Result result, JsonSerializerOptions options) + { + writer.WriteStringValue(result.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class ResultNullableJsonConverter : JsonConverter + { + /// + /// Returns a Result from the Json object + /// + /// + /// + /// + /// + public override Result? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** Contains license */ - public const int LICENSE = 50; + Result? result = rawValue == null + ? null + : ResultValueConverter.FromStringOrDefault(rawValue); - /** Contains encrypted ResultContainerList */ - public const int ENCRYPTED_RCL = 49; + if (result != null) + return result.Value; - /* Contains information about portrait comparison */ - public const int PORTRAIT_COMPARISON = 34; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Result? result, JsonSerializerOptions options) + { + writer.WriteStringValue(result?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs index 340ed40..832a8ab 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs @@ -1,113 +1,113 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using JsonSubTypes; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Common fields for all result objects /// - [DataContract] - [JsonConverter(typeof(JsonSubtypes), "result_type")] - [JsonSubtypes.KnownSubType(typeof(ImagesResult), Result.IMAGES)] - [JsonSubtypes.KnownSubType(typeof(ImageQualityResult), Result.IMAGE_QUALITY)] - [JsonSubtypes.KnownSubType(typeof(LexicalAnalysisResult), Result.LEXICAL_ANALYSIS)] - [JsonSubtypes.KnownSubType(typeof(DocumentImageResult), Result.DOCUMENT_IMAGE)] - [JsonSubtypes.KnownSubType(typeof(TextDataResult), Result.VISUAL_TEXT)] - [JsonSubtypes.KnownSubType(typeof(DocumentTypesCandidatesResult), Result.DOCUMENT_TYPE_CANDIDATES)] - [JsonSubtypes.KnownSubType(typeof(StatusResult), Result.STATUS)] - [JsonSubtypes.KnownSubType(typeof(ChosenDocumentTypeResult), Result.DOCUMENT_TYPE)] - [JsonSubtypes.KnownSubType(typeof(TextResult), Result.TEXT)] - [JsonSubtypes.KnownSubType(typeof(GraphicsResult), Result.VISUAL_GRAPHICS)] - [JsonSubtypes.KnownSubType(typeof(AuthenticityResult), Result.AUTHENTICITY)] - [JsonSubtypes.KnownSubType(typeof(LicenseResult), Result.LICENSE)] - [JsonSubtypes.KnownSubType(typeof(EncryptedRCLResult), Result.ENCRYPTED_RCL)] - [JsonSubtypes.KnownSubType(typeof(AuthenticityResult), Result.PORTRAIT_COMPARISON)] - [JsonSubtypes.FallBackSubType(typeof(RawResultItem))] - public partial class ResultItem : IEquatable, IValidatableObject + public partial class ResultItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected ResultItem() { } - /// - /// Initializes a new instance of the class. - /// - /// bufLength. - /// light. - /// listIdx. - /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public ResultItem(int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public ResultItem(Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) { - // to ensure "resultType" is required (not null) - if (resultType == null) - { - throw new InvalidDataException("resultType is a required property for ResultItem and cannot be null"); - } - else - { - this.ResultType = resultType; - } - - this.BufLength = bufLength; - this.Light = light; - this.ListIdx = listIdx; - this.PageIdx = pageIdx; + BufLengthOption = bufLength; + LightOption = light; + ListIdxOption = listIdx; + PageIdxOption = pageIdx; + ResultType = this.GetType().Name; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of BufLength + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BufLengthOption { get; private set; } + /// /// Gets or Sets BufLength /// - [DataMember(Name="buf_length", EmitDefaultValue=false)] - public int BufLength { get; set; } + [JsonPropertyName("buf_length")] + public int? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new(value); } } + + /// + /// Used to track the state of Light + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LightOption { get; private set; } /// /// Gets or Sets Light /// - [DataMember(Name="light", EmitDefaultValue=false)] - public int Light { get; set; } + [JsonPropertyName("light")] + public int? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } + + /// + /// Used to track the state of ListIdx + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ListIdxOption { get; private set; } /// /// Gets or Sets ListIdx /// - [DataMember(Name="list_idx", EmitDefaultValue=false)] - public int ListIdx { get; set; } + [JsonPropertyName("list_idx")] + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } + + /// + /// Used to track the state of PageIdx + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PageIdxOption { get; private set; } /// /// Gets or Sets PageIdx /// - [DataMember(Name="page_idx", EmitDefaultValue=false)] - public int PageIdx { get; set; } + [JsonPropertyName("page_idx")] + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } /// - /// Same as Result type, but used for safe parsing of not-described values. See Result type. + /// The discriminator /// - /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [DataMember(Name="result_type", EmitDefaultValue=true)] - public int ResultType { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public int ResultType { get; } /// /// Returns the string presentation of the object @@ -115,116 +115,350 @@ protected ResultItem() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class ResultItem {\n"); sb.Append(" BufLength: ").Append(BufLength).Append("\n"); sb.Append(" Light: ").Append(Light).Append("\n"); sb.Append(" ListIdx: ").Append(ListIdx).Append("\n"); sb.Append(" PageIdx: ").Append(PageIdx).Append("\n"); - sb.Append(" ResultType: ").Append(ResultType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as ResultItem); + return this.BaseValidate(validationContext); } /// - /// Returns true if ResultItem instances are equal + /// To validate all properties of the instance /// - /// Instance of ResultItem to be compared - /// Boolean - public bool Equals(ResultItem input) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (input == null) - return false; - - return - ( - this.BufLength == input.BufLength || - (this.BufLength != null && - this.BufLength.Equals(input.BufLength)) - ) && - ( - this.Light == input.Light || - (this.Light != null && - this.Light.Equals(input.Light)) - ) && - ( - this.ListIdx == input.ListIdx || - (this.ListIdx != null && - this.ListIdx.Equals(input.ListIdx)) - ) && - ( - this.PageIdx == input.PageIdx || - (this.PageIdx != null && - this.PageIdx.Equals(input.PageIdx)) - ) && - ( - this.ResultType == input.ResultType || - (this.ResultType != null && - this.ResultType.Equals(input.ResultType)) - ); + yield break; } + } + /// + /// A Json converter for type + /// + public class ResultItemJsonConverter : JsonConverter + { /// - /// Gets the hash code + /// Deserializes json to /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + /// + public override ResultItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + string? discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "result_type"); + + if (discriminator != null && discriminator.Equals("AuthenticityResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("ByteArrayResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("ChosenDocumentTypeResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("DocBarCodeInfo")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("DocumentBinaryInfoResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("DocumentImageResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("DocumentPositionResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("DocumentTypesCandidatesResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("EncryptedRCLResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("FaceDetectionResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("GraphicsResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("ImageQualityResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("ImagesResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("LexicalAnalysisResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("LicenseResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("MRZDetectorResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("MRZPositionResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("MRZTestQualityResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("RFIDGraphicsInfoResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("RFIDTextDataResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("StatusResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("TextDataResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + if (discriminator != null && discriminator.Equals("TextResult")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + + while (utf8JsonReader.Read()) { - int hashCode = 41; - if (this.BufLength != null) - hashCode = hashCode * 59 + this.BufLength.GetHashCode(); - if (this.Light != null) - hashCode = hashCode * 59 + this.Light.GetHashCode(); - if (this.ListIdx != null) - hashCode = hashCode * 59 + this.ListIdx.GetHashCode(); - if (this.PageIdx != null) - hashCode = hashCode * 59 + this.PageIdx.GetHashCode(); - if (this.ResultType != null) - hashCode = hashCode * 59 + this.ResultType.GetHashCode(); - return hashCode; + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } } + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class ResultItem.", nameof(resultType)); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ResultItem."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class ResultItem."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ResultItem."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ResultItem."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ResultItem."); + + return new ResultItem(bufLength, light, listIdx, pageIdx); } /// - /// To validate all properties of the instance + /// Serializes a /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ResultItem resultItem, JsonSerializerOptions jsonSerializerOptions) { - return this.BaseValidate(validationContext); + if (resultItem is AuthenticityResult authenticityResult){ + JsonSerializer.Serialize(writer, authenticityResult, jsonSerializerOptions); + return; + } + + if (resultItem is ByteArrayResult byteArrayResult){ + JsonSerializer.Serialize(writer, byteArrayResult, jsonSerializerOptions); + return; + } + + if (resultItem is ChosenDocumentTypeResult chosenDocumentTypeResult){ + JsonSerializer.Serialize(writer, chosenDocumentTypeResult, jsonSerializerOptions); + return; + } + + if (resultItem is DocBarCodeInfo docBarCodeInfo){ + JsonSerializer.Serialize(writer, docBarCodeInfo, jsonSerializerOptions); + return; + } + + if (resultItem is DocumentBinaryInfoResult documentBinaryInfoResult){ + JsonSerializer.Serialize(writer, documentBinaryInfoResult, jsonSerializerOptions); + return; + } + + if (resultItem is DocumentImageResult documentImageResult){ + JsonSerializer.Serialize(writer, documentImageResult, jsonSerializerOptions); + return; + } + + if (resultItem is DocumentPositionResult documentPositionResult){ + JsonSerializer.Serialize(writer, documentPositionResult, jsonSerializerOptions); + return; + } + + if (resultItem is DocumentTypesCandidatesResult documentTypesCandidatesResult){ + JsonSerializer.Serialize(writer, documentTypesCandidatesResult, jsonSerializerOptions); + return; + } + + if (resultItem is EncryptedRCLResult encryptedRCLResult){ + JsonSerializer.Serialize(writer, encryptedRCLResult, jsonSerializerOptions); + return; + } + + if (resultItem is FaceDetectionResult faceDetectionResult){ + JsonSerializer.Serialize(writer, faceDetectionResult, jsonSerializerOptions); + return; + } + + if (resultItem is GraphicsResult graphicsResult){ + JsonSerializer.Serialize(writer, graphicsResult, jsonSerializerOptions); + return; + } + + if (resultItem is ImageQualityResult imageQualityResult){ + JsonSerializer.Serialize(writer, imageQualityResult, jsonSerializerOptions); + return; + } + + if (resultItem is ImagesResult imagesResult){ + JsonSerializer.Serialize(writer, imagesResult, jsonSerializerOptions); + return; + } + + if (resultItem is LexicalAnalysisResult lexicalAnalysisResult){ + JsonSerializer.Serialize(writer, lexicalAnalysisResult, jsonSerializerOptions); + return; + } + + if (resultItem is LicenseResult licenseResult){ + JsonSerializer.Serialize(writer, licenseResult, jsonSerializerOptions); + return; + } + + if (resultItem is MRZDetectorResult mRZDetectorResult){ + JsonSerializer.Serialize(writer, mRZDetectorResult, jsonSerializerOptions); + return; + } + + if (resultItem is MRZPositionResult mRZPositionResult){ + JsonSerializer.Serialize(writer, mRZPositionResult, jsonSerializerOptions); + return; + } + + if (resultItem is MRZTestQualityResult mRZTestQualityResult){ + JsonSerializer.Serialize(writer, mRZTestQualityResult, jsonSerializerOptions); + return; + } + + if (resultItem is RFIDGraphicsInfoResult rFIDGraphicsInfoResult){ + JsonSerializer.Serialize(writer, rFIDGraphicsInfoResult, jsonSerializerOptions); + return; + } + + if (resultItem is RFIDTextDataResult rFIDTextDataResult){ + JsonSerializer.Serialize(writer, rFIDTextDataResult, jsonSerializerOptions); + return; + } + + if (resultItem is StatusResult statusResult){ + JsonSerializer.Serialize(writer, statusResult, jsonSerializerOptions); + return; + } + + if (resultItem is TextDataResult textDataResult){ + JsonSerializer.Serialize(writer, textDataResult, jsonSerializerOptions); + return; + } + + if (resultItem is TextResult textResult){ + JsonSerializer.Serialize(writer, textResult, jsonSerializerOptions); + return; + } + + writer.WriteStartObject(); + + WriteProperties(writer, resultItem, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ResultItem resultItem, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (resultItem.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", resultItem.BufLengthOption.Value!.Value); + + if (resultItem.LightOption.IsSet) + writer.WriteNumber("light", resultItem.LightOption.Value!.Value); + + if (resultItem.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", resultItem.ListIdxOption.Value!.Value); + + if (resultItem.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", resultItem.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", resultItem.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs new file mode 100644 index 0000000..af98515 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs @@ -0,0 +1,234 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ResultMRZDetector + /// + public partial class ResultMRZDetector : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// mRZFormat + /// mRZRows + /// mRZRowsNum + /// boundingQuadrangle + [JsonConstructor] + public ResultMRZDetector(int mRZFormat, List mRZRows, int mRZRowsNum, List boundingQuadrangle) + { + MRZFormat = mRZFormat; + MRZRows = mRZRows; + MRZRowsNum = mRZRowsNum; + BoundingQuadrangle = boundingQuadrangle; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets MRZFormat + /// + [JsonPropertyName("MRZFormat")] + public int MRZFormat { get; set; } + + /// + /// Gets or Sets MRZRows + /// + [JsonPropertyName("MRZRows")] + public List MRZRows { get; set; } + + /// + /// Gets or Sets MRZRowsNum + /// + [JsonPropertyName("MRZRowsNum")] + public int MRZRowsNum { get; set; } + + /// + /// Gets or Sets BoundingQuadrangle + /// + [JsonPropertyName("boundingQuadrangle")] + public List BoundingQuadrangle { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ResultMRZDetector {\n"); + sb.Append(" MRZFormat: ").Append(MRZFormat).Append("\n"); + sb.Append(" MRZRows: ").Append(MRZRows).Append("\n"); + sb.Append(" MRZRowsNum: ").Append(MRZRowsNum).Append("\n"); + sb.Append(" BoundingQuadrangle: ").Append(BoundingQuadrangle).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ResultMRZDetectorJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ResultMRZDetector Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option mRZFormat = default; + Option?> mRZRows = default; + Option mRZRowsNum = default; + Option?> boundingQuadrangle = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "MRZFormat": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mRZFormat = new Option(utf8JsonReader.GetInt32()); + break; + case "MRZRows": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mRZRows = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "MRZRowsNum": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mRZRowsNum = new Option(utf8JsonReader.GetInt32()); + break; + case "boundingQuadrangle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + boundingQuadrangle = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!mRZFormat.IsSet) + throw new ArgumentException("Property is required for class ResultMRZDetector.", nameof(mRZFormat)); + + if (!mRZRows.IsSet) + throw new ArgumentException("Property is required for class ResultMRZDetector.", nameof(mRZRows)); + + if (!mRZRowsNum.IsSet) + throw new ArgumentException("Property is required for class ResultMRZDetector.", nameof(mRZRowsNum)); + + if (!boundingQuadrangle.IsSet) + throw new ArgumentException("Property is required for class ResultMRZDetector.", nameof(boundingQuadrangle)); + + if (mRZFormat.IsSet && mRZFormat.Value == null) + throw new ArgumentNullException(nameof(mRZFormat), "Property is not nullable for class ResultMRZDetector."); + + if (mRZRows.IsSet && mRZRows.Value == null) + throw new ArgumentNullException(nameof(mRZRows), "Property is not nullable for class ResultMRZDetector."); + + if (mRZRowsNum.IsSet && mRZRowsNum.Value == null) + throw new ArgumentNullException(nameof(mRZRowsNum), "Property is not nullable for class ResultMRZDetector."); + + if (boundingQuadrangle.IsSet && boundingQuadrangle.Value == null) + throw new ArgumentNullException(nameof(boundingQuadrangle), "Property is not nullable for class ResultMRZDetector."); + + return new ResultMRZDetector(mRZFormat.Value!.Value!, mRZRows.Value!, mRZRowsNum.Value!.Value!, boundingQuadrangle.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ResultMRZDetector resultMRZDetector, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, resultMRZDetector, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ResultMRZDetector resultMRZDetector, JsonSerializerOptions jsonSerializerOptions) + { + if (resultMRZDetector.MRZRows == null) + throw new ArgumentNullException(nameof(resultMRZDetector.MRZRows), "Property is required for class ResultMRZDetector."); + + if (resultMRZDetector.BoundingQuadrangle == null) + throw new ArgumentNullException(nameof(resultMRZDetector.BoundingQuadrangle), "Property is required for class ResultMRZDetector."); + + writer.WriteNumber("MRZFormat", resultMRZDetector.MRZFormat); + + writer.WritePropertyName("MRZRows"); + JsonSerializer.Serialize(writer, resultMRZDetector.MRZRows, jsonSerializerOptions); + writer.WriteNumber("MRZRowsNum", resultMRZDetector.MRZRowsNum); + + writer.WritePropertyName("boundingQuadrangle"); + JsonSerializer.Serialize(writer, resultMRZDetector.BoundingQuadrangle, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs new file mode 100644 index 0000000..2c2a489 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ResultMRZDetectorItem + /// + public partial class ResultMRZDetectorItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// resultMRZDetector + [JsonConstructor] + public ResultMRZDetectorItem(ResultMRZDetector resultMRZDetector) + { + ResultMRZDetector = resultMRZDetector; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ResultMRZDetector + /// + [JsonPropertyName("ResultMRZDetector")] + public ResultMRZDetector ResultMRZDetector { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ResultMRZDetectorItem {\n"); + sb.Append(" ResultMRZDetector: ").Append(ResultMRZDetector).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ResultMRZDetectorItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ResultMRZDetectorItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option resultMRZDetector = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ResultMRZDetector": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultMRZDetector = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!resultMRZDetector.IsSet) + throw new ArgumentException("Property is required for class ResultMRZDetectorItem.", nameof(resultMRZDetector)); + + if (resultMRZDetector.IsSet && resultMRZDetector.Value == null) + throw new ArgumentNullException(nameof(resultMRZDetector), "Property is not nullable for class ResultMRZDetectorItem."); + + return new ResultMRZDetectorItem(resultMRZDetector.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ResultMRZDetectorItem resultMRZDetectorItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, resultMRZDetectorItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ResultMRZDetectorItem resultMRZDetectorItem, JsonSerializerOptions jsonSerializerOptions) + { + if (resultMRZDetectorItem.ResultMRZDetector == null) + throw new ArgumentNullException(nameof(resultMRZDetectorItem.ResultMRZDetector), "Property is required for class ResultMRZDetectorItem."); + + writer.WritePropertyName("ResultMRZDetector"); + JsonSerializer.Serialize(writer, resultMRZDetectorItem.ResultMRZDetector, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs new file mode 100644 index 0000000..cbb8b57 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs @@ -0,0 +1,214 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants specifying the type of the RFIDchip from MIFARE® family (for chips of type A) + /// + /// Enumeration contains a set of constants specifying the type of the RFIDchip from MIFARE® family (for chips of type A) + public enum RfidAChip + { + /// + /// Enum UNKNOWN for value: 0 + /// + UNKNOWN = 0, + + /// + /// Enum MIFARE_1K for value: 1 + /// + MIFARE_1K = 1, + + /// + /// Enum MIFARE_4K for value: 2 + /// + MIFARE_4K = 2, + + /// + /// Enum MIFARE_ULTRALIGHT for value: 3 + /// + MIFARE_ULTRALIGHT = 3, + + /// + /// Enum MIFARE_DES_FIRE for value: 4 + /// + MIFARE_DES_FIRE = 4, + + /// + /// Enum MIFARE_PROX for value: 5 + /// + MIFARE_PROX = 5 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidAChipValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidAChip FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidAChip.UNKNOWN; + + if (value.Equals((1).ToString())) + return RfidAChip.MIFARE_1K; + + if (value.Equals((2).ToString())) + return RfidAChip.MIFARE_4K; + + if (value.Equals((3).ToString())) + return RfidAChip.MIFARE_ULTRALIGHT; + + if (value.Equals((4).ToString())) + return RfidAChip.MIFARE_DES_FIRE; + + if (value.Equals((5).ToString())) + return RfidAChip.MIFARE_PROX; + + throw new NotImplementedException($"Could not convert value to type RfidAChip: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidAChip? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidAChip.UNKNOWN; + + if (value.Equals((1).ToString())) + return RfidAChip.MIFARE_1K; + + if (value.Equals((2).ToString())) + return RfidAChip.MIFARE_4K; + + if (value.Equals((3).ToString())) + return RfidAChip.MIFARE_ULTRALIGHT; + + if (value.Equals((4).ToString())) + return RfidAChip.MIFARE_DES_FIRE; + + if (value.Equals((5).ToString())) + return RfidAChip.MIFARE_PROX; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidAChip value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidAChipJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidAChip Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidAChip? result = rawValue == null + ? null + : RfidAChipValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidAChip to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAChip rfidAChip, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidAChip.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidAChipNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidAChip from the Json object + /// + /// + /// + /// + /// + public override RfidAChip? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidAChip? result = rawValue == null + ? null + : RfidAChipValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAChip? rfidAChip, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidAChip?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs new file mode 100644 index 0000000..20253fe --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs @@ -0,0 +1,275 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the results of a single authentication procedure or a procedure of secure data access within the context of the communication session with electronic document + /// + public partial class RfidAccessControlInfo : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// type + /// status + /// List of remarks arisen during the procedure. + /// Index of the active variant of the procedure + /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document + [JsonConstructor] + public RfidAccessControlInfo(RfidAccessControlProcedureType type, RFIDErrorCodes status, List notifications, Option activeOptionIdx = default, Option?> accessControlOptions = default) + { + Type = type; + Status = status; + Notifications = notifications; + ActiveOptionIdxOption = activeOptionIdx; + AccessControlOptionsOption = accessControlOptions; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Type + /// + [JsonPropertyName("Type")] + public RfidAccessControlProcedureType Type { get; set; } + + /// + /// Gets or Sets Status + /// + [JsonPropertyName("Status")] + public RFIDErrorCodes Status { get; set; } + + /// + /// List of remarks arisen during the procedure. + /// + /// List of remarks arisen during the procedure. + [JsonPropertyName("Notifications")] + public List Notifications { get; set; } + + /// + /// Used to track the state of ActiveOptionIdx + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ActiveOptionIdxOption { get; private set; } + + /// + /// Index of the active variant of the procedure + /// + /// Index of the active variant of the procedure + [JsonPropertyName("ActiveOptionIdx")] + public decimal? ActiveOptionIdx { get { return this.ActiveOptionIdxOption; } set { this.ActiveOptionIdxOption = new(value); } } + + /// + /// Used to track the state of AccessControlOptions + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> AccessControlOptionsOption { get; private set; } + + /// + /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document + /// + /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document + [JsonPropertyName("AccessControlOptions")] + public List? AccessControlOptions { get { return this.AccessControlOptionsOption; } set { this.AccessControlOptionsOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidAccessControlInfo {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Notifications: ").Append(Notifications).Append("\n"); + sb.Append(" ActiveOptionIdx: ").Append(ActiveOptionIdx).Append("\n"); + sb.Append(" AccessControlOptions: ").Append(AccessControlOptions).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidAccessControlInfoJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidAccessControlInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option status = default; + Option?> notifications = default; + Option activeOptionIdx = default; + Option?> accessControlOptions = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + string? typeRawValue = utf8JsonReader.GetString(); + if (typeRawValue != null) + type = new Option(RfidAccessControlProcedureTypeValueConverter.FromStringOrDefault(typeRawValue)); + break; + case "Status": + string? statusRawValue = utf8JsonReader.GetString(); + if (statusRawValue != null) + status = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(statusRawValue)); + break; + case "Notifications": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "ActiveOptionIdx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + activeOptionIdx = new Option(utf8JsonReader.GetDecimal()); + break; + case "AccessControlOptions": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + accessControlOptions = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class RfidAccessControlInfo.", nameof(type)); + + if (!status.IsSet) + throw new ArgumentException("Property is required for class RfidAccessControlInfo.", nameof(status)); + + if (!notifications.IsSet) + throw new ArgumentException("Property is required for class RfidAccessControlInfo.", nameof(notifications)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidAccessControlInfo."); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class RfidAccessControlInfo."); + + if (notifications.IsSet && notifications.Value == null) + throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidAccessControlInfo."); + + if (activeOptionIdx.IsSet && activeOptionIdx.Value == null) + throw new ArgumentNullException(nameof(activeOptionIdx), "Property is not nullable for class RfidAccessControlInfo."); + + if (accessControlOptions.IsSet && accessControlOptions.Value == null) + throw new ArgumentNullException(nameof(accessControlOptions), "Property is not nullable for class RfidAccessControlInfo."); + + return new RfidAccessControlInfo(type.Value!.Value!, status.Value!.Value!, notifications.Value!, activeOptionIdx, accessControlOptions); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAccessControlInfo rfidAccessControlInfo, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidAccessControlInfo, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidAccessControlInfo rfidAccessControlInfo, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidAccessControlInfo.Notifications == null) + throw new ArgumentNullException(nameof(rfidAccessControlInfo.Notifications), "Property is required for class RfidAccessControlInfo."); + + if (rfidAccessControlInfo.AccessControlOptionsOption.IsSet && rfidAccessControlInfo.AccessControlOptions == null) + throw new ArgumentNullException(nameof(rfidAccessControlInfo.AccessControlOptions), "Property is required for class RfidAccessControlInfo."); + + var typeRawValue = RfidAccessControlProcedureTypeValueConverter.ToJsonValue(rfidAccessControlInfo.Type); + writer.WriteNumber("Type", typeRawValue); + + var statusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidAccessControlInfo.Status); + writer.WriteNumber("Status", statusRawValue); + + writer.WritePropertyName("Notifications"); + JsonSerializer.Serialize(writer, rfidAccessControlInfo.Notifications, jsonSerializerOptions); + if (rfidAccessControlInfo.ActiveOptionIdxOption.IsSet) + writer.WriteNumber("ActiveOptionIdx", rfidAccessControlInfo.ActiveOptionIdxOption.Value!.Value); + + if (rfidAccessControlInfo.AccessControlOptionsOption.IsSet) + { + writer.WritePropertyName("AccessControlOptions"); + JsonSerializer.Serialize(writer, rfidAccessControlInfo.AccessControlOptions, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs new file mode 100644 index 0000000..3a36a1a --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs @@ -0,0 +1,236 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants that define the type of authentication or secure data access procedure + /// + /// Enumeration contains a set of constants that define the type of authentication or secure data access procedure + public enum RfidAccessControlProcedureType + { + /// + /// Enum UNDEFINED for value: 0 + /// + UNDEFINED = 0, + + /// + /// Enum BAC for value: 1 + /// + BAC = 1, + + /// + /// Enum PACE for value: 2 + /// + PACE = 2, + + /// + /// Enum CA for value: 3 + /// + CA = 3, + + /// + /// Enum TA for value: 4 + /// + TA = 4, + + /// + /// Enum AA for value: 5 + /// + AA = 5, + + /// + /// Enum RI for value: 6 + /// + RI = 6, + + /// + /// Enum CARD_INFO for value: 10 + /// + CARD_INFO = 10 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidAccessControlProcedureTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidAccessControlProcedureType FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidAccessControlProcedureType.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidAccessControlProcedureType.BAC; + + if (value.Equals((2).ToString())) + return RfidAccessControlProcedureType.PACE; + + if (value.Equals((3).ToString())) + return RfidAccessControlProcedureType.CA; + + if (value.Equals((4).ToString())) + return RfidAccessControlProcedureType.TA; + + if (value.Equals((5).ToString())) + return RfidAccessControlProcedureType.AA; + + if (value.Equals((6).ToString())) + return RfidAccessControlProcedureType.RI; + + if (value.Equals((10).ToString())) + return RfidAccessControlProcedureType.CARD_INFO; + + throw new NotImplementedException($"Could not convert value to type RfidAccessControlProcedureType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidAccessControlProcedureType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidAccessControlProcedureType.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidAccessControlProcedureType.BAC; + + if (value.Equals((2).ToString())) + return RfidAccessControlProcedureType.PACE; + + if (value.Equals((3).ToString())) + return RfidAccessControlProcedureType.CA; + + if (value.Equals((4).ToString())) + return RfidAccessControlProcedureType.TA; + + if (value.Equals((5).ToString())) + return RfidAccessControlProcedureType.AA; + + if (value.Equals((6).ToString())) + return RfidAccessControlProcedureType.RI; + + if (value.Equals((10).ToString())) + return RfidAccessControlProcedureType.CARD_INFO; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidAccessControlProcedureType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidAccessControlProcedureTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidAccessControlProcedureType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidAccessControlProcedureType? result = rawValue == null + ? null + : RfidAccessControlProcedureTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidAccessControlProcedureType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAccessControlProcedureType rfidAccessControlProcedureType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidAccessControlProcedureType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidAccessControlProcedureTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidAccessControlProcedureType from the Json object + /// + /// + /// + /// + /// + public override RfidAccessControlProcedureType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidAccessControlProcedureType? result = rawValue == null + ? null + : RfidAccessControlProcedureTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAccessControlProcedureType? rfidAccessControlProcedureType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidAccessControlProcedureType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs new file mode 100644 index 0000000..09241c5 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs @@ -0,0 +1,235 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the contents of secure data access key within the context of the communication session with electronic document + /// + public partial class RfidAccessKey : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Key contents + /// keyType + /// accessType + /// Logical sign of the need for a full comparison of AccessKey contents with the contents of DG1 (MRZ) data group + [JsonConstructor] + public RfidAccessKey(string accessKey, RfidPasswordType keyType, RfidAccessControlProcedureType accessType, bool checkFullKeyMatching) + { + AccessKey = accessKey; + KeyType = keyType; + AccessType = accessType; + CheckFullKeyMatching = checkFullKeyMatching; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets KeyType + /// + [JsonPropertyName("KeyType")] + public RfidPasswordType KeyType { get; set; } + + /// + /// Gets or Sets AccessType + /// + [JsonPropertyName("AccessType")] + public RfidAccessControlProcedureType AccessType { get; set; } + + /// + /// Key contents + /// + /// Key contents + [JsonPropertyName("AccessKey")] + public string AccessKey { get; set; } + + /// + /// Logical sign of the need for a full comparison of AccessKey contents with the contents of DG1 (MRZ) data group + /// + /// Logical sign of the need for a full comparison of AccessKey contents with the contents of DG1 (MRZ) data group + [JsonPropertyName("CheckFullKeyMatching")] + public bool CheckFullKeyMatching { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidAccessKey {\n"); + sb.Append(" AccessKey: ").Append(AccessKey).Append("\n"); + sb.Append(" KeyType: ").Append(KeyType).Append("\n"); + sb.Append(" AccessType: ").Append(AccessType).Append("\n"); + sb.Append(" CheckFullKeyMatching: ").Append(CheckFullKeyMatching).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidAccessKeyJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidAccessKey Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option accessKey = default; + Option keyType = default; + Option accessType = default; + Option checkFullKeyMatching = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "AccessKey": + accessKey = new Option(utf8JsonReader.GetString()!); + break; + case "KeyType": + string? keyTypeRawValue = utf8JsonReader.GetString(); + if (keyTypeRawValue != null) + keyType = new Option(RfidPasswordTypeValueConverter.FromStringOrDefault(keyTypeRawValue)); + break; + case "AccessType": + string? accessTypeRawValue = utf8JsonReader.GetString(); + if (accessTypeRawValue != null) + accessType = new Option(RfidAccessControlProcedureTypeValueConverter.FromStringOrDefault(accessTypeRawValue)); + break; + case "CheckFullKeyMatching": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkFullKeyMatching = new Option(utf8JsonReader.GetBoolean()); + break; + default: + break; + } + } + } + + if (!accessKey.IsSet) + throw new ArgumentException("Property is required for class RfidAccessKey.", nameof(accessKey)); + + if (!keyType.IsSet) + throw new ArgumentException("Property is required for class RfidAccessKey.", nameof(keyType)); + + if (!accessType.IsSet) + throw new ArgumentException("Property is required for class RfidAccessKey.", nameof(accessType)); + + if (!checkFullKeyMatching.IsSet) + throw new ArgumentException("Property is required for class RfidAccessKey.", nameof(checkFullKeyMatching)); + + if (accessKey.IsSet && accessKey.Value == null) + throw new ArgumentNullException(nameof(accessKey), "Property is not nullable for class RfidAccessKey."); + + if (keyType.IsSet && keyType.Value == null) + throw new ArgumentNullException(nameof(keyType), "Property is not nullable for class RfidAccessKey."); + + if (accessType.IsSet && accessType.Value == null) + throw new ArgumentNullException(nameof(accessType), "Property is not nullable for class RfidAccessKey."); + + if (checkFullKeyMatching.IsSet && checkFullKeyMatching.Value == null) + throw new ArgumentNullException(nameof(checkFullKeyMatching), "Property is not nullable for class RfidAccessKey."); + + return new RfidAccessKey(accessKey.Value!, keyType.Value!.Value!, accessType.Value!.Value!, checkFullKeyMatching.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAccessKey rfidAccessKey, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidAccessKey, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidAccessKey rfidAccessKey, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidAccessKey.AccessKey == null) + throw new ArgumentNullException(nameof(rfidAccessKey.AccessKey), "Property is required for class RfidAccessKey."); + + writer.WriteString("AccessKey", rfidAccessKey.AccessKey); + + var keyTypeRawValue = RfidPasswordTypeValueConverter.ToJsonValue(rfidAccessKey.KeyType); + writer.WriteNumber("KeyType", keyTypeRawValue); + + var accessTypeRawValue = RfidAccessControlProcedureTypeValueConverter.ToJsonValue(rfidAccessKey.AccessType); + writer.WriteNumber("AccessType", accessTypeRawValue); + + writer.WriteBoolean("CheckFullKeyMatching", rfidAccessKey.CheckFullKeyMatching); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs b/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs new file mode 100644 index 0000000..9675a2c --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs @@ -0,0 +1,314 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the contents of a single LDS application and their analysis within the context of the communication session with electronic document + /// + public partial class RfidApplication : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// type + /// status + /// Application identifier + /// Version of the application + /// Unicode version for application + /// Algorithm for calculating hash values for files for the procedure of PA + /// List of containers to store information about the read files of the application + [JsonConstructor] + public RfidApplication(RfidApplicationType type, RFIDErrorCodes status, string applicationID, string varVersion, string unicodeVersion, string dataHashAlgorithm, List files) + { + Type = type; + Status = status; + ApplicationID = applicationID; + VarVersion = varVersion; + UnicodeVersion = unicodeVersion; + DataHashAlgorithm = dataHashAlgorithm; + Files = files; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Type + /// + [JsonPropertyName("Type")] + public RfidApplicationType Type { get; set; } + + /// + /// Gets or Sets Status + /// + [JsonPropertyName("Status")] + public RFIDErrorCodes Status { get; set; } + + /// + /// Application identifier + /// + /// Application identifier + [JsonPropertyName("ApplicationID")] + public string ApplicationID { get; set; } + + /// + /// Version of the application + /// + /// Version of the application + [JsonPropertyName("Version")] + public string VarVersion { get; set; } + + /// + /// Unicode version for application + /// + /// Unicode version for application + [JsonPropertyName("UnicodeVersion")] + public string UnicodeVersion { get; set; } + + /// + /// Algorithm for calculating hash values for files for the procedure of PA + /// + /// Algorithm for calculating hash values for files for the procedure of PA + [JsonPropertyName("DataHashAlgorithm")] + public string DataHashAlgorithm { get; set; } + + /// + /// List of containers to store information about the read files of the application + /// + /// List of containers to store information about the read files of the application + [JsonPropertyName("Files")] + public List Files { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidApplication {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ApplicationID: ").Append(ApplicationID).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append(" UnicodeVersion: ").Append(UnicodeVersion).Append("\n"); + sb.Append(" DataHashAlgorithm: ").Append(DataHashAlgorithm).Append("\n"); + sb.Append(" Files: ").Append(Files).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidApplicationJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidApplication Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option status = default; + Option applicationID = default; + Option varVersion = default; + Option unicodeVersion = default; + Option dataHashAlgorithm = default; + Option?> files = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + string? typeRawValue = utf8JsonReader.GetString(); + if (typeRawValue != null) + type = new Option(RfidApplicationTypeValueConverter.FromStringOrDefault(typeRawValue)); + break; + case "Status": + string? statusRawValue = utf8JsonReader.GetString(); + if (statusRawValue != null) + status = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(statusRawValue)); + break; + case "ApplicationID": + applicationID = new Option(utf8JsonReader.GetString()!); + break; + case "Version": + varVersion = new Option(utf8JsonReader.GetString()!); + break; + case "UnicodeVersion": + unicodeVersion = new Option(utf8JsonReader.GetString()!); + break; + case "DataHashAlgorithm": + dataHashAlgorithm = new Option(utf8JsonReader.GetString()!); + break; + case "Files": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + files = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class RfidApplication.", nameof(type)); + + if (!status.IsSet) + throw new ArgumentException("Property is required for class RfidApplication.", nameof(status)); + + if (!applicationID.IsSet) + throw new ArgumentException("Property is required for class RfidApplication.", nameof(applicationID)); + + if (!varVersion.IsSet) + throw new ArgumentException("Property is required for class RfidApplication.", nameof(varVersion)); + + if (!unicodeVersion.IsSet) + throw new ArgumentException("Property is required for class RfidApplication.", nameof(unicodeVersion)); + + if (!dataHashAlgorithm.IsSet) + throw new ArgumentException("Property is required for class RfidApplication.", nameof(dataHashAlgorithm)); + + if (!files.IsSet) + throw new ArgumentException("Property is required for class RfidApplication.", nameof(files)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidApplication."); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class RfidApplication."); + + if (applicationID.IsSet && applicationID.Value == null) + throw new ArgumentNullException(nameof(applicationID), "Property is not nullable for class RfidApplication."); + + if (varVersion.IsSet && varVersion.Value == null) + throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class RfidApplication."); + + if (unicodeVersion.IsSet && unicodeVersion.Value == null) + throw new ArgumentNullException(nameof(unicodeVersion), "Property is not nullable for class RfidApplication."); + + if (dataHashAlgorithm.IsSet && dataHashAlgorithm.Value == null) + throw new ArgumentNullException(nameof(dataHashAlgorithm), "Property is not nullable for class RfidApplication."); + + if (files.IsSet && files.Value == null) + throw new ArgumentNullException(nameof(files), "Property is not nullable for class RfidApplication."); + + return new RfidApplication(type.Value!.Value!, status.Value!.Value!, applicationID.Value!, varVersion.Value!, unicodeVersion.Value!, dataHashAlgorithm.Value!, files.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidApplication rfidApplication, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidApplication, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidApplication rfidApplication, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidApplication.ApplicationID == null) + throw new ArgumentNullException(nameof(rfidApplication.ApplicationID), "Property is required for class RfidApplication."); + + if (rfidApplication.VarVersion == null) + throw new ArgumentNullException(nameof(rfidApplication.VarVersion), "Property is required for class RfidApplication."); + + if (rfidApplication.UnicodeVersion == null) + throw new ArgumentNullException(nameof(rfidApplication.UnicodeVersion), "Property is required for class RfidApplication."); + + if (rfidApplication.DataHashAlgorithm == null) + throw new ArgumentNullException(nameof(rfidApplication.DataHashAlgorithm), "Property is required for class RfidApplication."); + + if (rfidApplication.Files == null) + throw new ArgumentNullException(nameof(rfidApplication.Files), "Property is required for class RfidApplication."); + + var typeRawValue = RfidApplicationTypeValueConverter.ToJsonValue(rfidApplication.Type); + writer.WriteNumber("Type", typeRawValue); + + var statusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidApplication.Status); + writer.WriteNumber("Status", statusRawValue); + + writer.WriteString("ApplicationID", rfidApplication.ApplicationID); + + writer.WriteString("Version", rfidApplication.VarVersion); + + writer.WriteString("UnicodeVersion", rfidApplication.UnicodeVersion); + + writer.WriteString("DataHashAlgorithm", rfidApplication.DataHashAlgorithm); + + writer.WritePropertyName("Files"); + JsonSerializer.Serialize(writer, rfidApplication.Files, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs new file mode 100644 index 0000000..7d18c08 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs @@ -0,0 +1,258 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants that define the type of application within the context of the communication session with electronic document + /// + /// Enumeration contains a set of constants that define the type of application within the context of the communication session with electronic document + public enum RfidApplicationType + { + /// + /// Enum UNSPECIFIED for value: 0 + /// + UNSPECIFIED = 0, + + /// + /// Enum E_PASSPORT for value: 1 + /// + E_PASSPORT = 1, + + /// + /// Enum E_ID for value: 2 + /// + E_ID = 2, + + /// + /// Enum E_SIGN for value: 3 + /// + E_SIGN = 3, + + /// + /// Enum E_DL for value: 4 + /// + E_DL = 4, + + /// + /// Enum LDS2_TravelRecords for value: 5 + /// + LDS2_TravelRecords = 5, + + /// + /// Enum LDS2_VisaRecords for value: 6 + /// + LDS2_VisaRecords = 6, + + /// + /// Enum LDS2_AddBiometrics for value: 7 + /// + LDS2_AddBiometrics = 7, + + /// + /// Enum eDTC_PC for value: 8 + /// + eDTC_PC = 8, + + /// + /// Enum ROOT_FILES for value: 0 + /// + ROOT_FILES = 0 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidApplicationTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidApplicationType FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidApplicationType.UNSPECIFIED; + + if (value.Equals((1).ToString())) + return RfidApplicationType.E_PASSPORT; + + if (value.Equals((2).ToString())) + return RfidApplicationType.E_ID; + + if (value.Equals((3).ToString())) + return RfidApplicationType.E_SIGN; + + if (value.Equals((4).ToString())) + return RfidApplicationType.E_DL; + + if (value.Equals((5).ToString())) + return RfidApplicationType.LDS2_TravelRecords; + + if (value.Equals((6).ToString())) + return RfidApplicationType.LDS2_VisaRecords; + + if (value.Equals((7).ToString())) + return RfidApplicationType.LDS2_AddBiometrics; + + if (value.Equals((8).ToString())) + return RfidApplicationType.eDTC_PC; + + if (value.Equals((0).ToString())) + return RfidApplicationType.ROOT_FILES; + + throw new NotImplementedException($"Could not convert value to type RfidApplicationType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidApplicationType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidApplicationType.UNSPECIFIED; + + if (value.Equals((1).ToString())) + return RfidApplicationType.E_PASSPORT; + + if (value.Equals((2).ToString())) + return RfidApplicationType.E_ID; + + if (value.Equals((3).ToString())) + return RfidApplicationType.E_SIGN; + + if (value.Equals((4).ToString())) + return RfidApplicationType.E_DL; + + if (value.Equals((5).ToString())) + return RfidApplicationType.LDS2_TravelRecords; + + if (value.Equals((6).ToString())) + return RfidApplicationType.LDS2_VisaRecords; + + if (value.Equals((7).ToString())) + return RfidApplicationType.LDS2_AddBiometrics; + + if (value.Equals((8).ToString())) + return RfidApplicationType.eDTC_PC; + + if (value.Equals((0).ToString())) + return RfidApplicationType.ROOT_FILES; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidApplicationType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidApplicationTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidApplicationType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidApplicationType? result = rawValue == null + ? null + : RfidApplicationTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidApplicationType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidApplicationType rfidApplicationType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidApplicationType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidApplicationTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidApplicationType from the Json object + /// + /// + /// + /// + /// + public override RfidApplicationType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidApplicationType? result = rawValue == null + ? null + : RfidApplicationTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidApplicationType? rfidApplicationType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidApplicationType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs new file mode 100644 index 0000000..2b86822 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs @@ -0,0 +1,189 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure contains the data of one attribute of the digital signature object. + /// + public partial class RfidAttributeData : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + /// Attribute binary data. Base64 encoded. + [JsonConstructor] + public RfidAttributeData(string type, string data) + { + Type = type; + Data = data; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + /// + /// Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + [JsonPropertyName("Type")] + public string Type { get; set; } + + /// + /// Attribute binary data. Base64 encoded. + /// + /// Attribute binary data. Base64 encoded. + [JsonPropertyName("Data")] + public string Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidAttributeData {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidAttributeDataJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidAttributeData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option data = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + type = new Option(utf8JsonReader.GetString()!); + break; + case "Data": + data = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class RfidAttributeData.", nameof(type)); + + if (!data.IsSet) + throw new ArgumentException("Property is required for class RfidAttributeData.", nameof(data)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidAttributeData."); + + if (data.IsSet && data.Value == null) + throw new ArgumentNullException(nameof(data), "Property is not nullable for class RfidAttributeData."); + + return new RfidAttributeData(type.Value!, data.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAttributeData rfidAttributeData, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidAttributeData, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidAttributeData rfidAttributeData, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidAttributeData.Type == null) + throw new ArgumentNullException(nameof(rfidAttributeData.Type), "Property is required for class RfidAttributeData."); + + if (rfidAttributeData.Data == null) + throw new ArgumentNullException(nameof(rfidAttributeData.Data), "Property is required for class RfidAttributeData."); + + writer.WriteString("Type", rfidAttributeData.Type); + + writer.WriteString("Data", rfidAttributeData.Data); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs new file mode 100644 index 0000000..879bb5d --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs @@ -0,0 +1,190 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure contains information that serves as the distinguished name (identifier) of an object. + /// + public partial class RfidAttributeName : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Attribute identifier (OID ASCII string); contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + /// value + [JsonConstructor] + public RfidAttributeName(string type, TrfFtString value) + { + Type = type; + Value = value; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Attribute identifier (OID ASCII string); contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + /// + /// Attribute identifier (OID ASCII string); contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + [JsonPropertyName("Type")] + public string Type { get; set; } + + /// + /// Gets or Sets Value + /// + [JsonPropertyName("Value")] + public TrfFtString Value { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidAttributeName {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidAttributeNameJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidAttributeName Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option value = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + type = new Option(utf8JsonReader.GetString()!); + break; + case "Value": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + value = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class RfidAttributeName.", nameof(type)); + + if (!value.IsSet) + throw new ArgumentException("Property is required for class RfidAttributeName.", nameof(value)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidAttributeName."); + + if (value.IsSet && value.Value == null) + throw new ArgumentNullException(nameof(value), "Property is not nullable for class RfidAttributeName."); + + return new RfidAttributeName(type.Value!, value.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAttributeName rfidAttributeName, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidAttributeName, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidAttributeName rfidAttributeName, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidAttributeName.Type == null) + throw new ArgumentNullException(nameof(rfidAttributeName.Type), "Property is required for class RfidAttributeName."); + + if (rfidAttributeName.Value == null) + throw new ArgumentNullException(nameof(rfidAttributeName.Value), "Property is required for class RfidAttributeName."); + + writer.WriteString("Type", rfidAttributeName.Type); + + writer.WritePropertyName("Value"); + JsonSerializer.Serialize(writer, rfidAttributeName.Value, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs new file mode 100644 index 0000000..4905b84 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs @@ -0,0 +1,192 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants that define the type of performed procedure of document authentication within the current session + /// + /// Enumeration contains a set of constants that define the type of performed procedure of document authentication within the current session + public enum RfidAuthenticationProcedureType + { + /// + /// Enum UNDEFINED for value: 0 + /// + UNDEFINED = 0, + + /// + /// Enum STANDARD for value: 1 + /// + STANDARD = 1, + + /// + /// Enum ADVANCED for value: 2 + /// + ADVANCED = 2, + + /// + /// Enum GENERAL for value: 3 + /// + GENERAL = 3 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidAuthenticationProcedureTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidAuthenticationProcedureType FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidAuthenticationProcedureType.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidAuthenticationProcedureType.STANDARD; + + if (value.Equals((2).ToString())) + return RfidAuthenticationProcedureType.ADVANCED; + + if (value.Equals((3).ToString())) + return RfidAuthenticationProcedureType.GENERAL; + + throw new NotImplementedException($"Could not convert value to type RfidAuthenticationProcedureType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidAuthenticationProcedureType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidAuthenticationProcedureType.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidAuthenticationProcedureType.STANDARD; + + if (value.Equals((2).ToString())) + return RfidAuthenticationProcedureType.ADVANCED; + + if (value.Equals((3).ToString())) + return RfidAuthenticationProcedureType.GENERAL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidAuthenticationProcedureType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidAuthenticationProcedureTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidAuthenticationProcedureType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidAuthenticationProcedureType? result = rawValue == null + ? null + : RfidAuthenticationProcedureTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidAuthenticationProcedureType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAuthenticationProcedureType rfidAuthenticationProcedureType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidAuthenticationProcedureType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidAuthenticationProcedureTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidAuthenticationProcedureType from the Json object + /// + /// + /// + /// + /// + public override RfidAuthenticationProcedureType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidAuthenticationProcedureType? result = rawValue == null + ? null + : RfidAuthenticationProcedureTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidAuthenticationProcedureType? rfidAuthenticationProcedureType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidAuthenticationProcedureType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs b/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs new file mode 100644 index 0000000..6035207 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs @@ -0,0 +1,203 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants specifying the rate of data exchange between the reader and the RFID-chip + /// + /// Enumeration contains a set of constants specifying the rate of data exchange between the reader and the RFID-chip + public enum RfidBaudRate + { + /// + /// Enum UNKNOWN for value: 0 + /// + UNKNOWN = 0, + + /// + /// Enum RFBR_106 for value: 1 + /// + RFBR_106 = 1, + + /// + /// Enum RFBR_212 for value: 2 + /// + RFBR_212 = 2, + + /// + /// Enum RFBR_424 for value: 4 + /// + RFBR_424 = 4, + + /// + /// Enum RFBR_848 for value: 8 + /// + RFBR_848 = 8 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidBaudRateValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidBaudRate FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidBaudRate.UNKNOWN; + + if (value.Equals((1).ToString())) + return RfidBaudRate.RFBR_106; + + if (value.Equals((2).ToString())) + return RfidBaudRate.RFBR_212; + + if (value.Equals((4).ToString())) + return RfidBaudRate.RFBR_424; + + if (value.Equals((8).ToString())) + return RfidBaudRate.RFBR_848; + + throw new NotImplementedException($"Could not convert value to type RfidBaudRate: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidBaudRate? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidBaudRate.UNKNOWN; + + if (value.Equals((1).ToString())) + return RfidBaudRate.RFBR_106; + + if (value.Equals((2).ToString())) + return RfidBaudRate.RFBR_212; + + if (value.Equals((4).ToString())) + return RfidBaudRate.RFBR_424; + + if (value.Equals((8).ToString())) + return RfidBaudRate.RFBR_848; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidBaudRate value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidBaudRateJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidBaudRate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidBaudRate? result = rawValue == null + ? null + : RfidBaudRateValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidBaudRate to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidBaudRate rfidBaudRate, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidBaudRate.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidBaudRateNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidBaudRate from the Json object + /// + /// + /// + /// + /// + public override RfidBaudRate? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidBaudRate? result = rawValue == null + ? null + : RfidBaudRateValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidBaudRate? rfidBaudRate, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidBaudRate?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs new file mode 100644 index 0000000..bf61f9c --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs @@ -0,0 +1,480 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to store extended information about the characteristics of the RFID-chip located in the scope of the reader + /// + public partial class RfidCardPropertiesExt : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// rFIDType + /// Numeric Baudrate1 value in hexadecimal format (e.g. 0x0000000F) + /// Numeric Baudrate2 value in hexadecimal format + /// Boolean Support_4 value + /// chipTypeA + /// Sign of support for ISO/IEC 14443-3 data exchange protocol + /// Amount of operational memory MIFARE® of the chip, kilobytes + /// UID contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. F9 4F 41 60) + /// bitRateS + /// bitRateR + /// ATR-string of RFID-chip + /// Reply of the «A» type chip to «REQA» command of ISO/IEC 14443-3 protocol (Answer To Request, Type A – ATQA) – for the internal use by the main control library + /// Response of type-A RFID-chip to SELECT command of ISO/IEC 14443-3 protocol (Select Acknowledge, SAK). + /// ATQ_B contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 50 F9 4F 41 60 00 00 00 00 77 81 81) + [JsonConstructor] + public RfidCardPropertiesExt(RfidType rFIDType, string baudrate1, string baudrate2, bool support4, RfidAChip chipTypeA, bool supportMifare, decimal mifareMemory, string uID, RfidBaudRate bitRateS, RfidBaudRate bitRateR, string aTR, Object? aTQA = default, Object? sAK = default, Object? aTQB = default) + { + RFIDType = rFIDType; + Baudrate1 = baudrate1; + Baudrate2 = baudrate2; + Support4 = support4; + ChipTypeA = chipTypeA; + SupportMifare = supportMifare; + MifareMemory = mifareMemory; + UID = uID; + BitRateS = bitRateS; + BitRateR = bitRateR; + ATR = aTR; + ATQ_A = aTQA; + SAK = sAK; + ATQ_B = aTQB; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets RFIDType + /// + [JsonPropertyName("RFID_Type")] + public RfidType RFIDType { get; set; } + + /// + /// Gets or Sets ChipTypeA + /// + [JsonPropertyName("ChipType_A")] + public RfidAChip ChipTypeA { get; set; } + + /// + /// Gets or Sets BitRateS + /// + [JsonPropertyName("BitRateS")] + public RfidBaudRate BitRateS { get; set; } + + /// + /// Gets or Sets BitRateR + /// + [JsonPropertyName("BitRateR")] + public RfidBaudRate BitRateR { get; set; } + + /// + /// Numeric Baudrate1 value in hexadecimal format (e.g. 0x0000000F) + /// + /// Numeric Baudrate1 value in hexadecimal format (e.g. 0x0000000F) + [JsonPropertyName("Baudrate1")] + public string Baudrate1 { get; set; } + + /// + /// Numeric Baudrate2 value in hexadecimal format + /// + /// Numeric Baudrate2 value in hexadecimal format + [JsonPropertyName("Baudrate2")] + public string Baudrate2 { get; set; } + + /// + /// Boolean Support_4 value + /// + /// Boolean Support_4 value + [JsonPropertyName("Support_4")] + public bool Support4 { get; set; } + + /// + /// Sign of support for ISO/IEC 14443-3 data exchange protocol + /// + /// Sign of support for ISO/IEC 14443-3 data exchange protocol + [JsonPropertyName("Support_Mifare")] + public bool SupportMifare { get; set; } + + /// + /// Amount of operational memory MIFARE® of the chip, kilobytes + /// + /// Amount of operational memory MIFARE® of the chip, kilobytes + [JsonPropertyName("MifareMemory")] + public decimal MifareMemory { get; set; } + + /// + /// UID contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. F9 4F 41 60) + /// + /// UID contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. F9 4F 41 60) + [JsonPropertyName("UID")] + public string UID { get; set; } + + /// + /// ATR-string of RFID-chip + /// + /// ATR-string of RFID-chip + [JsonPropertyName("ATR")] + public string ATR { get; set; } + + /// + /// Reply of the «A» type chip to «REQA» command of ISO/IEC 14443-3 protocol (Answer To Request, Type A – ATQA) – for the internal use by the main control library + /// + /// Reply of the «A» type chip to «REQA» command of ISO/IEC 14443-3 protocol (Answer To Request, Type A – ATQA) – for the internal use by the main control library + [JsonPropertyName("ATQ_A")] + public Object? ATQ_A { get; set; } + + /// + /// Response of type-A RFID-chip to SELECT command of ISO/IEC 14443-3 protocol (Select Acknowledge, SAK). + /// + /// Response of type-A RFID-chip to SELECT command of ISO/IEC 14443-3 protocol (Select Acknowledge, SAK). + [JsonPropertyName("SAK")] + public Object? SAK { get; set; } + + /// + /// ATQ_B contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 50 F9 4F 41 60 00 00 00 00 77 81 81) + /// + /// ATQ_B contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 50 F9 4F 41 60 00 00 00 00 77 81 81) + [JsonPropertyName("ATQ_B")] + public Object? ATQ_B { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidCardPropertiesExt {\n"); + sb.Append(" RFIDType: ").Append(RFIDType).Append("\n"); + sb.Append(" Baudrate1: ").Append(Baudrate1).Append("\n"); + sb.Append(" Baudrate2: ").Append(Baudrate2).Append("\n"); + sb.Append(" Support4: ").Append(Support4).Append("\n"); + sb.Append(" ChipTypeA: ").Append(ChipTypeA).Append("\n"); + sb.Append(" SupportMifare: ").Append(SupportMifare).Append("\n"); + sb.Append(" MifareMemory: ").Append(MifareMemory).Append("\n"); + sb.Append(" UID: ").Append(UID).Append("\n"); + sb.Append(" BitRateS: ").Append(BitRateS).Append("\n"); + sb.Append(" BitRateR: ").Append(BitRateR).Append("\n"); + sb.Append(" ATR: ").Append(ATR).Append("\n"); + sb.Append(" ATQ_A: ").Append(ATQ_A).Append("\n"); + sb.Append(" SAK: ").Append(SAK).Append("\n"); + sb.Append(" ATQ_B: ").Append(ATQ_B).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidCardPropertiesExtJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidCardPropertiesExt Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option rFIDType = default; + Option baudrate1 = default; + Option baudrate2 = default; + Option support4 = default; + Option chipTypeA = default; + Option supportMifare = default; + Option mifareMemory = default; + Option uID = default; + Option bitRateS = default; + Option bitRateR = default; + Option aTR = default; + Option aTQA = default; + Option sAK = default; + Option aTQB = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RFID_Type": + string? rFIDTypeRawValue = utf8JsonReader.GetString(); + if (rFIDTypeRawValue != null) + rFIDType = new Option(RfidTypeValueConverter.FromStringOrDefault(rFIDTypeRawValue)); + break; + case "Baudrate1": + baudrate1 = new Option(utf8JsonReader.GetString()!); + break; + case "Baudrate2": + baudrate2 = new Option(utf8JsonReader.GetString()!); + break; + case "Support_4": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + support4 = new Option(utf8JsonReader.GetBoolean()); + break; + case "ChipType_A": + string? chipTypeARawValue = utf8JsonReader.GetString(); + if (chipTypeARawValue != null) + chipTypeA = new Option(RfidAChipValueConverter.FromStringOrDefault(chipTypeARawValue)); + break; + case "Support_Mifare": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + supportMifare = new Option(utf8JsonReader.GetBoolean()); + break; + case "MifareMemory": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + mifareMemory = new Option(utf8JsonReader.GetDecimal()); + break; + case "UID": + uID = new Option(utf8JsonReader.GetString()!); + break; + case "BitRateS": + string? bitRateSRawValue = utf8JsonReader.GetString(); + if (bitRateSRawValue != null) + bitRateS = new Option(RfidBaudRateValueConverter.FromStringOrDefault(bitRateSRawValue)); + break; + case "BitRateR": + string? bitRateRRawValue = utf8JsonReader.GetString(); + if (bitRateRRawValue != null) + bitRateR = new Option(RfidBaudRateValueConverter.FromStringOrDefault(bitRateRRawValue)); + break; + case "ATR": + aTR = new Option(utf8JsonReader.GetString()!); + break; + case "ATQ_A": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + aTQA = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + case "SAK": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sAK = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + case "ATQ_B": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + aTQB = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + break; + default: + break; + } + } + } + + if (!rFIDType.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(rFIDType)); + + if (!baudrate1.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(baudrate1)); + + if (!baudrate2.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(baudrate2)); + + if (!support4.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(support4)); + + if (!chipTypeA.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(chipTypeA)); + + if (!supportMifare.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(supportMifare)); + + if (!mifareMemory.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(mifareMemory)); + + if (!uID.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(uID)); + + if (!bitRateS.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(bitRateS)); + + if (!bitRateR.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(bitRateR)); + + if (!aTR.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(aTR)); + + if (!aTQA.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(aTQA)); + + if (!sAK.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(sAK)); + + if (!aTQB.IsSet) + throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(aTQB)); + + if (rFIDType.IsSet && rFIDType.Value == null) + throw new ArgumentNullException(nameof(rFIDType), "Property is not nullable for class RfidCardPropertiesExt."); + + if (baudrate1.IsSet && baudrate1.Value == null) + throw new ArgumentNullException(nameof(baudrate1), "Property is not nullable for class RfidCardPropertiesExt."); + + if (baudrate2.IsSet && baudrate2.Value == null) + throw new ArgumentNullException(nameof(baudrate2), "Property is not nullable for class RfidCardPropertiesExt."); + + if (support4.IsSet && support4.Value == null) + throw new ArgumentNullException(nameof(support4), "Property is not nullable for class RfidCardPropertiesExt."); + + if (chipTypeA.IsSet && chipTypeA.Value == null) + throw new ArgumentNullException(nameof(chipTypeA), "Property is not nullable for class RfidCardPropertiesExt."); + + if (supportMifare.IsSet && supportMifare.Value == null) + throw new ArgumentNullException(nameof(supportMifare), "Property is not nullable for class RfidCardPropertiesExt."); + + if (mifareMemory.IsSet && mifareMemory.Value == null) + throw new ArgumentNullException(nameof(mifareMemory), "Property is not nullable for class RfidCardPropertiesExt."); + + if (uID.IsSet && uID.Value == null) + throw new ArgumentNullException(nameof(uID), "Property is not nullable for class RfidCardPropertiesExt."); + + if (bitRateS.IsSet && bitRateS.Value == null) + throw new ArgumentNullException(nameof(bitRateS), "Property is not nullable for class RfidCardPropertiesExt."); + + if (bitRateR.IsSet && bitRateR.Value == null) + throw new ArgumentNullException(nameof(bitRateR), "Property is not nullable for class RfidCardPropertiesExt."); + + if (aTR.IsSet && aTR.Value == null) + throw new ArgumentNullException(nameof(aTR), "Property is not nullable for class RfidCardPropertiesExt."); + + return new RfidCardPropertiesExt(rFIDType.Value!.Value!, baudrate1.Value!, baudrate2.Value!, support4.Value!.Value!, chipTypeA.Value!.Value!, supportMifare.Value!.Value!, mifareMemory.Value!.Value!, uID.Value!, bitRateS.Value!.Value!, bitRateR.Value!.Value!, aTR.Value!, aTQA.Value!, sAK.Value!, aTQB.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidCardPropertiesExt rfidCardPropertiesExt, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidCardPropertiesExt, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidCardPropertiesExt rfidCardPropertiesExt, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidCardPropertiesExt.Baudrate1 == null) + throw new ArgumentNullException(nameof(rfidCardPropertiesExt.Baudrate1), "Property is required for class RfidCardPropertiesExt."); + + if (rfidCardPropertiesExt.Baudrate2 == null) + throw new ArgumentNullException(nameof(rfidCardPropertiesExt.Baudrate2), "Property is required for class RfidCardPropertiesExt."); + + if (rfidCardPropertiesExt.UID == null) + throw new ArgumentNullException(nameof(rfidCardPropertiesExt.UID), "Property is required for class RfidCardPropertiesExt."); + + if (rfidCardPropertiesExt.ATR == null) + throw new ArgumentNullException(nameof(rfidCardPropertiesExt.ATR), "Property is required for class RfidCardPropertiesExt."); + + var rFIDTypeRawValue = RfidTypeValueConverter.ToJsonValue(rfidCardPropertiesExt.RFIDType); + writer.WriteNumber("RFID_Type", rFIDTypeRawValue); + + writer.WriteString("Baudrate1", rfidCardPropertiesExt.Baudrate1); + + writer.WriteString("Baudrate2", rfidCardPropertiesExt.Baudrate2); + + writer.WriteBoolean("Support_4", rfidCardPropertiesExt.Support4); + + var chipTypeARawValue = RfidAChipValueConverter.ToJsonValue(rfidCardPropertiesExt.ChipTypeA); + writer.WriteNumber("ChipType_A", chipTypeARawValue); + + writer.WriteBoolean("Support_Mifare", rfidCardPropertiesExt.SupportMifare); + + writer.WriteNumber("MifareMemory", rfidCardPropertiesExt.MifareMemory); + + writer.WriteString("UID", rfidCardPropertiesExt.UID); + + var bitRateSRawValue = RfidBaudRateValueConverter.ToJsonValue(rfidCardPropertiesExt.BitRateS); + writer.WriteNumber("BitRateS", bitRateSRawValue); + + var bitRateRRawValue = RfidBaudRateValueConverter.ToJsonValue(rfidCardPropertiesExt.BitRateR); + writer.WriteNumber("BitRateR", bitRateRRawValue); + + writer.WriteString("ATR", rfidCardPropertiesExt.ATR); + + if (rfidCardPropertiesExt.ATQ_A != null) + { + writer.WritePropertyName("ATQ_A"); + JsonSerializer.Serialize(writer, rfidCardPropertiesExt.ATQ_A, jsonSerializerOptions); + } + else + writer.WriteNull("ATQ_A"); + if (rfidCardPropertiesExt.SAK != null) + { + writer.WritePropertyName("SAK"); + JsonSerializer.Serialize(writer, rfidCardPropertiesExt.SAK, jsonSerializerOptions); + } + else + writer.WriteNull("SAK"); + if (rfidCardPropertiesExt.ATQ_B != null) + { + writer.WritePropertyName("ATQ_B"); + JsonSerializer.Serialize(writer, rfidCardPropertiesExt.ATQ_B, jsonSerializerOptions); + } + else + writer.WriteNull("ATQ_B"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs new file mode 100644 index 0000000..65978ed --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs @@ -0,0 +1,461 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the certificate contents used for the digital signature verification of the document security object within the context of the communication session with electronic document. + /// + public partial class RfidCertificateEx : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Version of Certificate ASN.1 structure + /// Certificate serial number. Base64 encoded. + /// Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). + /// issuer + /// validity + /// subject + /// Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). + /// List of the certificate extensions + /// List of remarks arisen during the analysis of the certificate data structure and its validity verification. + /// origin + /// type + /// fileName + /// pAStatus + [JsonConstructor] + public RfidCertificateEx(decimal varVersion, string serialNumber, string signatureAlgorithm, RfidDistinguishedName issuer, RfidValidity validity, RfidDistinguishedName subject, string subjectPKAlgorithm, List extensions, List notifications, RfidCertificateOrigin origin, RfidCertificateType type, TrfFtString fileName, RFIDErrorCodes pAStatus) + { + VarVersion = varVersion; + SerialNumber = serialNumber; + SignatureAlgorithm = signatureAlgorithm; + Issuer = issuer; + Validity = validity; + Subject = subject; + SubjectPKAlgorithm = subjectPKAlgorithm; + Extensions = extensions; + Notifications = notifications; + Origin = origin; + Type = type; + FileName = fileName; + PAStatus = pAStatus; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Origin + /// + [JsonPropertyName("Origin")] + public RfidCertificateOrigin Origin { get; set; } + + /// + /// Gets or Sets Type + /// + [JsonPropertyName("Type")] + public RfidCertificateType Type { get; set; } + + /// + /// Gets or Sets PAStatus + /// + [JsonPropertyName("PA_Status")] + public RFIDErrorCodes PAStatus { get; set; } + + /// + /// Version of Certificate ASN.1 structure + /// + /// Version of Certificate ASN.1 structure + [JsonPropertyName("Version")] + public decimal VarVersion { get; set; } + + /// + /// Certificate serial number. Base64 encoded. + /// + /// Certificate serial number. Base64 encoded. + [JsonPropertyName("SerialNumber")] + public string SerialNumber { get; set; } + + /// + /// Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). + /// + /// Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). + [JsonPropertyName("SignatureAlgorithm")] + public string SignatureAlgorithm { get; set; } + + /// + /// Gets or Sets Issuer + /// + [JsonPropertyName("Issuer")] + public RfidDistinguishedName Issuer { get; set; } + + /// + /// Gets or Sets Validity + /// + [JsonPropertyName("Validity")] + public RfidValidity Validity { get; set; } + + /// + /// Gets or Sets Subject + /// + [JsonPropertyName("Subject")] + public RfidDistinguishedName Subject { get; set; } + + /// + /// Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). + /// + /// Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). + [JsonPropertyName("SubjectPKAlgorithm")] + public string SubjectPKAlgorithm { get; set; } + + /// + /// List of the certificate extensions + /// + /// List of the certificate extensions + [JsonPropertyName("Extensions")] + public List Extensions { get; set; } + + /// + /// List of remarks arisen during the analysis of the certificate data structure and its validity verification. + /// + /// List of remarks arisen during the analysis of the certificate data structure and its validity verification. + [JsonPropertyName("Notifications")] + public List Notifications { get; set; } + + /// + /// Gets or Sets FileName + /// + [JsonPropertyName("FileName")] + public TrfFtString FileName { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidCertificateEx {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append(" SerialNumber: ").Append(SerialNumber).Append("\n"); + sb.Append(" SignatureAlgorithm: ").Append(SignatureAlgorithm).Append("\n"); + sb.Append(" Issuer: ").Append(Issuer).Append("\n"); + sb.Append(" Validity: ").Append(Validity).Append("\n"); + sb.Append(" Subject: ").Append(Subject).Append("\n"); + sb.Append(" SubjectPKAlgorithm: ").Append(SubjectPKAlgorithm).Append("\n"); + sb.Append(" Extensions: ").Append(Extensions).Append("\n"); + sb.Append(" Notifications: ").Append(Notifications).Append("\n"); + sb.Append(" Origin: ").Append(Origin).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" FileName: ").Append(FileName).Append("\n"); + sb.Append(" PAStatus: ").Append(PAStatus).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidCertificateExJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidCertificateEx Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option varVersion = default; + Option serialNumber = default; + Option signatureAlgorithm = default; + Option issuer = default; + Option validity = default; + Option subject = default; + Option subjectPKAlgorithm = default; + Option?> extensions = default; + Option?> notifications = default; + Option origin = default; + Option type = default; + Option fileName = default; + Option pAStatus = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Version": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + varVersion = new Option(utf8JsonReader.GetDecimal()); + break; + case "SerialNumber": + serialNumber = new Option(utf8JsonReader.GetString()!); + break; + case "SignatureAlgorithm": + signatureAlgorithm = new Option(utf8JsonReader.GetString()!); + break; + case "Issuer": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + issuer = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Validity": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + validity = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Subject": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + subject = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SubjectPKAlgorithm": + subjectPKAlgorithm = new Option(utf8JsonReader.GetString()!); + break; + case "Extensions": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + extensions = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Notifications": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Origin": + string? originRawValue = utf8JsonReader.GetString(); + if (originRawValue != null) + origin = new Option(RfidCertificateOriginValueConverter.FromStringOrDefault(originRawValue)); + break; + case "Type": + string? typeRawValue = utf8JsonReader.GetString(); + if (typeRawValue != null) + type = new Option(RfidCertificateTypeValueConverter.FromStringOrDefault(typeRawValue)); + break; + case "FileName": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fileName = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "PA_Status": + string? pAStatusRawValue = utf8JsonReader.GetString(); + if (pAStatusRawValue != null) + pAStatus = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(pAStatusRawValue)); + break; + default: + break; + } + } + } + + if (!varVersion.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(varVersion)); + + if (!serialNumber.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(serialNumber)); + + if (!signatureAlgorithm.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(signatureAlgorithm)); + + if (!issuer.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(issuer)); + + if (!validity.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(validity)); + + if (!subject.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(subject)); + + if (!subjectPKAlgorithm.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(subjectPKAlgorithm)); + + if (!extensions.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(extensions)); + + if (!notifications.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(notifications)); + + if (!origin.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(origin)); + + if (!type.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(type)); + + if (!fileName.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(fileName)); + + if (!pAStatus.IsSet) + throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(pAStatus)); + + if (varVersion.IsSet && varVersion.Value == null) + throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class RfidCertificateEx."); + + if (serialNumber.IsSet && serialNumber.Value == null) + throw new ArgumentNullException(nameof(serialNumber), "Property is not nullable for class RfidCertificateEx."); + + if (signatureAlgorithm.IsSet && signatureAlgorithm.Value == null) + throw new ArgumentNullException(nameof(signatureAlgorithm), "Property is not nullable for class RfidCertificateEx."); + + if (issuer.IsSet && issuer.Value == null) + throw new ArgumentNullException(nameof(issuer), "Property is not nullable for class RfidCertificateEx."); + + if (validity.IsSet && validity.Value == null) + throw new ArgumentNullException(nameof(validity), "Property is not nullable for class RfidCertificateEx."); + + if (subject.IsSet && subject.Value == null) + throw new ArgumentNullException(nameof(subject), "Property is not nullable for class RfidCertificateEx."); + + if (subjectPKAlgorithm.IsSet && subjectPKAlgorithm.Value == null) + throw new ArgumentNullException(nameof(subjectPKAlgorithm), "Property is not nullable for class RfidCertificateEx."); + + if (extensions.IsSet && extensions.Value == null) + throw new ArgumentNullException(nameof(extensions), "Property is not nullable for class RfidCertificateEx."); + + if (notifications.IsSet && notifications.Value == null) + throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidCertificateEx."); + + if (origin.IsSet && origin.Value == null) + throw new ArgumentNullException(nameof(origin), "Property is not nullable for class RfidCertificateEx."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidCertificateEx."); + + if (fileName.IsSet && fileName.Value == null) + throw new ArgumentNullException(nameof(fileName), "Property is not nullable for class RfidCertificateEx."); + + if (pAStatus.IsSet && pAStatus.Value == null) + throw new ArgumentNullException(nameof(pAStatus), "Property is not nullable for class RfidCertificateEx."); + + return new RfidCertificateEx(varVersion.Value!.Value!, serialNumber.Value!, signatureAlgorithm.Value!, issuer.Value!, validity.Value!, subject.Value!, subjectPKAlgorithm.Value!, extensions.Value!, notifications.Value!, origin.Value!.Value!, type.Value!.Value!, fileName.Value!, pAStatus.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidCertificateEx rfidCertificateEx, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidCertificateEx, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidCertificateEx rfidCertificateEx, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidCertificateEx.SerialNumber == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.SerialNumber), "Property is required for class RfidCertificateEx."); + + if (rfidCertificateEx.SignatureAlgorithm == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.SignatureAlgorithm), "Property is required for class RfidCertificateEx."); + + if (rfidCertificateEx.Issuer == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.Issuer), "Property is required for class RfidCertificateEx."); + + if (rfidCertificateEx.Validity == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.Validity), "Property is required for class RfidCertificateEx."); + + if (rfidCertificateEx.Subject == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.Subject), "Property is required for class RfidCertificateEx."); + + if (rfidCertificateEx.SubjectPKAlgorithm == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.SubjectPKAlgorithm), "Property is required for class RfidCertificateEx."); + + if (rfidCertificateEx.Extensions == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.Extensions), "Property is required for class RfidCertificateEx."); + + if (rfidCertificateEx.Notifications == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.Notifications), "Property is required for class RfidCertificateEx."); + + if (rfidCertificateEx.FileName == null) + throw new ArgumentNullException(nameof(rfidCertificateEx.FileName), "Property is required for class RfidCertificateEx."); + + writer.WriteNumber("Version", rfidCertificateEx.VarVersion); + + writer.WriteString("SerialNumber", rfidCertificateEx.SerialNumber); + + writer.WriteString("SignatureAlgorithm", rfidCertificateEx.SignatureAlgorithm); + + writer.WritePropertyName("Issuer"); + JsonSerializer.Serialize(writer, rfidCertificateEx.Issuer, jsonSerializerOptions); + writer.WritePropertyName("Validity"); + JsonSerializer.Serialize(writer, rfidCertificateEx.Validity, jsonSerializerOptions); + writer.WritePropertyName("Subject"); + JsonSerializer.Serialize(writer, rfidCertificateEx.Subject, jsonSerializerOptions); + writer.WriteString("SubjectPKAlgorithm", rfidCertificateEx.SubjectPKAlgorithm); + + writer.WritePropertyName("Extensions"); + JsonSerializer.Serialize(writer, rfidCertificateEx.Extensions, jsonSerializerOptions); + writer.WritePropertyName("Notifications"); + JsonSerializer.Serialize(writer, rfidCertificateEx.Notifications, jsonSerializerOptions); + var originRawValue = RfidCertificateOriginValueConverter.ToJsonValue(rfidCertificateEx.Origin); + writer.WriteNumber("Origin", originRawValue); + + var typeRawValue = RfidCertificateTypeValueConverter.ToJsonValue(rfidCertificateEx.Type); + writer.WriteNumber("Type", typeRawValue); + + writer.WritePropertyName("FileName"); + JsonSerializer.Serialize(writer, rfidCertificateEx.FileName, jsonSerializerOptions); + var pAStatusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidCertificateEx.PAStatus); + writer.WriteNumber("PA_Status", pAStatusRawValue); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs new file mode 100644 index 0000000..e56b95f --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs @@ -0,0 +1,247 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants that define the source of certificate used in the procedure of document security object digital signature verification + /// + /// Enumeration contains a set of constants that define the source of certificate used in the procedure of document security object digital signature verification + public enum RfidCertificateOrigin + { + /// + /// Enum UNDEFINED for value: 0 + /// + UNDEFINED = 0, + + /// + /// Enum PKD for value: 1 + /// + PKD = 1, + + /// + /// Enum SECURITY_OBJECT for value: 2 + /// + SECURITY_OBJECT = 2, + + /// + /// Enum USER_DEFINED for value: 3 + /// + USER_DEFINED = 3, + + /// + /// Enum MASTER_LIST_PKD for value: 4 + /// + MASTER_LIST_PKD = 4, + + /// + /// Enum MASTER_LIST_SO for value: 5 + /// + MASTER_LIST_SO = 5, + + /// + /// Enum DEFECT_LIST_SO for value: 6 + /// + DEFECT_LIST_SO = 6, + + /// + /// Enum DEVIATION_LIST_SO for value: 7 + /// + DEVIATION_LIST_SO = 7, + + /// + /// Enum BLACK_LIST_SO for value: 8 + /// + BLACK_LIST_SO = 8 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidCertificateOriginValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidCertificateOrigin FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidCertificateOrigin.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidCertificateOrigin.PKD; + + if (value.Equals((2).ToString())) + return RfidCertificateOrigin.SECURITY_OBJECT; + + if (value.Equals((3).ToString())) + return RfidCertificateOrigin.USER_DEFINED; + + if (value.Equals((4).ToString())) + return RfidCertificateOrigin.MASTER_LIST_PKD; + + if (value.Equals((5).ToString())) + return RfidCertificateOrigin.MASTER_LIST_SO; + + if (value.Equals((6).ToString())) + return RfidCertificateOrigin.DEFECT_LIST_SO; + + if (value.Equals((7).ToString())) + return RfidCertificateOrigin.DEVIATION_LIST_SO; + + if (value.Equals((8).ToString())) + return RfidCertificateOrigin.BLACK_LIST_SO; + + throw new NotImplementedException($"Could not convert value to type RfidCertificateOrigin: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidCertificateOrigin? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidCertificateOrigin.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidCertificateOrigin.PKD; + + if (value.Equals((2).ToString())) + return RfidCertificateOrigin.SECURITY_OBJECT; + + if (value.Equals((3).ToString())) + return RfidCertificateOrigin.USER_DEFINED; + + if (value.Equals((4).ToString())) + return RfidCertificateOrigin.MASTER_LIST_PKD; + + if (value.Equals((5).ToString())) + return RfidCertificateOrigin.MASTER_LIST_SO; + + if (value.Equals((6).ToString())) + return RfidCertificateOrigin.DEFECT_LIST_SO; + + if (value.Equals((7).ToString())) + return RfidCertificateOrigin.DEVIATION_LIST_SO; + + if (value.Equals((8).ToString())) + return RfidCertificateOrigin.BLACK_LIST_SO; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidCertificateOrigin value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidCertificateOriginJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidCertificateOrigin Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidCertificateOrigin? result = rawValue == null + ? null + : RfidCertificateOriginValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidCertificateOrigin to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidCertificateOrigin rfidCertificateOrigin, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidCertificateOrigin.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidCertificateOriginNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidCertificateOrigin from the Json object + /// + /// + /// + /// + /// + public override RfidCertificateOrigin? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidCertificateOrigin? result = rawValue == null + ? null + : RfidCertificateOriginValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidCertificateOrigin? rfidCertificateOrigin, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidCertificateOrigin?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs new file mode 100644 index 0000000..c7934bb --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs @@ -0,0 +1,236 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants that define the type of certificate used in the procedure of document security object digital signature verification + /// + /// Enumeration contains a set of constants that define the type of certificate used in the procedure of document security object digital signature verification + public enum RfidCertificateType + { + /// + /// Enum UNDEFINED for value: 0 + /// + UNDEFINED = 0, + + /// + /// Enum CSCA for value: 1 + /// + CSCA = 1, + + /// + /// Enum CSCA_LINK for value: 2 + /// + CSCA_LINK = 2, + + /// + /// Enum DS for value: 3 + /// + DS = 3, + + /// + /// Enum MLS for value: 4 + /// + MLS = 4, + + /// + /// Enum DEV_LS for value: 5 + /// + DEV_LS = 5, + + /// + /// Enum DEF_LS for value: 6 + /// + DEF_LS = 6, + + /// + /// Enum BLS for value: 7 + /// + BLS = 7 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidCertificateTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidCertificateType FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidCertificateType.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidCertificateType.CSCA; + + if (value.Equals((2).ToString())) + return RfidCertificateType.CSCA_LINK; + + if (value.Equals((3).ToString())) + return RfidCertificateType.DS; + + if (value.Equals((4).ToString())) + return RfidCertificateType.MLS; + + if (value.Equals((5).ToString())) + return RfidCertificateType.DEV_LS; + + if (value.Equals((6).ToString())) + return RfidCertificateType.DEF_LS; + + if (value.Equals((7).ToString())) + return RfidCertificateType.BLS; + + throw new NotImplementedException($"Could not convert value to type RfidCertificateType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidCertificateType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidCertificateType.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidCertificateType.CSCA; + + if (value.Equals((2).ToString())) + return RfidCertificateType.CSCA_LINK; + + if (value.Equals((3).ToString())) + return RfidCertificateType.DS; + + if (value.Equals((4).ToString())) + return RfidCertificateType.MLS; + + if (value.Equals((5).ToString())) + return RfidCertificateType.DEV_LS; + + if (value.Equals((6).ToString())) + return RfidCertificateType.DEF_LS; + + if (value.Equals((7).ToString())) + return RfidCertificateType.BLS; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidCertificateType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidCertificateTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidCertificateType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidCertificateType? result = rawValue == null + ? null + : RfidCertificateTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidCertificateType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidCertificateType rfidCertificateType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidCertificateType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidCertificateTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidCertificateType from the Json object + /// + /// + /// + /// + /// + public override RfidCertificateType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidCertificateType? result = rawValue == null + ? null + : RfidCertificateTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidCertificateType? rfidCertificateType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidCertificateType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs new file mode 100644 index 0000000..547f0f7 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs @@ -0,0 +1,527 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure used to store the contents of EF.DG1 informational data group of ePassport application – document MRZ data + /// + public partial class RfidDG1 : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// type + /// documentID + /// Symbolic code of document type + /// Symbolic code of document issuing state + /// DO’s name and surname + /// Document number + /// Check digit of document number + /// Symbolic code of DO’s nationality + /// DO’s date of birth + /// Check digit of DO’s date of birth + /// DO’s sex + /// Term of validity of the document + /// Check digit of term of validity of the document + /// DO’s personal number or other additional data + /// Check digit of additional data + /// General check digit + [JsonConstructor] + public RfidDG1(RfidDataGroupTypeTag type, DocumentFormat documentID, string documentType, string state, string holder, string documentNumber, decimal checkDigitDocumentNumber, string nationality, string birthday, decimal checkDigitBirthday, string sex, string expiryDate, decimal checkDigitExpiryDate, string optionalData, decimal checkDigitOptionalData, decimal checkDigitComposite) + { + Type = type; + DocumentID = documentID; + DocumentType = documentType; + State = state; + Holder = holder; + DocumentNumber = documentNumber; + CheckDigitDocumentNumber = checkDigitDocumentNumber; + Nationality = nationality; + Birthday = birthday; + CheckDigitBirthday = checkDigitBirthday; + Sex = sex; + ExpiryDate = expiryDate; + CheckDigitExpiryDate = checkDigitExpiryDate; + OptionalData = optionalData; + CheckDigitOptionalData = checkDigitOptionalData; + CheckDigitComposite = checkDigitComposite; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Type + /// + [JsonPropertyName("Type")] + public RfidDataGroupTypeTag Type { get; set; } + + /// + /// Gets or Sets DocumentID + /// + [JsonPropertyName("DocumentID")] + public DocumentFormat DocumentID { get; set; } + + /// + /// Symbolic code of document type + /// + /// Symbolic code of document type + [JsonPropertyName("DocumentType")] + public string DocumentType { get; set; } + + /// + /// Symbolic code of document issuing state + /// + /// Symbolic code of document issuing state + [JsonPropertyName("State")] + public string State { get; set; } + + /// + /// DO’s name and surname + /// + /// DO’s name and surname + [JsonPropertyName("Holder")] + public string Holder { get; set; } + + /// + /// Document number + /// + /// Document number + [JsonPropertyName("DocumentNumber")] + public string DocumentNumber { get; set; } + + /// + /// Check digit of document number + /// + /// Check digit of document number + [JsonPropertyName("CheckDigitDocumentNumber")] + public decimal CheckDigitDocumentNumber { get; set; } + + /// + /// Symbolic code of DO’s nationality + /// + /// Symbolic code of DO’s nationality + [JsonPropertyName("Nationality")] + public string Nationality { get; set; } + + /// + /// DO’s date of birth + /// + /// DO’s date of birth + [JsonPropertyName("Birthday")] + public string Birthday { get; set; } + + /// + /// Check digit of DO’s date of birth + /// + /// Check digit of DO’s date of birth + [JsonPropertyName("CheckDigitBirthday")] + public decimal CheckDigitBirthday { get; set; } + + /// + /// DO’s sex + /// + /// DO’s sex + [JsonPropertyName("Sex")] + public string Sex { get; set; } + + /// + /// Term of validity of the document + /// + /// Term of validity of the document + [JsonPropertyName("ExpiryDate")] + public string ExpiryDate { get; set; } + + /// + /// Check digit of term of validity of the document + /// + /// Check digit of term of validity of the document + [JsonPropertyName("CheckDigitExpiryDate")] + public decimal CheckDigitExpiryDate { get; set; } + + /// + /// DO’s personal number or other additional data + /// + /// DO’s personal number or other additional data + [JsonPropertyName("OptionalData")] + public string OptionalData { get; set; } + + /// + /// Check digit of additional data + /// + /// Check digit of additional data + [JsonPropertyName("CheckDigitOptionalData")] + public decimal CheckDigitOptionalData { get; set; } + + /// + /// General check digit + /// + /// General check digit + [JsonPropertyName("CheckDigitComposite")] + public decimal CheckDigitComposite { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidDG1 {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" DocumentID: ").Append(DocumentID).Append("\n"); + sb.Append(" DocumentType: ").Append(DocumentType).Append("\n"); + sb.Append(" State: ").Append(State).Append("\n"); + sb.Append(" Holder: ").Append(Holder).Append("\n"); + sb.Append(" DocumentNumber: ").Append(DocumentNumber).Append("\n"); + sb.Append(" CheckDigitDocumentNumber: ").Append(CheckDigitDocumentNumber).Append("\n"); + sb.Append(" Nationality: ").Append(Nationality).Append("\n"); + sb.Append(" Birthday: ").Append(Birthday).Append("\n"); + sb.Append(" CheckDigitBirthday: ").Append(CheckDigitBirthday).Append("\n"); + sb.Append(" Sex: ").Append(Sex).Append("\n"); + sb.Append(" ExpiryDate: ").Append(ExpiryDate).Append("\n"); + sb.Append(" CheckDigitExpiryDate: ").Append(CheckDigitExpiryDate).Append("\n"); + sb.Append(" OptionalData: ").Append(OptionalData).Append("\n"); + sb.Append(" CheckDigitOptionalData: ").Append(CheckDigitOptionalData).Append("\n"); + sb.Append(" CheckDigitComposite: ").Append(CheckDigitComposite).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidDG1JsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidDG1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option documentID = default; + Option documentType = default; + Option state = default; + Option holder = default; + Option documentNumber = default; + Option checkDigitDocumentNumber = default; + Option nationality = default; + Option birthday = default; + Option checkDigitBirthday = default; + Option sex = default; + Option expiryDate = default; + Option checkDigitExpiryDate = default; + Option optionalData = default; + Option checkDigitOptionalData = default; + Option checkDigitComposite = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + string? typeRawValue = utf8JsonReader.GetString(); + if (typeRawValue != null) + type = new Option(RfidDataGroupTypeTagValueConverter.FromStringOrDefault(typeRawValue)); + break; + case "DocumentID": + string? documentIDRawValue = utf8JsonReader.GetString(); + if (documentIDRawValue != null) + documentID = new Option(DocumentFormatValueConverter.FromStringOrDefault(documentIDRawValue)); + break; + case "DocumentType": + documentType = new Option(utf8JsonReader.GetString()!); + break; + case "State": + state = new Option(utf8JsonReader.GetString()!); + break; + case "Holder": + holder = new Option(utf8JsonReader.GetString()!); + break; + case "DocumentNumber": + documentNumber = new Option(utf8JsonReader.GetString()!); + break; + case "CheckDigitDocumentNumber": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkDigitDocumentNumber = new Option(utf8JsonReader.GetDecimal()); + break; + case "Nationality": + nationality = new Option(utf8JsonReader.GetString()!); + break; + case "Birthday": + birthday = new Option(utf8JsonReader.GetString()!); + break; + case "CheckDigitBirthday": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkDigitBirthday = new Option(utf8JsonReader.GetDecimal()); + break; + case "Sex": + sex = new Option(utf8JsonReader.GetString()!); + break; + case "ExpiryDate": + expiryDate = new Option(utf8JsonReader.GetString()!); + break; + case "CheckDigitExpiryDate": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkDigitExpiryDate = new Option(utf8JsonReader.GetDecimal()); + break; + case "OptionalData": + optionalData = new Option(utf8JsonReader.GetString()!); + break; + case "CheckDigitOptionalData": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkDigitOptionalData = new Option(utf8JsonReader.GetDecimal()); + break; + case "CheckDigitComposite": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkDigitComposite = new Option(utf8JsonReader.GetDecimal()); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(type)); + + if (!documentID.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(documentID)); + + if (!documentType.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(documentType)); + + if (!state.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(state)); + + if (!holder.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(holder)); + + if (!documentNumber.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(documentNumber)); + + if (!checkDigitDocumentNumber.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitDocumentNumber)); + + if (!nationality.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(nationality)); + + if (!birthday.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(birthday)); + + if (!checkDigitBirthday.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitBirthday)); + + if (!sex.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(sex)); + + if (!expiryDate.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(expiryDate)); + + if (!checkDigitExpiryDate.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitExpiryDate)); + + if (!optionalData.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(optionalData)); + + if (!checkDigitOptionalData.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitOptionalData)); + + if (!checkDigitComposite.IsSet) + throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitComposite)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidDG1."); + + if (documentID.IsSet && documentID.Value == null) + throw new ArgumentNullException(nameof(documentID), "Property is not nullable for class RfidDG1."); + + if (documentType.IsSet && documentType.Value == null) + throw new ArgumentNullException(nameof(documentType), "Property is not nullable for class RfidDG1."); + + if (state.IsSet && state.Value == null) + throw new ArgumentNullException(nameof(state), "Property is not nullable for class RfidDG1."); + + if (holder.IsSet && holder.Value == null) + throw new ArgumentNullException(nameof(holder), "Property is not nullable for class RfidDG1."); + + if (documentNumber.IsSet && documentNumber.Value == null) + throw new ArgumentNullException(nameof(documentNumber), "Property is not nullable for class RfidDG1."); + + if (checkDigitDocumentNumber.IsSet && checkDigitDocumentNumber.Value == null) + throw new ArgumentNullException(nameof(checkDigitDocumentNumber), "Property is not nullable for class RfidDG1."); + + if (nationality.IsSet && nationality.Value == null) + throw new ArgumentNullException(nameof(nationality), "Property is not nullable for class RfidDG1."); + + if (birthday.IsSet && birthday.Value == null) + throw new ArgumentNullException(nameof(birthday), "Property is not nullable for class RfidDG1."); + + if (checkDigitBirthday.IsSet && checkDigitBirthday.Value == null) + throw new ArgumentNullException(nameof(checkDigitBirthday), "Property is not nullable for class RfidDG1."); + + if (sex.IsSet && sex.Value == null) + throw new ArgumentNullException(nameof(sex), "Property is not nullable for class RfidDG1."); + + if (expiryDate.IsSet && expiryDate.Value == null) + throw new ArgumentNullException(nameof(expiryDate), "Property is not nullable for class RfidDG1."); + + if (checkDigitExpiryDate.IsSet && checkDigitExpiryDate.Value == null) + throw new ArgumentNullException(nameof(checkDigitExpiryDate), "Property is not nullable for class RfidDG1."); + + if (optionalData.IsSet && optionalData.Value == null) + throw new ArgumentNullException(nameof(optionalData), "Property is not nullable for class RfidDG1."); + + if (checkDigitOptionalData.IsSet && checkDigitOptionalData.Value == null) + throw new ArgumentNullException(nameof(checkDigitOptionalData), "Property is not nullable for class RfidDG1."); + + if (checkDigitComposite.IsSet && checkDigitComposite.Value == null) + throw new ArgumentNullException(nameof(checkDigitComposite), "Property is not nullable for class RfidDG1."); + + return new RfidDG1(type.Value!.Value!, documentID.Value!.Value!, documentType.Value!, state.Value!, holder.Value!, documentNumber.Value!, checkDigitDocumentNumber.Value!.Value!, nationality.Value!, birthday.Value!, checkDigitBirthday.Value!.Value!, sex.Value!, expiryDate.Value!, checkDigitExpiryDate.Value!.Value!, optionalData.Value!, checkDigitOptionalData.Value!.Value!, checkDigitComposite.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidDG1 rfidDG1, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidDG1, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidDG1 rfidDG1, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidDG1.DocumentType == null) + throw new ArgumentNullException(nameof(rfidDG1.DocumentType), "Property is required for class RfidDG1."); + + if (rfidDG1.State == null) + throw new ArgumentNullException(nameof(rfidDG1.State), "Property is required for class RfidDG1."); + + if (rfidDG1.Holder == null) + throw new ArgumentNullException(nameof(rfidDG1.Holder), "Property is required for class RfidDG1."); + + if (rfidDG1.DocumentNumber == null) + throw new ArgumentNullException(nameof(rfidDG1.DocumentNumber), "Property is required for class RfidDG1."); + + if (rfidDG1.Nationality == null) + throw new ArgumentNullException(nameof(rfidDG1.Nationality), "Property is required for class RfidDG1."); + + if (rfidDG1.Birthday == null) + throw new ArgumentNullException(nameof(rfidDG1.Birthday), "Property is required for class RfidDG1."); + + if (rfidDG1.Sex == null) + throw new ArgumentNullException(nameof(rfidDG1.Sex), "Property is required for class RfidDG1."); + + if (rfidDG1.ExpiryDate == null) + throw new ArgumentNullException(nameof(rfidDG1.ExpiryDate), "Property is required for class RfidDG1."); + + if (rfidDG1.OptionalData == null) + throw new ArgumentNullException(nameof(rfidDG1.OptionalData), "Property is required for class RfidDG1."); + + var typeRawValue = RfidDataGroupTypeTagValueConverter.ToJsonValue(rfidDG1.Type); + writer.WriteNumber("Type", typeRawValue); + + var documentIDRawValue = DocumentFormatValueConverter.ToJsonValue(rfidDG1.DocumentID); + writer.WriteNumber("DocumentID", documentIDRawValue); + + writer.WriteString("DocumentType", rfidDG1.DocumentType); + + writer.WriteString("State", rfidDG1.State); + + writer.WriteString("Holder", rfidDG1.Holder); + + writer.WriteString("DocumentNumber", rfidDG1.DocumentNumber); + + writer.WriteNumber("CheckDigitDocumentNumber", rfidDG1.CheckDigitDocumentNumber); + + writer.WriteString("Nationality", rfidDG1.Nationality); + + writer.WriteString("Birthday", rfidDG1.Birthday); + + writer.WriteNumber("CheckDigitBirthday", rfidDG1.CheckDigitBirthday); + + writer.WriteString("Sex", rfidDG1.Sex); + + writer.WriteString("ExpiryDate", rfidDG1.ExpiryDate); + + writer.WriteNumber("CheckDigitExpiryDate", rfidDG1.CheckDigitExpiryDate); + + writer.WriteString("OptionalData", rfidDG1.OptionalData); + + writer.WriteNumber("CheckDigitOptionalData", rfidDG1.CheckDigitOptionalData); + + writer.WriteNumber("CheckDigitComposite", rfidDG1.CheckDigitComposite); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs new file mode 100644 index 0000000..b7220af --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs @@ -0,0 +1,504 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the contents of a single file of the LDS of electronic document and the analysis of its contents within the context of the communication session with electronic document + /// + public partial class RfidDataFile : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// type + /// readingStatus + /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) + /// fileData + /// Time of reading, milliseconds + /// pAStatus + /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. + /// List of document text fields formed on the basis of the file contents + /// List of document graphic fields formed on the basis of the file contents + /// List of the original binary representation of graphic document fields formed on the basis of the file contents + /// parsedData + /// securityObjectCertificates + [JsonConstructor] + public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option fileID = default, Option fileData = default, Option readingTime = default, Option pAStatus = default, Option?> notifications = default, Option?> docFieldsText = default, Option?> docFieldsGraphics = default, Option?> docFieldsOriginals = default, Option parsedData = default, Option securityObjectCertificates = default) + { + Type = type; + ReadingStatus = readingStatus; + FileIDOption = fileID; + FileDataOption = fileData; + ReadingTimeOption = readingTime; + PAStatusOption = pAStatus; + NotificationsOption = notifications; + DocFieldsTextOption = docFieldsText; + DocFieldsGraphicsOption = docFieldsGraphics; + DocFieldsOriginalsOption = docFieldsOriginals; + ParsedDataOption = parsedData; + SecurityObjectCertificatesOption = securityObjectCertificates; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Type + /// + [JsonPropertyName("Type")] + public RfidDataFileType Type { get; set; } + + /// + /// Gets or Sets ReadingStatus + /// + [JsonPropertyName("ReadingStatus")] + public RFIDErrorCodes ReadingStatus { get; set; } + + /// + /// Used to track the state of PAStatus + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option PAStatusOption { get; private set; } + + /// + /// Gets or Sets PAStatus + /// + [JsonPropertyName("PA_Status")] + public RFIDErrorCodes? PAStatus { get { return this.PAStatusOption; } set { this.PAStatusOption = new(value); } } + + /// + /// Used to track the state of FileID + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FileIDOption { get; private set; } + + /// + /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) + /// + /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) + [JsonPropertyName("FileID")] + public string? FileID { get { return this.FileIDOption; } set { this.FileIDOption = new(value); } } + + /// + /// Used to track the state of FileData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FileDataOption { get; private set; } + + /// + /// Gets or Sets FileData + /// + [JsonPropertyName("FileData")] + public TrfFtBytes? FileData { get { return this.FileDataOption; } set { this.FileDataOption = new(value); } } + + /// + /// Used to track the state of ReadingTime + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ReadingTimeOption { get; private set; } + + /// + /// Time of reading, milliseconds + /// + /// Time of reading, milliseconds + [JsonPropertyName("ReadingTime")] + public decimal? ReadingTime { get { return this.ReadingTimeOption; } set { this.ReadingTimeOption = new(value); } } + + /// + /// Used to track the state of Notifications + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> NotificationsOption { get; private set; } + + /// + /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. + /// + /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. + [JsonPropertyName("Notifications")] + public List? Notifications { get { return this.NotificationsOption; } set { this.NotificationsOption = new(value); } } + + /// + /// Used to track the state of DocFieldsText + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> DocFieldsTextOption { get; private set; } + + /// + /// List of document text fields formed on the basis of the file contents + /// + /// List of document text fields formed on the basis of the file contents + [JsonPropertyName("DocFields_Text")] + public List? DocFieldsText { get { return this.DocFieldsTextOption; } set { this.DocFieldsTextOption = new(value); } } + + /// + /// Used to track the state of DocFieldsGraphics + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> DocFieldsGraphicsOption { get; private set; } + + /// + /// List of document graphic fields formed on the basis of the file contents + /// + /// List of document graphic fields formed on the basis of the file contents + [JsonPropertyName("DocFields_Graphics")] + public List? DocFieldsGraphics { get { return this.DocFieldsGraphicsOption; } set { this.DocFieldsGraphicsOption = new(value); } } + + /// + /// Used to track the state of DocFieldsOriginals + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> DocFieldsOriginalsOption { get; private set; } + + /// + /// List of the original binary representation of graphic document fields formed on the basis of the file contents + /// + /// List of the original binary representation of graphic document fields formed on the basis of the file contents + [JsonPropertyName("DocFields_Originals")] + public List? DocFieldsOriginals { get { return this.DocFieldsOriginalsOption; } set { this.DocFieldsOriginalsOption = new(value); } } + + /// + /// Used to track the state of ParsedData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ParsedDataOption { get; private set; } + + /// + /// Gets or Sets ParsedData + /// + [JsonPropertyName("ParsedData")] + public ParsedData? ParsedData { get { return this.ParsedDataOption; } set { this.ParsedDataOption = new(value); } } + + /// + /// Used to track the state of SecurityObjectCertificates + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SecurityObjectCertificatesOption { get; private set; } + + /// + /// Gets or Sets SecurityObjectCertificates + /// + [JsonPropertyName("SecurityObject_Certificates")] + public SecurityObjectCertificates? SecurityObjectCertificates { get { return this.SecurityObjectCertificatesOption; } set { this.SecurityObjectCertificatesOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidDataFile {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" ReadingStatus: ").Append(ReadingStatus).Append("\n"); + sb.Append(" FileID: ").Append(FileID).Append("\n"); + sb.Append(" FileData: ").Append(FileData).Append("\n"); + sb.Append(" ReadingTime: ").Append(ReadingTime).Append("\n"); + sb.Append(" PAStatus: ").Append(PAStatus).Append("\n"); + sb.Append(" Notifications: ").Append(Notifications).Append("\n"); + sb.Append(" DocFieldsText: ").Append(DocFieldsText).Append("\n"); + sb.Append(" DocFieldsGraphics: ").Append(DocFieldsGraphics).Append("\n"); + sb.Append(" DocFieldsOriginals: ").Append(DocFieldsOriginals).Append("\n"); + sb.Append(" ParsedData: ").Append(ParsedData).Append("\n"); + sb.Append(" SecurityObjectCertificates: ").Append(SecurityObjectCertificates).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidDataFileJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidDataFile Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option readingStatus = default; + Option fileID = default; + Option fileData = default; + Option readingTime = default; + Option pAStatus = default; + Option?> notifications = default; + Option?> docFieldsText = default; + Option?> docFieldsGraphics = default; + Option?> docFieldsOriginals = default; + Option parsedData = default; + Option securityObjectCertificates = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + string? typeRawValue = utf8JsonReader.GetString(); + if (typeRawValue != null) + type = new Option(RfidDataFileTypeValueConverter.FromStringOrDefault(typeRawValue)); + break; + case "ReadingStatus": + string? readingStatusRawValue = utf8JsonReader.GetString(); + if (readingStatusRawValue != null) + readingStatus = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(readingStatusRawValue)); + break; + case "FileID": + fileID = new Option(utf8JsonReader.GetString()!); + break; + case "FileData": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fileData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "ReadingTime": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + readingTime = new Option(utf8JsonReader.GetDecimal()); + break; + case "PA_Status": + string? pAStatusRawValue = utf8JsonReader.GetString(); + if (pAStatusRawValue != null) + pAStatus = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(pAStatusRawValue)); + break; + case "Notifications": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "DocFields_Text": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docFieldsText = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "DocFields_Graphics": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docFieldsGraphics = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "DocFields_Originals": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docFieldsOriginals = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "ParsedData": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + parsedData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SecurityObject_Certificates": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + securityObjectCertificates = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class RfidDataFile.", nameof(type)); + + if (!readingStatus.IsSet) + throw new ArgumentException("Property is required for class RfidDataFile.", nameof(readingStatus)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidDataFile."); + + if (readingStatus.IsSet && readingStatus.Value == null) + throw new ArgumentNullException(nameof(readingStatus), "Property is not nullable for class RfidDataFile."); + + if (fileID.IsSet && fileID.Value == null) + throw new ArgumentNullException(nameof(fileID), "Property is not nullable for class RfidDataFile."); + + if (fileData.IsSet && fileData.Value == null) + throw new ArgumentNullException(nameof(fileData), "Property is not nullable for class RfidDataFile."); + + if (readingTime.IsSet && readingTime.Value == null) + throw new ArgumentNullException(nameof(readingTime), "Property is not nullable for class RfidDataFile."); + + if (pAStatus.IsSet && pAStatus.Value == null) + throw new ArgumentNullException(nameof(pAStatus), "Property is not nullable for class RfidDataFile."); + + if (notifications.IsSet && notifications.Value == null) + throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidDataFile."); + + if (docFieldsText.IsSet && docFieldsText.Value == null) + throw new ArgumentNullException(nameof(docFieldsText), "Property is not nullable for class RfidDataFile."); + + if (docFieldsGraphics.IsSet && docFieldsGraphics.Value == null) + throw new ArgumentNullException(nameof(docFieldsGraphics), "Property is not nullable for class RfidDataFile."); + + if (docFieldsOriginals.IsSet && docFieldsOriginals.Value == null) + throw new ArgumentNullException(nameof(docFieldsOriginals), "Property is not nullable for class RfidDataFile."); + + if (parsedData.IsSet && parsedData.Value == null) + throw new ArgumentNullException(nameof(parsedData), "Property is not nullable for class RfidDataFile."); + + if (securityObjectCertificates.IsSet && securityObjectCertificates.Value == null) + throw new ArgumentNullException(nameof(securityObjectCertificates), "Property is not nullable for class RfidDataFile."); + + return new RfidDataFile(type.Value!.Value!, readingStatus.Value!.Value!, fileID, fileData, readingTime, pAStatus, notifications, docFieldsText, docFieldsGraphics, docFieldsOriginals, parsedData, securityObjectCertificates); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidDataFile rfidDataFile, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidDataFile, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidDataFile rfidDataFile, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidDataFile.FileIDOption.IsSet && rfidDataFile.FileID == null) + throw new ArgumentNullException(nameof(rfidDataFile.FileID), "Property is required for class RfidDataFile."); + + if (rfidDataFile.FileDataOption.IsSet && rfidDataFile.FileData == null) + throw new ArgumentNullException(nameof(rfidDataFile.FileData), "Property is required for class RfidDataFile."); + + if (rfidDataFile.NotificationsOption.IsSet && rfidDataFile.Notifications == null) + throw new ArgumentNullException(nameof(rfidDataFile.Notifications), "Property is required for class RfidDataFile."); + + if (rfidDataFile.DocFieldsTextOption.IsSet && rfidDataFile.DocFieldsText == null) + throw new ArgumentNullException(nameof(rfidDataFile.DocFieldsText), "Property is required for class RfidDataFile."); + + if (rfidDataFile.DocFieldsGraphicsOption.IsSet && rfidDataFile.DocFieldsGraphics == null) + throw new ArgumentNullException(nameof(rfidDataFile.DocFieldsGraphics), "Property is required for class RfidDataFile."); + + if (rfidDataFile.DocFieldsOriginalsOption.IsSet && rfidDataFile.DocFieldsOriginals == null) + throw new ArgumentNullException(nameof(rfidDataFile.DocFieldsOriginals), "Property is required for class RfidDataFile."); + + if (rfidDataFile.ParsedDataOption.IsSet && rfidDataFile.ParsedData == null) + throw new ArgumentNullException(nameof(rfidDataFile.ParsedData), "Property is required for class RfidDataFile."); + + if (rfidDataFile.SecurityObjectCertificatesOption.IsSet && rfidDataFile.SecurityObjectCertificates == null) + throw new ArgumentNullException(nameof(rfidDataFile.SecurityObjectCertificates), "Property is required for class RfidDataFile."); + + var typeRawValue = RfidDataFileTypeValueConverter.ToJsonValue(rfidDataFile.Type); + writer.WriteNumber("Type", typeRawValue); + + var readingStatusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidDataFile.ReadingStatus); + writer.WriteNumber("ReadingStatus", readingStatusRawValue); + + if (rfidDataFile.FileIDOption.IsSet) + writer.WriteString("FileID", rfidDataFile.FileID); + + if (rfidDataFile.FileDataOption.IsSet) + { + writer.WritePropertyName("FileData"); + JsonSerializer.Serialize(writer, rfidDataFile.FileData, jsonSerializerOptions); + } + if (rfidDataFile.ReadingTimeOption.IsSet) + writer.WriteNumber("ReadingTime", rfidDataFile.ReadingTimeOption.Value!.Value); + + if (rfidDataFile.PAStatusOption.IsSet) + { + var pAStatusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidDataFile.PAStatus!.Value); + writer.WriteNumber("PA_Status", pAStatusRawValue); + } + if (rfidDataFile.NotificationsOption.IsSet) + { + writer.WritePropertyName("Notifications"); + JsonSerializer.Serialize(writer, rfidDataFile.Notifications, jsonSerializerOptions); + } + if (rfidDataFile.DocFieldsTextOption.IsSet) + { + writer.WritePropertyName("DocFields_Text"); + JsonSerializer.Serialize(writer, rfidDataFile.DocFieldsText, jsonSerializerOptions); + } + if (rfidDataFile.DocFieldsGraphicsOption.IsSet) + { + writer.WritePropertyName("DocFields_Graphics"); + JsonSerializer.Serialize(writer, rfidDataFile.DocFieldsGraphics, jsonSerializerOptions); + } + if (rfidDataFile.DocFieldsOriginalsOption.IsSet) + { + writer.WritePropertyName("DocFields_Originals"); + JsonSerializer.Serialize(writer, rfidDataFile.DocFieldsOriginals, jsonSerializerOptions); + } + if (rfidDataFile.ParsedDataOption.IsSet) + { + writer.WritePropertyName("ParsedData"); + JsonSerializer.Serialize(writer, rfidDataFile.ParsedData, jsonSerializerOptions); + } + if (rfidDataFile.SecurityObjectCertificatesOption.IsSet) + { + writer.WritePropertyName("SecurityObject_Certificates"); + JsonSerializer.Serialize(writer, rfidDataFile.SecurityObjectCertificates, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs new file mode 100644 index 0000000..827d29c --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs @@ -0,0 +1,1160 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants that define the file type (or logical belonging of the data object) within the context of the communication session with electronic document + /// + /// Enumeration contains a set of constants that define the file type (or logical belonging of the data object) within the context of the communication session with electronic document + public enum RfidDataFileType + { + /// + /// Enum UNSPECIFIED for value: 0 + /// + UNSPECIFIED = 0, + + /// + /// Enum PASSPORT_DG1 for value: 1 + /// + PASSPORT_DG1 = 1, + + /// + /// Enum PASSPORT_DG2 for value: 2 + /// + PASSPORT_DG2 = 2, + + /// + /// Enum PASSPORT_DG3 for value: 3 + /// + PASSPORT_DG3 = 3, + + /// + /// Enum PASSPORT_DG4 for value: 4 + /// + PASSPORT_DG4 = 4, + + /// + /// Enum PASSPORT_DG5 for value: 5 + /// + PASSPORT_DG5 = 5, + + /// + /// Enum PASSPORT_DG6 for value: 6 + /// + PASSPORT_DG6 = 6, + + /// + /// Enum PASSPORT_DG7 for value: 7 + /// + PASSPORT_DG7 = 7, + + /// + /// Enum PASSPORT_DG8 for value: 8 + /// + PASSPORT_DG8 = 8, + + /// + /// Enum PASSPORT_DG9 for value: 9 + /// + PASSPORT_DG9 = 9, + + /// + /// Enum PASSPORT_DG10 for value: 10 + /// + PASSPORT_DG10 = 10, + + /// + /// Enum PASSPORT_DG11 for value: 11 + /// + PASSPORT_DG11 = 11, + + /// + /// Enum PASSPORT_DG12 for value: 12 + /// + PASSPORT_DG12 = 12, + + /// + /// Enum PASSPORT_DG13 for value: 13 + /// + PASSPORT_DG13 = 13, + + /// + /// Enum PASSPORT_DG14 for value: 14 + /// + PASSPORT_DG14 = 14, + + /// + /// Enum PASSPORT_DG15 for value: 15 + /// + PASSPORT_DG15 = 15, + + /// + /// Enum PASSPORT_DG16 for value: 16 + /// + PASSPORT_DG16 = 16, + + /// + /// Enum PASSPORT_DG17 for value: 17 + /// + PASSPORT_DG17 = 17, + + /// + /// Enum PASSPORT_DG18 for value: 18 + /// + PASSPORT_DG18 = 18, + + /// + /// Enum PASSPORT_DG19 for value: 19 + /// + PASSPORT_DG19 = 19, + + /// + /// Enum PASSPORT_DG20 for value: 20 + /// + PASSPORT_DG20 = 20, + + /// + /// Enum PASSPORT_SOD for value: 21 + /// + PASSPORT_SOD = 21, + + /// + /// Enum PASSPORT_CVCA for value: 22 + /// + PASSPORT_CVCA = 22, + + /// + /// Enum PASSPORT_COM for value: 23 + /// + PASSPORT_COM = 23, + + /// + /// Enum DTC_DG17 for value: 57 + /// + DTC_DG17 = 57, + + /// + /// Enum DTC_DG18 for value: 58 + /// + DTC_DG18 = 58, + + /// + /// Enum DTC_DG22 for value: 62 + /// + DTC_DG22 = 62, + + /// + /// Enum DTC_DG23 for value: 63 + /// + DTC_DG23 = 63, + + /// + /// Enum DTC_DG24 for value: 64 + /// + DTC_DG24 = 64, + + /// + /// Enum ID_DG1 for value: 101 + /// + ID_DG1 = 101, + + /// + /// Enum ID_DG2 for value: 102 + /// + ID_DG2 = 102, + + /// + /// Enum ID_DG3 for value: 103 + /// + ID_DG3 = 103, + + /// + /// Enum ID_DG4 for value: 104 + /// + ID_DG4 = 104, + + /// + /// Enum ID_DG5 for value: 105 + /// + ID_DG5 = 105, + + /// + /// Enum ID_DG6 for value: 106 + /// + ID_DG6 = 106, + + /// + /// Enum ID_DG7 for value: 107 + /// + ID_DG7 = 107, + + /// + /// Enum ID_DG8 for value: 108 + /// + ID_DG8 = 108, + + /// + /// Enum ID_DG9 for value: 109 + /// + ID_DG9 = 109, + + /// + /// Enum ID_DG10 for value: 110 + /// + ID_DG10 = 110, + + /// + /// Enum ID_DG11 for value: 111 + /// + ID_DG11 = 111, + + /// + /// Enum ID_DG12 for value: 112 + /// + ID_DG12 = 112, + + /// + /// Enum ID_DG13 for value: 113 + /// + ID_DG13 = 113, + + /// + /// Enum ID_DG14 for value: 114 + /// + ID_DG14 = 114, + + /// + /// Enum ID_DG15 for value: 115 + /// + ID_DG15 = 115, + + /// + /// Enum ID_DG16 for value: 116 + /// + ID_DG16 = 116, + + /// + /// Enum ID_DG17 for value: 117 + /// + ID_DG17 = 117, + + /// + /// Enum ID_DG18 for value: 118 + /// + ID_DG18 = 118, + + /// + /// Enum ID_DG19 for value: 119 + /// + ID_DG19 = 119, + + /// + /// Enum ID_DG20 for value: 120 + /// + ID_DG20 = 120, + + /// + /// Enum ID_DG21 for value: 121 + /// + ID_DG21 = 121, + + /// + /// Enum DL_COM for value: 150 + /// + DL_COM = 150, + + /// + /// Enum DL_DG1 for value: 151 + /// + DL_DG1 = 151, + + /// + /// Enum DL_DG2 for value: 152 + /// + DL_DG2 = 152, + + /// + /// Enum DL_DG3 for value: 153 + /// + DL_DG3 = 153, + + /// + /// Enum DL_DG4 for value: 154 + /// + DL_DG4 = 154, + + /// + /// Enum DL_DG5 for value: 155 + /// + DL_DG5 = 155, + + /// + /// Enum DL_DG6 for value: 156 + /// + DL_DG6 = 156, + + /// + /// Enum DL_DG7 for value: 157 + /// + DL_DG7 = 157, + + /// + /// Enum DL_DG8 for value: 158 + /// + DL_DG8 = 158, + + /// + /// Enum DL_DG9 for value: 159 + /// + DL_DG9 = 159, + + /// + /// Enum DL_DG10 for value: 160 + /// + DL_DG10 = 160, + + /// + /// Enum DL_DG11 for value: 161 + /// + DL_DG11 = 161, + + /// + /// Enum DL_DG12 for value: 162 + /// + DL_DG12 = 162, + + /// + /// Enum DL_DG13 for value: 163 + /// + DL_DG13 = 163, + + /// + /// Enum DL_DG14 for value: 164 + /// + DL_DG14 = 164, + + /// + /// Enum DL_SOD for value: 165 + /// + DL_SOD = 165, + + /// + /// Enum DL_CE for value: 166 + /// + DL_CE = 166, + + /// + /// Enum DL_CVCA for value: 167 + /// + DL_CVCA = 167, + + /// + /// Enum PACE_CARD_ACCESS for value: 200 + /// + PACE_CARD_ACCESS = 200, + + /// + /// Enum PACE_CARD_SECURITY for value: 201 + /// + PACE_CARD_SECURITY = 201, + + /// + /// Enum PACE_CHIP_SECURITY for value: 202 + /// + PACE_CHIP_SECURITY = 202, + + /// + /// Enum MIFARE_DATA for value: 300 + /// + MIFARE_DATA = 300, + + /// + /// Enum MIFARE_VALIDITY for value: 301 + /// + MIFARE_VALIDITY = 301, + + /// + /// Enum AUTHENTICITY_V2 for value: 302 + /// + AUTHENTICITY_V2 = 302, + + /// + /// Enum ATR for value: 400 + /// + ATR = 400, + + /// + /// Enum _E_SIGN_PK for value: 500 + /// + _E_SIGN_PK = 500, + + /// + /// Enum _E_SIGN_SIGNED_DATA for value: 501 + /// + _E_SIGN_SIGNED_DATA = 501, + + /// + /// Enum CERTIFICATE for value: 600 + /// + CERTIFICATE = 600, + + /// + /// Enum MASTER_LIST for value: 601 + /// + MASTER_LIST = 601, + + /// + /// Enum DEFECT_LIST for value: 602 + /// + DEFECT_LIST = 602, + + /// + /// Enum BLACK_LIST for value: 603 + /// + BLACK_LIST = 603, + + /// + /// Enum APP_DIRECTORY for value: 700 + /// + APP_DIRECTORY = 700, + + /// + /// Enum SESSION for value: 701 + /// + SESSION = 701, + + /// + /// Enum LOG_DATA for value: 702 + /// + LOG_DATA = 702, + + /// + /// Enum CHIP_PROPERTIES for value: 703 + /// + CHIP_PROPERTIES = 703, + + /// + /// Enum POST_CA_RESPONSE for value: 710 + /// + POST_CA_RESPONSE = 710, + + /// + /// Enum POST_CA_PUBLIC_KEY for value: 711 + /// + POST_CA_PUBLIC_KEY = 711, + + /// + /// Enum POST_CA_INFO for value: 712 + /// + POST_CA_INFO = 712, + + /// + /// Enum POST_CA_D_PARAMS for value: 713 + /// + POST_CA_D_PARAMS = 713, + + /// + /// Enum POST_CA_CHECK_PK for value: 714 + /// + POST_CA_CHECK_PK = 714, + + /// + /// Enum POST_CA_CHECK_SK for value: 715 + /// + POST_CA_CHECK_SK = 715, + + /// + /// Enum USER_DEFINED for value: 1000 + /// + USER_DEFINED = 1000 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidDataFileTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidDataFileType FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidDataFileType.UNSPECIFIED; + + if (value.Equals((1).ToString())) + return RfidDataFileType.PASSPORT_DG1; + + if (value.Equals((2).ToString())) + return RfidDataFileType.PASSPORT_DG2; + + if (value.Equals((3).ToString())) + return RfidDataFileType.PASSPORT_DG3; + + if (value.Equals((4).ToString())) + return RfidDataFileType.PASSPORT_DG4; + + if (value.Equals((5).ToString())) + return RfidDataFileType.PASSPORT_DG5; + + if (value.Equals((6).ToString())) + return RfidDataFileType.PASSPORT_DG6; + + if (value.Equals((7).ToString())) + return RfidDataFileType.PASSPORT_DG7; + + if (value.Equals((8).ToString())) + return RfidDataFileType.PASSPORT_DG8; + + if (value.Equals((9).ToString())) + return RfidDataFileType.PASSPORT_DG9; + + if (value.Equals((10).ToString())) + return RfidDataFileType.PASSPORT_DG10; + + if (value.Equals((11).ToString())) + return RfidDataFileType.PASSPORT_DG11; + + if (value.Equals((12).ToString())) + return RfidDataFileType.PASSPORT_DG12; + + if (value.Equals((13).ToString())) + return RfidDataFileType.PASSPORT_DG13; + + if (value.Equals((14).ToString())) + return RfidDataFileType.PASSPORT_DG14; + + if (value.Equals((15).ToString())) + return RfidDataFileType.PASSPORT_DG15; + + if (value.Equals((16).ToString())) + return RfidDataFileType.PASSPORT_DG16; + + if (value.Equals((17).ToString())) + return RfidDataFileType.PASSPORT_DG17; + + if (value.Equals((18).ToString())) + return RfidDataFileType.PASSPORT_DG18; + + if (value.Equals((19).ToString())) + return RfidDataFileType.PASSPORT_DG19; + + if (value.Equals((20).ToString())) + return RfidDataFileType.PASSPORT_DG20; + + if (value.Equals((21).ToString())) + return RfidDataFileType.PASSPORT_SOD; + + if (value.Equals((22).ToString())) + return RfidDataFileType.PASSPORT_CVCA; + + if (value.Equals((23).ToString())) + return RfidDataFileType.PASSPORT_COM; + + if (value.Equals((57).ToString())) + return RfidDataFileType.DTC_DG17; + + if (value.Equals((58).ToString())) + return RfidDataFileType.DTC_DG18; + + if (value.Equals((62).ToString())) + return RfidDataFileType.DTC_DG22; + + if (value.Equals((63).ToString())) + return RfidDataFileType.DTC_DG23; + + if (value.Equals((64).ToString())) + return RfidDataFileType.DTC_DG24; + + if (value.Equals((101).ToString())) + return RfidDataFileType.ID_DG1; + + if (value.Equals((102).ToString())) + return RfidDataFileType.ID_DG2; + + if (value.Equals((103).ToString())) + return RfidDataFileType.ID_DG3; + + if (value.Equals((104).ToString())) + return RfidDataFileType.ID_DG4; + + if (value.Equals((105).ToString())) + return RfidDataFileType.ID_DG5; + + if (value.Equals((106).ToString())) + return RfidDataFileType.ID_DG6; + + if (value.Equals((107).ToString())) + return RfidDataFileType.ID_DG7; + + if (value.Equals((108).ToString())) + return RfidDataFileType.ID_DG8; + + if (value.Equals((109).ToString())) + return RfidDataFileType.ID_DG9; + + if (value.Equals((110).ToString())) + return RfidDataFileType.ID_DG10; + + if (value.Equals((111).ToString())) + return RfidDataFileType.ID_DG11; + + if (value.Equals((112).ToString())) + return RfidDataFileType.ID_DG12; + + if (value.Equals((113).ToString())) + return RfidDataFileType.ID_DG13; + + if (value.Equals((114).ToString())) + return RfidDataFileType.ID_DG14; + + if (value.Equals((115).ToString())) + return RfidDataFileType.ID_DG15; + + if (value.Equals((116).ToString())) + return RfidDataFileType.ID_DG16; + + if (value.Equals((117).ToString())) + return RfidDataFileType.ID_DG17; + + if (value.Equals((118).ToString())) + return RfidDataFileType.ID_DG18; + + if (value.Equals((119).ToString())) + return RfidDataFileType.ID_DG19; + + if (value.Equals((120).ToString())) + return RfidDataFileType.ID_DG20; + + if (value.Equals((121).ToString())) + return RfidDataFileType.ID_DG21; + + if (value.Equals((150).ToString())) + return RfidDataFileType.DL_COM; + + if (value.Equals((151).ToString())) + return RfidDataFileType.DL_DG1; + + if (value.Equals((152).ToString())) + return RfidDataFileType.DL_DG2; + + if (value.Equals((153).ToString())) + return RfidDataFileType.DL_DG3; + + if (value.Equals((154).ToString())) + return RfidDataFileType.DL_DG4; + + if (value.Equals((155).ToString())) + return RfidDataFileType.DL_DG5; + + if (value.Equals((156).ToString())) + return RfidDataFileType.DL_DG6; + + if (value.Equals((157).ToString())) + return RfidDataFileType.DL_DG7; + + if (value.Equals((158).ToString())) + return RfidDataFileType.DL_DG8; + + if (value.Equals((159).ToString())) + return RfidDataFileType.DL_DG9; + + if (value.Equals((160).ToString())) + return RfidDataFileType.DL_DG10; + + if (value.Equals((161).ToString())) + return RfidDataFileType.DL_DG11; + + if (value.Equals((162).ToString())) + return RfidDataFileType.DL_DG12; + + if (value.Equals((163).ToString())) + return RfidDataFileType.DL_DG13; + + if (value.Equals((164).ToString())) + return RfidDataFileType.DL_DG14; + + if (value.Equals((165).ToString())) + return RfidDataFileType.DL_SOD; + + if (value.Equals((166).ToString())) + return RfidDataFileType.DL_CE; + + if (value.Equals((167).ToString())) + return RfidDataFileType.DL_CVCA; + + if (value.Equals((200).ToString())) + return RfidDataFileType.PACE_CARD_ACCESS; + + if (value.Equals((201).ToString())) + return RfidDataFileType.PACE_CARD_SECURITY; + + if (value.Equals((202).ToString())) + return RfidDataFileType.PACE_CHIP_SECURITY; + + if (value.Equals((300).ToString())) + return RfidDataFileType.MIFARE_DATA; + + if (value.Equals((301).ToString())) + return RfidDataFileType.MIFARE_VALIDITY; + + if (value.Equals((302).ToString())) + return RfidDataFileType.AUTHENTICITY_V2; + + if (value.Equals((400).ToString())) + return RfidDataFileType.ATR; + + if (value.Equals((500).ToString())) + return RfidDataFileType._E_SIGN_PK; + + if (value.Equals((501).ToString())) + return RfidDataFileType._E_SIGN_SIGNED_DATA; + + if (value.Equals((600).ToString())) + return RfidDataFileType.CERTIFICATE; + + if (value.Equals((601).ToString())) + return RfidDataFileType.MASTER_LIST; + + if (value.Equals((602).ToString())) + return RfidDataFileType.DEFECT_LIST; + + if (value.Equals((603).ToString())) + return RfidDataFileType.BLACK_LIST; + + if (value.Equals((700).ToString())) + return RfidDataFileType.APP_DIRECTORY; + + if (value.Equals((701).ToString())) + return RfidDataFileType.SESSION; + + if (value.Equals((702).ToString())) + return RfidDataFileType.LOG_DATA; + + if (value.Equals((703).ToString())) + return RfidDataFileType.CHIP_PROPERTIES; + + if (value.Equals((710).ToString())) + return RfidDataFileType.POST_CA_RESPONSE; + + if (value.Equals((711).ToString())) + return RfidDataFileType.POST_CA_PUBLIC_KEY; + + if (value.Equals((712).ToString())) + return RfidDataFileType.POST_CA_INFO; + + if (value.Equals((713).ToString())) + return RfidDataFileType.POST_CA_D_PARAMS; + + if (value.Equals((714).ToString())) + return RfidDataFileType.POST_CA_CHECK_PK; + + if (value.Equals((715).ToString())) + return RfidDataFileType.POST_CA_CHECK_SK; + + if (value.Equals((1000).ToString())) + return RfidDataFileType.USER_DEFINED; + + throw new NotImplementedException($"Could not convert value to type RfidDataFileType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidDataFileType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidDataFileType.UNSPECIFIED; + + if (value.Equals((1).ToString())) + return RfidDataFileType.PASSPORT_DG1; + + if (value.Equals((2).ToString())) + return RfidDataFileType.PASSPORT_DG2; + + if (value.Equals((3).ToString())) + return RfidDataFileType.PASSPORT_DG3; + + if (value.Equals((4).ToString())) + return RfidDataFileType.PASSPORT_DG4; + + if (value.Equals((5).ToString())) + return RfidDataFileType.PASSPORT_DG5; + + if (value.Equals((6).ToString())) + return RfidDataFileType.PASSPORT_DG6; + + if (value.Equals((7).ToString())) + return RfidDataFileType.PASSPORT_DG7; + + if (value.Equals((8).ToString())) + return RfidDataFileType.PASSPORT_DG8; + + if (value.Equals((9).ToString())) + return RfidDataFileType.PASSPORT_DG9; + + if (value.Equals((10).ToString())) + return RfidDataFileType.PASSPORT_DG10; + + if (value.Equals((11).ToString())) + return RfidDataFileType.PASSPORT_DG11; + + if (value.Equals((12).ToString())) + return RfidDataFileType.PASSPORT_DG12; + + if (value.Equals((13).ToString())) + return RfidDataFileType.PASSPORT_DG13; + + if (value.Equals((14).ToString())) + return RfidDataFileType.PASSPORT_DG14; + + if (value.Equals((15).ToString())) + return RfidDataFileType.PASSPORT_DG15; + + if (value.Equals((16).ToString())) + return RfidDataFileType.PASSPORT_DG16; + + if (value.Equals((17).ToString())) + return RfidDataFileType.PASSPORT_DG17; + + if (value.Equals((18).ToString())) + return RfidDataFileType.PASSPORT_DG18; + + if (value.Equals((19).ToString())) + return RfidDataFileType.PASSPORT_DG19; + + if (value.Equals((20).ToString())) + return RfidDataFileType.PASSPORT_DG20; + + if (value.Equals((21).ToString())) + return RfidDataFileType.PASSPORT_SOD; + + if (value.Equals((22).ToString())) + return RfidDataFileType.PASSPORT_CVCA; + + if (value.Equals((23).ToString())) + return RfidDataFileType.PASSPORT_COM; + + if (value.Equals((57).ToString())) + return RfidDataFileType.DTC_DG17; + + if (value.Equals((58).ToString())) + return RfidDataFileType.DTC_DG18; + + if (value.Equals((62).ToString())) + return RfidDataFileType.DTC_DG22; + + if (value.Equals((63).ToString())) + return RfidDataFileType.DTC_DG23; + + if (value.Equals((64).ToString())) + return RfidDataFileType.DTC_DG24; + + if (value.Equals((101).ToString())) + return RfidDataFileType.ID_DG1; + + if (value.Equals((102).ToString())) + return RfidDataFileType.ID_DG2; + + if (value.Equals((103).ToString())) + return RfidDataFileType.ID_DG3; + + if (value.Equals((104).ToString())) + return RfidDataFileType.ID_DG4; + + if (value.Equals((105).ToString())) + return RfidDataFileType.ID_DG5; + + if (value.Equals((106).ToString())) + return RfidDataFileType.ID_DG6; + + if (value.Equals((107).ToString())) + return RfidDataFileType.ID_DG7; + + if (value.Equals((108).ToString())) + return RfidDataFileType.ID_DG8; + + if (value.Equals((109).ToString())) + return RfidDataFileType.ID_DG9; + + if (value.Equals((110).ToString())) + return RfidDataFileType.ID_DG10; + + if (value.Equals((111).ToString())) + return RfidDataFileType.ID_DG11; + + if (value.Equals((112).ToString())) + return RfidDataFileType.ID_DG12; + + if (value.Equals((113).ToString())) + return RfidDataFileType.ID_DG13; + + if (value.Equals((114).ToString())) + return RfidDataFileType.ID_DG14; + + if (value.Equals((115).ToString())) + return RfidDataFileType.ID_DG15; + + if (value.Equals((116).ToString())) + return RfidDataFileType.ID_DG16; + + if (value.Equals((117).ToString())) + return RfidDataFileType.ID_DG17; + + if (value.Equals((118).ToString())) + return RfidDataFileType.ID_DG18; + + if (value.Equals((119).ToString())) + return RfidDataFileType.ID_DG19; + + if (value.Equals((120).ToString())) + return RfidDataFileType.ID_DG20; + + if (value.Equals((121).ToString())) + return RfidDataFileType.ID_DG21; + + if (value.Equals((150).ToString())) + return RfidDataFileType.DL_COM; + + if (value.Equals((151).ToString())) + return RfidDataFileType.DL_DG1; + + if (value.Equals((152).ToString())) + return RfidDataFileType.DL_DG2; + + if (value.Equals((153).ToString())) + return RfidDataFileType.DL_DG3; + + if (value.Equals((154).ToString())) + return RfidDataFileType.DL_DG4; + + if (value.Equals((155).ToString())) + return RfidDataFileType.DL_DG5; + + if (value.Equals((156).ToString())) + return RfidDataFileType.DL_DG6; + + if (value.Equals((157).ToString())) + return RfidDataFileType.DL_DG7; + + if (value.Equals((158).ToString())) + return RfidDataFileType.DL_DG8; + + if (value.Equals((159).ToString())) + return RfidDataFileType.DL_DG9; + + if (value.Equals((160).ToString())) + return RfidDataFileType.DL_DG10; + + if (value.Equals((161).ToString())) + return RfidDataFileType.DL_DG11; + + if (value.Equals((162).ToString())) + return RfidDataFileType.DL_DG12; + + if (value.Equals((163).ToString())) + return RfidDataFileType.DL_DG13; + + if (value.Equals((164).ToString())) + return RfidDataFileType.DL_DG14; + + if (value.Equals((165).ToString())) + return RfidDataFileType.DL_SOD; + + if (value.Equals((166).ToString())) + return RfidDataFileType.DL_CE; + + if (value.Equals((167).ToString())) + return RfidDataFileType.DL_CVCA; + + if (value.Equals((200).ToString())) + return RfidDataFileType.PACE_CARD_ACCESS; + + if (value.Equals((201).ToString())) + return RfidDataFileType.PACE_CARD_SECURITY; + + if (value.Equals((202).ToString())) + return RfidDataFileType.PACE_CHIP_SECURITY; + + if (value.Equals((300).ToString())) + return RfidDataFileType.MIFARE_DATA; + + if (value.Equals((301).ToString())) + return RfidDataFileType.MIFARE_VALIDITY; + + if (value.Equals((302).ToString())) + return RfidDataFileType.AUTHENTICITY_V2; + + if (value.Equals((400).ToString())) + return RfidDataFileType.ATR; + + if (value.Equals((500).ToString())) + return RfidDataFileType._E_SIGN_PK; + + if (value.Equals((501).ToString())) + return RfidDataFileType._E_SIGN_SIGNED_DATA; + + if (value.Equals((600).ToString())) + return RfidDataFileType.CERTIFICATE; + + if (value.Equals((601).ToString())) + return RfidDataFileType.MASTER_LIST; + + if (value.Equals((602).ToString())) + return RfidDataFileType.DEFECT_LIST; + + if (value.Equals((603).ToString())) + return RfidDataFileType.BLACK_LIST; + + if (value.Equals((700).ToString())) + return RfidDataFileType.APP_DIRECTORY; + + if (value.Equals((701).ToString())) + return RfidDataFileType.SESSION; + + if (value.Equals((702).ToString())) + return RfidDataFileType.LOG_DATA; + + if (value.Equals((703).ToString())) + return RfidDataFileType.CHIP_PROPERTIES; + + if (value.Equals((710).ToString())) + return RfidDataFileType.POST_CA_RESPONSE; + + if (value.Equals((711).ToString())) + return RfidDataFileType.POST_CA_PUBLIC_KEY; + + if (value.Equals((712).ToString())) + return RfidDataFileType.POST_CA_INFO; + + if (value.Equals((713).ToString())) + return RfidDataFileType.POST_CA_D_PARAMS; + + if (value.Equals((714).ToString())) + return RfidDataFileType.POST_CA_CHECK_PK; + + if (value.Equals((715).ToString())) + return RfidDataFileType.POST_CA_CHECK_SK; + + if (value.Equals((1000).ToString())) + return RfidDataFileType.USER_DEFINED; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidDataFileType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidDataFileTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidDataFileType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidDataFileType? result = rawValue == null + ? null + : RfidDataFileTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidDataFileType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidDataFileType rfidDataFileType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidDataFileType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidDataFileTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidDataFileType from the Json object + /// + /// + /// + /// + /// + public override RfidDataFileType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidDataFileType? result = rawValue == null + ? null + : RfidDataFileTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidDataFileType? rfidDataFileType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidDataFileType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs new file mode 100644 index 0000000..e218f81 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs @@ -0,0 +1,753 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration representing RFID Data Group Types. Constants with prefix correspond to the informational data groups of ePassport application, with prefix EID_ – those of eID application, with prefix EDL_ – eDL application + /// + /// Enumeration representing RFID Data Group Types. Constants with prefix correspond to the informational data groups of ePassport application, with prefix EID_ – those of eID application, with prefix EDL_ – eDL application + public enum RfidDataGroupTypeTag + { + /// + /// Enum COM for value: 96 + /// + COM = 96, + + /// + /// Enum DG1 for value: 97 + /// + DG1 = 97, + + /// + /// Enum DG2 for value: 117 + /// + DG2 = 117, + + /// + /// Enum DG3 for value: 99 + /// + DG3 = 99, + + /// + /// Enum DG4 for value: 118 + /// + DG4 = 118, + + /// + /// Enum DG5 for value: 101 + /// + DG5 = 101, + + /// + /// Enum DG6 for value: 102 + /// + DG6 = 102, + + /// + /// Enum DG7 for value: 103 + /// + DG7 = 103, + + /// + /// Enum DG8 for value: 104 + /// + DG8 = 104, + + /// + /// Enum DG9 for value: 105 + /// + DG9 = 105, + + /// + /// Enum DG10 for value: 106 + /// + DG10 = 106, + + /// + /// Enum DG11 for value: 107 + /// + DG11 = 107, + + /// + /// Enum DG12 for value: 108 + /// + DG12 = 108, + + /// + /// Enum DG13 for value: 109 + /// + DG13 = 109, + + /// + /// Enum DG14 for value: 110 + /// + DG14 = 110, + + /// + /// Enum DG15 for value: 111 + /// + DG15 = 111, + + /// + /// Enum DG16 for value: 112 + /// + DG16 = 112, + + /// + /// Enum SOD for value: 119 + /// + SOD = 119, + + /// + /// Enum EID_DG1 for value: 97 + /// + EID_DG1 = 97, + + /// + /// Enum EID_DG2 for value: 98 + /// + EID_DG2 = 98, + + /// + /// Enum EID_DG3 for value: 99 + /// + EID_DG3 = 99, + + /// + /// Enum EID_DG4 for value: 100 + /// + EID_DG4 = 100, + + /// + /// Enum EID_DG5 for value: 101 + /// + EID_DG5 = 101, + + /// + /// Enum EID_DG6 for value: 102 + /// + EID_DG6 = 102, + + /// + /// Enum EID_DG7 for value: 103 + /// + EID_DG7 = 103, + + /// + /// Enum EID_DG8 for value: 104 + /// + EID_DG8 = 104, + + /// + /// Enum EID_DG9 for value: 105 + /// + EID_DG9 = 105, + + /// + /// Enum EID_DG10 for value: 106 + /// + EID_DG10 = 106, + + /// + /// Enum EID_DG11 for value: 107 + /// + EID_DG11 = 107, + + /// + /// Enum EID_DG12 for value: 108 + /// + EID_DG12 = 108, + + /// + /// Enum EID_DG13 for value: 109 + /// + EID_DG13 = 109, + + /// + /// Enum EID_DG14 for value: 110 + /// + EID_DG14 = 110, + + /// + /// Enum EID_DG15 for value: 111 + /// + EID_DG15 = 111, + + /// + /// Enum EID_DG16 for value: 112 + /// + EID_DG16 = 112, + + /// + /// Enum EID_DG17 for value: 113 + /// + EID_DG17 = 113, + + /// + /// Enum EID_DG18 for value: 114 + /// + EID_DG18 = 114, + + /// + /// Enum EID_DG19 for value: 115 + /// + EID_DG19 = 115, + + /// + /// Enum EID_DG20 for value: 116 + /// + EID_DG20 = 116, + + /// + /// Enum EID_DG21 for value: 117 + /// + EID_DG21 = 117, + + /// + /// Enum EDL_COM for value: 96 + /// + EDL_COM = 96, + + /// + /// Enum EDL_SOD for value: 119 + /// + EDL_SOD = 119, + + /// + /// Enum EDL_CE for value: 119 + /// + EDL_CE = 119, + + /// + /// Enum EDL_DG1 for value: 97 + /// + EDL_DG1 = 97, + + /// + /// Enum EDL_DG2 for value: 107 + /// + EDL_DG2 = 107, + + /// + /// Enum EDL_DG3 for value: 108 + /// + EDL_DG3 = 108, + + /// + /// Enum EDL_DG4 for value: 101 + /// + EDL_DG4 = 101, + + /// + /// Enum EDL_DG5 for value: 103 + /// + EDL_DG5 = 103, + + /// + /// Enum EDL_DG6 for value: 117 + /// + EDL_DG6 = 117, + + /// + /// Enum EDL_DG7 for value: 99 + /// + EDL_DG7 = 99, + + /// + /// Enum EDL_DG8 for value: 118 + /// + EDL_DG8 = 118, + + /// + /// Enum EDL_DG9 for value: 112 + /// + EDL_DG9 = 112, + + /// + /// Enum EDL_DG11 for value: 109 + /// + EDL_DG11 = 109, + + /// + /// Enum EDL_DG12 for value: 113 + /// + EDL_DG12 = 113, + + /// + /// Enum EDL_DG13 for value: 111 + /// + EDL_DG13 = 111, + + /// + /// Enum EDL_DG14 for value: 110 + /// + EDL_DG14 = 110 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidDataGroupTypeTagValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidDataGroupTypeTag FromString(string value) + { + if (value.Equals((96).ToString())) + return RfidDataGroupTypeTag.COM; + + if (value.Equals((97).ToString())) + return RfidDataGroupTypeTag.DG1; + + if (value.Equals((117).ToString())) + return RfidDataGroupTypeTag.DG2; + + if (value.Equals((99).ToString())) + return RfidDataGroupTypeTag.DG3; + + if (value.Equals((118).ToString())) + return RfidDataGroupTypeTag.DG4; + + if (value.Equals((101).ToString())) + return RfidDataGroupTypeTag.DG5; + + if (value.Equals((102).ToString())) + return RfidDataGroupTypeTag.DG6; + + if (value.Equals((103).ToString())) + return RfidDataGroupTypeTag.DG7; + + if (value.Equals((104).ToString())) + return RfidDataGroupTypeTag.DG8; + + if (value.Equals((105).ToString())) + return RfidDataGroupTypeTag.DG9; + + if (value.Equals((106).ToString())) + return RfidDataGroupTypeTag.DG10; + + if (value.Equals((107).ToString())) + return RfidDataGroupTypeTag.DG11; + + if (value.Equals((108).ToString())) + return RfidDataGroupTypeTag.DG12; + + if (value.Equals((109).ToString())) + return RfidDataGroupTypeTag.DG13; + + if (value.Equals((110).ToString())) + return RfidDataGroupTypeTag.DG14; + + if (value.Equals((111).ToString())) + return RfidDataGroupTypeTag.DG15; + + if (value.Equals((112).ToString())) + return RfidDataGroupTypeTag.DG16; + + if (value.Equals((119).ToString())) + return RfidDataGroupTypeTag.SOD; + + if (value.Equals((97).ToString())) + return RfidDataGroupTypeTag.EID_DG1; + + if (value.Equals((98).ToString())) + return RfidDataGroupTypeTag.EID_DG2; + + if (value.Equals((99).ToString())) + return RfidDataGroupTypeTag.EID_DG3; + + if (value.Equals((100).ToString())) + return RfidDataGroupTypeTag.EID_DG4; + + if (value.Equals((101).ToString())) + return RfidDataGroupTypeTag.EID_DG5; + + if (value.Equals((102).ToString())) + return RfidDataGroupTypeTag.EID_DG6; + + if (value.Equals((103).ToString())) + return RfidDataGroupTypeTag.EID_DG7; + + if (value.Equals((104).ToString())) + return RfidDataGroupTypeTag.EID_DG8; + + if (value.Equals((105).ToString())) + return RfidDataGroupTypeTag.EID_DG9; + + if (value.Equals((106).ToString())) + return RfidDataGroupTypeTag.EID_DG10; + + if (value.Equals((107).ToString())) + return RfidDataGroupTypeTag.EID_DG11; + + if (value.Equals((108).ToString())) + return RfidDataGroupTypeTag.EID_DG12; + + if (value.Equals((109).ToString())) + return RfidDataGroupTypeTag.EID_DG13; + + if (value.Equals((110).ToString())) + return RfidDataGroupTypeTag.EID_DG14; + + if (value.Equals((111).ToString())) + return RfidDataGroupTypeTag.EID_DG15; + + if (value.Equals((112).ToString())) + return RfidDataGroupTypeTag.EID_DG16; + + if (value.Equals((113).ToString())) + return RfidDataGroupTypeTag.EID_DG17; + + if (value.Equals((114).ToString())) + return RfidDataGroupTypeTag.EID_DG18; + + if (value.Equals((115).ToString())) + return RfidDataGroupTypeTag.EID_DG19; + + if (value.Equals((116).ToString())) + return RfidDataGroupTypeTag.EID_DG20; + + if (value.Equals((117).ToString())) + return RfidDataGroupTypeTag.EID_DG21; + + if (value.Equals((96).ToString())) + return RfidDataGroupTypeTag.EDL_COM; + + if (value.Equals((119).ToString())) + return RfidDataGroupTypeTag.EDL_SOD; + + if (value.Equals((119).ToString())) + return RfidDataGroupTypeTag.EDL_CE; + + if (value.Equals((97).ToString())) + return RfidDataGroupTypeTag.EDL_DG1; + + if (value.Equals((107).ToString())) + return RfidDataGroupTypeTag.EDL_DG2; + + if (value.Equals((108).ToString())) + return RfidDataGroupTypeTag.EDL_DG3; + + if (value.Equals((101).ToString())) + return RfidDataGroupTypeTag.EDL_DG4; + + if (value.Equals((103).ToString())) + return RfidDataGroupTypeTag.EDL_DG5; + + if (value.Equals((117).ToString())) + return RfidDataGroupTypeTag.EDL_DG6; + + if (value.Equals((99).ToString())) + return RfidDataGroupTypeTag.EDL_DG7; + + if (value.Equals((118).ToString())) + return RfidDataGroupTypeTag.EDL_DG8; + + if (value.Equals((112).ToString())) + return RfidDataGroupTypeTag.EDL_DG9; + + if (value.Equals((109).ToString())) + return RfidDataGroupTypeTag.EDL_DG11; + + if (value.Equals((113).ToString())) + return RfidDataGroupTypeTag.EDL_DG12; + + if (value.Equals((111).ToString())) + return RfidDataGroupTypeTag.EDL_DG13; + + if (value.Equals((110).ToString())) + return RfidDataGroupTypeTag.EDL_DG14; + + throw new NotImplementedException($"Could not convert value to type RfidDataGroupTypeTag: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidDataGroupTypeTag? FromStringOrDefault(string value) + { + if (value.Equals((96).ToString())) + return RfidDataGroupTypeTag.COM; + + if (value.Equals((97).ToString())) + return RfidDataGroupTypeTag.DG1; + + if (value.Equals((117).ToString())) + return RfidDataGroupTypeTag.DG2; + + if (value.Equals((99).ToString())) + return RfidDataGroupTypeTag.DG3; + + if (value.Equals((118).ToString())) + return RfidDataGroupTypeTag.DG4; + + if (value.Equals((101).ToString())) + return RfidDataGroupTypeTag.DG5; + + if (value.Equals((102).ToString())) + return RfidDataGroupTypeTag.DG6; + + if (value.Equals((103).ToString())) + return RfidDataGroupTypeTag.DG7; + + if (value.Equals((104).ToString())) + return RfidDataGroupTypeTag.DG8; + + if (value.Equals((105).ToString())) + return RfidDataGroupTypeTag.DG9; + + if (value.Equals((106).ToString())) + return RfidDataGroupTypeTag.DG10; + + if (value.Equals((107).ToString())) + return RfidDataGroupTypeTag.DG11; + + if (value.Equals((108).ToString())) + return RfidDataGroupTypeTag.DG12; + + if (value.Equals((109).ToString())) + return RfidDataGroupTypeTag.DG13; + + if (value.Equals((110).ToString())) + return RfidDataGroupTypeTag.DG14; + + if (value.Equals((111).ToString())) + return RfidDataGroupTypeTag.DG15; + + if (value.Equals((112).ToString())) + return RfidDataGroupTypeTag.DG16; + + if (value.Equals((119).ToString())) + return RfidDataGroupTypeTag.SOD; + + if (value.Equals((97).ToString())) + return RfidDataGroupTypeTag.EID_DG1; + + if (value.Equals((98).ToString())) + return RfidDataGroupTypeTag.EID_DG2; + + if (value.Equals((99).ToString())) + return RfidDataGroupTypeTag.EID_DG3; + + if (value.Equals((100).ToString())) + return RfidDataGroupTypeTag.EID_DG4; + + if (value.Equals((101).ToString())) + return RfidDataGroupTypeTag.EID_DG5; + + if (value.Equals((102).ToString())) + return RfidDataGroupTypeTag.EID_DG6; + + if (value.Equals((103).ToString())) + return RfidDataGroupTypeTag.EID_DG7; + + if (value.Equals((104).ToString())) + return RfidDataGroupTypeTag.EID_DG8; + + if (value.Equals((105).ToString())) + return RfidDataGroupTypeTag.EID_DG9; + + if (value.Equals((106).ToString())) + return RfidDataGroupTypeTag.EID_DG10; + + if (value.Equals((107).ToString())) + return RfidDataGroupTypeTag.EID_DG11; + + if (value.Equals((108).ToString())) + return RfidDataGroupTypeTag.EID_DG12; + + if (value.Equals((109).ToString())) + return RfidDataGroupTypeTag.EID_DG13; + + if (value.Equals((110).ToString())) + return RfidDataGroupTypeTag.EID_DG14; + + if (value.Equals((111).ToString())) + return RfidDataGroupTypeTag.EID_DG15; + + if (value.Equals((112).ToString())) + return RfidDataGroupTypeTag.EID_DG16; + + if (value.Equals((113).ToString())) + return RfidDataGroupTypeTag.EID_DG17; + + if (value.Equals((114).ToString())) + return RfidDataGroupTypeTag.EID_DG18; + + if (value.Equals((115).ToString())) + return RfidDataGroupTypeTag.EID_DG19; + + if (value.Equals((116).ToString())) + return RfidDataGroupTypeTag.EID_DG20; + + if (value.Equals((117).ToString())) + return RfidDataGroupTypeTag.EID_DG21; + + if (value.Equals((96).ToString())) + return RfidDataGroupTypeTag.EDL_COM; + + if (value.Equals((119).ToString())) + return RfidDataGroupTypeTag.EDL_SOD; + + if (value.Equals((119).ToString())) + return RfidDataGroupTypeTag.EDL_CE; + + if (value.Equals((97).ToString())) + return RfidDataGroupTypeTag.EDL_DG1; + + if (value.Equals((107).ToString())) + return RfidDataGroupTypeTag.EDL_DG2; + + if (value.Equals((108).ToString())) + return RfidDataGroupTypeTag.EDL_DG3; + + if (value.Equals((101).ToString())) + return RfidDataGroupTypeTag.EDL_DG4; + + if (value.Equals((103).ToString())) + return RfidDataGroupTypeTag.EDL_DG5; + + if (value.Equals((117).ToString())) + return RfidDataGroupTypeTag.EDL_DG6; + + if (value.Equals((99).ToString())) + return RfidDataGroupTypeTag.EDL_DG7; + + if (value.Equals((118).ToString())) + return RfidDataGroupTypeTag.EDL_DG8; + + if (value.Equals((112).ToString())) + return RfidDataGroupTypeTag.EDL_DG9; + + if (value.Equals((109).ToString())) + return RfidDataGroupTypeTag.EDL_DG11; + + if (value.Equals((113).ToString())) + return RfidDataGroupTypeTag.EDL_DG12; + + if (value.Equals((111).ToString())) + return RfidDataGroupTypeTag.EDL_DG13; + + if (value.Equals((110).ToString())) + return RfidDataGroupTypeTag.EDL_DG14; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidDataGroupTypeTag value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidDataGroupTypeTagJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidDataGroupTypeTag Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidDataGroupTypeTag? result = rawValue == null + ? null + : RfidDataGroupTypeTagValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidDataGroupTypeTag to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidDataGroupTypeTag rfidDataGroupTypeTag, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidDataGroupTypeTag.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidDataGroupTypeTagNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidDataGroupTypeTag from the Json object + /// + /// + /// + /// + /// + public override RfidDataGroupTypeTag? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidDataGroupTypeTag? result = rawValue == null + ? null + : RfidDataGroupTypeTagValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidDataGroupTypeTag? rfidDataGroupTypeTag, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidDataGroupTypeTag?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs new file mode 100644 index 0000000..556dd46 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs @@ -0,0 +1,216 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Contents of the identifier in binary form. Base64 encoded. + /// + public partial class RfidDistinguishedName : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Contents of the identifier in binary form. Base64 encoded. + /// friendlyName + /// List of individual attributes contained in the identifier + [JsonConstructor] + public RfidDistinguishedName(string data, TrfFtString friendlyName, List attributes) + { + Data = data; + FriendlyName = friendlyName; + Attributes = attributes; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Contents of the identifier in binary form. Base64 encoded. + /// + /// Contents of the identifier in binary form. Base64 encoded. + [JsonPropertyName("Data")] + public string Data { get; set; } + + /// + /// Gets or Sets FriendlyName + /// + [JsonPropertyName("FriendlyName")] + public TrfFtString FriendlyName { get; set; } + + /// + /// List of individual attributes contained in the identifier + /// + /// List of individual attributes contained in the identifier + [JsonPropertyName("Attributes")] + public List Attributes { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidDistinguishedName {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" FriendlyName: ").Append(FriendlyName).Append("\n"); + sb.Append(" Attributes: ").Append(Attributes).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidDistinguishedNameJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidDistinguishedName Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option data = default; + Option friendlyName = default; + Option?> attributes = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Data": + data = new Option(utf8JsonReader.GetString()!); + break; + case "FriendlyName": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + friendlyName = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Attributes": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + attributes = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!data.IsSet) + throw new ArgumentException("Property is required for class RfidDistinguishedName.", nameof(data)); + + if (!friendlyName.IsSet) + throw new ArgumentException("Property is required for class RfidDistinguishedName.", nameof(friendlyName)); + + if (!attributes.IsSet) + throw new ArgumentException("Property is required for class RfidDistinguishedName.", nameof(attributes)); + + if (data.IsSet && data.Value == null) + throw new ArgumentNullException(nameof(data), "Property is not nullable for class RfidDistinguishedName."); + + if (friendlyName.IsSet && friendlyName.Value == null) + throw new ArgumentNullException(nameof(friendlyName), "Property is not nullable for class RfidDistinguishedName."); + + if (attributes.IsSet && attributes.Value == null) + throw new ArgumentNullException(nameof(attributes), "Property is not nullable for class RfidDistinguishedName."); + + return new RfidDistinguishedName(data.Value!, friendlyName.Value!, attributes.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidDistinguishedName rfidDistinguishedName, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidDistinguishedName, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidDistinguishedName rfidDistinguishedName, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidDistinguishedName.Data == null) + throw new ArgumentNullException(nameof(rfidDistinguishedName.Data), "Property is required for class RfidDistinguishedName."); + + if (rfidDistinguishedName.FriendlyName == null) + throw new ArgumentNullException(nameof(rfidDistinguishedName.FriendlyName), "Property is required for class RfidDistinguishedName."); + + if (rfidDistinguishedName.Attributes == null) + throw new ArgumentNullException(nameof(rfidDistinguishedName.Attributes), "Property is required for class RfidDistinguishedName."); + + writer.WriteString("Data", rfidDistinguishedName.Data); + + writer.WritePropertyName("FriendlyName"); + JsonSerializer.Serialize(writer, rfidDistinguishedName.FriendlyName, jsonSerializerOptions); + writer.WritePropertyName("Attributes"); + JsonSerializer.Serialize(writer, rfidDistinguishedName.Attributes, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs b/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs index 5f38729..aafa6c3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs @@ -1,41 +1,181 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Determines the presence and location of an RFID chip in a document. 0 - no rfid chip; 1 - chip is located in the document data page; 2 - chip is located in the back page or inlay of the document - public class RfidLocation + /// + /// Determines the presence and location of an RFID chip in a document. 0 - no rfid chip; 1 - chip is located in the document data page; 2 - chip is located in the back page or inlay of the document + public enum RfidLocation + { + /// + /// Enum NONE for value: 0 + /// + NONE = 0, + + /// + /// Enum MAIN_PAGE for value: 1 + /// + MAIN_PAGE = 1, + + /// + /// Enum BACK_PAGE for value: 2 + /// + BACK_PAGE = 2 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidLocationValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidLocation FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidLocation.NONE; + + if (value.Equals((1).ToString())) + return RfidLocation.MAIN_PAGE; + + if (value.Equals((2).ToString())) + return RfidLocation.BACK_PAGE; + + throw new NotImplementedException($"Could not convert value to type RfidLocation: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidLocation? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidLocation.NONE; + + if (value.Equals((1).ToString())) + return RfidLocation.MAIN_PAGE; + + if (value.Equals((2).ToString())) + return RfidLocation.BACK_PAGE; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidLocation value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidLocationJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidLocation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidLocation? result = rawValue == null + ? null + : RfidLocationValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidLocation to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidLocation rfidLocation, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidLocation.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidLocationNullableJsonConverter : JsonConverter { + /// + /// Returns a RfidLocation from the Json object + /// + /// + /// + /// + /// + public override RfidLocation? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** There is no RFID chip in the document */ - public const int NONE = 0; + RfidLocation? result = rawValue == null + ? null + : RfidLocationValueConverter.FromStringOrDefault(rawValue); - /** The RFID chip is located in the document data page */ - public const int MAIN_PAGE = 1; + if (result != null) + return result.Value; - /** The RFID chip is located in the back page or inlay of the document */ - public const int BACK_PAGE = 2; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidLocation? rfidLocation, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidLocation?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs b/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs index 638235b..95065b3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs @@ -1,90 +1,80 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Location of data in RFID chip /// - [DataContract] - public partial class RfidOrigin : IEquatable, IValidatableObject + public partial class RfidOrigin : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected RfidOrigin() { } - /// - /// Initializes a new instance of the class. - /// - /// Source data group file (required). - /// Index of the source record of the image with biometric information in the information data group. - /// Index of the template in the record with biometric data. - /// Index of the variant of the biometric data template. - public RfidOrigin(int dg = default(int), int dgTag = default(int), int tagEntry = default(int), int entryView = default(int)) + /// Source data group file + /// Index of the source record of the image with biometric information in the information data group + /// Index of the template in the record with biometric data + /// Index of the variant of the biometric data template + [JsonConstructor] + public RfidOrigin(int dg, int dgTag, int tagEntry, int entryView) { - // to ensure "dg" is required (not null) - if (dg == null) - { - throw new InvalidDataException("dg is a required property for RfidOrigin and cannot be null"); - } - else - { - this.Dg = dg; - } - - this.DgTag = dgTag; - this.TagEntry = tagEntry; - this.EntryView = entryView; + Dg = dg; + DgTag = dgTag; + TagEntry = tagEntry; + EntryView = entryView; + OnCreated(); } - + + partial void OnCreated(); + /// /// Source data group file /// /// Source data group file - [DataMember(Name="dg", EmitDefaultValue=true)] + [JsonPropertyName("dg")] public int Dg { get; set; } /// /// Index of the source record of the image with biometric information in the information data group /// /// Index of the source record of the image with biometric information in the information data group - [DataMember(Name="dgTag", EmitDefaultValue=false)] + [JsonPropertyName("dgTag")] public int DgTag { get; set; } /// /// Index of the template in the record with biometric data /// /// Index of the template in the record with biometric data - [DataMember(Name="tagEntry", EmitDefaultValue=false)] + [JsonPropertyName("tagEntry")] public int TagEntry { get; set; } /// /// Index of the variant of the biometric data template /// /// Index of the variant of the biometric data template - [DataMember(Name="entryView", EmitDefaultValue=false)] + [JsonPropertyName("entryView")] public int EntryView { get; set; } /// @@ -93,7 +83,7 @@ protected RfidOrigin() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class RfidOrigin {\n"); sb.Append(" Dg: ").Append(Dg).Append("\n"); sb.Append(" DgTag: ").Append(DgTag).Append("\n"); @@ -102,89 +92,140 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as RfidOrigin); + yield break; } + } + /// + /// A Json converter for type + /// + public class RfidOriginJsonConverter : JsonConverter + { /// - /// Returns true if RfidOrigin instances are equal + /// Deserializes json to /// - /// Instance of RfidOrigin to be compared - /// Boolean - public bool Equals(RfidOrigin input) + /// + /// + /// + /// + /// + public override RfidOrigin Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Dg == input.Dg || - (this.Dg != null && - this.Dg.Equals(input.Dg)) - ) && - ( - this.DgTag == input.DgTag || - (this.DgTag != null && - this.DgTag.Equals(input.DgTag)) - ) && - ( - this.TagEntry == input.TagEntry || - (this.TagEntry != null && - this.TagEntry.Equals(input.TagEntry)) - ) && - ( - this.EntryView == input.EntryView || - (this.EntryView != null && - this.EntryView.Equals(input.EntryView)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option dg = default; + Option dgTag = default; + Option tagEntry = default; + Option entryView = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "dg": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + dg = new Option(utf8JsonReader.GetInt32()); + break; + case "dgTag": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + dgTag = new Option(utf8JsonReader.GetInt32()); + break; + case "tagEntry": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + tagEntry = new Option(utf8JsonReader.GetInt32()); + break; + case "entryView": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + entryView = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!dg.IsSet) + throw new ArgumentException("Property is required for class RfidOrigin.", nameof(dg)); + + if (!dgTag.IsSet) + throw new ArgumentException("Property is required for class RfidOrigin.", nameof(dgTag)); + + if (!tagEntry.IsSet) + throw new ArgumentException("Property is required for class RfidOrigin.", nameof(tagEntry)); + + if (!entryView.IsSet) + throw new ArgumentException("Property is required for class RfidOrigin.", nameof(entryView)); + + if (dg.IsSet && dg.Value == null) + throw new ArgumentNullException(nameof(dg), "Property is not nullable for class RfidOrigin."); + + if (dgTag.IsSet && dgTag.Value == null) + throw new ArgumentNullException(nameof(dgTag), "Property is not nullable for class RfidOrigin."); + + if (tagEntry.IsSet && tagEntry.Value == null) + throw new ArgumentNullException(nameof(tagEntry), "Property is not nullable for class RfidOrigin."); + + if (entryView.IsSet && entryView.Value == null) + throw new ArgumentNullException(nameof(entryView), "Property is not nullable for class RfidOrigin."); + + return new RfidOrigin(dg.Value!.Value!, dgTag.Value!.Value!, tagEntry.Value!.Value!, entryView.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidOrigin rfidOrigin, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Dg != null) - hashCode = hashCode * 59 + this.Dg.GetHashCode(); - if (this.DgTag != null) - hashCode = hashCode * 59 + this.DgTag.GetHashCode(); - if (this.TagEntry != null) - hashCode = hashCode * 59 + this.TagEntry.GetHashCode(); - if (this.EntryView != null) - hashCode = hashCode * 59 + this.EntryView.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, rfidOrigin, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidOrigin rfidOrigin, JsonSerializerOptions jsonSerializerOptions) { - yield break; + writer.WriteNumber("dg", rfidOrigin.Dg); + + writer.WriteNumber("dgTag", rfidOrigin.DgTag); + + writer.WriteNumber("tagEntry", rfidOrigin.TagEntry); + + writer.WriteNumber("entryView", rfidOrigin.EntryView); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs new file mode 100644 index 0000000..8a4c802 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs @@ -0,0 +1,225 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants specifying the rate of data exchange between the reader and the RFID-chip + /// + /// Enumeration contains a set of constants specifying the rate of data exchange between the reader and the RFID-chip + public enum RfidPasswordType + { + /// + /// Enum UNKNOWN for value: 0 + /// + UNKNOWN = 0, + + /// + /// Enum MRZ for value: 1 + /// + MRZ = 1, + + /// + /// Enum CAN for value: 2 + /// + CAN = 2, + + /// + /// Enum PIN for value: 3 + /// + PIN = 3, + + /// + /// Enum PUK for value: 4 + /// + PUK = 4, + + /// + /// Enum PIN_E_SIGN for value: 5 + /// + PIN_E_SIGN = 5, + + /// + /// Enum SAI for value: 6 + /// + SAI = 6 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidPasswordTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidPasswordType FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidPasswordType.UNKNOWN; + + if (value.Equals((1).ToString())) + return RfidPasswordType.MRZ; + + if (value.Equals((2).ToString())) + return RfidPasswordType.CAN; + + if (value.Equals((3).ToString())) + return RfidPasswordType.PIN; + + if (value.Equals((4).ToString())) + return RfidPasswordType.PUK; + + if (value.Equals((5).ToString())) + return RfidPasswordType.PIN_E_SIGN; + + if (value.Equals((6).ToString())) + return RfidPasswordType.SAI; + + throw new NotImplementedException($"Could not convert value to type RfidPasswordType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidPasswordType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidPasswordType.UNKNOWN; + + if (value.Equals((1).ToString())) + return RfidPasswordType.MRZ; + + if (value.Equals((2).ToString())) + return RfidPasswordType.CAN; + + if (value.Equals((3).ToString())) + return RfidPasswordType.PIN; + + if (value.Equals((4).ToString())) + return RfidPasswordType.PUK; + + if (value.Equals((5).ToString())) + return RfidPasswordType.PIN_E_SIGN; + + if (value.Equals((6).ToString())) + return RfidPasswordType.SAI; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidPasswordType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidPasswordTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidPasswordType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidPasswordType? result = rawValue == null + ? null + : RfidPasswordTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidPasswordType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidPasswordType rfidPasswordType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidPasswordType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidPasswordTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidPasswordType from the Json object + /// + /// + /// + /// + /// + public override RfidPasswordType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidPasswordType? result = rawValue == null + ? null + : RfidPasswordTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidPasswordType? rfidPasswordType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidPasswordType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs b/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs new file mode 100644 index 0000000..837c834 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs @@ -0,0 +1,189 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + /// + public partial class RfidPkiExtension : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + /// Extension binary data. Base64 encoded. + [JsonConstructor] + public RfidPkiExtension(string type, string data) + { + Type = type; + Data = data; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + /// + /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) + [JsonPropertyName("Type")] + public string Type { get; set; } + + /// + /// Extension binary data. Base64 encoded. + /// + /// Extension binary data. Base64 encoded. + [JsonPropertyName("Data")] + public string Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidPkiExtension {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidPkiExtensionJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidPkiExtension Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option data = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + type = new Option(utf8JsonReader.GetString()!); + break; + case "Data": + data = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class RfidPkiExtension.", nameof(type)); + + if (!data.IsSet) + throw new ArgumentException("Property is required for class RfidPkiExtension.", nameof(data)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidPkiExtension."); + + if (data.IsSet && data.Value == null) + throw new ArgumentNullException(nameof(data), "Property is not nullable for class RfidPkiExtension."); + + return new RfidPkiExtension(type.Value!, data.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidPkiExtension rfidPkiExtension, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidPkiExtension, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidPkiExtension rfidPkiExtension, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidPkiExtension.Type == null) + throw new ArgumentNullException(nameof(rfidPkiExtension.Type), "Property is required for class RfidPkiExtension."); + + if (rfidPkiExtension.Data == null) + throw new ArgumentNullException(nameof(rfidPkiExtension.Data), "Property is required for class RfidPkiExtension."); + + writer.WriteString("Type", rfidPkiExtension.Type); + + writer.WriteString("Data", rfidPkiExtension.Data); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs new file mode 100644 index 0000000..3e5be98 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs @@ -0,0 +1,185 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// RfidRawData + /// + public partial class RfidRawData : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// data + /// fieldType + [JsonConstructor] + public RfidRawData(string data, int fieldType) + { + Data = data; + FieldType = fieldType; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Data + /// + [JsonPropertyName("Data")] + public string Data { get; set; } + + /// + /// Gets or Sets FieldType + /// + [JsonPropertyName("FieldType")] + public int FieldType { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidRawData {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" FieldType: ").Append(FieldType).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidRawDataJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidRawData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option data = default; + Option fieldType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Data": + data = new Option(utf8JsonReader.GetString()!); + break; + case "FieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!data.IsSet) + throw new ArgumentException("Property is required for class RfidRawData.", nameof(data)); + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class RfidRawData.", nameof(fieldType)); + + if (data.IsSet && data.Value == null) + throw new ArgumentNullException(nameof(data), "Property is not nullable for class RfidRawData."); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class RfidRawData."); + + return new RfidRawData(data.Value!, fieldType.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidRawData rfidRawData, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidRawData, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidRawData rfidRawData, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidRawData.Data == null) + throw new ArgumentNullException(nameof(rfidRawData.Data), "Property is required for class RfidRawData."); + + writer.WriteString("Data", rfidRawData.Data); + + writer.WriteNumber("FieldType", rfidRawData.FieldType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs new file mode 100644 index 0000000..7adc7fa --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs @@ -0,0 +1,263 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the contents of a single document security object (SO) and the results of its check within the context of the communication session with electronic document + /// + public partial class RfidSecurityObject : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Security object version + /// Identifier of the security object + /// Reference to the source file of the security object data + /// List of remarks arisen during the analysis of SO data structure. + /// List of containers to store information about digital signature objects contained in the SO + [JsonConstructor] + public RfidSecurityObject(decimal varVersion, string objectType, decimal fileReference, List notifications, List signerInfos) + { + VarVersion = varVersion; + ObjectType = objectType; + FileReference = fileReference; + Notifications = notifications; + SignerInfos = signerInfos; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Security object version + /// + /// Security object version + [JsonPropertyName("Version")] + public decimal VarVersion { get; set; } + + /// + /// Identifier of the security object + /// + /// Identifier of the security object + [JsonPropertyName("ObjectType")] + public string ObjectType { get; set; } + + /// + /// Reference to the source file of the security object data + /// + /// Reference to the source file of the security object data + [JsonPropertyName("FileReference")] + public decimal FileReference { get; set; } + + /// + /// List of remarks arisen during the analysis of SO data structure. + /// + /// List of remarks arisen during the analysis of SO data structure. + [JsonPropertyName("Notifications")] + public List Notifications { get; set; } + + /// + /// List of containers to store information about digital signature objects contained in the SO + /// + /// List of containers to store information about digital signature objects contained in the SO + [JsonPropertyName("SignerInfos")] + public List SignerInfos { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidSecurityObject {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append(" ObjectType: ").Append(ObjectType).Append("\n"); + sb.Append(" FileReference: ").Append(FileReference).Append("\n"); + sb.Append(" Notifications: ").Append(Notifications).Append("\n"); + sb.Append(" SignerInfos: ").Append(SignerInfos).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidSecurityObjectJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidSecurityObject Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option varVersion = default; + Option objectType = default; + Option fileReference = default; + Option?> notifications = default; + Option?> signerInfos = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Version": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + varVersion = new Option(utf8JsonReader.GetDecimal()); + break; + case "ObjectType": + objectType = new Option(utf8JsonReader.GetString()!); + break; + case "FileReference": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fileReference = new Option(utf8JsonReader.GetDecimal()); + break; + case "Notifications": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SignerInfos": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + signerInfos = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!varVersion.IsSet) + throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(varVersion)); + + if (!objectType.IsSet) + throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(objectType)); + + if (!fileReference.IsSet) + throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(fileReference)); + + if (!notifications.IsSet) + throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(notifications)); + + if (!signerInfos.IsSet) + throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(signerInfos)); + + if (varVersion.IsSet && varVersion.Value == null) + throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class RfidSecurityObject."); + + if (objectType.IsSet && objectType.Value == null) + throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class RfidSecurityObject."); + + if (fileReference.IsSet && fileReference.Value == null) + throw new ArgumentNullException(nameof(fileReference), "Property is not nullable for class RfidSecurityObject."); + + if (notifications.IsSet && notifications.Value == null) + throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidSecurityObject."); + + if (signerInfos.IsSet && signerInfos.Value == null) + throw new ArgumentNullException(nameof(signerInfos), "Property is not nullable for class RfidSecurityObject."); + + return new RfidSecurityObject(varVersion.Value!.Value!, objectType.Value!, fileReference.Value!.Value!, notifications.Value!, signerInfos.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidSecurityObject rfidSecurityObject, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidSecurityObject, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidSecurityObject rfidSecurityObject, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidSecurityObject.ObjectType == null) + throw new ArgumentNullException(nameof(rfidSecurityObject.ObjectType), "Property is required for class RfidSecurityObject."); + + if (rfidSecurityObject.Notifications == null) + throw new ArgumentNullException(nameof(rfidSecurityObject.Notifications), "Property is required for class RfidSecurityObject."); + + if (rfidSecurityObject.SignerInfos == null) + throw new ArgumentNullException(nameof(rfidSecurityObject.SignerInfos), "Property is required for class RfidSecurityObject."); + + writer.WriteNumber("Version", rfidSecurityObject.VarVersion); + + writer.WriteString("ObjectType", rfidSecurityObject.ObjectType); + + writer.WriteNumber("FileReference", rfidSecurityObject.FileReference); + + writer.WritePropertyName("Notifications"); + JsonSerializer.Serialize(writer, rfidSecurityObject.Notifications, jsonSerializerOptions); + writer.WritePropertyName("SignerInfos"); + JsonSerializer.Serialize(writer, rfidSecurityObject.SignerInfos, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs new file mode 100644 index 0000000..c296f1c --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs @@ -0,0 +1,586 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the results of work with the SDK within the context of the current communication session with electronic document + /// + public partial class RfidSessionData : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// List of containers to store information about the involved applications of electronic document + /// List of containers to store information about the supported procedures of authentication and secure data access within the context of the session + /// cardProperties + /// extLeSupport + /// Time of processing, milliseconds + /// List of containers to store information about the read files of the root Master File + /// Total number of bytes transmitted to the RFID-chip during the whole session + /// Total number of bytes received from the RFID-chip during the whole session + /// sessionKey + /// sessionTerminal + /// sessionProcedure + /// List of containers to store information about the detected document security objects + /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document + /// Text SDKVersion value in format A.B (e.g. 3.1) + /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) + /// Text FirmwareVersion value in format A.B (e.g. 5.19) + /// status + [JsonConstructor] + public RfidSessionData(List applications, List accessControls, RfidCardPropertiesExt cardProperties, RFIDErrorCodes extLeSupport, decimal processTime, List rootFiles, decimal totalBytesSent, decimal totalBytesReceived, RfidAccessKey sessionKey, RfidTerminal sessionTerminal, RfidAuthenticationProcedureType sessionProcedure, List securityObjects, Option virtualMode = default, Option sDKVersion = default, Option driverVersion = default, Option firmwareVersion = default, Option status = default) + { + Applications = applications; + AccessControls = accessControls; + CardProperties = cardProperties; + ExtLeSupport = extLeSupport; + ProcessTime = processTime; + RootFiles = rootFiles; + TotalBytesSent = totalBytesSent; + TotalBytesReceived = totalBytesReceived; + SessionKey = sessionKey; + SessionTerminal = sessionTerminal; + SessionProcedure = sessionProcedure; + SecurityObjects = securityObjects; + VirtualModeOption = virtualMode; + SDKVersionOption = sDKVersion; + DriverVersionOption = driverVersion; + FirmwareVersionOption = firmwareVersion; + StatusOption = status; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ExtLeSupport + /// + [JsonPropertyName("ExtLeSupport")] + public RFIDErrorCodes ExtLeSupport { get; set; } + + /// + /// Gets or Sets SessionProcedure + /// + [JsonPropertyName("Session_procedure")] + public RfidAuthenticationProcedureType SessionProcedure { get; set; } + + /// + /// Used to track the state of Status + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option StatusOption { get; private set; } + + /// + /// Gets or Sets Status + /// + [JsonPropertyName("Status")] + public CheckResult? Status { get { return this.StatusOption; } set { this.StatusOption = new(value); } } + + /// + /// List of containers to store information about the involved applications of electronic document + /// + /// List of containers to store information about the involved applications of electronic document + [JsonPropertyName("Applications")] + public List Applications { get; set; } + + /// + /// List of containers to store information about the supported procedures of authentication and secure data access within the context of the session + /// + /// List of containers to store information about the supported procedures of authentication and secure data access within the context of the session + [JsonPropertyName("AccessControls")] + public List AccessControls { get; set; } + + /// + /// Gets or Sets CardProperties + /// + [JsonPropertyName("CardProperties")] + public RfidCardPropertiesExt CardProperties { get; set; } + + /// + /// Time of processing, milliseconds + /// + /// Time of processing, milliseconds + [JsonPropertyName("ProcessTime")] + public decimal ProcessTime { get; set; } + + /// + /// List of containers to store information about the read files of the root Master File + /// + /// List of containers to store information about the read files of the root Master File + [JsonPropertyName("RootFiles")] + public List RootFiles { get; set; } + + /// + /// Total number of bytes transmitted to the RFID-chip during the whole session + /// + /// Total number of bytes transmitted to the RFID-chip during the whole session + [JsonPropertyName("TotalBytesSent")] + public decimal TotalBytesSent { get; set; } + + /// + /// Total number of bytes received from the RFID-chip during the whole session + /// + /// Total number of bytes received from the RFID-chip during the whole session + [JsonPropertyName("TotalBytesReceived")] + public decimal TotalBytesReceived { get; set; } + + /// + /// Gets or Sets SessionKey + /// + [JsonPropertyName("Session_key")] + public RfidAccessKey SessionKey { get; set; } + + /// + /// Gets or Sets SessionTerminal + /// + [JsonPropertyName("Session_terminal")] + public RfidTerminal SessionTerminal { get; set; } + + /// + /// List of containers to store information about the detected document security objects + /// + /// List of containers to store information about the detected document security objects + [JsonPropertyName("SecurityObjects")] + public List SecurityObjects { get; set; } + + /// + /// Used to track the state of VirtualMode + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option VirtualModeOption { get; private set; } + + /// + /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document + /// + /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document + [JsonPropertyName("VirtualMode")] + public string? VirtualMode { get { return this.VirtualModeOption; } set { this.VirtualModeOption = new(value); } } + + /// + /// Used to track the state of SDKVersion + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SDKVersionOption { get; private set; } + + /// + /// Text SDKVersion value in format A.B (e.g. 3.1) + /// + /// Text SDKVersion value in format A.B (e.g. 3.1) + [JsonPropertyName("SDKVersion")] + public string? SDKVersion { get { return this.SDKVersionOption; } set { this.SDKVersionOption = new(value); } } + + /// + /// Used to track the state of DriverVersion + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DriverVersionOption { get; private set; } + + /// + /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) + /// + /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) + [JsonPropertyName("DriverVersion")] + public string? DriverVersion { get { return this.DriverVersionOption; } set { this.DriverVersionOption = new(value); } } + + /// + /// Used to track the state of FirmwareVersion + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FirmwareVersionOption { get; private set; } + + /// + /// Text FirmwareVersion value in format A.B (e.g. 5.19) + /// + /// Text FirmwareVersion value in format A.B (e.g. 5.19) + [JsonPropertyName("FirmwareVersion")] + public string? FirmwareVersion { get { return this.FirmwareVersionOption; } set { this.FirmwareVersionOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidSessionData {\n"); + sb.Append(" Applications: ").Append(Applications).Append("\n"); + sb.Append(" AccessControls: ").Append(AccessControls).Append("\n"); + sb.Append(" CardProperties: ").Append(CardProperties).Append("\n"); + sb.Append(" ExtLeSupport: ").Append(ExtLeSupport).Append("\n"); + sb.Append(" ProcessTime: ").Append(ProcessTime).Append("\n"); + sb.Append(" RootFiles: ").Append(RootFiles).Append("\n"); + sb.Append(" TotalBytesSent: ").Append(TotalBytesSent).Append("\n"); + sb.Append(" TotalBytesReceived: ").Append(TotalBytesReceived).Append("\n"); + sb.Append(" SessionKey: ").Append(SessionKey).Append("\n"); + sb.Append(" SessionTerminal: ").Append(SessionTerminal).Append("\n"); + sb.Append(" SessionProcedure: ").Append(SessionProcedure).Append("\n"); + sb.Append(" SecurityObjects: ").Append(SecurityObjects).Append("\n"); + sb.Append(" VirtualMode: ").Append(VirtualMode).Append("\n"); + sb.Append(" SDKVersion: ").Append(SDKVersion).Append("\n"); + sb.Append(" DriverVersion: ").Append(DriverVersion).Append("\n"); + sb.Append(" FirmwareVersion: ").Append(FirmwareVersion).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidSessionDataJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidSessionData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> applications = default; + Option?> accessControls = default; + Option cardProperties = default; + Option extLeSupport = default; + Option processTime = default; + Option?> rootFiles = default; + Option totalBytesSent = default; + Option totalBytesReceived = default; + Option sessionKey = default; + Option sessionTerminal = default; + Option sessionProcedure = default; + Option?> securityObjects = default; + Option virtualMode = default; + Option sDKVersion = default; + Option driverVersion = default; + Option firmwareVersion = default; + Option status = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Applications": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + applications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "AccessControls": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + accessControls = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "CardProperties": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + cardProperties = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "ExtLeSupport": + string? extLeSupportRawValue = utf8JsonReader.GetString(); + if (extLeSupportRawValue != null) + extLeSupport = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(extLeSupportRawValue)); + break; + case "ProcessTime": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + processTime = new Option(utf8JsonReader.GetDecimal()); + break; + case "RootFiles": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rootFiles = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "TotalBytesSent": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + totalBytesSent = new Option(utf8JsonReader.GetDecimal()); + break; + case "TotalBytesReceived": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + totalBytesReceived = new Option(utf8JsonReader.GetDecimal()); + break; + case "Session_key": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sessionKey = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Session_terminal": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sessionTerminal = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Session_procedure": + string? sessionProcedureRawValue = utf8JsonReader.GetString(); + if (sessionProcedureRawValue != null) + sessionProcedure = new Option(RfidAuthenticationProcedureTypeValueConverter.FromStringOrDefault(sessionProcedureRawValue)); + break; + case "SecurityObjects": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + securityObjects = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "VirtualMode": + virtualMode = new Option(utf8JsonReader.GetString()!); + break; + case "SDKVersion": + sDKVersion = new Option(utf8JsonReader.GetString()!); + break; + case "DriverVersion": + driverVersion = new Option(utf8JsonReader.GetString()!); + break; + case "FirmwareVersion": + firmwareVersion = new Option(utf8JsonReader.GetString()!); + break; + case "Status": + string? statusRawValue = utf8JsonReader.GetString(); + if (statusRawValue != null) + status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); + break; + default: + break; + } + } + } + + if (!applications.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(applications)); + + if (!accessControls.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(accessControls)); + + if (!cardProperties.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(cardProperties)); + + if (!extLeSupport.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(extLeSupport)); + + if (!processTime.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(processTime)); + + if (!rootFiles.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(rootFiles)); + + if (!totalBytesSent.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(totalBytesSent)); + + if (!totalBytesReceived.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(totalBytesReceived)); + + if (!sessionKey.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(sessionKey)); + + if (!sessionTerminal.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(sessionTerminal)); + + if (!sessionProcedure.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(sessionProcedure)); + + if (!securityObjects.IsSet) + throw new ArgumentException("Property is required for class RfidSessionData.", nameof(securityObjects)); + + if (applications.IsSet && applications.Value == null) + throw new ArgumentNullException(nameof(applications), "Property is not nullable for class RfidSessionData."); + + if (accessControls.IsSet && accessControls.Value == null) + throw new ArgumentNullException(nameof(accessControls), "Property is not nullable for class RfidSessionData."); + + if (cardProperties.IsSet && cardProperties.Value == null) + throw new ArgumentNullException(nameof(cardProperties), "Property is not nullable for class RfidSessionData."); + + if (extLeSupport.IsSet && extLeSupport.Value == null) + throw new ArgumentNullException(nameof(extLeSupport), "Property is not nullable for class RfidSessionData."); + + if (processTime.IsSet && processTime.Value == null) + throw new ArgumentNullException(nameof(processTime), "Property is not nullable for class RfidSessionData."); + + if (rootFiles.IsSet && rootFiles.Value == null) + throw new ArgumentNullException(nameof(rootFiles), "Property is not nullable for class RfidSessionData."); + + if (totalBytesSent.IsSet && totalBytesSent.Value == null) + throw new ArgumentNullException(nameof(totalBytesSent), "Property is not nullable for class RfidSessionData."); + + if (totalBytesReceived.IsSet && totalBytesReceived.Value == null) + throw new ArgumentNullException(nameof(totalBytesReceived), "Property is not nullable for class RfidSessionData."); + + if (sessionKey.IsSet && sessionKey.Value == null) + throw new ArgumentNullException(nameof(sessionKey), "Property is not nullable for class RfidSessionData."); + + if (sessionTerminal.IsSet && sessionTerminal.Value == null) + throw new ArgumentNullException(nameof(sessionTerminal), "Property is not nullable for class RfidSessionData."); + + if (sessionProcedure.IsSet && sessionProcedure.Value == null) + throw new ArgumentNullException(nameof(sessionProcedure), "Property is not nullable for class RfidSessionData."); + + if (securityObjects.IsSet && securityObjects.Value == null) + throw new ArgumentNullException(nameof(securityObjects), "Property is not nullable for class RfidSessionData."); + + if (virtualMode.IsSet && virtualMode.Value == null) + throw new ArgumentNullException(nameof(virtualMode), "Property is not nullable for class RfidSessionData."); + + if (sDKVersion.IsSet && sDKVersion.Value == null) + throw new ArgumentNullException(nameof(sDKVersion), "Property is not nullable for class RfidSessionData."); + + if (driverVersion.IsSet && driverVersion.Value == null) + throw new ArgumentNullException(nameof(driverVersion), "Property is not nullable for class RfidSessionData."); + + if (firmwareVersion.IsSet && firmwareVersion.Value == null) + throw new ArgumentNullException(nameof(firmwareVersion), "Property is not nullable for class RfidSessionData."); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class RfidSessionData."); + + return new RfidSessionData(applications.Value!, accessControls.Value!, cardProperties.Value!, extLeSupport.Value!.Value!, processTime.Value!.Value!, rootFiles.Value!, totalBytesSent.Value!.Value!, totalBytesReceived.Value!.Value!, sessionKey.Value!, sessionTerminal.Value!, sessionProcedure.Value!.Value!, securityObjects.Value!, virtualMode, sDKVersion, driverVersion, firmwareVersion, status); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidSessionData rfidSessionData, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidSessionData, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidSessionData rfidSessionData, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidSessionData.Applications == null) + throw new ArgumentNullException(nameof(rfidSessionData.Applications), "Property is required for class RfidSessionData."); + + if (rfidSessionData.AccessControls == null) + throw new ArgumentNullException(nameof(rfidSessionData.AccessControls), "Property is required for class RfidSessionData."); + + if (rfidSessionData.CardProperties == null) + throw new ArgumentNullException(nameof(rfidSessionData.CardProperties), "Property is required for class RfidSessionData."); + + if (rfidSessionData.RootFiles == null) + throw new ArgumentNullException(nameof(rfidSessionData.RootFiles), "Property is required for class RfidSessionData."); + + if (rfidSessionData.SessionKey == null) + throw new ArgumentNullException(nameof(rfidSessionData.SessionKey), "Property is required for class RfidSessionData."); + + if (rfidSessionData.SessionTerminal == null) + throw new ArgumentNullException(nameof(rfidSessionData.SessionTerminal), "Property is required for class RfidSessionData."); + + if (rfidSessionData.SecurityObjects == null) + throw new ArgumentNullException(nameof(rfidSessionData.SecurityObjects), "Property is required for class RfidSessionData."); + + if (rfidSessionData.VirtualModeOption.IsSet && rfidSessionData.VirtualMode == null) + throw new ArgumentNullException(nameof(rfidSessionData.VirtualMode), "Property is required for class RfidSessionData."); + + if (rfidSessionData.SDKVersionOption.IsSet && rfidSessionData.SDKVersion == null) + throw new ArgumentNullException(nameof(rfidSessionData.SDKVersion), "Property is required for class RfidSessionData."); + + if (rfidSessionData.DriverVersionOption.IsSet && rfidSessionData.DriverVersion == null) + throw new ArgumentNullException(nameof(rfidSessionData.DriverVersion), "Property is required for class RfidSessionData."); + + if (rfidSessionData.FirmwareVersionOption.IsSet && rfidSessionData.FirmwareVersion == null) + throw new ArgumentNullException(nameof(rfidSessionData.FirmwareVersion), "Property is required for class RfidSessionData."); + + writer.WritePropertyName("Applications"); + JsonSerializer.Serialize(writer, rfidSessionData.Applications, jsonSerializerOptions); + writer.WritePropertyName("AccessControls"); + JsonSerializer.Serialize(writer, rfidSessionData.AccessControls, jsonSerializerOptions); + writer.WritePropertyName("CardProperties"); + JsonSerializer.Serialize(writer, rfidSessionData.CardProperties, jsonSerializerOptions); + var extLeSupportRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidSessionData.ExtLeSupport); + writer.WriteNumber("ExtLeSupport", extLeSupportRawValue); + + writer.WriteNumber("ProcessTime", rfidSessionData.ProcessTime); + + writer.WritePropertyName("RootFiles"); + JsonSerializer.Serialize(writer, rfidSessionData.RootFiles, jsonSerializerOptions); + writer.WriteNumber("TotalBytesSent", rfidSessionData.TotalBytesSent); + + writer.WriteNumber("TotalBytesReceived", rfidSessionData.TotalBytesReceived); + + writer.WritePropertyName("Session_key"); + JsonSerializer.Serialize(writer, rfidSessionData.SessionKey, jsonSerializerOptions); + writer.WritePropertyName("Session_terminal"); + JsonSerializer.Serialize(writer, rfidSessionData.SessionTerminal, jsonSerializerOptions); + var sessionProcedureRawValue = RfidAuthenticationProcedureTypeValueConverter.ToJsonValue(rfidSessionData.SessionProcedure); + writer.WriteNumber("Session_procedure", sessionProcedureRawValue); + + writer.WritePropertyName("SecurityObjects"); + JsonSerializer.Serialize(writer, rfidSessionData.SecurityObjects, jsonSerializerOptions); + if (rfidSessionData.VirtualModeOption.IsSet) + writer.WriteString("VirtualMode", rfidSessionData.VirtualMode); + + if (rfidSessionData.SDKVersionOption.IsSet) + writer.WriteString("SDKVersion", rfidSessionData.SDKVersion); + + if (rfidSessionData.DriverVersionOption.IsSet) + writer.WriteString("DriverVersion", rfidSessionData.DriverVersion); + + if (rfidSessionData.FirmwareVersionOption.IsSet) + writer.WriteString("FirmwareVersion", rfidSessionData.FirmwareVersion); + + if (rfidSessionData.StatusOption.IsSet) + { + var statusRawValue = CheckResultValueConverter.ToJsonValue(rfidSessionData.Status!.Value); + writer.WriteNumber("Status", statusRawValue); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs new file mode 100644 index 0000000..1813861 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs @@ -0,0 +1,439 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the contents of a single copy of digital signature of the document security object and the results of its check within the context of the communication session with electronic document + /// + public partial class RfidSignerInfoEx : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Version of SignerInfo ASN.1 structure + /// issuer + /// serialNumber + /// subjectKeyIdentifier + /// Hash algorithm identifier (OID) for digital signature generation + /// List of the signed attributes + /// Digital signature algorithm identifier (OID) + /// signature + /// pAStatus + /// Certificate chain, used for the digital signature verification. + /// Binary data array used to calculate the hash value for digital signature verification. Base64 encoded. + /// notifications + [JsonConstructor] + public RfidSignerInfoEx(decimal varVersion, RfidDistinguishedName issuer, TrfFtBytes serialNumber, TrfFtBytes subjectKeyIdentifier, string digestAlgorithm, List signedAttributes, string signatureAlgorithm, TrfFtBytes signature, RFIDErrorCodes pAStatus, List certificateChain, string dataToHash, List notifications) + { + VarVersion = varVersion; + Issuer = issuer; + SerialNumber = serialNumber; + SubjectKeyIdentifier = subjectKeyIdentifier; + DigestAlgorithm = digestAlgorithm; + SignedAttributes = signedAttributes; + SignatureAlgorithm = signatureAlgorithm; + Signature = signature; + PAStatus = pAStatus; + CertificateChain = certificateChain; + DataToHash = dataToHash; + Notifications = notifications; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets PAStatus + /// + [JsonPropertyName("PA_Status")] + public RFIDErrorCodes PAStatus { get; set; } + + /// + /// Version of SignerInfo ASN.1 structure + /// + /// Version of SignerInfo ASN.1 structure + [JsonPropertyName("Version")] + public decimal VarVersion { get; set; } + + /// + /// Gets or Sets Issuer + /// + [JsonPropertyName("Issuer")] + public RfidDistinguishedName Issuer { get; set; } + + /// + /// Gets or Sets SerialNumber + /// + [JsonPropertyName("SerialNumber")] + public TrfFtBytes SerialNumber { get; set; } + + /// + /// Gets or Sets SubjectKeyIdentifier + /// + [JsonPropertyName("SubjectKeyIdentifier")] + public TrfFtBytes SubjectKeyIdentifier { get; set; } + + /// + /// Hash algorithm identifier (OID) for digital signature generation + /// + /// Hash algorithm identifier (OID) for digital signature generation + [JsonPropertyName("DigestAlgorithm")] + public string DigestAlgorithm { get; set; } + + /// + /// List of the signed attributes + /// + /// List of the signed attributes + [JsonPropertyName("SignedAttributes")] + public List SignedAttributes { get; set; } + + /// + /// Digital signature algorithm identifier (OID) + /// + /// Digital signature algorithm identifier (OID) + [JsonPropertyName("SignatureAlgorithm")] + public string SignatureAlgorithm { get; set; } + + /// + /// Gets or Sets Signature + /// + [JsonPropertyName("Signature")] + public TrfFtBytes Signature { get; set; } + + /// + /// Certificate chain, used for the digital signature verification. + /// + /// Certificate chain, used for the digital signature verification. + [JsonPropertyName("CertificateChain")] + public List CertificateChain { get; set; } + + /// + /// Binary data array used to calculate the hash value for digital signature verification. Base64 encoded. + /// + /// Binary data array used to calculate the hash value for digital signature verification. Base64 encoded. + [JsonPropertyName("DataToHash")] + public string DataToHash { get; set; } + + /// + /// Gets or Sets Notifications + /// + [JsonPropertyName("Notifications")] + public List Notifications { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidSignerInfoEx {\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); + sb.Append(" Issuer: ").Append(Issuer).Append("\n"); + sb.Append(" SerialNumber: ").Append(SerialNumber).Append("\n"); + sb.Append(" SubjectKeyIdentifier: ").Append(SubjectKeyIdentifier).Append("\n"); + sb.Append(" DigestAlgorithm: ").Append(DigestAlgorithm).Append("\n"); + sb.Append(" SignedAttributes: ").Append(SignedAttributes).Append("\n"); + sb.Append(" SignatureAlgorithm: ").Append(SignatureAlgorithm).Append("\n"); + sb.Append(" Signature: ").Append(Signature).Append("\n"); + sb.Append(" PAStatus: ").Append(PAStatus).Append("\n"); + sb.Append(" CertificateChain: ").Append(CertificateChain).Append("\n"); + sb.Append(" DataToHash: ").Append(DataToHash).Append("\n"); + sb.Append(" Notifications: ").Append(Notifications).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidSignerInfoExJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidSignerInfoEx Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option varVersion = default; + Option issuer = default; + Option serialNumber = default; + Option subjectKeyIdentifier = default; + Option digestAlgorithm = default; + Option?> signedAttributes = default; + Option signatureAlgorithm = default; + Option signature = default; + Option pAStatus = default; + Option?> certificateChain = default; + Option dataToHash = default; + Option?> notifications = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Version": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + varVersion = new Option(utf8JsonReader.GetDecimal()); + break; + case "Issuer": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + issuer = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SerialNumber": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + serialNumber = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SubjectKeyIdentifier": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + subjectKeyIdentifier = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "DigestAlgorithm": + digestAlgorithm = new Option(utf8JsonReader.GetString()!); + break; + case "SignedAttributes": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + signedAttributes = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SignatureAlgorithm": + signatureAlgorithm = new Option(utf8JsonReader.GetString()!); + break; + case "Signature": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + signature = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "PA_Status": + string? pAStatusRawValue = utf8JsonReader.GetString(); + if (pAStatusRawValue != null) + pAStatus = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(pAStatusRawValue)); + break; + case "CertificateChain": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + certificateChain = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "DataToHash": + dataToHash = new Option(utf8JsonReader.GetString()!); + break; + case "Notifications": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!varVersion.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(varVersion)); + + if (!issuer.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(issuer)); + + if (!serialNumber.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(serialNumber)); + + if (!subjectKeyIdentifier.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(subjectKeyIdentifier)); + + if (!digestAlgorithm.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(digestAlgorithm)); + + if (!signedAttributes.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(signedAttributes)); + + if (!signatureAlgorithm.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(signatureAlgorithm)); + + if (!signature.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(signature)); + + if (!pAStatus.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(pAStatus)); + + if (!certificateChain.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(certificateChain)); + + if (!dataToHash.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(dataToHash)); + + if (!notifications.IsSet) + throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(notifications)); + + if (varVersion.IsSet && varVersion.Value == null) + throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class RfidSignerInfoEx."); + + if (issuer.IsSet && issuer.Value == null) + throw new ArgumentNullException(nameof(issuer), "Property is not nullable for class RfidSignerInfoEx."); + + if (serialNumber.IsSet && serialNumber.Value == null) + throw new ArgumentNullException(nameof(serialNumber), "Property is not nullable for class RfidSignerInfoEx."); + + if (subjectKeyIdentifier.IsSet && subjectKeyIdentifier.Value == null) + throw new ArgumentNullException(nameof(subjectKeyIdentifier), "Property is not nullable for class RfidSignerInfoEx."); + + if (digestAlgorithm.IsSet && digestAlgorithm.Value == null) + throw new ArgumentNullException(nameof(digestAlgorithm), "Property is not nullable for class RfidSignerInfoEx."); + + if (signedAttributes.IsSet && signedAttributes.Value == null) + throw new ArgumentNullException(nameof(signedAttributes), "Property is not nullable for class RfidSignerInfoEx."); + + if (signatureAlgorithm.IsSet && signatureAlgorithm.Value == null) + throw new ArgumentNullException(nameof(signatureAlgorithm), "Property is not nullable for class RfidSignerInfoEx."); + + if (signature.IsSet && signature.Value == null) + throw new ArgumentNullException(nameof(signature), "Property is not nullable for class RfidSignerInfoEx."); + + if (pAStatus.IsSet && pAStatus.Value == null) + throw new ArgumentNullException(nameof(pAStatus), "Property is not nullable for class RfidSignerInfoEx."); + + if (certificateChain.IsSet && certificateChain.Value == null) + throw new ArgumentNullException(nameof(certificateChain), "Property is not nullable for class RfidSignerInfoEx."); + + if (dataToHash.IsSet && dataToHash.Value == null) + throw new ArgumentNullException(nameof(dataToHash), "Property is not nullable for class RfidSignerInfoEx."); + + if (notifications.IsSet && notifications.Value == null) + throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidSignerInfoEx."); + + return new RfidSignerInfoEx(varVersion.Value!.Value!, issuer.Value!, serialNumber.Value!, subjectKeyIdentifier.Value!, digestAlgorithm.Value!, signedAttributes.Value!, signatureAlgorithm.Value!, signature.Value!, pAStatus.Value!.Value!, certificateChain.Value!, dataToHash.Value!, notifications.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidSignerInfoEx rfidSignerInfoEx, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidSignerInfoEx, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidSignerInfoEx rfidSignerInfoEx, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidSignerInfoEx.Issuer == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.Issuer), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.SerialNumber == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.SerialNumber), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.SubjectKeyIdentifier == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.SubjectKeyIdentifier), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.DigestAlgorithm == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.DigestAlgorithm), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.SignedAttributes == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.SignedAttributes), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.SignatureAlgorithm == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.SignatureAlgorithm), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.Signature == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.Signature), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.CertificateChain == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.CertificateChain), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.DataToHash == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.DataToHash), "Property is required for class RfidSignerInfoEx."); + + if (rfidSignerInfoEx.Notifications == null) + throw new ArgumentNullException(nameof(rfidSignerInfoEx.Notifications), "Property is required for class RfidSignerInfoEx."); + + writer.WriteNumber("Version", rfidSignerInfoEx.VarVersion); + + writer.WritePropertyName("Issuer"); + JsonSerializer.Serialize(writer, rfidSignerInfoEx.Issuer, jsonSerializerOptions); + writer.WritePropertyName("SerialNumber"); + JsonSerializer.Serialize(writer, rfidSignerInfoEx.SerialNumber, jsonSerializerOptions); + writer.WritePropertyName("SubjectKeyIdentifier"); + JsonSerializer.Serialize(writer, rfidSignerInfoEx.SubjectKeyIdentifier, jsonSerializerOptions); + writer.WriteString("DigestAlgorithm", rfidSignerInfoEx.DigestAlgorithm); + + writer.WritePropertyName("SignedAttributes"); + JsonSerializer.Serialize(writer, rfidSignerInfoEx.SignedAttributes, jsonSerializerOptions); + writer.WriteString("SignatureAlgorithm", rfidSignerInfoEx.SignatureAlgorithm); + + writer.WritePropertyName("Signature"); + JsonSerializer.Serialize(writer, rfidSignerInfoEx.Signature, jsonSerializerOptions); + var pAStatusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidSignerInfoEx.PAStatus); + writer.WriteNumber("PA_Status", pAStatusRawValue); + + writer.WritePropertyName("CertificateChain"); + JsonSerializer.Serialize(writer, rfidSignerInfoEx.CertificateChain, jsonSerializerOptions); + writer.WriteString("DataToHash", rfidSignerInfoEx.DataToHash); + + writer.WritePropertyName("Notifications"); + JsonSerializer.Serialize(writer, rfidSignerInfoEx.Notifications, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs b/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs new file mode 100644 index 0000000..300a6c2 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs @@ -0,0 +1,209 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to describe the terminal type within the context of the communication session with electronic document + /// + public partial class RfidTerminal : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// termType + /// Declared (set) combination of flags of access rights to the functionality of the document (combination of eRfidTerminalAuthorizationRequirement values) + /// Declared (set) combination of flags of access rights to the functionality of the document (combination of RfidTerminalAuthorizationRequirement values) + [JsonConstructor] + public RfidTerminal(RfidTerminalType termType, decimal authReq, decimal authReq2) + { + TermType = termType; + AuthReq = authReq; + AuthReq2 = authReq2; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets TermType + /// + [JsonPropertyName("TermType")] + public RfidTerminalType TermType { get; set; } + + /// + /// Declared (set) combination of flags of access rights to the functionality of the document (combination of eRfidTerminalAuthorizationRequirement values) + /// + /// Declared (set) combination of flags of access rights to the functionality of the document (combination of eRfidTerminalAuthorizationRequirement values) + [JsonPropertyName("AuthReq")] + public decimal AuthReq { get; set; } + + /// + /// Declared (set) combination of flags of access rights to the functionality of the document (combination of RfidTerminalAuthorizationRequirement values) + /// + /// Declared (set) combination of flags of access rights to the functionality of the document (combination of RfidTerminalAuthorizationRequirement values) + [JsonPropertyName("AuthReq2")] + public decimal AuthReq2 { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidTerminal {\n"); + sb.Append(" TermType: ").Append(TermType).Append("\n"); + sb.Append(" AuthReq: ").Append(AuthReq).Append("\n"); + sb.Append(" AuthReq2: ").Append(AuthReq2).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidTerminalJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidTerminal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option termType = default; + Option authReq = default; + Option authReq2 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "TermType": + string? termTypeRawValue = utf8JsonReader.GetString(); + if (termTypeRawValue != null) + termType = new Option(RfidTerminalTypeValueConverter.FromStringOrDefault(termTypeRawValue)); + break; + case "AuthReq": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + authReq = new Option(utf8JsonReader.GetDecimal()); + break; + case "AuthReq2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + authReq2 = new Option(utf8JsonReader.GetDecimal()); + break; + default: + break; + } + } + } + + if (!termType.IsSet) + throw new ArgumentException("Property is required for class RfidTerminal.", nameof(termType)); + + if (!authReq.IsSet) + throw new ArgumentException("Property is required for class RfidTerminal.", nameof(authReq)); + + if (!authReq2.IsSet) + throw new ArgumentException("Property is required for class RfidTerminal.", nameof(authReq2)); + + if (termType.IsSet && termType.Value == null) + throw new ArgumentNullException(nameof(termType), "Property is not nullable for class RfidTerminal."); + + if (authReq.IsSet && authReq.Value == null) + throw new ArgumentNullException(nameof(authReq), "Property is not nullable for class RfidTerminal."); + + if (authReq2.IsSet && authReq2.Value == null) + throw new ArgumentNullException(nameof(authReq2), "Property is not nullable for class RfidTerminal."); + + return new RfidTerminal(termType.Value!.Value!, authReq.Value!.Value!, authReq2.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidTerminal rfidTerminal, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidTerminal, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidTerminal rfidTerminal, JsonSerializerOptions jsonSerializerOptions) + { + var termTypeRawValue = RfidTerminalTypeValueConverter.ToJsonValue(rfidTerminal.TermType); + writer.WriteNumber("TermType", termTypeRawValue); + + writer.WriteNumber("AuthReq", rfidTerminal.AuthReq); + + writer.WriteNumber("AuthReq2", rfidTerminal.AuthReq2); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs new file mode 100644 index 0000000..8b4950a --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs @@ -0,0 +1,203 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants that define the type of terminal within the context of the communication session with electronic document + /// + /// Enumeration contains a set of constants that define the type of terminal within the context of the communication session with electronic document + public enum RfidTerminalType + { + /// + /// Enum UNDEFINED for value: 0 + /// + UNDEFINED = 0, + + /// + /// Enum INSPECTION_SYSTEM for value: 1 + /// + INSPECTION_SYSTEM = 1, + + /// + /// Enum AUTHENTICATION_TERMINAL for value: 2 + /// + AUTHENTICATION_TERMINAL = 2, + + /// + /// Enum SIGNATURE_TERMINAL for value: 3 + /// + SIGNATURE_TERMINAL = 3, + + /// + /// Enum UNAUTHENTICATED_TERMINAL for value: 4 + /// + UNAUTHENTICATED_TERMINAL = 4 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidTerminalTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidTerminalType FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidTerminalType.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidTerminalType.INSPECTION_SYSTEM; + + if (value.Equals((2).ToString())) + return RfidTerminalType.AUTHENTICATION_TERMINAL; + + if (value.Equals((3).ToString())) + return RfidTerminalType.SIGNATURE_TERMINAL; + + if (value.Equals((4).ToString())) + return RfidTerminalType.UNAUTHENTICATED_TERMINAL; + + throw new NotImplementedException($"Could not convert value to type RfidTerminalType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidTerminalType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidTerminalType.UNDEFINED; + + if (value.Equals((1).ToString())) + return RfidTerminalType.INSPECTION_SYSTEM; + + if (value.Equals((2).ToString())) + return RfidTerminalType.AUTHENTICATION_TERMINAL; + + if (value.Equals((3).ToString())) + return RfidTerminalType.SIGNATURE_TERMINAL; + + if (value.Equals((4).ToString())) + return RfidTerminalType.UNAUTHENTICATED_TERMINAL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidTerminalType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidTerminalTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidTerminalType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidTerminalType? result = rawValue == null + ? null + : RfidTerminalTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidTerminalType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidTerminalType rfidTerminalType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidTerminalType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidTerminalTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidTerminalType from the Json object + /// + /// + /// + /// + /// + public override RfidTerminalType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidTerminalType? result = rawValue == null + ? null + : RfidTerminalTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidTerminalType? rfidTerminalType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidTerminalType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidType.cs new file mode 100644 index 0000000..9adb893 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidType.cs @@ -0,0 +1,181 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Enumeration contains a set of constants specifying the type of the RFID-chip by the physical parameters of connection between antennas of the chip and the reader + /// + /// Enumeration contains a set of constants specifying the type of the RFID-chip by the physical parameters of connection between antennas of the chip and the reader + public enum RfidType + { + /// + /// Enum UNKNOWN for value: 0 + /// + UNKNOWN = 0, + + /// + /// Enum A for value: 1 + /// + A = 1, + + /// + /// Enum B for value: 2 + /// + B = 2 + } + + /// + /// Converts to and from the JSON value + /// + public static class RfidTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static RfidType FromString(string value) + { + if (value.Equals((0).ToString())) + return RfidType.UNKNOWN; + + if (value.Equals((1).ToString())) + return RfidType.A; + + if (value.Equals((2).ToString())) + return RfidType.B; + + throw new NotImplementedException($"Could not convert value to type RfidType: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static RfidType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return RfidType.UNKNOWN; + + if (value.Equals((1).ToString())) + return RfidType.A; + + if (value.Equals((2).ToString())) + return RfidType.B; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(RfidType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class RfidTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override RfidType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidType? result = rawValue == null + ? null + : RfidTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the RfidType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidType rfidType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class RfidTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a RfidType from the Json object + /// + /// + /// + /// + /// + public override RfidType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + RfidType? result = rawValue == null + ? null + : RfidTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidType? rfidType, JsonSerializerOptions options) + { + writer.WriteStringValue(rfidType?.ToString() ?? "null"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs b/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs new file mode 100644 index 0000000..beae917 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs @@ -0,0 +1,190 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure contains information on a certificate validity. + /// + public partial class RfidValidity : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// notBefore + /// notAfter + [JsonConstructor] + public RfidValidity(TrfFtString notBefore, TrfFtString notAfter) + { + NotBefore = notBefore; + NotAfter = notAfter; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets NotBefore + /// + [JsonPropertyName("NotBefore")] + public TrfFtString NotBefore { get; set; } + + /// + /// Gets or Sets NotAfter + /// + [JsonPropertyName("NotAfter")] + public TrfFtString NotAfter { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class RfidValidity {\n"); + sb.Append(" NotBefore: ").Append(NotBefore).Append("\n"); + sb.Append(" NotAfter: ").Append(NotAfter).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class RfidValidityJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override RfidValidity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option notBefore = default; + Option notAfter = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "NotBefore": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + notBefore = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "NotAfter": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + notAfter = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!notBefore.IsSet) + throw new ArgumentException("Property is required for class RfidValidity.", nameof(notBefore)); + + if (!notAfter.IsSet) + throw new ArgumentException("Property is required for class RfidValidity.", nameof(notAfter)); + + if (notBefore.IsSet && notBefore.Value == null) + throw new ArgumentNullException(nameof(notBefore), "Property is not nullable for class RfidValidity."); + + if (notAfter.IsSet && notAfter.Value == null) + throw new ArgumentNullException(nameof(notAfter), "Property is not nullable for class RfidValidity."); + + return new RfidValidity(notBefore.Value!, notAfter.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, RfidValidity rfidValidity, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, rfidValidity, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, RfidValidity rfidValidity, JsonSerializerOptions jsonSerializerOptions) + { + if (rfidValidity.NotBefore == null) + throw new ArgumentNullException(nameof(rfidValidity.NotBefore), "Property is required for class RfidValidity."); + + if (rfidValidity.NotAfter == null) + throw new ArgumentNullException(nameof(rfidValidity.NotAfter), "Property is required for class RfidValidity."); + + writer.WritePropertyName("NotBefore"); + JsonSerializer.Serialize(writer, rfidValidity.NotBefore, jsonSerializerOptions); + writer.WritePropertyName("NotAfter"); + JsonSerializer.Serialize(writer, rfidValidity.NotAfter, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/Scenario.cs b/src/Regula.DocumentReader.WebClient/Model/Scenario.cs index d49d721..e2b9e9f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Scenario.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Scenario.cs @@ -1,86 +1,414 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Document processing scenario - public class Scenario + /// + /// Document processing scenario + public enum Scenario { + /// + /// Enum MRZ for value: Mrz + /// + MRZ = 1, + + /// + /// Enum BARCODE for value: Barcode + /// + BARCODE = 2, + + /// + /// Enum LOCATE for value: Locate + /// + LOCATE = 3, + + /// + /// Enum OCR for value: Ocr + /// + OCR = 4, + + /// + /// Enum DOCTYPE for value: DocType + /// + DOCTYPE = 5, + + /// + /// Enum MRZ_OR_BARCODE for value: MrzOrBarcode + /// + MRZ_OR_BARCODE = 6, + + /// + /// Enum MRZ_OR_LOCATE for value: MrzOrLocate + /// + MRZ_OR_LOCATE = 7, + + /// + /// Enum MRZ_AND_LOCATE for value: MrzAndLocate + /// + MRZ_AND_LOCATE = 8, + + /// + /// Enum BARCODE_AND_LOCATE for value: BarcodeAndLocate + /// + BARCODE_AND_LOCATE = 9, + + /// + /// Enum MRZ_OR_OCR for value: MrzOrOcr + /// + MRZ_OR_OCR = 10, + + /// + /// Enum MRZ_OR_BARCODE_OR_OCR for value: MrzOrBarcodeOrOcr + /// + MRZ_OR_BARCODE_OR_OCR = 11, + + /// + /// Enum LOCATE_VISUAL_AND_MRZ_OR_OCR for value: LocateVisual_And_MrzOrOcr + /// + LOCATE_VISUAL_AND_MRZ_OR_OCR = 12, + + /// + /// Enum FULL_PROCESS for value: FullProcess + /// + FULL_PROCESS = 13, + + /// + /// Enum FULL_AUTH for value: FullAuth + /// + FULL_AUTH = 14, + + /// + /// Enum RUS_STAMP for value: RusStamp + /// + RUS_STAMP = 15, + + /// + /// Enum OCR_FREE for value: OcrFree + /// + OCR_FREE = 16, + + /// + /// Enum CREDIT_CARD for value: CreditCard + /// + CREDIT_CARD = 17, + + /// + /// Enum CAPTURE for value: Capture + /// + CAPTURE = 18, + + /// + /// Enum DTC for value: DTC + /// + DTC = 19 + } + + /// + /// Converts to and from the JSON value + /// + public static class ScenarioValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static Scenario FromString(string value) + { + if (value.Equals("Mrz")) + return Scenario.MRZ; + + if (value.Equals("Barcode")) + return Scenario.BARCODE; + + if (value.Equals("Locate")) + return Scenario.LOCATE; + + if (value.Equals("Ocr")) + return Scenario.OCR; + + if (value.Equals("DocType")) + return Scenario.DOCTYPE; + + if (value.Equals("MrzOrBarcode")) + return Scenario.MRZ_OR_BARCODE; + + if (value.Equals("MrzOrLocate")) + return Scenario.MRZ_OR_LOCATE; + + if (value.Equals("MrzAndLocate")) + return Scenario.MRZ_AND_LOCATE; + + if (value.Equals("BarcodeAndLocate")) + return Scenario.BARCODE_AND_LOCATE; + + if (value.Equals("MrzOrOcr")) + return Scenario.MRZ_OR_OCR; + + if (value.Equals("MrzOrBarcodeOrOcr")) + return Scenario.MRZ_OR_BARCODE_OR_OCR; + + if (value.Equals("LocateVisual_And_MrzOrOcr")) + return Scenario.LOCATE_VISUAL_AND_MRZ_OR_OCR; + + if (value.Equals("FullProcess")) + return Scenario.FULL_PROCESS; + + if (value.Equals("FullAuth")) + return Scenario.FULL_AUTH; - - public const string MRZ = "Mrz"; + if (value.Equals("RusStamp")) + return Scenario.RUS_STAMP; - - public const string BARCODE = "Barcode"; + if (value.Equals("OcrFree")) + return Scenario.OCR_FREE; - - public const string LOCATE = "Locate"; + if (value.Equals("CreditCard")) + return Scenario.CREDIT_CARD; - - public const string OCR = "Ocr"; + if (value.Equals("Capture")) + return Scenario.CAPTURE; - - public const string DOCTYPE = "DocType"; + if (value.Equals("DTC")) + return Scenario.DTC; - - public const string MRZ_OR_BARCODE = "MrzOrBarcode"; + throw new NotImplementedException($"Could not convert value to type Scenario: '{value}'"); + } - - public const string MRZ_OR_LOCATE = "MrzOrLocate"; + /// + /// Parses a given value to + /// + /// + /// + public static Scenario? FromStringOrDefault(string value) + { + if (value.Equals("Mrz")) + return Scenario.MRZ; - - public const string MRZ_AND_LOCATE = "MrzAndLocate"; + if (value.Equals("Barcode")) + return Scenario.BARCODE; - - public const string MRZ_OR_OCR = "MrzOrOcr"; + if (value.Equals("Locate")) + return Scenario.LOCATE; - - public const string MRZ_OR_BARCODE_OR_OCR = "MrzOrBarcodeOrOcr"; + if (value.Equals("Ocr")) + return Scenario.OCR; - - public const string LOCATE_VISUAL_AND_MRZ_OR_OCR = "LocateVisual_And_MrzOrOcr"; + if (value.Equals("DocType")) + return Scenario.DOCTYPE; - - public const string FULL_PROCESS = "FullProcess"; + if (value.Equals("MrzOrBarcode")) + return Scenario.MRZ_OR_BARCODE; - - public const string FULL_AUTH = "FullAuth"; + if (value.Equals("MrzOrLocate")) + return Scenario.MRZ_OR_LOCATE; - - public const string ID3RUS = "Id3Rus"; + if (value.Equals("MrzAndLocate")) + return Scenario.MRZ_AND_LOCATE; - - public const string RUS_STAMP = "RusStamp"; + if (value.Equals("BarcodeAndLocate")) + return Scenario.BARCODE_AND_LOCATE; + + if (value.Equals("MrzOrOcr")) + return Scenario.MRZ_OR_OCR; + + if (value.Equals("MrzOrBarcodeOrOcr")) + return Scenario.MRZ_OR_BARCODE_OR_OCR; + + if (value.Equals("LocateVisual_And_MrzOrOcr")) + return Scenario.LOCATE_VISUAL_AND_MRZ_OR_OCR; + + if (value.Equals("FullProcess")) + return Scenario.FULL_PROCESS; + + if (value.Equals("FullAuth")) + return Scenario.FULL_AUTH; + + if (value.Equals("RusStamp")) + return Scenario.RUS_STAMP; + + if (value.Equals("OcrFree")) + return Scenario.OCR_FREE; + + if (value.Equals("CreditCard")) + return Scenario.CREDIT_CARD; + + if (value.Equals("Capture")) + return Scenario.CAPTURE; + + if (value.Equals("DTC")) + return Scenario.DTC; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static string ToJsonValue(Scenario value) + { + if (value == Scenario.MRZ) + return "Mrz"; + + if (value == Scenario.BARCODE) + return "Barcode"; + + if (value == Scenario.LOCATE) + return "Locate"; + + if (value == Scenario.OCR) + return "Ocr"; + + if (value == Scenario.DOCTYPE) + return "DocType"; + + if (value == Scenario.MRZ_OR_BARCODE) + return "MrzOrBarcode"; + + if (value == Scenario.MRZ_OR_LOCATE) + return "MrzOrLocate"; + + if (value == Scenario.MRZ_AND_LOCATE) + return "MrzAndLocate"; + + if (value == Scenario.BARCODE_AND_LOCATE) + return "BarcodeAndLocate"; + + if (value == Scenario.MRZ_OR_OCR) + return "MrzOrOcr"; + + if (value == Scenario.MRZ_OR_BARCODE_OR_OCR) + return "MrzOrBarcodeOrOcr"; + + if (value == Scenario.LOCATE_VISUAL_AND_MRZ_OR_OCR) + return "LocateVisual_And_MrzOrOcr"; + + if (value == Scenario.FULL_PROCESS) + return "FullProcess"; + + if (value == Scenario.FULL_AUTH) + return "FullAuth"; + + if (value == Scenario.RUS_STAMP) + return "RusStamp"; + + if (value == Scenario.OCR_FREE) + return "OcrFree"; + + if (value == Scenario.CREDIT_CARD) + return "CreditCard"; + + if (value == Scenario.CAPTURE) + return "Capture"; + + if (value == Scenario.DTC) + return "DTC"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + } + + /// + /// A Json converter for type + /// + /// + public class ScenarioJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override Scenario Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + Scenario? result = rawValue == null + ? null + : ScenarioValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the Scenario to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Scenario scenario, JsonSerializerOptions options) + { + writer.WriteStringValue(scenario.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class ScenarioNullableJsonConverter : JsonConverter + { + /// + /// Returns a Scenario from the Json object + /// + /// + /// + /// + /// + public override Scenario? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - - public const string OCR_FREE = "OcrFree"; + Scenario? result = rawValue == null + ? null + : ScenarioValueConverter.FromStringOrDefault(rawValue); - - public const string CREDIT_CARD = "CreditCard"; + if (result != null) + return result.Value; - - public const string CAPTURE = "Capture"; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Scenario? scenario, JsonSerializerOptions options) + { + writer.WriteStringValue(scenario?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs new file mode 100644 index 0000000..b8443cb --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs @@ -0,0 +1,295 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// SecurityFeatureItem + /// + public partial class SecurityFeatureItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// elementType + /// elementRect + /// visibility + /// criticalFlag + /// areaList + /// reserved2 + [JsonConstructor] + public SecurityFeatureItem(SecurityFeatureType elementType, RectangleCoordinates elementRect, Visibility visibility, Critical criticalFlag, Option areaList = default, Option reserved2 = default) + { + ElementType = elementType; + ElementRect = elementRect; + Visibility = visibility; + CriticalFlag = criticalFlag; + AreaListOption = areaList; + Reserved2Option = reserved2; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ElementType + /// + [JsonPropertyName("ElementType")] + public SecurityFeatureType ElementType { get; set; } + + /// + /// Gets or Sets Visibility + /// + [JsonPropertyName("Visibility")] + public Visibility Visibility { get; set; } + + /// + /// Gets or Sets CriticalFlag + /// + [JsonPropertyName("CriticalFlag")] + public Critical CriticalFlag { get; set; } + + /// + /// Gets or Sets ElementRect + /// + [JsonPropertyName("ElementRect")] + public RectangleCoordinates ElementRect { get; set; } + + /// + /// Used to track the state of AreaList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AreaListOption { get; private set; } + + /// + /// Gets or Sets AreaList + /// + [JsonPropertyName("AreaList")] + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + + /// + /// Used to track the state of Reserved2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved2Option { get; private set; } + + /// + /// Gets or Sets Reserved2 + /// + [JsonPropertyName("Reserved2")] + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SecurityFeatureItem {\n"); + sb.Append(" ElementType: ").Append(ElementType).Append("\n"); + sb.Append(" ElementRect: ").Append(ElementRect).Append("\n"); + sb.Append(" Visibility: ").Append(Visibility).Append("\n"); + sb.Append(" CriticalFlag: ").Append(CriticalFlag).Append("\n"); + sb.Append(" AreaList: ").Append(AreaList).Append("\n"); + sb.Append(" Reserved2: ").Append(Reserved2).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class SecurityFeatureItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override SecurityFeatureItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option elementType = default; + Option elementRect = default; + Option visibility = default; + Option criticalFlag = default; + Option areaList = default; + Option reserved2 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ElementType": + string? elementTypeRawValue = utf8JsonReader.GetString(); + if (elementTypeRawValue != null) + elementType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(elementTypeRawValue)); + break; + case "ElementRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + elementRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Visibility": + string? visibilityRawValue = utf8JsonReader.GetString(); + if (visibilityRawValue != null) + visibility = new Option(VisibilityValueConverter.FromStringOrDefault(visibilityRawValue)); + break; + case "CriticalFlag": + string? criticalFlagRawValue = utf8JsonReader.GetString(); + if (criticalFlagRawValue != null) + criticalFlag = new Option(CriticalValueConverter.FromStringOrDefault(criticalFlagRawValue)); + break; + case "AreaList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + areaList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!elementType.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureItem.", nameof(elementType)); + + if (!elementRect.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureItem.", nameof(elementRect)); + + if (!visibility.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureItem.", nameof(visibility)); + + if (!criticalFlag.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureItem.", nameof(criticalFlag)); + + if (elementType.IsSet && elementType.Value == null) + throw new ArgumentNullException(nameof(elementType), "Property is not nullable for class SecurityFeatureItem."); + + if (elementRect.IsSet && elementRect.Value == null) + throw new ArgumentNullException(nameof(elementRect), "Property is not nullable for class SecurityFeatureItem."); + + if (visibility.IsSet && visibility.Value == null) + throw new ArgumentNullException(nameof(visibility), "Property is not nullable for class SecurityFeatureItem."); + + if (criticalFlag.IsSet && criticalFlag.Value == null) + throw new ArgumentNullException(nameof(criticalFlag), "Property is not nullable for class SecurityFeatureItem."); + + if (areaList.IsSet && areaList.Value == null) + throw new ArgumentNullException(nameof(areaList), "Property is not nullable for class SecurityFeatureItem."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class SecurityFeatureItem."); + + return new SecurityFeatureItem(elementType.Value!.Value!, elementRect.Value!, visibility.Value!.Value!, criticalFlag.Value!.Value!, areaList, reserved2); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SecurityFeatureItem securityFeatureItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, securityFeatureItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, SecurityFeatureItem securityFeatureItem, JsonSerializerOptions jsonSerializerOptions) + { + if (securityFeatureItem.ElementRect == null) + throw new ArgumentNullException(nameof(securityFeatureItem.ElementRect), "Property is required for class SecurityFeatureItem."); + + if (securityFeatureItem.AreaListOption.IsSet && securityFeatureItem.AreaList == null) + throw new ArgumentNullException(nameof(securityFeatureItem.AreaList), "Property is required for class SecurityFeatureItem."); + + var elementTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(securityFeatureItem.ElementType); + writer.WriteNumber("ElementType", elementTypeRawValue); + + writer.WritePropertyName("ElementRect"); + JsonSerializer.Serialize(writer, securityFeatureItem.ElementRect, jsonSerializerOptions); + var visibilityRawValue = VisibilityValueConverter.ToJsonValue(securityFeatureItem.Visibility); + writer.WriteNumber("Visibility", visibilityRawValue); + + var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(securityFeatureItem.CriticalFlag); + writer.WriteNumber("CriticalFlag", criticalFlagRawValue); + + if (securityFeatureItem.AreaListOption.IsSet) + { + writer.WritePropertyName("AreaList"); + JsonSerializer.Serialize(writer, securityFeatureItem.AreaList, jsonSerializerOptions); + } + if (securityFeatureItem.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", securityFeatureItem.Reserved2Option.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs index ffbc6f3..71508fd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs @@ -1,94 +1,110 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// SecurityFeatureResult /// - [DataContract] - public partial class SecurityFeatureResult : AuthenticityCheckResultItem, IEquatable, IValidatableObject + public partial class SecurityFeatureResult : AuthenticityCheckResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected SecurityFeatureResult() { } - /// - /// Initializes a new instance of the class. - /// - /// elementType. - /// elementRect. - /// visibility. - /// criticalFlag. - /// areaList. - /// reserved2. - public SecurityFeatureResult(int elementType = default(int), RectangleCoordinates elementRect = default(RectangleCoordinates), int visibility = default(int), int criticalFlag = default(int), AreaContainer areaList = default(AreaContainer), int reserved2 = default(int), int type = 0, int elementResult = default(int), int elementDiagnose = default(int), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + /// elementType + /// elementRect + /// visibility + /// criticalFlag + /// elementResult + /// elementDiagnose + /// percentValue + /// areaList + /// reserved2 + [JsonConstructor] + public SecurityFeatureResult(SecurityFeatureType elementType, RectangleCoordinates elementRect, Visibility visibility, Critical criticalFlag, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option areaList = default, Option reserved2 = default) : base(elementResult, elementDiagnose, percentValue) { - this.ElementType = elementType; - this.ElementRect = elementRect; - this.Visibility = visibility; - this.CriticalFlag = criticalFlag; - this.AreaList = areaList; - this.Reserved2 = reserved2; + ElementType = elementType; + ElementRect = elementRect; + Visibility = visibility; + CriticalFlag = criticalFlag; + AreaListOption = areaList; + Reserved2Option = reserved2; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets ElementType /// - [DataMember(Name="ElementType", EmitDefaultValue=false)] - public int ElementType { get; set; } + [JsonPropertyName("ElementType")] + public SecurityFeatureType ElementType { get; set; } + + /// + /// Gets or Sets Visibility + /// + [JsonPropertyName("Visibility")] + public Visibility Visibility { get; set; } + + /// + /// Gets or Sets CriticalFlag + /// + [JsonPropertyName("CriticalFlag")] + public Critical CriticalFlag { get; set; } /// /// Gets or Sets ElementRect /// - [DataMember(Name="ElementRect", EmitDefaultValue=false)] + [JsonPropertyName("ElementRect")] public RectangleCoordinates ElementRect { get; set; } /// - /// Gets or Sets Visibility + /// Used to track the state of AreaList /// - [DataMember(Name="Visibility", EmitDefaultValue=false)] - public int Visibility { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option AreaListOption { get; private set; } /// - /// Gets or Sets CriticalFlag + /// Gets or Sets AreaList /// - [DataMember(Name="CriticalFlag", EmitDefaultValue=false)] - public int CriticalFlag { get; set; } + [JsonPropertyName("AreaList")] + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } /// - /// Gets or Sets AreaList + /// Used to track the state of Reserved2 /// - [DataMember(Name="AreaList", EmitDefaultValue=false)] - public AreaContainer AreaList { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved2Option { get; private set; } /// /// Gets or Sets Reserved2 /// - [DataMember(Name="Reserved2", EmitDefaultValue=false)] - public int Reserved2 { get; set; } + [JsonPropertyName("Reserved2")] + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Returns the string presentation of the object @@ -96,9 +112,9 @@ protected SecurityFeatureResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SecurityFeatureResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" ElementType: ").Append(ElementType).Append("\n"); sb.Append(" ElementRect: ").Append(ElementRect).Append("\n"); sb.Append(" Visibility: ").Append(Visibility).Append("\n"); @@ -108,104 +124,218 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class SecurityFeatureResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override SecurityFeatureResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as SecurityFeatureResult); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option elementType = default; + Option elementRect = default; + Option visibility = default; + Option criticalFlag = default; + Option type = default; + Option elementResult = default; + Option elementDiagnose = default; + Option percentValue = default; + Option areaList = default; + Option reserved2 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ElementType": + string? elementTypeRawValue = utf8JsonReader.GetString(); + if (elementTypeRawValue != null) + elementType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(elementTypeRawValue)); + break; + case "ElementRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + elementRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Visibility": + string? visibilityRawValue = utf8JsonReader.GetString(); + if (visibilityRawValue != null) + visibility = new Option(VisibilityValueConverter.FromStringOrDefault(visibilityRawValue)); + break; + case "CriticalFlag": + string? criticalFlagRawValue = utf8JsonReader.GetString(); + if (criticalFlagRawValue != null) + criticalFlag = new Option(CriticalValueConverter.FromStringOrDefault(criticalFlagRawValue)); + break; + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + case "ElementResult": + string? elementResultRawValue = utf8JsonReader.GetString(); + if (elementResultRawValue != null) + elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); + break; + case "ElementDiagnose": + string? elementDiagnoseRawValue = utf8JsonReader.GetString(); + if (elementDiagnoseRawValue != null) + elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); + break; + case "PercentValue": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + percentValue = new Option(utf8JsonReader.GetInt32()); + break; + case "AreaList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + areaList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!elementType.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(elementType)); + + if (!elementRect.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(elementRect)); + + if (!visibility.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(visibility)); + + if (!criticalFlag.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(criticalFlag)); + + if (!type.IsSet) + throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(type)); + + if (elementType.IsSet && elementType.Value == null) + throw new ArgumentNullException(nameof(elementType), "Property is not nullable for class SecurityFeatureResult."); + + if (elementRect.IsSet && elementRect.Value == null) + throw new ArgumentNullException(nameof(elementRect), "Property is not nullable for class SecurityFeatureResult."); + + if (visibility.IsSet && visibility.Value == null) + throw new ArgumentNullException(nameof(visibility), "Property is not nullable for class SecurityFeatureResult."); + + if (criticalFlag.IsSet && criticalFlag.Value == null) + throw new ArgumentNullException(nameof(criticalFlag), "Property is not nullable for class SecurityFeatureResult."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class SecurityFeatureResult."); + + if (elementResult.IsSet && elementResult.Value == null) + throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class SecurityFeatureResult."); + + if (elementDiagnose.IsSet && elementDiagnose.Value == null) + throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class SecurityFeatureResult."); + + if (percentValue.IsSet && percentValue.Value == null) + throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class SecurityFeatureResult."); + + if (areaList.IsSet && areaList.Value == null) + throw new ArgumentNullException(nameof(areaList), "Property is not nullable for class SecurityFeatureResult."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class SecurityFeatureResult."); + + return new SecurityFeatureResult(elementType.Value!.Value!, elementRect.Value!, visibility.Value!.Value!, criticalFlag.Value!.Value!, elementResult, elementDiagnose, percentValue, areaList, reserved2); } /// - /// Returns true if SecurityFeatureResult instances are equal + /// Serializes a /// - /// Instance of SecurityFeatureResult to be compared - /// Boolean - public bool Equals(SecurityFeatureResult input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SecurityFeatureResult securityFeatureResult, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.ElementType == input.ElementType || - (this.ElementType != null && - this.ElementType.Equals(input.ElementType)) - ) && base.Equals(input) && - ( - this.ElementRect == input.ElementRect || - (this.ElementRect != null && - this.ElementRect.Equals(input.ElementRect)) - ) && base.Equals(input) && - ( - this.Visibility == input.Visibility || - (this.Visibility != null && - this.Visibility.Equals(input.Visibility)) - ) && base.Equals(input) && - ( - this.CriticalFlag == input.CriticalFlag || - (this.CriticalFlag != null && - this.CriticalFlag.Equals(input.CriticalFlag)) - ) && base.Equals(input) && - ( - this.AreaList == input.AreaList || - (this.AreaList != null && - this.AreaList.Equals(input.AreaList)) - ) && base.Equals(input) && - ( - this.Reserved2 == input.Reserved2 || - (this.Reserved2 != null && - this.Reserved2.Equals(input.Reserved2)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, securityFeatureResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, SecurityFeatureResult securityFeatureResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (securityFeatureResult.ElementRect == null) + throw new ArgumentNullException(nameof(securityFeatureResult.ElementRect), "Property is required for class SecurityFeatureResult."); + + if (securityFeatureResult.AreaListOption.IsSet && securityFeatureResult.AreaList == null) + throw new ArgumentNullException(nameof(securityFeatureResult.AreaList), "Property is required for class SecurityFeatureResult."); + + var elementTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(securityFeatureResult.ElementType); + writer.WriteNumber("ElementType", elementTypeRawValue); + + writer.WritePropertyName("ElementRect"); + JsonSerializer.Serialize(writer, securityFeatureResult.ElementRect, jsonSerializerOptions); + var visibilityRawValue = VisibilityValueConverter.ToJsonValue(securityFeatureResult.Visibility); + writer.WriteNumber("Visibility", visibilityRawValue); + + var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(securityFeatureResult.CriticalFlag); + writer.WriteNumber("CriticalFlag", criticalFlagRawValue); + + writer.WriteString("Type", securityFeatureResult.Type); + + if (securityFeatureResult.ElementResultOption.IsSet) { - int hashCode = base.GetHashCode(); - if (this.ElementType != null) - hashCode = hashCode * 59 + this.ElementType.GetHashCode(); - if (this.ElementRect != null) - hashCode = hashCode * 59 + this.ElementRect.GetHashCode(); - if (this.Visibility != null) - hashCode = hashCode * 59 + this.Visibility.GetHashCode(); - if (this.CriticalFlag != null) - hashCode = hashCode * 59 + this.CriticalFlag.GetHashCode(); - if (this.AreaList != null) - hashCode = hashCode * 59 + this.AreaList.GetHashCode(); - if (this.Reserved2 != null) - hashCode = hashCode * 59 + this.Reserved2.GetHashCode(); - return hashCode; + var elementResultRawValue = CheckResultValueConverter.ToJsonValue(securityFeatureResult.ElementResult!.Value); + writer.WriteNumber("ElementResult", elementResultRawValue); } - } + if (securityFeatureResult.ElementDiagnoseOption.IsSet) + { + var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(securityFeatureResult.ElementDiagnose!.Value); + writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); + } + if (securityFeatureResult.PercentValueOption.IsSet) + writer.WriteNumber("PercentValue", securityFeatureResult.PercentValueOption.Value!.Value); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (securityFeatureResult.AreaListOption.IsSet) + { + writer.WritePropertyName("AreaList"); + JsonSerializer.Serialize(writer, securityFeatureResult.AreaList, jsonSerializerOptions); + } + if (securityFeatureResult.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", securityFeatureResult.Reserved2Option.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs index e016f9d..234ef8b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs @@ -1,182 +1,731 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - /// Enumeration contains identifiers determining type of features for a document authenticity checks - public class SecurityFeatureType + /// + /// Enumeration contains identifiers determining type of features for a document authenticity checks: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/security-feature-type/ + /// + /// Enumeration contains identifiers determining type of features for a document authenticity checks: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/security-feature-type/ + public enum SecurityFeatureType { + /// + /// Enum BLANK for value: 0 + /// + BLANK = 0, + + /// + /// Enum FILL for value: 1 + /// + FILL = 1, + + /// + /// Enum PHOTO for value: 2 + /// + PHOTO = 2, + + /// + /// Enum MRZ for value: 3 + /// + MRZ = 3, + + /// + /// Enum FALSE_LUMINESCENCE for value: 4 + /// + FALSE_LUMINESCENCE = 4, + + /// + /// Enum HOLO_SIMPLE for value: 5 + /// + HOLO_SIMPLE = 5, + + /// + /// Enum HOLO_VERIFY_STATIC for value: 6 + /// + HOLO_VERIFY_STATIC = 6, + + /// + /// Enum HOLO_VERIFY_MULTI_STATIC for value: 7 + /// + HOLO_VERIFY_MULTI_STATIC = 7, + + /// + /// Enum HOLO_VERIFY_DYNAMIC for value: 8 + /// + HOLO_VERIFY_DYNAMIC = 8, + + /// + /// Enum PATTERN_NOT_INTERRUPTED for value: 9 + /// + PATTERN_NOT_INTERRUPTED = 9, + + /// + /// Enum PATTERN_NOT_SHIFTED for value: 10 + /// + PATTERN_NOT_SHIFTED = 10, + + /// + /// Enum PATTERN_SAME_COLORS for value: 11 + /// + PATTERN_SAME_COLORS = 11, + + /// + /// Enum PATTERN_IR_INVISIBLE for value: 12 + /// + PATTERN_IR_INVISIBLE = 12, + + /// + /// Enum PHOTO_SIZE_CHECK for value: 13 + /// + PHOTO_SIZE_CHECK = 13, + + /// + /// Enum PORTRAIT_COMPARISON_VS_GHOST for value: 14 + /// + PORTRAIT_COMPARISON_VS_GHOST = 14, + + /// + /// Enum PORTRAIT_COMPARISON_VS_RFID for value: 15 + /// + PORTRAIT_COMPARISON_VS_RFID = 15, + + /// + /// Enum PORTRAIT_COMPARISON_VS_VISUAL for value: 16 + /// + PORTRAIT_COMPARISON_VS_VISUAL = 16, + + /// + /// Enum BARCODE for value: 17 + /// + BARCODE = 17, + + /// + /// Enum PATTERN_DIFFERENT_LINES_THICKNESS for value: 18 + /// + PATTERN_DIFFERENT_LINES_THICKNESS = 18, + + /// + /// Enum PORTRAIT_COMPARISON_VS_CAMERA for value: 19 + /// + PORTRAIT_COMPARISON_VS_CAMERA = 19, + + /// + /// Enum PORTRAIT_COMPARISON_RFID_VS_CAMERA for value: 20 + /// + PORTRAIT_COMPARISON_RFID_VS_CAMERA = 20, + + /// + /// Enum GHOST_PHOTO for value: 21 + /// + GHOST_PHOTO = 21, + + /// + /// Enum CLEAR_GHOST_PHOTO for value: 22 + /// + CLEAR_GHOST_PHOTO = 22, + + /// + /// Enum INVISIBLE_OBJECT for value: 23 + /// + INVISIBLE_OBJECT = 23, + + /// + /// Enum LOW_CONTRAST_OBJECT for value: 24 + /// + LOW_CONTRAST_OBJECT = 24, + + /// + /// Enum PHOTO_COLOR for value: 25 + /// + PHOTO_COLOR = 25, + + /// + /// Enum PHOTO_SHAPE for value: 26 + /// + PHOTO_SHAPE = 26, + + /// + /// Enum PHOTO_CORNERS for value: 27 + /// + PHOTO_CORNERS = 27, + + /// + /// Enum OCR for value: 28 + /// + OCR = 28, + + /// + /// Enum PORTRAIT_COMPARISON_EXT_VS_VISUAL for value: 29 + /// + PORTRAIT_COMPARISON_EXT_VS_VISUAL = 29, + + /// + /// Enum PORTRAIT_COMPARISON_EXT_VS_RFID for value: 30 + /// + PORTRAIT_COMPARISON_EXT_VS_RFID = 30, + + /// + /// Enum PORTRAIT_COMPARISON_EXT_VS_CAMERA for value: 31 + /// + PORTRAIT_COMPARISON_EXT_VS_CAMERA = 31, + + /// + /// Enum LIVENESS_DEPTH for value: 32 + /// + LIVENESS_DEPTH = 32, + + /// + /// Enum MICRO_TEXT for value: 33 + /// + MICRO_TEXT = 33, + + /// + /// Enum FLUORESCENT_OBJECT for value: 34 + /// + FLUORESCENT_OBJECT = 34, + + /// + /// Enum LANDMARK_CHECK for value: 35 + /// + LANDMARK_CHECK = 35, + + /// + /// Enum FACE_PRESENCE for value: 36 + /// + FACE_PRESENCE = 36, + + /// + /// Enum FACE_ABSENCE for value: 38 + /// + FACE_ABSENCE = 38, + + /// + /// Enum LIVENESS_SCREEN_CAPTURE for value: 39 + /// + LIVENESS_SCREEN_CAPTURE = 39, + + /// + /// Enum LIVENESS_ELECTRONIC_DEVICE for value: 40 + /// + LIVENESS_ELECTRONIC_DEVICE = 40, + + /// + /// Enum LIVENESS_OVI for value: 41 + /// + LIVENESS_OVI = 41, + + /// + /// Enum BARCODE_SIZE_CHECK for value: 42 + /// + BARCODE_SIZE_CHECK = 42, + + /// + /// Enum LASINK for value: 43 + /// + LASINK = 43, + + /// + /// Enum LIVENESS_MLI for value: 44 + /// + LIVENESS_MLI = 44, + + /// + /// Enum LIVENESS_BARCODE_BACKGROUND for value: 45 + /// + LIVENESS_BARCODE_BACKGROUND = 45, + + /// + /// Enum PORTRAIT_COMPARISON_VS_BARCODE for value: 46 + /// + PORTRAIT_COMPARISON_VS_BARCODE = 46, + + /// + /// Enum PORTRAIT_COMPARISON_RFID_VS_BARCODE for value: 47 + /// + PORTRAIT_COMPARISON_RFID_VS_BARCODE = 47, + + /// + /// Enum PORTRAIT_COMPARISON_EXT_VS_BARCODE for value: 48 + /// + PORTRAIT_COMPARISON_EXT_VS_BARCODE = 48, + + /// + /// Enum PORTRAIT_COMPARISON_BARCODE_VS_CAMERA for value: 49 + /// + PORTRAIT_COMPARISON_BARCODE_VS_CAMERA = 49, + + /// + /// Enum CHECK_DIGITAL_SIGNATURE for value: 50 + /// + CHECK_DIGITAL_SIGNATURE = 50, + + /// + /// Enum CONTACT_CHIP_CLASSIFICATION for value: 51 + /// + CONTACT_CHIP_CLASSIFICATION = 51, + + /// + /// Enum HEAD_POSITION_CHECK for value: 52 + /// + HEAD_POSITION_CHECK = 52, + + /// + /// Enum LIVENESS_BLACK_AND_WHITE_COPY_CHECK for value: 53 + /// + LIVENESS_BLACK_AND_WHITE_COPY_CHECK = 53 + } + + /// + /// Converts to and from the JSON value + /// + public static class SecurityFeatureTypeValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static SecurityFeatureType FromString(string value) + { + if (value.Equals((0).ToString())) + return SecurityFeatureType.BLANK; + + if (value.Equals((1).ToString())) + return SecurityFeatureType.FILL; + + if (value.Equals((2).ToString())) + return SecurityFeatureType.PHOTO; + + if (value.Equals((3).ToString())) + return SecurityFeatureType.MRZ; + + if (value.Equals((4).ToString())) + return SecurityFeatureType.FALSE_LUMINESCENCE; + + if (value.Equals((5).ToString())) + return SecurityFeatureType.HOLO_SIMPLE; + + if (value.Equals((6).ToString())) + return SecurityFeatureType.HOLO_VERIFY_STATIC; + + if (value.Equals((7).ToString())) + return SecurityFeatureType.HOLO_VERIFY_MULTI_STATIC; + + if (value.Equals((8).ToString())) + return SecurityFeatureType.HOLO_VERIFY_DYNAMIC; + + if (value.Equals((9).ToString())) + return SecurityFeatureType.PATTERN_NOT_INTERRUPTED; + + if (value.Equals((10).ToString())) + return SecurityFeatureType.PATTERN_NOT_SHIFTED; + + if (value.Equals((11).ToString())) + return SecurityFeatureType.PATTERN_SAME_COLORS; + + if (value.Equals((12).ToString())) + return SecurityFeatureType.PATTERN_IR_INVISIBLE; + + if (value.Equals((13).ToString())) + return SecurityFeatureType.PHOTO_SIZE_CHECK; + + if (value.Equals((14).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_GHOST; + + if (value.Equals((15).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_RFID; + + if (value.Equals((16).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_VISUAL; + + if (value.Equals((17).ToString())) + return SecurityFeatureType.BARCODE; - - public const int BLANK = 0; + if (value.Equals((18).ToString())) + return SecurityFeatureType.PATTERN_DIFFERENT_LINES_THICKNESS; - - public const int FILL = 1; + if (value.Equals((19).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_CAMERA; - - public const int PHOTO = 2; + if (value.Equals((20).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_RFID_VS_CAMERA; - - public const int MRZ = 3; + if (value.Equals((21).ToString())) + return SecurityFeatureType.GHOST_PHOTO; - - public const int FALSE_LUMINESCENCE = 4; + if (value.Equals((22).ToString())) + return SecurityFeatureType.CLEAR_GHOST_PHOTO; - - public const int HOLO_SIMPLE = 5; + if (value.Equals((23).ToString())) + return SecurityFeatureType.INVISIBLE_OBJECT; - - public const int HOLO_VERIFY_STATIC = 6; + if (value.Equals((24).ToString())) + return SecurityFeatureType.LOW_CONTRAST_OBJECT; - - public const int HOLO_VERIFY_MULTI_STATIC = 7; + if (value.Equals((25).ToString())) + return SecurityFeatureType.PHOTO_COLOR; - - public const int HOLO_VERIFY_DYNAMIC = 8; + if (value.Equals((26).ToString())) + return SecurityFeatureType.PHOTO_SHAPE; - - public const int PATTERN_NOT_INTERRUPTED = 9; + if (value.Equals((27).ToString())) + return SecurityFeatureType.PHOTO_CORNERS; - - public const int PATTERN_NOT_SHIFTED = 10; + if (value.Equals((28).ToString())) + return SecurityFeatureType.OCR; - - public const int PATTERN_SAME_COLORS = 11; + if (value.Equals((29).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_VISUAL; - - public const int PATTERN_IR_INVISIBLE = 12; + if (value.Equals((30).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_RFID; - - public const int PHOTO_SIZE_CHECK = 13; + if (value.Equals((31).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_CAMERA; - - public const int PORTRAIT_COMPARISON_VS_GHOST = 14; + if (value.Equals((32).ToString())) + return SecurityFeatureType.LIVENESS_DEPTH; - - public const int PORTRAIT_COMPARISON_VS_RFID = 15; + if (value.Equals((33).ToString())) + return SecurityFeatureType.MICRO_TEXT; - - public const int PORTRAIT_COMPARISON_VS_VISUAL = 16; + if (value.Equals((34).ToString())) + return SecurityFeatureType.FLUORESCENT_OBJECT; - - public const int BARCODE = 17; + if (value.Equals((35).ToString())) + return SecurityFeatureType.LANDMARK_CHECK; - - public const int PATTERN_DIFFERENT_LINES_THICKNESS = 18; + if (value.Equals((36).ToString())) + return SecurityFeatureType.FACE_PRESENCE; - - public const int PORTRAIT_COMPARISON_VS_CAMERA = 19; + if (value.Equals((38).ToString())) + return SecurityFeatureType.FACE_ABSENCE; - - public const int PORTRAIT_COMPARISON_RFID_VS_CAMERA = 20; + if (value.Equals((39).ToString())) + return SecurityFeatureType.LIVENESS_SCREEN_CAPTURE; - - public const int GHOST_PHOTO = 21; + if (value.Equals((40).ToString())) + return SecurityFeatureType.LIVENESS_ELECTRONIC_DEVICE; - - public const int CLEAR_GHOST_PHOTO = 22; + if (value.Equals((41).ToString())) + return SecurityFeatureType.LIVENESS_OVI; - - public const int INVISIBLE_OBJECT = 23; + if (value.Equals((42).ToString())) + return SecurityFeatureType.BARCODE_SIZE_CHECK; - - public const int LOW_CONTRAST_OBJECT = 24; + if (value.Equals((43).ToString())) + return SecurityFeatureType.LASINK; - - public const int PHOTO_COLOR = 25; + if (value.Equals((44).ToString())) + return SecurityFeatureType.LIVENESS_MLI; - - public const int PHOTO_SHAPE = 26; + if (value.Equals((45).ToString())) + return SecurityFeatureType.LIVENESS_BARCODE_BACKGROUND; - - public const int PHOTO_CORNERS = 27; + if (value.Equals((46).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_BARCODE; - - public const int PORTRAIT_COMPARISON_EXT_VS_VISUAL = 29; + if (value.Equals((47).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_RFID_VS_BARCODE; - - public const int PORTRAIT_COMPARISON_EXT_VS_RFID = 30; + if (value.Equals((48).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_BARCODE; - - public const int PORTRAIT_COMPARISON_EXT_VS_CAMERA = 31; + if (value.Equals((49).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_BARCODE_VS_CAMERA; + if (value.Equals((50).ToString())) + return SecurityFeatureType.CHECK_DIGITAL_SIGNATURE; - public const int LIVENESS_DEPTH = 32; + if (value.Equals((51).ToString())) + return SecurityFeatureType.CONTACT_CHIP_CLASSIFICATION; + if (value.Equals((52).ToString())) + return SecurityFeatureType.HEAD_POSITION_CHECK; - public const int MICRO_TEXT = 33; + if (value.Equals((53).ToString())) + return SecurityFeatureType.LIVENESS_BLACK_AND_WHITE_COPY_CHECK; + throw new NotImplementedException($"Could not convert value to type SecurityFeatureType: '{value}'"); + } - public const int FLUORESCENT_OBJECT = 34; + /// + /// Parses a given value to + /// + /// + /// + public static SecurityFeatureType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return SecurityFeatureType.BLANK; + if (value.Equals((1).ToString())) + return SecurityFeatureType.FILL; - public const int LANDMARK_CHECK = 35; + if (value.Equals((2).ToString())) + return SecurityFeatureType.PHOTO; + if (value.Equals((3).ToString())) + return SecurityFeatureType.MRZ; - public const int FACE_PRESENCE = 36; + if (value.Equals((4).ToString())) + return SecurityFeatureType.FALSE_LUMINESCENCE; + if (value.Equals((5).ToString())) + return SecurityFeatureType.HOLO_SIMPLE; - public const int FACE_ABSENCE = 37; + if (value.Equals((6).ToString())) + return SecurityFeatureType.HOLO_VERIFY_STATIC; + if (value.Equals((7).ToString())) + return SecurityFeatureType.HOLO_VERIFY_MULTI_STATIC; - public const int LIVENESS_SCREEN_CAPTURE = 38; + if (value.Equals((8).ToString())) + return SecurityFeatureType.HOLO_VERIFY_DYNAMIC; + if (value.Equals((9).ToString())) + return SecurityFeatureType.PATTERN_NOT_INTERRUPTED; - public const int LIVENESS_ELECTRONIC_DEVICE = 39; + if (value.Equals((10).ToString())) + return SecurityFeatureType.PATTERN_NOT_SHIFTED; + if (value.Equals((11).ToString())) + return SecurityFeatureType.PATTERN_SAME_COLORS; - public const int LIVENESS_OVI = 40; + if (value.Equals((12).ToString())) + return SecurityFeatureType.PATTERN_IR_INVISIBLE; + if (value.Equals((13).ToString())) + return SecurityFeatureType.PHOTO_SIZE_CHECK; - public const int BARCODE_SIZE_CHECK = 41; + if (value.Equals((14).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_GHOST; + if (value.Equals((15).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_RFID; - public const int LASINK = 42; + if (value.Equals((16).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_VISUAL; + if (value.Equals((17).ToString())) + return SecurityFeatureType.BARCODE; - public const int LIVENESS_MLI = 43; + if (value.Equals((18).ToString())) + return SecurityFeatureType.PATTERN_DIFFERENT_LINES_THICKNESS; + if (value.Equals((19).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_CAMERA; - public const int LIVENESS_BARCODE_BACKGROUND = 44; + if (value.Equals((20).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_RFID_VS_CAMERA; + if (value.Equals((21).ToString())) + return SecurityFeatureType.GHOST_PHOTO; - public const int PORTRAIT_COMPARISON_VS_BARCODE = 45; + if (value.Equals((22).ToString())) + return SecurityFeatureType.CLEAR_GHOST_PHOTO; + if (value.Equals((23).ToString())) + return SecurityFeatureType.INVISIBLE_OBJECT; - public const int PORTRAIT_COMPARISON_RFID_VS_BARCODE = 46; + if (value.Equals((24).ToString())) + return SecurityFeatureType.LOW_CONTRAST_OBJECT; + if (value.Equals((25).ToString())) + return SecurityFeatureType.PHOTO_COLOR; - public const int PORTRAIT_COMPARISON_EXT_VS_BARCODE = 47; + if (value.Equals((26).ToString())) + return SecurityFeatureType.PHOTO_SHAPE; + if (value.Equals((27).ToString())) + return SecurityFeatureType.PHOTO_CORNERS; - public const int PORTRAIT_COMPARISON_BARCODE_VS_CAMERA = 48; + if (value.Equals((28).ToString())) + return SecurityFeatureType.OCR; + if (value.Equals((29).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_VISUAL; - public const int CHECK_DIGITAL_SIGNATURE = 49; + if (value.Equals((30).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_RFID; + if (value.Equals((31).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_CAMERA; - public const int CONTACT_CHIP_CLASSIFICATION = 50; + if (value.Equals((32).ToString())) + return SecurityFeatureType.LIVENESS_DEPTH; + if (value.Equals((33).ToString())) + return SecurityFeatureType.MICRO_TEXT; + + if (value.Equals((34).ToString())) + return SecurityFeatureType.FLUORESCENT_OBJECT; + + if (value.Equals((35).ToString())) + return SecurityFeatureType.LANDMARK_CHECK; + + if (value.Equals((36).ToString())) + return SecurityFeatureType.FACE_PRESENCE; + + if (value.Equals((38).ToString())) + return SecurityFeatureType.FACE_ABSENCE; + + if (value.Equals((39).ToString())) + return SecurityFeatureType.LIVENESS_SCREEN_CAPTURE; + + if (value.Equals((40).ToString())) + return SecurityFeatureType.LIVENESS_ELECTRONIC_DEVICE; + + if (value.Equals((41).ToString())) + return SecurityFeatureType.LIVENESS_OVI; + + if (value.Equals((42).ToString())) + return SecurityFeatureType.BARCODE_SIZE_CHECK; + + if (value.Equals((43).ToString())) + return SecurityFeatureType.LASINK; + + if (value.Equals((44).ToString())) + return SecurityFeatureType.LIVENESS_MLI; + + if (value.Equals((45).ToString())) + return SecurityFeatureType.LIVENESS_BARCODE_BACKGROUND; + + if (value.Equals((46).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_VS_BARCODE; + + if (value.Equals((47).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_RFID_VS_BARCODE; + + if (value.Equals((48).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_BARCODE; + + if (value.Equals((49).ToString())) + return SecurityFeatureType.PORTRAIT_COMPARISON_BARCODE_VS_CAMERA; + + if (value.Equals((50).ToString())) + return SecurityFeatureType.CHECK_DIGITAL_SIGNATURE; + + if (value.Equals((51).ToString())) + return SecurityFeatureType.CONTACT_CHIP_CLASSIFICATION; + + if (value.Equals((52).ToString())) + return SecurityFeatureType.HEAD_POSITION_CHECK; + + if (value.Equals((53).ToString())) + return SecurityFeatureType.LIVENESS_BLACK_AND_WHITE_COPY_CHECK; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(SecurityFeatureType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class SecurityFeatureTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override SecurityFeatureType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + SecurityFeatureType? result = rawValue == null + ? null + : SecurityFeatureTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the SecurityFeatureType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SecurityFeatureType securityFeatureType, JsonSerializerOptions options) + { + writer.WriteStringValue(securityFeatureType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class SecurityFeatureTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a SecurityFeatureType from the Json object + /// + /// + /// + /// + /// + public override SecurityFeatureType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + SecurityFeatureType? result = rawValue == null + ? null + : SecurityFeatureTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SecurityFeatureType? securityFeatureType, JsonSerializerOptions options) + { + writer.WriteStringValue(securityFeatureType?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs new file mode 100644 index 0000000..a6d696c --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs @@ -0,0 +1,172 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// SecurityObjectCertificates + /// + public partial class SecurityObjectCertificates : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// certificateData + [JsonConstructor] + public SecurityObjectCertificates(Option certificateData = default) + { + CertificateDataOption = certificateData; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Used to track the state of CertificateData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CertificateDataOption { get; private set; } + + /// + /// Gets or Sets CertificateData + /// + [JsonPropertyName("Certificate_Data")] + public CertificateData? CertificateData { get { return this.CertificateDataOption; } set { this.CertificateDataOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SecurityObjectCertificates {\n"); + sb.Append(" CertificateData: ").Append(CertificateData).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class SecurityObjectCertificatesJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override SecurityObjectCertificates Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option certificateData = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Certificate_Data": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + certificateData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (certificateData.IsSet && certificateData.Value == null) + throw new ArgumentNullException(nameof(certificateData), "Property is not nullable for class SecurityObjectCertificates."); + + return new SecurityObjectCertificates(certificateData); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SecurityObjectCertificates securityObjectCertificates, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, securityObjectCertificates, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, SecurityObjectCertificates securityObjectCertificates, JsonSerializerOptions jsonSerializerOptions) + { + if (securityObjectCertificates.CertificateDataOption.IsSet && securityObjectCertificates.CertificateData == null) + throw new ArgumentNullException(nameof(securityObjectCertificates.CertificateData), "Property is required for class SecurityObjectCertificates."); + + if (securityObjectCertificates.CertificateDataOption.IsSet) + { + writer.WritePropertyName("Certificate_Data"); + JsonSerializer.Serialize(writer, securityObjectCertificates.CertificateData, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/Source.cs b/src/Regula.DocumentReader.WebClient/Model/Source.cs index 65d88e2..a76e084 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Source.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Source.cs @@ -1,47 +1,232 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Document data sources - public class Source + /// + /// Document data sources + public enum Source + { + /// + /// Enum MRZ for value: MRZ + /// + MRZ = 1, + + /// + /// Enum VISUAL for value: VISUAL + /// + VISUAL = 2, + + /// + /// Enum BARCODE for value: BARCODE + /// + BARCODE = 3, + + /// + /// Enum RFID for value: RFID + /// + RFID = 4, + + /// + /// Enum MAGNETIC for value: MAGNETIC + /// + MAGNETIC = 5, + + /// + /// Enum EXTERNAL for value: EXTERNAL + /// + EXTERNAL = 6 + } + + /// + /// Converts to and from the JSON value + /// + public static class SourceValueConverter { + /// + /// Parses a given value to + /// + /// + /// + public static Source FromString(string value) + { + if (value.Equals("MRZ")) + return Source.MRZ; + + if (value.Equals("VISUAL")) + return Source.VISUAL; + + if (value.Equals("BARCODE")) + return Source.BARCODE; + + if (value.Equals("RFID")) + return Source.RFID; + + if (value.Equals("MAGNETIC")) + return Source.MAGNETIC; + + if (value.Equals("EXTERNAL")) + return Source.EXTERNAL; + + throw new NotImplementedException($"Could not convert value to type Source: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static Source? FromStringOrDefault(string value) + { + if (value.Equals("MRZ")) + return Source.MRZ; - - public const string MRZ = "MRZ"; + if (value.Equals("VISUAL")) + return Source.VISUAL; - - public const string VISUAL = "VISUAL"; + if (value.Equals("BARCODE")) + return Source.BARCODE; + + if (value.Equals("RFID")) + return Source.RFID; + + if (value.Equals("MAGNETIC")) + return Source.MAGNETIC; + + if (value.Equals("EXTERNAL")) + return Source.EXTERNAL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static string ToJsonValue(Source value) + { + if (value == Source.MRZ) + return "MRZ"; + + if (value == Source.VISUAL) + return "VISUAL"; + + if (value == Source.BARCODE) + return "BARCODE"; + + if (value == Source.RFID) + return "RFID"; + + if (value == Source.MAGNETIC) + return "MAGNETIC"; + + if (value == Source.EXTERNAL) + return "EXTERNAL"; + + throw new NotImplementedException($"Value could not be handled: '{value}'"); + } + } + + /// + /// A Json converter for type + /// + /// + public class SourceJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override Source Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + Source? result = rawValue == null + ? null + : SourceValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the Source to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Source source, JsonSerializerOptions options) + { + writer.WriteStringValue(source.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class SourceNullableJsonConverter : JsonConverter + { + /// + /// Returns a Source from the Json object + /// + /// + /// + /// + /// + public override Source? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - - public const string BARCODE = "BARCODE"; + Source? result = rawValue == null + ? null + : SourceValueConverter.FromStringOrDefault(rawValue); - - public const string RFID = "RFID"; + if (result != null) + return result.Value; - - public const string MAGNETIC = "MAGNETIC"; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Source? source, JsonSerializerOptions options) + { + writer.WriteStringValue(source?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs b/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs index a55327e..7398232 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs @@ -1,80 +1,61 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// SourceValidity /// - [DataContract] - public partial class SourceValidity : IEquatable, IValidatableObject + public partial class SourceValidity : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected SourceValidity() { } - /// - /// Initializes a new instance of the class. - /// - /// source (required). - /// status (required). - public SourceValidity(string source = default(string), int status = default(int)) + /// source + /// status + [JsonConstructor] + public SourceValidity(Source source, CheckResult status) { - // to ensure "source" is required (not null) - if (source == null) - { - throw new InvalidDataException("source is a required property for SourceValidity and cannot be null"); - } - else - { - this.Source = source; - } - - // to ensure "status" is required (not null) - if (status == null) - { - throw new InvalidDataException("status is a required property for SourceValidity and cannot be null"); - } - else - { - this.Status = status; - } - + Source = source; + Status = status; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Source /// - [DataMember(Name="source", EmitDefaultValue=true)] - public string Source { get; set; } + [JsonPropertyName("source")] + public Source Source { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name="status", EmitDefaultValue=true)] - public int Status { get; set; } + [JsonPropertyName("status")] + public CheckResult Status { get; set; } /// /// Returns the string presentation of the object @@ -82,82 +63,125 @@ protected SourceValidity() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SourceValidity {\n"); sb.Append(" Source: ").Append(Source).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as SourceValidity); + yield break; } + } + /// + /// A Json converter for type + /// + public class SourceValidityJsonConverter : JsonConverter + { /// - /// Returns true if SourceValidity instances are equal + /// Deserializes json to /// - /// Instance of SourceValidity to be compared - /// Boolean - public bool Equals(SourceValidity input) + /// + /// + /// + /// + /// + public override SourceValidity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option source = default; + Option status = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "source": + string? sourceRawValue = utf8JsonReader.GetString(); + if (sourceRawValue != null) + source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); + break; + case "status": + string? statusRawValue = utf8JsonReader.GetString(); + if (statusRawValue != null) + status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); + break; + default: + break; + } + } + } + + if (!source.IsSet) + throw new ArgumentException("Property is required for class SourceValidity.", nameof(source)); + + if (!status.IsSet) + throw new ArgumentException("Property is required for class SourceValidity.", nameof(status)); + + if (source.IsSet && source.Value == null) + throw new ArgumentNullException(nameof(source), "Property is not nullable for class SourceValidity."); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class SourceValidity."); + + return new SourceValidity(source.Value!.Value!, status.Value!.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SourceValidity sourceValidity, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, sourceValidity, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, SourceValidity sourceValidity, JsonSerializerOptions jsonSerializerOptions) { - yield break; + var sourceRawValue = SourceValueConverter.ToJsonValue(sourceValidity.Source); + writer.WriteString("source", sourceRawValue); + + var statusRawValue = CheckResultValueConverter.ToJsonValue(sourceValidity.Status); + writer.WriteNumber("status", statusRawValue); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/Status.cs b/src/Regula.DocumentReader.WebClient/Model/Status.cs index 3f8c225..ed7e5de 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Status.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Status.cs @@ -1,129 +1,108 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Status /// - [DataContract] - public partial class Status : IEquatable, IValidatableObject + public partial class Status : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Status() { } - /// - /// Initializes a new instance of the class. - /// - /// overallStatus (required). - /// optical (required). - /// portrait. - /// rfid. - /// stopList. - /// detailsRFID. - /// detailsOptical (required). - public Status(int overallStatus = default(int), int optical = default(int), int portrait = default(int), int rfid = default(int), int stopList = default(int), DetailsRFID detailsRFID = default(DetailsRFID), DetailsOptical detailsOptical = default(DetailsOptical)) + /// overallStatus + /// optical + /// portrait + /// rfid + /// stopList + /// detailsOptical + /// detailsRFID + [JsonConstructor] + public Status(CheckResult overallStatus, CheckResult optical, CheckResult portrait, CheckResult rfid, CheckResult stopList, DetailsOptical detailsOptical, Option detailsRFID = default) { - // to ensure "overallStatus" is required (not null) - if (overallStatus == null) - { - throw new InvalidDataException("overallStatus is a required property for Status and cannot be null"); - } - else - { - this.OverallStatus = overallStatus; - } - - // to ensure "optical" is required (not null) - if (optical == null) - { - throw new InvalidDataException("optical is a required property for Status and cannot be null"); - } - else - { - this.Optical = optical; - } - - // to ensure "detailsOptical" is required (not null) - if (detailsOptical == null) - { - throw new InvalidDataException("detailsOptical is a required property for Status and cannot be null"); - } - else - { - this.DetailsOptical = detailsOptical; - } - - this.Portrait = portrait; - this.Rfid = rfid; - this.StopList = stopList; - this.DetailsRFID = detailsRFID; + OverallStatus = overallStatus; + Optical = optical; + Portrait = portrait; + Rfid = rfid; + StopList = stopList; + DetailsOptical = detailsOptical; + DetailsRFIDOption = detailsRFID; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets OverallStatus /// - [DataMember(Name="overallStatus", EmitDefaultValue=true)] - public int OverallStatus { get; set; } + [JsonPropertyName("overallStatus")] + public CheckResult OverallStatus { get; set; } /// /// Gets or Sets Optical /// - [DataMember(Name="optical", EmitDefaultValue=true)] - public int Optical { get; set; } + [JsonPropertyName("optical")] + public CheckResult Optical { get; set; } /// /// Gets or Sets Portrait /// - [DataMember(Name="portrait", EmitDefaultValue=false)] - public int Portrait { get; set; } + [JsonPropertyName("portrait")] + public CheckResult Portrait { get; set; } /// /// Gets or Sets Rfid /// - [DataMember(Name="rfid", EmitDefaultValue=false)] - public int Rfid { get; set; } + [JsonPropertyName("rfid")] + public CheckResult Rfid { get; set; } /// /// Gets or Sets StopList /// - [DataMember(Name="stopList", EmitDefaultValue=false)] - public int StopList { get; set; } + [JsonPropertyName("stopList")] + public CheckResult StopList { get; set; } /// - /// Gets or Sets DetailsRFID + /// Gets or Sets DetailsOptical /// - [DataMember(Name="detailsRFID", EmitDefaultValue=false)] - public DetailsRFID DetailsRFID { get; set; } + [JsonPropertyName("detailsOptical")] + public DetailsOptical DetailsOptical { get; set; } /// - /// Gets or Sets DetailsOptical + /// Used to track the state of DetailsRFID /// - [DataMember(Name="detailsOptical", EmitDefaultValue=true)] - public DetailsOptical DetailsOptical { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DetailsRFIDOption { get; private set; } + + /// + /// Gets or Sets DetailsRFID + /// + [JsonPropertyName("detailsRFID")] + public DetailsRFID? DetailsRFID { get { return this.DetailsRFIDOption; } set { this.DetailsRFIDOption = new(value); } } /// /// Returns the string presentation of the object @@ -131,122 +110,208 @@ protected Status() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Status {\n"); sb.Append(" OverallStatus: ").Append(OverallStatus).Append("\n"); sb.Append(" Optical: ").Append(Optical).Append("\n"); sb.Append(" Portrait: ").Append(Portrait).Append("\n"); sb.Append(" Rfid: ").Append(Rfid).Append("\n"); sb.Append(" StopList: ").Append(StopList).Append("\n"); - sb.Append(" DetailsRFID: ").Append(DetailsRFID).Append("\n"); sb.Append(" DetailsOptical: ").Append(DetailsOptical).Append("\n"); + sb.Append(" DetailsRFID: ").Append(DetailsRFID).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class StatusJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override Status Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as Status); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option overallStatus = default; + Option optical = default; + Option portrait = default; + Option rfid = default; + Option stopList = default; + Option detailsOptical = default; + Option detailsRFID = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "overallStatus": + string? overallStatusRawValue = utf8JsonReader.GetString(); + if (overallStatusRawValue != null) + overallStatus = new Option(CheckResultValueConverter.FromStringOrDefault(overallStatusRawValue)); + break; + case "optical": + string? opticalRawValue = utf8JsonReader.GetString(); + if (opticalRawValue != null) + optical = new Option(CheckResultValueConverter.FromStringOrDefault(opticalRawValue)); + break; + case "portrait": + string? portraitRawValue = utf8JsonReader.GetString(); + if (portraitRawValue != null) + portrait = new Option(CheckResultValueConverter.FromStringOrDefault(portraitRawValue)); + break; + case "rfid": + string? rfidRawValue = utf8JsonReader.GetString(); + if (rfidRawValue != null) + rfid = new Option(CheckResultValueConverter.FromStringOrDefault(rfidRawValue)); + break; + case "stopList": + string? stopListRawValue = utf8JsonReader.GetString(); + if (stopListRawValue != null) + stopList = new Option(CheckResultValueConverter.FromStringOrDefault(stopListRawValue)); + break; + case "detailsOptical": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + detailsOptical = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "detailsRFID": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + detailsRFID = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!overallStatus.IsSet) + throw new ArgumentException("Property is required for class Status.", nameof(overallStatus)); + + if (!optical.IsSet) + throw new ArgumentException("Property is required for class Status.", nameof(optical)); + + if (!portrait.IsSet) + throw new ArgumentException("Property is required for class Status.", nameof(portrait)); + + if (!rfid.IsSet) + throw new ArgumentException("Property is required for class Status.", nameof(rfid)); + + if (!stopList.IsSet) + throw new ArgumentException("Property is required for class Status.", nameof(stopList)); + + if (!detailsOptical.IsSet) + throw new ArgumentException("Property is required for class Status.", nameof(detailsOptical)); + + if (overallStatus.IsSet && overallStatus.Value == null) + throw new ArgumentNullException(nameof(overallStatus), "Property is not nullable for class Status."); + + if (optical.IsSet && optical.Value == null) + throw new ArgumentNullException(nameof(optical), "Property is not nullable for class Status."); + + if (portrait.IsSet && portrait.Value == null) + throw new ArgumentNullException(nameof(portrait), "Property is not nullable for class Status."); + + if (rfid.IsSet && rfid.Value == null) + throw new ArgumentNullException(nameof(rfid), "Property is not nullable for class Status."); + + if (stopList.IsSet && stopList.Value == null) + throw new ArgumentNullException(nameof(stopList), "Property is not nullable for class Status."); + + if (detailsOptical.IsSet && detailsOptical.Value == null) + throw new ArgumentNullException(nameof(detailsOptical), "Property is not nullable for class Status."); + + if (detailsRFID.IsSet && detailsRFID.Value == null) + throw new ArgumentNullException(nameof(detailsRFID), "Property is not nullable for class Status."); + + return new Status(overallStatus.Value!.Value!, optical.Value!.Value!, portrait.Value!.Value!, rfid.Value!.Value!, stopList.Value!.Value!, detailsOptical.Value!, detailsRFID); } /// - /// Returns true if Status instances are equal + /// Serializes a /// - /// Instance of Status to be compared - /// Boolean - public bool Equals(Status input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Status status, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.OverallStatus == input.OverallStatus || - (this.OverallStatus != null && - this.OverallStatus.Equals(input.OverallStatus)) - ) && - ( - this.Optical == input.Optical || - (this.Optical != null && - this.Optical.Equals(input.Optical)) - ) && - ( - this.Portrait == input.Portrait || - (this.Portrait != null && - this.Portrait.Equals(input.Portrait)) - ) && - ( - this.Rfid == input.Rfid || - (this.Rfid != null && - this.Rfid.Equals(input.Rfid)) - ) && - ( - this.StopList == input.StopList || - (this.StopList != null && - this.StopList.Equals(input.StopList)) - ) && - ( - this.DetailsRFID == input.DetailsRFID || - (this.DetailsRFID != null && - this.DetailsRFID.Equals(input.DetailsRFID)) - ) && - ( - this.DetailsOptical == input.DetailsOptical || - (this.DetailsOptical != null && - this.DetailsOptical.Equals(input.DetailsOptical)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, status, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, Status status, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (status.DetailsOptical == null) + throw new ArgumentNullException(nameof(status.DetailsOptical), "Property is required for class Status."); + + if (status.DetailsRFIDOption.IsSet && status.DetailsRFID == null) + throw new ArgumentNullException(nameof(status.DetailsRFID), "Property is required for class Status."); + + var overallStatusRawValue = CheckResultValueConverter.ToJsonValue(status.OverallStatus); + writer.WriteNumber("overallStatus", overallStatusRawValue); + + var opticalRawValue = CheckResultValueConverter.ToJsonValue(status.Optical); + writer.WriteNumber("optical", opticalRawValue); + + var portraitRawValue = CheckResultValueConverter.ToJsonValue(status.Portrait); + writer.WriteNumber("portrait", portraitRawValue); + + var rfidRawValue = CheckResultValueConverter.ToJsonValue(status.Rfid); + writer.WriteNumber("rfid", rfidRawValue); + + var stopListRawValue = CheckResultValueConverter.ToJsonValue(status.StopList); + writer.WriteNumber("stopList", stopListRawValue); + + writer.WritePropertyName("detailsOptical"); + JsonSerializer.Serialize(writer, status.DetailsOptical, jsonSerializerOptions); + if (status.DetailsRFIDOption.IsSet) { - int hashCode = 41; - if (this.OverallStatus != null) - hashCode = hashCode * 59 + this.OverallStatus.GetHashCode(); - if (this.Optical != null) - hashCode = hashCode * 59 + this.Optical.GetHashCode(); - if (this.Portrait != null) - hashCode = hashCode * 59 + this.Portrait.GetHashCode(); - if (this.Rfid != null) - hashCode = hashCode * 59 + this.Rfid.GetHashCode(); - if (this.StopList != null) - hashCode = hashCode * 59 + this.StopList.GetHashCode(); - if (this.DetailsRFID != null) - hashCode = hashCode * 59 + this.DetailsRFID.GetHashCode(); - if (this.DetailsOptical != null) - hashCode = hashCode * 59 + this.DetailsOptical.GetHashCode(); - return hashCode; + writer.WritePropertyName("detailsRFID"); + JsonSerializer.Serialize(writer, status.DetailsRFID, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs b/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs new file mode 100644 index 0000000..8b1dca6 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// StatusItem + /// + public partial class StatusItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// status + [JsonConstructor] + public StatusItem(Status status) + { + Status = status; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Status + /// + [JsonPropertyName("Status")] + public Status Status { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class StatusItem {\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class StatusItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override StatusItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option status = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Status": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + status = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!status.IsSet) + throw new ArgumentException("Property is required for class StatusItem.", nameof(status)); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class StatusItem."); + + return new StatusItem(status.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, StatusItem statusItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, statusItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, StatusItem statusItem, JsonSerializerOptions jsonSerializerOptions) + { + if (statusItem.Status == null) + throw new ArgumentNullException(nameof(statusItem.Status), "Property is required for class StatusItem."); + + writer.WritePropertyName("Status"); + JsonSerializer.Serialize(writer, statusItem.Status, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs index 1ea40e4..bcbeb38 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs @@ -1,62 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// StatusResult /// - [DataContract] - public partial class StatusResult : ResultItem, IEquatable, IValidatableObject + public partial class StatusResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected StatusResult() { } - /// - /// Initializes a new instance of the class. - /// - /// status (required). - public StatusResult(Status status = default(Status), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// status + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public StatusResult(Status status, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "status" is required (not null) - if (status == null) - { - throw new InvalidDataException("status is a required property for StatusResult and cannot be null"); - } - else - { - this.Status = status; - } - + Status = status; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Status /// - [DataMember(Name="Status", EmitDefaultValue=true)] + [JsonPropertyName("Status")] public Status Status { get; set; } /// @@ -65,76 +59,158 @@ protected StatusResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class StatusResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class StatusResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override StatusResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as StatusResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if StatusResult instances are equal - /// - /// Instance of StatusResult to be compared - /// Boolean - public bool Equals(StatusResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option status = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Status": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + status = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!status.IsSet) + throw new ArgumentException("Property is required for class StatusResult.", nameof(status)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class StatusResult.", nameof(resultType)); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class StatusResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class StatusResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class StatusResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class StatusResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class StatusResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class StatusResult."); + + return new StatusResult(status.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, StatusResult statusResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, statusResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, StatusResult statusResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (statusResult.Status == null) + throw new ArgumentNullException(nameof(statusResult.Status), "Property is required for class StatusResult."); + + writer.WritePropertyName("Status"); + JsonSerializer.Serialize(writer, statusResult.Status, jsonSerializerOptions); + if (statusResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", statusResult.BufLengthOption.Value!.Value); + + if (statusResult.LightOption.IsSet) + writer.WriteNumber("light", statusResult.LightOption.Value!.Value); + + if (statusResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", statusResult.ListIdxOption.Value!.Value); + + if (statusResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", statusResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", statusResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/StringItem.cs b/src/Regula.DocumentReader.WebClient/Model/StringItem.cs new file mode 100644 index 0000000..f7e549d --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/StringItem.cs @@ -0,0 +1,526 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// StringItem + /// + public partial class StringItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// aLIGNMENTSYMBOLSINSTRING + /// cHECKSUMS + /// errorPOSITION + /// fieldCount + /// fields + /// sTRINGSDISTANCE + /// sTRINGSINTERVAL + /// sTRINGFILLING + /// sTRINGPOSITION + /// sYMBOLSPARAM + /// sizeErrorALIGNMENT + /// sizeErrorDISTANCE + /// sizeErrorINTERVAL + /// stringAngle + /// stringBorders + /// symbolsCount + /// symbolsEstimations + [JsonConstructor] + public StringItem(int aLIGNMENTSYMBOLSINSTRING, int cHECKSUMS, ErrorCoordinates errorPOSITION, int fieldCount, List fields, int sTRINGSDISTANCE, int sTRINGSINTERVAL, int sTRINGFILLING, int sTRINGPOSITION, int sYMBOLSPARAM, decimal sizeErrorALIGNMENT, decimal sizeErrorDISTANCE, decimal sizeErrorINTERVAL, decimal stringAngle, RectangleCoordinates stringBorders, int symbolsCount, List symbolsEstimations) + { + ALIGNMENT_SYMBOLS_IN_STRING = aLIGNMENTSYMBOLSINSTRING; + CHECK_SUMS = cHECKSUMS; + ErrorPOSITION = errorPOSITION; + FieldCount = fieldCount; + Fields = fields; + STRINGS_DISTANCE = sTRINGSDISTANCE; + STRINGS_INTERVAL = sTRINGSINTERVAL; + STRING_FILLING = sTRINGFILLING; + STRING_POSITION = sTRINGPOSITION; + SYMBOLS_PARAM = sYMBOLSPARAM; + SizeErrorALIGNMENT = sizeErrorALIGNMENT; + SizeErrorDISTANCE = sizeErrorDISTANCE; + SizeErrorINTERVAL = sizeErrorINTERVAL; + StringAngle = stringAngle; + StringBorders = stringBorders; + SymbolsCount = symbolsCount; + SymbolsEstimations = symbolsEstimations; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ALIGNMENT_SYMBOLS_IN_STRING + /// + [JsonPropertyName("ALIGNMENT_SYMBOLS_IN_STRING")] + public int ALIGNMENT_SYMBOLS_IN_STRING { get; set; } + + /// + /// Gets or Sets CHECK_SUMS + /// + [JsonPropertyName("CHECK_SUMS")] + public int CHECK_SUMS { get; set; } + + /// + /// Gets or Sets ErrorPOSITION + /// + [JsonPropertyName("ErrorPOSITION")] + public ErrorCoordinates ErrorPOSITION { get; set; } + + /// + /// Gets or Sets FieldCount + /// + [JsonPropertyName("FieldCount")] + public int FieldCount { get; set; } + + /// + /// Gets or Sets Fields + /// + [JsonPropertyName("Fields")] + public List Fields { get; set; } + + /// + /// Gets or Sets STRINGS_DISTANCE + /// + [JsonPropertyName("STRINGS_DISTANCE")] + public int STRINGS_DISTANCE { get; set; } + + /// + /// Gets or Sets STRINGS_INTERVAL + /// + [JsonPropertyName("STRINGS_INTERVAL")] + public int STRINGS_INTERVAL { get; set; } + + /// + /// Gets or Sets STRING_FILLING + /// + [JsonPropertyName("STRING_FILLING")] + public int STRING_FILLING { get; set; } + + /// + /// Gets or Sets STRING_POSITION + /// + [JsonPropertyName("STRING_POSITION")] + public int STRING_POSITION { get; set; } + + /// + /// Gets or Sets SYMBOLS_PARAM + /// + [JsonPropertyName("SYMBOLS_PARAM")] + public int SYMBOLS_PARAM { get; set; } + + /// + /// Gets or Sets SizeErrorALIGNMENT + /// + [JsonPropertyName("SizeError_ALIGNMENT")] + public decimal SizeErrorALIGNMENT { get; set; } + + /// + /// Gets or Sets SizeErrorDISTANCE + /// + [JsonPropertyName("SizeError_DISTANCE")] + public decimal SizeErrorDISTANCE { get; set; } + + /// + /// Gets or Sets SizeErrorINTERVAL + /// + [JsonPropertyName("SizeError_INTERVAL")] + public decimal SizeErrorINTERVAL { get; set; } + + /// + /// Gets or Sets StringAngle + /// + [JsonPropertyName("StringAngle")] + public decimal StringAngle { get; set; } + + /// + /// Gets or Sets StringBorders + /// + [JsonPropertyName("StringBorders")] + public RectangleCoordinates StringBorders { get; set; } + + /// + /// Gets or Sets SymbolsCount + /// + [JsonPropertyName("SymbolsCount")] + public int SymbolsCount { get; set; } + + /// + /// Gets or Sets SymbolsEstimations + /// + [JsonPropertyName("SymbolsEstimations")] + public List SymbolsEstimations { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class StringItem {\n"); + sb.Append(" ALIGNMENT_SYMBOLS_IN_STRING: ").Append(ALIGNMENT_SYMBOLS_IN_STRING).Append("\n"); + sb.Append(" CHECK_SUMS: ").Append(CHECK_SUMS).Append("\n"); + sb.Append(" ErrorPOSITION: ").Append(ErrorPOSITION).Append("\n"); + sb.Append(" FieldCount: ").Append(FieldCount).Append("\n"); + sb.Append(" Fields: ").Append(Fields).Append("\n"); + sb.Append(" STRINGS_DISTANCE: ").Append(STRINGS_DISTANCE).Append("\n"); + sb.Append(" STRINGS_INTERVAL: ").Append(STRINGS_INTERVAL).Append("\n"); + sb.Append(" STRING_FILLING: ").Append(STRING_FILLING).Append("\n"); + sb.Append(" STRING_POSITION: ").Append(STRING_POSITION).Append("\n"); + sb.Append(" SYMBOLS_PARAM: ").Append(SYMBOLS_PARAM).Append("\n"); + sb.Append(" SizeErrorALIGNMENT: ").Append(SizeErrorALIGNMENT).Append("\n"); + sb.Append(" SizeErrorDISTANCE: ").Append(SizeErrorDISTANCE).Append("\n"); + sb.Append(" SizeErrorINTERVAL: ").Append(SizeErrorINTERVAL).Append("\n"); + sb.Append(" StringAngle: ").Append(StringAngle).Append("\n"); + sb.Append(" StringBorders: ").Append(StringBorders).Append("\n"); + sb.Append(" SymbolsCount: ").Append(SymbolsCount).Append("\n"); + sb.Append(" SymbolsEstimations: ").Append(SymbolsEstimations).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class StringItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override StringItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option aLIGNMENTSYMBOLSINSTRING = default; + Option cHECKSUMS = default; + Option errorPOSITION = default; + Option fieldCount = default; + Option?> fields = default; + Option sTRINGSDISTANCE = default; + Option sTRINGSINTERVAL = default; + Option sTRINGFILLING = default; + Option sTRINGPOSITION = default; + Option sYMBOLSPARAM = default; + Option sizeErrorALIGNMENT = default; + Option sizeErrorDISTANCE = default; + Option sizeErrorINTERVAL = default; + Option stringAngle = default; + Option stringBorders = default; + Option symbolsCount = default; + Option?> symbolsEstimations = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ALIGNMENT_SYMBOLS_IN_STRING": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + aLIGNMENTSYMBOLSINSTRING = new Option(utf8JsonReader.GetInt32()); + break; + case "CHECK_SUMS": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + cHECKSUMS = new Option(utf8JsonReader.GetInt32()); + break; + case "ErrorPOSITION": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + errorPOSITION = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "FieldCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldCount = new Option(utf8JsonReader.GetInt32()); + break; + case "Fields": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "STRINGS_DISTANCE": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sTRINGSDISTANCE = new Option(utf8JsonReader.GetInt32()); + break; + case "STRINGS_INTERVAL": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sTRINGSINTERVAL = new Option(utf8JsonReader.GetInt32()); + break; + case "STRING_FILLING": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sTRINGFILLING = new Option(utf8JsonReader.GetInt32()); + break; + case "STRING_POSITION": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sTRINGPOSITION = new Option(utf8JsonReader.GetInt32()); + break; + case "SYMBOLS_PARAM": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sYMBOLSPARAM = new Option(utf8JsonReader.GetInt32()); + break; + case "SizeError_ALIGNMENT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorALIGNMENT = new Option(utf8JsonReader.GetDecimal()); + break; + case "SizeError_DISTANCE": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorDISTANCE = new Option(utf8JsonReader.GetDecimal()); + break; + case "SizeError_INTERVAL": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorINTERVAL = new Option(utf8JsonReader.GetDecimal()); + break; + case "StringAngle": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringAngle = new Option(utf8JsonReader.GetDecimal()); + break; + case "StringBorders": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringBorders = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SymbolsCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + symbolsCount = new Option(utf8JsonReader.GetInt32()); + break; + case "SymbolsEstimations": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + symbolsEstimations = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!aLIGNMENTSYMBOLSINSTRING.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(aLIGNMENTSYMBOLSINSTRING)); + + if (!cHECKSUMS.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(cHECKSUMS)); + + if (!errorPOSITION.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(errorPOSITION)); + + if (!fieldCount.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(fieldCount)); + + if (!fields.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(fields)); + + if (!sTRINGSDISTANCE.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(sTRINGSDISTANCE)); + + if (!sTRINGSINTERVAL.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(sTRINGSINTERVAL)); + + if (!sTRINGFILLING.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(sTRINGFILLING)); + + if (!sTRINGPOSITION.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(sTRINGPOSITION)); + + if (!sYMBOLSPARAM.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(sYMBOLSPARAM)); + + if (!sizeErrorALIGNMENT.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(sizeErrorALIGNMENT)); + + if (!sizeErrorDISTANCE.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(sizeErrorDISTANCE)); + + if (!sizeErrorINTERVAL.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(sizeErrorINTERVAL)); + + if (!stringAngle.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(stringAngle)); + + if (!stringBorders.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(stringBorders)); + + if (!symbolsCount.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(symbolsCount)); + + if (!symbolsEstimations.IsSet) + throw new ArgumentException("Property is required for class StringItem.", nameof(symbolsEstimations)); + + if (aLIGNMENTSYMBOLSINSTRING.IsSet && aLIGNMENTSYMBOLSINSTRING.Value == null) + throw new ArgumentNullException(nameof(aLIGNMENTSYMBOLSINSTRING), "Property is not nullable for class StringItem."); + + if (cHECKSUMS.IsSet && cHECKSUMS.Value == null) + throw new ArgumentNullException(nameof(cHECKSUMS), "Property is not nullable for class StringItem."); + + if (errorPOSITION.IsSet && errorPOSITION.Value == null) + throw new ArgumentNullException(nameof(errorPOSITION), "Property is not nullable for class StringItem."); + + if (fieldCount.IsSet && fieldCount.Value == null) + throw new ArgumentNullException(nameof(fieldCount), "Property is not nullable for class StringItem."); + + if (fields.IsSet && fields.Value == null) + throw new ArgumentNullException(nameof(fields), "Property is not nullable for class StringItem."); + + if (sTRINGSDISTANCE.IsSet && sTRINGSDISTANCE.Value == null) + throw new ArgumentNullException(nameof(sTRINGSDISTANCE), "Property is not nullable for class StringItem."); + + if (sTRINGSINTERVAL.IsSet && sTRINGSINTERVAL.Value == null) + throw new ArgumentNullException(nameof(sTRINGSINTERVAL), "Property is not nullable for class StringItem."); + + if (sTRINGFILLING.IsSet && sTRINGFILLING.Value == null) + throw new ArgumentNullException(nameof(sTRINGFILLING), "Property is not nullable for class StringItem."); + + if (sTRINGPOSITION.IsSet && sTRINGPOSITION.Value == null) + throw new ArgumentNullException(nameof(sTRINGPOSITION), "Property is not nullable for class StringItem."); + + if (sYMBOLSPARAM.IsSet && sYMBOLSPARAM.Value == null) + throw new ArgumentNullException(nameof(sYMBOLSPARAM), "Property is not nullable for class StringItem."); + + if (sizeErrorALIGNMENT.IsSet && sizeErrorALIGNMENT.Value == null) + throw new ArgumentNullException(nameof(sizeErrorALIGNMENT), "Property is not nullable for class StringItem."); + + if (sizeErrorDISTANCE.IsSet && sizeErrorDISTANCE.Value == null) + throw new ArgumentNullException(nameof(sizeErrorDISTANCE), "Property is not nullable for class StringItem."); + + if (sizeErrorINTERVAL.IsSet && sizeErrorINTERVAL.Value == null) + throw new ArgumentNullException(nameof(sizeErrorINTERVAL), "Property is not nullable for class StringItem."); + + if (stringAngle.IsSet && stringAngle.Value == null) + throw new ArgumentNullException(nameof(stringAngle), "Property is not nullable for class StringItem."); + + if (stringBorders.IsSet && stringBorders.Value == null) + throw new ArgumentNullException(nameof(stringBorders), "Property is not nullable for class StringItem."); + + if (symbolsCount.IsSet && symbolsCount.Value == null) + throw new ArgumentNullException(nameof(symbolsCount), "Property is not nullable for class StringItem."); + + if (symbolsEstimations.IsSet && symbolsEstimations.Value == null) + throw new ArgumentNullException(nameof(symbolsEstimations), "Property is not nullable for class StringItem."); + + return new StringItem(aLIGNMENTSYMBOLSINSTRING.Value!.Value!, cHECKSUMS.Value!.Value!, errorPOSITION.Value!, fieldCount.Value!.Value!, fields.Value!, sTRINGSDISTANCE.Value!.Value!, sTRINGSINTERVAL.Value!.Value!, sTRINGFILLING.Value!.Value!, sTRINGPOSITION.Value!.Value!, sYMBOLSPARAM.Value!.Value!, sizeErrorALIGNMENT.Value!.Value!, sizeErrorDISTANCE.Value!.Value!, sizeErrorINTERVAL.Value!.Value!, stringAngle.Value!.Value!, stringBorders.Value!, symbolsCount.Value!.Value!, symbolsEstimations.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, StringItem stringItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, stringItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, StringItem stringItem, JsonSerializerOptions jsonSerializerOptions) + { + if (stringItem.ErrorPOSITION == null) + throw new ArgumentNullException(nameof(stringItem.ErrorPOSITION), "Property is required for class StringItem."); + + if (stringItem.Fields == null) + throw new ArgumentNullException(nameof(stringItem.Fields), "Property is required for class StringItem."); + + if (stringItem.StringBorders == null) + throw new ArgumentNullException(nameof(stringItem.StringBorders), "Property is required for class StringItem."); + + if (stringItem.SymbolsEstimations == null) + throw new ArgumentNullException(nameof(stringItem.SymbolsEstimations), "Property is required for class StringItem."); + + writer.WriteNumber("ALIGNMENT_SYMBOLS_IN_STRING", stringItem.ALIGNMENT_SYMBOLS_IN_STRING); + + writer.WriteNumber("CHECK_SUMS", stringItem.CHECK_SUMS); + + writer.WritePropertyName("ErrorPOSITION"); + JsonSerializer.Serialize(writer, stringItem.ErrorPOSITION, jsonSerializerOptions); + writer.WriteNumber("FieldCount", stringItem.FieldCount); + + writer.WritePropertyName("Fields"); + JsonSerializer.Serialize(writer, stringItem.Fields, jsonSerializerOptions); + writer.WriteNumber("STRINGS_DISTANCE", stringItem.STRINGS_DISTANCE); + + writer.WriteNumber("STRINGS_INTERVAL", stringItem.STRINGS_INTERVAL); + + writer.WriteNumber("STRING_FILLING", stringItem.STRING_FILLING); + + writer.WriteNumber("STRING_POSITION", stringItem.STRING_POSITION); + + writer.WriteNumber("SYMBOLS_PARAM", stringItem.SYMBOLS_PARAM); + + writer.WriteNumber("SizeError_ALIGNMENT", stringItem.SizeErrorALIGNMENT); + + writer.WriteNumber("SizeError_DISTANCE", stringItem.SizeErrorDISTANCE); + + writer.WriteNumber("SizeError_INTERVAL", stringItem.SizeErrorINTERVAL); + + writer.WriteNumber("StringAngle", stringItem.StringAngle); + + writer.WritePropertyName("StringBorders"); + JsonSerializer.Serialize(writer, stringItem.StringBorders, jsonSerializerOptions); + writer.WriteNumber("SymbolsCount", stringItem.SymbolsCount); + + writer.WritePropertyName("SymbolsEstimations"); + JsonSerializer.Serialize(writer, stringItem.SymbolsEstimations, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs index 2377bf3..ac331d3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs @@ -1,140 +1,273 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Describes single row recognition results in multi-line text field of a document /// - [DataContract] - public partial class StringRecognitionResult : IEquatable, IValidatableObject + public partial class StringRecognitionResult : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected StringRecognitionResult() { } - /// - /// Initializes a new instance of the class. - /// - /// Array of recognition results for individual characters of a string (required). - public StringRecognitionResult(List stringResult = default(List)) + /// Number of StringResult array elements + /// Array of recognition results for individual characters of a string + /// Buf_Text text string length + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' + /// reserved + [JsonConstructor] + public StringRecognitionResult(decimal symbolsCount, List stringResult, Option bufLength = default, Option bufText = default, Option reserved = default) { - // to ensure "stringResult" is required (not null) - if (stringResult == null) - { - throw new InvalidDataException("stringResult is a required property for StringRecognitionResult and cannot be null"); - } - else - { - this.StringResult = stringResult; - } - + SymbolsCount = symbolsCount; + StringResult = stringResult; + BufLengthOption = bufLength; + BufTextOption = bufText; + ReservedOption = reserved; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Number of StringResult array elements + /// + /// Number of StringResult array elements + [JsonPropertyName("SymbolsCount")] + public decimal SymbolsCount { get; set; } + /// /// Array of recognition results for individual characters of a string /// /// Array of recognition results for individual characters of a string - [DataMember(Name="StringResult", EmitDefaultValue=true)] + [JsonPropertyName("StringResult")] public List StringResult { get; set; } + /// + /// Used to track the state of BufLength + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BufLengthOption { get; private set; } + + /// + /// Buf_Text text string length + /// + /// Buf_Text text string length + [JsonPropertyName("Buf_Length")] + public decimal? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new(value); } } + + /// + /// Used to track the state of BufText + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BufTextOption { get; private set; } + + /// + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' + /// + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' + [JsonPropertyName("Buf_Text")] + public string? BufText { get { return this.BufTextOption; } set { this.BufTextOption = new(value); } } + + /// + /// Used to track the state of Reserved + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ReservedOption { get; private set; } + + /// + /// Gets or Sets Reserved + /// + [JsonPropertyName("Reserved")] + public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class StringRecognitionResult {\n"); + sb.Append(" SymbolsCount: ").Append(SymbolsCount).Append("\n"); sb.Append(" StringResult: ").Append(StringResult).Append("\n"); + sb.Append(" BufLength: ").Append(BufLength).Append("\n"); + sb.Append(" BufText: ").Append(BufText).Append("\n"); + sb.Append(" Reserved: ").Append(Reserved).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as StringRecognitionResult); + yield break; } + } + /// + /// A Json converter for type + /// + public class StringRecognitionResultJsonConverter : JsonConverter + { /// - /// Returns true if StringRecognitionResult instances are equal + /// Deserializes json to /// - /// Instance of StringRecognitionResult to be compared - /// Boolean - public bool Equals(StringRecognitionResult input) + /// + /// + /// + /// + /// + public override StringRecognitionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.StringResult == input.StringResult || - this.StringResult != null && - input.StringResult != null && - this.StringResult.SequenceEqual(input.StringResult) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option symbolsCount = default; + Option?> stringResult = default; + Option bufLength = default; + Option bufText = default; + Option reserved = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "SymbolsCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + symbolsCount = new Option(utf8JsonReader.GetDecimal()); + break; + case "StringResult": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringResult = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Buf_Length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetDecimal()); + break; + case "Buf_Text": + bufText = new Option(utf8JsonReader.GetString()!); + break; + case "Reserved": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!symbolsCount.IsSet) + throw new ArgumentException("Property is required for class StringRecognitionResult.", nameof(symbolsCount)); + + if (!stringResult.IsSet) + throw new ArgumentException("Property is required for class StringRecognitionResult.", nameof(stringResult)); + + if (symbolsCount.IsSet && symbolsCount.Value == null) + throw new ArgumentNullException(nameof(symbolsCount), "Property is not nullable for class StringRecognitionResult."); + + if (stringResult.IsSet && stringResult.Value == null) + throw new ArgumentNullException(nameof(stringResult), "Property is not nullable for class StringRecognitionResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class StringRecognitionResult."); + + if (bufText.IsSet && bufText.Value == null) + throw new ArgumentNullException(nameof(bufText), "Property is not nullable for class StringRecognitionResult."); + + if (reserved.IsSet && reserved.Value == null) + throw new ArgumentNullException(nameof(reserved), "Property is not nullable for class StringRecognitionResult."); + + return new StringRecognitionResult(symbolsCount.Value!.Value!, stringResult.Value!, bufLength, bufText, reserved); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, StringRecognitionResult stringRecognitionResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringResult != null) - hashCode = hashCode * 59 + this.StringResult.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, stringRecognitionResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, StringRecognitionResult stringRecognitionResult, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (stringRecognitionResult.StringResult == null) + throw new ArgumentNullException(nameof(stringRecognitionResult.StringResult), "Property is required for class StringRecognitionResult."); + + if (stringRecognitionResult.BufTextOption.IsSet && stringRecognitionResult.BufText == null) + throw new ArgumentNullException(nameof(stringRecognitionResult.BufText), "Property is required for class StringRecognitionResult."); + + writer.WriteNumber("SymbolsCount", stringRecognitionResult.SymbolsCount); + + writer.WritePropertyName("StringResult"); + JsonSerializer.Serialize(writer, stringRecognitionResult.StringResult, jsonSerializerOptions); + if (stringRecognitionResult.BufLengthOption.IsSet) + writer.WriteNumber("Buf_Length", stringRecognitionResult.BufLengthOption.Value!.Value); + + if (stringRecognitionResult.BufTextOption.IsSet) + writer.WriteString("Buf_Text", stringRecognitionResult.BufText); + + if (stringRecognitionResult.ReservedOption.IsSet) + writer.WriteNumber("Reserved", stringRecognitionResult.ReservedOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/Symbol.cs b/src/Regula.DocumentReader.WebClient/Model/Symbol.cs new file mode 100644 index 0000000..26a6b5e --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/Symbol.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Symbol + /// + public partial class Symbol : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// boundingRect + [JsonConstructor] + public Symbol(List boundingRect) + { + BoundingRect = boundingRect; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets BoundingRect + /// + [JsonPropertyName("boundingRect")] + public List BoundingRect { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class Symbol {\n"); + sb.Append(" BoundingRect: ").Append(BoundingRect).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class SymbolJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override Symbol Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> boundingRect = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "boundingRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + boundingRect = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!boundingRect.IsSet) + throw new ArgumentException("Property is required for class Symbol.", nameof(boundingRect)); + + if (boundingRect.IsSet && boundingRect.Value == null) + throw new ArgumentNullException(nameof(boundingRect), "Property is not nullable for class Symbol."); + + return new Symbol(boundingRect.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Symbol symbol, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, symbol, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, Symbol symbol, JsonSerializerOptions jsonSerializerOptions) + { + if (symbol.BoundingRect == null) + throw new ArgumentNullException(nameof(symbol.BoundingRect), "Property is required for class Symbol."); + + writer.WritePropertyName("boundingRect"); + JsonSerializer.Serialize(writer, symbol.BoundingRect, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs index d08b313..4ef6923 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs @@ -1,179 +1,251 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Describes an individual character recognition candidate /// - [DataContract] - public partial class SymbolCandidate : IEquatable, IValidatableObject + public partial class SymbolCandidate : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected SymbolCandidate() { } - /// - /// Initializes a new instance of the class. - /// - /// Unicode symbol code (required). - /// character recognition probability (0–100,%) (required). - public SymbolCandidate(int symbolCode = default(int), int symbolProbability = default(int)) + /// Unicode symbol code + /// character recognition probability (0–100,%) + /// class + /// subClass + [JsonConstructor] + public SymbolCandidate(int symbolCode, int symbolProbability, Option @class = default, Option subClass = default) { - // to ensure "symbolCode" is required (not null) - if (symbolCode == null) - { - throw new InvalidDataException("symbolCode is a required property for SymbolCandidate and cannot be null"); - } - else - { - this.SymbolCode = symbolCode; - } - - // to ensure "symbolProbability" is required (not null) - if (symbolProbability == null) - { - throw new InvalidDataException("symbolProbability is a required property for SymbolCandidate and cannot be null"); - } - else - { - this.SymbolProbability = symbolProbability; - } - + SymbolCode = symbolCode; + SymbolProbability = symbolProbability; + ClassOption = @class; + SubClassOption = subClass; + OnCreated(); } - + + partial void OnCreated(); + /// /// Unicode symbol code /// /// Unicode symbol code - [DataMember(Name="SymbolCode", EmitDefaultValue=true)] + [JsonPropertyName("SymbolCode")] public int SymbolCode { get; set; } /// /// character recognition probability (0–100,%) /// /// character recognition probability (0–100,%) - [DataMember(Name="SymbolProbability", EmitDefaultValue=true)] + [JsonPropertyName("SymbolProbability")] public int SymbolProbability { get; set; } + /// + /// Used to track the state of Class + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ClassOption { get; private set; } + + /// + /// Gets or Sets Class + /// + [JsonPropertyName("Class")] + public int? Class { get { return this.ClassOption; } set { this.ClassOption = new(value); } } + + /// + /// Used to track the state of SubClass + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SubClassOption { get; private set; } + + /// + /// Gets or Sets SubClass + /// + [JsonPropertyName("SubClass")] + public int? SubClass { get { return this.SubClassOption; } set { this.SubClassOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SymbolCandidate {\n"); sb.Append(" SymbolCode: ").Append(SymbolCode).Append("\n"); sb.Append(" SymbolProbability: ").Append(SymbolProbability).Append("\n"); + sb.Append(" Class: ").Append(Class).Append("\n"); + sb.Append(" SubClass: ").Append(SubClass).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as SymbolCandidate); + // SymbolProbability (int) maximum + if (this.SymbolProbability > (int)100) + { + yield return new ValidationResult("Invalid value for SymbolProbability, must be a value less than or equal to 100.", new [] { "SymbolProbability" }); + } + + // SymbolProbability (int) minimum + if (this.SymbolProbability < (int)0) + { + yield return new ValidationResult("Invalid value for SymbolProbability, must be a value greater than or equal to 0.", new [] { "SymbolProbability" }); + } + + yield break; } + } + /// + /// A Json converter for type + /// + public class SymbolCandidateJsonConverter : JsonConverter + { /// - /// Returns true if SymbolCandidate instances are equal + /// Deserializes json to /// - /// Instance of SymbolCandidate to be compared - /// Boolean - public bool Equals(SymbolCandidate input) + /// + /// + /// + /// + /// + public override SymbolCandidate Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.SymbolCode == input.SymbolCode || - (this.SymbolCode != null && - this.SymbolCode.Equals(input.SymbolCode)) - ) && - ( - this.SymbolProbability == input.SymbolProbability || - (this.SymbolProbability != null && - this.SymbolProbability.Equals(input.SymbolProbability)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option symbolCode = default; + Option symbolProbability = default; + Option varClass = default; + Option subClass = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "SymbolCode": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + symbolCode = new Option(utf8JsonReader.GetInt32()); + break; + case "SymbolProbability": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + symbolProbability = new Option(utf8JsonReader.GetInt32()); + break; + case "Class": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + varClass = new Option(utf8JsonReader.GetInt32()); + break; + case "SubClass": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + subClass = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!symbolCode.IsSet) + throw new ArgumentException("Property is required for class SymbolCandidate.", nameof(symbolCode)); + + if (!symbolProbability.IsSet) + throw new ArgumentException("Property is required for class SymbolCandidate.", nameof(symbolProbability)); + + if (symbolCode.IsSet && symbolCode.Value == null) + throw new ArgumentNullException(nameof(symbolCode), "Property is not nullable for class SymbolCandidate."); + + if (symbolProbability.IsSet && symbolProbability.Value == null) + throw new ArgumentNullException(nameof(symbolProbability), "Property is not nullable for class SymbolCandidate."); + + if (varClass.IsSet && varClass.Value == null) + throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class SymbolCandidate."); + + if (subClass.IsSet && subClass.Value == null) + throw new ArgumentNullException(nameof(subClass), "Property is not nullable for class SymbolCandidate."); + + return new SymbolCandidate(symbolCode.Value!.Value!, symbolProbability.Value!.Value!, varClass, subClass); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SymbolCandidate symbolCandidate, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SymbolCode != null) - hashCode = hashCode * 59 + this.SymbolCode.GetHashCode(); - if (this.SymbolProbability != null) - hashCode = hashCode * 59 + this.SymbolProbability.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, symbolCandidate, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, SymbolCandidate symbolCandidate, JsonSerializerOptions jsonSerializerOptions) { + writer.WriteNumber("SymbolCode", symbolCandidate.SymbolCode); - - // SymbolProbability (int) maximum - if(this.SymbolProbability > (int)100) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SymbolProbability, must be a value less than or equal to 100.", new [] { "SymbolProbability" }); - } + writer.WriteNumber("SymbolProbability", symbolCandidate.SymbolProbability); - // SymbolProbability (int) minimum - if(this.SymbolProbability < (int)0) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for SymbolProbability, must be a value greater than or equal to 0.", new [] { "SymbolProbability" }); - } + if (symbolCandidate.ClassOption.IsSet) + writer.WriteNumber("Class", symbolCandidate.ClassOption.Value!.Value); - yield break; + if (symbolCandidate.SubClassOption.IsSet) + writer.WriteNumber("SubClass", symbolCandidate.SubClassOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs new file mode 100644 index 0000000..7faa19a --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs @@ -0,0 +1,517 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// SymbolEstimationItem + /// + public partial class SymbolEstimationItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// aLIGNMENTNEARESTSYMBOLS + /// cONTRASTPRINT + /// cONTRASTSYMBOL + /// charSymbol + /// eDGE + /// eMPTINESS + /// sTAIN + /// sYMBOLSINTERVAL + /// sYMBOLPARAM + /// sYMBOLSIZE + /// sizeErrorAlignWithNext + /// sizeErrorAlignWithPrev + /// sizeErrorIntervWithNext + /// sizeErrorIntervWithPrev + /// sizeErrorSymbolHeight + /// sizeErrorSymbolWidth + /// symbolBounds + [JsonConstructor] + public SymbolEstimationItem(int aLIGNMENTNEARESTSYMBOLS, int cONTRASTPRINT, int cONTRASTSYMBOL, int charSymbol, int eDGE, int eMPTINESS, int sTAIN, int sYMBOLSINTERVAL, int sYMBOLPARAM, int sYMBOLSIZE, decimal sizeErrorAlignWithNext, decimal sizeErrorAlignWithPrev, decimal sizeErrorIntervWithNext, decimal sizeErrorIntervWithPrev, decimal sizeErrorSymbolHeight, decimal sizeErrorSymbolWidth, RectangleCoordinates symbolBounds) + { + ALIGNMENT_NEAREST_SYMBOLS = aLIGNMENTNEARESTSYMBOLS; + CONTRAST_PRINT = cONTRASTPRINT; + CONTRAST_SYMBOL = cONTRASTSYMBOL; + CharSymbol = charSymbol; + EDGE = eDGE; + EMPTINESS = eMPTINESS; + STAIN = sTAIN; + SYMBOLS_INTERVAL = sYMBOLSINTERVAL; + SYMBOL_PARAM = sYMBOLPARAM; + SYMBOL_SIZE = sYMBOLSIZE; + SizeErrorAlignWithNext = sizeErrorAlignWithNext; + SizeErrorAlignWithPrev = sizeErrorAlignWithPrev; + SizeErrorIntervWithNext = sizeErrorIntervWithNext; + SizeErrorIntervWithPrev = sizeErrorIntervWithPrev; + SizeErrorSymbolHeight = sizeErrorSymbolHeight; + SizeErrorSymbolWidth = sizeErrorSymbolWidth; + SymbolBounds = symbolBounds; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets ALIGNMENT_NEAREST_SYMBOLS + /// + [JsonPropertyName("ALIGNMENT_NEAREST_SYMBOLS")] + public int ALIGNMENT_NEAREST_SYMBOLS { get; set; } + + /// + /// Gets or Sets CONTRAST_PRINT + /// + [JsonPropertyName("CONTRAST_PRINT")] + public int CONTRAST_PRINT { get; set; } + + /// + /// Gets or Sets CONTRAST_SYMBOL + /// + [JsonPropertyName("CONTRAST_SYMBOL")] + public int CONTRAST_SYMBOL { get; set; } + + /// + /// Gets or Sets CharSymbol + /// + [JsonPropertyName("CharSymbol")] + public int CharSymbol { get; set; } + + /// + /// Gets or Sets EDGE + /// + [JsonPropertyName("EDGE")] + public int EDGE { get; set; } + + /// + /// Gets or Sets EMPTINESS + /// + [JsonPropertyName("EMPTINESS")] + public int EMPTINESS { get; set; } + + /// + /// Gets or Sets STAIN + /// + [JsonPropertyName("STAIN")] + public int STAIN { get; set; } + + /// + /// Gets or Sets SYMBOLS_INTERVAL + /// + [JsonPropertyName("SYMBOLS_INTERVAL")] + public int SYMBOLS_INTERVAL { get; set; } + + /// + /// Gets or Sets SYMBOL_PARAM + /// + [JsonPropertyName("SYMBOL_PARAM")] + public int SYMBOL_PARAM { get; set; } + + /// + /// Gets or Sets SYMBOL_SIZE + /// + [JsonPropertyName("SYMBOL_SIZE")] + public int SYMBOL_SIZE { get; set; } + + /// + /// Gets or Sets SizeErrorAlignWithNext + /// + [JsonPropertyName("SizeErrorAlignWithNext")] + public decimal SizeErrorAlignWithNext { get; set; } + + /// + /// Gets or Sets SizeErrorAlignWithPrev + /// + [JsonPropertyName("SizeErrorAlignWithPrev")] + public decimal SizeErrorAlignWithPrev { get; set; } + + /// + /// Gets or Sets SizeErrorIntervWithNext + /// + [JsonPropertyName("SizeErrorIntervWithNext")] + public decimal SizeErrorIntervWithNext { get; set; } + + /// + /// Gets or Sets SizeErrorIntervWithPrev + /// + [JsonPropertyName("SizeErrorIntervWithPrev")] + public decimal SizeErrorIntervWithPrev { get; set; } + + /// + /// Gets or Sets SizeErrorSymbolHeight + /// + [JsonPropertyName("SizeErrorSymbolHeight")] + public decimal SizeErrorSymbolHeight { get; set; } + + /// + /// Gets or Sets SizeErrorSymbolWidth + /// + [JsonPropertyName("SizeErrorSymbolWidth")] + public decimal SizeErrorSymbolWidth { get; set; } + + /// + /// Gets or Sets SymbolBounds + /// + [JsonPropertyName("SymbolBounds")] + public RectangleCoordinates SymbolBounds { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class SymbolEstimationItem {\n"); + sb.Append(" ALIGNMENT_NEAREST_SYMBOLS: ").Append(ALIGNMENT_NEAREST_SYMBOLS).Append("\n"); + sb.Append(" CONTRAST_PRINT: ").Append(CONTRAST_PRINT).Append("\n"); + sb.Append(" CONTRAST_SYMBOL: ").Append(CONTRAST_SYMBOL).Append("\n"); + sb.Append(" CharSymbol: ").Append(CharSymbol).Append("\n"); + sb.Append(" EDGE: ").Append(EDGE).Append("\n"); + sb.Append(" EMPTINESS: ").Append(EMPTINESS).Append("\n"); + sb.Append(" STAIN: ").Append(STAIN).Append("\n"); + sb.Append(" SYMBOLS_INTERVAL: ").Append(SYMBOLS_INTERVAL).Append("\n"); + sb.Append(" SYMBOL_PARAM: ").Append(SYMBOL_PARAM).Append("\n"); + sb.Append(" SYMBOL_SIZE: ").Append(SYMBOL_SIZE).Append("\n"); + sb.Append(" SizeErrorAlignWithNext: ").Append(SizeErrorAlignWithNext).Append("\n"); + sb.Append(" SizeErrorAlignWithPrev: ").Append(SizeErrorAlignWithPrev).Append("\n"); + sb.Append(" SizeErrorIntervWithNext: ").Append(SizeErrorIntervWithNext).Append("\n"); + sb.Append(" SizeErrorIntervWithPrev: ").Append(SizeErrorIntervWithPrev).Append("\n"); + sb.Append(" SizeErrorSymbolHeight: ").Append(SizeErrorSymbolHeight).Append("\n"); + sb.Append(" SizeErrorSymbolWidth: ").Append(SizeErrorSymbolWidth).Append("\n"); + sb.Append(" SymbolBounds: ").Append(SymbolBounds).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class SymbolEstimationItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override SymbolEstimationItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option aLIGNMENTNEARESTSYMBOLS = default; + Option cONTRASTPRINT = default; + Option cONTRASTSYMBOL = default; + Option charSymbol = default; + Option eDGE = default; + Option eMPTINESS = default; + Option sTAIN = default; + Option sYMBOLSINTERVAL = default; + Option sYMBOLPARAM = default; + Option sYMBOLSIZE = default; + Option sizeErrorAlignWithNext = default; + Option sizeErrorAlignWithPrev = default; + Option sizeErrorIntervWithNext = default; + Option sizeErrorIntervWithPrev = default; + Option sizeErrorSymbolHeight = default; + Option sizeErrorSymbolWidth = default; + Option symbolBounds = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ALIGNMENT_NEAREST_SYMBOLS": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + aLIGNMENTNEARESTSYMBOLS = new Option(utf8JsonReader.GetInt32()); + break; + case "CONTRAST_PRINT": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + cONTRASTPRINT = new Option(utf8JsonReader.GetInt32()); + break; + case "CONTRAST_SYMBOL": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + cONTRASTSYMBOL = new Option(utf8JsonReader.GetInt32()); + break; + case "CharSymbol": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + charSymbol = new Option(utf8JsonReader.GetInt32()); + break; + case "EDGE": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eDGE = new Option(utf8JsonReader.GetInt32()); + break; + case "EMPTINESS": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + eMPTINESS = new Option(utf8JsonReader.GetInt32()); + break; + case "STAIN": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sTAIN = new Option(utf8JsonReader.GetInt32()); + break; + case "SYMBOLS_INTERVAL": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sYMBOLSINTERVAL = new Option(utf8JsonReader.GetInt32()); + break; + case "SYMBOL_PARAM": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sYMBOLPARAM = new Option(utf8JsonReader.GetInt32()); + break; + case "SYMBOL_SIZE": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sYMBOLSIZE = new Option(utf8JsonReader.GetInt32()); + break; + case "SizeErrorAlignWithNext": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorAlignWithNext = new Option(utf8JsonReader.GetDecimal()); + break; + case "SizeErrorAlignWithPrev": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorAlignWithPrev = new Option(utf8JsonReader.GetDecimal()); + break; + case "SizeErrorIntervWithNext": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorIntervWithNext = new Option(utf8JsonReader.GetDecimal()); + break; + case "SizeErrorIntervWithPrev": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorIntervWithPrev = new Option(utf8JsonReader.GetDecimal()); + break; + case "SizeErrorSymbolHeight": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorSymbolHeight = new Option(utf8JsonReader.GetDecimal()); + break; + case "SizeErrorSymbolWidth": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + sizeErrorSymbolWidth = new Option(utf8JsonReader.GetDecimal()); + break; + case "SymbolBounds": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + symbolBounds = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!aLIGNMENTNEARESTSYMBOLS.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(aLIGNMENTNEARESTSYMBOLS)); + + if (!cONTRASTPRINT.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(cONTRASTPRINT)); + + if (!cONTRASTSYMBOL.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(cONTRASTSYMBOL)); + + if (!charSymbol.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(charSymbol)); + + if (!eDGE.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(eDGE)); + + if (!eMPTINESS.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(eMPTINESS)); + + if (!sTAIN.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sTAIN)); + + if (!sYMBOLSINTERVAL.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sYMBOLSINTERVAL)); + + if (!sYMBOLPARAM.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sYMBOLPARAM)); + + if (!sYMBOLSIZE.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sYMBOLSIZE)); + + if (!sizeErrorAlignWithNext.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorAlignWithNext)); + + if (!sizeErrorAlignWithPrev.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorAlignWithPrev)); + + if (!sizeErrorIntervWithNext.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorIntervWithNext)); + + if (!sizeErrorIntervWithPrev.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorIntervWithPrev)); + + if (!sizeErrorSymbolHeight.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorSymbolHeight)); + + if (!sizeErrorSymbolWidth.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorSymbolWidth)); + + if (!symbolBounds.IsSet) + throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(symbolBounds)); + + if (aLIGNMENTNEARESTSYMBOLS.IsSet && aLIGNMENTNEARESTSYMBOLS.Value == null) + throw new ArgumentNullException(nameof(aLIGNMENTNEARESTSYMBOLS), "Property is not nullable for class SymbolEstimationItem."); + + if (cONTRASTPRINT.IsSet && cONTRASTPRINT.Value == null) + throw new ArgumentNullException(nameof(cONTRASTPRINT), "Property is not nullable for class SymbolEstimationItem."); + + if (cONTRASTSYMBOL.IsSet && cONTRASTSYMBOL.Value == null) + throw new ArgumentNullException(nameof(cONTRASTSYMBOL), "Property is not nullable for class SymbolEstimationItem."); + + if (charSymbol.IsSet && charSymbol.Value == null) + throw new ArgumentNullException(nameof(charSymbol), "Property is not nullable for class SymbolEstimationItem."); + + if (eDGE.IsSet && eDGE.Value == null) + throw new ArgumentNullException(nameof(eDGE), "Property is not nullable for class SymbolEstimationItem."); + + if (eMPTINESS.IsSet && eMPTINESS.Value == null) + throw new ArgumentNullException(nameof(eMPTINESS), "Property is not nullable for class SymbolEstimationItem."); + + if (sTAIN.IsSet && sTAIN.Value == null) + throw new ArgumentNullException(nameof(sTAIN), "Property is not nullable for class SymbolEstimationItem."); + + if (sYMBOLSINTERVAL.IsSet && sYMBOLSINTERVAL.Value == null) + throw new ArgumentNullException(nameof(sYMBOLSINTERVAL), "Property is not nullable for class SymbolEstimationItem."); + + if (sYMBOLPARAM.IsSet && sYMBOLPARAM.Value == null) + throw new ArgumentNullException(nameof(sYMBOLPARAM), "Property is not nullable for class SymbolEstimationItem."); + + if (sYMBOLSIZE.IsSet && sYMBOLSIZE.Value == null) + throw new ArgumentNullException(nameof(sYMBOLSIZE), "Property is not nullable for class SymbolEstimationItem."); + + if (sizeErrorAlignWithNext.IsSet && sizeErrorAlignWithNext.Value == null) + throw new ArgumentNullException(nameof(sizeErrorAlignWithNext), "Property is not nullable for class SymbolEstimationItem."); + + if (sizeErrorAlignWithPrev.IsSet && sizeErrorAlignWithPrev.Value == null) + throw new ArgumentNullException(nameof(sizeErrorAlignWithPrev), "Property is not nullable for class SymbolEstimationItem."); + + if (sizeErrorIntervWithNext.IsSet && sizeErrorIntervWithNext.Value == null) + throw new ArgumentNullException(nameof(sizeErrorIntervWithNext), "Property is not nullable for class SymbolEstimationItem."); + + if (sizeErrorIntervWithPrev.IsSet && sizeErrorIntervWithPrev.Value == null) + throw new ArgumentNullException(nameof(sizeErrorIntervWithPrev), "Property is not nullable for class SymbolEstimationItem."); + + if (sizeErrorSymbolHeight.IsSet && sizeErrorSymbolHeight.Value == null) + throw new ArgumentNullException(nameof(sizeErrorSymbolHeight), "Property is not nullable for class SymbolEstimationItem."); + + if (sizeErrorSymbolWidth.IsSet && sizeErrorSymbolWidth.Value == null) + throw new ArgumentNullException(nameof(sizeErrorSymbolWidth), "Property is not nullable for class SymbolEstimationItem."); + + if (symbolBounds.IsSet && symbolBounds.Value == null) + throw new ArgumentNullException(nameof(symbolBounds), "Property is not nullable for class SymbolEstimationItem."); + + return new SymbolEstimationItem(aLIGNMENTNEARESTSYMBOLS.Value!.Value!, cONTRASTPRINT.Value!.Value!, cONTRASTSYMBOL.Value!.Value!, charSymbol.Value!.Value!, eDGE.Value!.Value!, eMPTINESS.Value!.Value!, sTAIN.Value!.Value!, sYMBOLSINTERVAL.Value!.Value!, sYMBOLPARAM.Value!.Value!, sYMBOLSIZE.Value!.Value!, sizeErrorAlignWithNext.Value!.Value!, sizeErrorAlignWithPrev.Value!.Value!, sizeErrorIntervWithNext.Value!.Value!, sizeErrorIntervWithPrev.Value!.Value!, sizeErrorSymbolHeight.Value!.Value!, sizeErrorSymbolWidth.Value!.Value!, symbolBounds.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SymbolEstimationItem symbolEstimationItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, symbolEstimationItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, SymbolEstimationItem symbolEstimationItem, JsonSerializerOptions jsonSerializerOptions) + { + if (symbolEstimationItem.SymbolBounds == null) + throw new ArgumentNullException(nameof(symbolEstimationItem.SymbolBounds), "Property is required for class SymbolEstimationItem."); + + writer.WriteNumber("ALIGNMENT_NEAREST_SYMBOLS", symbolEstimationItem.ALIGNMENT_NEAREST_SYMBOLS); + + writer.WriteNumber("CONTRAST_PRINT", symbolEstimationItem.CONTRAST_PRINT); + + writer.WriteNumber("CONTRAST_SYMBOL", symbolEstimationItem.CONTRAST_SYMBOL); + + writer.WriteNumber("CharSymbol", symbolEstimationItem.CharSymbol); + + writer.WriteNumber("EDGE", symbolEstimationItem.EDGE); + + writer.WriteNumber("EMPTINESS", symbolEstimationItem.EMPTINESS); + + writer.WriteNumber("STAIN", symbolEstimationItem.STAIN); + + writer.WriteNumber("SYMBOLS_INTERVAL", symbolEstimationItem.SYMBOLS_INTERVAL); + + writer.WriteNumber("SYMBOL_PARAM", symbolEstimationItem.SYMBOL_PARAM); + + writer.WriteNumber("SYMBOL_SIZE", symbolEstimationItem.SYMBOL_SIZE); + + writer.WriteNumber("SizeErrorAlignWithNext", symbolEstimationItem.SizeErrorAlignWithNext); + + writer.WriteNumber("SizeErrorAlignWithPrev", symbolEstimationItem.SizeErrorAlignWithPrev); + + writer.WriteNumber("SizeErrorIntervWithNext", symbolEstimationItem.SizeErrorIntervWithNext); + + writer.WriteNumber("SizeErrorIntervWithPrev", symbolEstimationItem.SizeErrorIntervWithPrev); + + writer.WriteNumber("SizeErrorSymbolHeight", symbolEstimationItem.SizeErrorSymbolHeight); + + writer.WriteNumber("SizeErrorSymbolWidth", symbolEstimationItem.SizeErrorSymbolWidth); + + writer.WritePropertyName("SymbolBounds"); + JsonSerializer.Serialize(writer, symbolEstimationItem.SymbolBounds, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs index faf2316..75ec95c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs @@ -1,165 +1,294 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Describes a single character recognition results in the text field line /// - [DataContract] - public partial class SymbolRecognitionResult : IEquatable, IValidatableObject + public partial class SymbolRecognitionResult : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected SymbolRecognitionResult() { } - /// - /// Initializes a new instance of the class. - /// - /// symbolRect (required). - /// Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) (required). - public SymbolRecognitionResult(RectangleCoordinates symbolRect = default(RectangleCoordinates), List listOfCandidates = default(List)) + /// symbolRect + /// Number of significant elements of ListOfCandidates array + /// Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) + /// baseLineBottom + /// baseLineTop + /// reserved + [JsonConstructor] + public SymbolRecognitionResult(RectangleCoordinates symbolRect, decimal candidatesCount, List listOfCandidates, Option baseLineBottom = default, Option baseLineTop = default, Option reserved = default) { - // to ensure "symbolRect" is required (not null) - if (symbolRect == null) - { - throw new InvalidDataException("symbolRect is a required property for SymbolRecognitionResult and cannot be null"); - } - else - { - this.SymbolRect = symbolRect; - } - - // to ensure "listOfCandidates" is required (not null) - if (listOfCandidates == null) - { - throw new InvalidDataException("listOfCandidates is a required property for SymbolRecognitionResult and cannot be null"); - } - else - { - this.ListOfCandidates = listOfCandidates; - } - + SymbolRect = symbolRect; + CandidatesCount = candidatesCount; + ListOfCandidates = listOfCandidates; + BaseLineBottomOption = baseLineBottom; + BaseLineTopOption = baseLineTop; + ReservedOption = reserved; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets SymbolRect /// - [DataMember(Name="SymbolRect", EmitDefaultValue=true)] + [JsonPropertyName("SymbolRect")] public RectangleCoordinates SymbolRect { get; set; } + /// + /// Number of significant elements of ListOfCandidates array + /// + /// Number of significant elements of ListOfCandidates array + [JsonPropertyName("CandidatesCount")] + public decimal CandidatesCount { get; set; } + /// /// Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) /// /// Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) - [DataMember(Name="ListOfCandidates", EmitDefaultValue=true)] + [JsonPropertyName("ListOfCandidates")] public List ListOfCandidates { get; set; } + /// + /// Used to track the state of BaseLineBottom + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BaseLineBottomOption { get; private set; } + + /// + /// Gets or Sets BaseLineBottom + /// + [JsonPropertyName("BaseLineBottom")] + public int? BaseLineBottom { get { return this.BaseLineBottomOption; } set { this.BaseLineBottomOption = new(value); } } + + /// + /// Used to track the state of BaseLineTop + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option BaseLineTopOption { get; private set; } + + /// + /// Gets or Sets BaseLineTop + /// + [JsonPropertyName("BaseLineTop")] + public int? BaseLineTop { get { return this.BaseLineTopOption; } set { this.BaseLineTopOption = new(value); } } + + /// + /// Used to track the state of Reserved + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ReservedOption { get; private set; } + + /// + /// Gets or Sets Reserved + /// + [JsonPropertyName("Reserved")] + public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class SymbolRecognitionResult {\n"); sb.Append(" SymbolRect: ").Append(SymbolRect).Append("\n"); + sb.Append(" CandidatesCount: ").Append(CandidatesCount).Append("\n"); sb.Append(" ListOfCandidates: ").Append(ListOfCandidates).Append("\n"); + sb.Append(" BaseLineBottom: ").Append(BaseLineBottom).Append("\n"); + sb.Append(" BaseLineTop: ").Append(BaseLineTop).Append("\n"); + sb.Append(" Reserved: ").Append(Reserved).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as SymbolRecognitionResult); + yield break; } + } + /// + /// A Json converter for type + /// + public class SymbolRecognitionResultJsonConverter : JsonConverter + { /// - /// Returns true if SymbolRecognitionResult instances are equal + /// Deserializes json to /// - /// Instance of SymbolRecognitionResult to be compared - /// Boolean - public bool Equals(SymbolRecognitionResult input) + /// + /// + /// + /// + /// + public override SymbolRecognitionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.SymbolRect == input.SymbolRect || - (this.SymbolRect != null && - this.SymbolRect.Equals(input.SymbolRect)) - ) && - ( - this.ListOfCandidates == input.ListOfCandidates || - this.ListOfCandidates != null && - input.ListOfCandidates != null && - this.ListOfCandidates.SequenceEqual(input.ListOfCandidates) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option symbolRect = default; + Option candidatesCount = default; + Option?> listOfCandidates = default; + Option baseLineBottom = default; + Option baseLineTop = default; + Option reserved = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "SymbolRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + symbolRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "CandidatesCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + candidatesCount = new Option(utf8JsonReader.GetDecimal()); + break; + case "ListOfCandidates": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listOfCandidates = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "BaseLineBottom": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + baseLineBottom = new Option(utf8JsonReader.GetInt32()); + break; + case "BaseLineTop": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + baseLineTop = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!symbolRect.IsSet) + throw new ArgumentException("Property is required for class SymbolRecognitionResult.", nameof(symbolRect)); + + if (!candidatesCount.IsSet) + throw new ArgumentException("Property is required for class SymbolRecognitionResult.", nameof(candidatesCount)); + + if (!listOfCandidates.IsSet) + throw new ArgumentException("Property is required for class SymbolRecognitionResult.", nameof(listOfCandidates)); + + if (symbolRect.IsSet && symbolRect.Value == null) + throw new ArgumentNullException(nameof(symbolRect), "Property is not nullable for class SymbolRecognitionResult."); + + if (candidatesCount.IsSet && candidatesCount.Value == null) + throw new ArgumentNullException(nameof(candidatesCount), "Property is not nullable for class SymbolRecognitionResult."); + + if (listOfCandidates.IsSet && listOfCandidates.Value == null) + throw new ArgumentNullException(nameof(listOfCandidates), "Property is not nullable for class SymbolRecognitionResult."); + + if (baseLineBottom.IsSet && baseLineBottom.Value == null) + throw new ArgumentNullException(nameof(baseLineBottom), "Property is not nullable for class SymbolRecognitionResult."); + + if (baseLineTop.IsSet && baseLineTop.Value == null) + throw new ArgumentNullException(nameof(baseLineTop), "Property is not nullable for class SymbolRecognitionResult."); + + if (reserved.IsSet && reserved.Value == null) + throw new ArgumentNullException(nameof(reserved), "Property is not nullable for class SymbolRecognitionResult."); + + return new SymbolRecognitionResult(symbolRect.Value!, candidatesCount.Value!.Value!, listOfCandidates.Value!, baseLineBottom, baseLineTop, reserved); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, SymbolRecognitionResult symbolRecognitionResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SymbolRect != null) - hashCode = hashCode * 59 + this.SymbolRect.GetHashCode(); - if (this.ListOfCandidates != null) - hashCode = hashCode * 59 + this.ListOfCandidates.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, symbolRecognitionResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, SymbolRecognitionResult symbolRecognitionResult, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (symbolRecognitionResult.SymbolRect == null) + throw new ArgumentNullException(nameof(symbolRecognitionResult.SymbolRect), "Property is required for class SymbolRecognitionResult."); + + if (symbolRecognitionResult.ListOfCandidates == null) + throw new ArgumentNullException(nameof(symbolRecognitionResult.ListOfCandidates), "Property is required for class SymbolRecognitionResult."); + + writer.WritePropertyName("SymbolRect"); + JsonSerializer.Serialize(writer, symbolRecognitionResult.SymbolRect, jsonSerializerOptions); + writer.WriteNumber("CandidatesCount", symbolRecognitionResult.CandidatesCount); + + writer.WritePropertyName("ListOfCandidates"); + JsonSerializer.Serialize(writer, symbolRecognitionResult.ListOfCandidates, jsonSerializerOptions); + if (symbolRecognitionResult.BaseLineBottomOption.IsSet) + writer.WriteNumber("BaseLineBottom", symbolRecognitionResult.BaseLineBottomOption.Value!.Value); + + if (symbolRecognitionResult.BaseLineTopOption.IsSet) + writer.WriteNumber("BaseLineTop", symbolRecognitionResult.BaseLineTopOption.Value!.Value); + + if (symbolRecognitionResult.ReservedOption.IsSet) + writer.WriteNumber("Reserved", symbolRecognitionResult.ReservedOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TBinaryData.cs b/src/Regula.DocumentReader.WebClient/Model/TBinaryData.cs deleted file mode 100644 index 1e30237..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/TBinaryData.cs +++ /dev/null @@ -1,172 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// Container for extracted text fields. Fields are identified by type and language - /// - [DataContract] - public partial class TBinaryData : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// fieldType. - /// fieldName. - /// bufLength. - /// buffer. - public TBinaryData(int fieldType = default(int), string fieldName = default(string), int bufLength = default(int), byte[] buffer = default(byte[])) - { - this.FieldType = fieldType; - this.FieldName = fieldName; - this.BufLength = bufLength; - this.Buffer = buffer; - } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name="FieldType", EmitDefaultValue=false)] - public int FieldType { get; set; } - - /// - /// Gets or Sets FieldName - /// - [DataMember(Name="FieldName", EmitDefaultValue=false)] - public string FieldName { get; set; } - - /// - /// Gets or Sets BufLength - /// - [DataMember(Name="Buf_Length", EmitDefaultValue=false)] - public int BufLength { get; set; } - - /// - /// Gets or Sets Buffer - /// - [DataMember(Name="Buffer", EmitDefaultValue=false)] - public byte[] Buffer { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TBinaryData {\n"); - sb.Append(" FieldType: ").Append(FieldType).Append("\n"); - sb.Append(" FieldName: ").Append(FieldName).Append("\n"); - sb.Append(" BufLength: ").Append(BufLength).Append("\n"); - sb.Append(" Buffer: ").Append(Buffer).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TBinaryData); - } - - /// - /// Returns true if TBinaryData instances are equal - /// - /// Instance of TBinaryData to be compared - /// Boolean - public bool Equals(TBinaryData input) - { - if (input == null) - return false; - - return - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ) && - ( - this.FieldName == input.FieldName || - (this.FieldName != null && - this.FieldName.Equals(input.FieldName)) - ) && - ( - this.BufLength == input.BufLength || - (this.BufLength != null && - this.BufLength.Equals(input.BufLength)) - ) && - ( - this.Buffer == input.Buffer || - (this.Buffer != null && - this.Buffer.Equals(input.Buffer)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FieldType != null) - hashCode = hashCode * 59 + this.FieldType.GetHashCode(); - if (this.FieldName != null) - hashCode = hashCode * 59 + this.FieldName.GetHashCode(); - if (this.BufLength != null) - hashCode = hashCode * 59 + this.BufLength.GetHashCode(); - if (this.Buffer != null) - hashCode = hashCode * 59 + this.Buffer.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs new file mode 100644 index 0000000..825b6ff --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs @@ -0,0 +1,204 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// TDocBinaryInfo + /// + public partial class TDocBinaryInfo : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// rFIDBINARYDATA + /// rFIDRAWDATA + [JsonConstructor] + public TDocBinaryInfo(Option rFIDBINARYDATA = default, Option?> rFIDRAWDATA = default) + { + RFID_BINARY_DATAOption = rFIDBINARYDATA; + RFID_RAW_DATAOption = rFIDRAWDATA; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Used to track the state of RFID_BINARY_DATA + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RFID_BINARY_DATAOption { get; private set; } + + /// + /// Gets or Sets RFID_BINARY_DATA + /// + [JsonPropertyName("RFID_BINARY_DATA")] + public BinaryData? RFID_BINARY_DATA { get { return this.RFID_BINARY_DATAOption; } set { this.RFID_BINARY_DATAOption = new(value); } } + + /// + /// Used to track the state of RFID_RAW_DATA + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> RFID_RAW_DATAOption { get; private set; } + + /// + /// Gets or Sets RFID_RAW_DATA + /// + [JsonPropertyName("RFID_RAW_DATA")] + public List? RFID_RAW_DATA { get { return this.RFID_RAW_DATAOption; } set { this.RFID_RAW_DATAOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TDocBinaryInfo {\n"); + sb.Append(" RFID_BINARY_DATA: ").Append(RFID_BINARY_DATA).Append("\n"); + sb.Append(" RFID_RAW_DATA: ").Append(RFID_RAW_DATA).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TDocBinaryInfoJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TDocBinaryInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option rFIDBINARYDATA = default; + Option?> rFIDRAWDATA = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RFID_BINARY_DATA": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDBINARYDATA = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "RFID_RAW_DATA": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDRAWDATA = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (rFIDBINARYDATA.IsSet && rFIDBINARYDATA.Value == null) + throw new ArgumentNullException(nameof(rFIDBINARYDATA), "Property is not nullable for class TDocBinaryInfo."); + + if (rFIDRAWDATA.IsSet && rFIDRAWDATA.Value == null) + throw new ArgumentNullException(nameof(rFIDRAWDATA), "Property is not nullable for class TDocBinaryInfo."); + + return new TDocBinaryInfo(rFIDBINARYDATA, rFIDRAWDATA); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TDocBinaryInfo tDocBinaryInfo, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, tDocBinaryInfo, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TDocBinaryInfo tDocBinaryInfo, JsonSerializerOptions jsonSerializerOptions) + { + if (tDocBinaryInfo.RFID_BINARY_DATAOption.IsSet && tDocBinaryInfo.RFID_BINARY_DATA == null) + throw new ArgumentNullException(nameof(tDocBinaryInfo.RFID_BINARY_DATA), "Property is required for class TDocBinaryInfo."); + + if (tDocBinaryInfo.RFID_RAW_DATAOption.IsSet && tDocBinaryInfo.RFID_RAW_DATA == null) + throw new ArgumentNullException(nameof(tDocBinaryInfo.RFID_RAW_DATA), "Property is required for class TDocBinaryInfo."); + + if (tDocBinaryInfo.RFID_BINARY_DATAOption.IsSet) + { + writer.WritePropertyName("RFID_BINARY_DATA"); + JsonSerializer.Serialize(writer, tDocBinaryInfo.RFID_BINARY_DATA, jsonSerializerOptions); + } + if (tDocBinaryInfo.RFID_RAW_DATAOption.IsSet) + { + writer.WritePropertyName("RFID_RAW_DATA"); + JsonSerializer.Serialize(writer, tDocBinaryInfo.RFID_RAW_DATA, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs new file mode 100644 index 0000000..11a5417 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// TDocBinaryInfoItem + /// + public partial class TDocBinaryInfoItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// tDocBinaryInfo + [JsonConstructor] + public TDocBinaryInfoItem(TDocBinaryInfo tDocBinaryInfo) + { + TDocBinaryInfo = tDocBinaryInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets TDocBinaryInfo + /// + [JsonPropertyName("TDocBinaryInfo")] + public TDocBinaryInfo TDocBinaryInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TDocBinaryInfoItem {\n"); + sb.Append(" TDocBinaryInfo: ").Append(TDocBinaryInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TDocBinaryInfoItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TDocBinaryInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option tDocBinaryInfo = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "TDocBinaryInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + tDocBinaryInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!tDocBinaryInfo.IsSet) + throw new ArgumentException("Property is required for class TDocBinaryInfoItem.", nameof(tDocBinaryInfo)); + + if (tDocBinaryInfo.IsSet && tDocBinaryInfo.Value == null) + throw new ArgumentNullException(nameof(tDocBinaryInfo), "Property is not nullable for class TDocBinaryInfoItem."); + + return new TDocBinaryInfoItem(tDocBinaryInfo.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TDocBinaryInfoItem tDocBinaryInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, tDocBinaryInfoItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TDocBinaryInfoItem tDocBinaryInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + if (tDocBinaryInfoItem.TDocBinaryInfo == null) + throw new ArgumentNullException(nameof(tDocBinaryInfoItem.TDocBinaryInfo), "Property is required for class TDocBinaryInfoItem."); + + writer.WritePropertyName("TDocBinaryInfo"); + JsonSerializer.Serialize(writer, tDocBinaryInfoItem.TDocBinaryInfo, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphics.cs b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphics.cs deleted file mode 100644 index 587b18b..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphics.cs +++ /dev/null @@ -1,236 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// TOriginalRFIDGraphics - /// - [DataContract] - public partial class TOriginalRFIDGraphics : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// fieldType. - /// graphicsType. - /// rFIDOriginDG. - /// rFIDOriginDGTag. - /// rFIDOriginTagEntry. - /// rFIDOriginEntryView. - /// bufLength. - /// buffer. - public TOriginalRFIDGraphics(int fieldType = default(int), int graphicsType = default(int), int rFIDOriginDG = default(int), int rFIDOriginDGTag = default(int), int rFIDOriginTagEntry = default(int), int rFIDOriginEntryView = default(int), int bufLength = default(int), byte[] buffer = default(byte[])) - { - this.FieldType = fieldType; - this.GraphicsType = graphicsType; - this.RFIDOriginDG = rFIDOriginDG; - this.RFIDOriginDGTag = rFIDOriginDGTag; - this.RFIDOriginTagEntry = rFIDOriginTagEntry; - this.RFIDOriginEntryView = rFIDOriginEntryView; - this.BufLength = bufLength; - this.Buffer = buffer; - } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name="FieldType", EmitDefaultValue=false)] - public int FieldType { get; set; } - - /// - /// Gets or Sets GraphicsType - /// - [DataMember(Name="GraphicsType", EmitDefaultValue=false)] - public int GraphicsType { get; set; } - - /// - /// Gets or Sets RFIDOriginDG - /// - [DataMember(Name="RFID_OriginDG", EmitDefaultValue=false)] - public int RFIDOriginDG { get; set; } - - /// - /// Gets or Sets RFIDOriginDGTag - /// - [DataMember(Name="RFID_OriginDGTag", EmitDefaultValue=false)] - public int RFIDOriginDGTag { get; set; } - - /// - /// Gets or Sets RFIDOriginTagEntry - /// - [DataMember(Name="RFID_OriginTagEntry", EmitDefaultValue=false)] - public int RFIDOriginTagEntry { get; set; } - - /// - /// Gets or Sets RFIDOriginEntryView - /// - [DataMember(Name="RFID_OriginEntryView", EmitDefaultValue=false)] - public int RFIDOriginEntryView { get; set; } - - /// - /// Gets or Sets BufLength - /// - [DataMember(Name="Buf_Length", EmitDefaultValue=false)] - public int BufLength { get; set; } - - /// - /// Gets or Sets Buffer - /// - [DataMember(Name="Buffer", EmitDefaultValue=false)] - public byte[] Buffer { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TOriginalRFIDGraphics {\n"); - sb.Append(" FieldType: ").Append(FieldType).Append("\n"); - sb.Append(" GraphicsType: ").Append(GraphicsType).Append("\n"); - sb.Append(" RFIDOriginDG: ").Append(RFIDOriginDG).Append("\n"); - sb.Append(" RFIDOriginDGTag: ").Append(RFIDOriginDGTag).Append("\n"); - sb.Append(" RFIDOriginTagEntry: ").Append(RFIDOriginTagEntry).Append("\n"); - sb.Append(" RFIDOriginEntryView: ").Append(RFIDOriginEntryView).Append("\n"); - sb.Append(" BufLength: ").Append(BufLength).Append("\n"); - sb.Append(" Buffer: ").Append(Buffer).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TOriginalRFIDGraphics); - } - - /// - /// Returns true if TOriginalRFIDGraphics instances are equal - /// - /// Instance of TOriginalRFIDGraphics to be compared - /// Boolean - public bool Equals(TOriginalRFIDGraphics input) - { - if (input == null) - return false; - - return - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ) && - ( - this.GraphicsType == input.GraphicsType || - (this.GraphicsType != null && - this.GraphicsType.Equals(input.GraphicsType)) - ) && - ( - this.RFIDOriginDG == input.RFIDOriginDG || - (this.RFIDOriginDG != null && - this.RFIDOriginDG.Equals(input.RFIDOriginDG)) - ) && - ( - this.RFIDOriginDGTag == input.RFIDOriginDGTag || - (this.RFIDOriginDGTag != null && - this.RFIDOriginDGTag.Equals(input.RFIDOriginDGTag)) - ) && - ( - this.RFIDOriginTagEntry == input.RFIDOriginTagEntry || - (this.RFIDOriginTagEntry != null && - this.RFIDOriginTagEntry.Equals(input.RFIDOriginTagEntry)) - ) && - ( - this.RFIDOriginEntryView == input.RFIDOriginEntryView || - (this.RFIDOriginEntryView != null && - this.RFIDOriginEntryView.Equals(input.RFIDOriginEntryView)) - ) && - ( - this.BufLength == input.BufLength || - (this.BufLength != null && - this.BufLength.Equals(input.BufLength)) - ) && - ( - this.Buffer == input.Buffer || - (this.Buffer != null && - this.Buffer.Equals(input.Buffer)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FieldType != null) - hashCode = hashCode * 59 + this.FieldType.GetHashCode(); - if (this.GraphicsType != null) - hashCode = hashCode * 59 + this.GraphicsType.GetHashCode(); - if (this.RFIDOriginDG != null) - hashCode = hashCode * 59 + this.RFIDOriginDG.GetHashCode(); - if (this.RFIDOriginDGTag != null) - hashCode = hashCode * 59 + this.RFIDOriginDGTag.GetHashCode(); - if (this.RFIDOriginTagEntry != null) - hashCode = hashCode * 59 + this.RFIDOriginTagEntry.GetHashCode(); - if (this.RFIDOriginEntryView != null) - hashCode = hashCode * 59 + this.RFIDOriginEntryView.GetHashCode(); - if (this.BufLength != null) - hashCode = hashCode * 59 + this.BufLength.GetHashCode(); - if (this.Buffer != null) - hashCode = hashCode * 59 + this.Buffer.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs new file mode 100644 index 0000000..7a18e9a --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// TOriginalRFIDGraphicsInfo + /// + public partial class TOriginalRFIDGraphicsInfo : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// rFIDORIGINALGRAPHDATA + [JsonConstructor] + public TOriginalRFIDGraphicsInfo(List rFIDORIGINALGRAPHDATA) + { + RFID_ORIGINAL_GRAPH_DATA = rFIDORIGINALGRAPHDATA; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets RFID_ORIGINAL_GRAPH_DATA + /// + [JsonPropertyName("RFID_ORIGINAL_GRAPH_DATA")] + public List RFID_ORIGINAL_GRAPH_DATA { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TOriginalRFIDGraphicsInfo {\n"); + sb.Append(" RFID_ORIGINAL_GRAPH_DATA: ").Append(RFID_ORIGINAL_GRAPH_DATA).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TOriginalRFIDGraphicsInfoJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TOriginalRFIDGraphicsInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option?> rFIDORIGINALGRAPHDATA = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "RFID_ORIGINAL_GRAPH_DATA": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rFIDORIGINALGRAPHDATA = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!rFIDORIGINALGRAPHDATA.IsSet) + throw new ArgumentException("Property is required for class TOriginalRFIDGraphicsInfo.", nameof(rFIDORIGINALGRAPHDATA)); + + if (rFIDORIGINALGRAPHDATA.IsSet && rFIDORIGINALGRAPHDATA.Value == null) + throw new ArgumentNullException(nameof(rFIDORIGINALGRAPHDATA), "Property is not nullable for class TOriginalRFIDGraphicsInfo."); + + return new TOriginalRFIDGraphicsInfo(rFIDORIGINALGRAPHDATA.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, tOriginalRFIDGraphicsInfo, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo, JsonSerializerOptions jsonSerializerOptions) + { + if (tOriginalRFIDGraphicsInfo.RFID_ORIGINAL_GRAPH_DATA == null) + throw new ArgumentNullException(nameof(tOriginalRFIDGraphicsInfo.RFID_ORIGINAL_GRAPH_DATA), "Property is required for class TOriginalRFIDGraphicsInfo."); + + writer.WritePropertyName("RFID_ORIGINAL_GRAPH_DATA"); + JsonSerializer.Serialize(writer, tOriginalRFIDGraphicsInfo.RFID_ORIGINAL_GRAPH_DATA, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs new file mode 100644 index 0000000..111123b --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// TOriginalRFIDGraphicsInfoItem + /// + public partial class TOriginalRFIDGraphicsInfoItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// tOriginalRFIDGraphicsInfo + [JsonConstructor] + public TOriginalRFIDGraphicsInfoItem(TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo) + { + TOriginalRFIDGraphicsInfo = tOriginalRFIDGraphicsInfo; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets TOriginalRFIDGraphicsInfo + /// + [JsonPropertyName("TOriginalRFIDGraphicsInfo")] + public TOriginalRFIDGraphicsInfo TOriginalRFIDGraphicsInfo { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TOriginalRFIDGraphicsInfoItem {\n"); + sb.Append(" TOriginalRFIDGraphicsInfo: ").Append(TOriginalRFIDGraphicsInfo).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TOriginalRFIDGraphicsInfoItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TOriginalRFIDGraphicsInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option tOriginalRFIDGraphicsInfo = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "TOriginalRFIDGraphicsInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + tOriginalRFIDGraphicsInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!tOriginalRFIDGraphicsInfo.IsSet) + throw new ArgumentException("Property is required for class TOriginalRFIDGraphicsInfoItem.", nameof(tOriginalRFIDGraphicsInfo)); + + if (tOriginalRFIDGraphicsInfo.IsSet && tOriginalRFIDGraphicsInfo.Value == null) + throw new ArgumentNullException(nameof(tOriginalRFIDGraphicsInfo), "Property is not nullable for class TOriginalRFIDGraphicsInfoItem."); + + return new TOriginalRFIDGraphicsInfoItem(tOriginalRFIDGraphicsInfo.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TOriginalRFIDGraphicsInfoItem tOriginalRFIDGraphicsInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, tOriginalRFIDGraphicsInfoItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TOriginalRFIDGraphicsInfoItem tOriginalRFIDGraphicsInfoItem, JsonSerializerOptions jsonSerializerOptions) + { + if (tOriginalRFIDGraphicsInfoItem.TOriginalRFIDGraphicsInfo == null) + throw new ArgumentNullException(nameof(tOriginalRFIDGraphicsInfoItem.TOriginalRFIDGraphicsInfo), "Property is required for class TOriginalRFIDGraphicsInfoItem."); + + writer.WritePropertyName("TOriginalRFIDGraphicsInfo"); + JsonSerializer.Serialize(writer, tOriginalRFIDGraphicsInfoItem.TOriginalRFIDGraphicsInfo, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/Text.cs b/src/Regula.DocumentReader.WebClient/Model/Text.cs index 8a261e4..ac9a1ae 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Text.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Text.cs @@ -1,130 +1,93 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains all document text fields data with validity and cross-source compare checks /// - [DataContract] - public partial class Text : IEquatable, IValidatableObject + public partial class Text : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected Text() { } - /// - /// Initializes a new instance of the class. - /// - /// status (required). - /// validityStatus (required). - /// comparisonStatus (required). - /// fieldList (required). - /// availableSourceList (required). - public Text(int status = default(int), int validityStatus = default(int), int comparisonStatus = default(int), List fieldList = default(List), List availableSourceList = default(List)) + /// status + /// validityStatus + /// comparisonStatus + /// Date format + /// fieldList + /// availableSourceList + [JsonConstructor] + public Text(CheckResult status, CheckResult validityStatus, CheckResult comparisonStatus, string dateFormat, List fieldList, List availableSourceList) { - // to ensure "status" is required (not null) - if (status == null) - { - throw new InvalidDataException("status is a required property for Text and cannot be null"); - } - else - { - this.Status = status; - } - - // to ensure "validityStatus" is required (not null) - if (validityStatus == null) - { - throw new InvalidDataException("validityStatus is a required property for Text and cannot be null"); - } - else - { - this.ValidityStatus = validityStatus; - } - - // to ensure "comparisonStatus" is required (not null) - if (comparisonStatus == null) - { - throw new InvalidDataException("comparisonStatus is a required property for Text and cannot be null"); - } - else - { - this.ComparisonStatus = comparisonStatus; - } - - // to ensure "fieldList" is required (not null) - if (fieldList == null) - { - throw new InvalidDataException("fieldList is a required property for Text and cannot be null"); - } - else - { - this.FieldList = fieldList; - } - - // to ensure "availableSourceList" is required (not null) - if (availableSourceList == null) - { - throw new InvalidDataException("availableSourceList is a required property for Text and cannot be null"); - } - else - { - this.AvailableSourceList = availableSourceList; - } - + Status = status; + ValidityStatus = validityStatus; + ComparisonStatus = comparisonStatus; + DateFormat = dateFormat; + FieldList = fieldList; + AvailableSourceList = availableSourceList; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Status /// - [DataMember(Name="status", EmitDefaultValue=true)] - public int Status { get; set; } + [JsonPropertyName("status")] + public CheckResult Status { get; set; } /// /// Gets or Sets ValidityStatus /// - [DataMember(Name="validityStatus", EmitDefaultValue=true)] - public int ValidityStatus { get; set; } + [JsonPropertyName("validityStatus")] + public CheckResult ValidityStatus { get; set; } /// /// Gets or Sets ComparisonStatus /// - [DataMember(Name="comparisonStatus", EmitDefaultValue=true)] - public int ComparisonStatus { get; set; } + [JsonPropertyName("comparisonStatus")] + public CheckResult ComparisonStatus { get; set; } + + /// + /// Date format + /// + /// Date format + [JsonPropertyName("dateFormat")] + public string DateFormat { get; set; } /// /// Gets or Sets FieldList /// - [DataMember(Name="fieldList", EmitDefaultValue=true)] + [JsonPropertyName("fieldList")] public List FieldList { get; set; } /// /// Gets or Sets AvailableSourceList /// - [DataMember(Name="availableSourceList", EmitDefaultValue=true)] + [JsonPropertyName("availableSourceList")] public List AvailableSourceList { get; set; } /// @@ -133,108 +96,192 @@ protected Text() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class Text {\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" ValidityStatus: ").Append(ValidityStatus).Append("\n"); sb.Append(" ComparisonStatus: ").Append(ComparisonStatus).Append("\n"); + sb.Append(" DateFormat: ").Append(DateFormat).Append("\n"); sb.Append(" FieldList: ").Append(FieldList).Append("\n"); sb.Append(" AvailableSourceList: ").Append(AvailableSourceList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as Text); + yield break; } + } + /// + /// A Json converter for type + /// + public class TextJsonConverter : JsonConverter + { /// - /// Returns true if Text instances are equal + /// Deserializes json to /// - /// Instance of Text to be compared - /// Boolean - public bool Equals(Text input) + /// + /// + /// + /// + /// + public override Text Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.ValidityStatus == input.ValidityStatus || - (this.ValidityStatus != null && - this.ValidityStatus.Equals(input.ValidityStatus)) - ) && - ( - this.ComparisonStatus == input.ComparisonStatus || - (this.ComparisonStatus != null && - this.ComparisonStatus.Equals(input.ComparisonStatus)) - ) && - ( - this.FieldList == input.FieldList || - this.FieldList != null && - input.FieldList != null && - this.FieldList.SequenceEqual(input.FieldList) - ) && - ( - this.AvailableSourceList == input.AvailableSourceList || - this.AvailableSourceList != null && - input.AvailableSourceList != null && - this.AvailableSourceList.SequenceEqual(input.AvailableSourceList) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option status = default; + Option validityStatus = default; + Option comparisonStatus = default; + Option dateFormat = default; + Option?> fieldList = default; + Option?> availableSourceList = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "status": + string? statusRawValue = utf8JsonReader.GetString(); + if (statusRawValue != null) + status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); + break; + case "validityStatus": + string? validityStatusRawValue = utf8JsonReader.GetString(); + if (validityStatusRawValue != null) + validityStatus = new Option(CheckResultValueConverter.FromStringOrDefault(validityStatusRawValue)); + break; + case "comparisonStatus": + string? comparisonStatusRawValue = utf8JsonReader.GetString(); + if (comparisonStatusRawValue != null) + comparisonStatus = new Option(CheckResultValueConverter.FromStringOrDefault(comparisonStatusRawValue)); + break; + case "dateFormat": + dateFormat = new Option(utf8JsonReader.GetString()!); + break; + case "fieldList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "availableSourceList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + availableSourceList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!status.IsSet) + throw new ArgumentException("Property is required for class Text.", nameof(status)); + + if (!validityStatus.IsSet) + throw new ArgumentException("Property is required for class Text.", nameof(validityStatus)); + + if (!comparisonStatus.IsSet) + throw new ArgumentException("Property is required for class Text.", nameof(comparisonStatus)); + + if (!dateFormat.IsSet) + throw new ArgumentException("Property is required for class Text.", nameof(dateFormat)); + + if (!fieldList.IsSet) + throw new ArgumentException("Property is required for class Text.", nameof(fieldList)); + + if (!availableSourceList.IsSet) + throw new ArgumentException("Property is required for class Text.", nameof(availableSourceList)); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class Text."); + + if (validityStatus.IsSet && validityStatus.Value == null) + throw new ArgumentNullException(nameof(validityStatus), "Property is not nullable for class Text."); + + if (comparisonStatus.IsSet && comparisonStatus.Value == null) + throw new ArgumentNullException(nameof(comparisonStatus), "Property is not nullable for class Text."); + + if (dateFormat.IsSet && dateFormat.Value == null) + throw new ArgumentNullException(nameof(dateFormat), "Property is not nullable for class Text."); + + if (fieldList.IsSet && fieldList.Value == null) + throw new ArgumentNullException(nameof(fieldList), "Property is not nullable for class Text."); + + if (availableSourceList.IsSet && availableSourceList.Value == null) + throw new ArgumentNullException(nameof(availableSourceList), "Property is not nullable for class Text."); + + return new Text(status.Value!.Value!, validityStatus.Value!.Value!, comparisonStatus.Value!.Value!, dateFormat.Value!, fieldList.Value!, availableSourceList.Value!); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Text text, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.ValidityStatus != null) - hashCode = hashCode * 59 + this.ValidityStatus.GetHashCode(); - if (this.ComparisonStatus != null) - hashCode = hashCode * 59 + this.ComparisonStatus.GetHashCode(); - if (this.FieldList != null) - hashCode = hashCode * 59 + this.FieldList.GetHashCode(); - if (this.AvailableSourceList != null) - hashCode = hashCode * 59 + this.AvailableSourceList.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, text, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, Text text, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (text.DateFormat == null) + throw new ArgumentNullException(nameof(text.DateFormat), "Property is required for class Text."); + + if (text.FieldList == null) + throw new ArgumentNullException(nameof(text.FieldList), "Property is required for class Text."); + + if (text.AvailableSourceList == null) + throw new ArgumentNullException(nameof(text.AvailableSourceList), "Property is required for class Text."); + + var statusRawValue = CheckResultValueConverter.ToJsonValue(text.Status); + writer.WriteNumber("status", statusRawValue); + + var validityStatusRawValue = CheckResultValueConverter.ToJsonValue(text.ValidityStatus); + writer.WriteNumber("validityStatus", validityStatusRawValue); + + var comparisonStatusRawValue = CheckResultValueConverter.ToJsonValue(text.ComparisonStatus); + writer.WriteNumber("comparisonStatus", comparisonStatusRawValue); + + writer.WriteString("dateFormat", text.DateFormat); + + writer.WritePropertyName("fieldList"); + JsonSerializer.Serialize(writer, text.FieldList, jsonSerializerOptions); + writer.WritePropertyName("availableSourceList"); + JsonSerializer.Serialize(writer, text.AvailableSourceList, jsonSerializerOptions); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs index eceff7d..1d956e8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs @@ -1,97 +1,77 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// TextAvailableSource /// - [DataContract] - public partial class TextAvailableSource : IEquatable, IValidatableObject + public partial class TextAvailableSource : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TextAvailableSource() { } - /// - /// Initializes a new instance of the class. - /// - /// source (required). - /// validityStatus (required). - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0). - public TextAvailableSource(string source = default(string), int validityStatus = default(int), int containerType = 0) + /// source + /// validityStatus + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0) + [JsonConstructor] + public TextAvailableSource(Source source, CheckResult validityStatus, Option containerType = default) { - // to ensure "source" is required (not null) - if (source == null) - { - throw new InvalidDataException("source is a required property for TextAvailableSource and cannot be null"); - } - else - { - this.Source = source; - } - - // to ensure "validityStatus" is required (not null) - if (validityStatus == null) - { - throw new InvalidDataException("validityStatus is a required property for TextAvailableSource and cannot be null"); - } - else - { - this.ValidityStatus = validityStatus; - } - - // use default value if no "containerType" provided - if (containerType == null) - { - this.ContainerType = 0; - } - else - { - this.ContainerType = containerType; - } + Source = source; + ValidityStatus = validityStatus; + ContainerTypeOption = containerType; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Source /// - [DataMember(Name="source", EmitDefaultValue=true)] - public string Source { get; set; } + [JsonPropertyName("source")] + public Source Source { get; set; } /// /// Gets or Sets ValidityStatus /// - [DataMember(Name="validityStatus", EmitDefaultValue=true)] - public int ValidityStatus { get; set; } + [JsonPropertyName("validityStatus")] + public CheckResult ValidityStatus { get; set; } + + /// + /// Used to track the state of ContainerType + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ContainerTypeOption { get; private set; } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [DataMember(Name="containerType", EmitDefaultValue=false)] - public int ContainerType { get; set; } + [JsonPropertyName("containerType")] + public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new(value); } } /// /// Returns the string presentation of the object @@ -99,7 +79,7 @@ protected TextAvailableSource() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TextAvailableSource {\n"); sb.Append(" Source: ").Append(Source).Append("\n"); sb.Append(" ValidityStatus: ").Append(ValidityStatus).Append("\n"); @@ -107,82 +87,129 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as TextAvailableSource); + yield break; } + } + /// + /// A Json converter for type + /// + public class TextAvailableSourceJsonConverter : JsonConverter + { /// - /// Returns true if TextAvailableSource instances are equal + /// Deserializes json to /// - /// Instance of TextAvailableSource to be compared - /// Boolean - public bool Equals(TextAvailableSource input) + /// + /// + /// + /// + /// + public override TextAvailableSource Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && - ( - this.ValidityStatus == input.ValidityStatus || - (this.ValidityStatus != null && - this.ValidityStatus.Equals(input.ValidityStatus)) - ) && - ( - this.ContainerType == input.ContainerType || - (this.ContainerType != null && - this.ContainerType.Equals(input.ContainerType)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option source = default; + Option validityStatus = default; + Option containerType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "source": + string? sourceRawValue = utf8JsonReader.GetString(); + if (sourceRawValue != null) + source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); + break; + case "validityStatus": + string? validityStatusRawValue = utf8JsonReader.GetString(); + if (validityStatusRawValue != null) + validityStatus = new Option(CheckResultValueConverter.FromStringOrDefault(validityStatusRawValue)); + break; + case "containerType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + containerType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!source.IsSet) + throw new ArgumentException("Property is required for class TextAvailableSource.", nameof(source)); + + if (!validityStatus.IsSet) + throw new ArgumentException("Property is required for class TextAvailableSource.", nameof(validityStatus)); + + if (source.IsSet && source.Value == null) + throw new ArgumentNullException(nameof(source), "Property is not nullable for class TextAvailableSource."); + + if (validityStatus.IsSet && validityStatus.Value == null) + throw new ArgumentNullException(nameof(validityStatus), "Property is not nullable for class TextAvailableSource."); + + if (containerType.IsSet && containerType.Value == null) + throw new ArgumentNullException(nameof(containerType), "Property is not nullable for class TextAvailableSource."); + + return new TextAvailableSource(source.Value!.Value!, validityStatus.Value!.Value!, containerType); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextAvailableSource textAvailableSource, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.ValidityStatus != null) - hashCode = hashCode * 59 + this.ValidityStatus.GetHashCode(); - if (this.ContainerType != null) - hashCode = hashCode * 59 + this.ContainerType.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, textAvailableSource, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TextAvailableSource textAvailableSource, JsonSerializerOptions jsonSerializerOptions) { - yield break; + var sourceRawValue = SourceValueConverter.ToJsonValue(textAvailableSource.Source); + writer.WriteString("source", sourceRawValue); + + var validityStatusRawValue = CheckResultValueConverter.ToJsonValue(textAvailableSource.ValidityStatus); + writer.WriteNumber("validityStatus", validityStatusRawValue); + + if (textAvailableSource.ContainerTypeOption.IsSet) + writer.WriteNumber("containerType", textAvailableSource.ContainerTypeOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs index f808835..a6ff408 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs @@ -1,53 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// Text fields extracted from one document source. Contains results of specific source for each provided page. /// - [DataContract] - public partial class TextDataResult : ResultItem, IEquatable, IValidatableObject + public partial class TextDataResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TextDataResult() { } - /// - /// Initializes a new instance of the class. - /// - /// docVisualExtendedInfo. - public TextDataResult(DocVisualExtendedInfo docVisualExtendedInfo = default(DocVisualExtendedInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// docVisualExtendedInfo + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public TextDataResult(DocVisualExtendedInfo docVisualExtendedInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - this.DocVisualExtendedInfo = docVisualExtendedInfo; + DocVisualExtendedInfo = docVisualExtendedInfo; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets DocVisualExtendedInfo /// - [DataMember(Name="DocVisualExtendedInfo", EmitDefaultValue=false)] + [JsonPropertyName("DocVisualExtendedInfo")] public DocVisualExtendedInfo DocVisualExtendedInfo { get; set; } /// @@ -56,76 +59,158 @@ protected TextDataResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TextDataResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" DocVisualExtendedInfo: ").Append(DocVisualExtendedInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class TextDataResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override TextDataResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as TextDataResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if TextDataResult instances are equal - /// - /// Instance of TextDataResult to be compared - /// Boolean - public bool Equals(TextDataResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.DocVisualExtendedInfo == input.DocVisualExtendedInfo || - (this.DocVisualExtendedInfo != null && - this.DocVisualExtendedInfo.Equals(input.DocVisualExtendedInfo)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option docVisualExtendedInfo = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "DocVisualExtendedInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + docVisualExtendedInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!docVisualExtendedInfo.IsSet) + throw new ArgumentException("Property is required for class TextDataResult.", nameof(docVisualExtendedInfo)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class TextDataResult.", nameof(resultType)); + + if (docVisualExtendedInfo.IsSet && docVisualExtendedInfo.Value == null) + throw new ArgumentNullException(nameof(docVisualExtendedInfo), "Property is not nullable for class TextDataResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class TextDataResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class TextDataResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class TextDataResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class TextDataResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class TextDataResult."); + + return new TextDataResult(docVisualExtendedInfo.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextDataResult textDataResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.DocVisualExtendedInfo != null) - hashCode = hashCode * 59 + this.DocVisualExtendedInfo.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, textDataResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TextDataResult textDataResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (textDataResult.DocVisualExtendedInfo == null) + throw new ArgumentNullException(nameof(textDataResult.DocVisualExtendedInfo), "Property is required for class TextDataResult."); + + writer.WritePropertyName("DocVisualExtendedInfo"); + JsonSerializer.Serialize(writer, textDataResult.DocVisualExtendedInfo, jsonSerializerOptions); + if (textDataResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", textDataResult.BufLengthOption.Value!.Value); + + if (textDataResult.LightOption.IsSet) + writer.WriteNumber("light", textDataResult.LightOption.Value!.Value); + + if (textDataResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", textDataResult.ListIdxOption.Value!.Value); + + if (textDataResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", textDataResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", textDataResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextField.cs b/src/Regula.DocumentReader.WebClient/Model/TextField.cs index 5fd5184..1d38006 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextField.cs @@ -1,218 +1,152 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// TextField /// - [DataContract] - public partial class TextField : IEquatable, IValidatableObject + public partial class TextField : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TextField() { } - /// - /// Initializes a new instance of the class. - /// - /// fieldType (required). - /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. (required). - /// lcid. - /// status (required). - /// validityStatus (required). - /// comparisonStatus (required). - /// The most confidence value, selected from valueList (required). - /// valueList (required). - /// Validity of all field values for given source. If there are two values on different pages for one field-source pair, then validity also will include logical match checking. If such values do not match, validity will return error. (required). - /// comparisonList (required). - public TextField(int fieldType = default(int), string fieldName = default(string), int lcid = default(int), int status = default(int), int validityStatus = default(int), int comparisonStatus = default(int), string value = default(string), List valueList = default(List), List validityList = default(List), List comparisonList = default(List)) + /// fieldType + /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. + /// lcid + /// status + /// validityStatus + /// comparisonStatus + /// The most confidence value, selected from valueList + /// valueList + /// Validity of all field values for given source. If there are two values on different pages for one field-source pair, then validity also will include logical match checking. If such values do not match, validity will return error. + /// comparisonList + /// LCID name + [JsonConstructor] + public TextField(TextFieldType fieldType, string fieldName, LCID lcid, CheckResult status, CheckResult validityStatus, CheckResult comparisonStatus, string value, List valueList, List validityList, List comparisonList, Option lcidName = default) { - // to ensure "fieldType" is required (not null) - if (fieldType == null) - { - throw new InvalidDataException("fieldType is a required property for TextField and cannot be null"); - } - else - { - this.FieldType = fieldType; - } - - // to ensure "fieldName" is required (not null) - if (fieldName == null) - { - throw new InvalidDataException("fieldName is a required property for TextField and cannot be null"); - } - else - { - this.FieldName = fieldName; - } - - // to ensure "status" is required (not null) - if (status == null) - { - throw new InvalidDataException("status is a required property for TextField and cannot be null"); - } - else - { - this.Status = status; - } - - // to ensure "validityStatus" is required (not null) - if (validityStatus == null) - { - throw new InvalidDataException("validityStatus is a required property for TextField and cannot be null"); - } - else - { - this.ValidityStatus = validityStatus; - } - - // to ensure "comparisonStatus" is required (not null) - if (comparisonStatus == null) - { - throw new InvalidDataException("comparisonStatus is a required property for TextField and cannot be null"); - } - else - { - this.ComparisonStatus = comparisonStatus; - } - - // to ensure "value" is required (not null) - if (value == null) - { - throw new InvalidDataException("value is a required property for TextField and cannot be null"); - } - else - { - this.Value = value; - } - - // to ensure "valueList" is required (not null) - if (valueList == null) - { - throw new InvalidDataException("valueList is a required property for TextField and cannot be null"); - } - else - { - this.ValueList = valueList; - } - - // to ensure "validityList" is required (not null) - if (validityList == null) - { - throw new InvalidDataException("validityList is a required property for TextField and cannot be null"); - } - else - { - this.ValidityList = validityList; - } - - // to ensure "comparisonList" is required (not null) - if (comparisonList == null) - { - throw new InvalidDataException("comparisonList is a required property for TextField and cannot be null"); - } - else - { - this.ComparisonList = comparisonList; - } - - this.Lcid = lcid; + FieldType = fieldType; + FieldName = fieldName; + Lcid = lcid; + Status = status; + ValidityStatus = validityStatus; + ComparisonStatus = comparisonStatus; + Value = value; + ValueList = valueList; + ValidityList = validityList; + ComparisonList = comparisonList; + LcidNameOption = lcidName; + OnCreated(); } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name="fieldType", EmitDefaultValue=true)] - public int FieldType { get; set; } + + partial void OnCreated(); /// - /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. + /// Gets or Sets FieldType /// - /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. - [DataMember(Name="fieldName", EmitDefaultValue=true)] - public string FieldName { get; set; } + [JsonPropertyName("fieldType")] + public TextFieldType FieldType { get; set; } /// /// Gets or Sets Lcid /// - [DataMember(Name="lcid", EmitDefaultValue=false)] - public int Lcid { get; set; } + [JsonPropertyName("lcid")] + public LCID Lcid { get; set; } /// /// Gets or Sets Status /// - [DataMember(Name="status", EmitDefaultValue=true)] - public int Status { get; set; } + [JsonPropertyName("status")] + public CheckResult Status { get; set; } /// /// Gets or Sets ValidityStatus /// - [DataMember(Name="validityStatus", EmitDefaultValue=true)] - public int ValidityStatus { get; set; } + [JsonPropertyName("validityStatus")] + public CheckResult ValidityStatus { get; set; } /// /// Gets or Sets ComparisonStatus /// - [DataMember(Name="comparisonStatus", EmitDefaultValue=true)] - public int ComparisonStatus { get; set; } + [JsonPropertyName("comparisonStatus")] + public CheckResult ComparisonStatus { get; set; } + + /// + /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. + /// + /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. + [JsonPropertyName("fieldName")] + public string FieldName { get; set; } /// /// The most confidence value, selected from valueList /// /// The most confidence value, selected from valueList - [DataMember(Name="value", EmitDefaultValue=true)] + [JsonPropertyName("value")] public string Value { get; set; } /// /// Gets or Sets ValueList /// - [DataMember(Name="valueList", EmitDefaultValue=true)] + [JsonPropertyName("valueList")] public List ValueList { get; set; } /// /// Validity of all field values for given source. If there are two values on different pages for one field-source pair, then validity also will include logical match checking. If such values do not match, validity will return error. /// /// Validity of all field values for given source. If there are two values on different pages for one field-source pair, then validity also will include logical match checking. If such values do not match, validity will return error. - [DataMember(Name="validityList", EmitDefaultValue=true)] + [JsonPropertyName("validityList")] public List ValidityList { get; set; } /// /// Gets or Sets ComparisonList /// - [DataMember(Name="comparisonList", EmitDefaultValue=true)] + [JsonPropertyName("comparisonList")] public List ComparisonList { get; set; } + /// + /// Used to track the state of LcidName + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LcidNameOption { get; private set; } + + /// + /// LCID name + /// + /// LCID name + [JsonPropertyName("lcidName")] + public string? LcidName { get { return this.LcidNameOption; } set { this.LcidNameOption = new(value); } } + /// /// Returns the string presentation of the object /// /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TextField {\n"); sb.Append(" FieldType: ").Append(FieldType).Append("\n"); sb.Append(" FieldName: ").Append(FieldName).Append("\n"); @@ -224,137 +158,258 @@ public override string ToString() sb.Append(" ValueList: ").Append(ValueList).Append("\n"); sb.Append(" ValidityList: ").Append(ValidityList).Append("\n"); sb.Append(" ComparisonList: ").Append(ComparisonList).Append("\n"); + sb.Append(" LcidName: ").Append(LcidName).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as TextField); + yield break; } + } + /// + /// A Json converter for type + /// + public class TextFieldJsonConverter : JsonConverter + { /// - /// Returns true if TextField instances are equal + /// Deserializes json to /// - /// Instance of TextField to be compared - /// Boolean - public bool Equals(TextField input) + /// + /// + /// + /// + /// + public override TextField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ) && - ( - this.FieldName == input.FieldName || - (this.FieldName != null && - this.FieldName.Equals(input.FieldName)) - ) && - ( - this.Lcid == input.Lcid || - (this.Lcid != null && - this.Lcid.Equals(input.Lcid)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.ValidityStatus == input.ValidityStatus || - (this.ValidityStatus != null && - this.ValidityStatus.Equals(input.ValidityStatus)) - ) && - ( - this.ComparisonStatus == input.ComparisonStatus || - (this.ComparisonStatus != null && - this.ComparisonStatus.Equals(input.ComparisonStatus)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.ValueList == input.ValueList || - this.ValueList != null && - input.ValueList != null && - this.ValueList.SequenceEqual(input.ValueList) - ) && - ( - this.ValidityList == input.ValidityList || - this.ValidityList != null && - input.ValidityList != null && - this.ValidityList.SequenceEqual(input.ValidityList) - ) && - ( - this.ComparisonList == input.ComparisonList || - this.ComparisonList != null && - input.ComparisonList != null && - this.ComparisonList.SequenceEqual(input.ComparisonList) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldType = default; + Option fieldName = default; + Option lcid = default; + Option status = default; + Option validityStatus = default; + Option comparisonStatus = default; + Option value = default; + Option?> valueList = default; + Option?> validityList = default; + Option?> comparisonList = default; + Option lcidName = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "fieldType": + string? fieldTypeRawValue = utf8JsonReader.GetString(); + if (fieldTypeRawValue != null) + fieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(fieldTypeRawValue)); + break; + case "fieldName": + fieldName = new Option(utf8JsonReader.GetString()!); + break; + case "lcid": + string? lcidRawValue = utf8JsonReader.GetString(); + if (lcidRawValue != null) + lcid = new Option(LCIDValueConverter.FromStringOrDefault(lcidRawValue)); + break; + case "status": + string? statusRawValue = utf8JsonReader.GetString(); + if (statusRawValue != null) + status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); + break; + case "validityStatus": + string? validityStatusRawValue = utf8JsonReader.GetString(); + if (validityStatusRawValue != null) + validityStatus = new Option(CheckResultValueConverter.FromStringOrDefault(validityStatusRawValue)); + break; + case "comparisonStatus": + string? comparisonStatusRawValue = utf8JsonReader.GetString(); + if (comparisonStatusRawValue != null) + comparisonStatus = new Option(CheckResultValueConverter.FromStringOrDefault(comparisonStatusRawValue)); + break; + case "value": + value = new Option(utf8JsonReader.GetString()!); + break; + case "valueList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + valueList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "validityList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + validityList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "comparisonList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + comparisonList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "lcidName": + lcidName = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(fieldType)); + + if (!fieldName.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(fieldName)); + + if (!lcid.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(lcid)); + + if (!status.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(status)); + + if (!validityStatus.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(validityStatus)); + + if (!comparisonStatus.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(comparisonStatus)); + + if (!value.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(value)); + + if (!valueList.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(valueList)); + + if (!validityList.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(validityList)); + + if (!comparisonList.IsSet) + throw new ArgumentException("Property is required for class TextField.", nameof(comparisonList)); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class TextField."); + + if (fieldName.IsSet && fieldName.Value == null) + throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class TextField."); + + if (lcid.IsSet && lcid.Value == null) + throw new ArgumentNullException(nameof(lcid), "Property is not nullable for class TextField."); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class TextField."); + + if (validityStatus.IsSet && validityStatus.Value == null) + throw new ArgumentNullException(nameof(validityStatus), "Property is not nullable for class TextField."); + + if (comparisonStatus.IsSet && comparisonStatus.Value == null) + throw new ArgumentNullException(nameof(comparisonStatus), "Property is not nullable for class TextField."); + + if (value.IsSet && value.Value == null) + throw new ArgumentNullException(nameof(value), "Property is not nullable for class TextField."); + + if (valueList.IsSet && valueList.Value == null) + throw new ArgumentNullException(nameof(valueList), "Property is not nullable for class TextField."); + + if (validityList.IsSet && validityList.Value == null) + throw new ArgumentNullException(nameof(validityList), "Property is not nullable for class TextField."); + + if (comparisonList.IsSet && comparisonList.Value == null) + throw new ArgumentNullException(nameof(comparisonList), "Property is not nullable for class TextField."); + + if (lcidName.IsSet && lcidName.Value == null) + throw new ArgumentNullException(nameof(lcidName), "Property is not nullable for class TextField."); + + return new TextField(fieldType.Value!.Value!, fieldName.Value!, lcid.Value!.Value!, status.Value!.Value!, validityStatus.Value!.Value!, comparisonStatus.Value!.Value!, value.Value!, valueList.Value!, validityList.Value!, comparisonList.Value!, lcidName); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextField textField, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FieldType != null) - hashCode = hashCode * 59 + this.FieldType.GetHashCode(); - if (this.FieldName != null) - hashCode = hashCode * 59 + this.FieldName.GetHashCode(); - if (this.Lcid != null) - hashCode = hashCode * 59 + this.Lcid.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.ValidityStatus != null) - hashCode = hashCode * 59 + this.ValidityStatus.GetHashCode(); - if (this.ComparisonStatus != null) - hashCode = hashCode * 59 + this.ComparisonStatus.GetHashCode(); - if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.ValueList != null) - hashCode = hashCode * 59 + this.ValueList.GetHashCode(); - if (this.ValidityList != null) - hashCode = hashCode * 59 + this.ValidityList.GetHashCode(); - if (this.ComparisonList != null) - hashCode = hashCode * 59 + this.ComparisonList.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, textField, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TextField textField, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (textField.FieldName == null) + throw new ArgumentNullException(nameof(textField.FieldName), "Property is required for class TextField."); + + if (textField.Value == null) + throw new ArgumentNullException(nameof(textField.Value), "Property is required for class TextField."); + + if (textField.ValueList == null) + throw new ArgumentNullException(nameof(textField.ValueList), "Property is required for class TextField."); + + if (textField.ValidityList == null) + throw new ArgumentNullException(nameof(textField.ValidityList), "Property is required for class TextField."); + + if (textField.ComparisonList == null) + throw new ArgumentNullException(nameof(textField.ComparisonList), "Property is required for class TextField."); + + if (textField.LcidNameOption.IsSet && textField.LcidName == null) + throw new ArgumentNullException(nameof(textField.LcidName), "Property is required for class TextField."); + + var fieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(textField.FieldType); + writer.WriteNumber("fieldType", fieldTypeRawValue); + + writer.WriteString("fieldName", textField.FieldName); + + var lcidRawValue = LCIDValueConverter.ToJsonValue(textField.Lcid); + writer.WriteNumber("lcid", lcidRawValue); + + var statusRawValue = CheckResultValueConverter.ToJsonValue(textField.Status); + writer.WriteNumber("status", statusRawValue); + + var validityStatusRawValue = CheckResultValueConverter.ToJsonValue(textField.ValidityStatus); + writer.WriteNumber("validityStatus", validityStatusRawValue); + + var comparisonStatusRawValue = CheckResultValueConverter.ToJsonValue(textField.ComparisonStatus); + writer.WriteNumber("comparisonStatus", comparisonStatusRawValue); + + writer.WriteString("value", textField.Value); + + writer.WritePropertyName("valueList"); + JsonSerializer.Serialize(writer, textField.ValueList, jsonSerializerOptions); + writer.WritePropertyName("validityList"); + JsonSerializer.Serialize(writer, textField.ValidityList, jsonSerializerOptions); + writer.WritePropertyName("comparisonList"); + JsonSerializer.Serialize(writer, textField.ComparisonList, jsonSerializerOptions); + if (textField.LcidNameOption.IsSet) + writer.WriteString("lcidName", textField.LcidName); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs index 71f5602..4db8bad 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs @@ -1,1815 +1,7209 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class TextFieldType + /// + /// Defines TextFieldType + /// + public enum TextFieldType + { + /// + /// Enum DOCUMENT_CLASS_CODE for value: 0 + /// + DOCUMENT_CLASS_CODE = 0, + + /// + /// Enum ISSUING_STATE_CODE for value: 1 + /// + ISSUING_STATE_CODE = 1, + + /// + /// Enum DOCUMENT_NUMBER for value: 2 + /// + DOCUMENT_NUMBER = 2, + + /// + /// Enum DATE_OF_EXPIRY for value: 3 + /// + DATE_OF_EXPIRY = 3, + + /// + /// Enum DATE_OF_ISSUE for value: 4 + /// + DATE_OF_ISSUE = 4, + + /// + /// Enum DATE_OF_BIRTH for value: 5 + /// + DATE_OF_BIRTH = 5, + + /// + /// Enum PLACE_OF_BIRTH for value: 6 + /// + PLACE_OF_BIRTH = 6, + + /// + /// Enum PERSONAL_NUMBER for value: 7 + /// + PERSONAL_NUMBER = 7, + + /// + /// Enum SURNAME for value: 8 + /// + SURNAME = 8, + + /// + /// Enum GIVEN_NAMES for value: 9 + /// + GIVEN_NAMES = 9, + + /// + /// Enum MOTHERS_NAME for value: 10 + /// + MOTHERS_NAME = 10, + + /// + /// Enum NATIONALITY for value: 11 + /// + NATIONALITY = 11, + + /// + /// Enum SEX for value: 12 + /// + SEX = 12, + + /// + /// Enum HEIGHT for value: 13 + /// + HEIGHT = 13, + + /// + /// Enum WEIGHT for value: 14 + /// + WEIGHT = 14, + + /// + /// Enum EYES_COLOR for value: 15 + /// + EYES_COLOR = 15, + + /// + /// Enum HAIR_COLOR for value: 16 + /// + HAIR_COLOR = 16, + + /// + /// Enum ADDRESS for value: 17 + /// + ADDRESS = 17, + + /// + /// Enum DONOR for value: 18 + /// + DONOR = 18, + + /// + /// Enum SOCIAL_SECURITY_NUMBER for value: 19 + /// + SOCIAL_SECURITY_NUMBER = 19, + + /// + /// Enum DL_CLASS for value: 20 + /// + DL_CLASS = 20, + + /// + /// Enum DL_ENDORSED for value: 21 + /// + DL_ENDORSED = 21, + + /// + /// Enum DL_RESTRICTION_CODE for value: 22 + /// + DL_RESTRICTION_CODE = 22, + + /// + /// Enum DL_UNDER_21_DATE for value: 23 + /// + DL_UNDER_21_DATE = 23, + + /// + /// Enum AUTHORITY for value: 24 + /// + AUTHORITY = 24, + + /// + /// Enum SURNAME_AND_GIVEN_NAMES for value: 25 + /// + SURNAME_AND_GIVEN_NAMES = 25, + + /// + /// Enum NATIONALITY_CODE for value: 26 + /// + NATIONALITY_CODE = 26, + + /// + /// Enum PASSPORT_NUMBER for value: 27 + /// + PASSPORT_NUMBER = 27, + + /// + /// Enum INVITATION_NUMBER for value: 28 + /// + INVITATION_NUMBER = 28, + + /// + /// Enum VISA_ID for value: 29 + /// + VISA_ID = 29, + + /// + /// Enum VISA_CLASS for value: 30 + /// + VISA_CLASS = 30, + + /// + /// Enum VISA_SUBCLASS for value: 31 + /// + VISA_SUBCLASS = 31, + + /// + /// Enum MRZ_TYPE for value: 35 + /// + MRZ_TYPE = 35, + + /// + /// Enum OPTIONAL_DATA for value: 36 + /// + OPTIONAL_DATA = 36, + + /// + /// Enum DOCUMENT_CLASS_NAME for value: 37 + /// + DOCUMENT_CLASS_NAME = 37, + + /// + /// Enum ISSUING_STATE_NAME for value: 38 + /// + ISSUING_STATE_NAME = 38, + + /// + /// Enum PLACE_OF_ISSUE for value: 39 + /// + PLACE_OF_ISSUE = 39, + + /// + /// Enum DOCUMENT_NUMBER_CHECKSUM for value: 40 + /// + DOCUMENT_NUMBER_CHECKSUM = 40, + + /// + /// Enum DATE_OF_BIRTH_CHECKSUM for value: 41 + /// + DATE_OF_BIRTH_CHECKSUM = 41, + + /// + /// Enum DATE_OF_EXPIRY_CHECKSUM for value: 42 + /// + DATE_OF_EXPIRY_CHECKSUM = 42, + + /// + /// Enum PERSONAL_NUMBER_CHECKSUM for value: 43 + /// + PERSONAL_NUMBER_CHECKSUM = 43, + + /// + /// Enum FINAL_CHECKSUM for value: 44 + /// + FINAL_CHECKSUM = 44, + + /// + /// Enum PASSPORT_NUMBER_CHECKSUM for value: 45 + /// + PASSPORT_NUMBER_CHECKSUM = 45, + + /// + /// Enum INVITATION_NUMBER_CHECKSUM for value: 46 + /// + INVITATION_NUMBER_CHECKSUM = 46, + + /// + /// Enum VISA_ID_CHECKSUM for value: 47 + /// + VISA_ID_CHECKSUM = 47, + + /// + /// Enum SURNAME_AND_GIVEN_NAMES_CHECKSUM for value: 48 + /// + SURNAME_AND_GIVEN_NAMES_CHECKSUM = 48, + + /// + /// Enum VISA_VALID_UNTIL_CHECKSUM for value: 49 + /// + VISA_VALID_UNTIL_CHECKSUM = 49, + + /// + /// Enum OTHER for value: 50 + /// + OTHER = 50, + + /// + /// Enum MRZ_STRINGS for value: 51 + /// + MRZ_STRINGS = 51, + + /// + /// Enum NAME_SUFFIX for value: 52 + /// + NAME_SUFFIX = 52, + + /// + /// Enum NAME_PREFIX for value: 53 + /// + NAME_PREFIX = 53, + + /// + /// Enum DATE_OF_ISSUE_CHECKSUM for value: 54 + /// + DATE_OF_ISSUE_CHECKSUM = 54, + + /// + /// Enum DATE_OF_ISSUE_CHECK_DIGIT for value: 55 + /// + DATE_OF_ISSUE_CHECK_DIGIT = 55, + + /// + /// Enum DOCUMENT_SERIES for value: 56 + /// + DOCUMENT_SERIES = 56, + + /// + /// Enum REG_CERT_REG_NUMBER for value: 57 + /// + REG_CERT_REG_NUMBER = 57, + + /// + /// Enum REG_CERT_CAR_MODEL for value: 58 + /// + REG_CERT_CAR_MODEL = 58, + + /// + /// Enum REG_CERT_CAR_COLOR for value: 59 + /// + REG_CERT_CAR_COLOR = 59, + + /// + /// Enum REG_CERT_BODY_NUMBER for value: 60 + /// + REG_CERT_BODY_NUMBER = 60, + + /// + /// Enum REG_CERT_CAR_TYPE for value: 61 + /// + REG_CERT_CAR_TYPE = 61, + + /// + /// Enum REG_CERT_MAX_WEIGHT for value: 62 + /// + REG_CERT_MAX_WEIGHT = 62, + + /// + /// Enum REG_CERT_WEIGHT for value: 63 + /// + REG_CERT_WEIGHT = 63, + + /// + /// Enum ADDRESS_AREA for value: 64 + /// + ADDRESS_AREA = 64, + + /// + /// Enum ADDRESS_STATE for value: 65 + /// + ADDRESS_STATE = 65, + + /// + /// Enum ADDRESS_BUILDING for value: 66 + /// + ADDRESS_BUILDING = 66, + + /// + /// Enum ADDRESS_HOUSE for value: 67 + /// + ADDRESS_HOUSE = 67, + + /// + /// Enum ADDRESS_FLAT for value: 68 + /// + ADDRESS_FLAT = 68, + + /// + /// Enum PLACE_OF_REGISTRATION for value: 69 + /// + PLACE_OF_REGISTRATION = 69, + + /// + /// Enum DATE_OF_REGISTRATION for value: 70 + /// + DATE_OF_REGISTRATION = 70, + + /// + /// Enum RESIDENT_FROM for value: 71 + /// + RESIDENT_FROM = 71, + + /// + /// Enum RESIDENT_UNTIL for value: 72 + /// + RESIDENT_UNTIL = 72, + + /// + /// Enum AUTHORITY_CODE for value: 73 + /// + AUTHORITY_CODE = 73, + + /// + /// Enum PLACE_OF_BIRTH_AREA for value: 74 + /// + PLACE_OF_BIRTH_AREA = 74, + + /// + /// Enum PLACE_OF_BIRTH_STATE_CODE for value: 75 + /// + PLACE_OF_BIRTH_STATE_CODE = 75, + + /// + /// Enum ADDRESS_STREET for value: 76 + /// + ADDRESS_STREET = 76, + + /// + /// Enum ADDRESS_CITY for value: 77 + /// + ADDRESS_CITY = 77, + + /// + /// Enum ADDRESS_JURISDICTION_CODE for value: 78 + /// + ADDRESS_JURISDICTION_CODE = 78, + + /// + /// Enum ADDRESS_POSTAL_CODE for value: 79 + /// + ADDRESS_POSTAL_CODE = 79, + + /// + /// Enum DOCUMENT_NUMBER_CHECK_DIGIT for value: 80 + /// + DOCUMENT_NUMBER_CHECK_DIGIT = 80, + + /// + /// Enum DATE_OF_BIRTH_CHECK_DIGIT for value: 81 + /// + DATE_OF_BIRTH_CHECK_DIGIT = 81, + + /// + /// Enum DATE_OF_EXPIRY_CHECK_DIGIT for value: 82 + /// + DATE_OF_EXPIRY_CHECK_DIGIT = 82, + + /// + /// Enum PERSONAL_NUMBER_CHECK_DIGIT for value: 83 + /// + PERSONAL_NUMBER_CHECK_DIGIT = 83, + + /// + /// Enum FINAL_CHECK_DIGIT for value: 84 + /// + FINAL_CHECK_DIGIT = 84, + + /// + /// Enum PASSPORT_NUMBER_CHECK_DIGIT for value: 85 + /// + PASSPORT_NUMBER_CHECK_DIGIT = 85, + + /// + /// Enum INVITATION_NUMBER_CHECK_DIGIT for value: 86 + /// + INVITATION_NUMBER_CHECK_DIGIT = 86, + + /// + /// Enum VISA_ID_CHECK_DIGIT for value: 87 + /// + VISA_ID_CHECK_DIGIT = 87, + + /// + /// Enum SURNAME_AND_GIVEN_NAMES_CHECK_DIGIT for value: 88 + /// + SURNAME_AND_GIVEN_NAMES_CHECK_DIGIT = 88, + + /// + /// Enum VISA_VALID_UNTIL_CHECK_DIGIT for value: 89 + /// + VISA_VALID_UNTIL_CHECK_DIGIT = 89, + + /// + /// Enum PERMIT_DL_CLASS for value: 90 + /// + PERMIT_DL_CLASS = 90, + + /// + /// Enum PERMIT_DATE_OF_EXPIRY for value: 91 + /// + PERMIT_DATE_OF_EXPIRY = 91, + + /// + /// Enum PERMIT_IDENTIFIER for value: 92 + /// + PERMIT_IDENTIFIER = 92, + + /// + /// Enum PERMIT_DATE_OF_ISSUE for value: 93 + /// + PERMIT_DATE_OF_ISSUE = 93, + + /// + /// Enum PERMIT_RESTRICTION_CODE for value: 94 + /// + PERMIT_RESTRICTION_CODE = 94, + + /// + /// Enum PERMIT_ENDORSED for value: 95 + /// + PERMIT_ENDORSED = 95, + + /// + /// Enum ISSUE_TIMESTAMP for value: 96 + /// + ISSUE_TIMESTAMP = 96, + + /// + /// Enum NUMBER_OF_DUPLICATES for value: 97 + /// + NUMBER_OF_DUPLICATES = 97, + + /// + /// Enum MEDICAL_INDICATOR_CODES for value: 98 + /// + MEDICAL_INDICATOR_CODES = 98, + + /// + /// Enum NON_RESIDENT_INDICATOR for value: 99 + /// + NON_RESIDENT_INDICATOR = 99, + + /// + /// Enum VISA_TYPE for value: 100 + /// + VISA_TYPE = 100, + + /// + /// Enum VISA_VALID_FROM for value: 101 + /// + VISA_VALID_FROM = 101, + + /// + /// Enum VISA_VALID_UNTIL for value: 102 + /// + VISA_VALID_UNTIL = 102, + + /// + /// Enum DURATION_OF_STAY for value: 103 + /// + DURATION_OF_STAY = 103, + + /// + /// Enum NUMBER_OF_ENTRIES for value: 104 + /// + NUMBER_OF_ENTRIES = 104, + + /// + /// Enum DAY for value: 105 + /// + DAY = 105, + + /// + /// Enum MONTH for value: 106 + /// + MONTH = 106, + + /// + /// Enum YEAR for value: 107 + /// + YEAR = 107, + + /// + /// Enum UNIQUE_CUSTOMER_IDENTIFIER for value: 108 + /// + UNIQUE_CUSTOMER_IDENTIFIER = 108, + + /// + /// Enum COMMERCIAL_VEHICLE_CODES for value: 109 + /// + COMMERCIAL_VEHICLE_CODES = 109, + + /// + /// Enum AKA_DATE_OF_BIRTH for value: 110 + /// + AKA_DATE_OF_BIRTH = 110, + + /// + /// Enum AKA_SOCIAL_SECURITY_NUMBER for value: 111 + /// + AKA_SOCIAL_SECURITY_NUMBER = 111, + + /// + /// Enum AKA_SURNAME for value: 112 + /// + AKA_SURNAME = 112, + + /// + /// Enum AKA_GIVEN_NAMES for value: 113 + /// + AKA_GIVEN_NAMES = 113, + + /// + /// Enum AKA_NAME_SUFFIX for value: 114 + /// + AKA_NAME_SUFFIX = 114, + + /// + /// Enum AKA_NAME_PREFIX for value: 115 + /// + AKA_NAME_PREFIX = 115, + + /// + /// Enum MAILING_ADDRESS_STREET for value: 116 + /// + MAILING_ADDRESS_STREET = 116, + + /// + /// Enum MAILING_ADDRESS_CITY for value: 117 + /// + MAILING_ADDRESS_CITY = 117, + + /// + /// Enum MAILING_ADDRESS_JURISDICTION_CODE for value: 118 + /// + MAILING_ADDRESS_JURISDICTION_CODE = 118, + + /// + /// Enum MAILING_ADDRESS_POSTAL_CODE for value: 119 + /// + MAILING_ADDRESS_POSTAL_CODE = 119, + + /// + /// Enum AUDIT_INFORMATION for value: 120 + /// + AUDIT_INFORMATION = 120, + + /// + /// Enum INVENTORY_NUMBER for value: 121 + /// + INVENTORY_NUMBER = 121, + + /// + /// Enum RACE_ETHNICITY for value: 122 + /// + RACE_ETHNICITY = 122, + + /// + /// Enum JURISDICTION_VEHICLE_CLASS for value: 123 + /// + JURISDICTION_VEHICLE_CLASS = 123, + + /// + /// Enum JURISDICTION_ENDORSEMENT_CODE for value: 124 + /// + JURISDICTION_ENDORSEMENT_CODE = 124, + + /// + /// Enum JURISDICTION_RESTRICTION_CODE for value: 125 + /// + JURISDICTION_RESTRICTION_CODE = 125, + + /// + /// Enum FAMILY_NAME for value: 126 + /// + FAMILY_NAME = 126, + + /// + /// Enum GIVEN_NAMES_RUS for value: 127 + /// + GIVEN_NAMES_RUS = 127, + + /// + /// Enum VISA_ID_RUS for value: 128 + /// + VISA_ID_RUS = 128, + + /// + /// Enum FATHERS_NAME for value: 129 + /// + FATHERS_NAME = 129, + + /// + /// Enum FATHERS_NAME_RUS for value: 130 + /// + FATHERS_NAME_RUS = 130, + + /// + /// Enum SURNAME_AND_GIVEN_NAMES_RUS for value: 131 + /// + SURNAME_AND_GIVEN_NAMES_RUS = 131, + + /// + /// Enum PLACE_OF_BIRTH_RUS for value: 132 + /// + PLACE_OF_BIRTH_RUS = 132, + + /// + /// Enum AUTHORITY_RUS for value: 133 + /// + AUTHORITY_RUS = 133, + + /// + /// Enum ISSUING_STATE_CODE_NUMERIC for value: 134 + /// + ISSUING_STATE_CODE_NUMERIC = 134, + + /// + /// Enum NATIONALITY_CODE_NUMERIC for value: 135 + /// + NATIONALITY_CODE_NUMERIC = 135, + + /// + /// Enum ENGINE_POWER for value: 136 + /// + ENGINE_POWER = 136, + + /// + /// Enum ENGINE_VOLUME for value: 137 + /// + ENGINE_VOLUME = 137, + + /// + /// Enum CHASSIS_NUMBER for value: 138 + /// + CHASSIS_NUMBER = 138, + + /// + /// Enum ENGINE_NUMBER for value: 139 + /// + ENGINE_NUMBER = 139, + + /// + /// Enum ENGINE_MODEL for value: 140 + /// + ENGINE_MODEL = 140, + + /// + /// Enum VEHICLE_CATEGORY for value: 141 + /// + VEHICLE_CATEGORY = 141, + + /// + /// Enum IDENTITY_CARD_NUMBER for value: 142 + /// + IDENTITY_CARD_NUMBER = 142, + + /// + /// Enum CONTROL_NUMBER for value: 143 + /// + CONTROL_NUMBER = 143, + + /// + /// Enum PARENTS_GIVEN_NAMES for value: 144 + /// + PARENTS_GIVEN_NAMES = 144, + + /// + /// Enum SECOND_SURNAME for value: 145 + /// + SECOND_SURNAME = 145, + + /// + /// Enum MIDDLE_NAME for value: 146 + /// + MIDDLE_NAME = 146, + + /// + /// Enum REG_CERT_VIN for value: 147 + /// + REG_CERT_VIN = 147, + + /// + /// Enum REG_CERT_VIN_CHECK_DIGIT for value: 148 + /// + REG_CERT_VIN_CHECK_DIGIT = 148, + + /// + /// Enum REG_CERT_VIN_CHECKSUM for value: 149 + /// + REG_CERT_VIN_CHECKSUM = 149, + + /// + /// Enum LINE_1_CHECK_DIGIT for value: 150 + /// + LINE_1_CHECK_DIGIT = 150, + + /// + /// Enum LINE_2_CHECK_DIGIT for value: 151 + /// + LINE_2_CHECK_DIGIT = 151, + + /// + /// Enum LINE_3_CHECK_DIGIT for value: 152 + /// + LINE_3_CHECK_DIGIT = 152, + + /// + /// Enum LINE_1_CHECKSUM for value: 153 + /// + LINE_1_CHECKSUM = 153, + + /// + /// Enum LINE_2_CHECKSUM for value: 154 + /// + LINE_2_CHECKSUM = 154, + + /// + /// Enum LINE_3_CHECKSUM for value: 155 + /// + LINE_3_CHECKSUM = 155, + + /// + /// Enum REG_CERT_REG_NUMBER_CHECK_DIGIT for value: 156 + /// + REG_CERT_REG_NUMBER_CHECK_DIGIT = 156, + + /// + /// Enum REG_CERT_REG_NUMBER_CHECKSUM for value: 157 + /// + REG_CERT_REG_NUMBER_CHECKSUM = 157, + + /// + /// Enum REG_CERT_VEHICLE_ITS_CODE for value: 158 + /// + REG_CERT_VEHICLE_ITS_CODE = 158, + + /// + /// Enum CARD_ACCESS_NUMBER for value: 159 + /// + CARD_ACCESS_NUMBER = 159, + + /// + /// Enum MARITAL_STATUS for value: 160 + /// + MARITAL_STATUS = 160, + + /// + /// Enum COMPANY_NAME for value: 161 + /// + COMPANY_NAME = 161, + + /// + /// Enum SPECIAL_NOTES for value: 162 + /// + SPECIAL_NOTES = 162, + + /// + /// Enum SURNAME_OF_SPOUSE for value: 163 + /// + SURNAME_OF_SPOUSE = 163, + + /// + /// Enum TRACKING_NUMBER for value: 164 + /// + TRACKING_NUMBER = 164, + + /// + /// Enum BOOKLET_NUMBER for value: 165 + /// + BOOKLET_NUMBER = 165, + + /// + /// Enum CHILDREN for value: 166 + /// + CHILDREN = 166, + + /// + /// Enum COPY for value: 167 + /// + COPY = 167, + + /// + /// Enum SERIAL_NUMBER for value: 168 + /// + SERIAL_NUMBER = 168, + + /// + /// Enum DOSSIER_NUMBER for value: 169 + /// + DOSSIER_NUMBER = 169, + + /// + /// Enum AKA_SURNAME_AND_GIVEN_NAMES for value: 170 + /// + AKA_SURNAME_AND_GIVEN_NAMES = 170, + + /// + /// Enum TERRITORIAL_VALIDITY for value: 171 + /// + TERRITORIAL_VALIDITY = 171, + + /// + /// Enum MRZ_STRINGS_WITH_CORRECT_CHECK_SUMS for value: 172 + /// + MRZ_STRINGS_WITH_CORRECT_CHECK_SUMS = 172, + + /// + /// Enum DL_CDL_RESTRICTION_CODE for value: 173 + /// + DL_CDL_RESTRICTION_CODE = 173, + + /// + /// Enum DL_UNDER_18_DATE for value: 174 + /// + DL_UNDER_18_DATE = 174, + + /// + /// Enum DL_RECORD_CREATED for value: 175 + /// + DL_RECORD_CREATED = 175, + + /// + /// Enum DL_DUPLICATE_DATE for value: 176 + /// + DL_DUPLICATE_DATE = 176, + + /// + /// Enum DL_ISSUE_TYPE for value: 177 + /// + DL_ISSUE_TYPE = 177, + + /// + /// Enum MILITARY_BOOK_NUMBER for value: 178 + /// + MILITARY_BOOK_NUMBER = 178, + + /// + /// Enum DESTINATION for value: 179 + /// + DESTINATION = 179, + + /// + /// Enum BLOOD_GROUP for value: 180 + /// + BLOOD_GROUP = 180, + + /// + /// Enum SEQUENCE_NUMBER for value: 181 + /// + SEQUENCE_NUMBER = 181, + + /// + /// Enum REG_CERT_BODY_TYPE for value: 182 + /// + REG_CERT_BODY_TYPE = 182, + + /// + /// Enum REG_CERT_CAR_MARK for value: 183 + /// + REG_CERT_CAR_MARK = 183, + + /// + /// Enum TRANSACTION_NUMBER for value: 184 + /// + TRANSACTION_NUMBER = 184, + + /// + /// Enum AGE for value: 185 + /// + AGE = 185, + + /// + /// Enum FOLIO_NUMBER for value: 186 + /// + FOLIO_NUMBER = 186, + + /// + /// Enum VOTER_KEY for value: 187 + /// + VOTER_KEY = 187, + + /// + /// Enum ADDRESS_MUNICIPALITY for value: 188 + /// + ADDRESS_MUNICIPALITY = 188, + + /// + /// Enum ADDRESS_LOCATION for value: 189 + /// + ADDRESS_LOCATION = 189, + + /// + /// Enum SECTION for value: 190 + /// + SECTION = 190, + + /// + /// Enum OCR_NUMBER for value: 191 + /// + OCR_NUMBER = 191, + + /// + /// Enum FEDERAL_ELECTIONS for value: 192 + /// + FEDERAL_ELECTIONS = 192, + + /// + /// Enum REFERENCE_NUMBER for value: 193 + /// + REFERENCE_NUMBER = 193, + + /// + /// Enum OPTIONAL_DATA_CHECKSUM for value: 194 + /// + OPTIONAL_DATA_CHECKSUM = 194, + + /// + /// Enum OPTIONAL_DATA_CHECK_DIGIT for value: 195 + /// + OPTIONAL_DATA_CHECK_DIGIT = 195, + + /// + /// Enum VISA_NUMBER for value: 196 + /// + VISA_NUMBER = 196, + + /// + /// Enum VISA_NUMBER_CHECKSUM for value: 197 + /// + VISA_NUMBER_CHECKSUM = 197, + + /// + /// Enum VISA_NUMBER_CHECK_DIGIT for value: 198 + /// + VISA_NUMBER_CHECK_DIGIT = 198, + + /// + /// Enum VOTER for value: 199 + /// + VOTER = 199, + + /// + /// Enum PREVIOUS_TYPE for value: 200 + /// + PREVIOUS_TYPE = 200, + + /// + /// Enum FIELD_FROM_MRZ for value: 220 + /// + FIELD_FROM_MRZ = 220, + + /// + /// Enum CURRENT_DATE for value: 221 + /// + CURRENT_DATE = 221, + + /// + /// Enum STATUS_DATE_OF_EXPIRY for value: 251 + /// + STATUS_DATE_OF_EXPIRY = 251, + + /// + /// Enum BANKNOTE_NUMBER for value: 252 + /// + BANKNOTE_NUMBER = 252, + + /// + /// Enum CSC_CODE for value: 253 + /// + CSC_CODE = 253, + + /// + /// Enum ARTISTIC_NAME for value: 254 + /// + ARTISTIC_NAME = 254, + + /// + /// Enum ACADEMIC_TITLE for value: 255 + /// + ACADEMIC_TITLE = 255, + + /// + /// Enum ADDRESS_COUNTRY for value: 256 + /// + ADDRESS_COUNTRY = 256, + + /// + /// Enum ADDRESS_ZIP_CODE for value: 257 + /// + ADDRESS_ZIP_CODE = 257, + + /// + /// Enum E_ID_RESIDENCE_PERMIT_1 for value: 258 + /// + E_ID_RESIDENCE_PERMIT_1 = 258, + + /// + /// Enum E_ID_RESIDENCE_PERMIT_2 for value: 259 + /// + E_ID_RESIDENCE_PERMIT_2 = 259, + + /// + /// Enum E_ID_PLACE_OF_BIRTH_STREET for value: 260 + /// + E_ID_PLACE_OF_BIRTH_STREET = 260, + + /// + /// Enum E_ID_PLACE_OF_BIRTH_CITY for value: 261 + /// + E_ID_PLACE_OF_BIRTH_CITY = 261, + + /// + /// Enum E_ID_PLACE_OF_BIRTH_STATE for value: 262 + /// + E_ID_PLACE_OF_BIRTH_STATE = 262, + + /// + /// Enum E_ID_PLACE_OF_BIRTH_COUNTRY for value: 263 + /// + E_ID_PLACE_OF_BIRTH_COUNTRY = 263, + + /// + /// Enum E_ID_PLACE_OF_BIRTH_ZIP_CODE for value: 264 + /// + E_ID_PLACE_OF_BIRTH_ZIP_CODE = 264, + + /// + /// Enum CDL_CLASS for value: 265 + /// + CDL_CLASS = 265, + + /// + /// Enum DL_UNDER_19_DATE for value: 266 + /// + DL_UNDER_19_DATE = 266, + + /// + /// Enum WEIGHT_POUNDS for value: 267 + /// + WEIGHT_POUNDS = 267, + + /// + /// Enum LIMITED_DURATION_DOCUMENT_INDICATOR for value: 268 + /// + LIMITED_DURATION_DOCUMENT_INDICATOR = 268, + + /// + /// Enum ENDORSEMENT_EXPIRATION_DATE for value: 269 + /// + ENDORSEMENT_EXPIRATION_DATE = 269, + + /// + /// Enum REVISION_DATE for value: 270 + /// + REVISION_DATE = 270, + + /// + /// Enum COMPLIANCE_TYPE for value: 271 + /// + COMPLIANCE_TYPE = 271, + + /// + /// Enum FAMILY_NAME_TRUNCATION for value: 272 + /// + FAMILY_NAME_TRUNCATION = 272, + + /// + /// Enum FIRST_NAME_TRUNCATION for value: 273 + /// + FIRST_NAME_TRUNCATION = 273, + + /// + /// Enum MIDDLE_NAME_TRUNCATION for value: 274 + /// + MIDDLE_NAME_TRUNCATION = 274, + + /// + /// Enum EXAM_DATE for value: 275 + /// + EXAM_DATE = 275, + + /// + /// Enum ORGANIZATION for value: 276 + /// + ORGANIZATION = 276, + + /// + /// Enum DEPARTMENT for value: 277 + /// + DEPARTMENT = 277, + + /// + /// Enum PAY_GRADE for value: 278 + /// + PAY_GRADE = 278, + + /// + /// Enum RANK for value: 279 + /// + RANK = 279, + + /// + /// Enum BENEFITS_NUMBER for value: 280 + /// + BENEFITS_NUMBER = 280, + + /// + /// Enum SPONSOR_SERVICE for value: 281 + /// + SPONSOR_SERVICE = 281, + + /// + /// Enum SPONSOR_STATUS for value: 282 + /// + SPONSOR_STATUS = 282, + + /// + /// Enum SPONSOR for value: 283 + /// + SPONSOR = 283, + + /// + /// Enum RELATIONSHIP for value: 284 + /// + RELATIONSHIP = 284, + + /// + /// Enum USCIS for value: 285 + /// + USCIS = 285, + + /// + /// Enum CATEGORY for value: 286 + /// + CATEGORY = 286, + + /// + /// Enum CONDITIONS for value: 287 + /// + CONDITIONS = 287, + + /// + /// Enum IDENTIFIER for value: 288 + /// + IDENTIFIER = 288, + + /// + /// Enum CONFIGURATION for value: 289 + /// + CONFIGURATION = 289, + + /// + /// Enum DISCRETIONARY_DATA for value: 290 + /// + DISCRETIONARY_DATA = 290, + + /// + /// Enum LINE_1_OPTIONAL_DATA for value: 291 + /// + LINE_1_OPTIONAL_DATA = 291, + + /// + /// Enum LINE_2_OPTIONAL_DATA for value: 292 + /// + LINE_2_OPTIONAL_DATA = 292, + + /// + /// Enum LINE_3_OPTIONAL_DATA for value: 293 + /// + LINE_3_OPTIONAL_DATA = 293, + + /// + /// Enum EQV_CODE for value: 294 + /// + EQV_CODE = 294, + + /// + /// Enum ALT_CODE for value: 295 + /// + ALT_CODE = 295, + + /// + /// Enum BINARY_CODE for value: 296 + /// + BINARY_CODE = 296, + + /// + /// Enum PSEUDO_CODE for value: 297 + /// + PSEUDO_CODE = 297, + + /// + /// Enum FEE for value: 298 + /// + FEE = 298, + + /// + /// Enum STAMP_NUMBER for value: 299 + /// + STAMP_NUMBER = 299, + + /// + /// Enum SBH_SECURITY_OPTIONS for value: 300 + /// + SBH_SECURITY_OPTIONS = 300, + + /// + /// Enum SBH_INTEGRITY_OPTIONS for value: 301 + /// + SBH_INTEGRITY_OPTIONS = 301, + + /// + /// Enum DATE_OF_CREATION for value: 302 + /// + DATE_OF_CREATION = 302, + + /// + /// Enum VALIDITY_PERIOD for value: 303 + /// + VALIDITY_PERIOD = 303, + + /// + /// Enum PATRON_HEADER_VERSION for value: 304 + /// + PATRON_HEADER_VERSION = 304, + + /// + /// Enum BDB_TYPE for value: 305 + /// + BDB_TYPE = 305, + + /// + /// Enum BIOMETRIC_TYPE for value: 306 + /// + BIOMETRIC_TYPE = 306, + + /// + /// Enum BIOMETRIC_SUBTYPE for value: 307 + /// + BIOMETRIC_SUBTYPE = 307, + + /// + /// Enum BIOMETRIC_PRODUCT_ID for value: 308 + /// + BIOMETRIC_PRODUCT_ID = 308, + + /// + /// Enum BIOMETRIC_FORMAT_OWNER for value: 309 + /// + BIOMETRIC_FORMAT_OWNER = 309, + + /// + /// Enum BIOMETRIC_FORMAT_TYPE for value: 310 + /// + BIOMETRIC_FORMAT_TYPE = 310, + + /// + /// Enum PHONE for value: 311 + /// + PHONE = 311, + + /// + /// Enum PROFESSION for value: 312 + /// + PROFESSION = 312, + + /// + /// Enum TITLE for value: 313 + /// + TITLE = 313, + + /// + /// Enum PERSONAL_SUMMARY for value: 314 + /// + PERSONAL_SUMMARY = 314, + + /// + /// Enum OTHER_VALID_ID for value: 315 + /// + OTHER_VALID_ID = 315, + + /// + /// Enum CUSTODY_INFO for value: 316 + /// + CUSTODY_INFO = 316, + + /// + /// Enum OTHER_NAME for value: 317 + /// + OTHER_NAME = 317, + + /// + /// Enum OBSERVATIONS for value: 318 + /// + OBSERVATIONS = 318, + + /// + /// Enum TAX for value: 319 + /// + TAX = 319, + + /// + /// Enum DATE_OF_PERSONALIZATION for value: 320 + /// + DATE_OF_PERSONALIZATION = 320, + + /// + /// Enum PERSONALIZATION_SN for value: 321 + /// + PERSONALIZATION_SN = 321, + + /// + /// Enum OTHER_PERSON_NAME for value: 322 + /// + OTHER_PERSON_NAME = 322, + + /// + /// Enum PERSON_TO_NOTIFY_DATE_OF_RECORD for value: 323 + /// + PERSON_TO_NOTIFY_DATE_OF_RECORD = 323, + + /// + /// Enum PERSON_TO_NOTIFY_NAME for value: 324 + /// + PERSON_TO_NOTIFY_NAME = 324, + + /// + /// Enum PERSON_TO_NOTIFY_PHONE for value: 325 + /// + PERSON_TO_NOTIFY_PHONE = 325, + + /// + /// Enum PERSON_TO_NOTIFY_ADDRESS for value: 326 + /// + PERSON_TO_NOTIFY_ADDRESS = 326, + + /// + /// Enum DS_CERTIFICATE_ISSUER for value: 327 + /// + DS_CERTIFICATE_ISSUER = 327, + + /// + /// Enum DS_CERTIFICATE_SUBJECT for value: 328 + /// + DS_CERTIFICATE_SUBJECT = 328, + + /// + /// Enum DS_CERTIFICATE_VALID_FROM for value: 329 + /// + DS_CERTIFICATE_VALID_FROM = 329, + + /// + /// Enum DS_CERTIFICATE_VALID_TO for value: 330 + /// + DS_CERTIFICATE_VALID_TO = 330, + + /// + /// Enum VRC_DATA_OBJECT_ENTRY for value: 331 + /// + VRC_DATA_OBJECT_ENTRY = 331, + + /// + /// Enum TYPE_APPROVAL_NUMBER for value: 332 + /// + TYPE_APPROVAL_NUMBER = 332, + + /// + /// Enum ADMINISTRATIVE_NUMBER for value: 333 + /// + ADMINISTRATIVE_NUMBER = 333, + + /// + /// Enum DOCUMENT_DISCRIMINATOR for value: 334 + /// + DOCUMENT_DISCRIMINATOR = 334, + + /// + /// Enum DATA_DISCRIMINATOR for value: 335 + /// + DATA_DISCRIMINATOR = 335, + + /// + /// Enum ISO_ISSUER_ID_NUMBER for value: 336 + /// + ISO_ISSUER_ID_NUMBER = 336, + + /// + /// Enum DTC_VERSION for value: 337 + /// + DTC_VERSION = 337, + + /// + /// Enum DTC_ID for value: 338 + /// + DTC_ID = 338, + + /// + /// Enum DTC_DATE_OF_EXPIRY for value: 339 + /// + DTC_DATE_OF_EXPIRY = 339, + + /// + /// Enum GNIB_NUMBER for value: 340 + /// + GNIB_NUMBER = 340, + + /// + /// Enum DEPT_NUMBER for value: 341 + /// + DEPT_NUMBER = 341, + + /// + /// Enum TELEX_CODE for value: 342 + /// + TELEX_CODE = 342, + + /// + /// Enum ALLERGIES for value: 343 + /// + ALLERGIES = 343, + + /// + /// Enum SP_CODE for value: 344 + /// + SP_CODE = 344, + + /// + /// Enum COURT_CODE for value: 345 + /// + COURT_CODE = 345, + + /// + /// Enum CTY for value: 346 + /// + CTY = 346, + + /// + /// Enum SPONSOR_SSN for value: 347 + /// + SPONSOR_SSN = 347, + + /// + /// Enum DOD_NUMBER for value: 348 + /// + DOD_NUMBER = 348, + + /// + /// Enum MC_NOVICE_DATE for value: 349 + /// + MC_NOVICE_DATE = 349, + + /// + /// Enum DUF_NUMBER for value: 350 + /// + DUF_NUMBER = 350, + + /// + /// Enum AGY for value: 351 + /// + AGY = 351, + + /// + /// Enum PNR_CODE for value: 352 + /// + PNR_CODE = 352, + + /// + /// Enum FROM_AIRPORT_CODE for value: 353 + /// + FROM_AIRPORT_CODE = 353, + + /// + /// Enum TO_AIRPORT_CODE for value: 354 + /// + TO_AIRPORT_CODE = 354, + + /// + /// Enum FLIGHT_NUMBER for value: 355 + /// + FLIGHT_NUMBER = 355, + + /// + /// Enum DATE_OF_FLIGHT for value: 356 + /// + DATE_OF_FLIGHT = 356, + + /// + /// Enum SEAT_NUMBER for value: 357 + /// + SEAT_NUMBER = 357, + + /// + /// Enum DATE_OF_ISSUE_BOARDING_PASS for value: 358 + /// + DATE_OF_ISSUE_BOARDING_PASS = 358, + + /// + /// Enum CCW_UNTIL for value: 359 + /// + CCW_UNTIL = 359, + + /// + /// Enum REFERENCE_NUMBER_CHECKSUM for value: 360 + /// + REFERENCE_NUMBER_CHECKSUM = 360, + + /// + /// Enum REFERENCE_NUMBER_CHECK_DIGIT for value: 361 + /// + REFERENCE_NUMBER_CHECK_DIGIT = 361, + + /// + /// Enum ROOM_NUMBER for value: 362 + /// + ROOM_NUMBER = 362, + + /// + /// Enum RELIGION for value: 363 + /// + RELIGION = 363, + + /// + /// Enum REMAINDER_TERM for value: 364 + /// + REMAINDER_TERM = 364, + + /// + /// Enum ELECTRONIC_TICKET_INDICATOR for value: 365 + /// + ELECTRONIC_TICKET_INDICATOR = 365, + + /// + /// Enum COMPARTMENT_CODE for value: 366 + /// + COMPARTMENT_CODE = 366, + + /// + /// Enum CHECK_IN_SEQUENCE_NUMBER for value: 367 + /// + CHECK_IN_SEQUENCE_NUMBER = 367, + + /// + /// Enum AIRLINE_DESIGNATOR_OF_BOARDING_PASS_ISSUER for value: 368 + /// + AIRLINE_DESIGNATOR_OF_BOARDING_PASS_ISSUER = 368, + + /// + /// Enum AIRLINE_NUMERIC_CODE for value: 369 + /// + AIRLINE_NUMERIC_CODE = 369, + + /// + /// Enum TICKET_NUMBER for value: 370 + /// + TICKET_NUMBER = 370, + + /// + /// Enum FREQUENT_FLYER_AIRLINE_DESIGNATOR for value: 371 + /// + FREQUENT_FLYER_AIRLINE_DESIGNATOR = 371, + + /// + /// Enum FREQUENT_FLYER_NUMBER for value: 372 + /// + FREQUENT_FLYER_NUMBER = 372, + + /// + /// Enum FREE_BAGGAGE_ALLOWANCE for value: 373 + /// + FREE_BAGGAGE_ALLOWANCE = 373, + + /// + /// Enum PDF417_CODEC for value: 374 + /// + PDF417_CODEC = 374, + + /// + /// Enum IDENTITY_CARD_NUMBER_CHECKSUM for value: 375 + /// + IDENTITY_CARD_NUMBER_CHECKSUM = 375, + + /// + /// Enum IDENTITY_CARD_NUMBER_CHECK_DIGIT for value: 376 + /// + IDENTITY_CARD_NUMBER_CHECK_DIGIT = 376, + + /// + /// Enum VETERAN for value: 377 + /// + VETERAN = 377, + + /// + /// Enum DL_CLASS_CODE_A1_FROM for value: 378 + /// + DL_CLASS_CODE_A1_FROM = 378, + + /// + /// Enum DL_CLASS_CODE_A1_TO for value: 379 + /// + DL_CLASS_CODE_A1_TO = 379, + + /// + /// Enum DL_CLASS_CODE_A1_NOTES for value: 380 + /// + DL_CLASS_CODE_A1_NOTES = 380, + + /// + /// Enum DL_CLASS_CODE_A_FROM for value: 381 + /// + DL_CLASS_CODE_A_FROM = 381, + + /// + /// Enum DL_CLASS_CODE_A_TO for value: 382 + /// + DL_CLASS_CODE_A_TO = 382, + + /// + /// Enum DL_CLASS_CODE_A_NOTES for value: 383 + /// + DL_CLASS_CODE_A_NOTES = 383, + + /// + /// Enum DL_CLASS_CODE_B_FROM for value: 384 + /// + DL_CLASS_CODE_B_FROM = 384, + + /// + /// Enum DL_CLASS_CODE_B_TO for value: 385 + /// + DL_CLASS_CODE_B_TO = 385, + + /// + /// Enum DL_CLASS_CODE_B_NOTES for value: 386 + /// + DL_CLASS_CODE_B_NOTES = 386, + + /// + /// Enum DL_CLASS_CODE_C1_FROM for value: 387 + /// + DL_CLASS_CODE_C1_FROM = 387, + + /// + /// Enum DL_CLASS_CODE_C1_TO for value: 388 + /// + DL_CLASS_CODE_C1_TO = 388, + + /// + /// Enum DL_CLASS_CODE_C1_NOTES for value: 389 + /// + DL_CLASS_CODE_C1_NOTES = 389, + + /// + /// Enum DL_CLASS_CODE_C_FROM for value: 390 + /// + DL_CLASS_CODE_C_FROM = 390, + + /// + /// Enum DL_CLASS_CODE_C_TO for value: 391 + /// + DL_CLASS_CODE_C_TO = 391, + + /// + /// Enum DL_CLASS_CODE_C_NOTES for value: 392 + /// + DL_CLASS_CODE_C_NOTES = 392, + + /// + /// Enum DL_CLASS_CODE_D1_FROM for value: 393 + /// + DL_CLASS_CODE_D1_FROM = 393, + + /// + /// Enum DL_CLASS_CODE_D1_TO for value: 394 + /// + DL_CLASS_CODE_D1_TO = 394, + + /// + /// Enum DL_CLASS_CODE_D1_NOTES for value: 395 + /// + DL_CLASS_CODE_D1_NOTES = 395, + + /// + /// Enum DL_CLASS_CODE_D_FROM for value: 396 + /// + DL_CLASS_CODE_D_FROM = 396, + + /// + /// Enum DL_CLASS_CODE_D_TO for value: 397 + /// + DL_CLASS_CODE_D_TO = 397, + + /// + /// Enum DL_CLASS_CODE_D_NOTES for value: 398 + /// + DL_CLASS_CODE_D_NOTES = 398, + + /// + /// Enum DL_CLASS_CODE_BE_FROM for value: 399 + /// + DL_CLASS_CODE_BE_FROM = 399, + + /// + /// Enum DL_CLASS_CODE_BE_TO for value: 400 + /// + DL_CLASS_CODE_BE_TO = 400, + + /// + /// Enum DL_CLASS_CODE_BE_NOTES for value: 401 + /// + DL_CLASS_CODE_BE_NOTES = 401, + + /// + /// Enum DL_CLASS_CODE_C1E_FROM for value: 402 + /// + DL_CLASS_CODE_C1E_FROM = 402, + + /// + /// Enum DL_CLASS_CODE_C1E_TO for value: 403 + /// + DL_CLASS_CODE_C1E_TO = 403, + + /// + /// Enum DL_CLASS_CODE_C1E_NOTES for value: 404 + /// + DL_CLASS_CODE_C1E_NOTES = 404, + + /// + /// Enum DL_CLASS_CODE_CE_FROM for value: 405 + /// + DL_CLASS_CODE_CE_FROM = 405, + + /// + /// Enum DL_CLASS_CODE_CE_TO for value: 406 + /// + DL_CLASS_CODE_CE_TO = 406, + + /// + /// Enum DL_CLASS_CODE_CE_NOTES for value: 407 + /// + DL_CLASS_CODE_CE_NOTES = 407, + + /// + /// Enum DL_CLASS_CODE_D1E_FROM for value: 408 + /// + DL_CLASS_CODE_D1E_FROM = 408, + + /// + /// Enum DL_CLASS_CODE_D1E_TO for value: 409 + /// + DL_CLASS_CODE_D1E_TO = 409, + + /// + /// Enum DL_CLASS_CODE_D1E_NOTES for value: 410 + /// + DL_CLASS_CODE_D1E_NOTES = 410, + + /// + /// Enum DL_CLASS_CODE_DE_FROM for value: 411 + /// + DL_CLASS_CODE_DE_FROM = 411, + + /// + /// Enum DL_CLASS_CODE_DE_TO for value: 412 + /// + DL_CLASS_CODE_DE_TO = 412, + + /// + /// Enum DL_CLASS_CODE_DE_NOTES for value: 413 + /// + DL_CLASS_CODE_DE_NOTES = 413, + + /// + /// Enum DL_CLASS_CODE_M_FROM for value: 414 + /// + DL_CLASS_CODE_M_FROM = 414, + + /// + /// Enum DL_CLASS_CODE_M_TO for value: 415 + /// + DL_CLASS_CODE_M_TO = 415, + + /// + /// Enum DL_CLASS_CODE_M_NOTES for value: 416 + /// + DL_CLASS_CODE_M_NOTES = 416, + + /// + /// Enum DL_CLASS_CODE_L_FROM for value: 417 + /// + DL_CLASS_CODE_L_FROM = 417, + + /// + /// Enum DL_CLASS_CODE_L_TO for value: 418 + /// + DL_CLASS_CODE_L_TO = 418, + + /// + /// Enum DL_CLASS_CODE_L_NOTES for value: 419 + /// + DL_CLASS_CODE_L_NOTES = 419, + + /// + /// Enum DL_CLASS_CODE_T_FROM for value: 420 + /// + DL_CLASS_CODE_T_FROM = 420, + + /// + /// Enum DL_CLASS_CODE_T_TO for value: 421 + /// + DL_CLASS_CODE_T_TO = 421, + + /// + /// Enum DL_CLASS_CODE_T_NOTES for value: 422 + /// + DL_CLASS_CODE_T_NOTES = 422, + + /// + /// Enum DL_CLASS_CODE_AM_FROM for value: 423 + /// + DL_CLASS_CODE_AM_FROM = 423, + + /// + /// Enum DL_CLASS_CODE_AM_TO for value: 424 + /// + DL_CLASS_CODE_AM_TO = 424, + + /// + /// Enum DL_CLASS_CODE_AM_NOTES for value: 425 + /// + DL_CLASS_CODE_AM_NOTES = 425, + + /// + /// Enum DL_CLASS_CODE_A2_FROM for value: 426 + /// + DL_CLASS_CODE_A2_FROM = 426, + + /// + /// Enum DL_CLASS_CODE_A2_TO for value: 427 + /// + DL_CLASS_CODE_A2_TO = 427, + + /// + /// Enum DL_CLASS_CODE_A2_NOTES for value: 428 + /// + DL_CLASS_CODE_A2_NOTES = 428, + + /// + /// Enum DL_CLASS_CODE_B1_FROM for value: 429 + /// + DL_CLASS_CODE_B1_FROM = 429, + + /// + /// Enum DL_CLASS_CODE_B1_TO for value: 430 + /// + DL_CLASS_CODE_B1_TO = 430, + + /// + /// Enum DL_CLASS_CODE_B1_NOTES for value: 431 + /// + DL_CLASS_CODE_B1_NOTES = 431, + + /// + /// Enum SURNAME_AT_BIRTH for value: 432 + /// + SURNAME_AT_BIRTH = 432, + + /// + /// Enum CIVIL_STATUS for value: 433 + /// + CIVIL_STATUS = 433, + + /// + /// Enum NUMBER_OF_SEATS for value: 434 + /// + NUMBER_OF_SEATS = 434, + + /// + /// Enum NUMBER_OF_STANDING_PLACES for value: 435 + /// + NUMBER_OF_STANDING_PLACES = 435, + + /// + /// Enum MAX_SPEED for value: 436 + /// + MAX_SPEED = 436, + + /// + /// Enum FUEL_TYPE for value: 437 + /// + FUEL_TYPE = 437, + + /// + /// Enum EC_ENVIRONMENTAL_TYPE for value: 438 + /// + EC_ENVIRONMENTAL_TYPE = 438, + + /// + /// Enum POWER_WEIGHT_RATIO for value: 439 + /// + POWER_WEIGHT_RATIO = 439, + + /// + /// Enum MAX_MASS_OF_TRAILER_BRAKED for value: 440 + /// + MAX_MASS_OF_TRAILER_BRAKED = 440, + + /// + /// Enum MAX_MASS_OF_TRAILER_UNBRAKED for value: 441 + /// + MAX_MASS_OF_TRAILER_UNBRAKED = 441, + + /// + /// Enum TRANSMISSION_TYPE for value: 442 + /// + TRANSMISSION_TYPE = 442, + + /// + /// Enum TRAILER_HITCH for value: 443 + /// + TRAILER_HITCH = 443, + + /// + /// Enum ACCOMPANIED_BY for value: 444 + /// + ACCOMPANIED_BY = 444, + + /// + /// Enum POLICE_DISTRICT for value: 445 + /// + POLICE_DISTRICT = 445, + + /// + /// Enum FIRST_ISSUE_DATE for value: 446 + /// + FIRST_ISSUE_DATE = 446, + + /// + /// Enum PAYLOAD_CAPACITY for value: 447 + /// + PAYLOAD_CAPACITY = 447, + + /// + /// Enum NUMBER_OF_AXLES for value: 448 + /// + NUMBER_OF_AXLES = 448, + + /// + /// Enum PERMISSIBLE_AXLE_LOAD for value: 449 + /// + PERMISSIBLE_AXLE_LOAD = 449, + + /// + /// Enum PRECINCT for value: 450 + /// + PRECINCT = 450, + + /// + /// Enum INVITED_BY for value: 451 + /// + INVITED_BY = 451, + + /// + /// Enum PURPOSE_OF_ENTRY for value: 452 + /// + PURPOSE_OF_ENTRY = 452, + + /// + /// Enum SKIN_COLOR for value: 453 + /// + SKIN_COLOR = 453, + + /// + /// Enum COMPLEXION for value: 454 + /// + COMPLEXION = 454, + + /// + /// Enum AIRPORT_FROM for value: 455 + /// + AIRPORT_FROM = 455, + + /// + /// Enum AIRPORT_TO for value: 456 + /// + AIRPORT_TO = 456, + + /// + /// Enum AIRLINE_NAME for value: 457 + /// + AIRLINE_NAME = 457, + + /// + /// Enum AIRLINE_NAME_FREQUENT_FLYER for value: 458 + /// + AIRLINE_NAME_FREQUENT_FLYER = 458, + + /// + /// Enum LICENSE_NUMBER for value: 459 + /// + LICENSE_NUMBER = 459, + + /// + /// Enum IN_TANKS for value: 460 + /// + IN_TANKS = 460, + + /// + /// Enum EXCEPT_IN_TANKS for value: 461 + /// + EXCEPT_IN_TANKS = 461, + + /// + /// Enum FAST_TRACK for value: 462 + /// + FAST_TRACK = 462, + + /// + /// Enum OWNER for value: 463 + /// + OWNER = 463, + + /// + /// Enum MRZ_STRINGS_ICAO_RFID for value: 464 + /// + MRZ_STRINGS_ICAO_RFID = 464, + + /// + /// Enum NUMBER_OF_CARD_ISSUANCE for value: 465 + /// + NUMBER_OF_CARD_ISSUANCE = 465, + + /// + /// Enum NUMBER_OF_CARD_ISSUANCE_CHECKSUM for value: 466 + /// + NUMBER_OF_CARD_ISSUANCE_CHECKSUM = 466, + + /// + /// Enum NUMBER_OF_CARD_ISSUANCE_CHECK_DIGIT for value: 467 + /// + NUMBER_OF_CARD_ISSUANCE_CHECK_DIGIT = 467, + + /// + /// Enum CENTURY_DATE_OF_BIRTH for value: 468 + /// + CENTURY_DATE_OF_BIRTH = 468, + + /// + /// Enum DL_CLASS_CODE_A3_FROM for value: 469 + /// + DL_CLASS_CODE_A3_FROM = 469, + + /// + /// Enum DL_CLASS_CODE_A3_TO for value: 470 + /// + DL_CLASS_CODE_A3_TO = 470, + + /// + /// Enum DL_CLASS_CODE_A3_NOTES for value: 471 + /// + DL_CLASS_CODE_A3_NOTES = 471, + + /// + /// Enum DL_CLASS_CODE_C2_FROM for value: 472 + /// + DL_CLASS_CODE_C2_FROM = 472, + + /// + /// Enum DL_CLASS_CODE_C2_TO for value: 473 + /// + DL_CLASS_CODE_C2_TO = 473, + + /// + /// Enum DL_CLASS_CODE_C2_NOTES for value: 474 + /// + DL_CLASS_CODE_C2_NOTES = 474, + + /// + /// Enum DL_CLASS_CODE_B2_FROM for value: 475 + /// + DL_CLASS_CODE_B2_FROM = 475, + + /// + /// Enum DL_CLASS_CODE_B2_TO for value: 476 + /// + DL_CLASS_CODE_B2_TO = 476, + + /// + /// Enum DL_CLASS_CODE_B2_NOTES for value: 477 + /// + DL_CLASS_CODE_B2_NOTES = 477, + + /// + /// Enum DL_CLASS_CODE_D2_FROM for value: 478 + /// + DL_CLASS_CODE_D2_FROM = 478, + + /// + /// Enum DL_CLASS_CODE_D2_TO for value: 479 + /// + DL_CLASS_CODE_D2_TO = 479, + + /// + /// Enum DL_CLASS_CODE_D2_NOTES for value: 480 + /// + DL_CLASS_CODE_D2_NOTES = 480, + + /// + /// Enum DL_CLASS_CODE_B2E_FROM for value: 481 + /// + DL_CLASS_CODE_B2E_FROM = 481, + + /// + /// Enum DL_CLASS_CODE_B2E_TO for value: 482 + /// + DL_CLASS_CODE_B2E_TO = 482, + + /// + /// Enum DL_CLASS_CODE_B2E_NOTES for value: 483 + /// + DL_CLASS_CODE_B2E_NOTES = 483, + + /// + /// Enum DL_CLASS_CODE_G_FROM for value: 484 + /// + DL_CLASS_CODE_G_FROM = 484, + + /// + /// Enum DL_CLASS_CODE_G_TO for value: 485 + /// + DL_CLASS_CODE_G_TO = 485, + + /// + /// Enum DL_CLASS_CODE_G_NOTES for value: 486 + /// + DL_CLASS_CODE_G_NOTES = 486, + + /// + /// Enum DL_CLASS_CODE_J_FROM for value: 487 + /// + DL_CLASS_CODE_J_FROM = 487, + + /// + /// Enum DL_CLASS_CODE_J_TO for value: 488 + /// + DL_CLASS_CODE_J_TO = 488, + + /// + /// Enum DL_CLASS_CODE_J_NOTES for value: 489 + /// + DL_CLASS_CODE_J_NOTES = 489, + + /// + /// Enum DL_CLASS_CODE_LC_FROM for value: 490 + /// + DL_CLASS_CODE_LC_FROM = 490, + + /// + /// Enum DL_CLASS_CODE_LC_TO for value: 491 + /// + DL_CLASS_CODE_LC_TO = 491, + + /// + /// Enum DL_CLASS_CODE_LC_NOTES for value: 492 + /// + DL_CLASS_CODE_LC_NOTES = 492, + + /// + /// Enum BANK_CARD_NUMBER for value: 493 + /// + BANK_CARD_NUMBER = 493, + + /// + /// Enum BANK_CARD_VALID_THRU for value: 494 + /// + BANK_CARD_VALID_THRU = 494, + + /// + /// Enum TAX_NUMBER for value: 495 + /// + TAX_NUMBER = 495, + + /// + /// Enum HEALTH_NUMBER for value: 496 + /// + HEALTH_NUMBER = 496, + + /// + /// Enum GRANDFATHER_NAME for value: 497 + /// + GRANDFATHER_NAME = 497, + + /// + /// Enum SELECTEE_INDICATOR for value: 498 + /// + SELECTEE_INDICATOR = 498, + + /// + /// Enum MOTHER_SURNAME for value: 499 + /// + MOTHER_SURNAME = 499, + + /// + /// Enum MOTHER_GIVEN_NAME for value: 500 + /// + MOTHER_GIVEN_NAME = 500, + + /// + /// Enum FATHER_SURNAME for value: 501 + /// + FATHER_SURNAME = 501, + + /// + /// Enum FATHER_GIVEN_NAME for value: 502 + /// + FATHER_GIVEN_NAME = 502, + + /// + /// Enum MOTHER_DATE_OF_BIRTH for value: 503 + /// + MOTHER_DATE_OF_BIRTH = 503, + + /// + /// Enum FATHER_DATE_OF_BIRTH for value: 504 + /// + FATHER_DATE_OF_BIRTH = 504, + + /// + /// Enum MOTHER_PERSONAL_NUMBER for value: 505 + /// + MOTHER_PERSONAL_NUMBER = 505, + + /// + /// Enum FATHER_PERSONAL_NUMBER for value: 506 + /// + FATHER_PERSONAL_NUMBER = 506, + + /// + /// Enum MOTHER_PLACE_OF_BIRTH for value: 507 + /// + MOTHER_PLACE_OF_BIRTH = 507, + + /// + /// Enum FATHER_PLACE_OF_BIRTH for value: 508 + /// + FATHER_PLACE_OF_BIRTH = 508, + + /// + /// Enum MOTHER_COUNTRY_OF_BIRTH for value: 509 + /// + MOTHER_COUNTRY_OF_BIRTH = 509, + + /// + /// Enum FATHER_COUNTRY_OF_BIRTH for value: 510 + /// + FATHER_COUNTRY_OF_BIRTH = 510, + + /// + /// Enum DATE_FIRST_RENEWAL for value: 511 + /// + DATE_FIRST_RENEWAL = 511, + + /// + /// Enum DATE_SECOND_RENEWAL for value: 512 + /// + DATE_SECOND_RENEWAL = 512, + + /// + /// Enum PLACE_OF_EXAMINATION for value: 513 + /// + PLACE_OF_EXAMINATION = 513, + + /// + /// Enum APPLICATION_NUMBER for value: 514 + /// + APPLICATION_NUMBER = 514, + + /// + /// Enum VOUCHER_NUMBER for value: 515 + /// + VOUCHER_NUMBER = 515, + + /// + /// Enum AUTHORIZATION_NUMBER for value: 516 + /// + AUTHORIZATION_NUMBER = 516, + + /// + /// Enum FACULTY for value: 517 + /// + FACULTY = 517, + + /// + /// Enum FORM_OF_EDUCATION for value: 518 + /// + FORM_OF_EDUCATION = 518, + + /// + /// Enum DNI_NUMBER for value: 519 + /// + DNI_NUMBER = 519, + + /// + /// Enum RETIREMENT_NUMBER for value: 520 + /// + RETIREMENT_NUMBER = 520, + + /// + /// Enum PROFESSIONAL_ID_NUMBER for value: 521 + /// + PROFESSIONAL_ID_NUMBER = 521, + + /// + /// Enum AGE_AT_ISSUE for value: 522 + /// + AGE_AT_ISSUE = 522, + + /// + /// Enum YEARS_SINCE_ISSUE for value: 523 + /// + YEARS_SINCE_ISSUE = 523, + + /// + /// Enum DL_CLASS_CODE_BTP_FROM for value: 524 + /// + DL_CLASS_CODE_BTP_FROM = 524, + + /// + /// Enum DL_CLASS_CODE_BTP_NOTES for value: 525 + /// + DL_CLASS_CODE_BTP_NOTES = 525, + + /// + /// Enum DL_CLASS_CODE_BTP_TO for value: 526 + /// + DL_CLASS_CODE_BTP_TO = 526, + + /// + /// Enum DL_CLASS_CODE_C3_FROM for value: 527 + /// + DL_CLASS_CODE_C3_FROM = 527, + + /// + /// Enum DL_CLASS_CODE_C3_NOTES for value: 528 + /// + DL_CLASS_CODE_C3_NOTES = 528, + + /// + /// Enum DL_CLASS_CODE_C3_TO for value: 529 + /// + DL_CLASS_CODE_C3_TO = 529, + + /// + /// Enum DL_CLASS_CODE_E_FROM for value: 530 + /// + DL_CLASS_CODE_E_FROM = 530, + + /// + /// Enum DL_CLASS_CODE_E_NOTES for value: 531 + /// + DL_CLASS_CODE_E_NOTES = 531, + + /// + /// Enum DL_CLASS_CODE_E_TO for value: 532 + /// + DL_CLASS_CODE_E_TO = 532, + + /// + /// Enum DL_CLASS_CODE_F_FROM for value: 533 + /// + DL_CLASS_CODE_F_FROM = 533, + + /// + /// Enum DL_CLASS_CODE_F_NOTES for value: 534 + /// + DL_CLASS_CODE_F_NOTES = 534, + + /// + /// Enum DL_CLASS_CODE_F_TO for value: 535 + /// + DL_CLASS_CODE_F_TO = 535, + + /// + /// Enum DL_CLASS_CODE_FA_FROM for value: 536 + /// + DL_CLASS_CODE_FA_FROM = 536, + + /// + /// Enum DL_CLASS_CODE_FA_NOTES for value: 537 + /// + DL_CLASS_CODE_FA_NOTES = 537, + + /// + /// Enum DL_CLASS_CODE_FA_TO for value: 538 + /// + DL_CLASS_CODE_FA_TO = 538, + + /// + /// Enum DL_CLASS_CODE_FA1_FROM for value: 539 + /// + DL_CLASS_CODE_FA1_FROM = 539, + + /// + /// Enum DL_CLASS_CODE_FA1_NOTES for value: 540 + /// + DL_CLASS_CODE_FA1_NOTES = 540, + + /// + /// Enum DL_CLASS_CODE_FA1_TO for value: 541 + /// + DL_CLASS_CODE_FA1_TO = 541, + + /// + /// Enum DL_CLASS_CODE_FB_FROM for value: 542 + /// + DL_CLASS_CODE_FB_FROM = 542, + + /// + /// Enum DL_CLASS_CODE_FB_NOTES for value: 543 + /// + DL_CLASS_CODE_FB_NOTES = 543, + + /// + /// Enum DL_CLASS_CODE_FB_TO for value: 544 + /// + DL_CLASS_CODE_FB_TO = 544, + + /// + /// Enum DL_CLASS_CODE_G1_FROM for value: 545 + /// + DL_CLASS_CODE_G1_FROM = 545, + + /// + /// Enum DL_CLASS_CODE_G1_NOTES for value: 546 + /// + DL_CLASS_CODE_G1_NOTES = 546, + + /// + /// Enum DL_CLASS_CODE_G1_TO for value: 547 + /// + DL_CLASS_CODE_G1_TO = 547, + + /// + /// Enum DL_CLASS_CODE_H_FROM for value: 548 + /// + DL_CLASS_CODE_H_FROM = 548, + + /// + /// Enum DL_CLASS_CODE_H_NOTES for value: 549 + /// + DL_CLASS_CODE_H_NOTES = 549, + + /// + /// Enum DL_CLASS_CODE_H_TO for value: 550 + /// + DL_CLASS_CODE_H_TO = 550, + + /// + /// Enum DL_CLASS_CODE_I_FROM for value: 551 + /// + DL_CLASS_CODE_I_FROM = 551, + + /// + /// Enum DL_CLASS_CODE_I_NOTES for value: 552 + /// + DL_CLASS_CODE_I_NOTES = 552, + + /// + /// Enum DL_CLASS_CODE_I_TO for value: 553 + /// + DL_CLASS_CODE_I_TO = 553, + + /// + /// Enum DL_CLASS_CODE_K_FROM for value: 554 + /// + DL_CLASS_CODE_K_FROM = 554, + + /// + /// Enum DL_CLASS_CODE_K_NOTES for value: 555 + /// + DL_CLASS_CODE_K_NOTES = 555, + + /// + /// Enum DL_CLASS_CODE_K_TO for value: 556 + /// + DL_CLASS_CODE_K_TO = 556, + + /// + /// Enum DL_CLASS_CODE_LK_FROM for value: 557 + /// + DL_CLASS_CODE_LK_FROM = 557, + + /// + /// Enum DL_CLASS_CODE_LK_NOTES for value: 558 + /// + DL_CLASS_CODE_LK_NOTES = 558, + + /// + /// Enum DL_CLASS_CODE_LK_TO for value: 559 + /// + DL_CLASS_CODE_LK_TO = 559, + + /// + /// Enum DL_CLASS_CODE_N_FROM for value: 560 + /// + DL_CLASS_CODE_N_FROM = 560, + + /// + /// Enum DL_CLASS_CODE_N_NOTES for value: 561 + /// + DL_CLASS_CODE_N_NOTES = 561, + + /// + /// Enum DL_CLASS_CODE_N_TO for value: 562 + /// + DL_CLASS_CODE_N_TO = 562, + + /// + /// Enum DL_CLASS_CODE_S_FROM for value: 563 + /// + DL_CLASS_CODE_S_FROM = 563, + + /// + /// Enum DL_CLASS_CODE_S_NOTES for value: 564 + /// + DL_CLASS_CODE_S_NOTES = 564, + + /// + /// Enum DL_CLASS_CODE_S_TO for value: 565 + /// + DL_CLASS_CODE_S_TO = 565, + + /// + /// Enum DL_CLASS_CODE_TB_FROM for value: 566 + /// + DL_CLASS_CODE_TB_FROM = 566, + + /// + /// Enum DL_CLASS_CODE_TB_NOTES for value: 567 + /// + DL_CLASS_CODE_TB_NOTES = 567, + + /// + /// Enum DL_CLASS_CODE_TB_TO for value: 568 + /// + DL_CLASS_CODE_TB_TO = 568, + + /// + /// Enum DL_CLASS_CODE_TM_FROM for value: 569 + /// + DL_CLASS_CODE_TM_FROM = 569, + + /// + /// Enum DL_CLASS_CODE_TM_NOTES for value: 570 + /// + DL_CLASS_CODE_TM_NOTES = 570, + + /// + /// Enum DL_CLASS_CODE_TM_TO for value: 571 + /// + DL_CLASS_CODE_TM_TO = 571, + + /// + /// Enum DL_CLASS_CODE_TR_FROM for value: 572 + /// + DL_CLASS_CODE_TR_FROM = 572, + + /// + /// Enum DL_CLASS_CODE_TR_NOTES for value: 573 + /// + DL_CLASS_CODE_TR_NOTES = 573, + + /// + /// Enum DL_CLASS_CODE_TR_TO for value: 574 + /// + DL_CLASS_CODE_TR_TO = 574, + + /// + /// Enum DL_CLASS_CODE_TV_FROM for value: 575 + /// + DL_CLASS_CODE_TV_FROM = 575, + + /// + /// Enum DL_CLASS_CODE_TV_NOTES for value: 576 + /// + DL_CLASS_CODE_TV_NOTES = 576, + + /// + /// Enum DL_CLASS_CODE_TV_TO for value: 577 + /// + DL_CLASS_CODE_TV_TO = 577, + + /// + /// Enum DL_CLASS_CODE_V_FROM for value: 578 + /// + DL_CLASS_CODE_V_FROM = 578, + + /// + /// Enum DL_CLASS_CODE_V_NOTES for value: 579 + /// + DL_CLASS_CODE_V_NOTES = 579, + + /// + /// Enum DL_CLASS_CODE_V_TO for value: 580 + /// + DL_CLASS_CODE_V_TO = 580, + + /// + /// Enum DL_CLASS_CODE_W_FROM for value: 581 + /// + DL_CLASS_CODE_W_FROM = 581, + + /// + /// Enum DL_CLASS_CODE_W_NOTES for value: 582 + /// + DL_CLASS_CODE_W_NOTES = 582, + + /// + /// Enum DL_CLASS_CODE_W_TO for value: 583 + /// + DL_CLASS_CODE_W_TO = 583, + + /// + /// Enum URL for value: 584 + /// + URL = 584, + + /// + /// Enum CALIBER for value: 585 + /// + CALIBER = 585, + + /// + /// Enum MODEL for value: 586 + /// + MODEL = 586, + + /// + /// Enum MAKE for value: 587 + /// + MAKE = 587, + + /// + /// Enum NUMBER_OF_CYLINDERS for value: 588 + /// + NUMBER_OF_CYLINDERS = 588, + + /// + /// Enum SURNAME_OF_HUSBAND_AFTER_REGISTRATION for value: 589 + /// + SURNAME_OF_HUSBAND_AFTER_REGISTRATION = 589, + + /// + /// Enum SURNAME_OF_WIFE_AFTER_REGISTRATION for value: 590 + /// + SURNAME_OF_WIFE_AFTER_REGISTRATION = 590, + + /// + /// Enum DATE_OF_BIRTH_OF_WIFE for value: 591 + /// + DATE_OF_BIRTH_OF_WIFE = 591, + + /// + /// Enum DATE_OF_BIRTH_OF_HUSBAND for value: 592 + /// + DATE_OF_BIRTH_OF_HUSBAND = 592, + + /// + /// Enum CITIZENSHIP_OF_FIRST_PERSON for value: 593 + /// + CITIZENSHIP_OF_FIRST_PERSON = 593, + + /// + /// Enum CITIZENSHIP_OF_SECOND_PERSON for value: 594 + /// + CITIZENSHIP_OF_SECOND_PERSON = 594, + + /// + /// Enum CVV for value: 595 + /// + CVV = 595, + + /// + /// Enum DATE_OF_INSURANCE_EXPIRY for value: 596 + /// + DATE_OF_INSURANCE_EXPIRY = 596, + + /// + /// Enum MORTGAGE_BY for value: 597 + /// + MORTGAGE_BY = 597, + + /// + /// Enum OLD_DOCUMENT_NUMBER for value: 598 + /// + OLD_DOCUMENT_NUMBER = 598, + + /// + /// Enum OLD_DATE_OF_ISSUE for value: 599 + /// + OLD_DATE_OF_ISSUE = 599, + + /// + /// Enum OLD_PLACE_OF_ISSUE for value: 600 + /// + OLD_PLACE_OF_ISSUE = 600, + + /// + /// Enum DL_CLASS_CODE_LR_FROM for value: 601 + /// + DL_CLASS_CODE_LR_FROM = 601, + + /// + /// Enum DL_CLASS_CODE_LR_TO for value: 602 + /// + DL_CLASS_CODE_LR_TO = 602, + + /// + /// Enum DL_CLASS_CODE_LR_NOTES for value: 603 + /// + DL_CLASS_CODE_LR_NOTES = 603, + + /// + /// Enum DL_CLASS_CODE_MR_FROM for value: 604 + /// + DL_CLASS_CODE_MR_FROM = 604, + + /// + /// Enum DL_CLASS_CODE_MR_TO for value: 605 + /// + DL_CLASS_CODE_MR_TO = 605, + + /// + /// Enum DL_CLASS_CODE_MR_NOTES for value: 606 + /// + DL_CLASS_CODE_MR_NOTES = 606, + + /// + /// Enum DL_CLASS_CODE_HR_FROM for value: 607 + /// + DL_CLASS_CODE_HR_FROM = 607, + + /// + /// Enum DL_CLASS_CODE_HR_TO for value: 608 + /// + DL_CLASS_CODE_HR_TO = 608, + + /// + /// Enum DL_CLASS_CODE_HR_NOTES for value: 609 + /// + DL_CLASS_CODE_HR_NOTES = 609, + + /// + /// Enum DL_CLASS_CODE_HC_FROM for value: 610 + /// + DL_CLASS_CODE_HC_FROM = 610, + + /// + /// Enum DL_CLASS_CODE_HC_TO for value: 611 + /// + DL_CLASS_CODE_HC_TO = 611, + + /// + /// Enum DL_CLASS_CODE_HC_NOTES for value: 612 + /// + DL_CLASS_CODE_HC_NOTES = 612, + + /// + /// Enum DL_CLASS_CODE_MC_FROM for value: 613 + /// + DL_CLASS_CODE_MC_FROM = 613, + + /// + /// Enum DL_CLASS_CODE_MC_TO for value: 614 + /// + DL_CLASS_CODE_MC_TO = 614, + + /// + /// Enum DL_CLASS_CODE_MC_NOTES for value: 615 + /// + DL_CLASS_CODE_MC_NOTES = 615, + + /// + /// Enum DL_CLASS_CODE_RE_FROM for value: 616 + /// + DL_CLASS_CODE_RE_FROM = 616, + + /// + /// Enum DL_CLASS_CODE_RE_TO for value: 617 + /// + DL_CLASS_CODE_RE_TO = 617, + + /// + /// Enum DL_CLASS_CODE_RE_NOTES for value: 618 + /// + DL_CLASS_CODE_RE_NOTES = 618, + + /// + /// Enum DL_CLASS_CODE_R_FROM for value: 619 + /// + DL_CLASS_CODE_R_FROM = 619, + + /// + /// Enum DL_CLASS_CODE_R_TO for value: 620 + /// + DL_CLASS_CODE_R_TO = 620, + + /// + /// Enum DL_CLASS_CODE_R_NOTES for value: 621 + /// + DL_CLASS_CODE_R_NOTES = 621, + + /// + /// Enum DL_CLASS_CODE_CA_FROM for value: 622 + /// + DL_CLASS_CODE_CA_FROM = 622, + + /// + /// Enum DL_CLASS_CODE_CA_TO for value: 623 + /// + DL_CLASS_CODE_CA_TO = 623, + + /// + /// Enum DL_CLASS_CODE_CA_NOTES for value: 624 + /// + DL_CLASS_CODE_CA_NOTES = 624, + + /// + /// Enum CITIZENSHIP_STATUS for value: 625 + /// + CITIZENSHIP_STATUS = 625, + + /// + /// Enum MILITARY_SERVICE_FROM for value: 626 + /// + MILITARY_SERVICE_FROM = 626, + + /// + /// Enum MILITARY_SERVICE_TO for value: 627 + /// + MILITARY_SERVICE_TO = 627, + + /// + /// Enum DL_CLASS_CODE_NT_FROM for value: 628 + /// + DL_CLASS_CODE_NT_FROM = 628, + + /// + /// Enum DL_CLASS_CODE_NT_TO for value: 629 + /// + DL_CLASS_CODE_NT_TO = 629, + + /// + /// Enum DL_CLASS_CODE_NT_NOTES for value: 630 + /// + DL_CLASS_CODE_NT_NOTES = 630, + + /// + /// Enum DL_CLASS_CODE_TN_FROM for value: 631 + /// + DL_CLASS_CODE_TN_FROM = 631, + + /// + /// Enum DL_CLASS_CODE_TN_TO for value: 632 + /// + DL_CLASS_CODE_TN_TO = 632, + + /// + /// Enum DL_CLASS_CODE_TN_NOTES for value: 633 + /// + DL_CLASS_CODE_TN_NOTES = 633, + + /// + /// Enum DL_CLASS_CODE_D3_FROM for value: 634 + /// + DL_CLASS_CODE_D3_FROM = 634, + + /// + /// Enum DL_CLASS_CODE_D3_TO for value: 635 + /// + DL_CLASS_CODE_D3_TO = 635, + + /// + /// Enum DL_CLASS_CODE_D3_NOTES for value: 636 + /// + DL_CLASS_CODE_D3_NOTES = 636, + + /// + /// Enum ALT_DATE_OF_EXPIRY for value: 637 + /// + ALT_DATE_OF_EXPIRY = 637, + + /// + /// Enum DL_CLASS_CODE_CD_FROM for value: 638 + /// + DL_CLASS_CODE_CD_FROM = 638, + + /// + /// Enum DL_CLASS_CODE_CD_TO for value: 639 + /// + DL_CLASS_CODE_CD_TO = 639, + + /// + /// Enum DL_CLASS_CODE_CD_NOTES for value: 640 + /// + DL_CLASS_CODE_CD_NOTES = 640, + + /// + /// Enum ISSUER_IDENTIFICATION_NUMBER for value: 641 + /// + ISSUER_IDENTIFICATION_NUMBER = 641, + + /// + /// Enum PAYMENT_PERIOD_FROM for value: 642 + /// + PAYMENT_PERIOD_FROM = 642, + + /// + /// Enum PAYMENT_PERIOD_TO for value: 643 + /// + PAYMENT_PERIOD_TO = 643, + + /// + /// Enum VACCINATION_CERTIFICATE_IDENTIFIER for value: 644 + /// + VACCINATION_CERTIFICATE_IDENTIFIER = 644, + + /// + /// Enum FIRST_NAME for value: 645 + /// + FIRST_NAME = 645, + + /// + /// Enum DATE_OF_ARRIVAL for value: 646 + /// + DATE_OF_ARRIVAL = 646, + + /// + /// Enum SECOND_NAME for value: 647 + /// + SECOND_NAME = 647, + + /// + /// Enum THIRD_NAME for value: 648 + /// + THIRD_NAME = 648, + + /// + /// Enum FOURTH_NAME for value: 649 + /// + FOURTH_NAME = 649, + + /// + /// Enum LAST_NAME for value: 650 + /// + LAST_NAME = 650, + + /// + /// Enum DL_CLASS_CODE_RM_FROM for value: 651 + /// + DL_CLASS_CODE_RM_FROM = 651, + + /// + /// Enum DL_CLASS_CODE_RM_NOTES for value: 652 + /// + DL_CLASS_CODE_RM_NOTES = 652, + + /// + /// Enum DL_CLASS_CODE_RM_TO for value: 653 + /// + DL_CLASS_CODE_RM_TO = 653, + + /// + /// Enum DL_CLASS_CODE_PW_FROM for value: 654 + /// + DL_CLASS_CODE_PW_FROM = 654, + + /// + /// Enum DL_CLASS_CODE_PW_NOTES for value: 655 + /// + DL_CLASS_CODE_PW_NOTES = 655, + + /// + /// Enum DL_CLASS_CODE_PW_TO for value: 656 + /// + DL_CLASS_CODE_PW_TO = 656, + + /// + /// Enum DL_CLASS_CODE_EB_FROM for value: 657 + /// + DL_CLASS_CODE_EB_FROM = 657, + + /// + /// Enum DL_CLASS_CODE_EB_NOTES for value: 658 + /// + DL_CLASS_CODE_EB_NOTES = 658, + + /// + /// Enum DL_CLASS_CODE_EB_TO for value: 659 + /// + DL_CLASS_CODE_EB_TO = 659, + + /// + /// Enum DL_CLASS_CODE_EC_FROM for value: 660 + /// + DL_CLASS_CODE_EC_FROM = 660, + + /// + /// Enum DL_CLASS_CODE_EC_NOTES for value: 661 + /// + DL_CLASS_CODE_EC_NOTES = 661, + + /// + /// Enum DL_CLASS_CODE_EC_TO for value: 662 + /// + DL_CLASS_CODE_EC_TO = 662, + + /// + /// Enum DL_CLASS_CODE_EC1_FROM for value: 663 + /// + DL_CLASS_CODE_EC1_FROM = 663, + + /// + /// Enum DL_CLASS_CODE_EC1_NOTES for value: 664 + /// + DL_CLASS_CODE_EC1_NOTES = 664, + + /// + /// Enum DL_CLASS_CODE_EC1_TO for value: 665 + /// + DL_CLASS_CODE_EC1_TO = 665, + + /// + /// Enum PLACE_OF_BIRTH_CITY for value: 666 + /// + PLACE_OF_BIRTH_CITY = 666, + + /// + /// Enum YEAR_OF_BIRTH for value: 667 + /// + YEAR_OF_BIRTH = 667, + + /// + /// Enum YEAR_OF_EXPIRY for value: 668 + /// + YEAR_OF_EXPIRY = 668, + + /// + /// Enum GRANDFATHER_NAME_MATERNAL for value: 669 + /// + GRANDFATHER_NAME_MATERNAL = 669, + + /// + /// Enum FIRST_SURNAME for value: 670 + /// + FIRST_SURNAME = 670, + + /// + /// Enum MONTH_OF_BIRTH for value: 671 + /// + MONTH_OF_BIRTH = 671, + + /// + /// Enum ADDRESS_FLOOR_NUMBER for value: 672 + /// + ADDRESS_FLOOR_NUMBER = 672, + + /// + /// Enum ADDRESS_ENTRANCE for value: 673 + /// + ADDRESS_ENTRANCE = 673, + + /// + /// Enum ADDRESS_BLOCK_NUMBER for value: 674 + /// + ADDRESS_BLOCK_NUMBER = 674, + + /// + /// Enum ADDRESS_STREET_NUMBER for value: 675 + /// + ADDRESS_STREET_NUMBER = 675, + + /// + /// Enum ADDRESS_STREET_TYPE for value: 676 + /// + ADDRESS_STREET_TYPE = 676, + + /// + /// Enum ADDRESS_CITY_SECTOR for value: 677 + /// + ADDRESS_CITY_SECTOR = 677, + + /// + /// Enum ADDRESS_COUNTY_TYPE for value: 678 + /// + ADDRESS_COUNTY_TYPE = 678, + + /// + /// Enum ADDRESS_CITY_TYPE for value: 679 + /// + ADDRESS_CITY_TYPE = 679, + + /// + /// Enum ADDRESS_BUILDING_TYPE for value: 680 + /// + ADDRESS_BUILDING_TYPE = 680, + + /// + /// Enum DATE_OF_RETIREMENT for value: 681 + /// + DATE_OF_RETIREMENT = 681, + + /// + /// Enum DOCUMENT_STATUS for value: 682 + /// + DOCUMENT_STATUS = 682, + + /// + /// Enum SIGNATURE for value: 683 + /// + SIGNATURE = 683, + + /// + /// Enum FT_UNIQUE_CERTIFICATE_IDENTIFIER for value: 684 + /// + FT_UNIQUE_CERTIFICATE_IDENTIFIER = 684, + + /// + /// Enum FT_EMAIL for value: 685 + /// + FT_EMAIL = 685, + + /// + /// Enum FT_DATE_OF_SPECIMEN_COLLECTION for value: 686 + /// + FT_DATE_OF_SPECIMEN_COLLECTION = 686, + + /// + /// Enum FT_TYPE_OF_TESTING for value: 687 + /// + FT_TYPE_OF_TESTING = 687, + + /// + /// Enum FT_RESULT_OF_TESTING for value: 688 + /// + FT_RESULT_OF_TESTING = 688, + + /// + /// Enum FT_METHOD_OF_TESTING for value: 689 + /// + FT_METHOD_OF_TESTING = 689, + + /// + /// Enum FT_DIGITAL_TRAVEL_AUTHORIZATION_NUMBER for value: 690 + /// + FT_DIGITAL_TRAVEL_AUTHORIZATION_NUMBER = 690, + + /// + /// Enum FT_DATE_OF_FIRST_POSITIVE_TEST_RESULT for value: 691 + /// + FT_DATE_OF_FIRST_POSITIVE_TEST_RESULT = 691, + + /// + /// Enum EF_CARD_ACCESS for value: 692 + /// + EF_CARD_ACCESS = 692 + } + + /// + /// Converts to and from the JSON value + /// + public static class TextFieldTypeValueConverter { + /// + /// Parses a given value to + /// + /// + /// + public static TextFieldType FromString(string value) + { + if (value.Equals((0).ToString())) + return TextFieldType.DOCUMENT_CLASS_CODE; + + if (value.Equals((1).ToString())) + return TextFieldType.ISSUING_STATE_CODE; + + if (value.Equals((2).ToString())) + return TextFieldType.DOCUMENT_NUMBER; + + if (value.Equals((3).ToString())) + return TextFieldType.DATE_OF_EXPIRY; + + if (value.Equals((4).ToString())) + return TextFieldType.DATE_OF_ISSUE; + + if (value.Equals((5).ToString())) + return TextFieldType.DATE_OF_BIRTH; + + if (value.Equals((6).ToString())) + return TextFieldType.PLACE_OF_BIRTH; + + if (value.Equals((7).ToString())) + return TextFieldType.PERSONAL_NUMBER; + + if (value.Equals((8).ToString())) + return TextFieldType.SURNAME; + + if (value.Equals((9).ToString())) + return TextFieldType.GIVEN_NAMES; + + if (value.Equals((10).ToString())) + return TextFieldType.MOTHERS_NAME; + + if (value.Equals((11).ToString())) + return TextFieldType.NATIONALITY; + + if (value.Equals((12).ToString())) + return TextFieldType.SEX; + + if (value.Equals((13).ToString())) + return TextFieldType.HEIGHT; + + if (value.Equals((14).ToString())) + return TextFieldType.WEIGHT; + + if (value.Equals((15).ToString())) + return TextFieldType.EYES_COLOR; + + if (value.Equals((16).ToString())) + return TextFieldType.HAIR_COLOR; + + if (value.Equals((17).ToString())) + return TextFieldType.ADDRESS; + + if (value.Equals((18).ToString())) + return TextFieldType.DONOR; + + if (value.Equals((19).ToString())) + return TextFieldType.SOCIAL_SECURITY_NUMBER; + + if (value.Equals((20).ToString())) + return TextFieldType.DL_CLASS; + + if (value.Equals((21).ToString())) + return TextFieldType.DL_ENDORSED; + + if (value.Equals((22).ToString())) + return TextFieldType.DL_RESTRICTION_CODE; + + if (value.Equals((23).ToString())) + return TextFieldType.DL_UNDER_21_DATE; + + if (value.Equals((24).ToString())) + return TextFieldType.AUTHORITY; + + if (value.Equals((25).ToString())) + return TextFieldType.SURNAME_AND_GIVEN_NAMES; + + if (value.Equals((26).ToString())) + return TextFieldType.NATIONALITY_CODE; + + if (value.Equals((27).ToString())) + return TextFieldType.PASSPORT_NUMBER; + + if (value.Equals((28).ToString())) + return TextFieldType.INVITATION_NUMBER; + + if (value.Equals((29).ToString())) + return TextFieldType.VISA_ID; + + if (value.Equals((30).ToString())) + return TextFieldType.VISA_CLASS; + + if (value.Equals((31).ToString())) + return TextFieldType.VISA_SUBCLASS; + + if (value.Equals((35).ToString())) + return TextFieldType.MRZ_TYPE; + + if (value.Equals((36).ToString())) + return TextFieldType.OPTIONAL_DATA; + + if (value.Equals((37).ToString())) + return TextFieldType.DOCUMENT_CLASS_NAME; + + if (value.Equals((38).ToString())) + return TextFieldType.ISSUING_STATE_NAME; + + if (value.Equals((39).ToString())) + return TextFieldType.PLACE_OF_ISSUE; + + if (value.Equals((40).ToString())) + return TextFieldType.DOCUMENT_NUMBER_CHECKSUM; + + if (value.Equals((41).ToString())) + return TextFieldType.DATE_OF_BIRTH_CHECKSUM; + + if (value.Equals((42).ToString())) + return TextFieldType.DATE_OF_EXPIRY_CHECKSUM; + + if (value.Equals((43).ToString())) + return TextFieldType.PERSONAL_NUMBER_CHECKSUM; + + if (value.Equals((44).ToString())) + return TextFieldType.FINAL_CHECKSUM; + + if (value.Equals((45).ToString())) + return TextFieldType.PASSPORT_NUMBER_CHECKSUM; + + if (value.Equals((46).ToString())) + return TextFieldType.INVITATION_NUMBER_CHECKSUM; + + if (value.Equals((47).ToString())) + return TextFieldType.VISA_ID_CHECKSUM; + + if (value.Equals((48).ToString())) + return TextFieldType.SURNAME_AND_GIVEN_NAMES_CHECKSUM; + + if (value.Equals((49).ToString())) + return TextFieldType.VISA_VALID_UNTIL_CHECKSUM; + + if (value.Equals((50).ToString())) + return TextFieldType.OTHER; + + if (value.Equals((51).ToString())) + return TextFieldType.MRZ_STRINGS; + + if (value.Equals((52).ToString())) + return TextFieldType.NAME_SUFFIX; + + if (value.Equals((53).ToString())) + return TextFieldType.NAME_PREFIX; + + if (value.Equals((54).ToString())) + return TextFieldType.DATE_OF_ISSUE_CHECKSUM; + + if (value.Equals((55).ToString())) + return TextFieldType.DATE_OF_ISSUE_CHECK_DIGIT; + + if (value.Equals((56).ToString())) + return TextFieldType.DOCUMENT_SERIES; + + if (value.Equals((57).ToString())) + return TextFieldType.REG_CERT_REG_NUMBER; + + if (value.Equals((58).ToString())) + return TextFieldType.REG_CERT_CAR_MODEL; + + if (value.Equals((59).ToString())) + return TextFieldType.REG_CERT_CAR_COLOR; + + if (value.Equals((60).ToString())) + return TextFieldType.REG_CERT_BODY_NUMBER; + + if (value.Equals((61).ToString())) + return TextFieldType.REG_CERT_CAR_TYPE; + + if (value.Equals((62).ToString())) + return TextFieldType.REG_CERT_MAX_WEIGHT; + + if (value.Equals((63).ToString())) + return TextFieldType.REG_CERT_WEIGHT; + + if (value.Equals((64).ToString())) + return TextFieldType.ADDRESS_AREA; + + if (value.Equals((65).ToString())) + return TextFieldType.ADDRESS_STATE; + + if (value.Equals((66).ToString())) + return TextFieldType.ADDRESS_BUILDING; + + if (value.Equals((67).ToString())) + return TextFieldType.ADDRESS_HOUSE; + + if (value.Equals((68).ToString())) + return TextFieldType.ADDRESS_FLAT; + + if (value.Equals((69).ToString())) + return TextFieldType.PLACE_OF_REGISTRATION; + + if (value.Equals((70).ToString())) + return TextFieldType.DATE_OF_REGISTRATION; + + if (value.Equals((71).ToString())) + return TextFieldType.RESIDENT_FROM; + + if (value.Equals((72).ToString())) + return TextFieldType.RESIDENT_UNTIL; + + if (value.Equals((73).ToString())) + return TextFieldType.AUTHORITY_CODE; + + if (value.Equals((74).ToString())) + return TextFieldType.PLACE_OF_BIRTH_AREA; + + if (value.Equals((75).ToString())) + return TextFieldType.PLACE_OF_BIRTH_STATE_CODE; + + if (value.Equals((76).ToString())) + return TextFieldType.ADDRESS_STREET; + + if (value.Equals((77).ToString())) + return TextFieldType.ADDRESS_CITY; + + if (value.Equals((78).ToString())) + return TextFieldType.ADDRESS_JURISDICTION_CODE; + + if (value.Equals((79).ToString())) + return TextFieldType.ADDRESS_POSTAL_CODE; + + if (value.Equals((80).ToString())) + return TextFieldType.DOCUMENT_NUMBER_CHECK_DIGIT; + + if (value.Equals((81).ToString())) + return TextFieldType.DATE_OF_BIRTH_CHECK_DIGIT; + + if (value.Equals((82).ToString())) + return TextFieldType.DATE_OF_EXPIRY_CHECK_DIGIT; + + if (value.Equals((83).ToString())) + return TextFieldType.PERSONAL_NUMBER_CHECK_DIGIT; + + if (value.Equals((84).ToString())) + return TextFieldType.FINAL_CHECK_DIGIT; + + if (value.Equals((85).ToString())) + return TextFieldType.PASSPORT_NUMBER_CHECK_DIGIT; + + if (value.Equals((86).ToString())) + return TextFieldType.INVITATION_NUMBER_CHECK_DIGIT; + + if (value.Equals((87).ToString())) + return TextFieldType.VISA_ID_CHECK_DIGIT; + + if (value.Equals((88).ToString())) + return TextFieldType.SURNAME_AND_GIVEN_NAMES_CHECK_DIGIT; + + if (value.Equals((89).ToString())) + return TextFieldType.VISA_VALID_UNTIL_CHECK_DIGIT; + + if (value.Equals((90).ToString())) + return TextFieldType.PERMIT_DL_CLASS; + + if (value.Equals((91).ToString())) + return TextFieldType.PERMIT_DATE_OF_EXPIRY; + + if (value.Equals((92).ToString())) + return TextFieldType.PERMIT_IDENTIFIER; + + if (value.Equals((93).ToString())) + return TextFieldType.PERMIT_DATE_OF_ISSUE; + + if (value.Equals((94).ToString())) + return TextFieldType.PERMIT_RESTRICTION_CODE; + + if (value.Equals((95).ToString())) + return TextFieldType.PERMIT_ENDORSED; + + if (value.Equals((96).ToString())) + return TextFieldType.ISSUE_TIMESTAMP; + + if (value.Equals((97).ToString())) + return TextFieldType.NUMBER_OF_DUPLICATES; + + if (value.Equals((98).ToString())) + return TextFieldType.MEDICAL_INDICATOR_CODES; + + if (value.Equals((99).ToString())) + return TextFieldType.NON_RESIDENT_INDICATOR; + + if (value.Equals((100).ToString())) + return TextFieldType.VISA_TYPE; + + if (value.Equals((101).ToString())) + return TextFieldType.VISA_VALID_FROM; + + if (value.Equals((102).ToString())) + return TextFieldType.VISA_VALID_UNTIL; + + if (value.Equals((103).ToString())) + return TextFieldType.DURATION_OF_STAY; + + if (value.Equals((104).ToString())) + return TextFieldType.NUMBER_OF_ENTRIES; + + if (value.Equals((105).ToString())) + return TextFieldType.DAY; + + if (value.Equals((106).ToString())) + return TextFieldType.MONTH; + + if (value.Equals((107).ToString())) + return TextFieldType.YEAR; + + if (value.Equals((108).ToString())) + return TextFieldType.UNIQUE_CUSTOMER_IDENTIFIER; + + if (value.Equals((109).ToString())) + return TextFieldType.COMMERCIAL_VEHICLE_CODES; + + if (value.Equals((110).ToString())) + return TextFieldType.AKA_DATE_OF_BIRTH; + + if (value.Equals((111).ToString())) + return TextFieldType.AKA_SOCIAL_SECURITY_NUMBER; + + if (value.Equals((112).ToString())) + return TextFieldType.AKA_SURNAME; + + if (value.Equals((113).ToString())) + return TextFieldType.AKA_GIVEN_NAMES; + + if (value.Equals((114).ToString())) + return TextFieldType.AKA_NAME_SUFFIX; + + if (value.Equals((115).ToString())) + return TextFieldType.AKA_NAME_PREFIX; + + if (value.Equals((116).ToString())) + return TextFieldType.MAILING_ADDRESS_STREET; + + if (value.Equals((117).ToString())) + return TextFieldType.MAILING_ADDRESS_CITY; + + if (value.Equals((118).ToString())) + return TextFieldType.MAILING_ADDRESS_JURISDICTION_CODE; + + if (value.Equals((119).ToString())) + return TextFieldType.MAILING_ADDRESS_POSTAL_CODE; + + if (value.Equals((120).ToString())) + return TextFieldType.AUDIT_INFORMATION; + + if (value.Equals((121).ToString())) + return TextFieldType.INVENTORY_NUMBER; + + if (value.Equals((122).ToString())) + return TextFieldType.RACE_ETHNICITY; + + if (value.Equals((123).ToString())) + return TextFieldType.JURISDICTION_VEHICLE_CLASS; + + if (value.Equals((124).ToString())) + return TextFieldType.JURISDICTION_ENDORSEMENT_CODE; + + if (value.Equals((125).ToString())) + return TextFieldType.JURISDICTION_RESTRICTION_CODE; + + if (value.Equals((126).ToString())) + return TextFieldType.FAMILY_NAME; + + if (value.Equals((127).ToString())) + return TextFieldType.GIVEN_NAMES_RUS; + + if (value.Equals((128).ToString())) + return TextFieldType.VISA_ID_RUS; + + if (value.Equals((129).ToString())) + return TextFieldType.FATHERS_NAME; + + if (value.Equals((130).ToString())) + return TextFieldType.FATHERS_NAME_RUS; + + if (value.Equals((131).ToString())) + return TextFieldType.SURNAME_AND_GIVEN_NAMES_RUS; + + if (value.Equals((132).ToString())) + return TextFieldType.PLACE_OF_BIRTH_RUS; + + if (value.Equals((133).ToString())) + return TextFieldType.AUTHORITY_RUS; + + if (value.Equals((134).ToString())) + return TextFieldType.ISSUING_STATE_CODE_NUMERIC; + + if (value.Equals((135).ToString())) + return TextFieldType.NATIONALITY_CODE_NUMERIC; + + if (value.Equals((136).ToString())) + return TextFieldType.ENGINE_POWER; + + if (value.Equals((137).ToString())) + return TextFieldType.ENGINE_VOLUME; + + if (value.Equals((138).ToString())) + return TextFieldType.CHASSIS_NUMBER; + + if (value.Equals((139).ToString())) + return TextFieldType.ENGINE_NUMBER; + + if (value.Equals((140).ToString())) + return TextFieldType.ENGINE_MODEL; + + if (value.Equals((141).ToString())) + return TextFieldType.VEHICLE_CATEGORY; + + if (value.Equals((142).ToString())) + return TextFieldType.IDENTITY_CARD_NUMBER; + + if (value.Equals((143).ToString())) + return TextFieldType.CONTROL_NUMBER; + + if (value.Equals((144).ToString())) + return TextFieldType.PARENTS_GIVEN_NAMES; + + if (value.Equals((145).ToString())) + return TextFieldType.SECOND_SURNAME; + + if (value.Equals((146).ToString())) + return TextFieldType.MIDDLE_NAME; + + if (value.Equals((147).ToString())) + return TextFieldType.REG_CERT_VIN; + + if (value.Equals((148).ToString())) + return TextFieldType.REG_CERT_VIN_CHECK_DIGIT; + + if (value.Equals((149).ToString())) + return TextFieldType.REG_CERT_VIN_CHECKSUM; + + if (value.Equals((150).ToString())) + return TextFieldType.LINE_1_CHECK_DIGIT; + + if (value.Equals((151).ToString())) + return TextFieldType.LINE_2_CHECK_DIGIT; + + if (value.Equals((152).ToString())) + return TextFieldType.LINE_3_CHECK_DIGIT; + + if (value.Equals((153).ToString())) + return TextFieldType.LINE_1_CHECKSUM; + + if (value.Equals((154).ToString())) + return TextFieldType.LINE_2_CHECKSUM; + + if (value.Equals((155).ToString())) + return TextFieldType.LINE_3_CHECKSUM; + + if (value.Equals((156).ToString())) + return TextFieldType.REG_CERT_REG_NUMBER_CHECK_DIGIT; + + if (value.Equals((157).ToString())) + return TextFieldType.REG_CERT_REG_NUMBER_CHECKSUM; + + if (value.Equals((158).ToString())) + return TextFieldType.REG_CERT_VEHICLE_ITS_CODE; + + if (value.Equals((159).ToString())) + return TextFieldType.CARD_ACCESS_NUMBER; + + if (value.Equals((160).ToString())) + return TextFieldType.MARITAL_STATUS; + + if (value.Equals((161).ToString())) + return TextFieldType.COMPANY_NAME; + + if (value.Equals((162).ToString())) + return TextFieldType.SPECIAL_NOTES; + + if (value.Equals((163).ToString())) + return TextFieldType.SURNAME_OF_SPOUSE; + + if (value.Equals((164).ToString())) + return TextFieldType.TRACKING_NUMBER; + + if (value.Equals((165).ToString())) + return TextFieldType.BOOKLET_NUMBER; + + if (value.Equals((166).ToString())) + return TextFieldType.CHILDREN; + + if (value.Equals((167).ToString())) + return TextFieldType.COPY; + + if (value.Equals((168).ToString())) + return TextFieldType.SERIAL_NUMBER; + + if (value.Equals((169).ToString())) + return TextFieldType.DOSSIER_NUMBER; + + if (value.Equals((170).ToString())) + return TextFieldType.AKA_SURNAME_AND_GIVEN_NAMES; + + if (value.Equals((171).ToString())) + return TextFieldType.TERRITORIAL_VALIDITY; + + if (value.Equals((172).ToString())) + return TextFieldType.MRZ_STRINGS_WITH_CORRECT_CHECK_SUMS; + + if (value.Equals((173).ToString())) + return TextFieldType.DL_CDL_RESTRICTION_CODE; + + if (value.Equals((174).ToString())) + return TextFieldType.DL_UNDER_18_DATE; + + if (value.Equals((175).ToString())) + return TextFieldType.DL_RECORD_CREATED; + + if (value.Equals((176).ToString())) + return TextFieldType.DL_DUPLICATE_DATE; + + if (value.Equals((177).ToString())) + return TextFieldType.DL_ISSUE_TYPE; + + if (value.Equals((178).ToString())) + return TextFieldType.MILITARY_BOOK_NUMBER; + + if (value.Equals((179).ToString())) + return TextFieldType.DESTINATION; + + if (value.Equals((180).ToString())) + return TextFieldType.BLOOD_GROUP; + + if (value.Equals((181).ToString())) + return TextFieldType.SEQUENCE_NUMBER; + + if (value.Equals((182).ToString())) + return TextFieldType.REG_CERT_BODY_TYPE; + + if (value.Equals((183).ToString())) + return TextFieldType.REG_CERT_CAR_MARK; + + if (value.Equals((184).ToString())) + return TextFieldType.TRANSACTION_NUMBER; + + if (value.Equals((185).ToString())) + return TextFieldType.AGE; + + if (value.Equals((186).ToString())) + return TextFieldType.FOLIO_NUMBER; + + if (value.Equals((187).ToString())) + return TextFieldType.VOTER_KEY; + + if (value.Equals((188).ToString())) + return TextFieldType.ADDRESS_MUNICIPALITY; + + if (value.Equals((189).ToString())) + return TextFieldType.ADDRESS_LOCATION; + + if (value.Equals((190).ToString())) + return TextFieldType.SECTION; + + if (value.Equals((191).ToString())) + return TextFieldType.OCR_NUMBER; + + if (value.Equals((192).ToString())) + return TextFieldType.FEDERAL_ELECTIONS; + + if (value.Equals((193).ToString())) + return TextFieldType.REFERENCE_NUMBER; + + if (value.Equals((194).ToString())) + return TextFieldType.OPTIONAL_DATA_CHECKSUM; + + if (value.Equals((195).ToString())) + return TextFieldType.OPTIONAL_DATA_CHECK_DIGIT; + + if (value.Equals((196).ToString())) + return TextFieldType.VISA_NUMBER; + + if (value.Equals((197).ToString())) + return TextFieldType.VISA_NUMBER_CHECKSUM; + + if (value.Equals((198).ToString())) + return TextFieldType.VISA_NUMBER_CHECK_DIGIT; + + if (value.Equals((199).ToString())) + return TextFieldType.VOTER; + + if (value.Equals((200).ToString())) + return TextFieldType.PREVIOUS_TYPE; + + if (value.Equals((220).ToString())) + return TextFieldType.FIELD_FROM_MRZ; + + if (value.Equals((221).ToString())) + return TextFieldType.CURRENT_DATE; + + if (value.Equals((251).ToString())) + return TextFieldType.STATUS_DATE_OF_EXPIRY; + + if (value.Equals((252).ToString())) + return TextFieldType.BANKNOTE_NUMBER; + + if (value.Equals((253).ToString())) + return TextFieldType.CSC_CODE; + + if (value.Equals((254).ToString())) + return TextFieldType.ARTISTIC_NAME; + + if (value.Equals((255).ToString())) + return TextFieldType.ACADEMIC_TITLE; + + if (value.Equals((256).ToString())) + return TextFieldType.ADDRESS_COUNTRY; + + if (value.Equals((257).ToString())) + return TextFieldType.ADDRESS_ZIP_CODE; + + if (value.Equals((258).ToString())) + return TextFieldType.E_ID_RESIDENCE_PERMIT_1; + + if (value.Equals((259).ToString())) + return TextFieldType.E_ID_RESIDENCE_PERMIT_2; + + if (value.Equals((260).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_STREET; + + if (value.Equals((261).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_CITY; + + if (value.Equals((262).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_STATE; + + if (value.Equals((263).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_COUNTRY; + + if (value.Equals((264).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_ZIP_CODE; + + if (value.Equals((265).ToString())) + return TextFieldType.CDL_CLASS; + + if (value.Equals((266).ToString())) + return TextFieldType.DL_UNDER_19_DATE; + + if (value.Equals((267).ToString())) + return TextFieldType.WEIGHT_POUNDS; + + if (value.Equals((268).ToString())) + return TextFieldType.LIMITED_DURATION_DOCUMENT_INDICATOR; + + if (value.Equals((269).ToString())) + return TextFieldType.ENDORSEMENT_EXPIRATION_DATE; + + if (value.Equals((270).ToString())) + return TextFieldType.REVISION_DATE; + + if (value.Equals((271).ToString())) + return TextFieldType.COMPLIANCE_TYPE; + + if (value.Equals((272).ToString())) + return TextFieldType.FAMILY_NAME_TRUNCATION; + + if (value.Equals((273).ToString())) + return TextFieldType.FIRST_NAME_TRUNCATION; + + if (value.Equals((274).ToString())) + return TextFieldType.MIDDLE_NAME_TRUNCATION; + + if (value.Equals((275).ToString())) + return TextFieldType.EXAM_DATE; + + if (value.Equals((276).ToString())) + return TextFieldType.ORGANIZATION; + + if (value.Equals((277).ToString())) + return TextFieldType.DEPARTMENT; + + if (value.Equals((278).ToString())) + return TextFieldType.PAY_GRADE; + + if (value.Equals((279).ToString())) + return TextFieldType.RANK; + + if (value.Equals((280).ToString())) + return TextFieldType.BENEFITS_NUMBER; + + if (value.Equals((281).ToString())) + return TextFieldType.SPONSOR_SERVICE; + + if (value.Equals((282).ToString())) + return TextFieldType.SPONSOR_STATUS; + + if (value.Equals((283).ToString())) + return TextFieldType.SPONSOR; + + if (value.Equals((284).ToString())) + return TextFieldType.RELATIONSHIP; + + if (value.Equals((285).ToString())) + return TextFieldType.USCIS; + + if (value.Equals((286).ToString())) + return TextFieldType.CATEGORY; + + if (value.Equals((287).ToString())) + return TextFieldType.CONDITIONS; + + if (value.Equals((288).ToString())) + return TextFieldType.IDENTIFIER; + + if (value.Equals((289).ToString())) + return TextFieldType.CONFIGURATION; + + if (value.Equals((290).ToString())) + return TextFieldType.DISCRETIONARY_DATA; + + if (value.Equals((291).ToString())) + return TextFieldType.LINE_1_OPTIONAL_DATA; + + if (value.Equals((292).ToString())) + return TextFieldType.LINE_2_OPTIONAL_DATA; + + if (value.Equals((293).ToString())) + return TextFieldType.LINE_3_OPTIONAL_DATA; + + if (value.Equals((294).ToString())) + return TextFieldType.EQV_CODE; + + if (value.Equals((295).ToString())) + return TextFieldType.ALT_CODE; + + if (value.Equals((296).ToString())) + return TextFieldType.BINARY_CODE; + + if (value.Equals((297).ToString())) + return TextFieldType.PSEUDO_CODE; - /** Document class code */ - public const int DOCUMENT_CLASS_CODE = 0; + if (value.Equals((298).ToString())) + return TextFieldType.FEE; - /** Issuing country document code in accordance with the standard ISO 3166-1 (ICAO, document 9303) */ - public const int ISSUING_STATE_CODE = 1; + if (value.Equals((299).ToString())) + return TextFieldType.STAMP_NUMBER; - /** Document number */ - public const int DOCUMENT_NUMBER = 2; + if (value.Equals((300).ToString())) + return TextFieldType.SBH_SECURITY_OPTIONS; - /** Document expiration date */ - public const int DATE_OF_EXPIRY = 3; + if (value.Equals((301).ToString())) + return TextFieldType.SBH_INTEGRITY_OPTIONS; - /** Date of issue */ - public const int DATE_OF_ISSUE = 4; + if (value.Equals((302).ToString())) + return TextFieldType.DATE_OF_CREATION; - /** Date of birth */ - public const int DATE_OF_BIRTH = 5; + if (value.Equals((303).ToString())) + return TextFieldType.VALIDITY_PERIOD; - /** Place of birth */ - public const int PLACE_OF_BIRTH = 6; + if (value.Equals((304).ToString())) + return TextFieldType.PATRON_HEADER_VERSION; - /** Personal number */ - public const int PERSONAL_NUMBER = 7; + if (value.Equals((305).ToString())) + return TextFieldType.BDB_TYPE; - /** Surname */ - public const int SURNAME = 8; + if (value.Equals((306).ToString())) + return TextFieldType.BIOMETRIC_TYPE; - /** Given name (names) */ - public const int GIVEN_NAME = 9; + if (value.Equals((307).ToString())) + return TextFieldType.BIOMETRIC_SUBTYPE; - /** Mother`s name */ - public const int MOTHERS_NAME = 10; + if (value.Equals((308).ToString())) + return TextFieldType.BIOMETRIC_PRODUCT_ID; - /** Nationality */ - public const int NATIONALITY = 11; + if (value.Equals((309).ToString())) + return TextFieldType.BIOMETRIC_FORMAT_OWNER; - /** Sex */ - public const int SEX = 12; + if (value.Equals((310).ToString())) + return TextFieldType.BIOMETRIC_FORMAT_TYPE; - /** Height */ - public const int HEIGHT = 13; + if (value.Equals((311).ToString())) + return TextFieldType.PHONE; - /** Weight */ - public const int WEIGHT = 14; + if (value.Equals((312).ToString())) + return TextFieldType.PROFESSION; - /** Eyes color */ - public const int EYES_COLOR = 15; + if (value.Equals((313).ToString())) + return TextFieldType.TITLE; - /** Hair color */ - public const int HAIR_COLOR = 16; + if (value.Equals((314).ToString())) + return TextFieldType.PERSONAL_SUMMARY; - /** Address */ - public const int ADDRESS = 17; + if (value.Equals((315).ToString())) + return TextFieldType.OTHER_VALID_ID; - /** Donation stamp */ - public const int DONOR = 18; + if (value.Equals((316).ToString())) + return TextFieldType.CUSTODY_INFO; - /** Social security number */ - public const int SOCIAL_SECURITY_NUMBER = 19; + if (value.Equals((317).ToString())) + return TextFieldType.OTHER_NAME; - /** Driving license class */ - public const int DL_CLASS = 20; + if (value.Equals((318).ToString())) + return TextFieldType.OBSERVATIONS; - /** Driving license permission code */ - public const int DL_ENDORSED = 21; + if (value.Equals((319).ToString())) + return TextFieldType.TAX; - /** Driving license restriction code */ - public const int DL_RESTRICTION_CODE = 22; + if (value.Equals((320).ToString())) + return TextFieldType.DATE_OF_PERSONALIZATION; - /** Date when the owner of the document turns 21 years old */ - public const int DL_UNDER_21_DATE = 23; + if (value.Equals((321).ToString())) + return TextFieldType.PERSONALIZATION_SN; - /** Document issuing authority */ - public const int AUTHORITY = 24; + if (value.Equals((322).ToString())) + return TextFieldType.OTHER_PERSON_NAME; - /** Full name */ - public const int SURNAME_AND_GIVEN_NAMES = 25; + if (value.Equals((323).ToString())) + return TextFieldType.PERSON_TO_NOTIFY_DATE_OF_RECORD; - /** Nationality letter code according to standard ISO 3166-1 (ICAO doc 9303) */ - public const int NATIONALITY_CODE = 26; + if (value.Equals((324).ToString())) + return TextFieldType.PERSON_TO_NOTIFY_NAME; - /** Passport number (used in visas) */ - public const int PASSPORT_NUMBER = 27; + if (value.Equals((325).ToString())) + return TextFieldType.PERSON_TO_NOTIFY_PHONE; - /** Invitation number (used in visas) */ - public const int INVITATION_NUMBER = 28; + if (value.Equals((326).ToString())) + return TextFieldType.PERSON_TO_NOTIFY_ADDRESS; - /** Visa ID */ - public const int VISA_ID = 29; + if (value.Equals((327).ToString())) + return TextFieldType.DS_CERTIFICATE_ISSUER; - /** Visa class */ - public const int VISA_CLASS = 30; + if (value.Equals((328).ToString())) + return TextFieldType.DS_CERTIFICATE_SUBJECT; - /** Visa subclass */ - public const int VISA_SUBCLASS = 31; + if (value.Equals((329).ToString())) + return TextFieldType.DS_CERTIFICATE_VALID_FROM; - /** MRZ type */ - public const int MRZ_TYPE = 35; + if (value.Equals((330).ToString())) + return TextFieldType.DS_CERTIFICATE_VALID_TO; - /** Optional data */ - public const int OPTIONAL_DATA = 36; + if (value.Equals((331).ToString())) + return TextFieldType.VRC_DATA_OBJECT_ENTRY; - /** Full name of the document class */ - public const int DOCUMENT_CLASS_NAME = 37; + if (value.Equals((332).ToString())) + return TextFieldType.TYPE_APPROVAL_NUMBER; - /** Full name of issuing state */ - public const int ISSUING_STATE_NAME = 38; + if (value.Equals((333).ToString())) + return TextFieldType.ADMINISTRATIVE_NUMBER; - /** Place of document issue */ - public const int PLACE_OF_ISSUE = 39; + if (value.Equals((334).ToString())) + return TextFieldType.DOCUMENT_DISCRIMINATOR; - /** Document number checksum */ - public const int DOCUMENT_NUMBER_CHECKSUM = 40; + if (value.Equals((335).ToString())) + return TextFieldType.DATA_DISCRIMINATOR; - /** Date of birth checksum */ - public const int DATE_OF_BIRTH_CHECKSUM = 41; + if (value.Equals((336).ToString())) + return TextFieldType.ISO_ISSUER_ID_NUMBER; - /** Date of document expiration checksum */ - public const int DATE_OF_EXPIRY_CHECKSUM = 42; + if (value.Equals((337).ToString())) + return TextFieldType.DTC_VERSION; - /** Personal number checksum */ - public const int PERSONAL_NUMBER_CHECKSUM = 43; + if (value.Equals((338).ToString())) + return TextFieldType.DTC_ID; - /** Final checksum */ - public const int FINAL_CHECKSUM = 44; + if (value.Equals((339).ToString())) + return TextFieldType.DTC_DATE_OF_EXPIRY; - /** Passport number checksum (used in visas) */ - public const int PASSPORT_NUMBER_CHECKSUM = 45; + if (value.Equals((340).ToString())) + return TextFieldType.GNIB_NUMBER; - /** Invitation number checksum (used in visas) */ - public const int INVITATION_NUMBER_CHECKSUM = 46; + if (value.Equals((341).ToString())) + return TextFieldType.DEPT_NUMBER; - /** Visa identification number checksum */ - public const int VISA_ID_CHECKSUM = 47; + if (value.Equals((342).ToString())) + return TextFieldType.TELEX_CODE; - /** Full name checksum */ - public const int SURNAME_AND_GIVEN_NAME_CHECKSUM = 48; + if (value.Equals((343).ToString())) + return TextFieldType.ALLERGIES; - /** Visa expiration date checksum */ - public const int VISA_VALID_UNTIL_CHECKSUM = 49; + if (value.Equals((344).ToString())) + return TextFieldType.SP_CODE; - /** Other information */ - public const int OTHER = 50; + if (value.Equals((345).ToString())) + return TextFieldType.COURT_CODE; - /** MRZ strings */ - public const int MRZ_STRINGS = 51; + if (value.Equals((346).ToString())) + return TextFieldType.CTY; - /** Name suffix */ - public const int NAME_SUFFIX = 52; + if (value.Equals((347).ToString())) + return TextFieldType.SPONSOR_SSN; - /** Name prefix */ - public const int NAME_PREFIX = 53; + if (value.Equals((348).ToString())) + return TextFieldType.DOD_NUMBER; - /** Checksum for the date of issue of the document */ - public const int DATE_OF_ISSUE_CHECKSUM = 54; + if (value.Equals((349).ToString())) + return TextFieldType.MC_NOVICE_DATE; - /** Check digit for or the date of issue of the document */ - public const int DATE_OF_ISSUE_CHECK_DIGIT = 55; + if (value.Equals((350).ToString())) + return TextFieldType.DUF_NUMBER; - /** Document series */ - public const int DOCUMENT_SERIES = 56; + if (value.Equals((351).ToString())) + return TextFieldType.AGY; - /** Vehicle registration certificate number */ - public const int REG_CERT_REG_NUMBER = 57; + if (value.Equals((352).ToString())) + return TextFieldType.PNR_CODE; - /** Vehicle model */ - public const int REG_CERT_CAR_MODEL = 58; + if (value.Equals((353).ToString())) + return TextFieldType.FROM_AIRPORT_CODE; - /** Vehicle color */ - public const int REG_CERT_CAR_COLOR = 59; + if (value.Equals((354).ToString())) + return TextFieldType.TO_AIRPORT_CODE; - /** Vehicle body number */ - public const int REG_CERT_BODY_NUMBER = 60; + if (value.Equals((355).ToString())) + return TextFieldType.FLIGHT_NUMBER; - /** Vehicle type */ - public const int REG_CERT_CAR_TYPE = 61; + if (value.Equals((356).ToString())) + return TextFieldType.DATE_OF_FLIGHT; - /** Vehicle GVWR */ - public const int REG_CERT_MAX_WEIGHT = 62; + if (value.Equals((357).ToString())) + return TextFieldType.SEAT_NUMBER; - /** Vehicle unladen weight */ - public const int REG_CERT_WEIGHT = 63; + if (value.Equals((358).ToString())) + return TextFieldType.DATE_OF_ISSUE_BOARDING_PASS; - /** Address (region) */ - public const int ADDRESS_AREA = 64; + if (value.Equals((359).ToString())) + return TextFieldType.CCW_UNTIL; - /** Address (state) */ - public const int ADDRESS_STATE = 65; + if (value.Equals((360).ToString())) + return TextFieldType.REFERENCE_NUMBER_CHECKSUM; - /** Address (building number) */ - public const int ADDRESS_BUILDING = 66; + if (value.Equals((361).ToString())) + return TextFieldType.REFERENCE_NUMBER_CHECK_DIGIT; - /** Address (house number) */ - public const int ADDRESS_HOUSE = 67; + if (value.Equals((362).ToString())) + return TextFieldType.ROOM_NUMBER; - /** Address (flat number) */ - public const int ADDRESS_FLAT = 68; + if (value.Equals((363).ToString())) + return TextFieldType.RELIGION; - /** Place of registration */ - public const int PLACE_OF_REGISTRATION = 69; + if (value.Equals((364).ToString())) + return TextFieldType.REMAINDER_TERM; - /** Date of registration */ - public const int DATE_OF_REGISTRATION = 70; + if (value.Equals((365).ToString())) + return TextFieldType.ELECTRONIC_TICKET_INDICATOR; - /** Start date of residence */ - public const int RESIDENT_FROM = 71; + if (value.Equals((366).ToString())) + return TextFieldType.COMPARTMENT_CODE; - /** End date of residence */ - public const int RESIDENT_UNTIL = 72; + if (value.Equals((367).ToString())) + return TextFieldType.CHECK_IN_SEQUENCE_NUMBER; - /** Issuing authority code */ - public const int AUTHORITY_CODE = 73; + if (value.Equals((368).ToString())) + return TextFieldType.AIRLINE_DESIGNATOR_OF_BOARDING_PASS_ISSUER; - /** Place of birth address (region) */ - public const int PLACE_OF_BIRTH_AREA = 74; + if (value.Equals((369).ToString())) + return TextFieldType.AIRLINE_NUMERIC_CODE; - /** Place of birth address (state code) */ - public const int PLACE_OF_BIRTH_STATE_CODE = 75; + if (value.Equals((370).ToString())) + return TextFieldType.TICKET_NUMBER; - /** Address (street) */ - public const int ADDRESS_STREET = 76; + if (value.Equals((371).ToString())) + return TextFieldType.FREQUENT_FLYER_AIRLINE_DESIGNATOR; - /** Address (city) */ - public const int ADDRESS_CITY = 77; + if (value.Equals((372).ToString())) + return TextFieldType.FREQUENT_FLYER_NUMBER; - /** Address (tax code) */ - public const int ADDRESS_JURISDICTION_CODE = 78; + if (value.Equals((373).ToString())) + return TextFieldType.FREE_BAGGAGE_ALLOWANCE; - /** Address (postal code) */ - public const int ADDRESS_POSTAL_CODE = 79; + if (value.Equals((374).ToString())) + return TextFieldType.PDF417_CODEC; - /** Check digit for document number */ - public const int DOCUMENT_NUMBER_CHECK_DIGIT = 80; + if (value.Equals((375).ToString())) + return TextFieldType.IDENTITY_CARD_NUMBER_CHECKSUM; - /** Check digit for date of birth */ - public const int DATE_OF_BIRTH_CHECK_DIGIT = 81; + if (value.Equals((376).ToString())) + return TextFieldType.IDENTITY_CARD_NUMBER_CHECK_DIGIT; - /** Check digit for date of expiry */ - public const int DATE_OF_EXPIRY_CHECK_DIGIT = 82; + if (value.Equals((377).ToString())) + return TextFieldType.VETERAN; - /** Check digit for personal number */ - public const int PERSONAL_NUMBER_CHECK_DIGIT = 83; + if (value.Equals((378).ToString())) + return TextFieldType.DL_CLASS_CODE_A1_FROM; - /** Final check digit for all MRZ */ - public const int FINAL_CHECK_DIGIT = 84; + if (value.Equals((379).ToString())) + return TextFieldType.DL_CLASS_CODE_A1_TO; - /** Check digit for passport number (used in visas) */ - public const int PASSPORT_NUMBER_CHECK_DIGIT = 85; + if (value.Equals((380).ToString())) + return TextFieldType.DL_CLASS_CODE_A1_NOTES; - /** Check digit for invitation number (used in visas) */ - public const int INVITATION_NUMBER_CHECK_DIGIT = 86; + if (value.Equals((381).ToString())) + return TextFieldType.DL_CLASS_CODE_A_FROM; - /** Check digit for visa identification number */ - public const int VISA_ID_CHECK_DIGIT = 87; + if (value.Equals((382).ToString())) + return TextFieldType.DL_CLASS_CODE_A_TO; - /** Check digit for full name */ - public const int SURNAME_AND_GIVEN_NAMES_CHECK_DIGIT = 88; + if (value.Equals((383).ToString())) + return TextFieldType.DL_CLASS_CODE_A_NOTES; - /** Check digit for visa expiration date */ - public const int VISA_VALID_UNTIL_CHECK_DIGIT = 89; + if (value.Equals((384).ToString())) + return TextFieldType.DL_CLASS_CODE_B_FROM; - /** Permit type */ - public const int PERMIT_DL_CLASS = 90; + if (value.Equals((385).ToString())) + return TextFieldType.DL_CLASS_CODE_B_TO; - /** Permit expiration date */ - public const int PERMIT_DATE_OF_EXPIRY = 91; + if (value.Equals((386).ToString())) + return TextFieldType.DL_CLASS_CODE_B_NOTES; - /** Permit identifier */ - public const int PERMIT_IDENTIFIER = 92; + if (value.Equals((387).ToString())) + return TextFieldType.DL_CLASS_CODE_C1_FROM; - /** Permit issue date */ - public const int PERMIT_DATE_OF_ISSUE = 93; + if (value.Equals((388).ToString())) + return TextFieldType.DL_CLASS_CODE_C1_TO; - /** Driving restriction code */ - public const int PERMIT_RESTRICTION_CODE = 94; + if (value.Equals((389).ToString())) + return TextFieldType.DL_CLASS_CODE_C1_NOTES; - /** Driving permit code */ - public const int PERMIT_ENDORSED = 95; + if (value.Equals((390).ToString())) + return TextFieldType.DL_CLASS_CODE_C_FROM; - /** A string that is used to validate a document against a database */ - public const int ISSUE_TIMESTAMP = 96; + if (value.Equals((391).ToString())) + return TextFieldType.DL_CLASS_CODE_C_TO; - /** Number of duplicates */ - public const int NUMBER_OF_DUPLICATES = 97; + if (value.Equals((392).ToString())) + return TextFieldType.DL_CLASS_CODE_C_NOTES; - /** Medical indicator codes */ - public const int MEDICAL_INDICATOR_CODES = 98; + if (value.Equals((393).ToString())) + return TextFieldType.DL_CLASS_CODE_D1_FROM; - /** Non resident stamp */ - public const int NON_RESIDENT_INDICATOR = 99; + if (value.Equals((394).ToString())) + return TextFieldType.DL_CLASS_CODE_D1_TO; - /** Visa type */ - public const int VISA_TYPE = 100; + if (value.Equals((395).ToString())) + return TextFieldType.DL_CLASS_CODE_D1_NOTES; - /** Visa valid-from date */ - public const int VISA_VALID_FROM = 101; + if (value.Equals((396).ToString())) + return TextFieldType.DL_CLASS_CODE_D_FROM; - /** Visa valid-until date */ - public const int VISA_VALID_UNTIL = 102; + if (value.Equals((397).ToString())) + return TextFieldType.DL_CLASS_CODE_D_TO; - /** Duration of stay on visa */ - public const int DURATION_OF_STAY = 103; + if (value.Equals((398).ToString())) + return TextFieldType.DL_CLASS_CODE_D_NOTES; - /** Number of entries */ - public const int NUMBER_OF_ENTRIES = 104; + if (value.Equals((399).ToString())) + return TextFieldType.DL_CLASS_CODE_BE_FROM; - /** Day in date */ - public const int DAY = 105; + if (value.Equals((400).ToString())) + return TextFieldType.DL_CLASS_CODE_BE_TO; - /** Month in date */ - public const int MONTH = 106; + if (value.Equals((401).ToString())) + return TextFieldType.DL_CLASS_CODE_BE_NOTES; - /** Year in date */ - public const int YEAR = 107; + if (value.Equals((402).ToString())) + return TextFieldType.DL_CLASS_CODE_C1E_FROM; - /** Unique customer identifier */ - public const int UNIQUE_CUSTOMER_IDENTIFIER = 108; + if (value.Equals((403).ToString())) + return TextFieldType.DL_CLASS_CODE_C1E_TO; - /** Commercial vehicle code */ - public const int COMMERCIAL_VEHICLE_CODES = 109; + if (value.Equals((404).ToString())) + return TextFieldType.DL_CLASS_CODE_C1E_NOTES; - /** Also known as (date of birth) */ - public const int AKA_DATE_OF_BIRTH = 110; + if (value.Equals((405).ToString())) + return TextFieldType.DL_CLASS_CODE_CE_FROM; - /** Also known as (social security number) */ - public const int AKA_SOCIAL_SECURITY_NUMBER = 111; + if (value.Equals((406).ToString())) + return TextFieldType.DL_CLASS_CODE_CE_TO; - /** Also known as (last name) */ - public const int AKA_SURNAME = 112; + if (value.Equals((407).ToString())) + return TextFieldType.DL_CLASS_CODE_CE_NOTES; - /** Also known as (first name) */ - public const int AKA_GIVEN_NAMES = 113; + if (value.Equals((408).ToString())) + return TextFieldType.DL_CLASS_CODE_D1E_FROM; - /** Also known as (name suffix) */ - public const int AKA_NAME_SUFFIX = 114; + if (value.Equals((409).ToString())) + return TextFieldType.DL_CLASS_CODE_D1E_TO; - /** Also known as (name prefix) */ - public const int AKA_NAME_PREFIX = 115; + if (value.Equals((410).ToString())) + return TextFieldType.DL_CLASS_CODE_D1E_NOTES; - /** Postal address (street) */ - public const int MAILING_ADDRESS_STREET = 116; + if (value.Equals((411).ToString())) + return TextFieldType.DL_CLASS_CODE_DE_FROM; - /** Postal address (city) */ - public const int MAILING_ADDRESS_CITY = 117; + if (value.Equals((412).ToString())) + return TextFieldType.DL_CLASS_CODE_DE_TO; - /** Postal address (tax code) */ - public const int MAILING_ADDRESS_JURISDICTION_CODE = 118; + if (value.Equals((413).ToString())) + return TextFieldType.DL_CLASS_CODE_DE_NOTES; - /** Postal address (zip) */ - public const int MAILING_ADDRESS_POSTAL_CODE = 119; + if (value.Equals((414).ToString())) + return TextFieldType.DL_CLASS_CODE_M_FROM; - /** Driver license validation number */ - public const int AUDIT_INFORMATION = 120; + if (value.Equals((415).ToString())) + return TextFieldType.DL_CLASS_CODE_M_TO; - /** Inventory number */ - public const int INVENTORY_NUMBER = 121; + if (value.Equals((416).ToString())) + return TextFieldType.DL_CLASS_CODE_M_NOTES; - /** Race ethnicity */ - public const int RACE_ETHNICITY = 122; + if (value.Equals((417).ToString())) + return TextFieldType.DL_CLASS_CODE_L_FROM; - /** Vehicle legal class */ - public const int JURISDICTION_VEHICLE_CLASS = 123; + if (value.Equals((418).ToString())) + return TextFieldType.DL_CLASS_CODE_L_TO; - /** Legal permission code */ - public const int JURISDICTION_ENDORSEMENT_CODE = 124; + if (value.Equals((419).ToString())) + return TextFieldType.DL_CLASS_CODE_L_NOTES; - /** Legal restriction code */ - public const int JURISDICTION_RESTRICTION_CODE = 125; + if (value.Equals((420).ToString())) + return TextFieldType.DL_CLASS_CODE_T_FROM; - /** Surname and (or) name at birth */ - public const int FAMILY_NAME = 126; + if (value.Equals((421).ToString())) + return TextFieldType.DL_CLASS_CODE_T_TO; - /** Name (russian transcription) */ - public const int GIVEN_NAMES_RUS = 127; + if (value.Equals((422).ToString())) + return TextFieldType.DL_CLASS_CODE_T_NOTES; - /** Visa identification number (russian transcription) */ - public const int VISA_ID_RUS = 128; + if (value.Equals((423).ToString())) + return TextFieldType.DL_CLASS_CODE_AM_FROM; - /** Father`s name */ - public const int FATHERS_NAME = 129; + if (value.Equals((424).ToString())) + return TextFieldType.DL_CLASS_CODE_AM_TO; - /** Father`s name (russian transcription) */ - public const int FATHERS_NAME_RUS = 130; + if (value.Equals((425).ToString())) + return TextFieldType.DL_CLASS_CODE_AM_NOTES; - /** Full name (russian transcription) */ - public const int SURNAME_AND_GIVEN_NAME_RUS = 131; + if (value.Equals((426).ToString())) + return TextFieldType.DL_CLASS_CODE_A2_FROM; - /** Place of birth (russian transcription) */ - public const int PLACE_OF_BIRTH_RUS = 132; + if (value.Equals((427).ToString())) + return TextFieldType.DL_CLASS_CODE_A2_TO; - /** Issuing authority (russian transcription) */ - public const int AUTHORITY_RUS = 133; + if (value.Equals((428).ToString())) + return TextFieldType.DL_CLASS_CODE_A2_NOTES; - /** Digital code of the state of issue of the document in accordance with ISO 3166-1 (ICAO Doc 9303) */ - public const int ISSUING_STATE_CODE_NUMERIC = 134; + if (value.Equals((429).ToString())) + return TextFieldType.DL_CLASS_CODE_B1_FROM; - /** Digital code of nationality in accordance with ISO 3166-1 (ICAO Doc 9303) */ - public const int NATIONALITY_CODE_NUMERIC = 135; + if (value.Equals((430).ToString())) + return TextFieldType.DL_CLASS_CODE_B1_TO; - /** Vehicle engine power */ - public const int ENGINE_POWER = 136; + if (value.Equals((431).ToString())) + return TextFieldType.DL_CLASS_CODE_B1_NOTES; - /** Vehicle engine volume */ - public const int ENGINE_VOLUME = 137; + if (value.Equals((432).ToString())) + return TextFieldType.SURNAME_AT_BIRTH; - /** Vehicle chassis number */ - public const int CHASSIS_NUMBER = 138; + if (value.Equals((433).ToString())) + return TextFieldType.CIVIL_STATUS; - /** Vehicle engine number */ - public const int ENGINE_NUMBER = 139; + if (value.Equals((434).ToString())) + return TextFieldType.NUMBER_OF_SEATS; - /** Vehicle engine model */ - public const int ENGINE_MODEL = 140; + if (value.Equals((435).ToString())) + return TextFieldType.NUMBER_OF_STANDING_PLACES; - /** Vehicle category */ - public const int VEHICLE_CATEGORY = 141; + if (value.Equals((436).ToString())) + return TextFieldType.MAX_SPEED; - /** Identity card number */ - public const int IDENTITY_CARD_NUMBER = 142; + if (value.Equals((437).ToString())) + return TextFieldType.FUEL_TYPE; - /** Control number */ - public const int CONTROL_NUMBER = 143; + if (value.Equals((438).ToString())) + return TextFieldType.EC_ENVIRONMENTAL_TYPE; - /** Parent names */ - public const int PARENTS_GIVEN_NAMES = 144; + if (value.Equals((439).ToString())) + return TextFieldType.POWER_WEIGHT_RATIO; - /** Second last name */ - public const int SECOND_SURNAME = 145; + if (value.Equals((440).ToString())) + return TextFieldType.MAX_MASS_OF_TRAILER_BRAKED; - /** Middle name */ - public const int MIDDLE_NAME = 146; + if (value.Equals((441).ToString())) + return TextFieldType.MAX_MASS_OF_TRAILER_UNBRAKED; - /** Vehicle identification number */ - public const int REG_CERT_VIN = 147; + if (value.Equals((442).ToString())) + return TextFieldType.TRANSMISSION_TYPE; - /** Check digit for vehicle identification number */ - public const int REG_CERT_VIN_CHECK_DIGIT = 148; + if (value.Equals((443).ToString())) + return TextFieldType.TRAILER_HITCH; - /** Checksum for vehicle identification number */ - public const int REG_CERT_VIN_CHECKSUM = 149; + if (value.Equals((444).ToString())) + return TextFieldType.ACCOMPANIED_BY; - /** Check digit of the first line of the MRZ */ - public const int LINE_1_CHECK_DIGIT = 150; + if (value.Equals((445).ToString())) + return TextFieldType.POLICE_DISTRICT; - /** Check digit of the second line of the MRZ */ - public const int LINE_2_CHECK_DIGIT = 151; + if (value.Equals((446).ToString())) + return TextFieldType.FIRST_ISSUE_DATE; - /** Check digit of the third line of the MRZ */ - public const int LINE_3_CHECK_DIGIT = 152; + if (value.Equals((447).ToString())) + return TextFieldType.PAYLOAD_CAPACITY; - /** Checksum of the first line of the MRZ */ - public const int LINE_1_CHECKSUM = 153; + if (value.Equals((448).ToString())) + return TextFieldType.NUMBER_OF_AXLES; - /** Checksum of the second line of the MRZ */ - public const int LINE_2_CHECKSUM = 154; + if (value.Equals((449).ToString())) + return TextFieldType.PERMISSIBLE_AXLE_LOAD; - /** Checksum of the third line of the MRZ */ - public const int LINE_3_CHECKSUM = 155; + if (value.Equals((450).ToString())) + return TextFieldType.PRECINCT; - /** Check digit of the vehicle registration number */ - public const int REG_CERT_REG_NUMBER_CHECK_DIGIT = 156; + if (value.Equals((451).ToString())) + return TextFieldType.INVITED_BY; - /** Checksum of the vehicle registration number */ - public const int REG_CERT_REG_NUMBER_CHECKSUM = 157; + if (value.Equals((452).ToString())) + return TextFieldType.PURPOSE_OF_ENTRY; - /** Vehicle code in accordance with ITS (Intelligent Transport System) */ - public const int REG_CERT_VEHICLE_ITS_CODE = 158; + if (value.Equals((453).ToString())) + return TextFieldType.SKIN_COLOR; - /** Card number for access to the RFID chip */ - public const int CARD_ACCESS_NUMBER = 159; + if (value.Equals((454).ToString())) + return TextFieldType.COMPLEXION; - /** Marital status */ - public const int MARITAL_STATUS = 160; + if (value.Equals((455).ToString())) + return TextFieldType.AIRPORT_FROM; - /** Company name */ - public const int COMPANY_NAME = 161; + if (value.Equals((456).ToString())) + return TextFieldType.AIRPORT_TO; - /** Special notes */ - public const int SPECIAL_NOTES = 162; + if (value.Equals((457).ToString())) + return TextFieldType.AIRLINE_NAME; - /** Spouse`s last name */ - public const int SURNAME_OF_SPOUSE = 163; + if (value.Equals((458).ToString())) + return TextFieldType.AIRLINE_NAME_FREQUENT_FLYER; - /** Document status tracking number */ - public const int TRACKING_NUMBER = 164; + if (value.Equals((459).ToString())) + return TextFieldType.LICENSE_NUMBER; - /** Booklet number */ - public const int BOOKLET_NUMBER = 165; + if (value.Equals((460).ToString())) + return TextFieldType.IN_TANKS; - /** Children */ - public const int CHILDREN = 166; + if (value.Equals((461).ToString())) + return TextFieldType.EXCEPT_IN_TANKS; - /** Copy number */ - public const int COPY_NUMBER = 167; + if (value.Equals((462).ToString())) + return TextFieldType.FAST_TRACK; - /** Serial number */ - public const int SERIAL_NUMBER = 168; + if (value.Equals((463).ToString())) + return TextFieldType.OWNER; - /** Dossier number */ - public const int DOSSIER_NUMBER = 169; + if (value.Equals((464).ToString())) + return TextFieldType.MRZ_STRINGS_ICAO_RFID; - /** Also known as (full name) */ - public const int AKA_SURNAME_AND_GIVEN_NAMES = 170; + if (value.Equals((465).ToString())) + return TextFieldType.NUMBER_OF_CARD_ISSUANCE; - /** Territorial validity */ - public const int TERRITORIAL_VALIDITY = 171; + if (value.Equals((466).ToString())) + return TextFieldType.NUMBER_OF_CARD_ISSUANCE_CHECKSUM; - /** MRZ strings with correct checksums (calculated) */ - public const int MRZ_STRINGS_WITH_CORRECT_CHECK_SUMS = 172; + if (value.Equals((467).ToString())) + return TextFieldType.NUMBER_OF_CARD_ISSUANCE_CHECK_DIGIT; - /** Restriction code for commercial driving license */ - public const int DL_CDL_RESTRICTION_CODE = 173; + if (value.Equals((468).ToString())) + return TextFieldType.CENTURY_DATE_OF_BIRTH; - /** Date the document holder turns 18 years old */ - public const int DL_UNDER_18_DATE = 174; + if (value.Equals((469).ToString())) + return TextFieldType.DL_CLASS_CODE_A3_FROM; - /** Record creation date */ - public const int DL_RECORD_CREATED = 175; + if (value.Equals((470).ToString())) + return TextFieldType.DL_CLASS_CODE_A3_TO; - /** Duplicate creation date */ - public const int DL_DUPLICATE_DATE = 176; + if (value.Equals((471).ToString())) + return TextFieldType.DL_CLASS_CODE_A3_NOTES; - /** Driving license type */ - public const int DL_ISSUE_TYPE = 177; + if (value.Equals((472).ToString())) + return TextFieldType.DL_CLASS_CODE_C2_FROM; - /** Military card number */ - public const int MILITARY_BOOK_NUMBER = 178; + if (value.Equals((473).ToString())) + return TextFieldType.DL_CLASS_CODE_C2_TO; - /** Destination */ - public const int DESTINATION = 179; + if (value.Equals((474).ToString())) + return TextFieldType.DL_CLASS_CODE_C2_NOTES; - /** Blood type */ - public const int BLOOD_GROUP = 180; + if (value.Equals((475).ToString())) + return TextFieldType.DL_CLASS_CODE_B2_FROM; - /** Sequence number */ - public const int SEQUENCE_NUMBER = 181; + if (value.Equals((476).ToString())) + return TextFieldType.DL_CLASS_CODE_B2_TO; - /** Vehicle body type */ - public const int REG_CERT_BODY_TYPE = 182; + if (value.Equals((477).ToString())) + return TextFieldType.DL_CLASS_CODE_B2_NOTES; - /** Make of vehicle */ - public const int REG_CERT_CAR_MARK = 183; + if (value.Equals((478).ToString())) + return TextFieldType.DL_CLASS_CODE_D2_FROM; - /** Transaction number */ - public const int TRANSACTION_NUMBER = 184; + if (value.Equals((479).ToString())) + return TextFieldType.DL_CLASS_CODE_D2_TO; - /** Age */ - public const int AGE = 185; + if (value.Equals((480).ToString())) + return TextFieldType.DL_CLASS_CODE_D2_NOTES; - /** Registration number (document on the record-keeping system) */ - public const int FOLIO_NUMBER = 186; + if (value.Equals((481).ToString())) + return TextFieldType.DL_CLASS_CODE_B2E_FROM; - /** Voter personal number */ - public const int VOTER_KEY = 187; + if (value.Equals((482).ToString())) + return TextFieldType.DL_CLASS_CODE_B2E_TO; - /** Address (municipality) */ - public const int ADDRESS_MUNICIPALITY = 188; + if (value.Equals((483).ToString())) + return TextFieldType.DL_CLASS_CODE_B2E_NOTES; - /** Address (locality) */ - public const int ADDRESS_LOCATION = 189; + if (value.Equals((484).ToString())) + return TextFieldType.DL_CLASS_CODE_G_FROM; - /** Domain/sector */ - public const int SECTION = 190; + if (value.Equals((485).ToString())) + return TextFieldType.DL_CLASS_CODE_G_TO; - /** OCR number */ - public const int OCR_NUMBER = 191; + if (value.Equals((486).ToString())) + return TextFieldType.DL_CLASS_CODE_G_NOTES; - /** Federal elections */ - public const int FEDERAL_ELECTIONS = 192; + if (value.Equals((487).ToString())) + return TextFieldType.DL_CLASS_CODE_J_FROM; - /** Reference number */ - public const int REFERENCE_NUMBER = 193; + if (value.Equals((488).ToString())) + return TextFieldType.DL_CLASS_CODE_J_TO; - /** Optional data checksum */ - public const int OPTIONAL_DATA_CHECKSUM = 194; + if (value.Equals((489).ToString())) + return TextFieldType.DL_CLASS_CODE_J_NOTES; - /** Optional data check digit */ - public const int OPTIONAL_DATA_CHECK_DIGIT = 195; + if (value.Equals((490).ToString())) + return TextFieldType.DL_CLASS_CODE_LC_FROM; - /** Visa number */ - public const int VISA_NUMBER = 196; + if (value.Equals((491).ToString())) + return TextFieldType.DL_CLASS_CODE_LC_TO; - /** Visa number checksum */ - public const int VISA_NUMBER_CHECKSUM = 197; + if (value.Equals((492).ToString())) + return TextFieldType.DL_CLASS_CODE_LC_NOTES; - /** Visa number check digit */ - public const int VISA_NUMBER_CHECK_DIGIT = 198; + if (value.Equals((493).ToString())) + return TextFieldType.BANK_CARD_NUMBER; - /** Voter */ - public const int VOTER = 199; + if (value.Equals((494).ToString())) + return TextFieldType.BANK_CARD_VALID_THRU; - /** Type/number of previous document */ - public const int PREVIOUS_TYPE = 200; + if (value.Equals((495).ToString())) + return TextFieldType.TAX_NUMBER; - /** Field from MRZ */ - public const int FIELD_FROM_MRZ = 220; + if (value.Equals((496).ToString())) + return TextFieldType.HEALTH_NUMBER; - /** Current date */ - public const int CURRENT_DATE = 221; + if (value.Equals((497).ToString())) + return TextFieldType.GRANDFATHER_NAME; - /** Status expiration date */ - public const int STATUS_DATE_OF_EXPIRY = 251; + if (value.Equals((498).ToString())) + return TextFieldType.SELECTEE_INDICATOR; - /** bank note number */ - public const int BANK_NOTE_NUMBER = 252; + if (value.Equals((499).ToString())) + return TextFieldType.MOTHER_SURNAME; - /** Code of customer service center */ - public const int CSC_CODE = 253; + if (value.Equals((500).ToString())) + return TextFieldType.MOTHER_GIVEN_NAME; - /** Pseudonym */ - public const int ARTISTIC_NAME = 254; + if (value.Equals((501).ToString())) + return TextFieldType.FATHER_SURNAME; - /** Academic rank */ - public const int ACADEMIC_TITLE = 255; + if (value.Equals((502).ToString())) + return TextFieldType.FATHER_GIVEN_NAME; - /** Address (country) */ - public const int ADDRESS_COUNTRY = 256; + if (value.Equals((503).ToString())) + return TextFieldType.MOTHER_DATE_OF_BIRTH; - /** Address (zip) */ - public const int ADDRESS_ZIP_CODE = 257; + if (value.Equals((504).ToString())) + return TextFieldType.FATHER_DATE_OF_BIRTH; - /** Information on a permit for permanent residence 1 (field for eID) */ - public const int E_ID_RESIDENCE_PERMIT_1 = 258; + if (value.Equals((505).ToString())) + return TextFieldType.MOTHER_PERSONAL_NUMBER; - /** Information on a permit for permanent residence 2 (field for eID) */ - public const int E_ID_RESIDENCE_PERMIT_2 = 259; + if (value.Equals((506).ToString())) + return TextFieldType.FATHER_PERSONAL_NUMBER; - /** Place of birth address: street (field for eID) */ - public const int E_ID_PLACE_OF_BIRTH_STREET = 260; + if (value.Equals((507).ToString())) + return TextFieldType.MOTHER_PLACE_OF_BIRTH; - /** Place of birth address: city (field for eID) */ - public const int E_ID_PLACE_OF_BIRTH_CITY = 261; + if (value.Equals((508).ToString())) + return TextFieldType.FATHER_PLACE_OF_BIRTH; - /** Place of birth address: state (field for eID) */ - public const int E_ID_PLACE_OF_BIRTH_STATE = 262; + if (value.Equals((509).ToString())) + return TextFieldType.MOTHER_COUNTRY_OF_BIRTH; - /** Place of birth address: country (field for eID) */ - public const int E_ID_PLACE_OF_BIRTH_COUNTRY = 263; + if (value.Equals((510).ToString())) + return TextFieldType.FATHER_COUNTRY_OF_BIRTH; - /** Place of birth address: zip (field for eID) */ - public const int E_ID_PLACE_OF_BIRTH_ZIP_CODE = 264; + if (value.Equals((511).ToString())) + return TextFieldType.DATE_FIRST_RENEWAL; - /** Commercial driving license class */ - public const int CDL_CLASS = 265; + if (value.Equals((512).ToString())) + return TextFieldType.DATE_SECOND_RENEWAL; - /** Date when the holder of the document is 19 years old */ - public const int DL_UNDER_19_DATE = 266; + if (value.Equals((513).ToString())) + return TextFieldType.PLACE_OF_EXAMINATION; - /** Weight (pounds) */ - public const int WEIGHT_POUNDS = 267; + if (value.Equals((514).ToString())) + return TextFieldType.APPLICATION_NUMBER; - /** Document expiration indicator */ - public const int LIMITED_DURATION_DOCUMENT_INDICATOR = 268; + if (value.Equals((515).ToString())) + return TextFieldType.VOUCHER_NUMBER; - /** Driving license permit */ - public const int ENDORSEMENT_EXPIRATION_DATE = 269; + if (value.Equals((516).ToString())) + return TextFieldType.AUTHORIZATION_NUMBER; - /** Revision date */ - public const int REVISION_DATE = 270; + if (value.Equals((517).ToString())) + return TextFieldType.FACULTY; - /** Compliance type */ - public const int COMPLIANCE_TYPE = 271; + if (value.Equals((518).ToString())) + return TextFieldType.FORM_OF_EDUCATION; - /** Abbreviated last name */ - public const int FAMILY_NAME_TRUNCATION = 272; + if (value.Equals((519).ToString())) + return TextFieldType.DNI_NUMBER; - /** Abbreviated first name */ - public const int FIRST_NAME_TRUNCATION = 273; + if (value.Equals((520).ToString())) + return TextFieldType.RETIREMENT_NUMBER; - /** Abbreviated middle name */ - public const int MIDDLE_NAME_TRUNCATION = 274; + if (value.Equals((521).ToString())) + return TextFieldType.PROFESSIONAL_ID_NUMBER; - /** Exam date */ - public const int EXAM_DATE = 275; + if (value.Equals((522).ToString())) + return TextFieldType.AGE_AT_ISSUE; - /** Organization */ - public const int ORGANIZATION = 276; + if (value.Equals((523).ToString())) + return TextFieldType.YEARS_SINCE_ISSUE; - /** Department */ - public const int DEPARTMENT = 277; + if (value.Equals((524).ToString())) + return TextFieldType.DL_CLASS_CODE_BTP_FROM; - /** Salary level */ - public const int PAY_GRADE = 278; + if (value.Equals((525).ToString())) + return TextFieldType.DL_CLASS_CODE_BTP_NOTES; - /** Rank/status/title */ - public const int RANK = 279; + if (value.Equals((526).ToString())) + return TextFieldType.DL_CLASS_CODE_BTP_TO; - /** Number confirming the right to receive benefits */ - public const int BENEFITS_NUMBER = 280; + if (value.Equals((527).ToString())) + return TextFieldType.DL_CLASS_CODE_C3_FROM; - /** Type of armed forces in which sponsor serves */ - public const int SPONSOR_SERVICE = 281; + if (value.Equals((528).ToString())) + return TextFieldType.DL_CLASS_CODE_C3_NOTES; - /** Sponsor status */ - public const int SPONSOR_STATUS = 282; + if (value.Equals((529).ToString())) + return TextFieldType.DL_CLASS_CODE_C3_TO; - /** Sponsor */ - public const int SPONSOR = 283; + if (value.Equals((530).ToString())) + return TextFieldType.DL_CLASS_CODE_E_FROM; - /** Degree of kindred */ - public const int RELATIONSHIP = 284; + if (value.Equals((531).ToString())) + return TextFieldType.DL_CLASS_CODE_E_NOTES; - /** US Citizenship and Immigration Services Alien Registration Number */ - public const int USCIS = 285; + if (value.Equals((532).ToString())) + return TextFieldType.DL_CLASS_CODE_E_TO; - /** Category */ - public const int CATEGORY = 286; + if (value.Equals((533).ToString())) + return TextFieldType.DL_CLASS_CODE_F_FROM; - /** Remainder term */ - public const int CONDITIONS = 287; + if (value.Equals((534).ToString())) + return TextFieldType.DL_CLASS_CODE_F_NOTES; - /** Conditions */ - public const int IDENTIFIER = 288; + if (value.Equals((535).ToString())) + return TextFieldType.DL_CLASS_CODE_F_TO; - /** Identifier */ - public const int CONFIGURATION = 289; + if (value.Equals((536).ToString())) + return TextFieldType.DL_CLASS_CODE_FA_FROM; - /** Configuration */ - public const int DISCRETIONARY_DATA = 290; + if (value.Equals((537).ToString())) + return TextFieldType.DL_CLASS_CODE_FA_NOTES; - /** Optional data */ - public const int LINE_1_OPTIONAL_DATA = 291; + if (value.Equals((538).ToString())) + return TextFieldType.DL_CLASS_CODE_FA_TO; - /** Optional data from MRZ first line */ - public const int LINE_2_OPTIONAL_DATA = 292; + if (value.Equals((539).ToString())) + return TextFieldType.DL_CLASS_CODE_FA1_FROM; - /** Optional data from MRZ second line */ - public const int LINE_3_OPTIONAL_DATA = 293; + if (value.Equals((540).ToString())) + return TextFieldType.DL_CLASS_CODE_FA1_NOTES; - /** Optional data from MRZ third line */ - public const int EQV_CODE = 294; + if (value.Equals((541).ToString())) + return TextFieldType.DL_CLASS_CODE_FA1_TO; - /** EQV-code */ - public const int ALT_CODE = 295; + if (value.Equals((542).ToString())) + return TextFieldType.DL_CLASS_CODE_FB_FROM; - /** ALT-code */ - public const int BINARY_CODE = 296; + if (value.Equals((543).ToString())) + return TextFieldType.DL_CLASS_CODE_FB_NOTES; - /** Binary code */ - public const int PSEUDO_CODE = 297; + if (value.Equals((544).ToString())) + return TextFieldType.DL_CLASS_CODE_FB_TO; - /** Pseudo code */ - public const int FEE = 298; + if (value.Equals((545).ToString())) + return TextFieldType.DL_CLASS_CODE_G1_FROM; - /** Fee */ - public const int STAMP_NUMBER = 299; + if (value.Equals((546).ToString())) + return TextFieldType.DL_CLASS_CODE_G1_NOTES; - /** Stamp number */ - public const int SBH_SECURITY_OPTIONS = 300; + if (value.Equals((547).ToString())) + return TextFieldType.DL_CLASS_CODE_G1_TO; - /** Biometric data protection settings */ - public const int SBH_INTEGRITY_OPTIONS = 301; + if (value.Equals((548).ToString())) + return TextFieldType.DL_CLASS_CODE_H_FROM; - /** Biometric data integrity parameters */ - public const int DATE_OF_CREATION = 302; + if (value.Equals((549).ToString())) + return TextFieldType.DL_CLASS_CODE_H_NOTES; - /** Biometric data creation date */ - public const int VALIDITY_PERIOD = 303; + if (value.Equals((550).ToString())) + return TextFieldType.DL_CLASS_CODE_H_TO; - /** Biometric data validity period */ - public const int PATRON_HEADER_VERSION = 304; + if (value.Equals((551).ToString())) + return TextFieldType.DL_CLASS_CODE_I_FROM; - /** Biometric data header format version */ - public const int BDB_TYPE = 305; + if (value.Equals((552).ToString())) + return TextFieldType.DL_CLASS_CODE_I_NOTES; - /** Biometric data record type */ - public const int BIOMETRIC_TYPE = 306; + if (value.Equals((553).ToString())) + return TextFieldType.DL_CLASS_CODE_I_TO; - /** Biometric data type */ - public const int BIOMETRIC_SUBTYPE = 307; + if (value.Equals((554).ToString())) + return TextFieldType.DL_CLASS_CODE_K_FROM; - /** Biometric data subtype */ - public const int BIOMETRIC_PRODUCT_ID = 308; + if (value.Equals((555).ToString())) + return TextFieldType.DL_CLASS_CODE_K_NOTES; - /** Biometric data id */ - public const int BIOMETRIC_FORMAT_OWNER = 309; + if (value.Equals((556).ToString())) + return TextFieldType.DL_CLASS_CODE_K_TO; - /** Biometric data format */ - public const int BIOMETRIC_FORMAT_TYPE = 310; + if (value.Equals((557).ToString())) + return TextFieldType.DL_CLASS_CODE_LK_FROM; - /** Phone number */ - public const int PHONE = 311; + if (value.Equals((558).ToString())) + return TextFieldType.DL_CLASS_CODE_LK_NOTES; - /** Profession */ - public const int PROFESSION = 312; + if (value.Equals((559).ToString())) + return TextFieldType.DL_CLASS_CODE_LK_TO; - /** Job position */ - public const int TITLE = 313; + if (value.Equals((560).ToString())) + return TextFieldType.DL_CLASS_CODE_N_FROM; - /** Common personal data */ - public const int PERSONAL_SUMMARY = 314; + if (value.Equals((561).ToString())) + return TextFieldType.DL_CLASS_CODE_N_NOTES; - /** Other valid identifier */ - public const int OTHER_VALID_ID = 315; + if (value.Equals((562).ToString())) + return TextFieldType.DL_CLASS_CODE_N_TO; - /** Custody info */ - public const int CUSTODY_INFO = 316; + if (value.Equals((563).ToString())) + return TextFieldType.DL_CLASS_CODE_S_FROM; - /** Other name */ - public const int OTHER_NAME = 317; + if (value.Equals((564).ToString())) + return TextFieldType.DL_CLASS_CODE_S_NOTES; - /** Additional data */ - public const int OBSERVATIONS = 318; + if (value.Equals((565).ToString())) + return TextFieldType.DL_CLASS_CODE_S_TO; - /** Tax information */ - public const int TAX = 319; + if (value.Equals((566).ToString())) + return TextFieldType.DL_CLASS_CODE_TB_FROM; - /** Document personalization date */ - public const int DATE_OF_PERSONALIZATION = 320; + if (value.Equals((567).ToString())) + return TextFieldType.DL_CLASS_CODE_TB_NOTES; - /** Personalization serial number */ - public const int PERSONALIZATION_SN = 321; + if (value.Equals((568).ToString())) + return TextFieldType.DL_CLASS_CODE_TB_TO; - /** Record creation date */ - public const int DATE_OF_RECORD = 322; + if (value.Equals((569).ToString())) + return TextFieldType.DL_CLASS_CODE_TM_FROM; - /** Date of creation of a record of persons for notification in case of unforeseen situations */ - public const int PERSON_TO_NOTIFY_DATE_OF_RECORD = 323; + if (value.Equals((570).ToString())) + return TextFieldType.DL_CLASS_CODE_TM_NOTES; - /** Person name for contingency notification */ - public const int PERSON_TO_NOTIFY_NAME = 324; + if (value.Equals((571).ToString())) + return TextFieldType.DL_CLASS_CODE_TM_TO; - /** Person phone for contingency notification */ - public const int PERSON_TO_NOTIFY_PHONE = 325; + if (value.Equals((572).ToString())) + return TextFieldType.DL_CLASS_CODE_TR_FROM; - /** Person address for contingency notification */ - public const int PERSON_TO_NOTIFY_ADDRESS = 326; + if (value.Equals((573).ToString())) + return TextFieldType.DL_CLASS_CODE_TR_NOTES; - /** Text details of the organization issuing the DS certificate */ - public const int DS_CERTIFICATE_ISSUER = 327; + if (value.Equals((574).ToString())) + return TextFieldType.DL_CLASS_CODE_TR_TO; - /** Text details of the organization issuing the document */ - public const int DS_CERTIFICATE_SUBJECT = 328; + if (value.Equals((575).ToString())) + return TextFieldType.DL_CLASS_CODE_TV_FROM; - /** DS-certificate start date */ - public const int DS_CERTIFICATE_VALID_FROM = 329; + if (value.Equals((576).ToString())) + return TextFieldType.DL_CLASS_CODE_TV_NOTES; - /** DS-certificate expiration date */ - public const int DS_CERTIFICATE_VALID_TO = 330; + if (value.Equals((577).ToString())) + return TextFieldType.DL_CLASS_CODE_TV_TO; - /** Vehicle category/restriction/conditions from data group DG1 of the eDL application */ - public const int VRC_DATA_OBJECT_ENTRY = 331; + if (value.Equals((578).ToString())) + return TextFieldType.DL_CLASS_CODE_V_FROM; - /** Type confirmation number */ - public const int TYPE_APPROVAL_NUMBER = 332; + if (value.Equals((579).ToString())) + return TextFieldType.DL_CLASS_CODE_V_NOTES; - /** Administrative number */ - public const int ADMINISTRATIVE_NUMBER = 333; + if (value.Equals((580).ToString())) + return TextFieldType.DL_CLASS_CODE_V_TO; - /** Document discriminator */ - public const int DOCUMENT_DISCRIMINATOR = 334; + if (value.Equals((581).ToString())) + return TextFieldType.DL_CLASS_CODE_W_FROM; - /** Data discriminator */ - public const int DATA_DISCRIMINATOR = 335; + if (value.Equals((582).ToString())) + return TextFieldType.DL_CLASS_CODE_W_NOTES; - /** ISO issuer identifier */ - public const int ISO_ISSUER_ID_NUMBER = 336; + if (value.Equals((583).ToString())) + return TextFieldType.DL_CLASS_CODE_W_TO; - /** The Garda National Immigration Bureau registration number */ - public const int GNIB_NUMBER = 340; + if (value.Equals((584).ToString())) + return TextFieldType.URL; - /** Department number */ - public const int DEPT_NUMBER = 341; + if (value.Equals((585).ToString())) + return TextFieldType.CALIBER; - /** Telegraph code */ - public const int TELEX_CODE = 342; + if (value.Equals((586).ToString())) + return TextFieldType.MODEL; - /** Allergies */ - public const int ALLERGIES = 343; + if (value.Equals((587).ToString())) + return TextFieldType.MAKE; - /** Sp-code */ - public const int SP_CODE = 344; + if (value.Equals((588).ToString())) + return TextFieldType.NUMBER_OF_CYLINDERS; - /** Court restriction code */ - public const int COURT_CODE = 345; + if (value.Equals((589).ToString())) + return TextFieldType.SURNAME_OF_HUSBAND_AFTER_REGISTRATION; - /** County code */ - public const int CTY = 346; + if (value.Equals((590).ToString())) + return TextFieldType.SURNAME_OF_WIFE_AFTER_REGISTRATION; - /** Sponsor social security number */ - public const int SPONSOR_SSN = 347; + if (value.Equals((591).ToString())) + return TextFieldType.DATE_OF_BIRTH_OF_WIFE; - /** Military identification number */ - public const int DOD_NUMBER = 348; + if (value.Equals((592).ToString())) + return TextFieldType.DATE_OF_BIRTH_OF_HUSBAND; - /** Novice driver until ... (date) */ - public const int MC_NOVICE_DATE = 349; + if (value.Equals((593).ToString())) + return TextFieldType.CITIZENSHIP_OF_FIRST_PERSON; - /** Registration number in the computer system of the Norwegian Directorate of Immigration (the UDI) */ - public const int DUF_NUMBER = 350; + if (value.Equals((594).ToString())) + return TextFieldType.CITIZENSHIP_OF_SECOND_PERSON; - /** Philippines Traffic Police Unit Code */ - public const int AGY = 351; + if (value.Equals((595).ToString())) + return TextFieldType.CVV; - /** PNR-code (book number) */ - public const int PNR_CODE = 352; + if (value.Equals((596).ToString())) + return TextFieldType.DATE_OF_INSURANCE_EXPIRY; - /** Departure airport code */ - public const int FROM_AIRPORT_CODE = 353; + if (value.Equals((597).ToString())) + return TextFieldType.MORTGAGE_BY; - /** Arrival airport code */ - public const int TO_AIRPORT_CODE = 354; + if (value.Equals((598).ToString())) + return TextFieldType.OLD_DOCUMENT_NUMBER; - /** Flight number */ - public const int FLIGHT_NUMBER = 355; + if (value.Equals((599).ToString())) + return TextFieldType.OLD_DATE_OF_ISSUE; - /** Departure date */ - public const int DATE_OF_FLIGHT = 356; + if (value.Equals((600).ToString())) + return TextFieldType.OLD_PLACE_OF_ISSUE; - /** Seat number */ - public const int SEAT_NUMBER = 357; + if (value.Equals((601).ToString())) + return TextFieldType.DL_CLASS_CODE_LR_FROM; - /** Boarding pass issue date */ - public const int DATE_OF_ISSUE_BOARDING_PASS = 358; + if (value.Equals((602).ToString())) + return TextFieldType.DL_CLASS_CODE_LR_TO; - /** Hidden weapons license, valid until... (date) */ - public const int CCW_UNTIL = 359; + if (value.Equals((603).ToString())) + return TextFieldType.DL_CLASS_CODE_LR_NOTES; - /** Reference number checksum */ - public const int REFERENCE_NUMBER_CHECKSUM = 360; + if (value.Equals((604).ToString())) + return TextFieldType.DL_CLASS_CODE_MR_FROM; - /** Reference number check digit */ - public const int REFERENCE_NUMBER_CHECK_DIGIT = 361; + if (value.Equals((605).ToString())) + return TextFieldType.DL_CLASS_CODE_MR_TO; - /** Room number */ - public const int ROOM_NUMBER = 362; + if (value.Equals((606).ToString())) + return TextFieldType.DL_CLASS_CODE_MR_NOTES; - /** Religion */ - public const int RELIGION = 363; + if (value.Equals((607).ToString())) + return TextFieldType.DL_CLASS_CODE_HR_FROM; - /** Number of months before the due date expiration of a document */ - public const int REMAINDER_TERM = 364; + if (value.Equals((608).ToString())) + return TextFieldType.DL_CLASS_CODE_HR_TO; - /** Electronic ticket indicator */ - public const int ELECTRONIC_TICKET_INDICATOR = 365; + if (value.Equals((609).ToString())) + return TextFieldType.DL_CLASS_CODE_HR_NOTES; - /** Free baggage allowance */ - public const int COMPARTMENT_CODE = 366; + if (value.Equals((610).ToString())) + return TextFieldType.DL_CLASS_CODE_HC_FROM; - /** Frequent flyer number */ - public const int CHECK_IN_SEQUENCE_NUMBER = 367; + if (value.Equals((611).ToString())) + return TextFieldType.DL_CLASS_CODE_HC_TO; - /** Airline frequent flyer indicator */ - public const int AIRLINE_DESIGNATOR_OF_BOARDING_PASS_ISSUER = 368; + if (value.Equals((612).ToString())) + return TextFieldType.DL_CLASS_CODE_HC_NOTES; - /** Ticket number */ - public const int AIRLINE_NUMERIC_CODE = 369; + if (value.Equals((613).ToString())) + return TextFieldType.DL_CLASS_CODE_MC_FROM; - /** Airline numeric code */ - public const int TICKET_NUMBER = 370; + if (value.Equals((614).ToString())) + return TextFieldType.DL_CLASS_CODE_MC_TO; - /** Boarding pass issuer code */ - public const int FREQUENT_FLYER_AIRLINE_DESIGNATOR = 371; + if (value.Equals((615).ToString())) + return TextFieldType.DL_CLASS_CODE_MC_NOTES; - /** Check-in sequence number */ - public const int FREQUENT_FLYER_NUMBER = 372; + if (value.Equals((616).ToString())) + return TextFieldType.DL_CLASS_CODE_RE_FROM; - /** Compartment code */ - public const int FREE_BAGGAGE_ALLOWANCE = 373; + if (value.Equals((617).ToString())) + return TextFieldType.DL_CLASS_CODE_RE_TO; - /** PDF417 codec */ - public const int PDF_417_CODEC = 374; + if (value.Equals((618).ToString())) + return TextFieldType.DL_CLASS_CODE_RE_NOTES; - /** identity card checksum */ - public const int IDENTITY_CARD_NUMBER_CHECKSUM = 375; + if (value.Equals((619).ToString())) + return TextFieldType.DL_CLASS_CODE_R_FROM; - /** identity card check digit */ - public const int IDENTITY_CARD_NUMBER_CHECK_DIGIT = 376; + if (value.Equals((620).ToString())) + return TextFieldType.DL_CLASS_CODE_R_TO; - /** Veteran */ - public const int VETERAN = 377; + if (value.Equals((621).ToString())) + return TextFieldType.DL_CLASS_CODE_R_NOTES; - /** Validity date of A1 driver’s license */ - public const int DL_CLASS_CODE_A1_FROM = 378; + if (value.Equals((622).ToString())) + return TextFieldType.DL_CLASS_CODE_CA_FROM; - /** Expiration date of A1 driver’s license */ - public const int DL_CLASS_CODE_A1_TO = 379; + if (value.Equals((623).ToString())) + return TextFieldType.DL_CLASS_CODE_CA_TO; - /** Restrictions for A1 driver’s license */ - public const int DL_CLASS_CODE_A1_NOTES = 380; + if (value.Equals((624).ToString())) + return TextFieldType.DL_CLASS_CODE_CA_NOTES; - /** Validity date of A driver’s license */ - public const int DL_CLASS_CODE_A_FROM = 381; + if (value.Equals((625).ToString())) + return TextFieldType.CITIZENSHIP_STATUS; - /** Expiration date of A driver’s license */ - public const int DL_CLASS_CODE_A_TO = 382; + if (value.Equals((626).ToString())) + return TextFieldType.MILITARY_SERVICE_FROM; - /** Restrictions for A driver’s license */ - public const int DL_CLASS_CODE_A_NOTES = 383; + if (value.Equals((627).ToString())) + return TextFieldType.MILITARY_SERVICE_TO; - /** Validity date of B driver’s license */ - public const int DL_CLASS_CODE_B_FROM = 384; + if (value.Equals((628).ToString())) + return TextFieldType.DL_CLASS_CODE_NT_FROM; - /** Expiration date of B driver’s license */ - public const int DL_CLASS_CODE_B_TO = 385; + if (value.Equals((629).ToString())) + return TextFieldType.DL_CLASS_CODE_NT_TO; - /** Restrictions for B driver’s license */ - public const int DL_CLASS_CODE_B_NOTES = 386; + if (value.Equals((630).ToString())) + return TextFieldType.DL_CLASS_CODE_NT_NOTES; - /** Validity date of C1 driver’s license */ - public const int DL_CLASS_CODE_C1_FROM = 387; + if (value.Equals((631).ToString())) + return TextFieldType.DL_CLASS_CODE_TN_FROM; - /** Expiration date of C1 driver’s license */ - public const int DL_CLASS_CODE_C1_TO = 388; + if (value.Equals((632).ToString())) + return TextFieldType.DL_CLASS_CODE_TN_TO; - /** Restrictions for C1 driver’s license */ - public const int DL_CLASS_CODE_C1_NOTES = 389; + if (value.Equals((633).ToString())) + return TextFieldType.DL_CLASS_CODE_TN_NOTES; - /** Validity date of C driver’s license */ - public const int DL_CLASS_CODE_C_FROM = 390; + if (value.Equals((634).ToString())) + return TextFieldType.DL_CLASS_CODE_D3_FROM; - /** Expiration date of C driver’s license */ - public const int DL_CLASS_CODE_C_TO = 391; + if (value.Equals((635).ToString())) + return TextFieldType.DL_CLASS_CODE_D3_TO; - /** Restrictions for C driver’s license */ - public const int DL_CLASS_CODE_C_NOTES = 392; + if (value.Equals((636).ToString())) + return TextFieldType.DL_CLASS_CODE_D3_NOTES; - /** Validity date of D1 driver’s license */ - public const int DL_CLASS_CODE_D1_FROM = 393; + if (value.Equals((637).ToString())) + return TextFieldType.ALT_DATE_OF_EXPIRY; - /** Expiration date of D1 driver’s license */ - public const int DL_CLASS_CODE_D1_TO = 394; + if (value.Equals((638).ToString())) + return TextFieldType.DL_CLASS_CODE_CD_FROM; - /** Restrictions for D1 driver’s license */ - public const int DL_CLASS_CODE_D1_NOTES = 395; + if (value.Equals((639).ToString())) + return TextFieldType.DL_CLASS_CODE_CD_TO; - /** Validity date of D driver’s license */ - public const int DL_CLASS_CODE_D_FROM = 396; + if (value.Equals((640).ToString())) + return TextFieldType.DL_CLASS_CODE_CD_NOTES; - /** Expiration date of D driver’s license */ - public const int DL_CLASS_CODE_D_TO = 397; + if (value.Equals((641).ToString())) + return TextFieldType.ISSUER_IDENTIFICATION_NUMBER; - /** Restrictions for D driver’s license */ - public const int DL_CLASS_CODE_D_NOTES = 398; + if (value.Equals((642).ToString())) + return TextFieldType.PAYMENT_PERIOD_FROM; - /** Validity date of BE driver’s license */ - public const int DL_CLASS_CODE_BE_FROM = 399; + if (value.Equals((643).ToString())) + return TextFieldType.PAYMENT_PERIOD_TO; - /** Expiration date of BE driver’s license */ - public const int DL_CLASS_CODE_BE_TO = 400; + if (value.Equals((644).ToString())) + return TextFieldType.VACCINATION_CERTIFICATE_IDENTIFIER; - /** Restrictions for BE driver’s license */ - public const int DL_CLASS_CODE_BE_NOTES = 401; + if (value.Equals((645).ToString())) + return TextFieldType.FIRST_NAME; - /** Validity date of C1E driver’s license */ - public const int DL_CLASS_CODE_C1E_FROM = 402; + if (value.Equals((646).ToString())) + return TextFieldType.DATE_OF_ARRIVAL; - /** Expiration date of C1E driver’s license */ - public const int DL_CLASS_CODE_C1E_TO = 403; + if (value.Equals((647).ToString())) + return TextFieldType.SECOND_NAME; - /** Restrictions for C1E driver’s license */ - public const int DL_CLASS_CODE_C1E_NOTES = 404; + if (value.Equals((648).ToString())) + return TextFieldType.THIRD_NAME; - /** Validity date of CE driver’s license */ - public const int DL_CLASS_CODE_CE_FROM = 405; + if (value.Equals((649).ToString())) + return TextFieldType.FOURTH_NAME; - /** Expiration date of CE driver’s license */ - public const int DL_CLASS_CODE_CE_TO = 406; + if (value.Equals((650).ToString())) + return TextFieldType.LAST_NAME; - /** Restrictions for CE driver’s license */ - public const int DL_CLASS_CODE_CE_NOTES = 407; + if (value.Equals((651).ToString())) + return TextFieldType.DL_CLASS_CODE_RM_FROM; - /** Validity date of D1E driver’s license */ - public const int DL_CLASS_CODE_D1E_FROM = 408; + if (value.Equals((652).ToString())) + return TextFieldType.DL_CLASS_CODE_RM_NOTES; - /** Expiration date of D1E driver’s license */ - public const int DL_CLASS_CODE_D1E_TO = 409; + if (value.Equals((653).ToString())) + return TextFieldType.DL_CLASS_CODE_RM_TO; - /** Restrictions for D1E driver’s license */ - public const int DL_CLASS_CODE_D1E_NOTES = 410; + if (value.Equals((654).ToString())) + return TextFieldType.DL_CLASS_CODE_PW_FROM; - /** Validity date of DE driver’s license */ - public const int DL_CLASS_CODE_DE_FROM = 411; + if (value.Equals((655).ToString())) + return TextFieldType.DL_CLASS_CODE_PW_NOTES; - /** Expiration date of DE driver’s license */ - public const int DL_CLASS_CODE_DE_TO = 412; + if (value.Equals((656).ToString())) + return TextFieldType.DL_CLASS_CODE_PW_TO; - /** Restrictions for DE driver’s license */ - public const int DL_CLASS_CODE_DE_NOTES = 413; + if (value.Equals((657).ToString())) + return TextFieldType.DL_CLASS_CODE_EB_FROM; - /** Validity date of M driver’s license */ - public const int DL_CLASS_CODE_M_FROM = 414; + if (value.Equals((658).ToString())) + return TextFieldType.DL_CLASS_CODE_EB_NOTES; - /** Expiration date of M driver’s license */ - public const int DL_CLASS_CODE_M_TO = 415; + if (value.Equals((659).ToString())) + return TextFieldType.DL_CLASS_CODE_EB_TO; - /** Restrictions for M driver’s license */ - public const int DL_CLASS_CODE_M_NOTES = 416; + if (value.Equals((660).ToString())) + return TextFieldType.DL_CLASS_CODE_EC_FROM; - /** Validity date of L driver’s license */ - public const int DL_CLASS_CODE_L_FROM = 417; + if (value.Equals((661).ToString())) + return TextFieldType.DL_CLASS_CODE_EC_NOTES; - /** Expiration date of L driver’s license */ - public const int DL_CLASS_CODE_L_TO = 418; + if (value.Equals((662).ToString())) + return TextFieldType.DL_CLASS_CODE_EC_TO; - /** Restrictions for L driver’s license */ - public const int DL_CLASS_CODE_L_NOTES = 419; + if (value.Equals((663).ToString())) + return TextFieldType.DL_CLASS_CODE_EC1_FROM; - /** Validity date of T driver’s license */ - public const int DL_CLASS_CODE_T_FROM = 420; + if (value.Equals((664).ToString())) + return TextFieldType.DL_CLASS_CODE_EC1_NOTES; - /** Expiration date of T driver’s license */ - public const int DL_CLASS_CODE_T_TO = 421; + if (value.Equals((665).ToString())) + return TextFieldType.DL_CLASS_CODE_EC1_TO; - /** Restrictions for T driver’s license */ - public const int DL_CLASS_CODE_T_NOTES = 422; + if (value.Equals((666).ToString())) + return TextFieldType.PLACE_OF_BIRTH_CITY; - /** Validity date of AM driver’s license */ - public const int DL_CLASS_CODE_AM_FROM = 423; + if (value.Equals((667).ToString())) + return TextFieldType.YEAR_OF_BIRTH; - /** Expiration date of AM driver’s license */ - public const int DL_CLASS_CODE_AM_TO = 424; + if (value.Equals((668).ToString())) + return TextFieldType.YEAR_OF_EXPIRY; - /** Restrictions for AM driver’s license */ - public const int DL_CLASS_CODE_AM_NOTES = 425; + if (value.Equals((669).ToString())) + return TextFieldType.GRANDFATHER_NAME_MATERNAL; - /** Validity date of A2 driver’s license */ - public const int DL_CLASS_CODE_A2_FROM = 426; + if (value.Equals((670).ToString())) + return TextFieldType.FIRST_SURNAME; - /** Expiration date of A2 driver’s license */ - public const int DL_CLASS_CODE_A2_TO = 427; + if (value.Equals((671).ToString())) + return TextFieldType.MONTH_OF_BIRTH; - /** Restrictions for A2 driver’s license */ - public const int DL_CLASS_CODE_A2_NOTES = 428; + if (value.Equals((672).ToString())) + return TextFieldType.ADDRESS_FLOOR_NUMBER; - /** Validity date of B1 driver’s license */ - public const int DL_CLASS_CODE_B1_FROM = 429; + if (value.Equals((673).ToString())) + return TextFieldType.ADDRESS_ENTRANCE; - /** Expiration date of B1 driver’s license */ - public const int DL_CLASS_CODE_B1_TO = 430; + if (value.Equals((674).ToString())) + return TextFieldType.ADDRESS_BLOCK_NUMBER; - /** Restrictions for B1 driver’s license */ - public const int DL_CLASS_CODE_B1_NOTES = 431; + if (value.Equals((675).ToString())) + return TextFieldType.ADDRESS_STREET_NUMBER; - /** Last name at birth */ - public const int SURNAME_AT_BIRTH = 432; + if (value.Equals((676).ToString())) + return TextFieldType.ADDRESS_STREET_TYPE; - /** Civil status */ - public const int CIVIL_STATUS = 433; + if (value.Equals((677).ToString())) + return TextFieldType.ADDRESS_CITY_SECTOR; - /** Number of seats */ - public const int NUMBER_OF_SEATS = 434; + if (value.Equals((678).ToString())) + return TextFieldType.ADDRESS_COUNTY_TYPE; - /** Number of standing places */ - public const int NUMBER_OF_STANDING_PLACES = 435; + if (value.Equals((679).ToString())) + return TextFieldType.ADDRESS_CITY_TYPE; - /** Max speed */ - public const int MAX_SPEED = 436; + if (value.Equals((680).ToString())) + return TextFieldType.ADDRESS_BUILDING_TYPE; - /** Fuel type */ - public const int FUEL_TYPE = 437; + if (value.Equals((681).ToString())) + return TextFieldType.DATE_OF_RETIREMENT; - /** Vehicle emission class */ - public const int EC_ENVIRONMENTAL_TYPE = 438; + if (value.Equals((682).ToString())) + return TextFieldType.DOCUMENT_STATUS; - /** Engine power-to-weight ratio */ - public const int POWER_WEIGHT_RATIO = 439; + if (value.Equals((683).ToString())) + return TextFieldType.SIGNATURE; - /** Trailer with brakes maximum weight */ - public const int MAX_MASS_OF_TRAILER_BRAKED = 440; + if (value.Equals((684).ToString())) + return TextFieldType.FT_UNIQUE_CERTIFICATE_IDENTIFIER; - /** Trailer without brakes maximum weight */ - public const int MAX_MASS_OF_TRAILER_UNBRAKED = 441; + if (value.Equals((685).ToString())) + return TextFieldType.FT_EMAIL; - /** Transmission type */ - public const int TRANSMISSION_TYPE = 442; + if (value.Equals((686).ToString())) + return TextFieldType.FT_DATE_OF_SPECIMEN_COLLECTION; - /** Trailer equipment */ - public const int TRAILER_HITCH = 443; + if (value.Equals((687).ToString())) + return TextFieldType.FT_TYPE_OF_TESTING; - /** Accompanying person */ - public const int ACCOMPANIED_BY = 444; + if (value.Equals((688).ToString())) + return TextFieldType.FT_RESULT_OF_TESTING; - /** Police district */ - public const int POLICE_DISTRICT = 445; + if (value.Equals((689).ToString())) + return TextFieldType.FT_METHOD_OF_TESTING; - /** Date of document first issue */ - public const int FIRST_ISSUE_DATE = 446; + if (value.Equals((690).ToString())) + return TextFieldType.FT_DIGITAL_TRAVEL_AUTHORIZATION_NUMBER; - /** Maximum payload */ - public const int PAYLOAD_CAPACITY = 447; + if (value.Equals((691).ToString())) + return TextFieldType.FT_DATE_OF_FIRST_POSITIVE_TEST_RESULT; - /** Number of axles */ - public const int NUMBER_OF_AXLES = 448; + if (value.Equals((692).ToString())) + return TextFieldType.EF_CARD_ACCESS; - /** Axle weight limit */ - public const int PERMISSIBLE_AXLE_LOAD = 449; + throw new NotImplementedException($"Could not convert value to type TextFieldType: '{value}'"); + } - /** Precinct */ - public const int PRECINCT = 450; + /// + /// Parses a given value to + /// + /// + /// + public static TextFieldType? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return TextFieldType.DOCUMENT_CLASS_CODE; - /** Inviter */ - public const int INVITED_BY = 451; + if (value.Equals((1).ToString())) + return TextFieldType.ISSUING_STATE_CODE; - /** Purpose of arrival */ - public const int PURPOSE_OF_ENTRY = 452; + if (value.Equals((2).ToString())) + return TextFieldType.DOCUMENT_NUMBER; - /** Skin color */ - public const int SKIN_COLOR = 453; + if (value.Equals((3).ToString())) + return TextFieldType.DATE_OF_EXPIRY; - /** Complexion */ - public const int COMPLEXION = 454; + if (value.Equals((4).ToString())) + return TextFieldType.DATE_OF_ISSUE; - /** Departure airport */ - public const int AIRPORT_FROM = 455; + if (value.Equals((5).ToString())) + return TextFieldType.DATE_OF_BIRTH; - /** Arrival airport */ - public const int AIRPORT_TO = 456; + if (value.Equals((6).ToString())) + return TextFieldType.PLACE_OF_BIRTH; - /** Airline name */ - public const int AIRLINE_NAME = 457; + if (value.Equals((7).ToString())) + return TextFieldType.PERSONAL_NUMBER; - /** Airline bonus program for frequent flyers */ - public const int AIRLINE_NAME_FREQUENT_FLYER = 458; + if (value.Equals((8).ToString())) + return TextFieldType.SURNAME; - /** License number */ - public const int LICENSE_NUMBER = 459; + if (value.Equals((9).ToString())) + return TextFieldType.GIVEN_NAMES; - /** In tanks */ - public const int IN_TANKS = 460; + if (value.Equals((10).ToString())) + return TextFieldType.MOTHERS_NAME; - /** Other than tanks */ - public const int EXCEPT_IN_TANKS = 461; + if (value.Equals((11).ToString())) + return TextFieldType.NATIONALITY; - /** Passenger with fast track priority (express formal procedures at the airport) */ - public const int FAST_TRACK = 462; + if (value.Equals((12).ToString())) + return TextFieldType.SEX; - /** Owner */ - public const int OWNER = 463; + if (value.Equals((13).ToString())) + return TextFieldType.HEIGHT; - /** MRZ strings from ICAO RFID */ - public const int MRZ_STRINGS_ICAO_RFID = 464; + if (value.Equals((14).ToString())) + return TextFieldType.WEIGHT; - /** Number of card issues with this number */ - public const int NUMBER_OF_CARD_ISSUANCE = 465; + if (value.Equals((15).ToString())) + return TextFieldType.EYES_COLOR; - /** Card issues count checksum */ - public const int NUMBER_OF_CARD_ISSUANCE_CHECKSUM = 466; + if (value.Equals((16).ToString())) + return TextFieldType.HAIR_COLOR; - /** Card issues count check digit */ - public const int NUMBER_OF_CARD_ISSUANCE_CHECK_DIGIT = 467; + if (value.Equals((17).ToString())) + return TextFieldType.ADDRESS; - /** Birth century */ - public const int CENTURY_DATE_OF_BIRTH = 468; + if (value.Equals((18).ToString())) + return TextFieldType.DONOR; - /** Validity date of A3 driver’s license */ - public const int DL_CLASS_CODE_A3_FROM = 469; + if (value.Equals((19).ToString())) + return TextFieldType.SOCIAL_SECURITY_NUMBER; - /** Expiration date of A3 driver’s license */ - public const int DL_CLASS_CODE_A3_TO = 470; + if (value.Equals((20).ToString())) + return TextFieldType.DL_CLASS; - /** Restrictions for A3 driver’s license */ - public const int DL_CLASS_CODE_A3_NOTES = 471; + if (value.Equals((21).ToString())) + return TextFieldType.DL_ENDORSED; - /** Validity date of C2 driver’s license */ - public const int DL_CLASS_CODE_C2_FROM = 472; + if (value.Equals((22).ToString())) + return TextFieldType.DL_RESTRICTION_CODE; - /** Expiration date of C2 driver’s license */ - public const int DL_CLASS_CODE_C2_TO = 473; + if (value.Equals((23).ToString())) + return TextFieldType.DL_UNDER_21_DATE; - /** Restrictions for C2 driver’s license */ - public const int DL_CLASS_CODE_C2_NOTES = 474; + if (value.Equals((24).ToString())) + return TextFieldType.AUTHORITY; - /** Validity date of B2 driver’s license */ - public const int DL_CLASS_CODE_B2_FROM = 475; + if (value.Equals((25).ToString())) + return TextFieldType.SURNAME_AND_GIVEN_NAMES; - /** Expiration date of B2 driver’s license */ - public const int DL_CLASS_CODE_B2_TO = 476; + if (value.Equals((26).ToString())) + return TextFieldType.NATIONALITY_CODE; - /** Restrictions for B2 driver’s license */ - public const int DL_CLASS_CODE_B2_NOTES = 477; + if (value.Equals((27).ToString())) + return TextFieldType.PASSPORT_NUMBER; - /** Validity date of D2 driver’s license */ - public const int DL_CLASS_CODE_D2_FROM = 478; + if (value.Equals((28).ToString())) + return TextFieldType.INVITATION_NUMBER; - /** Expiration date of D2 driver’s license */ - public const int DL_CLASS_CODE_D2_TO = 479; + if (value.Equals((29).ToString())) + return TextFieldType.VISA_ID; - /** Restrictions for D2 driver’s license */ - public const int DL_CLASS_CODE_D2_NOTES = 480; + if (value.Equals((30).ToString())) + return TextFieldType.VISA_CLASS; - /** Validity date of B2E driver’s license */ - public const int DL_CLASS_CODE_B2E_FROM = 481; + if (value.Equals((31).ToString())) + return TextFieldType.VISA_SUBCLASS; - /** Expiration date of B2E driver’s license */ - public const int DL_CLASS_CODE_B2E_TO = 482; + if (value.Equals((35).ToString())) + return TextFieldType.MRZ_TYPE; - /** Restrictions for B2E driver’s license */ - public const int DL_CLASS_CODE_B2E_NOTES = 483; + if (value.Equals((36).ToString())) + return TextFieldType.OPTIONAL_DATA; - /** Validity date of G driver’s license */ - public const int DL_CLASS_CODE_G_FROM = 484; + if (value.Equals((37).ToString())) + return TextFieldType.DOCUMENT_CLASS_NAME; - /** Expiration date of G driver’s license */ - public const int DL_CLASS_CODE_G_TO = 485; + if (value.Equals((38).ToString())) + return TextFieldType.ISSUING_STATE_NAME; - /** Restrictions for G driver’s license */ - public const int DL_CLASS_CODE_G_NOTES = 486; + if (value.Equals((39).ToString())) + return TextFieldType.PLACE_OF_ISSUE; - /** Validity date of J driver’s license */ - public const int DL_CLASS_CODE_J_FROM = 487; + if (value.Equals((40).ToString())) + return TextFieldType.DOCUMENT_NUMBER_CHECKSUM; - /** Expiration date of J driver’s license */ - public const int DL_CLASS_CODE_J_TO = 488; + if (value.Equals((41).ToString())) + return TextFieldType.DATE_OF_BIRTH_CHECKSUM; - /** Restrictions for J driver’s license */ - public const int DL_CLASS_CODE_J_NOTES = 489; + if (value.Equals((42).ToString())) + return TextFieldType.DATE_OF_EXPIRY_CHECKSUM; - /** Validity date of LC driver’s license */ - public const int DL_CLASS_CODE_LC_FROM = 490; + if (value.Equals((43).ToString())) + return TextFieldType.PERSONAL_NUMBER_CHECKSUM; - /** Expiration date of LC driver’s license */ - public const int DL_CLASS_CODE_LC_TO = 491; + if (value.Equals((44).ToString())) + return TextFieldType.FINAL_CHECKSUM; - /** Restrictions for LC driver’s license */ - public const int DL_CLASS_CODE_LC_NOTES = 492; + if (value.Equals((45).ToString())) + return TextFieldType.PASSPORT_NUMBER_CHECKSUM; - /** Bank card number */ - public const int BANK_CARD_NUMBER = 493; + if (value.Equals((46).ToString())) + return TextFieldType.INVITATION_NUMBER_CHECKSUM; - /** Bank card validity */ - public const int BANK_CARD_VALID_THRU = 494; + if (value.Equals((47).ToString())) + return TextFieldType.VISA_ID_CHECKSUM; - /** Tax number */ - public const int TAX_NUMBER = 495; + if (value.Equals((48).ToString())) + return TextFieldType.SURNAME_AND_GIVEN_NAMES_CHECKSUM; - /** Health insurance number */ - public const int HEALTH_NUMBER = 496; + if (value.Equals((49).ToString())) + return TextFieldType.VISA_VALID_UNTIL_CHECKSUM; - /** Grandfather`s name */ - public const int GRANDFATHER_NAME = 497; + if (value.Equals((50).ToString())) + return TextFieldType.OTHER; - /** Recruit indicator */ - public const int SELECTEE_INDICATOR = 498; + if (value.Equals((51).ToString())) + return TextFieldType.MRZ_STRINGS; - /** Mother`s last name */ - public const int MOTHER_SURNAME = 499; + if (value.Equals((52).ToString())) + return TextFieldType.NAME_SUFFIX; - /** Mother`s first name */ - public const int MOTHER_GIVEN_NAME = 500; + if (value.Equals((53).ToString())) + return TextFieldType.NAME_PREFIX; - /** Father`s last name */ - public const int FATHER_SURNAME = 501; + if (value.Equals((54).ToString())) + return TextFieldType.DATE_OF_ISSUE_CHECKSUM; - /** Father`s first name */ - public const int FATHER_GIVEN_NAME = 502; + if (value.Equals((55).ToString())) + return TextFieldType.DATE_OF_ISSUE_CHECK_DIGIT; - /** Mother`s date of birth */ - public const int MOTHER_DATE_OF_BIRTH = 503; + if (value.Equals((56).ToString())) + return TextFieldType.DOCUMENT_SERIES; - /** Father`s date of birth */ - public const int FATHER_DATE_OF_BIRTH = 504; + if (value.Equals((57).ToString())) + return TextFieldType.REG_CERT_REG_NUMBER; - /** Mother`s personal number */ - public const int MOTHER_PERSONAL_NUMBER = 505; + if (value.Equals((58).ToString())) + return TextFieldType.REG_CERT_CAR_MODEL; - /** Father`s personal number */ - public const int FATHER_PERSONAL_NUMBER = 506; + if (value.Equals((59).ToString())) + return TextFieldType.REG_CERT_CAR_COLOR; - /** Mother`s place of birth */ - public const int MOTHER_PLACE_OF_BIRTH = 507; + if (value.Equals((60).ToString())) + return TextFieldType.REG_CERT_BODY_NUMBER; - /** Father`s place of birth */ - public const int FATHER_PLACE_OF_BIRTH = 508; + if (value.Equals((61).ToString())) + return TextFieldType.REG_CERT_CAR_TYPE; - /** Mother`s country of birth */ - public const int MOTHER_COUNTRY_OF_BIRTH = 509; + if (value.Equals((62).ToString())) + return TextFieldType.REG_CERT_MAX_WEIGHT; - /** Father`s country of birth */ - public const int FATHER_COUNTRY_OF_BIRTH = 510; + if (value.Equals((63).ToString())) + return TextFieldType.REG_CERT_WEIGHT; - /** Date of document first renewal */ - public const int DATE_FIRST_RENEWAL = 511; + if (value.Equals((64).ToString())) + return TextFieldType.ADDRESS_AREA; - /** Date of document second renewal */ - public const int DATE_SECOND_RENEWAL = 512; + if (value.Equals((65).ToString())) + return TextFieldType.ADDRESS_STATE; - /** Place of examination */ - public const int PLACE_OF_EXAMINATION = 513; + if (value.Equals((66).ToString())) + return TextFieldType.ADDRESS_BUILDING; - /** Application number */ - public const int APPLICATION_NUMBER = 514; + if (value.Equals((67).ToString())) + return TextFieldType.ADDRESS_HOUSE; - /** Voucher number */ - public const int VOUCHER_NUMBER = 515; + if (value.Equals((68).ToString())) + return TextFieldType.ADDRESS_FLAT; - /** Authorization number */ - public const int AUTHORIZATION_NUMBER = 516; + if (value.Equals((69).ToString())) + return TextFieldType.PLACE_OF_REGISTRATION; - /** Faculty */ - public const int FACULTY = 517; + if (value.Equals((70).ToString())) + return TextFieldType.DATE_OF_REGISTRATION; - /** Form of education */ - public const int FORM_OF_EDUCATION = 518; + if (value.Equals((71).ToString())) + return TextFieldType.RESIDENT_FROM; - /** DNI number */ - public const int DNI_NUMBER = 519; + if (value.Equals((72).ToString())) + return TextFieldType.RESIDENT_UNTIL; - /** Retirement number */ - public const int RETIREMENT_NUMBER = 520; + if (value.Equals((73).ToString())) + return TextFieldType.AUTHORITY_CODE; - /** Professional id number */ - public const int PROFESSIONAL_ID_NUMBER = 521; + if (value.Equals((74).ToString())) + return TextFieldType.PLACE_OF_BIRTH_AREA; - /** Age at issue */ - public const int AGE_AT_ISSUE = 522; + if (value.Equals((75).ToString())) + return TextFieldType.PLACE_OF_BIRTH_STATE_CODE; - /** Years since issue */ - public const int YEARS_SINCE_ISSUE = 523; + if (value.Equals((76).ToString())) + return TextFieldType.ADDRESS_STREET; - /** Validity date of BTP driver’s license */ - public const int DL_CLASS_CODE_BTP_FROM = 524; + if (value.Equals((77).ToString())) + return TextFieldType.ADDRESS_CITY; - /** Restrictions for BTP driver’s license */ - public const int DL_CLASS_CODE_BTP_NOTES = 525; + if (value.Equals((78).ToString())) + return TextFieldType.ADDRESS_JURISDICTION_CODE; - /** Expiration date of BTP driver’s license */ - public const int DL_CLASS_CODE_BTP_TO = 526; + if (value.Equals((79).ToString())) + return TextFieldType.ADDRESS_POSTAL_CODE; - /** Validity date of C3 driver’s license */ - public const int DL_CLASS_CODE_C3_FROM = 527; + if (value.Equals((80).ToString())) + return TextFieldType.DOCUMENT_NUMBER_CHECK_DIGIT; - /** Restrictions for C3 driver’s license */ - public const int DL_CLASS_CODE_C3_NOTES = 528; + if (value.Equals((81).ToString())) + return TextFieldType.DATE_OF_BIRTH_CHECK_DIGIT; - /** Expiration date of C3 driver’s license */ - public const int DL_CLASS_CODE_C3_TO = 529; + if (value.Equals((82).ToString())) + return TextFieldType.DATE_OF_EXPIRY_CHECK_DIGIT; - /** Validity date of E driver’s license */ - public const int DL_CLASS_CODE_E_FROM = 530; + if (value.Equals((83).ToString())) + return TextFieldType.PERSONAL_NUMBER_CHECK_DIGIT; - /** Restrictions for E driver’s license */ - public const int DL_CLASS_CODE_E_NOTES = 531; + if (value.Equals((84).ToString())) + return TextFieldType.FINAL_CHECK_DIGIT; - /** Expiration date of E driver’s license */ - public const int DL_CLASS_CODE_E_TO = 532; + if (value.Equals((85).ToString())) + return TextFieldType.PASSPORT_NUMBER_CHECK_DIGIT; - /** Validity date of F driver’s license */ - public const int DL_CLASS_CODE_F_FROM = 533; + if (value.Equals((86).ToString())) + return TextFieldType.INVITATION_NUMBER_CHECK_DIGIT; - /** Restrictions for F driver’s license */ - public const int DL_CLASS_CODE_F_NOTES = 534; + if (value.Equals((87).ToString())) + return TextFieldType.VISA_ID_CHECK_DIGIT; - /** Expiration date of F driver’s license */ - public const int DL_CLASS_CODE_F_TO = 535; + if (value.Equals((88).ToString())) + return TextFieldType.SURNAME_AND_GIVEN_NAMES_CHECK_DIGIT; - /** Validity date of FA driver’s license */ - public const int DL_CLASS_CODE_FA_FROM = 536; + if (value.Equals((89).ToString())) + return TextFieldType.VISA_VALID_UNTIL_CHECK_DIGIT; - /** Restrictions for FA driver’s license */ - public const int DL_CLASS_CODE_FA_NOTES = 537; + if (value.Equals((90).ToString())) + return TextFieldType.PERMIT_DL_CLASS; - /** Expiration date of FA driver’s license */ - public const int DL_CLASS_CODE_FA_TO = 538; + if (value.Equals((91).ToString())) + return TextFieldType.PERMIT_DATE_OF_EXPIRY; - /** Validity date of FA1 driver’s license */ - public const int DL_CLASS_CODE_FA1_FROM = 539; + if (value.Equals((92).ToString())) + return TextFieldType.PERMIT_IDENTIFIER; - /** Restrictions for FA1 driver’s license */ - public const int DL_CLASS_CODE_FA1_NOTES = 540; + if (value.Equals((93).ToString())) + return TextFieldType.PERMIT_DATE_OF_ISSUE; - /** Expiration date of FA1 driver’s license */ - public const int DL_CLASS_CODE_FA1_TO = 541; + if (value.Equals((94).ToString())) + return TextFieldType.PERMIT_RESTRICTION_CODE; - /** Validity date of FB driver’s license */ - public const int DL_CLASS_CODE_FB_FROM = 542; + if (value.Equals((95).ToString())) + return TextFieldType.PERMIT_ENDORSED; - /** Restrictions for FB driver’s license */ - public const int DL_CLASS_CODE_FB_NOTES = 543; + if (value.Equals((96).ToString())) + return TextFieldType.ISSUE_TIMESTAMP; - /** Expiration date of FB driver’s license */ - public const int DL_CLASS_CODE_FB_TO = 544; + if (value.Equals((97).ToString())) + return TextFieldType.NUMBER_OF_DUPLICATES; - /** Validity date of G1 driver’s license */ - public const int DL_CLASS_CODE_G1_FROM = 545; + if (value.Equals((98).ToString())) + return TextFieldType.MEDICAL_INDICATOR_CODES; - /** Restrictions for G1 driver’s license */ - public const int DL_CLASS_CODE_G1_NOTES = 546; + if (value.Equals((99).ToString())) + return TextFieldType.NON_RESIDENT_INDICATOR; - /** Expiration date of G1 driver’s license */ - public const int DL_CLASS_CODE_G1_TO = 547; + if (value.Equals((100).ToString())) + return TextFieldType.VISA_TYPE; - /** Validity date of H driver’s license */ - public const int DL_CLASS_CODE_H_FROM = 548; + if (value.Equals((101).ToString())) + return TextFieldType.VISA_VALID_FROM; - /** Restrictions for H driver’s license */ - public const int DL_CLASS_CODE_H_NOTES = 549; + if (value.Equals((102).ToString())) + return TextFieldType.VISA_VALID_UNTIL; - /** Expiration date of H driver’s license */ - public const int DL_CLASS_CODE_H_TO = 550; + if (value.Equals((103).ToString())) + return TextFieldType.DURATION_OF_STAY; - /** Validity date of I driver’s license */ - public const int DL_CLASS_CODE_I_FROM = 551; + if (value.Equals((104).ToString())) + return TextFieldType.NUMBER_OF_ENTRIES; - /** Restrictions for I driver’s license */ - public const int DL_CLASS_CODE_I_NOTES = 552; + if (value.Equals((105).ToString())) + return TextFieldType.DAY; - /** Expiration date of I driver’s license */ - public const int DL_CLASS_CODE_I_TO = 553; + if (value.Equals((106).ToString())) + return TextFieldType.MONTH; - /** Validity date of K driver’s license */ - public const int DL_CLASS_CODE_K_FROM = 554; + if (value.Equals((107).ToString())) + return TextFieldType.YEAR; - /** Restrictions for K driver’s license */ - public const int DL_CLASS_CODE_K_NOTES = 555; + if (value.Equals((108).ToString())) + return TextFieldType.UNIQUE_CUSTOMER_IDENTIFIER; - /** Expiration date of K driver’s license */ - public const int DL_CLASS_CODE_K_TO = 556; + if (value.Equals((109).ToString())) + return TextFieldType.COMMERCIAL_VEHICLE_CODES; - /** Validity date of LK driver’s license */ - public const int DL_CLASS_CODE_LK_FROM = 557; + if (value.Equals((110).ToString())) + return TextFieldType.AKA_DATE_OF_BIRTH; - /** Restrictions for LK driver’s license */ - public const int DL_CLASS_CODE_LK_NOTES = 558; + if (value.Equals((111).ToString())) + return TextFieldType.AKA_SOCIAL_SECURITY_NUMBER; - /** Expiration date of LK driver’s license */ - public const int DL_CLASS_CODE_LK_TO = 559; + if (value.Equals((112).ToString())) + return TextFieldType.AKA_SURNAME; - /** Validity date of N driver’s license */ - public const int DL_CLASS_CODE_N_FROM = 560; + if (value.Equals((113).ToString())) + return TextFieldType.AKA_GIVEN_NAMES; - /** Restrictions for N driver’s license */ - public const int DL_CLASS_CODE_N_NOTES = 561; + if (value.Equals((114).ToString())) + return TextFieldType.AKA_NAME_SUFFIX; - /** Expiration date of N driver’s license */ - public const int DL_CLASS_CODE_N_TO = 562; + if (value.Equals((115).ToString())) + return TextFieldType.AKA_NAME_PREFIX; - /** Validity date of S driver’s license */ - public const int DL_CLASS_CODE_S_FROM = 563; + if (value.Equals((116).ToString())) + return TextFieldType.MAILING_ADDRESS_STREET; - /** Restrictions for S driver’s license */ - public const int DL_CLASS_CODE_S_NOTES = 564; + if (value.Equals((117).ToString())) + return TextFieldType.MAILING_ADDRESS_CITY; - /** Expiration date of S driver’s license */ - public const int DL_CLASS_CODE_S_TO = 565; + if (value.Equals((118).ToString())) + return TextFieldType.MAILING_ADDRESS_JURISDICTION_CODE; - /** Validity date of TB driver’s license */ - public const int DL_CLASS_CODE_TB_FROM = 566; + if (value.Equals((119).ToString())) + return TextFieldType.MAILING_ADDRESS_POSTAL_CODE; - /** Restrictions for TB driver’s license */ - public const int DL_CLASS_CODE_TB_NOTES = 567; + if (value.Equals((120).ToString())) + return TextFieldType.AUDIT_INFORMATION; - /** Expiration date of TB driver’s license */ - public const int DL_CLASS_CODE_TB_TO = 568; + if (value.Equals((121).ToString())) + return TextFieldType.INVENTORY_NUMBER; - /** Validity date of TM driver’s license */ - public const int DL_CLASS_CODE_TM_FROM = 569; + if (value.Equals((122).ToString())) + return TextFieldType.RACE_ETHNICITY; - /** Restrictions for TM driver’s license */ - public const int DL_CLASS_CODE_TM_NOTES = 570; + if (value.Equals((123).ToString())) + return TextFieldType.JURISDICTION_VEHICLE_CLASS; - /** Expiration date of TM driver’s license */ - public const int DL_CLASS_CODE_TM_TO = 571; + if (value.Equals((124).ToString())) + return TextFieldType.JURISDICTION_ENDORSEMENT_CODE; - /** Validity date of TR driver’s license */ - public const int DL_CLASS_CODE_TR_FROM = 572; + if (value.Equals((125).ToString())) + return TextFieldType.JURISDICTION_RESTRICTION_CODE; - /** Restrictions for TR driver’s license */ - public const int DL_CLASS_CODE_TR_NOTES = 573; + if (value.Equals((126).ToString())) + return TextFieldType.FAMILY_NAME; - /** Expiration date of TR driver’s license */ - public const int DL_CLASS_CODE_TR_TO = 574; + if (value.Equals((127).ToString())) + return TextFieldType.GIVEN_NAMES_RUS; - /** Validity date of TV driver’s license */ - public const int DL_CLASS_CODE_TV_FROM = 575; + if (value.Equals((128).ToString())) + return TextFieldType.VISA_ID_RUS; - /** Restrictions for TV driver’s license */ - public const int DL_CLASS_CODE_TV_NOTES = 576; + if (value.Equals((129).ToString())) + return TextFieldType.FATHERS_NAME; - /** Expiration date of TV driver’s license */ - public const int DL_CLASS_CODE_TV_TO = 577; + if (value.Equals((130).ToString())) + return TextFieldType.FATHERS_NAME_RUS; - /** Validity date of V driver’s license */ - public const int DL_CLASS_CODE_V_FROM = 578; + if (value.Equals((131).ToString())) + return TextFieldType.SURNAME_AND_GIVEN_NAMES_RUS; - /** Restrictions for V driver’s license */ - public const int DL_CLASS_CODE_V_NOTES = 579; + if (value.Equals((132).ToString())) + return TextFieldType.PLACE_OF_BIRTH_RUS; - /** Expiration date of V driver’s license */ - public const int DL_CLASS_CODE_V_TO = 580; + if (value.Equals((133).ToString())) + return TextFieldType.AUTHORITY_RUS; - /** Validity date of W driver’s license */ - public const int DL_CLASS_CODE_W_FROM = 581; + if (value.Equals((134).ToString())) + return TextFieldType.ISSUING_STATE_CODE_NUMERIC; - /** Restrictions for W driver’s license */ - public const int DL_CLASS_CODE_W_NOTES = 582; + if (value.Equals((135).ToString())) + return TextFieldType.NATIONALITY_CODE_NUMERIC; - /** Expiration date of W driver’s license */ - public const int DL_CLASS_CODE_W_TO = 583; + if (value.Equals((136).ToString())) + return TextFieldType.ENGINE_POWER; - /** URL */ - public const int URL = 584; + if (value.Equals((137).ToString())) + return TextFieldType.ENGINE_VOLUME; - /** Caliber */ - public const int CALIBER = 585; + if (value.Equals((138).ToString())) + return TextFieldType.CHASSIS_NUMBER; - /** Model */ - public const int MODEL = 586; + if (value.Equals((139).ToString())) + return TextFieldType.ENGINE_NUMBER; - /** Make */ - public const int MAKE = 587; + if (value.Equals((140).ToString())) + return TextFieldType.ENGINE_MODEL; - /** Number of cylinders */ - public const int NUMBER_OF_CYLINDERS = 588; + if (value.Equals((141).ToString())) + return TextFieldType.VEHICLE_CATEGORY; - /** Surname of husband after registration */ - public const int SURNAME_OF_HUSBAND_AFTER_REGISTRATION = 589; + if (value.Equals((142).ToString())) + return TextFieldType.IDENTITY_CARD_NUMBER; - /** Surname of wife after registration */ - public const int SURNAME_OF_WIFE_AFTER_REGISTRATION = 590; + if (value.Equals((143).ToString())) + return TextFieldType.CONTROL_NUMBER; - /** Date of birth of wife */ - public const int DATE_OF_BIRTH_OF_WIFE = 591; + if (value.Equals((144).ToString())) + return TextFieldType.PARENTS_GIVEN_NAMES; - /** Date of birth of husband */ - public const int DATE_OF_BIRTH_OF_HUSBAND = 592; + if (value.Equals((145).ToString())) + return TextFieldType.SECOND_SURNAME; - /** Citizenship of first person */ - public const int CITIZENSHIP_OF_FIRST_PERSON = 593; + if (value.Equals((146).ToString())) + return TextFieldType.MIDDLE_NAME; - /** Citizenship of second person */ - public const int CITIZENSHIP_OF_SECOND_PERSON = 594; + if (value.Equals((147).ToString())) + return TextFieldType.REG_CERT_VIN; - /** CVV code */ - public const int CVV = 595; + if (value.Equals((148).ToString())) + return TextFieldType.REG_CERT_VIN_CHECK_DIGIT; - /** Date of insurance expiry */ - public const int DATE_OF_INSURANCE_EXPIRY = 596; + if (value.Equals((149).ToString())) + return TextFieldType.REG_CERT_VIN_CHECKSUM; - /** Mortgage */ - public const int MORTGAGE_BY = 597; + if (value.Equals((150).ToString())) + return TextFieldType.LINE_1_CHECK_DIGIT; - /** Old document number */ - public const int OLD_DOCUMENT_NUMBER = 598; + if (value.Equals((151).ToString())) + return TextFieldType.LINE_2_CHECK_DIGIT; - /** Old date of issue */ - public const int OLD_DATE_OF_ISSUE = 599; + if (value.Equals((152).ToString())) + return TextFieldType.LINE_3_CHECK_DIGIT; - /** Old place of issue */ - public const int OLD_PLACE_OF_ISSUE = 600; + if (value.Equals((153).ToString())) + return TextFieldType.LINE_1_CHECKSUM; - /** Validity date of LR driver’s license */ - public const int DL_CLASS_CODE_LR_FROM = 601; + if (value.Equals((154).ToString())) + return TextFieldType.LINE_2_CHECKSUM; - /** Expiration date of LR driver’s license */ - public const int DL_CLASS_CODE_LR_TO = 602; + if (value.Equals((155).ToString())) + return TextFieldType.LINE_3_CHECKSUM; - /** Restrictions for LR driver’s license */ - public const int DL_CLASS_CODE_LR_NOTES = 603; + if (value.Equals((156).ToString())) + return TextFieldType.REG_CERT_REG_NUMBER_CHECK_DIGIT; - /** Validity date of MR driver’s license */ - public const int DL_CLASS_CODE_MR_FROM = 604; + if (value.Equals((157).ToString())) + return TextFieldType.REG_CERT_REG_NUMBER_CHECKSUM; - /** Expiration date of MR driver’s license */ - public const int DL_CLASS_CODE_MR_TO = 605; + if (value.Equals((158).ToString())) + return TextFieldType.REG_CERT_VEHICLE_ITS_CODE; - /** Restrictions for MR driver’s license */ - public const int DL_CLASS_CODE_MR_NOTES = 606; + if (value.Equals((159).ToString())) + return TextFieldType.CARD_ACCESS_NUMBER; - /** Validity date of HR driver’s license */ - public const int DL_CLASS_CODE_HR_FROM = 607; + if (value.Equals((160).ToString())) + return TextFieldType.MARITAL_STATUS; - /** Expiration date of HR driver’s license */ - public const int DL_CLASS_CODE_HR_TO = 608; + if (value.Equals((161).ToString())) + return TextFieldType.COMPANY_NAME; - /** Restrictions for HR driver’s license */ - public const int DL_CLASS_CODE_HR_NOTES = 609; + if (value.Equals((162).ToString())) + return TextFieldType.SPECIAL_NOTES; - /** Validity date of HC driver’s license */ - public const int DL_CLASS_CODE_HC_FROM = 610; + if (value.Equals((163).ToString())) + return TextFieldType.SURNAME_OF_SPOUSE; - /** Expiration date of HC driver’s license */ - public const int DL_CLASS_CODE_HC_TO = 611; + if (value.Equals((164).ToString())) + return TextFieldType.TRACKING_NUMBER; - /** Restrictions for HC driver’s license */ - public const int DL_CLASS_CODE_HC_NOTES = 612; + if (value.Equals((165).ToString())) + return TextFieldType.BOOKLET_NUMBER; - /** Validity date of MC driver’s license */ - public const int DL_CLASS_CODE_MC_FROM = 613; + if (value.Equals((166).ToString())) + return TextFieldType.CHILDREN; - /** Expiration date of MC driver’s license */ - public const int DL_CLASS_CODE_MC_TO = 614; + if (value.Equals((167).ToString())) + return TextFieldType.COPY; - /** Restrictions for MC driver’s license */ - public const int DL_CLASS_CODE_MC_NOTES = 615; + if (value.Equals((168).ToString())) + return TextFieldType.SERIAL_NUMBER; - /** Validity date of RE driver’s license */ - public const int DL_CLASS_CODE_RE_FROM = 616; + if (value.Equals((169).ToString())) + return TextFieldType.DOSSIER_NUMBER; - /** Expiration date of RE driver’s license */ - public const int DL_CLASS_CODE_RE_TO = 617; + if (value.Equals((170).ToString())) + return TextFieldType.AKA_SURNAME_AND_GIVEN_NAMES; - /** Restrictions for RE driver’s license */ - public const int DL_CLASS_CODE_RE_NOTES = 618; + if (value.Equals((171).ToString())) + return TextFieldType.TERRITORIAL_VALIDITY; - /** Validity date of R driver’s license */ - public const int DL_CLASS_CODE_R_FROM = 619; + if (value.Equals((172).ToString())) + return TextFieldType.MRZ_STRINGS_WITH_CORRECT_CHECK_SUMS; - /** Expiration date of R driver’s license */ - public const int DL_CLASS_CODE_R_TO = 620; + if (value.Equals((173).ToString())) + return TextFieldType.DL_CDL_RESTRICTION_CODE; - /** Restrictions for R driver’s license */ - public const int DL_CLASS_CODE_R_NOTES = 621; + if (value.Equals((174).ToString())) + return TextFieldType.DL_UNDER_18_DATE; - /** Validity date of CA driver’s license */ - public const int DL_CLASS_CODE_CA_FROM = 622; + if (value.Equals((175).ToString())) + return TextFieldType.DL_RECORD_CREATED; - /** Expiration date of CA driver’s license */ - public const int DL_CLASS_CODE_CA_TO = 623; + if (value.Equals((176).ToString())) + return TextFieldType.DL_DUPLICATE_DATE; - /** Restrictions for CA driver’s license */ - public const int DL_CLASS_CODE_CA_NOTES = 624; + if (value.Equals((177).ToString())) + return TextFieldType.DL_ISSUE_TYPE; - /** Citizenship Status */ - public const int CITIZENSHIP_STATUS = 625; + if (value.Equals((178).ToString())) + return TextFieldType.MILITARY_BOOK_NUMBER; - /** Military Service From */ - public const int MILITARY_SERVICE_FROM = 626; + if (value.Equals((179).ToString())) + return TextFieldType.DESTINATION; - /** Military Service To */ - public const int MILITARY_SERVICE_TO = 627; + if (value.Equals((180).ToString())) + return TextFieldType.BLOOD_GROUP; - /** Validity date of NT driver’s license */ - public const int DL_CLASS_CODE_NT_FROM = 628; + if (value.Equals((181).ToString())) + return TextFieldType.SEQUENCE_NUMBER; - /** Expiration date of NT driver’s license */ - public const int DL_CLASS_CODE_NT_TO = 629; + if (value.Equals((182).ToString())) + return TextFieldType.REG_CERT_BODY_TYPE; - /** Restrictions for NT driver’s license */ - public const int DL_CLASS_CODE_NT_NOTES = 630; + if (value.Equals((183).ToString())) + return TextFieldType.REG_CERT_CAR_MARK; - /** Validity date of TN driver’s license */ - public const int DL_CLASS_CODE_TN_FROM = 631; + if (value.Equals((184).ToString())) + return TextFieldType.TRANSACTION_NUMBER; - /** Expiration date of TN driver’s license */ - public const int DL_CLASS_CODE_TN_TO = 632; + if (value.Equals((185).ToString())) + return TextFieldType.AGE; - /** Restrictions for TN driver’s license */ - public const int DL_CLASS_CODE_TN_NOTES = 633; + if (value.Equals((186).ToString())) + return TextFieldType.FOLIO_NUMBER; - /** Validity date of D3 driver’s license */ - public const int DL_CLASS_CODE_D3_FROM = 634; + if (value.Equals((187).ToString())) + return TextFieldType.VOTER_KEY; - /** Expiration date of D3 driver’s license */ - public const int DL_CLASS_CODE_D3_TO = 635; + if (value.Equals((188).ToString())) + return TextFieldType.ADDRESS_MUNICIPALITY; - /** Restrictions for D3 driver’s license */ - public const int DL_CLASS_CODE_D3_NOTES = 636; + if (value.Equals((189).ToString())) + return TextFieldType.ADDRESS_LOCATION; - /** Alt Date of expire */ - public const int ALT_DATE_OF_EXPIRE = 637; + if (value.Equals((190).ToString())) + return TextFieldType.SECTION; - /** Validity date of CD driver’s license */ - public const int DL_CLASS_CODE_CD_FROM = 638; + if (value.Equals((191).ToString())) + return TextFieldType.OCR_NUMBER; - /** Expiration date of CD driver’s license */ - public const int DL_CLASS_CODE_CD_TO = 639; + if (value.Equals((192).ToString())) + return TextFieldType.FEDERAL_ELECTIONS; - /** Restrictions for CD driver’s license */ - public const int DL_CLASS_CODE_CD_NOTES = 640; + if (value.Equals((193).ToString())) + return TextFieldType.REFERENCE_NUMBER; - /** Issuer identification number */ - public const int ISSUER_IDENTIFICATION_NUMBER = 641; + if (value.Equals((194).ToString())) + return TextFieldType.OPTIONAL_DATA_CHECKSUM; - /** Second name */ - public const int FT_SECOND_NAME = 647; + if (value.Equals((195).ToString())) + return TextFieldType.OPTIONAL_DATA_CHECK_DIGIT; - /** Third name */ - public const int FT_THIRD_NAME = 648; + if (value.Equals((196).ToString())) + return TextFieldType.VISA_NUMBER; - /** Fourth name */ - public const int FT_FOURTH_NAME = 649; + if (value.Equals((197).ToString())) + return TextFieldType.VISA_NUMBER_CHECKSUM; - /** Last name */ - public const int FT_LAST_NAME = 650; + if (value.Equals((198).ToString())) + return TextFieldType.VISA_NUMBER_CHECK_DIGIT; - public const int ADDRESS_COUNTY_TYPE = 678; + if (value.Equals((199).ToString())) + return TextFieldType.VOTER; - public const int ADDRESS_CITY_TYPE = 679; + if (value.Equals((200).ToString())) + return TextFieldType.PREVIOUS_TYPE; - public const int ADDRESS_BUILDING_TYPE = 680; + if (value.Equals((220).ToString())) + return TextFieldType.FIELD_FROM_MRZ; - public const int DATE_OF_RETIREMENT = 681; + if (value.Equals((221).ToString())) + return TextFieldType.CURRENT_DATE; + if (value.Equals((251).ToString())) + return TextFieldType.STATUS_DATE_OF_EXPIRY; + + if (value.Equals((252).ToString())) + return TextFieldType.BANKNOTE_NUMBER; + + if (value.Equals((253).ToString())) + return TextFieldType.CSC_CODE; + + if (value.Equals((254).ToString())) + return TextFieldType.ARTISTIC_NAME; + + if (value.Equals((255).ToString())) + return TextFieldType.ACADEMIC_TITLE; + + if (value.Equals((256).ToString())) + return TextFieldType.ADDRESS_COUNTRY; + + if (value.Equals((257).ToString())) + return TextFieldType.ADDRESS_ZIP_CODE; + + if (value.Equals((258).ToString())) + return TextFieldType.E_ID_RESIDENCE_PERMIT_1; + + if (value.Equals((259).ToString())) + return TextFieldType.E_ID_RESIDENCE_PERMIT_2; + + if (value.Equals((260).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_STREET; + + if (value.Equals((261).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_CITY; + + if (value.Equals((262).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_STATE; + + if (value.Equals((263).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_COUNTRY; + + if (value.Equals((264).ToString())) + return TextFieldType.E_ID_PLACE_OF_BIRTH_ZIP_CODE; + + if (value.Equals((265).ToString())) + return TextFieldType.CDL_CLASS; + + if (value.Equals((266).ToString())) + return TextFieldType.DL_UNDER_19_DATE; + + if (value.Equals((267).ToString())) + return TextFieldType.WEIGHT_POUNDS; + + if (value.Equals((268).ToString())) + return TextFieldType.LIMITED_DURATION_DOCUMENT_INDICATOR; + + if (value.Equals((269).ToString())) + return TextFieldType.ENDORSEMENT_EXPIRATION_DATE; + + if (value.Equals((270).ToString())) + return TextFieldType.REVISION_DATE; + + if (value.Equals((271).ToString())) + return TextFieldType.COMPLIANCE_TYPE; + + if (value.Equals((272).ToString())) + return TextFieldType.FAMILY_NAME_TRUNCATION; + + if (value.Equals((273).ToString())) + return TextFieldType.FIRST_NAME_TRUNCATION; + + if (value.Equals((274).ToString())) + return TextFieldType.MIDDLE_NAME_TRUNCATION; + + if (value.Equals((275).ToString())) + return TextFieldType.EXAM_DATE; + + if (value.Equals((276).ToString())) + return TextFieldType.ORGANIZATION; + + if (value.Equals((277).ToString())) + return TextFieldType.DEPARTMENT; + + if (value.Equals((278).ToString())) + return TextFieldType.PAY_GRADE; + + if (value.Equals((279).ToString())) + return TextFieldType.RANK; + + if (value.Equals((280).ToString())) + return TextFieldType.BENEFITS_NUMBER; + + if (value.Equals((281).ToString())) + return TextFieldType.SPONSOR_SERVICE; + + if (value.Equals((282).ToString())) + return TextFieldType.SPONSOR_STATUS; + + if (value.Equals((283).ToString())) + return TextFieldType.SPONSOR; + + if (value.Equals((284).ToString())) + return TextFieldType.RELATIONSHIP; + + if (value.Equals((285).ToString())) + return TextFieldType.USCIS; + + if (value.Equals((286).ToString())) + return TextFieldType.CATEGORY; + + if (value.Equals((287).ToString())) + return TextFieldType.CONDITIONS; + + if (value.Equals((288).ToString())) + return TextFieldType.IDENTIFIER; + + if (value.Equals((289).ToString())) + return TextFieldType.CONFIGURATION; + + if (value.Equals((290).ToString())) + return TextFieldType.DISCRETIONARY_DATA; + + if (value.Equals((291).ToString())) + return TextFieldType.LINE_1_OPTIONAL_DATA; + + if (value.Equals((292).ToString())) + return TextFieldType.LINE_2_OPTIONAL_DATA; + + if (value.Equals((293).ToString())) + return TextFieldType.LINE_3_OPTIONAL_DATA; + + if (value.Equals((294).ToString())) + return TextFieldType.EQV_CODE; + + if (value.Equals((295).ToString())) + return TextFieldType.ALT_CODE; + + if (value.Equals((296).ToString())) + return TextFieldType.BINARY_CODE; + + if (value.Equals((297).ToString())) + return TextFieldType.PSEUDO_CODE; + + if (value.Equals((298).ToString())) + return TextFieldType.FEE; + + if (value.Equals((299).ToString())) + return TextFieldType.STAMP_NUMBER; + + if (value.Equals((300).ToString())) + return TextFieldType.SBH_SECURITY_OPTIONS; + + if (value.Equals((301).ToString())) + return TextFieldType.SBH_INTEGRITY_OPTIONS; + + if (value.Equals((302).ToString())) + return TextFieldType.DATE_OF_CREATION; + + if (value.Equals((303).ToString())) + return TextFieldType.VALIDITY_PERIOD; + + if (value.Equals((304).ToString())) + return TextFieldType.PATRON_HEADER_VERSION; + + if (value.Equals((305).ToString())) + return TextFieldType.BDB_TYPE; + + if (value.Equals((306).ToString())) + return TextFieldType.BIOMETRIC_TYPE; + + if (value.Equals((307).ToString())) + return TextFieldType.BIOMETRIC_SUBTYPE; + + if (value.Equals((308).ToString())) + return TextFieldType.BIOMETRIC_PRODUCT_ID; + + if (value.Equals((309).ToString())) + return TextFieldType.BIOMETRIC_FORMAT_OWNER; + + if (value.Equals((310).ToString())) + return TextFieldType.BIOMETRIC_FORMAT_TYPE; + + if (value.Equals((311).ToString())) + return TextFieldType.PHONE; + + if (value.Equals((312).ToString())) + return TextFieldType.PROFESSION; + + if (value.Equals((313).ToString())) + return TextFieldType.TITLE; + + if (value.Equals((314).ToString())) + return TextFieldType.PERSONAL_SUMMARY; + + if (value.Equals((315).ToString())) + return TextFieldType.OTHER_VALID_ID; + + if (value.Equals((316).ToString())) + return TextFieldType.CUSTODY_INFO; + + if (value.Equals((317).ToString())) + return TextFieldType.OTHER_NAME; + + if (value.Equals((318).ToString())) + return TextFieldType.OBSERVATIONS; + + if (value.Equals((319).ToString())) + return TextFieldType.TAX; + + if (value.Equals((320).ToString())) + return TextFieldType.DATE_OF_PERSONALIZATION; + + if (value.Equals((321).ToString())) + return TextFieldType.PERSONALIZATION_SN; + + if (value.Equals((322).ToString())) + return TextFieldType.OTHER_PERSON_NAME; + + if (value.Equals((323).ToString())) + return TextFieldType.PERSON_TO_NOTIFY_DATE_OF_RECORD; + + if (value.Equals((324).ToString())) + return TextFieldType.PERSON_TO_NOTIFY_NAME; + + if (value.Equals((325).ToString())) + return TextFieldType.PERSON_TO_NOTIFY_PHONE; + + if (value.Equals((326).ToString())) + return TextFieldType.PERSON_TO_NOTIFY_ADDRESS; + + if (value.Equals((327).ToString())) + return TextFieldType.DS_CERTIFICATE_ISSUER; + + if (value.Equals((328).ToString())) + return TextFieldType.DS_CERTIFICATE_SUBJECT; + + if (value.Equals((329).ToString())) + return TextFieldType.DS_CERTIFICATE_VALID_FROM; + + if (value.Equals((330).ToString())) + return TextFieldType.DS_CERTIFICATE_VALID_TO; + + if (value.Equals((331).ToString())) + return TextFieldType.VRC_DATA_OBJECT_ENTRY; + + if (value.Equals((332).ToString())) + return TextFieldType.TYPE_APPROVAL_NUMBER; + + if (value.Equals((333).ToString())) + return TextFieldType.ADMINISTRATIVE_NUMBER; + + if (value.Equals((334).ToString())) + return TextFieldType.DOCUMENT_DISCRIMINATOR; + + if (value.Equals((335).ToString())) + return TextFieldType.DATA_DISCRIMINATOR; + + if (value.Equals((336).ToString())) + return TextFieldType.ISO_ISSUER_ID_NUMBER; + + if (value.Equals((337).ToString())) + return TextFieldType.DTC_VERSION; + + if (value.Equals((338).ToString())) + return TextFieldType.DTC_ID; + + if (value.Equals((339).ToString())) + return TextFieldType.DTC_DATE_OF_EXPIRY; + + if (value.Equals((340).ToString())) + return TextFieldType.GNIB_NUMBER; + + if (value.Equals((341).ToString())) + return TextFieldType.DEPT_NUMBER; + + if (value.Equals((342).ToString())) + return TextFieldType.TELEX_CODE; + + if (value.Equals((343).ToString())) + return TextFieldType.ALLERGIES; + + if (value.Equals((344).ToString())) + return TextFieldType.SP_CODE; + + if (value.Equals((345).ToString())) + return TextFieldType.COURT_CODE; + + if (value.Equals((346).ToString())) + return TextFieldType.CTY; + + if (value.Equals((347).ToString())) + return TextFieldType.SPONSOR_SSN; + + if (value.Equals((348).ToString())) + return TextFieldType.DOD_NUMBER; + + if (value.Equals((349).ToString())) + return TextFieldType.MC_NOVICE_DATE; + + if (value.Equals((350).ToString())) + return TextFieldType.DUF_NUMBER; + + if (value.Equals((351).ToString())) + return TextFieldType.AGY; + + if (value.Equals((352).ToString())) + return TextFieldType.PNR_CODE; + + if (value.Equals((353).ToString())) + return TextFieldType.FROM_AIRPORT_CODE; + + if (value.Equals((354).ToString())) + return TextFieldType.TO_AIRPORT_CODE; + + if (value.Equals((355).ToString())) + return TextFieldType.FLIGHT_NUMBER; + + if (value.Equals((356).ToString())) + return TextFieldType.DATE_OF_FLIGHT; + + if (value.Equals((357).ToString())) + return TextFieldType.SEAT_NUMBER; + + if (value.Equals((358).ToString())) + return TextFieldType.DATE_OF_ISSUE_BOARDING_PASS; + + if (value.Equals((359).ToString())) + return TextFieldType.CCW_UNTIL; + + if (value.Equals((360).ToString())) + return TextFieldType.REFERENCE_NUMBER_CHECKSUM; + + if (value.Equals((361).ToString())) + return TextFieldType.REFERENCE_NUMBER_CHECK_DIGIT; + + if (value.Equals((362).ToString())) + return TextFieldType.ROOM_NUMBER; + + if (value.Equals((363).ToString())) + return TextFieldType.RELIGION; + + if (value.Equals((364).ToString())) + return TextFieldType.REMAINDER_TERM; + + if (value.Equals((365).ToString())) + return TextFieldType.ELECTRONIC_TICKET_INDICATOR; + + if (value.Equals((366).ToString())) + return TextFieldType.COMPARTMENT_CODE; + + if (value.Equals((367).ToString())) + return TextFieldType.CHECK_IN_SEQUENCE_NUMBER; + + if (value.Equals((368).ToString())) + return TextFieldType.AIRLINE_DESIGNATOR_OF_BOARDING_PASS_ISSUER; + + if (value.Equals((369).ToString())) + return TextFieldType.AIRLINE_NUMERIC_CODE; + + if (value.Equals((370).ToString())) + return TextFieldType.TICKET_NUMBER; + + if (value.Equals((371).ToString())) + return TextFieldType.FREQUENT_FLYER_AIRLINE_DESIGNATOR; + + if (value.Equals((372).ToString())) + return TextFieldType.FREQUENT_FLYER_NUMBER; + + if (value.Equals((373).ToString())) + return TextFieldType.FREE_BAGGAGE_ALLOWANCE; + + if (value.Equals((374).ToString())) + return TextFieldType.PDF417_CODEC; + + if (value.Equals((375).ToString())) + return TextFieldType.IDENTITY_CARD_NUMBER_CHECKSUM; + + if (value.Equals((376).ToString())) + return TextFieldType.IDENTITY_CARD_NUMBER_CHECK_DIGIT; + + if (value.Equals((377).ToString())) + return TextFieldType.VETERAN; + + if (value.Equals((378).ToString())) + return TextFieldType.DL_CLASS_CODE_A1_FROM; + + if (value.Equals((379).ToString())) + return TextFieldType.DL_CLASS_CODE_A1_TO; + + if (value.Equals((380).ToString())) + return TextFieldType.DL_CLASS_CODE_A1_NOTES; + + if (value.Equals((381).ToString())) + return TextFieldType.DL_CLASS_CODE_A_FROM; + + if (value.Equals((382).ToString())) + return TextFieldType.DL_CLASS_CODE_A_TO; + + if (value.Equals((383).ToString())) + return TextFieldType.DL_CLASS_CODE_A_NOTES; + + if (value.Equals((384).ToString())) + return TextFieldType.DL_CLASS_CODE_B_FROM; + + if (value.Equals((385).ToString())) + return TextFieldType.DL_CLASS_CODE_B_TO; + + if (value.Equals((386).ToString())) + return TextFieldType.DL_CLASS_CODE_B_NOTES; + + if (value.Equals((387).ToString())) + return TextFieldType.DL_CLASS_CODE_C1_FROM; + + if (value.Equals((388).ToString())) + return TextFieldType.DL_CLASS_CODE_C1_TO; + + if (value.Equals((389).ToString())) + return TextFieldType.DL_CLASS_CODE_C1_NOTES; + + if (value.Equals((390).ToString())) + return TextFieldType.DL_CLASS_CODE_C_FROM; + + if (value.Equals((391).ToString())) + return TextFieldType.DL_CLASS_CODE_C_TO; + + if (value.Equals((392).ToString())) + return TextFieldType.DL_CLASS_CODE_C_NOTES; + + if (value.Equals((393).ToString())) + return TextFieldType.DL_CLASS_CODE_D1_FROM; + + if (value.Equals((394).ToString())) + return TextFieldType.DL_CLASS_CODE_D1_TO; + + if (value.Equals((395).ToString())) + return TextFieldType.DL_CLASS_CODE_D1_NOTES; + + if (value.Equals((396).ToString())) + return TextFieldType.DL_CLASS_CODE_D_FROM; + + if (value.Equals((397).ToString())) + return TextFieldType.DL_CLASS_CODE_D_TO; + + if (value.Equals((398).ToString())) + return TextFieldType.DL_CLASS_CODE_D_NOTES; + + if (value.Equals((399).ToString())) + return TextFieldType.DL_CLASS_CODE_BE_FROM; + + if (value.Equals((400).ToString())) + return TextFieldType.DL_CLASS_CODE_BE_TO; + + if (value.Equals((401).ToString())) + return TextFieldType.DL_CLASS_CODE_BE_NOTES; + + if (value.Equals((402).ToString())) + return TextFieldType.DL_CLASS_CODE_C1E_FROM; + + if (value.Equals((403).ToString())) + return TextFieldType.DL_CLASS_CODE_C1E_TO; + + if (value.Equals((404).ToString())) + return TextFieldType.DL_CLASS_CODE_C1E_NOTES; + + if (value.Equals((405).ToString())) + return TextFieldType.DL_CLASS_CODE_CE_FROM; + + if (value.Equals((406).ToString())) + return TextFieldType.DL_CLASS_CODE_CE_TO; + + if (value.Equals((407).ToString())) + return TextFieldType.DL_CLASS_CODE_CE_NOTES; + + if (value.Equals((408).ToString())) + return TextFieldType.DL_CLASS_CODE_D1E_FROM; + + if (value.Equals((409).ToString())) + return TextFieldType.DL_CLASS_CODE_D1E_TO; + + if (value.Equals((410).ToString())) + return TextFieldType.DL_CLASS_CODE_D1E_NOTES; + + if (value.Equals((411).ToString())) + return TextFieldType.DL_CLASS_CODE_DE_FROM; + + if (value.Equals((412).ToString())) + return TextFieldType.DL_CLASS_CODE_DE_TO; + + if (value.Equals((413).ToString())) + return TextFieldType.DL_CLASS_CODE_DE_NOTES; + + if (value.Equals((414).ToString())) + return TextFieldType.DL_CLASS_CODE_M_FROM; + + if (value.Equals((415).ToString())) + return TextFieldType.DL_CLASS_CODE_M_TO; + + if (value.Equals((416).ToString())) + return TextFieldType.DL_CLASS_CODE_M_NOTES; + + if (value.Equals((417).ToString())) + return TextFieldType.DL_CLASS_CODE_L_FROM; + + if (value.Equals((418).ToString())) + return TextFieldType.DL_CLASS_CODE_L_TO; + + if (value.Equals((419).ToString())) + return TextFieldType.DL_CLASS_CODE_L_NOTES; + + if (value.Equals((420).ToString())) + return TextFieldType.DL_CLASS_CODE_T_FROM; + + if (value.Equals((421).ToString())) + return TextFieldType.DL_CLASS_CODE_T_TO; + + if (value.Equals((422).ToString())) + return TextFieldType.DL_CLASS_CODE_T_NOTES; + + if (value.Equals((423).ToString())) + return TextFieldType.DL_CLASS_CODE_AM_FROM; + + if (value.Equals((424).ToString())) + return TextFieldType.DL_CLASS_CODE_AM_TO; + + if (value.Equals((425).ToString())) + return TextFieldType.DL_CLASS_CODE_AM_NOTES; + + if (value.Equals((426).ToString())) + return TextFieldType.DL_CLASS_CODE_A2_FROM; + + if (value.Equals((427).ToString())) + return TextFieldType.DL_CLASS_CODE_A2_TO; + + if (value.Equals((428).ToString())) + return TextFieldType.DL_CLASS_CODE_A2_NOTES; + + if (value.Equals((429).ToString())) + return TextFieldType.DL_CLASS_CODE_B1_FROM; + + if (value.Equals((430).ToString())) + return TextFieldType.DL_CLASS_CODE_B1_TO; + + if (value.Equals((431).ToString())) + return TextFieldType.DL_CLASS_CODE_B1_NOTES; + + if (value.Equals((432).ToString())) + return TextFieldType.SURNAME_AT_BIRTH; + + if (value.Equals((433).ToString())) + return TextFieldType.CIVIL_STATUS; + + if (value.Equals((434).ToString())) + return TextFieldType.NUMBER_OF_SEATS; + + if (value.Equals((435).ToString())) + return TextFieldType.NUMBER_OF_STANDING_PLACES; + + if (value.Equals((436).ToString())) + return TextFieldType.MAX_SPEED; + + if (value.Equals((437).ToString())) + return TextFieldType.FUEL_TYPE; + + if (value.Equals((438).ToString())) + return TextFieldType.EC_ENVIRONMENTAL_TYPE; + + if (value.Equals((439).ToString())) + return TextFieldType.POWER_WEIGHT_RATIO; + + if (value.Equals((440).ToString())) + return TextFieldType.MAX_MASS_OF_TRAILER_BRAKED; + + if (value.Equals((441).ToString())) + return TextFieldType.MAX_MASS_OF_TRAILER_UNBRAKED; + + if (value.Equals((442).ToString())) + return TextFieldType.TRANSMISSION_TYPE; + + if (value.Equals((443).ToString())) + return TextFieldType.TRAILER_HITCH; + + if (value.Equals((444).ToString())) + return TextFieldType.ACCOMPANIED_BY; + + if (value.Equals((445).ToString())) + return TextFieldType.POLICE_DISTRICT; + + if (value.Equals((446).ToString())) + return TextFieldType.FIRST_ISSUE_DATE; + + if (value.Equals((447).ToString())) + return TextFieldType.PAYLOAD_CAPACITY; + + if (value.Equals((448).ToString())) + return TextFieldType.NUMBER_OF_AXLES; + + if (value.Equals((449).ToString())) + return TextFieldType.PERMISSIBLE_AXLE_LOAD; + + if (value.Equals((450).ToString())) + return TextFieldType.PRECINCT; + + if (value.Equals((451).ToString())) + return TextFieldType.INVITED_BY; + + if (value.Equals((452).ToString())) + return TextFieldType.PURPOSE_OF_ENTRY; + + if (value.Equals((453).ToString())) + return TextFieldType.SKIN_COLOR; + + if (value.Equals((454).ToString())) + return TextFieldType.COMPLEXION; + + if (value.Equals((455).ToString())) + return TextFieldType.AIRPORT_FROM; + + if (value.Equals((456).ToString())) + return TextFieldType.AIRPORT_TO; + + if (value.Equals((457).ToString())) + return TextFieldType.AIRLINE_NAME; + + if (value.Equals((458).ToString())) + return TextFieldType.AIRLINE_NAME_FREQUENT_FLYER; + + if (value.Equals((459).ToString())) + return TextFieldType.LICENSE_NUMBER; + + if (value.Equals((460).ToString())) + return TextFieldType.IN_TANKS; + + if (value.Equals((461).ToString())) + return TextFieldType.EXCEPT_IN_TANKS; + + if (value.Equals((462).ToString())) + return TextFieldType.FAST_TRACK; + + if (value.Equals((463).ToString())) + return TextFieldType.OWNER; + + if (value.Equals((464).ToString())) + return TextFieldType.MRZ_STRINGS_ICAO_RFID; + + if (value.Equals((465).ToString())) + return TextFieldType.NUMBER_OF_CARD_ISSUANCE; + + if (value.Equals((466).ToString())) + return TextFieldType.NUMBER_OF_CARD_ISSUANCE_CHECKSUM; + + if (value.Equals((467).ToString())) + return TextFieldType.NUMBER_OF_CARD_ISSUANCE_CHECK_DIGIT; + + if (value.Equals((468).ToString())) + return TextFieldType.CENTURY_DATE_OF_BIRTH; + + if (value.Equals((469).ToString())) + return TextFieldType.DL_CLASS_CODE_A3_FROM; + + if (value.Equals((470).ToString())) + return TextFieldType.DL_CLASS_CODE_A3_TO; + + if (value.Equals((471).ToString())) + return TextFieldType.DL_CLASS_CODE_A3_NOTES; + + if (value.Equals((472).ToString())) + return TextFieldType.DL_CLASS_CODE_C2_FROM; + + if (value.Equals((473).ToString())) + return TextFieldType.DL_CLASS_CODE_C2_TO; + + if (value.Equals((474).ToString())) + return TextFieldType.DL_CLASS_CODE_C2_NOTES; + + if (value.Equals((475).ToString())) + return TextFieldType.DL_CLASS_CODE_B2_FROM; + + if (value.Equals((476).ToString())) + return TextFieldType.DL_CLASS_CODE_B2_TO; + + if (value.Equals((477).ToString())) + return TextFieldType.DL_CLASS_CODE_B2_NOTES; + + if (value.Equals((478).ToString())) + return TextFieldType.DL_CLASS_CODE_D2_FROM; + + if (value.Equals((479).ToString())) + return TextFieldType.DL_CLASS_CODE_D2_TO; + + if (value.Equals((480).ToString())) + return TextFieldType.DL_CLASS_CODE_D2_NOTES; + + if (value.Equals((481).ToString())) + return TextFieldType.DL_CLASS_CODE_B2E_FROM; + + if (value.Equals((482).ToString())) + return TextFieldType.DL_CLASS_CODE_B2E_TO; + + if (value.Equals((483).ToString())) + return TextFieldType.DL_CLASS_CODE_B2E_NOTES; + + if (value.Equals((484).ToString())) + return TextFieldType.DL_CLASS_CODE_G_FROM; + + if (value.Equals((485).ToString())) + return TextFieldType.DL_CLASS_CODE_G_TO; + + if (value.Equals((486).ToString())) + return TextFieldType.DL_CLASS_CODE_G_NOTES; + + if (value.Equals((487).ToString())) + return TextFieldType.DL_CLASS_CODE_J_FROM; + + if (value.Equals((488).ToString())) + return TextFieldType.DL_CLASS_CODE_J_TO; + + if (value.Equals((489).ToString())) + return TextFieldType.DL_CLASS_CODE_J_NOTES; + + if (value.Equals((490).ToString())) + return TextFieldType.DL_CLASS_CODE_LC_FROM; + + if (value.Equals((491).ToString())) + return TextFieldType.DL_CLASS_CODE_LC_TO; + + if (value.Equals((492).ToString())) + return TextFieldType.DL_CLASS_CODE_LC_NOTES; + + if (value.Equals((493).ToString())) + return TextFieldType.BANK_CARD_NUMBER; + + if (value.Equals((494).ToString())) + return TextFieldType.BANK_CARD_VALID_THRU; + + if (value.Equals((495).ToString())) + return TextFieldType.TAX_NUMBER; + + if (value.Equals((496).ToString())) + return TextFieldType.HEALTH_NUMBER; + + if (value.Equals((497).ToString())) + return TextFieldType.GRANDFATHER_NAME; + + if (value.Equals((498).ToString())) + return TextFieldType.SELECTEE_INDICATOR; + + if (value.Equals((499).ToString())) + return TextFieldType.MOTHER_SURNAME; + + if (value.Equals((500).ToString())) + return TextFieldType.MOTHER_GIVEN_NAME; + + if (value.Equals((501).ToString())) + return TextFieldType.FATHER_SURNAME; + + if (value.Equals((502).ToString())) + return TextFieldType.FATHER_GIVEN_NAME; + + if (value.Equals((503).ToString())) + return TextFieldType.MOTHER_DATE_OF_BIRTH; + + if (value.Equals((504).ToString())) + return TextFieldType.FATHER_DATE_OF_BIRTH; + + if (value.Equals((505).ToString())) + return TextFieldType.MOTHER_PERSONAL_NUMBER; + + if (value.Equals((506).ToString())) + return TextFieldType.FATHER_PERSONAL_NUMBER; + + if (value.Equals((507).ToString())) + return TextFieldType.MOTHER_PLACE_OF_BIRTH; + + if (value.Equals((508).ToString())) + return TextFieldType.FATHER_PLACE_OF_BIRTH; + + if (value.Equals((509).ToString())) + return TextFieldType.MOTHER_COUNTRY_OF_BIRTH; + + if (value.Equals((510).ToString())) + return TextFieldType.FATHER_COUNTRY_OF_BIRTH; + + if (value.Equals((511).ToString())) + return TextFieldType.DATE_FIRST_RENEWAL; + + if (value.Equals((512).ToString())) + return TextFieldType.DATE_SECOND_RENEWAL; + + if (value.Equals((513).ToString())) + return TextFieldType.PLACE_OF_EXAMINATION; + + if (value.Equals((514).ToString())) + return TextFieldType.APPLICATION_NUMBER; + + if (value.Equals((515).ToString())) + return TextFieldType.VOUCHER_NUMBER; + + if (value.Equals((516).ToString())) + return TextFieldType.AUTHORIZATION_NUMBER; + + if (value.Equals((517).ToString())) + return TextFieldType.FACULTY; + + if (value.Equals((518).ToString())) + return TextFieldType.FORM_OF_EDUCATION; + + if (value.Equals((519).ToString())) + return TextFieldType.DNI_NUMBER; + + if (value.Equals((520).ToString())) + return TextFieldType.RETIREMENT_NUMBER; + + if (value.Equals((521).ToString())) + return TextFieldType.PROFESSIONAL_ID_NUMBER; + + if (value.Equals((522).ToString())) + return TextFieldType.AGE_AT_ISSUE; + + if (value.Equals((523).ToString())) + return TextFieldType.YEARS_SINCE_ISSUE; + + if (value.Equals((524).ToString())) + return TextFieldType.DL_CLASS_CODE_BTP_FROM; + + if (value.Equals((525).ToString())) + return TextFieldType.DL_CLASS_CODE_BTP_NOTES; + + if (value.Equals((526).ToString())) + return TextFieldType.DL_CLASS_CODE_BTP_TO; + + if (value.Equals((527).ToString())) + return TextFieldType.DL_CLASS_CODE_C3_FROM; + + if (value.Equals((528).ToString())) + return TextFieldType.DL_CLASS_CODE_C3_NOTES; + + if (value.Equals((529).ToString())) + return TextFieldType.DL_CLASS_CODE_C3_TO; + + if (value.Equals((530).ToString())) + return TextFieldType.DL_CLASS_CODE_E_FROM; + + if (value.Equals((531).ToString())) + return TextFieldType.DL_CLASS_CODE_E_NOTES; + + if (value.Equals((532).ToString())) + return TextFieldType.DL_CLASS_CODE_E_TO; + + if (value.Equals((533).ToString())) + return TextFieldType.DL_CLASS_CODE_F_FROM; + + if (value.Equals((534).ToString())) + return TextFieldType.DL_CLASS_CODE_F_NOTES; + + if (value.Equals((535).ToString())) + return TextFieldType.DL_CLASS_CODE_F_TO; + + if (value.Equals((536).ToString())) + return TextFieldType.DL_CLASS_CODE_FA_FROM; + + if (value.Equals((537).ToString())) + return TextFieldType.DL_CLASS_CODE_FA_NOTES; + + if (value.Equals((538).ToString())) + return TextFieldType.DL_CLASS_CODE_FA_TO; + + if (value.Equals((539).ToString())) + return TextFieldType.DL_CLASS_CODE_FA1_FROM; + + if (value.Equals((540).ToString())) + return TextFieldType.DL_CLASS_CODE_FA1_NOTES; + + if (value.Equals((541).ToString())) + return TextFieldType.DL_CLASS_CODE_FA1_TO; + + if (value.Equals((542).ToString())) + return TextFieldType.DL_CLASS_CODE_FB_FROM; + + if (value.Equals((543).ToString())) + return TextFieldType.DL_CLASS_CODE_FB_NOTES; + + if (value.Equals((544).ToString())) + return TextFieldType.DL_CLASS_CODE_FB_TO; + + if (value.Equals((545).ToString())) + return TextFieldType.DL_CLASS_CODE_G1_FROM; + + if (value.Equals((546).ToString())) + return TextFieldType.DL_CLASS_CODE_G1_NOTES; + + if (value.Equals((547).ToString())) + return TextFieldType.DL_CLASS_CODE_G1_TO; + + if (value.Equals((548).ToString())) + return TextFieldType.DL_CLASS_CODE_H_FROM; + + if (value.Equals((549).ToString())) + return TextFieldType.DL_CLASS_CODE_H_NOTES; + + if (value.Equals((550).ToString())) + return TextFieldType.DL_CLASS_CODE_H_TO; + + if (value.Equals((551).ToString())) + return TextFieldType.DL_CLASS_CODE_I_FROM; + + if (value.Equals((552).ToString())) + return TextFieldType.DL_CLASS_CODE_I_NOTES; + + if (value.Equals((553).ToString())) + return TextFieldType.DL_CLASS_CODE_I_TO; + + if (value.Equals((554).ToString())) + return TextFieldType.DL_CLASS_CODE_K_FROM; + + if (value.Equals((555).ToString())) + return TextFieldType.DL_CLASS_CODE_K_NOTES; + + if (value.Equals((556).ToString())) + return TextFieldType.DL_CLASS_CODE_K_TO; + + if (value.Equals((557).ToString())) + return TextFieldType.DL_CLASS_CODE_LK_FROM; + + if (value.Equals((558).ToString())) + return TextFieldType.DL_CLASS_CODE_LK_NOTES; + + if (value.Equals((559).ToString())) + return TextFieldType.DL_CLASS_CODE_LK_TO; + + if (value.Equals((560).ToString())) + return TextFieldType.DL_CLASS_CODE_N_FROM; + + if (value.Equals((561).ToString())) + return TextFieldType.DL_CLASS_CODE_N_NOTES; + + if (value.Equals((562).ToString())) + return TextFieldType.DL_CLASS_CODE_N_TO; + + if (value.Equals((563).ToString())) + return TextFieldType.DL_CLASS_CODE_S_FROM; + + if (value.Equals((564).ToString())) + return TextFieldType.DL_CLASS_CODE_S_NOTES; + + if (value.Equals((565).ToString())) + return TextFieldType.DL_CLASS_CODE_S_TO; + + if (value.Equals((566).ToString())) + return TextFieldType.DL_CLASS_CODE_TB_FROM; + + if (value.Equals((567).ToString())) + return TextFieldType.DL_CLASS_CODE_TB_NOTES; + + if (value.Equals((568).ToString())) + return TextFieldType.DL_CLASS_CODE_TB_TO; + + if (value.Equals((569).ToString())) + return TextFieldType.DL_CLASS_CODE_TM_FROM; + + if (value.Equals((570).ToString())) + return TextFieldType.DL_CLASS_CODE_TM_NOTES; + + if (value.Equals((571).ToString())) + return TextFieldType.DL_CLASS_CODE_TM_TO; + + if (value.Equals((572).ToString())) + return TextFieldType.DL_CLASS_CODE_TR_FROM; + + if (value.Equals((573).ToString())) + return TextFieldType.DL_CLASS_CODE_TR_NOTES; + + if (value.Equals((574).ToString())) + return TextFieldType.DL_CLASS_CODE_TR_TO; + + if (value.Equals((575).ToString())) + return TextFieldType.DL_CLASS_CODE_TV_FROM; + + if (value.Equals((576).ToString())) + return TextFieldType.DL_CLASS_CODE_TV_NOTES; + + if (value.Equals((577).ToString())) + return TextFieldType.DL_CLASS_CODE_TV_TO; + + if (value.Equals((578).ToString())) + return TextFieldType.DL_CLASS_CODE_V_FROM; + + if (value.Equals((579).ToString())) + return TextFieldType.DL_CLASS_CODE_V_NOTES; + + if (value.Equals((580).ToString())) + return TextFieldType.DL_CLASS_CODE_V_TO; + + if (value.Equals((581).ToString())) + return TextFieldType.DL_CLASS_CODE_W_FROM; + + if (value.Equals((582).ToString())) + return TextFieldType.DL_CLASS_CODE_W_NOTES; + + if (value.Equals((583).ToString())) + return TextFieldType.DL_CLASS_CODE_W_TO; + + if (value.Equals((584).ToString())) + return TextFieldType.URL; + + if (value.Equals((585).ToString())) + return TextFieldType.CALIBER; + + if (value.Equals((586).ToString())) + return TextFieldType.MODEL; + + if (value.Equals((587).ToString())) + return TextFieldType.MAKE; + + if (value.Equals((588).ToString())) + return TextFieldType.NUMBER_OF_CYLINDERS; + + if (value.Equals((589).ToString())) + return TextFieldType.SURNAME_OF_HUSBAND_AFTER_REGISTRATION; + + if (value.Equals((590).ToString())) + return TextFieldType.SURNAME_OF_WIFE_AFTER_REGISTRATION; + + if (value.Equals((591).ToString())) + return TextFieldType.DATE_OF_BIRTH_OF_WIFE; + + if (value.Equals((592).ToString())) + return TextFieldType.DATE_OF_BIRTH_OF_HUSBAND; + + if (value.Equals((593).ToString())) + return TextFieldType.CITIZENSHIP_OF_FIRST_PERSON; + + if (value.Equals((594).ToString())) + return TextFieldType.CITIZENSHIP_OF_SECOND_PERSON; + + if (value.Equals((595).ToString())) + return TextFieldType.CVV; + + if (value.Equals((596).ToString())) + return TextFieldType.DATE_OF_INSURANCE_EXPIRY; + + if (value.Equals((597).ToString())) + return TextFieldType.MORTGAGE_BY; + + if (value.Equals((598).ToString())) + return TextFieldType.OLD_DOCUMENT_NUMBER; + + if (value.Equals((599).ToString())) + return TextFieldType.OLD_DATE_OF_ISSUE; + + if (value.Equals((600).ToString())) + return TextFieldType.OLD_PLACE_OF_ISSUE; + + if (value.Equals((601).ToString())) + return TextFieldType.DL_CLASS_CODE_LR_FROM; + + if (value.Equals((602).ToString())) + return TextFieldType.DL_CLASS_CODE_LR_TO; + + if (value.Equals((603).ToString())) + return TextFieldType.DL_CLASS_CODE_LR_NOTES; + + if (value.Equals((604).ToString())) + return TextFieldType.DL_CLASS_CODE_MR_FROM; + + if (value.Equals((605).ToString())) + return TextFieldType.DL_CLASS_CODE_MR_TO; + + if (value.Equals((606).ToString())) + return TextFieldType.DL_CLASS_CODE_MR_NOTES; + + if (value.Equals((607).ToString())) + return TextFieldType.DL_CLASS_CODE_HR_FROM; + + if (value.Equals((608).ToString())) + return TextFieldType.DL_CLASS_CODE_HR_TO; + + if (value.Equals((609).ToString())) + return TextFieldType.DL_CLASS_CODE_HR_NOTES; + + if (value.Equals((610).ToString())) + return TextFieldType.DL_CLASS_CODE_HC_FROM; + + if (value.Equals((611).ToString())) + return TextFieldType.DL_CLASS_CODE_HC_TO; + + if (value.Equals((612).ToString())) + return TextFieldType.DL_CLASS_CODE_HC_NOTES; + + if (value.Equals((613).ToString())) + return TextFieldType.DL_CLASS_CODE_MC_FROM; + + if (value.Equals((614).ToString())) + return TextFieldType.DL_CLASS_CODE_MC_TO; + + if (value.Equals((615).ToString())) + return TextFieldType.DL_CLASS_CODE_MC_NOTES; + + if (value.Equals((616).ToString())) + return TextFieldType.DL_CLASS_CODE_RE_FROM; + + if (value.Equals((617).ToString())) + return TextFieldType.DL_CLASS_CODE_RE_TO; + + if (value.Equals((618).ToString())) + return TextFieldType.DL_CLASS_CODE_RE_NOTES; + + if (value.Equals((619).ToString())) + return TextFieldType.DL_CLASS_CODE_R_FROM; + + if (value.Equals((620).ToString())) + return TextFieldType.DL_CLASS_CODE_R_TO; + + if (value.Equals((621).ToString())) + return TextFieldType.DL_CLASS_CODE_R_NOTES; + + if (value.Equals((622).ToString())) + return TextFieldType.DL_CLASS_CODE_CA_FROM; + + if (value.Equals((623).ToString())) + return TextFieldType.DL_CLASS_CODE_CA_TO; + + if (value.Equals((624).ToString())) + return TextFieldType.DL_CLASS_CODE_CA_NOTES; + + if (value.Equals((625).ToString())) + return TextFieldType.CITIZENSHIP_STATUS; + + if (value.Equals((626).ToString())) + return TextFieldType.MILITARY_SERVICE_FROM; + + if (value.Equals((627).ToString())) + return TextFieldType.MILITARY_SERVICE_TO; + + if (value.Equals((628).ToString())) + return TextFieldType.DL_CLASS_CODE_NT_FROM; + + if (value.Equals((629).ToString())) + return TextFieldType.DL_CLASS_CODE_NT_TO; + + if (value.Equals((630).ToString())) + return TextFieldType.DL_CLASS_CODE_NT_NOTES; + + if (value.Equals((631).ToString())) + return TextFieldType.DL_CLASS_CODE_TN_FROM; + + if (value.Equals((632).ToString())) + return TextFieldType.DL_CLASS_CODE_TN_TO; + + if (value.Equals((633).ToString())) + return TextFieldType.DL_CLASS_CODE_TN_NOTES; + + if (value.Equals((634).ToString())) + return TextFieldType.DL_CLASS_CODE_D3_FROM; + + if (value.Equals((635).ToString())) + return TextFieldType.DL_CLASS_CODE_D3_TO; + + if (value.Equals((636).ToString())) + return TextFieldType.DL_CLASS_CODE_D3_NOTES; + + if (value.Equals((637).ToString())) + return TextFieldType.ALT_DATE_OF_EXPIRY; + + if (value.Equals((638).ToString())) + return TextFieldType.DL_CLASS_CODE_CD_FROM; + + if (value.Equals((639).ToString())) + return TextFieldType.DL_CLASS_CODE_CD_TO; + + if (value.Equals((640).ToString())) + return TextFieldType.DL_CLASS_CODE_CD_NOTES; + + if (value.Equals((641).ToString())) + return TextFieldType.ISSUER_IDENTIFICATION_NUMBER; + + if (value.Equals((642).ToString())) + return TextFieldType.PAYMENT_PERIOD_FROM; + + if (value.Equals((643).ToString())) + return TextFieldType.PAYMENT_PERIOD_TO; + + if (value.Equals((644).ToString())) + return TextFieldType.VACCINATION_CERTIFICATE_IDENTIFIER; + + if (value.Equals((645).ToString())) + return TextFieldType.FIRST_NAME; + + if (value.Equals((646).ToString())) + return TextFieldType.DATE_OF_ARRIVAL; + + if (value.Equals((647).ToString())) + return TextFieldType.SECOND_NAME; + + if (value.Equals((648).ToString())) + return TextFieldType.THIRD_NAME; + + if (value.Equals((649).ToString())) + return TextFieldType.FOURTH_NAME; + + if (value.Equals((650).ToString())) + return TextFieldType.LAST_NAME; + + if (value.Equals((651).ToString())) + return TextFieldType.DL_CLASS_CODE_RM_FROM; + + if (value.Equals((652).ToString())) + return TextFieldType.DL_CLASS_CODE_RM_NOTES; + + if (value.Equals((653).ToString())) + return TextFieldType.DL_CLASS_CODE_RM_TO; + + if (value.Equals((654).ToString())) + return TextFieldType.DL_CLASS_CODE_PW_FROM; + + if (value.Equals((655).ToString())) + return TextFieldType.DL_CLASS_CODE_PW_NOTES; + + if (value.Equals((656).ToString())) + return TextFieldType.DL_CLASS_CODE_PW_TO; + + if (value.Equals((657).ToString())) + return TextFieldType.DL_CLASS_CODE_EB_FROM; + + if (value.Equals((658).ToString())) + return TextFieldType.DL_CLASS_CODE_EB_NOTES; + + if (value.Equals((659).ToString())) + return TextFieldType.DL_CLASS_CODE_EB_TO; + + if (value.Equals((660).ToString())) + return TextFieldType.DL_CLASS_CODE_EC_FROM; + + if (value.Equals((661).ToString())) + return TextFieldType.DL_CLASS_CODE_EC_NOTES; + + if (value.Equals((662).ToString())) + return TextFieldType.DL_CLASS_CODE_EC_TO; + + if (value.Equals((663).ToString())) + return TextFieldType.DL_CLASS_CODE_EC1_FROM; + + if (value.Equals((664).ToString())) + return TextFieldType.DL_CLASS_CODE_EC1_NOTES; + + if (value.Equals((665).ToString())) + return TextFieldType.DL_CLASS_CODE_EC1_TO; + + if (value.Equals((666).ToString())) + return TextFieldType.PLACE_OF_BIRTH_CITY; + + if (value.Equals((667).ToString())) + return TextFieldType.YEAR_OF_BIRTH; + + if (value.Equals((668).ToString())) + return TextFieldType.YEAR_OF_EXPIRY; + + if (value.Equals((669).ToString())) + return TextFieldType.GRANDFATHER_NAME_MATERNAL; + + if (value.Equals((670).ToString())) + return TextFieldType.FIRST_SURNAME; + + if (value.Equals((671).ToString())) + return TextFieldType.MONTH_OF_BIRTH; + + if (value.Equals((672).ToString())) + return TextFieldType.ADDRESS_FLOOR_NUMBER; + + if (value.Equals((673).ToString())) + return TextFieldType.ADDRESS_ENTRANCE; + + if (value.Equals((674).ToString())) + return TextFieldType.ADDRESS_BLOCK_NUMBER; + + if (value.Equals((675).ToString())) + return TextFieldType.ADDRESS_STREET_NUMBER; + + if (value.Equals((676).ToString())) + return TextFieldType.ADDRESS_STREET_TYPE; + + if (value.Equals((677).ToString())) + return TextFieldType.ADDRESS_CITY_SECTOR; + + if (value.Equals((678).ToString())) + return TextFieldType.ADDRESS_COUNTY_TYPE; + + if (value.Equals((679).ToString())) + return TextFieldType.ADDRESS_CITY_TYPE; + + if (value.Equals((680).ToString())) + return TextFieldType.ADDRESS_BUILDING_TYPE; + + if (value.Equals((681).ToString())) + return TextFieldType.DATE_OF_RETIREMENT; + + if (value.Equals((682).ToString())) + return TextFieldType.DOCUMENT_STATUS; + + if (value.Equals((683).ToString())) + return TextFieldType.SIGNATURE; + + if (value.Equals((684).ToString())) + return TextFieldType.FT_UNIQUE_CERTIFICATE_IDENTIFIER; + + if (value.Equals((685).ToString())) + return TextFieldType.FT_EMAIL; + + if (value.Equals((686).ToString())) + return TextFieldType.FT_DATE_OF_SPECIMEN_COLLECTION; + + if (value.Equals((687).ToString())) + return TextFieldType.FT_TYPE_OF_TESTING; + + if (value.Equals((688).ToString())) + return TextFieldType.FT_RESULT_OF_TESTING; + + if (value.Equals((689).ToString())) + return TextFieldType.FT_METHOD_OF_TESTING; + + if (value.Equals((690).ToString())) + return TextFieldType.FT_DIGITAL_TRAVEL_AUTHORIZATION_NUMBER; + + if (value.Equals((691).ToString())) + return TextFieldType.FT_DATE_OF_FIRST_POSITIVE_TEST_RESULT; + + if (value.Equals((692).ToString())) + return TextFieldType.EF_CARD_ACCESS; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(TextFieldType value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class TextFieldTypeJsonConverter : JsonConverter + { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override TextFieldType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + TextFieldType? result = rawValue == null + ? null + : TextFieldTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the TextFieldType to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextFieldType textFieldType, JsonSerializerOptions options) + { + writer.WriteStringValue(textFieldType.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class TextFieldTypeNullableJsonConverter : JsonConverter + { + /// + /// Returns a TextFieldType from the Json object + /// + /// + /// + /// + /// + public override TextFieldType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + TextFieldType? result = rawValue == null + ? null + : TextFieldTypeValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextFieldType? textFieldType, JsonSerializerOptions options) + { + writer.WriteStringValue(textFieldType?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs index 1626c8a..897876c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs @@ -1,141 +1,165 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// TextFieldValue /// - [DataContract] - public partial class TextFieldValue : IEquatable, IValidatableObject + public partial class TextFieldValue : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TextFieldValue() { } - /// - /// Initializes a new instance of the class. - /// - /// source (required). - /// Parsed/processed value. Date format converted for output, delimiters removed (required). - /// Original value as seen in the document. - /// originalSymbols. - /// Page index of the image from input list (required). - /// Min recognition probability. Combined minimum probability from single characters probabilities. - /// fieldRect. - /// rfidOrigin. - public TextFieldValue(string source = default(string), string value = default(string), string originalValue = default(string), List originalSymbols = default(List), int pageIndex = default(int), int probability = default(int), RectangleCoordinates fieldRect = default(RectangleCoordinates), RfidOrigin rfidOrigin = default(RfidOrigin)) + /// source + /// Parsed/processed value. Date format converted for output, delimiters removed + /// originalValidity + /// Page index of the image from input list + /// Min recognition probability. Combined minimum probability from single characters probabilities + /// Original value as seen in the document + /// originalSymbols + /// fieldRect + /// rfidOrigin + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0) + [JsonConstructor] + public TextFieldValue(Source source, string value, CheckResult originalValidity, int pageIndex, int probability, Option originalValue = default, Option?> originalSymbols = default, Option fieldRect = default, Option rfidOrigin = default, Option containerType = default) { - // to ensure "source" is required (not null) - if (source == null) - { - throw new InvalidDataException("source is a required property for TextFieldValue and cannot be null"); - } - else - { - this.Source = source; - } - - // to ensure "value" is required (not null) - if (value == null) - { - throw new InvalidDataException("value is a required property for TextFieldValue and cannot be null"); - } - else - { - this.Value = value; - } - - // to ensure "pageIndex" is required (not null) - if (pageIndex == null) - { - throw new InvalidDataException("pageIndex is a required property for TextFieldValue and cannot be null"); - } - else - { - this.PageIndex = pageIndex; - } - - this.OriginalValue = originalValue; - this.OriginalSymbols = originalSymbols; - this.Probability = probability; - this.FieldRect = fieldRect; - this.RfidOrigin = rfidOrigin; + Source = source; + Value = value; + OriginalValidity = originalValidity; + PageIndex = pageIndex; + Probability = probability; + OriginalValueOption = originalValue; + OriginalSymbolsOption = originalSymbols; + FieldRectOption = fieldRect; + RfidOriginOption = rfidOrigin; + ContainerTypeOption = containerType; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Source /// - [DataMember(Name="source", EmitDefaultValue=true)] - public string Source { get; set; } + [JsonPropertyName("source")] + public Source Source { get; set; } + + /// + /// Gets or Sets OriginalValidity + /// + [JsonPropertyName("originalValidity")] + public CheckResult OriginalValidity { get; set; } /// /// Parsed/processed value. Date format converted for output, delimiters removed /// /// Parsed/processed value. Date format converted for output, delimiters removed - [DataMember(Name="value", EmitDefaultValue=true)] + [JsonPropertyName("value")] public string Value { get; set; } + /// + /// Page index of the image from input list + /// + /// Page index of the image from input list + [JsonPropertyName("pageIndex")] + public int PageIndex { get; set; } + + /// + /// Min recognition probability. Combined minimum probability from single characters probabilities + /// + /// Min recognition probability. Combined minimum probability from single characters probabilities + [JsonPropertyName("probability")] + public int Probability { get; set; } + + /// + /// Used to track the state of OriginalValue + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OriginalValueOption { get; private set; } + /// /// Original value as seen in the document /// /// Original value as seen in the document - [DataMember(Name="originalValue", EmitDefaultValue=false)] - public string OriginalValue { get; set; } + [JsonPropertyName("originalValue")] + public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new(value); } } /// - /// Gets or Sets OriginalSymbols + /// Used to track the state of OriginalSymbols /// - [DataMember(Name="originalSymbols", EmitDefaultValue=false)] - public List OriginalSymbols { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> OriginalSymbolsOption { get; private set; } /// - /// Page index of the image from input list + /// Gets or Sets OriginalSymbols /// - /// Page index of the image from input list - [DataMember(Name="pageIndex", EmitDefaultValue=true)] - public int PageIndex { get; set; } + [JsonPropertyName("originalSymbols")] + public List? OriginalSymbols { get { return this.OriginalSymbolsOption; } set { this.OriginalSymbolsOption = new(value); } } /// - /// Min recognition probability. Combined minimum probability from single characters probabilities + /// Used to track the state of FieldRect /// - /// Min recognition probability. Combined minimum probability from single characters probabilities - [DataMember(Name="probability", EmitDefaultValue=false)] - public int Probability { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldRectOption { get; private set; } /// /// Gets or Sets FieldRect /// - [DataMember(Name="fieldRect", EmitDefaultValue=false)] - public RectangleCoordinates FieldRect { get; set; } + [JsonPropertyName("fieldRect")] + public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new(value); } } + + /// + /// Used to track the state of RfidOrigin + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option RfidOriginOption { get; private set; } /// /// Gets or Sets RfidOrigin /// - [DataMember(Name="rfidOrigin", EmitDefaultValue=false)] - public RfidOrigin RfidOrigin { get; set; } + [JsonPropertyName("rfidOrigin")] + public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new(value); } } + + /// + /// Used to track the state of ContainerType + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ContainerTypeOption { get; private set; } + + /// + /// Same as Result type, but used for safe parsing of not-described values. See Result type. + /// + /// Same as Result type, but used for safe parsing of not-described values. See Result type. + [JsonPropertyName("containerType")] + public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new(value); } } /// /// Returns the string presentation of the object @@ -143,145 +167,258 @@ protected TextFieldValue() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TextFieldValue {\n"); sb.Append(" Source: ").Append(Source).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append(" OriginalValue: ").Append(OriginalValue).Append("\n"); - sb.Append(" OriginalSymbols: ").Append(OriginalSymbols).Append("\n"); + sb.Append(" OriginalValidity: ").Append(OriginalValidity).Append("\n"); sb.Append(" PageIndex: ").Append(PageIndex).Append("\n"); sb.Append(" Probability: ").Append(Probability).Append("\n"); + sb.Append(" OriginalValue: ").Append(OriginalValue).Append("\n"); + sb.Append(" OriginalSymbols: ").Append(OriginalSymbols).Append("\n"); sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); sb.Append(" RfidOrigin: ").Append(RfidOrigin).Append("\n"); + sb.Append(" ContainerType: ").Append(ContainerType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as TextFieldValue); + // Probability (int) maximum + if (this.Probability > (int)100) + { + yield return new ValidationResult("Invalid value for Probability, must be a value less than or equal to 100.", new [] { "Probability" }); + } + + // Probability (int) minimum + if (this.Probability < (int)0) + { + yield return new ValidationResult("Invalid value for Probability, must be a value greater than or equal to 0.", new [] { "Probability" }); + } + + yield break; } + } + /// + /// A Json converter for type + /// + public class TextFieldValueJsonConverter : JsonConverter + { /// - /// Returns true if TextFieldValue instances are equal + /// Deserializes json to /// - /// Instance of TextFieldValue to be compared - /// Boolean - public bool Equals(TextFieldValue input) + /// + /// + /// + /// + /// + public override TextFieldValue Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Source == input.Source || - (this.Source != null && - this.Source.Equals(input.Source)) - ) && - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ) && - ( - this.OriginalValue == input.OriginalValue || - (this.OriginalValue != null && - this.OriginalValue.Equals(input.OriginalValue)) - ) && - ( - this.OriginalSymbols == input.OriginalSymbols || - this.OriginalSymbols != null && - input.OriginalSymbols != null && - this.OriginalSymbols.SequenceEqual(input.OriginalSymbols) - ) && - ( - this.PageIndex == input.PageIndex || - (this.PageIndex != null && - this.PageIndex.Equals(input.PageIndex)) - ) && - ( - this.Probability == input.Probability || - (this.Probability != null && - this.Probability.Equals(input.Probability)) - ) && - ( - this.FieldRect == input.FieldRect || - (this.FieldRect != null && - this.FieldRect.Equals(input.FieldRect)) - ) && - ( - this.RfidOrigin == input.RfidOrigin || - (this.RfidOrigin != null && - this.RfidOrigin.Equals(input.RfidOrigin)) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option source = default; + Option value = default; + Option originalValidity = default; + Option pageIndex = default; + Option probability = default; + Option originalValue = default; + Option?> originalSymbols = default; + Option fieldRect = default; + Option rfidOrigin = default; + Option containerType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "source": + string? sourceRawValue = utf8JsonReader.GetString(); + if (sourceRawValue != null) + source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); + break; + case "value": + value = new Option(utf8JsonReader.GetString()!); + break; + case "originalValidity": + string? originalValidityRawValue = utf8JsonReader.GetString(); + if (originalValidityRawValue != null) + originalValidity = new Option(CheckResultValueConverter.FromStringOrDefault(originalValidityRawValue)); + break; + case "pageIndex": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIndex = new Option(utf8JsonReader.GetInt32()); + break; + case "probability": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + probability = new Option(utf8JsonReader.GetInt32()); + break; + case "originalValue": + originalValue = new Option(utf8JsonReader.GetString()!); + break; + case "originalSymbols": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + originalSymbols = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "fieldRect": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "rfidOrigin": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + rfidOrigin = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "containerType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + containerType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!source.IsSet) + throw new ArgumentException("Property is required for class TextFieldValue.", nameof(source)); + + if (!value.IsSet) + throw new ArgumentException("Property is required for class TextFieldValue.", nameof(value)); + + if (!originalValidity.IsSet) + throw new ArgumentException("Property is required for class TextFieldValue.", nameof(originalValidity)); + + if (!pageIndex.IsSet) + throw new ArgumentException("Property is required for class TextFieldValue.", nameof(pageIndex)); + + if (!probability.IsSet) + throw new ArgumentException("Property is required for class TextFieldValue.", nameof(probability)); + + if (source.IsSet && source.Value == null) + throw new ArgumentNullException(nameof(source), "Property is not nullable for class TextFieldValue."); + + if (value.IsSet && value.Value == null) + throw new ArgumentNullException(nameof(value), "Property is not nullable for class TextFieldValue."); + + if (originalValidity.IsSet && originalValidity.Value == null) + throw new ArgumentNullException(nameof(originalValidity), "Property is not nullable for class TextFieldValue."); + + if (pageIndex.IsSet && pageIndex.Value == null) + throw new ArgumentNullException(nameof(pageIndex), "Property is not nullable for class TextFieldValue."); + + if (probability.IsSet && probability.Value == null) + throw new ArgumentNullException(nameof(probability), "Property is not nullable for class TextFieldValue."); + + if (originalValue.IsSet && originalValue.Value == null) + throw new ArgumentNullException(nameof(originalValue), "Property is not nullable for class TextFieldValue."); + + if (originalSymbols.IsSet && originalSymbols.Value == null) + throw new ArgumentNullException(nameof(originalSymbols), "Property is not nullable for class TextFieldValue."); + + if (fieldRect.IsSet && fieldRect.Value == null) + throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class TextFieldValue."); + + if (rfidOrigin.IsSet && rfidOrigin.Value == null) + throw new ArgumentNullException(nameof(rfidOrigin), "Property is not nullable for class TextFieldValue."); + + if (containerType.IsSet && containerType.Value == null) + throw new ArgumentNullException(nameof(containerType), "Property is not nullable for class TextFieldValue."); + + return new TextFieldValue(source.Value!.Value!, value.Value!, originalValidity.Value!.Value!, pageIndex.Value!.Value!, probability.Value!.Value!, originalValue, originalSymbols, fieldRect, rfidOrigin, containerType); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextFieldValue textFieldValue, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Source != null) - hashCode = hashCode * 59 + this.Source.GetHashCode(); - if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - if (this.OriginalValue != null) - hashCode = hashCode * 59 + this.OriginalValue.GetHashCode(); - if (this.OriginalSymbols != null) - hashCode = hashCode * 59 + this.OriginalSymbols.GetHashCode(); - if (this.PageIndex != null) - hashCode = hashCode * 59 + this.PageIndex.GetHashCode(); - if (this.Probability != null) - hashCode = hashCode * 59 + this.Probability.GetHashCode(); - if (this.FieldRect != null) - hashCode = hashCode * 59 + this.FieldRect.GetHashCode(); - if (this.RfidOrigin != null) - hashCode = hashCode * 59 + this.RfidOrigin.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, textFieldValue, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TextFieldValue textFieldValue, JsonSerializerOptions jsonSerializerOptions) { + if (textFieldValue.Value == null) + throw new ArgumentNullException(nameof(textFieldValue.Value), "Property is required for class TextFieldValue."); - - // Probability (int) maximum - if(this.Probability > (int)100) + if (textFieldValue.OriginalValueOption.IsSet && textFieldValue.OriginalValue == null) + throw new ArgumentNullException(nameof(textFieldValue.OriginalValue), "Property is required for class TextFieldValue."); + + if (textFieldValue.OriginalSymbolsOption.IsSet && textFieldValue.OriginalSymbols == null) + throw new ArgumentNullException(nameof(textFieldValue.OriginalSymbols), "Property is required for class TextFieldValue."); + + if (textFieldValue.FieldRectOption.IsSet && textFieldValue.FieldRect == null) + throw new ArgumentNullException(nameof(textFieldValue.FieldRect), "Property is required for class TextFieldValue."); + + if (textFieldValue.RfidOriginOption.IsSet && textFieldValue.RfidOrigin == null) + throw new ArgumentNullException(nameof(textFieldValue.RfidOrigin), "Property is required for class TextFieldValue."); + + var sourceRawValue = SourceValueConverter.ToJsonValue(textFieldValue.Source); + writer.WriteString("source", sourceRawValue); + + writer.WriteString("value", textFieldValue.Value); + + var originalValidityRawValue = CheckResultValueConverter.ToJsonValue(textFieldValue.OriginalValidity); + writer.WriteNumber("originalValidity", originalValidityRawValue); + + writer.WriteNumber("pageIndex", textFieldValue.PageIndex); + + writer.WriteNumber("probability", textFieldValue.Probability); + + if (textFieldValue.OriginalValueOption.IsSet) + writer.WriteString("originalValue", textFieldValue.OriginalValue); + + if (textFieldValue.OriginalSymbolsOption.IsSet) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Probability, must be a value less than or equal to 100.", new [] { "Probability" }); + writer.WritePropertyName("originalSymbols"); + JsonSerializer.Serialize(writer, textFieldValue.OriginalSymbols, jsonSerializerOptions); } - - // Probability (int) minimum - if(this.Probability < (int)0) + if (textFieldValue.FieldRectOption.IsSet) { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Probability, must be a value greater than or equal to 0.", new [] { "Probability" }); + writer.WritePropertyName("fieldRect"); + JsonSerializer.Serialize(writer, textFieldValue.FieldRect, jsonSerializerOptions); } - - yield break; + if (textFieldValue.RfidOriginOption.IsSet) + { + writer.WritePropertyName("rfidOrigin"); + JsonSerializer.Serialize(writer, textFieldValue.RfidOrigin, jsonSerializerOptions); + } + if (textFieldValue.ContainerTypeOption.IsSet) + writer.WriteNumber("containerType", textFieldValue.ContainerTypeOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextItem.cs b/src/Regula.DocumentReader.WebClient/Model/TextItem.cs new file mode 100644 index 0000000..e6e5df4 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TextItem.cs @@ -0,0 +1,165 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// TextItem + /// + public partial class TextItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// text + [JsonConstructor] + public TextItem(Text text) + { + Text = text; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets Text + /// + [JsonPropertyName("Text")] + public Text Text { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TextItem {\n"); + sb.Append(" Text: ").Append(Text).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TextItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TextItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option text = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Text": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + text = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!text.IsSet) + throw new ArgumentException("Property is required for class TextItem.", nameof(text)); + + if (text.IsSet && text.Value == null) + throw new ArgumentNullException(nameof(text), "Property is not nullable for class TextItem."); + + return new TextItem(text.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextItem textItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, textItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TextItem textItem, JsonSerializerOptions jsonSerializerOptions) + { + if (textItem.Text == null) + throw new ArgumentNullException(nameof(textItem.Text), "Property is required for class TextItem."); + + writer.WritePropertyName("Text"); + JsonSerializer.Serialize(writer, textItem.Text, jsonSerializerOptions); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs b/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs index 75491ef..61f4d5d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs @@ -1,43 +1,191 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class TextPostProcessing + /// + /// Defines TextPostProcessing + /// + public enum TextPostProcessing + { + /// + /// Enum NO_CHANGE for value: 0 + /// + NO_CHANGE = 0, + + /// + /// Enum UPPERCASE for value: 1 + /// + UPPERCASE = 1, + + /// + /// Enum LOWERCASE for value: 2 + /// + LOWERCASE = 2, + + /// + /// Enum CAPITAL for value: 3 + /// + CAPITAL = 3 + } + + /// + /// Converts to and from the JSON value + /// + public static class TextPostProcessingValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static TextPostProcessing FromString(string value) + { + if (value.Equals((0).ToString())) + return TextPostProcessing.NO_CHANGE; + + if (value.Equals((1).ToString())) + return TextPostProcessing.UPPERCASE; + + if (value.Equals((2).ToString())) + return TextPostProcessing.LOWERCASE; + + if (value.Equals((3).ToString())) + return TextPostProcessing.CAPITAL; + + throw new NotImplementedException($"Could not convert value to type TextPostProcessing: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static TextPostProcessing? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return TextPostProcessing.NO_CHANGE; + + if (value.Equals((1).ToString())) + return TextPostProcessing.UPPERCASE; + + if (value.Equals((2).ToString())) + return TextPostProcessing.LOWERCASE; + + if (value.Equals((3).ToString())) + return TextPostProcessing.CAPITAL; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(TextPostProcessing value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class TextPostProcessingJsonConverter : JsonConverter { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override TextPostProcessing Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + TextPostProcessing? result = rawValue == null + ? null + : TextPostProcessingValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; - - public const int NO_CHANGE = 0; + throw new JsonException(); + } + + /// + /// Writes the TextPostProcessing to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextPostProcessing textPostProcessing, JsonSerializerOptions options) + { + writer.WriteStringValue(textPostProcessing.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class TextPostProcessingNullableJsonConverter : JsonConverter + { + /// + /// Returns a TextPostProcessing from the Json object + /// + /// + /// + /// + /// + public override TextPostProcessing? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - - public const int UPPERCASE = 1; + TextPostProcessing? result = rawValue == null + ? null + : TextPostProcessingValueConverter.FromStringOrDefault(rawValue); - - public const int LOWERCASE = 2; + if (result != null) + return result.Value; - - public const int CAPITAL = 3; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextPostProcessing? textPostProcessing, JsonSerializerOptions options) + { + writer.WriteStringValue(textPostProcessing?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs index ecab932..fcfdcb6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs @@ -1,62 +1,56 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// TextResult /// - [DataContract] - public partial class TextResult : ResultItem, IEquatable, IValidatableObject + public partial class TextResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TextResult() { } - /// - /// Initializes a new instance of the class. - /// - /// text (required). - public TextResult(Text text = default(Text), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// text + /// bufLength + /// light + /// listIdx + /// pageIdx + [JsonConstructor] + public TextResult(Text text, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) { - // to ensure "text" is required (not null) - if (text == null) - { - throw new InvalidDataException("text is a required property for TextResult and cannot be null"); - } - else - { - this.Text = text; - } - + Text = text; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets Text /// - [DataMember(Name="Text", EmitDefaultValue=true)] + [JsonPropertyName("Text")] public Text Text { get; set; } /// @@ -65,76 +59,158 @@ protected TextResult() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TextResult {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } + } + /// + /// A Json converter for type + /// + public class TextResultJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override TextResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as TextResult); - } + int currentDepth = utf8JsonReader.CurrentDepth; - /// - /// Returns true if TextResult instances are equal - /// - /// Instance of TextResult to be compared - /// Boolean - public bool Equals(TextResult input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Text == input.Text || - (this.Text != null && - this.Text.Equals(input.Text)) - ); + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option text = default; + Option bufLength = default; + Option light = default; + Option listIdx = default; + Option pageIdx = default; + Option resultType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Text": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + text = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "buf_length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetInt32()); + break; + case "light": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + light = new Option(utf8JsonReader.GetInt32()); + break; + case "list_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + listIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "page_idx": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + pageIdx = new Option(utf8JsonReader.GetInt32()); + break; + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!text.IsSet) + throw new ArgumentException("Property is required for class TextResult.", nameof(text)); + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class TextResult.", nameof(resultType)); + + if (text.IsSet && text.Value == null) + throw new ArgumentNullException(nameof(text), "Property is not nullable for class TextResult."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class TextResult."); + + if (light.IsSet && light.Value == null) + throw new ArgumentNullException(nameof(light), "Property is not nullable for class TextResult."); + + if (listIdx.IsSet && listIdx.Value == null) + throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class TextResult."); + + if (pageIdx.IsSet && pageIdx.Value == null) + throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class TextResult."); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class TextResult."); + + return new TextResult(text.Value!, bufLength, light, listIdx, pageIdx); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TextResult textResult, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Text != null) - hashCode = hashCode * 59 + this.Text.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, textResult, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TextResult textResult, JsonSerializerOptions jsonSerializerOptions) { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; + if (textResult.Text == null) + throw new ArgumentNullException(nameof(textResult.Text), "Property is required for class TextResult."); + + writer.WritePropertyName("Text"); + JsonSerializer.Serialize(writer, textResult.Text, jsonSerializerOptions); + if (textResult.BufLengthOption.IsSet) + writer.WriteNumber("buf_length", textResult.BufLengthOption.Value!.Value); + + if (textResult.LightOption.IsSet) + writer.WriteNumber("light", textResult.LightOption.Value!.Value); + + if (textResult.ListIdxOption.IsSet) + writer.WriteNumber("list_idx", textResult.ListIdxOption.Value!.Value); + + if (textResult.PageIdxOption.IsSet) + writer.WriteNumber("page_idx", textResult.PageIdxOption.Value!.Value); + + writer.WriteString("result_type", textResult.ResultType); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs index 0303ed8..6cc8b3e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs @@ -1,49 +1,60 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionImage /// - [DataContract] - public partial class TransactionImage : IEquatable, IValidatableObject + public partial class TransactionImage : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// image. - public TransactionImage(ImagesFieldValue image = default(ImagesFieldValue)) + /// image + [JsonConstructor] + public TransactionImage(Option image = default) { - this.Image = image; + ImageOption = image; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of Image + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ImageOption { get; private set; } + /// /// Gets or Sets Image /// - [DataMember(Name="image", EmitDefaultValue=false)] - public ImagesFieldValue Image { get; set; } + [JsonPropertyName("image")] + public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new(value); } } /// /// Returns the string presentation of the object @@ -51,74 +62,111 @@ public partial class TransactionImage : IEquatable, IValidata /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TransactionImage {\n"); sb.Append(" Image: ").Append(Image).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class TransactionImageJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override TransactionImage Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as TransactionImage); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option image = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "image": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (image.IsSet && image.Value == null) + throw new ArgumentNullException(nameof(image), "Property is not nullable for class TransactionImage."); + + return new TransactionImage(image); } /// - /// Returns true if TransactionImage instances are equal + /// Serializes a /// - /// Instance of TransactionImage to be compared - /// Boolean - public bool Equals(TransactionImage input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TransactionImage transactionImage, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.Image == input.Image || - (this.Image != null && - this.Image.Equals(input.Image)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, transactionImage, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TransactionImage transactionImage, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (transactionImage.ImageOption.IsSet && transactionImage.Image == null) + throw new ArgumentNullException(nameof(transactionImage.Image), "Property is required for class TransactionImage."); + + if (transactionImage.ImageOption.IsSet) { - int hashCode = 41; - if (this.Image != null) - hashCode = hashCode * 59 + this.Image.GetHashCode(); - return hashCode; + writer.WritePropertyName("image"); + JsonSerializer.Serialize(writer, transactionImage.Image, jsonSerializerOptions); } } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionImagesFieldValue.cs deleted file mode 100644 index c16a865..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionImagesFieldValue.cs +++ /dev/null @@ -1,190 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.1.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// TransactionImagesFieldValue - /// - [DataContract] - public partial class TransactionImagesFieldValue : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// fieldType. - /// light. - /// listIdx. - /// Page index of the image from input list. - /// Image url. - public TransactionImagesFieldValue(int fieldType = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), string url = default(string)) - { - this.FieldType = fieldType; - this.Light = light; - this.ListIdx = listIdx; - this.PageIdx = pageIdx; - this.Url = url; - } - - /// - /// Gets or Sets FieldType - /// - [DataMember(Name="fieldType", EmitDefaultValue=false)] - public int FieldType { get; set; } - - /// - /// Gets or Sets Light - /// - [DataMember(Name="light", EmitDefaultValue=false)] - public int Light { get; set; } - - /// - /// Gets or Sets ListIdx - /// - [DataMember(Name="listIdx", EmitDefaultValue=false)] - public int ListIdx { get; set; } - - /// - /// Page index of the image from input list - /// - /// Page index of the image from input list - [DataMember(Name="pageIdx", EmitDefaultValue=false)] - public int PageIdx { get; set; } - - /// - /// Image url - /// - /// Image url - [DataMember(Name="url", EmitDefaultValue=false)] - public string Url { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransactionImagesFieldValue {\n"); - sb.Append(" FieldType: ").Append(FieldType).Append("\n"); - sb.Append(" Light: ").Append(Light).Append("\n"); - sb.Append(" ListIdx: ").Append(ListIdx).Append("\n"); - sb.Append(" PageIdx: ").Append(PageIdx).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionImagesFieldValue); - } - - /// - /// Returns true if TransactionImagesFieldValue instances are equal - /// - /// Instance of TransactionImagesFieldValue to be compared - /// Boolean - public bool Equals(TransactionImagesFieldValue input) - { - if (input == null) - return false; - - return - ( - this.FieldType == input.FieldType || - (this.FieldType != null && - this.FieldType.Equals(input.FieldType)) - ) && - ( - this.Light == input.Light || - (this.Light != null && - this.Light.Equals(input.Light)) - ) && - ( - this.ListIdx == input.ListIdx || - (this.ListIdx != null && - this.ListIdx.Equals(input.ListIdx)) - ) && - ( - this.PageIdx == input.PageIdx || - (this.PageIdx != null && - this.PageIdx.Equals(input.PageIdx)) - ) && - ( - this.Url == input.Url || - (this.Url != null && - this.Url.Equals(input.Url)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.FieldType != null) - hashCode = hashCode * 59 + this.FieldType.GetHashCode(); - if (this.Light != null) - hashCode = hashCode * 59 + this.Light.GetHashCode(); - if (this.ListIdx != null) - hashCode = hashCode * 59 + this.ListIdx.GetHashCode(); - if (this.PageIdx != null) - hashCode = hashCode * 59 + this.PageIdx.GetHashCode(); - if (this.Url != null) - hashCode = hashCode * 59 + this.Url.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs index 8cc5c6a..57457eb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs @@ -1,112 +1,172 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionInfo /// - [DataContract] - public partial class TransactionInfo : IEquatable, IValidatableObject + public partial class TransactionInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Computer name. - /// Date and time. - /// documentsDatabase. - /// System information. - /// Transaction tag. - /// Transaction identifier. - /// User name. - /// SDK version. - public TransactionInfo(string computerName = default(string), string dateTime = default(string), DocumentsDatabase documentsDatabase = default(DocumentsDatabase), string systemInfo = default(string), string tag = default(string), string transactionID = default(string), string userName = default(string), string version = default(string)) + /// Computer name + /// Date and time + /// documentsDatabase + /// System information + /// Transaction tag + /// Transaction identifier + /// User name + /// SDK version + [JsonConstructor] + public TransactionInfo(Option computerName = default, Option dateTime = default, Option documentsDatabase = default, Option systemInfo = default, Option tag = default, Option transactionID = default, Option userName = default, Option varVersion = default) { - this.ComputerName = computerName; - this.DateTime = dateTime; - this.DocumentsDatabase = documentsDatabase; - this.SystemInfo = systemInfo; - this.Tag = tag; - this.TransactionID = transactionID; - this.UserName = userName; - this.Version = version; + ComputerNameOption = computerName; + DateTimeOption = dateTime; + DocumentsDatabaseOption = documentsDatabase; + SystemInfoOption = systemInfo; + TagOption = tag; + TransactionIDOption = transactionID; + UserNameOption = userName; + VarVersionOption = varVersion; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of ComputerName + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ComputerNameOption { get; private set; } + /// /// Computer name /// /// Computer name - [DataMember(Name="ComputerName", EmitDefaultValue=false)] - public string ComputerName { get; set; } + [JsonPropertyName("ComputerName")] + public string? ComputerName { get { return this.ComputerNameOption; } set { this.ComputerNameOption = new(value); } } + + /// + /// Used to track the state of DateTime + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DateTimeOption { get; private set; } /// /// Date and time /// /// Date and time - [DataMember(Name="DateTime", EmitDefaultValue=false)] - public string DateTime { get; set; } + [JsonPropertyName("DateTime")] + public string? DateTime { get { return this.DateTimeOption; } set { this.DateTimeOption = new(value); } } + + /// + /// Used to track the state of DocumentsDatabase + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DocumentsDatabaseOption { get; private set; } /// /// Gets or Sets DocumentsDatabase /// - [DataMember(Name="DocumentsDatabase", EmitDefaultValue=false)] - public DocumentsDatabase DocumentsDatabase { get; set; } + [JsonPropertyName("DocumentsDatabase")] + public DocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new(value); } } + + /// + /// Used to track the state of SystemInfo + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SystemInfoOption { get; private set; } /// /// System information /// /// System information - [DataMember(Name="SystemInfo", EmitDefaultValue=false)] - public string SystemInfo { get; set; } + [JsonPropertyName("SystemInfo")] + public string? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } + + /// + /// Used to track the state of Tag + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TagOption { get; private set; } /// /// Transaction tag /// /// Transaction tag - [DataMember(Name="Tag", EmitDefaultValue=false)] - public string Tag { get; set; } + [JsonPropertyName("Tag")] + public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } + + /// + /// Used to track the state of TransactionID + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TransactionIDOption { get; private set; } /// /// Transaction identifier /// /// Transaction identifier - [DataMember(Name="TransactionID", EmitDefaultValue=false)] - public string TransactionID { get; set; } + [JsonPropertyName("TransactionID")] + public string? TransactionID { get { return this.TransactionIDOption; } set { this.TransactionIDOption = new(value); } } + + /// + /// Used to track the state of UserName + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option UserNameOption { get; private set; } /// /// User name /// /// User name - [DataMember(Name="UserName", EmitDefaultValue=false)] - public string UserName { get; set; } + [JsonPropertyName("UserName")] + public string? UserName { get { return this.UserNameOption; } set { this.UserNameOption = new(value); } } + + /// + /// Used to track the state of VarVersion + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option VarVersionOption { get; private set; } /// /// SDK version /// /// SDK version - [DataMember(Name="Version", EmitDefaultValue=false)] - public string Version { get; set; } + [JsonPropertyName("Version")] + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } /// /// Returns the string presentation of the object @@ -114,7 +174,7 @@ public partial class TransactionInfo : IEquatable, IValidatabl /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TransactionInfo {\n"); sb.Append(" ComputerName: ").Append(ComputerName).Append("\n"); sb.Append(" DateTime: ").Append(DateTime).Append("\n"); @@ -123,121 +183,199 @@ public override string ToString() sb.Append(" Tag: ").Append(Tag).Append("\n"); sb.Append(" TransactionID: ").Append(TransactionID).Append("\n"); sb.Append(" UserName: ").Append(UserName).Append("\n"); - sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class TransactionInfoJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override TransactionInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as TransactionInfo); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option computerName = default; + Option dateTime = default; + Option documentsDatabase = default; + Option systemInfo = default; + Option tag = default; + Option transactionID = default; + Option userName = default; + Option varVersion = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ComputerName": + computerName = new Option(utf8JsonReader.GetString()!); + break; + case "DateTime": + dateTime = new Option(utf8JsonReader.GetString()!); + break; + case "DocumentsDatabase": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + documentsDatabase = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "SystemInfo": + systemInfo = new Option(utf8JsonReader.GetString()!); + break; + case "Tag": + tag = new Option(utf8JsonReader.GetString()!); + break; + case "TransactionID": + transactionID = new Option(utf8JsonReader.GetString()!); + break; + case "UserName": + userName = new Option(utf8JsonReader.GetString()!); + break; + case "Version": + varVersion = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (computerName.IsSet && computerName.Value == null) + throw new ArgumentNullException(nameof(computerName), "Property is not nullable for class TransactionInfo."); + + if (dateTime.IsSet && dateTime.Value == null) + throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class TransactionInfo."); + + if (documentsDatabase.IsSet && documentsDatabase.Value == null) + throw new ArgumentNullException(nameof(documentsDatabase), "Property is not nullable for class TransactionInfo."); + + if (systemInfo.IsSet && systemInfo.Value == null) + throw new ArgumentNullException(nameof(systemInfo), "Property is not nullable for class TransactionInfo."); + + if (tag.IsSet && tag.Value == null) + throw new ArgumentNullException(nameof(tag), "Property is not nullable for class TransactionInfo."); + + if (transactionID.IsSet && transactionID.Value == null) + throw new ArgumentNullException(nameof(transactionID), "Property is not nullable for class TransactionInfo."); + + if (userName.IsSet && userName.Value == null) + throw new ArgumentNullException(nameof(userName), "Property is not nullable for class TransactionInfo."); + + if (varVersion.IsSet && varVersion.Value == null) + throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class TransactionInfo."); + + return new TransactionInfo(computerName, dateTime, documentsDatabase, systemInfo, tag, transactionID, userName, varVersion); } /// - /// Returns true if TransactionInfo instances are equal + /// Serializes a /// - /// Instance of TransactionInfo to be compared - /// Boolean - public bool Equals(TransactionInfo input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TransactionInfo transactionInfo, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.ComputerName == input.ComputerName || - (this.ComputerName != null && - this.ComputerName.Equals(input.ComputerName)) - ) && - ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) - ) && - ( - this.DocumentsDatabase == input.DocumentsDatabase || - (this.DocumentsDatabase != null && - this.DocumentsDatabase.Equals(input.DocumentsDatabase)) - ) && - ( - this.SystemInfo == input.SystemInfo || - (this.SystemInfo != null && - this.SystemInfo.Equals(input.SystemInfo)) - ) && - ( - this.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && - ( - this.TransactionID == input.TransactionID || - (this.TransactionID != null && - this.TransactionID.Equals(input.TransactionID)) - ) && - ( - this.UserName == input.UserName || - (this.UserName != null && - this.UserName.Equals(input.UserName)) - ) && - ( - this.Version == input.Version || - (this.Version != null && - this.Version.Equals(input.Version)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, transactionInfo, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TransactionInfo transactionInfo, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (transactionInfo.ComputerNameOption.IsSet && transactionInfo.ComputerName == null) + throw new ArgumentNullException(nameof(transactionInfo.ComputerName), "Property is required for class TransactionInfo."); + + if (transactionInfo.DateTimeOption.IsSet && transactionInfo.DateTime == null) + throw new ArgumentNullException(nameof(transactionInfo.DateTime), "Property is required for class TransactionInfo."); + + if (transactionInfo.DocumentsDatabaseOption.IsSet && transactionInfo.DocumentsDatabase == null) + throw new ArgumentNullException(nameof(transactionInfo.DocumentsDatabase), "Property is required for class TransactionInfo."); + + if (transactionInfo.SystemInfoOption.IsSet && transactionInfo.SystemInfo == null) + throw new ArgumentNullException(nameof(transactionInfo.SystemInfo), "Property is required for class TransactionInfo."); + + if (transactionInfo.TagOption.IsSet && transactionInfo.Tag == null) + throw new ArgumentNullException(nameof(transactionInfo.Tag), "Property is required for class TransactionInfo."); + + if (transactionInfo.TransactionIDOption.IsSet && transactionInfo.TransactionID == null) + throw new ArgumentNullException(nameof(transactionInfo.TransactionID), "Property is required for class TransactionInfo."); + + if (transactionInfo.UserNameOption.IsSet && transactionInfo.UserName == null) + throw new ArgumentNullException(nameof(transactionInfo.UserName), "Property is required for class TransactionInfo."); + + if (transactionInfo.VarVersionOption.IsSet && transactionInfo.VarVersion == null) + throw new ArgumentNullException(nameof(transactionInfo.VarVersion), "Property is required for class TransactionInfo."); + + if (transactionInfo.ComputerNameOption.IsSet) + writer.WriteString("ComputerName", transactionInfo.ComputerName); + + if (transactionInfo.DateTimeOption.IsSet) + writer.WriteString("DateTime", transactionInfo.DateTime); + + if (transactionInfo.DocumentsDatabaseOption.IsSet) { - int hashCode = 41; - if (this.ComputerName != null) - hashCode = hashCode * 59 + this.ComputerName.GetHashCode(); - if (this.DateTime != null) - hashCode = hashCode * 59 + this.DateTime.GetHashCode(); - if (this.DocumentsDatabase != null) - hashCode = hashCode * 59 + this.DocumentsDatabase.GetHashCode(); - if (this.SystemInfo != null) - hashCode = hashCode * 59 + this.SystemInfo.GetHashCode(); - if (this.Tag != null) - hashCode = hashCode * 59 + this.Tag.GetHashCode(); - if (this.TransactionID != null) - hashCode = hashCode * 59 + this.TransactionID.GetHashCode(); - if (this.UserName != null) - hashCode = hashCode * 59 + this.UserName.GetHashCode(); - if (this.Version != null) - hashCode = hashCode * 59 + this.Version.GetHashCode(); - return hashCode; + writer.WritePropertyName("DocumentsDatabase"); + JsonSerializer.Serialize(writer, transactionInfo.DocumentsDatabase, jsonSerializerOptions); } - } + if (transactionInfo.SystemInfoOption.IsSet) + writer.WriteString("SystemInfo", transactionInfo.SystemInfo); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (transactionInfo.TagOption.IsSet) + writer.WriteString("Tag", transactionInfo.Tag); + + if (transactionInfo.TransactionIDOption.IsSet) + writer.WriteString("TransactionID", transactionInfo.TransactionID); + + if (transactionInfo.UserNameOption.IsSet) + writer.WriteString("UserName", transactionInfo.UserName); + + if (transactionInfo.VarVersionOption.IsSet) + writer.WriteString("Version", transactionInfo.VarVersion); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs index e019332..ce230ed 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs @@ -1,73 +1,105 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionProcessGetResponse /// - [DataContract] - public partial class TransactionProcessGetResponse : IEquatable, IValidatableObject + public partial class TransactionProcessGetResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// transactionId. - /// tag. - /// outData. - /// inData. - public TransactionProcessGetResponse(Guid transactionId = default(Guid), string tag = default(string), OutData outData = default(OutData), InData inData = default(InData)) + /// transactionId + /// tag + /// outData + /// inData + [JsonConstructor] + public TransactionProcessGetResponse(Option transactionId = default, Option tag = default, Option outData = default, Option inData = default) { - this.TransactionId = transactionId; - this.Tag = tag; - this.OutData = outData; - this.InData = inData; + TransactionIdOption = transactionId; + TagOption = tag; + OutDataOption = outData; + InDataOption = inData; + OnCreated(); } - + + partial void OnCreated(); + + /// + /// Used to track the state of TransactionId + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TransactionIdOption { get; private set; } + /// /// Gets or Sets TransactionId /// - [DataMember(Name="transactionId", EmitDefaultValue=false)] - public Guid TransactionId { get; set; } + [JsonPropertyName("transactionId")] + public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new(value); } } + + /// + /// Used to track the state of Tag + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TagOption { get; private set; } /// /// Gets or Sets Tag /// - [DataMember(Name="tag", EmitDefaultValue=false)] - public string Tag { get; set; } + [JsonPropertyName("tag")] + public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } + + /// + /// Used to track the state of OutData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OutDataOption { get; private set; } /// /// Gets or Sets OutData /// - [DataMember(Name="outData", EmitDefaultValue=false)] - public OutData OutData { get; set; } + [JsonPropertyName("outData")] + public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new(value); } } + + /// + /// Used to track the state of InData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option InDataOption { get; private set; } /// /// Gets or Sets InData /// - [DataMember(Name="inData", EmitDefaultValue=false)] - public InData InData { get; set; } + [JsonPropertyName("inData")] + public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new(value); } } /// /// Returns the string presentation of the object @@ -75,7 +107,7 @@ public partial class TransactionProcessGetResponse : IEquatableString presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TransactionProcessGetResponse {\n"); sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); sb.Append(" Tag: ").Append(Tag).Append("\n"); @@ -84,89 +116,145 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class TransactionProcessGetResponseJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override TransactionProcessGetResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as TransactionProcessGetResponse); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option transactionId = default; + Option tag = default; + Option outData = default; + Option inData = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "transactionId": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + transactionId = new Option(utf8JsonReader.GetGuid()); + break; + case "tag": + tag = new Option(utf8JsonReader.GetString()!); + break; + case "outData": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + outData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "inData": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + inData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (transactionId.IsSet && transactionId.Value == null) + throw new ArgumentNullException(nameof(transactionId), "Property is not nullable for class TransactionProcessGetResponse."); + + if (tag.IsSet && tag.Value == null) + throw new ArgumentNullException(nameof(tag), "Property is not nullable for class TransactionProcessGetResponse."); + + if (outData.IsSet && outData.Value == null) + throw new ArgumentNullException(nameof(outData), "Property is not nullable for class TransactionProcessGetResponse."); + + if (inData.IsSet && inData.Value == null) + throw new ArgumentNullException(nameof(inData), "Property is not nullable for class TransactionProcessGetResponse."); + + return new TransactionProcessGetResponse(transactionId, tag, outData, inData); } /// - /// Returns true if TransactionProcessGetResponse instances are equal + /// Serializes a /// - /// Instance of TransactionProcessGetResponse to be compared - /// Boolean - public bool Equals(TransactionProcessGetResponse input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TransactionProcessGetResponse transactionProcessGetResponse, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.TransactionId == input.TransactionId || - (this.TransactionId != null && - this.TransactionId.Equals(input.TransactionId)) - ) && - ( - this.Tag == input.Tag || - (this.Tag != null && - this.Tag.Equals(input.Tag)) - ) && - ( - this.OutData == input.OutData || - (this.OutData != null && - this.OutData.Equals(input.OutData)) - ) && - ( - this.InData == input.InData || - (this.InData != null && - this.InData.Equals(input.InData)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, transactionProcessGetResponse, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TransactionProcessGetResponse transactionProcessGetResponse, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (transactionProcessGetResponse.TagOption.IsSet && transactionProcessGetResponse.Tag == null) + throw new ArgumentNullException(nameof(transactionProcessGetResponse.Tag), "Property is required for class TransactionProcessGetResponse."); + + if (transactionProcessGetResponse.OutDataOption.IsSet && transactionProcessGetResponse.OutData == null) + throw new ArgumentNullException(nameof(transactionProcessGetResponse.OutData), "Property is required for class TransactionProcessGetResponse."); + + if (transactionProcessGetResponse.InDataOption.IsSet && transactionProcessGetResponse.InData == null) + throw new ArgumentNullException(nameof(transactionProcessGetResponse.InData), "Property is required for class TransactionProcessGetResponse."); + + if (transactionProcessGetResponse.TransactionIdOption.IsSet) + writer.WriteString("transactionId", transactionProcessGetResponse.TransactionIdOption.Value!.Value); + + if (transactionProcessGetResponse.TagOption.IsSet) + writer.WriteString("tag", transactionProcessGetResponse.Tag); + + if (transactionProcessGetResponse.OutDataOption.IsSet) { - int hashCode = 41; - if (this.TransactionId != null) - hashCode = hashCode * 59 + this.TransactionId.GetHashCode(); - if (this.Tag != null) - hashCode = hashCode * 59 + this.Tag.GetHashCode(); - if (this.OutData != null) - hashCode = hashCode * 59 + this.OutData.GetHashCode(); - if (this.InData != null) - hashCode = hashCode * 59 + this.InData.GetHashCode(); - return hashCode; + writer.WritePropertyName("outData"); + JsonSerializer.Serialize(writer, transactionProcessGetResponse.OutData, jsonSerializerOptions); + } + if (transactionProcessGetResponse.InDataOption.IsSet) + { + writer.WritePropertyName("inData"); + JsonSerializer.Serialize(writer, transactionProcessGetResponse.InData, jsonSerializerOptions); } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs index ebc5726..9d38f7d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs @@ -1,123 +1,164 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionProcessRequest /// - [DataContract] - public partial class TransactionProcessRequest : IEquatable, IValidatableObject + public partial class TransactionProcessRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected TransactionProcessRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// processParam (required). - /// list. - /// Live portrait photo. - /// Portrait photo from an external source. - /// containerList. - /// systemInfo. - /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs.. - /// Digital Travel Credential (DTC-VC) data in base64 format for processing. - public TransactionProcessRequest(ProcessParams processParam = default(ProcessParams), List list = default(List), string livePortrait = default(string), string extPortrait = default(string), ContainerList containerList = default(ContainerList), ProcessSystemInfo systemInfo = default(ProcessSystemInfo), Dictionary passBackObject = default(Dictionary), string dtc = default(string)) + /// processParam + /// list + /// Live portrait photo + /// Portrait photo from an external source + /// containerList + /// systemInfo + /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. + /// Digital Travel Credential (DTC-VC) data in base64 format for processing + [JsonConstructor] + public TransactionProcessRequest(ProcessParams processParam, Option?> list = default, Option livePortrait = default, Option extPortrait = default, Option containerList = default, Option systemInfo = default, Option?> passBackObject = default, Option dtc = default) { - // to ensure "processParam" is required (not null) - if (processParam == null) - { - throw new InvalidDataException("processParam is a required property for TransactionProcessRequest and cannot be null"); - } - else - { - this.ProcessParam = processParam; - } - - this.List = list; - this.LivePortrait = livePortrait; - this.ExtPortrait = extPortrait; - this.ContainerList = containerList; - this.SystemInfo = systemInfo; - this.PassBackObject = passBackObject; - this.Dtc = dtc; + ProcessParam = processParam; + ListOption = list; + LivePortraitOption = livePortrait; + ExtPortraitOption = extPortrait; + ContainerListOption = containerList; + SystemInfoOption = systemInfo; + PassBackObjectOption = passBackObject; + DtcOption = dtc; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets ProcessParam /// - [DataMember(Name="processParam", EmitDefaultValue=true)] + [JsonPropertyName("processParam")] public ProcessParams ProcessParam { get; set; } + /// + /// Used to track the state of List + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> ListOption { get; private set; } + /// /// Gets or Sets List /// - [DataMember(Name="List", EmitDefaultValue=false)] - public List List { get; set; } + [JsonPropertyName("List")] + public List? List { get { return this.ListOption; } set { this.ListOption = new(value); } } + + /// + /// Used to track the state of LivePortrait + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option LivePortraitOption { get; private set; } /// /// Live portrait photo /// /// Live portrait photo - [DataMember(Name="livePortrait", EmitDefaultValue=false)] - public string LivePortrait { get; set; } + /* Base64 encoded data */ + [JsonPropertyName("livePortrait")] + public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new(value); } } + + /// + /// Used to track the state of ExtPortrait + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ExtPortraitOption { get; private set; } /// /// Portrait photo from an external source /// /// Portrait photo from an external source - [DataMember(Name="extPortrait", EmitDefaultValue=false)] - public string ExtPortrait { get; set; } + /* Base64 encoded data */ + [JsonPropertyName("extPortrait")] + public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new(value); } } + + /// + /// Used to track the state of ContainerList + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ContainerListOption { get; private set; } /// /// Gets or Sets ContainerList /// - [DataMember(Name="ContainerList", EmitDefaultValue=false)] - public ContainerList ContainerList { get; set; } + [JsonPropertyName("ContainerList")] + public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new(value); } } + + /// + /// Used to track the state of SystemInfo + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option SystemInfoOption { get; private set; } /// /// Gets or Sets SystemInfo /// - [DataMember(Name="systemInfo", EmitDefaultValue=false)] - public ProcessSystemInfo SystemInfo { get; set; } + [JsonPropertyName("systemInfo")] + public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } + + /// + /// Used to track the state of PassBackObject + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> PassBackObjectOption { get; private set; } /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. - [DataMember(Name="passBackObject", EmitDefaultValue=false)] - public Dictionary PassBackObject { get; set; } + [JsonPropertyName("passBackObject")] + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } + + /// + /// Used to track the state of Dtc + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option DtcOption { get; private set; } /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing - [DataMember(Name="dtc", EmitDefaultValue=false)] - public string Dtc { get; set; } + [JsonPropertyName("dtc")] + public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new(value); } } /// /// Returns the string presentation of the object @@ -125,7 +166,7 @@ protected TransactionProcessRequest() { } /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class TransactionProcessRequest {\n"); sb.Append(" ProcessParam: ").Append(ProcessParam).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); @@ -138,119 +179,207 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - + /// - /// Returns the JSON string presentation of the object + /// To validate all properties of the instance /// - /// JSON string presentation of the object - public virtual string ToJson() + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + yield break; } + } + /// + /// A Json converter for type + /// + public class TransactionProcessRequestJsonConverter : JsonConverter + { /// - /// Returns true if objects are equal + /// Deserializes json to /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// + /// + /// + /// + /// + public override TransactionProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - return this.Equals(input as TransactionProcessRequest); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option processParam = default; + Option?> list = default; + Option livePortrait = default; + Option extPortrait = default; + Option containerList = default; + Option systemInfo = default; + Option?> passBackObject = default; + Option dtc = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "processParam": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + processParam = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "List": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "livePortrait": + livePortrait = new Option(utf8JsonReader.GetString()!); + break; + case "extPortrait": + extPortrait = new Option(utf8JsonReader.GetString()!); + break; + case "ContainerList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + containerList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "systemInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + systemInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "passBackObject": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + passBackObject = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "dtc": + dtc = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!processParam.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessRequest.", nameof(processParam)); + + if (processParam.IsSet && processParam.Value == null) + throw new ArgumentNullException(nameof(processParam), "Property is not nullable for class TransactionProcessRequest."); + + if (list.IsSet && list.Value == null) + throw new ArgumentNullException(nameof(list), "Property is not nullable for class TransactionProcessRequest."); + + if (livePortrait.IsSet && livePortrait.Value == null) + throw new ArgumentNullException(nameof(livePortrait), "Property is not nullable for class TransactionProcessRequest."); + + if (extPortrait.IsSet && extPortrait.Value == null) + throw new ArgumentNullException(nameof(extPortrait), "Property is not nullable for class TransactionProcessRequest."); + + if (containerList.IsSet && containerList.Value == null) + throw new ArgumentNullException(nameof(containerList), "Property is not nullable for class TransactionProcessRequest."); + + if (systemInfo.IsSet && systemInfo.Value == null) + throw new ArgumentNullException(nameof(systemInfo), "Property is not nullable for class TransactionProcessRequest."); + + if (passBackObject.IsSet && passBackObject.Value == null) + throw new ArgumentNullException(nameof(passBackObject), "Property is not nullable for class TransactionProcessRequest."); + + if (dtc.IsSet && dtc.Value == null) + throw new ArgumentNullException(nameof(dtc), "Property is not nullable for class TransactionProcessRequest."); + + return new TransactionProcessRequest(processParam.Value!, list, livePortrait, extPortrait, containerList, systemInfo, passBackObject, dtc); } /// - /// Returns true if TransactionProcessRequest instances are equal + /// Serializes a /// - /// Instance of TransactionProcessRequest to be compared - /// Boolean - public bool Equals(TransactionProcessRequest input) + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TransactionProcessRequest transactionProcessRequest, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.ProcessParam == input.ProcessParam || - (this.ProcessParam != null && - this.ProcessParam.Equals(input.ProcessParam)) - ) && - ( - this.List == input.List || - this.List != null && - input.List != null && - this.List.SequenceEqual(input.List) - ) && - ( - this.LivePortrait == input.LivePortrait || - (this.LivePortrait != null && - this.LivePortrait.Equals(input.LivePortrait)) - ) && - ( - this.ExtPortrait == input.ExtPortrait || - (this.ExtPortrait != null && - this.ExtPortrait.Equals(input.ExtPortrait)) - ) && - ( - this.ContainerList == input.ContainerList || - (this.ContainerList != null && - this.ContainerList.Equals(input.ContainerList)) - ) && - ( - this.SystemInfo == input.SystemInfo || - (this.SystemInfo != null && - this.SystemInfo.Equals(input.SystemInfo)) - ) && - ( - this.PassBackObject == input.PassBackObject || - this.PassBackObject != null && - input.PassBackObject != null && - this.PassBackObject.SequenceEqual(input.PassBackObject) - ) && - ( - this.Dtc == input.Dtc || - (this.Dtc != null && - this.Dtc.Equals(input.Dtc)) - ); + writer.WriteStartObject(); + + WriteProperties(writer, transactionProcessRequest, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// Gets the hash code + /// Serializes the properties of /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TransactionProcessRequest transactionProcessRequest, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap + if (transactionProcessRequest.ProcessParam == null) + throw new ArgumentNullException(nameof(transactionProcessRequest.ProcessParam), "Property is required for class TransactionProcessRequest."); + + if (transactionProcessRequest.ListOption.IsSet && transactionProcessRequest.List == null) + throw new ArgumentNullException(nameof(transactionProcessRequest.List), "Property is required for class TransactionProcessRequest."); + + if (transactionProcessRequest.LivePortraitOption.IsSet && transactionProcessRequest.LivePortrait == null) + throw new ArgumentNullException(nameof(transactionProcessRequest.LivePortrait), "Property is required for class TransactionProcessRequest."); + + if (transactionProcessRequest.ExtPortraitOption.IsSet && transactionProcessRequest.ExtPortrait == null) + throw new ArgumentNullException(nameof(transactionProcessRequest.ExtPortrait), "Property is required for class TransactionProcessRequest."); + + if (transactionProcessRequest.ContainerListOption.IsSet && transactionProcessRequest.ContainerList == null) + throw new ArgumentNullException(nameof(transactionProcessRequest.ContainerList), "Property is required for class TransactionProcessRequest."); + + if (transactionProcessRequest.SystemInfoOption.IsSet && transactionProcessRequest.SystemInfo == null) + throw new ArgumentNullException(nameof(transactionProcessRequest.SystemInfo), "Property is required for class TransactionProcessRequest."); + + if (transactionProcessRequest.PassBackObjectOption.IsSet && transactionProcessRequest.PassBackObject == null) + throw new ArgumentNullException(nameof(transactionProcessRequest.PassBackObject), "Property is required for class TransactionProcessRequest."); + + if (transactionProcessRequest.DtcOption.IsSet && transactionProcessRequest.Dtc == null) + throw new ArgumentNullException(nameof(transactionProcessRequest.Dtc), "Property is required for class TransactionProcessRequest."); + + writer.WritePropertyName("processParam"); + JsonSerializer.Serialize(writer, transactionProcessRequest.ProcessParam, jsonSerializerOptions); + if (transactionProcessRequest.ListOption.IsSet) { - int hashCode = 41; - if (this.ProcessParam != null) - hashCode = hashCode * 59 + this.ProcessParam.GetHashCode(); - if (this.List != null) - hashCode = hashCode * 59 + this.List.GetHashCode(); - if (this.LivePortrait != null) - hashCode = hashCode * 59 + this.LivePortrait.GetHashCode(); - if (this.ExtPortrait != null) - hashCode = hashCode * 59 + this.ExtPortrait.GetHashCode(); - if (this.ContainerList != null) - hashCode = hashCode * 59 + this.ContainerList.GetHashCode(); - if (this.SystemInfo != null) - hashCode = hashCode * 59 + this.SystemInfo.GetHashCode(); - if (this.PassBackObject != null) - hashCode = hashCode * 59 + this.PassBackObject.GetHashCode(); - if (this.Dtc != null) - hashCode = hashCode * 59 + this.Dtc.GetHashCode(); - return hashCode; + writer.WritePropertyName("List"); + JsonSerializer.Serialize(writer, transactionProcessRequest.List, jsonSerializerOptions); } - } + if (transactionProcessRequest.LivePortraitOption.IsSet) + writer.WriteString("livePortrait", transactionProcessRequest.LivePortrait); - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; + if (transactionProcessRequest.ExtPortraitOption.IsSet) + writer.WriteString("extPortrait", transactionProcessRequest.ExtPortrait); + + if (transactionProcessRequest.ContainerListOption.IsSet) + { + writer.WritePropertyName("ContainerList"); + JsonSerializer.Serialize(writer, transactionProcessRequest.ContainerList, jsonSerializerOptions); + } + if (transactionProcessRequest.SystemInfoOption.IsSet) + { + writer.WritePropertyName("systemInfo"); + JsonSerializer.Serialize(writer, transactionProcessRequest.SystemInfo, jsonSerializerOptions); + } + if (transactionProcessRequest.PassBackObjectOption.IsSet) + { + writer.WritePropertyName("passBackObject"); + JsonSerializer.Serialize(writer, transactionProcessRequest.PassBackObject, jsonSerializerOptions); + } + if (transactionProcessRequest.DtcOption.IsSet) + writer.WriteString("dtc", transactionProcessRequest.Dtc); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs new file mode 100644 index 0000000..78ad809 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs @@ -0,0 +1,288 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// TransactionProcessResponse + /// + public partial class TransactionProcessResponse : ProcessResponse, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// chipPage + /// coreLibResultCode + /// processingFinished + /// containerList + /// transactionInfo + /// morePagesAvailable + /// Time the document processing has taken, ms. + /// Base64 encoded transaction processing log + /// Free-form object provided in request. See passBackObject property of ProcessRequest. + /// metadata + [JsonConstructor] + public TransactionProcessResponse(RfidLocation chipPage, int coreLibResultCode, ProcessingStatus processingFinished, ContainerList containerList, TransactionInfo transactionInfo, int morePagesAvailable, int elapsedTime, Option log = default, Option?> passBackObject = default, Option?> metadata = default) : base(chipPage, coreLibResultCode, processingFinished, containerList, transactionInfo, morePagesAvailable, elapsedTime, log, passBackObject, metadata) + { + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TransactionProcessResponse {\n"); + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" CoreLibResultCode: ").Append(CoreLibResultCode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + } + + /// + /// A Json converter for type + /// + public class TransactionProcessResponseJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TransactionProcessResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option chipPage = default; + Option coreLibResultCode = default; + Option processingFinished = default; + Option containerList = default; + Option transactionInfo = default; + Option morePagesAvailable = default; + Option elapsedTime = default; + Option log = default; + Option?> passBackObject = default; + Option?> metadata = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "ChipPage": + string? chipPageRawValue = utf8JsonReader.GetString(); + if (chipPageRawValue != null) + chipPage = new Option(RfidLocationValueConverter.FromStringOrDefault(chipPageRawValue)); + break; + case "CoreLibResultCode": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + coreLibResultCode = new Option(utf8JsonReader.GetInt32()); + break; + case "ProcessingFinished": + string? processingFinishedRawValue = utf8JsonReader.GetString(); + if (processingFinishedRawValue != null) + processingFinished = new Option(ProcessingStatusValueConverter.FromStringOrDefault(processingFinishedRawValue)); + break; + case "ContainerList": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + containerList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "TransactionInfo": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + transactionInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "morePagesAvailable": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + morePagesAvailable = new Option(utf8JsonReader.GetInt32()); + break; + case "elapsedTime": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + elapsedTime = new Option(utf8JsonReader.GetInt32()); + break; + case "log": + log = new Option(utf8JsonReader.GetString()!); + break; + case "passBackObject": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + passBackObject = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "metadata": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + default: + break; + } + } + } + + if (!chipPage.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(chipPage)); + + if (!coreLibResultCode.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(coreLibResultCode)); + + if (!processingFinished.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(processingFinished)); + + if (!containerList.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(containerList)); + + if (!transactionInfo.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(transactionInfo)); + + if (!morePagesAvailable.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(morePagesAvailable)); + + if (!elapsedTime.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(elapsedTime)); + + if (chipPage.IsSet && chipPage.Value == null) + throw new ArgumentNullException(nameof(chipPage), "Property is not nullable for class TransactionProcessResponse."); + + if (coreLibResultCode.IsSet && coreLibResultCode.Value == null) + throw new ArgumentNullException(nameof(coreLibResultCode), "Property is not nullable for class TransactionProcessResponse."); + + if (processingFinished.IsSet && processingFinished.Value == null) + throw new ArgumentNullException(nameof(processingFinished), "Property is not nullable for class TransactionProcessResponse."); + + if (containerList.IsSet && containerList.Value == null) + throw new ArgumentNullException(nameof(containerList), "Property is not nullable for class TransactionProcessResponse."); + + if (transactionInfo.IsSet && transactionInfo.Value == null) + throw new ArgumentNullException(nameof(transactionInfo), "Property is not nullable for class TransactionProcessResponse."); + + if (morePagesAvailable.IsSet && morePagesAvailable.Value == null) + throw new ArgumentNullException(nameof(morePagesAvailable), "Property is not nullable for class TransactionProcessResponse."); + + if (elapsedTime.IsSet && elapsedTime.Value == null) + throw new ArgumentNullException(nameof(elapsedTime), "Property is not nullable for class TransactionProcessResponse."); + + if (log.IsSet && log.Value == null) + throw new ArgumentNullException(nameof(log), "Property is not nullable for class TransactionProcessResponse."); + + if (passBackObject.IsSet && passBackObject.Value == null) + throw new ArgumentNullException(nameof(passBackObject), "Property is not nullable for class TransactionProcessResponse."); + + if (metadata.IsSet && metadata.Value == null) + throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class TransactionProcessResponse."); + + return new TransactionProcessResponse(chipPage.Value!.Value!, coreLibResultCode.Value!.Value!, processingFinished.Value!.Value!, containerList.Value!, transactionInfo.Value!, morePagesAvailable.Value!.Value!, elapsedTime.Value!.Value!, log, passBackObject, metadata); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TransactionProcessResponse transactionProcessResponse, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, transactionProcessResponse, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TransactionProcessResponse transactionProcessResponse, JsonSerializerOptions jsonSerializerOptions) + { + if (transactionProcessResponse.ContainerList == null) + throw new ArgumentNullException(nameof(transactionProcessResponse.ContainerList), "Property is required for class TransactionProcessResponse."); + + if (transactionProcessResponse.TransactionInfo == null) + throw new ArgumentNullException(nameof(transactionProcessResponse.TransactionInfo), "Property is required for class TransactionProcessResponse."); + + if (transactionProcessResponse.LogOption.IsSet && transactionProcessResponse.Log == null) + throw new ArgumentNullException(nameof(transactionProcessResponse.Log), "Property is required for class TransactionProcessResponse."); + + if (transactionProcessResponse.PassBackObjectOption.IsSet && transactionProcessResponse.PassBackObject == null) + throw new ArgumentNullException(nameof(transactionProcessResponse.PassBackObject), "Property is required for class TransactionProcessResponse."); + + if (transactionProcessResponse.MetadataOption.IsSet && transactionProcessResponse.Metadata == null) + throw new ArgumentNullException(nameof(transactionProcessResponse.Metadata), "Property is required for class TransactionProcessResponse."); + + var chipPageRawValue = RfidLocationValueConverter.ToJsonValue(transactionProcessResponse.ChipPage); + writer.WriteNumber("ChipPage", chipPageRawValue); + + writer.WriteNumber("CoreLibResultCode", transactionProcessResponse.CoreLibResultCode); + + var processingFinishedRawValue = ProcessingStatusValueConverter.ToJsonValue(transactionProcessResponse.ProcessingFinished); + writer.WriteNumber("ProcessingFinished", processingFinishedRawValue); + + writer.WritePropertyName("ContainerList"); + JsonSerializer.Serialize(writer, transactionProcessResponse.ContainerList, jsonSerializerOptions); + writer.WritePropertyName("TransactionInfo"); + JsonSerializer.Serialize(writer, transactionProcessResponse.TransactionInfo, jsonSerializerOptions); + writer.WriteNumber("morePagesAvailable", transactionProcessResponse.MorePagesAvailable); + + writer.WriteNumber("elapsedTime", transactionProcessResponse.ElapsedTime); + + if (transactionProcessResponse.LogOption.IsSet) + writer.WriteString("log", transactionProcessResponse.Log); + + if (transactionProcessResponse.PassBackObjectOption.IsSet) + { + writer.WritePropertyName("passBackObject"); + JsonSerializer.Serialize(writer, transactionProcessResponse.PassBackObject, jsonSerializerOptions); + } + if (transactionProcessResponse.MetadataOption.IsSet) + { + writer.WritePropertyName("metadata"); + JsonSerializer.Serialize(writer, transactionProcessResponse.Metadata, jsonSerializerOptions); + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs new file mode 100644 index 0000000..0142cf9 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs @@ -0,0 +1,161 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// TransactionProcessResponseItem + /// + public partial class TransactionProcessResponseItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// coreLibResultCode + [JsonConstructor] + public TransactionProcessResponseItem(int coreLibResultCode) + { + CoreLibResultCode = coreLibResultCode; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets CoreLibResultCode + /// + [JsonPropertyName("CoreLibResultCode")] + public int CoreLibResultCode { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TransactionProcessResponseItem {\n"); + sb.Append(" CoreLibResultCode: ").Append(CoreLibResultCode).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TransactionProcessResponseItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TransactionProcessResponseItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option coreLibResultCode = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "CoreLibResultCode": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + coreLibResultCode = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!coreLibResultCode.IsSet) + throw new ArgumentException("Property is required for class TransactionProcessResponseItem.", nameof(coreLibResultCode)); + + if (coreLibResultCode.IsSet && coreLibResultCode.Value == null) + throw new ArgumentNullException(nameof(coreLibResultCode), "Property is not nullable for class TransactionProcessResponseItem."); + + return new TransactionProcessResponseItem(coreLibResultCode.Value!.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TransactionProcessResponseItem transactionProcessResponseItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, transactionProcessResponseItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TransactionProcessResponseItem transactionProcessResponseItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteNumber("CoreLibResultCode", transactionProcessResponseItem.CoreLibResultCode); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs new file mode 100644 index 0000000..ef0f83b --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs @@ -0,0 +1,259 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// TransactionProcessResult + /// + public partial class TransactionProcessResult : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// outData + /// inData + /// tag + /// transactionId + [JsonConstructor] + public TransactionProcessResult(Option outData = default, Option inData = default, Option tag = default, Option transactionId = default) + { + OutDataOption = outData; + InDataOption = inData; + TagOption = tag; + TransactionIdOption = transactionId; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Used to track the state of OutData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option OutDataOption { get; private set; } + + /// + /// Gets or Sets OutData + /// + [JsonPropertyName("OutData")] + public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new(value); } } + + /// + /// Used to track the state of InData + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option InDataOption { get; private set; } + + /// + /// Gets or Sets InData + /// + [JsonPropertyName("InData")] + public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new(value); } } + + /// + /// Used to track the state of Tag + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TagOption { get; private set; } + + /// + /// Gets or Sets Tag + /// + [JsonPropertyName("tag")] + public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } + + /// + /// Used to track the state of TransactionId + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TransactionIdOption { get; private set; } + + /// + /// Gets or Sets TransactionId + /// + [JsonPropertyName("transactionId")] + public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TransactionProcessResult {\n"); + sb.Append(" OutData: ").Append(OutData).Append("\n"); + sb.Append(" InData: ").Append(InData).Append("\n"); + sb.Append(" Tag: ").Append(Tag).Append("\n"); + sb.Append(" TransactionId: ").Append(TransactionId).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TransactionProcessResultJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TransactionProcessResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option outData = default; + Option inData = default; + Option tag = default; + Option transactionId = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "OutData": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + outData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "InData": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + inData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "tag": + tag = new Option(utf8JsonReader.GetString()!); + break; + case "transactionId": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + transactionId = new Option(utf8JsonReader.GetGuid()); + break; + default: + break; + } + } + } + + if (outData.IsSet && outData.Value == null) + throw new ArgumentNullException(nameof(outData), "Property is not nullable for class TransactionProcessResult."); + + if (inData.IsSet && inData.Value == null) + throw new ArgumentNullException(nameof(inData), "Property is not nullable for class TransactionProcessResult."); + + if (tag.IsSet && tag.Value == null) + throw new ArgumentNullException(nameof(tag), "Property is not nullable for class TransactionProcessResult."); + + if (transactionId.IsSet && transactionId.Value == null) + throw new ArgumentNullException(nameof(transactionId), "Property is not nullable for class TransactionProcessResult."); + + return new TransactionProcessResult(outData, inData, tag, transactionId); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TransactionProcessResult transactionProcessResult, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, transactionProcessResult, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TransactionProcessResult transactionProcessResult, JsonSerializerOptions jsonSerializerOptions) + { + if (transactionProcessResult.OutDataOption.IsSet && transactionProcessResult.OutData == null) + throw new ArgumentNullException(nameof(transactionProcessResult.OutData), "Property is required for class TransactionProcessResult."); + + if (transactionProcessResult.InDataOption.IsSet && transactionProcessResult.InData == null) + throw new ArgumentNullException(nameof(transactionProcessResult.InData), "Property is required for class TransactionProcessResult."); + + if (transactionProcessResult.TagOption.IsSet && transactionProcessResult.Tag == null) + throw new ArgumentNullException(nameof(transactionProcessResult.Tag), "Property is required for class TransactionProcessResult."); + + if (transactionProcessResult.OutDataOption.IsSet) + { + writer.WritePropertyName("OutData"); + JsonSerializer.Serialize(writer, transactionProcessResult.OutData, jsonSerializerOptions); + } + if (transactionProcessResult.InDataOption.IsSet) + { + writer.WritePropertyName("InData"); + JsonSerializer.Serialize(writer, transactionProcessResult.InData, jsonSerializerOptions); + } + if (transactionProcessResult.TagOption.IsSet) + writer.WriteString("tag", transactionProcessResult.Tag); + + if (transactionProcessResult.TransactionIdOption.IsSet) + writer.WriteString("transactionId", transactionProcessResult.TransactionIdOption.Value!.Value); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionScenarioRequest.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionScenarioRequest.cs deleted file mode 100644 index 62cf8f0..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionScenarioRequest.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.2.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// TransactionScenarioRequest - /// - [DataContract] - public partial class TransactionScenarioRequest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// scenario. - public TransactionScenarioRequest(string scenario = default(string)) - { - this.Scenario = scenario; - } - - /// - /// Gets or Sets Scenario - /// - [DataMember(Name="scenario", EmitDefaultValue=false)] - public string Scenario { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TransactionScenarioRequest {\n"); - sb.Append(" Scenario: ").Append(Scenario).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TransactionScenarioRequest); - } - - /// - /// Returns true if TransactionScenarioRequest instances are equal - /// - /// Instance of TransactionScenarioRequest to be compared - /// Boolean - public bool Equals(TransactionScenarioRequest input) - { - if (input == null) - return false; - - return - ( - this.Scenario == input.Scenario || - (this.Scenario != null && - this.Scenario.Equals(input.Scenario)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Scenario != null) - hashCode = hashCode * 59 + this.Scenario.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs new file mode 100644 index 0000000..066dd45 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs @@ -0,0 +1,230 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to store an array of binary information that is a part of one of the informational data groups + /// + public partial class TrfFtBytes : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Logical type of the field + /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification + /// Length of Data array + /// Binary data array. Base64 encoded. + [JsonConstructor] + public TrfFtBytes(int type, decimal status, decimal length, string? data = default) + { + Type = type; + Status = status; + Length = length; + Data = data; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Logical type of the field + /// + /// Logical type of the field + [JsonPropertyName("Type")] + public int Type { get; set; } + + /// + /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification + /// + /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification + [JsonPropertyName("Status")] + public decimal Status { get; set; } + + /// + /// Length of Data array + /// + /// Length of Data array + [JsonPropertyName("Length")] + public decimal Length { get; set; } + + /// + /// Binary data array. Base64 encoded. + /// + /// Binary data array. Base64 encoded. + [JsonPropertyName("Data")] + public string? Data { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TrfFtBytes {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Length: ").Append(Length).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TrfFtBytesJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TrfFtBytes Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + Option status = default; + Option length = default; + Option data = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + case "Status": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + status = new Option(utf8JsonReader.GetDecimal()); + break; + case "Length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + length = new Option(utf8JsonReader.GetDecimal()); + break; + case "Data": + data = new Option(utf8JsonReader.GetString()); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class TrfFtBytes.", nameof(type)); + + if (!status.IsSet) + throw new ArgumentException("Property is required for class TrfFtBytes.", nameof(status)); + + if (!length.IsSet) + throw new ArgumentException("Property is required for class TrfFtBytes.", nameof(length)); + + if (!data.IsSet) + throw new ArgumentException("Property is required for class TrfFtBytes.", nameof(data)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class TrfFtBytes."); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class TrfFtBytes."); + + if (length.IsSet && length.Value == null) + throw new ArgumentNullException(nameof(length), "Property is not nullable for class TrfFtBytes."); + + return new TrfFtBytes(type.Value!.Value!, status.Value!.Value!, length.Value!.Value!, data.Value!); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TrfFtBytes trfFtBytes, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, trfFtBytes, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TrfFtBytes trfFtBytes, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteNumber("Type", trfFtBytes.Type); + + writer.WriteNumber("Status", trfFtBytes.Status); + + writer.WriteNumber("Length", trfFtBytes.Length); + + if (trfFtBytes.Data != null) + writer.WriteString("Data", trfFtBytes.Data); + else + writer.WriteNull("Data"); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs new file mode 100644 index 0000000..391ca74 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs @@ -0,0 +1,249 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Structure is used to store information about the numeric field (4 bytes) that is a part of one of the informational data groups. + /// + public partial class TrfFtString : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// Numeric value. + /// type + /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification + /// Mask of format of text information (for example, «YYMMDD» for date of birth) + [JsonConstructor] + public TrfFtString(string data, Option type = default, Option status = default, Option format = default) + { + Data = data; + TypeOption = type; + StatusOption = status; + FormatOption = format; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Numeric value. + /// + /// Numeric value. + [JsonPropertyName("Data")] + public string Data { get; set; } + + /// + /// Used to track the state of Type + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option TypeOption { get; private set; } + + /// + /// Gets or Sets Type + /// + [JsonPropertyName("Type")] + public int? Type { get { return this.TypeOption; } set { this.TypeOption = new(value); } } + + /// + /// Used to track the state of Status + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option StatusOption { get; private set; } + + /// + /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification + /// + /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification + [JsonPropertyName("Status")] + public int? Status { get { return this.StatusOption; } set { this.StatusOption = new(value); } } + + /// + /// Used to track the state of Format + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FormatOption { get; private set; } + + /// + /// Mask of format of text information (for example, «YYMMDD» for date of birth) + /// + /// Mask of format of text information (for example, «YYMMDD» for date of birth) + [JsonPropertyName("Format")] + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class TrfFtString {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" Format: ").Append(Format).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class TrfFtStringJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override TrfFtString Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option data = default; + Option type = default; + Option status = default; + Option format = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Data": + data = new Option(utf8JsonReader.GetString()!); + break; + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + case "Status": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + status = new Option(utf8JsonReader.GetInt32()); + break; + case "Format": + format = new Option(utf8JsonReader.GetString()!); + break; + default: + break; + } + } + } + + if (!data.IsSet) + throw new ArgumentException("Property is required for class TrfFtString.", nameof(data)); + + if (data.IsSet && data.Value == null) + throw new ArgumentNullException(nameof(data), "Property is not nullable for class TrfFtString."); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class TrfFtString."); + + if (status.IsSet && status.Value == null) + throw new ArgumentNullException(nameof(status), "Property is not nullable for class TrfFtString."); + + if (format.IsSet && format.Value == null) + throw new ArgumentNullException(nameof(format), "Property is not nullable for class TrfFtString."); + + return new TrfFtString(data.Value!, type, status, format); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, TrfFtString trfFtString, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, trfFtString, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, TrfFtString trfFtString, JsonSerializerOptions jsonSerializerOptions) + { + if (trfFtString.Data == null) + throw new ArgumentNullException(nameof(trfFtString.Data), "Property is required for class TrfFtString."); + + if (trfFtString.FormatOption.IsSet && trfFtString.Format == null) + throw new ArgumentNullException(nameof(trfFtString.Format), "Property is required for class TrfFtString."); + + writer.WriteString("Data", trfFtString.Data); + + if (trfFtString.TypeOption.IsSet) + writer.WriteNumber("Type", trfFtString.TypeOption.Value!.Value); + + if (trfFtString.StatusOption.IsSet) + writer.WriteNumber("Status", trfFtString.StatusOption.Value!.Value); + + if (trfFtString.FormatOption.IsSet) + writer.WriteString("Format", trfFtString.Format); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs b/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs index 62505d9..faabda3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs @@ -1,46 +1,202 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { - public class VerificationResult + /// + /// Defines VerificationResult + /// + public enum VerificationResult + { + /// + /// Enum DISABLED for value: 0 + /// + DISABLED = 0, + + /// + /// Enum VERIFIED for value: 1 + /// + VERIFIED = 1, + + /// + /// Enum NOT_VERIFIED for value: 2 + /// + NOT_VERIFIED = 2, + + /// + /// Enum COMPARE_MATCH for value: 3 + /// + COMPARE_MATCH = 3, + + /// + /// Enum COMPARE_NOT_MATCH for value: 4 + /// + COMPARE_NOT_MATCH = 4 + } + + /// + /// Converts to and from the JSON value + /// + public static class VerificationResultValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static VerificationResult FromString(string value) + { + if (value.Equals((0).ToString())) + return VerificationResult.DISABLED; + + if (value.Equals((1).ToString())) + return VerificationResult.VERIFIED; + + if (value.Equals((2).ToString())) + return VerificationResult.NOT_VERIFIED; + + if (value.Equals((3).ToString())) + return VerificationResult.COMPARE_MATCH; + + if (value.Equals((4).ToString())) + return VerificationResult.COMPARE_NOT_MATCH; + + throw new NotImplementedException($"Could not convert value to type VerificationResult: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static VerificationResult? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return VerificationResult.DISABLED; + + if (value.Equals((1).ToString())) + return VerificationResult.VERIFIED; + + if (value.Equals((2).ToString())) + return VerificationResult.NOT_VERIFIED; + + if (value.Equals((3).ToString())) + return VerificationResult.COMPARE_MATCH; + + if (value.Equals((4).ToString())) + return VerificationResult.COMPARE_NOT_MATCH; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(VerificationResult value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class VerificationResultJsonConverter : JsonConverter { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override VerificationResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + VerificationResult? result = rawValue == null + ? null + : VerificationResultValueConverter.FromStringOrDefault(rawValue); - /** Comparison result unknown */ - public const int DISABLED = 0; + if (result != null) + return result.Value; - /** Verification passed */ - public const int VERIFIED = 1; + throw new JsonException(); + } + + /// + /// Writes the VerificationResult to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, VerificationResult verificationResult, JsonSerializerOptions options) + { + writer.WriteStringValue(verificationResult.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class VerificationResultNullableJsonConverter : JsonConverter + { + /// + /// Returns a VerificationResult from the Json object + /// + /// + /// + /// + /// + public override VerificationResult? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - /** Verification failed */ - public const int NOT_VERIFIED = 2; + VerificationResult? result = rawValue == null + ? null + : VerificationResultValueConverter.FromStringOrDefault(rawValue); - /** Positive comparison result */ - public const int COMPARE_MATCH = 3; + if (result != null) + return result.Value; - /** Negative comparison result */ - public const int COMPARE_NOT_MATCH = 4; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, VerificationResult? verificationResult, JsonSerializerOptions options) + { + writer.WriteStringValue(verificationResult?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs index 59039e3..715c775 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs @@ -1,102 +1,150 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.2.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { /// /// VerifiedFieldMap /// - [DataContract] - public partial class VerifiedFieldMap : IEquatable, IValidatableObject + public partial class VerifiedFieldMap : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// wFieldType. - /// wLCID. - /// Field data extracted from mrz(machine readable zone). - /// Field data extracted from visual zone. - /// Field data extracted from barcode. - /// Field data extracted from rfid chip. - /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes.. - public VerifiedFieldMap(int wFieldType = default(int), int wLCID = default(int), string fieldMRZ = default(string), string fieldVisual = default(string), string fieldBarcode = default(string), string fieldRFID = default(string), List matrix = default(List)) + /// wFieldType + /// wLCID + /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. + /// Field data extracted from mrz(machine readable zone) + /// Field data extracted from visual zone + /// Field data extracted from barcode + /// Field data extracted from rfid chip + /// fieldType + [JsonConstructor] + public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List matrix, Option fieldMRZ = default, Option fieldVisual = default, Option fieldBarcode = default, Option fieldRFID = default, Option fieldType = default) { - this.WFieldType = wFieldType; - this.WLCID = wLCID; - this.FieldMRZ = fieldMRZ; - this.FieldVisual = fieldVisual; - this.FieldBarcode = fieldBarcode; - this.FieldRFID = fieldRFID; - this.Matrix = matrix; + WFieldType = wFieldType; + WLCID = wLCID; + Matrix = matrix; + FieldMRZOption = fieldMRZ; + FieldVisualOption = fieldVisual; + FieldBarcodeOption = fieldBarcode; + FieldRFIDOption = fieldRFID; + FieldTypeOption = fieldType; + OnCreated(); } - + + partial void OnCreated(); + /// /// Gets or Sets WFieldType /// - [DataMember(Name="wFieldType", EmitDefaultValue=false)] - public int WFieldType { get; set; } + [JsonPropertyName("wFieldType")] + public TextFieldType WFieldType { get; set; } /// /// Gets or Sets WLCID /// - [DataMember(Name="wLCID", EmitDefaultValue=false)] - public int WLCID { get; set; } + [JsonPropertyName("wLCID")] + public LCID WLCID { get; set; } + + /// + /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. + /// + /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. + /* [1,0,0,0,0,3,0,0,0,0] */ + [JsonPropertyName("Matrix")] + public List Matrix { get; set; } + + /// + /// Used to track the state of FieldMRZ + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldMRZOption { get; private set; } /// /// Field data extracted from mrz(machine readable zone) /// /// Field data extracted from mrz(machine readable zone) - [DataMember(Name="Field_MRZ", EmitDefaultValue=false)] - public string FieldMRZ { get; set; } + [JsonPropertyName("Field_MRZ")] + public string? FieldMRZ { get { return this.FieldMRZOption; } set { this.FieldMRZOption = new(value); } } + + /// + /// Used to track the state of FieldVisual + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldVisualOption { get; private set; } /// /// Field data extracted from visual zone /// /// Field data extracted from visual zone - [DataMember(Name="Field_Visual", EmitDefaultValue=false)] - public string FieldVisual { get; set; } + [JsonPropertyName("Field_Visual")] + public string? FieldVisual { get { return this.FieldVisualOption; } set { this.FieldVisualOption = new(value); } } + + /// + /// Used to track the state of FieldBarcode + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldBarcodeOption { get; private set; } /// /// Field data extracted from barcode /// /// Field data extracted from barcode - [DataMember(Name="Field_Barcode", EmitDefaultValue=false)] - public string FieldBarcode { get; set; } + [JsonPropertyName("Field_Barcode")] + public string? FieldBarcode { get { return this.FieldBarcodeOption; } set { this.FieldBarcodeOption = new(value); } } + + /// + /// Used to track the state of FieldRFID + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldRFIDOption { get; private set; } /// /// Field data extracted from rfid chip /// /// Field data extracted from rfid chip - [DataMember(Name="Field_RFID", EmitDefaultValue=false)] - public string FieldRFID { get; set; } + [JsonPropertyName("Field_RFID")] + public string? FieldRFID { get { return this.FieldRFIDOption; } set { this.FieldRFIDOption = new(value); } } /// - /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. + /// Used to track the state of FieldType /// - /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. - [DataMember(Name="Matrix", EmitDefaultValue=false)] - public List Matrix { get; set; } + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldTypeOption { get; private set; } + + /// + /// Gets or Sets FieldType + /// + [JsonPropertyName("FieldType")] + public int? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new(value); } } /// /// Returns the string presentation of the object @@ -104,123 +152,210 @@ public partial class VerifiedFieldMap : IEquatable, IValidata /// String presentation of the object public override string ToString() { - var sb = new StringBuilder(); + StringBuilder sb = new StringBuilder(); sb.Append("class VerifiedFieldMap {\n"); sb.Append(" WFieldType: ").Append(WFieldType).Append("\n"); sb.Append(" WLCID: ").Append(WLCID).Append("\n"); + sb.Append(" Matrix: ").Append(Matrix).Append("\n"); sb.Append(" FieldMRZ: ").Append(FieldMRZ).Append("\n"); sb.Append(" FieldVisual: ").Append(FieldVisual).Append("\n"); sb.Append(" FieldBarcode: ").Append(FieldBarcode).Append("\n"); sb.Append(" FieldRFID: ").Append(FieldRFID).Append("\n"); - sb.Append(" Matrix: ").Append(Matrix).Append("\n"); + sb.Append(" FieldType: ").Append(FieldType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } /// - /// Returns true if objects are equal + /// To validate all properties of the instance /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - return this.Equals(input as VerifiedFieldMap); + yield break; } + } + /// + /// A Json converter for type + /// + public class VerifiedFieldMapJsonConverter : JsonConverter + { /// - /// Returns true if VerifiedFieldMap instances are equal + /// Deserializes json to /// - /// Instance of VerifiedFieldMap to be compared - /// Boolean - public bool Equals(VerifiedFieldMap input) + /// + /// + /// + /// + /// + public override VerifiedFieldMap Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) { - if (input == null) - return false; - - return - ( - this.WFieldType == input.WFieldType || - (this.WFieldType != null && - this.WFieldType.Equals(input.WFieldType)) - ) && - ( - this.WLCID == input.WLCID || - (this.WLCID != null && - this.WLCID.Equals(input.WLCID)) - ) && - ( - this.FieldMRZ == input.FieldMRZ || - (this.FieldMRZ != null && - this.FieldMRZ.Equals(input.FieldMRZ)) - ) && - ( - this.FieldVisual == input.FieldVisual || - (this.FieldVisual != null && - this.FieldVisual.Equals(input.FieldVisual)) - ) && - ( - this.FieldBarcode == input.FieldBarcode || - (this.FieldBarcode != null && - this.FieldBarcode.Equals(input.FieldBarcode)) - ) && - ( - this.FieldRFID == input.FieldRFID || - (this.FieldRFID != null && - this.FieldRFID.Equals(input.FieldRFID)) - ) && - ( - this.Matrix == input.Matrix || - this.Matrix != null && - input.Matrix != null && - this.Matrix.SequenceEqual(input.Matrix) - ); + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option wFieldType = default; + Option wLCID = default; + Option?> matrix = default; + Option fieldMRZ = default; + Option fieldVisual = default; + Option fieldBarcode = default; + Option fieldRFID = default; + Option fieldType = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "wFieldType": + string? wFieldTypeRawValue = utf8JsonReader.GetString(); + if (wFieldTypeRawValue != null) + wFieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(wFieldTypeRawValue)); + break; + case "wLCID": + string? wLCIDRawValue = utf8JsonReader.GetString(); + if (wLCIDRawValue != null) + wLCID = new Option(LCIDValueConverter.FromStringOrDefault(wLCIDRawValue)); + break; + case "Matrix": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + matrix = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Field_MRZ": + fieldMRZ = new Option(utf8JsonReader.GetString()!); + break; + case "Field_Visual": + fieldVisual = new Option(utf8JsonReader.GetString()!); + break; + case "Field_Barcode": + fieldBarcode = new Option(utf8JsonReader.GetString()!); + break; + case "Field_RFID": + fieldRFID = new Option(utf8JsonReader.GetString()!); + break; + case "FieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!wFieldType.IsSet) + throw new ArgumentException("Property is required for class VerifiedFieldMap.", nameof(wFieldType)); + + if (!wLCID.IsSet) + throw new ArgumentException("Property is required for class VerifiedFieldMap.", nameof(wLCID)); + + if (!matrix.IsSet) + throw new ArgumentException("Property is required for class VerifiedFieldMap.", nameof(matrix)); + + if (wFieldType.IsSet && wFieldType.Value == null) + throw new ArgumentNullException(nameof(wFieldType), "Property is not nullable for class VerifiedFieldMap."); + + if (wLCID.IsSet && wLCID.Value == null) + throw new ArgumentNullException(nameof(wLCID), "Property is not nullable for class VerifiedFieldMap."); + + if (matrix.IsSet && matrix.Value == null) + throw new ArgumentNullException(nameof(matrix), "Property is not nullable for class VerifiedFieldMap."); + + if (fieldMRZ.IsSet && fieldMRZ.Value == null) + throw new ArgumentNullException(nameof(fieldMRZ), "Property is not nullable for class VerifiedFieldMap."); + + if (fieldVisual.IsSet && fieldVisual.Value == null) + throw new ArgumentNullException(nameof(fieldVisual), "Property is not nullable for class VerifiedFieldMap."); + + if (fieldBarcode.IsSet && fieldBarcode.Value == null) + throw new ArgumentNullException(nameof(fieldBarcode), "Property is not nullable for class VerifiedFieldMap."); + + if (fieldRFID.IsSet && fieldRFID.Value == null) + throw new ArgumentNullException(nameof(fieldRFID), "Property is not nullable for class VerifiedFieldMap."); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class VerifiedFieldMap."); + + return new VerifiedFieldMap(wFieldType.Value!.Value!, wLCID.Value!.Value!, matrix.Value!, fieldMRZ, fieldVisual, fieldBarcode, fieldRFID, fieldType); } /// - /// Gets the hash code + /// Serializes a /// - /// Hash code - public override int GetHashCode() + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, VerifiedFieldMap verifiedFieldMap, JsonSerializerOptions jsonSerializerOptions) { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.WFieldType != null) - hashCode = hashCode * 59 + this.WFieldType.GetHashCode(); - if (this.WLCID != null) - hashCode = hashCode * 59 + this.WLCID.GetHashCode(); - if (this.FieldMRZ != null) - hashCode = hashCode * 59 + this.FieldMRZ.GetHashCode(); - if (this.FieldVisual != null) - hashCode = hashCode * 59 + this.FieldVisual.GetHashCode(); - if (this.FieldBarcode != null) - hashCode = hashCode * 59 + this.FieldBarcode.GetHashCode(); - if (this.FieldRFID != null) - hashCode = hashCode * 59 + this.FieldRFID.GetHashCode(); - if (this.Matrix != null) - hashCode = hashCode * 59 + this.Matrix.GetHashCode(); - return hashCode; - } + writer.WriteStartObject(); + + WriteProperties(writer, verifiedFieldMap, jsonSerializerOptions); + writer.WriteEndObject(); } /// - /// To validate all properties of the instance + /// Serializes the properties of /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, VerifiedFieldMap verifiedFieldMap, JsonSerializerOptions jsonSerializerOptions) { - yield break; + if (verifiedFieldMap.Matrix == null) + throw new ArgumentNullException(nameof(verifiedFieldMap.Matrix), "Property is required for class VerifiedFieldMap."); + + if (verifiedFieldMap.FieldMRZOption.IsSet && verifiedFieldMap.FieldMRZ == null) + throw new ArgumentNullException(nameof(verifiedFieldMap.FieldMRZ), "Property is required for class VerifiedFieldMap."); + + if (verifiedFieldMap.FieldVisualOption.IsSet && verifiedFieldMap.FieldVisual == null) + throw new ArgumentNullException(nameof(verifiedFieldMap.FieldVisual), "Property is required for class VerifiedFieldMap."); + + if (verifiedFieldMap.FieldBarcodeOption.IsSet && verifiedFieldMap.FieldBarcode == null) + throw new ArgumentNullException(nameof(verifiedFieldMap.FieldBarcode), "Property is required for class VerifiedFieldMap."); + + if (verifiedFieldMap.FieldRFIDOption.IsSet && verifiedFieldMap.FieldRFID == null) + throw new ArgumentNullException(nameof(verifiedFieldMap.FieldRFID), "Property is required for class VerifiedFieldMap."); + + var wFieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(verifiedFieldMap.WFieldType); + writer.WriteNumber("wFieldType", wFieldTypeRawValue); + + var wLCIDRawValue = LCIDValueConverter.ToJsonValue(verifiedFieldMap.WLCID); + writer.WriteNumber("wLCID", wLCIDRawValue); + + writer.WritePropertyName("Matrix"); + JsonSerializer.Serialize(writer, verifiedFieldMap.Matrix, jsonSerializerOptions); + if (verifiedFieldMap.FieldMRZOption.IsSet) + writer.WriteString("Field_MRZ", verifiedFieldMap.FieldMRZ); + + if (verifiedFieldMap.FieldVisualOption.IsSet) + writer.WriteString("Field_Visual", verifiedFieldMap.FieldVisual); + + if (verifiedFieldMap.FieldBarcodeOption.IsSet) + writer.WriteString("Field_Barcode", verifiedFieldMap.FieldBarcode); + + if (verifiedFieldMap.FieldRFIDOption.IsSet) + writer.WriteString("Field_RFID", verifiedFieldMap.FieldRFID); + + if (verifiedFieldMap.FieldTypeOption.IsSet) + writer.WriteNumber("FieldType", verifiedFieldMap.FieldTypeOption.Value!.Value); } } - } diff --git a/src/Regula.DocumentReader.WebClient/Model/Visibility.cs b/src/Regula.DocumentReader.WebClient/Model/Visibility.cs index c27f879..dfac4bb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Visibility.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Visibility.cs @@ -1,47 +1,203 @@ -/* +// +/* * Regula Document Reader Web API * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 6.5.0 - * + * The version of the OpenAPI document: 7.4.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ +#nullable enable + using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; +using System.Text.Json; +using System.Text.Json.Serialization; using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model { + /// /// Enumeration contains visibility status of the security element - public class Visibility + /// + /// Enumeration contains visibility status of the security element + public enum Visibility + { + /// + /// Enum INVISIBLE for value: 0 + /// + INVISIBLE = 0, + + /// + /// Enum VISIBLE for value: 1 + /// + VISIBLE = 1, + + /// + /// Enum COLORED for value: 2 + /// + COLORED = 2, + + /// + /// Enum GRAYSCALE for value: 4 + /// + GRAYSCALE = 4, + + /// + /// Enum WHITE_IR_MATCHING for value: 8 + /// + WHITE_IR_MATCHING = 8 + } + + /// + /// Converts to and from the JSON value + /// + public static class VisibilityValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static Visibility FromString(string value) + { + if (value.Equals((0).ToString())) + return Visibility.INVISIBLE; + + if (value.Equals((1).ToString())) + return Visibility.VISIBLE; + + if (value.Equals((2).ToString())) + return Visibility.COLORED; + + if (value.Equals((4).ToString())) + return Visibility.GRAYSCALE; + + if (value.Equals((8).ToString())) + return Visibility.WHITE_IR_MATCHING; + + throw new NotImplementedException($"Could not convert value to type Visibility: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static Visibility? FromStringOrDefault(string value) + { + if (value.Equals((0).ToString())) + return Visibility.INVISIBLE; + + if (value.Equals((1).ToString())) + return Visibility.VISIBLE; + + if (value.Equals((2).ToString())) + return Visibility.COLORED; + + if (value.Equals((4).ToString())) + return Visibility.GRAYSCALE; + + if (value.Equals((8).ToString())) + return Visibility.WHITE_IR_MATCHING; + + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static int ToJsonValue(Visibility value) + { + return (int) value; + } + } + + /// + /// A Json converter for type + /// + /// + public class VisibilityJsonConverter : JsonConverter { + /// + /// Returns a from the Json object + /// + /// + /// + /// + /// + public override Visibility Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); + + Visibility? result = rawValue == null + ? null + : VisibilityValueConverter.FromStringOrDefault(rawValue); - - public const int INVISIBLE = 0; + if (result != null) + return result.Value; - - public const int VISIBLE = 1; + throw new JsonException(); + } + + /// + /// Writes the Visibility to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Visibility visibility, JsonSerializerOptions options) + { + writer.WriteStringValue(visibility.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class VisibilityNullableJsonConverter : JsonConverter + { + /// + /// Returns a Visibility from the Json object + /// + /// + /// + /// + /// + public override Visibility? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string? rawValue = reader.GetString(); - - public const int COLORED = 2; + Visibility? result = rawValue == null + ? null + : VisibilityValueConverter.FromStringOrDefault(rawValue); - - public const int GRAYSCALE = 4; + if (result != null) + return result.Value; - - public const int WHITE_IR_MATCHING = 8; + throw new JsonException(); + } + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, Visibility? visibility, JsonSerializerOptions options) + { + writer.WriteStringValue(visibility?.ToString() ?? "null"); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs new file mode 100644 index 0000000..6b29d95 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs @@ -0,0 +1,471 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// VisualExtendedFieldItem + /// + public partial class VisualExtendedFieldItem : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// fieldType + /// wFieldType + /// Field symbolic name (null-terminated string) + /// Number of StringsResult array elements + /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. + /// Buf_Text text string length + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' + /// fieldMask + /// validity + /// inComparison + /// wLCID + /// reserved2 + /// reserved3 + [JsonConstructor] + public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string fieldName, decimal stringsCount, List stringsResult, decimal bufLength, string bufText, Option fieldMask = default, Option validity = default, Option inComparison = default, Option wLCID = default, Option reserved2 = default, Option reserved3 = default) + { + FieldType = fieldType; + WFieldType = wFieldType; + FieldName = fieldName; + StringsCount = stringsCount; + StringsResult = stringsResult; + BufLength = bufLength; + BufText = bufText; + FieldMaskOption = fieldMask; + ValidityOption = validity; + InComparisonOption = inComparison; + WLCIDOption = wLCID; + Reserved2Option = reserved2; + Reserved3Option = reserved3; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets WFieldType + /// + [JsonPropertyName("wFieldType")] + public TextFieldType WFieldType { get; set; } + + /// + /// Gets or Sets FieldType + /// + [JsonPropertyName("FieldType")] + public int FieldType { get; set; } + + /// + /// Field symbolic name (null-terminated string) + /// + /// Field symbolic name (null-terminated string) + [JsonPropertyName("FieldName")] + public string FieldName { get; set; } + + /// + /// Number of StringsResult array elements + /// + /// Number of StringsResult array elements + [JsonPropertyName("StringsCount")] + public decimal StringsCount { get; set; } + + /// + /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. + /// + /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. + [JsonPropertyName("StringsResult")] + public List StringsResult { get; set; } + + /// + /// Buf_Text text string length + /// + /// Buf_Text text string length + [JsonPropertyName("Buf_Length")] + public decimal BufLength { get; set; } + + /// + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' + /// + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' + [JsonPropertyName("Buf_Text")] + public string BufText { get; set; } + + /// + /// Used to track the state of FieldMask + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option FieldMaskOption { get; private set; } + + /// + /// Gets or Sets FieldMask + /// + [JsonPropertyName("FieldMask")] + public string? FieldMask { get { return this.FieldMaskOption; } set { this.FieldMaskOption = new(value); } } + + /// + /// Used to track the state of Validity + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option ValidityOption { get; private set; } + + /// + /// Gets or Sets Validity + /// + [JsonPropertyName("Validity")] + public int? Validity { get { return this.ValidityOption; } set { this.ValidityOption = new(value); } } + + /// + /// Used to track the state of InComparison + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option InComparisonOption { get; private set; } + + /// + /// Gets or Sets InComparison + /// + [JsonPropertyName("InComparison")] + public int? InComparison { get { return this.InComparisonOption; } set { this.InComparisonOption = new(value); } } + + /// + /// Used to track the state of WLCID + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option WLCIDOption { get; private set; } + + /// + /// Gets or Sets WLCID + /// + [JsonPropertyName("wLCID")] + public int? WLCID { get { return this.WLCIDOption; } set { this.WLCIDOption = new(value); } } + + /// + /// Used to track the state of Reserved2 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved2Option { get; private set; } + + /// + /// Gets or Sets Reserved2 + /// + [JsonPropertyName("Reserved2")] + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + + /// + /// Used to track the state of Reserved3 + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option Reserved3Option { get; private set; } + + /// + /// Gets or Sets Reserved3 + /// + [JsonPropertyName("Reserved3")] + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class VisualExtendedFieldItem {\n"); + sb.Append(" FieldType: ").Append(FieldType).Append("\n"); + sb.Append(" WFieldType: ").Append(WFieldType).Append("\n"); + sb.Append(" FieldName: ").Append(FieldName).Append("\n"); + sb.Append(" StringsCount: ").Append(StringsCount).Append("\n"); + sb.Append(" StringsResult: ").Append(StringsResult).Append("\n"); + sb.Append(" BufLength: ").Append(BufLength).Append("\n"); + sb.Append(" BufText: ").Append(BufText).Append("\n"); + sb.Append(" FieldMask: ").Append(FieldMask).Append("\n"); + sb.Append(" Validity: ").Append(Validity).Append("\n"); + sb.Append(" InComparison: ").Append(InComparison).Append("\n"); + sb.Append(" WLCID: ").Append(WLCID).Append("\n"); + sb.Append(" Reserved2: ").Append(Reserved2).Append("\n"); + sb.Append(" Reserved3: ").Append(Reserved3).Append("\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class VisualExtendedFieldItemJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override VisualExtendedFieldItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option fieldType = default; + Option wFieldType = default; + Option fieldName = default; + Option stringsCount = default; + Option?> stringsResult = default; + Option bufLength = default; + Option bufText = default; + Option fieldMask = default; + Option validity = default; + Option inComparison = default; + Option wLCID = default; + Option reserved2 = default; + Option reserved3 = default; + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "FieldType": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + fieldType = new Option(utf8JsonReader.GetInt32()); + break; + case "wFieldType": + string? wFieldTypeRawValue = utf8JsonReader.GetString(); + if (wFieldTypeRawValue != null) + wFieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(wFieldTypeRawValue)); + break; + case "FieldName": + fieldName = new Option(utf8JsonReader.GetString()!); + break; + case "StringsCount": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringsCount = new Option(utf8JsonReader.GetDecimal()); + break; + case "StringsResult": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + stringsResult = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; + case "Buf_Length": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + bufLength = new Option(utf8JsonReader.GetDecimal()); + break; + case "Buf_Text": + bufText = new Option(utf8JsonReader.GetString()!); + break; + case "FieldMask": + fieldMask = new Option(utf8JsonReader.GetString()!); + break; + case "Validity": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + validity = new Option(utf8JsonReader.GetInt32()); + break; + case "InComparison": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + inComparison = new Option(utf8JsonReader.GetInt32()); + break; + case "wLCID": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + wLCID = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved2": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved2 = new Option(utf8JsonReader.GetInt32()); + break; + case "Reserved3": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + reserved3 = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!fieldType.IsSet) + throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(fieldType)); + + if (!wFieldType.IsSet) + throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(wFieldType)); + + if (!fieldName.IsSet) + throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(fieldName)); + + if (!stringsCount.IsSet) + throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(stringsCount)); + + if (!stringsResult.IsSet) + throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(stringsResult)); + + if (!bufLength.IsSet) + throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(bufLength)); + + if (!bufText.IsSet) + throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(bufText)); + + if (fieldType.IsSet && fieldType.Value == null) + throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class VisualExtendedFieldItem."); + + if (wFieldType.IsSet && wFieldType.Value == null) + throw new ArgumentNullException(nameof(wFieldType), "Property is not nullable for class VisualExtendedFieldItem."); + + if (fieldName.IsSet && fieldName.Value == null) + throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class VisualExtendedFieldItem."); + + if (stringsCount.IsSet && stringsCount.Value == null) + throw new ArgumentNullException(nameof(stringsCount), "Property is not nullable for class VisualExtendedFieldItem."); + + if (stringsResult.IsSet && stringsResult.Value == null) + throw new ArgumentNullException(nameof(stringsResult), "Property is not nullable for class VisualExtendedFieldItem."); + + if (bufLength.IsSet && bufLength.Value == null) + throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class VisualExtendedFieldItem."); + + if (bufText.IsSet && bufText.Value == null) + throw new ArgumentNullException(nameof(bufText), "Property is not nullable for class VisualExtendedFieldItem."); + + if (fieldMask.IsSet && fieldMask.Value == null) + throw new ArgumentNullException(nameof(fieldMask), "Property is not nullable for class VisualExtendedFieldItem."); + + if (validity.IsSet && validity.Value == null) + throw new ArgumentNullException(nameof(validity), "Property is not nullable for class VisualExtendedFieldItem."); + + if (inComparison.IsSet && inComparison.Value == null) + throw new ArgumentNullException(nameof(inComparison), "Property is not nullable for class VisualExtendedFieldItem."); + + if (wLCID.IsSet && wLCID.Value == null) + throw new ArgumentNullException(nameof(wLCID), "Property is not nullable for class VisualExtendedFieldItem."); + + if (reserved2.IsSet && reserved2.Value == null) + throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class VisualExtendedFieldItem."); + + if (reserved3.IsSet && reserved3.Value == null) + throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class VisualExtendedFieldItem."); + + return new VisualExtendedFieldItem(fieldType.Value!.Value!, wFieldType.Value!.Value!, fieldName.Value!, stringsCount.Value!.Value!, stringsResult.Value!, bufLength.Value!.Value!, bufText.Value!, fieldMask, validity, inComparison, wLCID, reserved2, reserved3); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, VisualExtendedFieldItem visualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + WriteProperties(writer, visualExtendedFieldItem, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, VisualExtendedFieldItem visualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) + { + if (visualExtendedFieldItem.FieldName == null) + throw new ArgumentNullException(nameof(visualExtendedFieldItem.FieldName), "Property is required for class VisualExtendedFieldItem."); + + if (visualExtendedFieldItem.StringsResult == null) + throw new ArgumentNullException(nameof(visualExtendedFieldItem.StringsResult), "Property is required for class VisualExtendedFieldItem."); + + if (visualExtendedFieldItem.BufText == null) + throw new ArgumentNullException(nameof(visualExtendedFieldItem.BufText), "Property is required for class VisualExtendedFieldItem."); + + if (visualExtendedFieldItem.FieldMaskOption.IsSet && visualExtendedFieldItem.FieldMask == null) + throw new ArgumentNullException(nameof(visualExtendedFieldItem.FieldMask), "Property is required for class VisualExtendedFieldItem."); + + writer.WriteNumber("FieldType", visualExtendedFieldItem.FieldType); + + var wFieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(visualExtendedFieldItem.WFieldType); + writer.WriteNumber("wFieldType", wFieldTypeRawValue); + + writer.WriteString("FieldName", visualExtendedFieldItem.FieldName); + + writer.WriteNumber("StringsCount", visualExtendedFieldItem.StringsCount); + + writer.WritePropertyName("StringsResult"); + JsonSerializer.Serialize(writer, visualExtendedFieldItem.StringsResult, jsonSerializerOptions); + writer.WriteNumber("Buf_Length", visualExtendedFieldItem.BufLength); + + writer.WriteString("Buf_Text", visualExtendedFieldItem.BufText); + + if (visualExtendedFieldItem.FieldMaskOption.IsSet) + writer.WriteString("FieldMask", visualExtendedFieldItem.FieldMask); + + if (visualExtendedFieldItem.ValidityOption.IsSet) + writer.WriteNumber("Validity", visualExtendedFieldItem.ValidityOption.Value!.Value); + + if (visualExtendedFieldItem.InComparisonOption.IsSet) + writer.WriteNumber("InComparison", visualExtendedFieldItem.InComparisonOption.Value!.Value); + + if (visualExtendedFieldItem.WLCIDOption.IsSet) + writer.WriteNumber("wLCID", visualExtendedFieldItem.WLCIDOption.Value!.Value); + + if (visualExtendedFieldItem.Reserved2Option.IsSet) + writer.WriteNumber("Reserved2", visualExtendedFieldItem.Reserved2Option.Value!.Value); + + if (visualExtendedFieldItem.Reserved3Option.IsSet) + writer.WriteNumber("Reserved3", visualExtendedFieldItem.Reserved3Option.Value!.Value); + } + } +} diff --git a/update-models.sh b/update-models.sh index fedf8e5..40e47ae 100755 --- a/update-models.sh +++ b/update-models.sh @@ -1,15 +1,12 @@ +#!/bin/sh + DOCS_DEFINITION_FOLDER="${PWD}/../DocumentReader-web-openapi" \ \ -&& ENUM_MAPPINGS="TextFieldType=int,GraphicFieldType=int,Scenario=string,DocumentFormat=int,\ -Light=int,Result=int,VerificationResult=int,RfidLocation=int,\ -DocumentTypeRecognitionResult=int,ProcessingStatus=int,Source=string,CheckResult=int,\ -LCID=int,DocumentType=int,MeasureSystem=int,SecurityFeatureType=int,CheckDiagnose=int,\ -Critical=int,Visibility=int,AuthenticityResultType=int,ImageQualityCheckType=int,\ -LogLevel=string,MRZFormat=string,TextPostProcessing=int"\ -\ -&& docker run --user "$(id -u):$(id -g)" --rm -v "${PWD}:/client" -v "${DOCS_DEFINITION_FOLDER}:/definitions" \ -openapitools/openapi-generator-cli:v5.0.0 generate \ --i /definitions/index.yml -g csharp -o /client/ \ --c /client/csharp-generator-config.json \ ---global-property models \ ---import-mappings $ENUM_MAPPINGS \ No newline at end of file +&& docker run --user "$(id -u):$(id -g)" --rm \ +-v "${PWD}:/client" \ +-v "${DOCS_DEFINITION_FOLDER}:/definitions" \ +openapitools/openapi-generator-cli:v7.12.0 generate \ +-g csharp \ +-i /definitions/index.yml \ +-o /client/ --openapi-normalizer REF_AS_PARENT_IN_ALLOF=true \ +-c /client/csharp-generator-config.json || exit 1 \ No newline at end of file From 85dba5fb610966569e21f595cecea11c81cd5c71 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Thu, 20 Mar 2025 15:46:45 +0300 Subject: [PATCH 02/12] Fix models --- .openapi-generator-ignore | 3 +- .openapi-generator/FILES | 4 - generator-templates/JsonConverter.mustache | 640 +++++++++ generator-templates/modelEnum.mustache | 185 +++ generator-templates/modelGeneric.mustache | 393 ++++++ .../Api/TransactionApi.cs | 8 +- .../Client/HostConfiguration.cs | 2 - .../Model/AuthenticityCheckResultItem.cs | 54 +- .../Model/AuthenticityCheckResultListInner.cs | 522 -------- .../Model/AuthenticityResult.cs | 2 +- .../Model/AuthenticityResultType.cs | 2 +- .../Model/ByteArrayResult.cs | 2 +- .../Model/ChosenDocumentTypeResult.cs | 2 +- .../Model/ContainerListListInner.cs | 1188 ----------------- .../Model/DocBarCodeInfo.cs | 2 +- .../Model/DocumentBinaryInfoResult.cs | 2 +- .../Model/DocumentImageResult.cs | 2 +- .../Model/DocumentPositionResult.cs | 2 +- .../Model/DocumentTypesCandidatesResult.cs | 2 +- .../Model/EncryptedRCLItem.cs | 2 +- .../Model/EncryptedRCLResult.cs | 4 +- .../Model/FaceApi.cs | 6 +- .../Model/FaceDetectionResult.cs | 2 +- .../Model/FiberResult.cs | 2 +- .../Model/GraphicsResult.cs | 2 +- .../Model/HealthcheckDocumentsDatabase.cs | 16 +- .../Model/IdentResult.cs | 2 +- .../Model/ImageQualityResult.cs | 2 +- .../Model/ImagesResult.cs | 2 +- .../Model/LexicalAnalysisResult.cs | 2 +- .../Model/LicenseItem.cs | 2 +- .../Model/LicenseResult.cs | 4 +- .../Model/Light.cs | 2 +- .../Model/LivenessParams.cs | 32 +- .../Model/MRZDetectorResult.cs | 2 +- .../Model/MRZPositionResult.cs | 2 +- .../Model/MRZTestQualityResult.cs | 2 +- .../Model/OCRSecurityTextResult.cs | 2 +- .../Model/ParsingNotificationCodes.cs | 2 +- .../Model/PhotoIdentResult.cs | 2 +- .../Model/RFIDErrorCodes.cs | 2 +- .../Model/RFIDGraphicsInfoResult.cs | 2 +- .../Model/RFIDTextDataResult.cs | 2 +- .../Model/ResultItem.cs | 128 +- .../Model/SecurityFeatureResult.cs | 2 +- .../Model/StatusResult.cs | 2 +- .../Model/TextDataResult.cs | 2 +- .../Model/TextFieldType.cs | 24 +- .../Model/TextResult.cs | 2 +- .../Model/TransactionProcessResponse.cs | 288 ---- .../Model/TransactionProcessResponseItem.cs | 161 --- update-models.sh | 1 + 52 files changed, 1430 insertions(+), 2297 deletions(-) create mode 100644 generator-templates/JsonConverter.mustache create mode 100644 generator-templates/modelEnum.mustache create mode 100644 generator-templates/modelGeneric.mustache delete mode 100644 src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index d4704a1..53d0157 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -13,4 +13,5 @@ src/Regula.DocumentReader.WebClient.Test/** src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.nuspec src/Regula.DocumentReader.WebClient/packages.config -src/Regula.DocumentReader.WebClient/README.md \ No newline at end of file +src/Regula.DocumentReader.WebClient/README.md +src/Regula.DocumentReader.WebClient/Model/*Inner.cs \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index b4c920a..50a5645 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -30,7 +30,6 @@ src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs -src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs @@ -47,7 +46,6 @@ src/Regula.DocumentReader.WebClient/Model/CheckResult.cs src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs src/Regula.DocumentReader.WebClient/Model/ContainerList.cs -src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs src/Regula.DocumentReader.WebClient/Model/Critical.cs src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs src/Regula.DocumentReader.WebClient/Model/DataModule.cs @@ -241,8 +239,6 @@ src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs -src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs -src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs diff --git a/generator-templates/JsonConverter.mustache b/generator-templates/JsonConverter.mustache new file mode 100644 index 0000000..d8f49b2 --- /dev/null +++ b/generator-templates/JsonConverter.mustache @@ -0,0 +1,640 @@ + /// + /// A Json converter for type + /// + {{>visibility}} class {{classname}}JsonConverter : JsonConverter<{{classname}}> + { + {{#allVars}} + {{#isDateTime}} + /// + /// The format to use to serialize {{name}} + /// + public static string {{name}}Format { get; set; } = "{{{dateTimeFormat}}}"; + + {{/isDateTime}} + {{#isDate}} + /// + /// The format to use to serialize {{name}} + /// + public static string {{name}}Format { get; set; } = "{{{dateFormat}}}"; + + {{/isDate}} + {{/allVars}} + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override {{classname}} Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + {{#allVars}} + Option<{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + {{/-last}} + {{/allVars}} + {{#discriminator}} + {{#children}} + {{#-first}} + string{{nrt?}} discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "{{discriminator.propertyBaseName}}"); + + {{/-first}} + {{/children}} + {{#mappedModels}} + if (discriminator != null && discriminator.Equals("{{mappingName}}")) + return JsonSerializer.Deserialize<{{{model.classname}}}>(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + {{/mappedModels}} + + {{/discriminator}} + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{#mappedModels}} + {{#model}} + {{^vendorExtensions.x-duplicated-data-type}} + {{classname}}{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} = null; + {{#-last}} + + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/model}} + {{/mappedModels}} + Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; + while (utf8JsonReaderDiscriminator.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) + { + string{{nrt?}} localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); + utf8JsonReaderDiscriminator.Read(); + if (localVarJsonPropertyName{{nrt?}}.Equals("{{propertyBaseName}}"){{#nrt}} ?? false{{/nrt}}) + { + string{{nrt?}} discriminator = utf8JsonReaderDiscriminator.GetString(); + {{#mappedModels}} + if (discriminator{{nrt?}}.Equals("{{mappingName}}"){{#nrt}} ?? false{{/nrt}}) + { + Utf8JsonReader utf8JsonReader{{model.classname}} = utf8JsonReader; + {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} = JsonSerializer.Deserialize<{{{model.classname}}}>(ref utf8JsonReader{{model.classname}}, jsonSerializerOptions); + } + {{/mappedModels}} + } + } + } + + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + Utf8JsonReader utf8JsonReaderOneOf = utf8JsonReader; + while (utf8JsonReaderOneOf.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderOneOf.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderOneOf.CurrentDepth) + break; + + if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) + { + {{#oneOf}} + Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; + ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{^-last}} + + {{/-last}} + {{/oneOf}} + } + } + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/oneOf}} + + {{#anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; + {{#-last}} + + Utf8JsonReader utf8JsonReaderAnyOf = utf8JsonReader; + while (utf8JsonReaderAnyOf.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) + break; + + if (utf8JsonReaderAnyOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderAnyOf.CurrentDepth - 1) + { + {{#anyOf}} + Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; + ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{^-last}} + + {{/-last}} + {{/anyOf}} + } + } + {{/-last}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/anyOf}} + + {{/composedSchemas}} + {{/model.discriminator}} + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string{{nrt?}} localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + {{#allVars}} + case "{{baseName}}": + {{#isString}} + {{^isMap}} + {{^isEnum}} + {{^isUuid}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetString(){{^isNullable}}{{nrt!}}{{/isNullable}}); + {{/isUuid}} + {{/isEnum}} + {{/isMap}} + {{/isString}} + {{#isBoolean}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetBoolean()); + {{/isBoolean}} + {{#isNumeric}} + {{^isEnum}} + {{#isDouble}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDouble()); + {{/isDouble}} + {{#isDecimal}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDecimal()); + {{/isDecimal}} + {{#isFloat}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}(float)utf8JsonReader.GetDouble()); + {{/isFloat}} + {{#isLong}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int64()); + {{/isLong}} + {{^isLong}} + {{^isFloat}} + {{^isDecimal}} + {{^isDouble}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); + {{/isDouble}} + {{/isDecimal}} + {{/isFloat}} + {{/isLong}} + {{/isEnum}} + {{/isNumeric}} + {{#isDate}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{#supportsDateOnly}}DateOnly{{/supportsDateOnly}}{{^supportsDateOnly}}DateTime{{/supportsDateOnly}}{{#isNullable}}?{{/isNullable}}>(ref utf8JsonReader, jsonSerializerOptions)); + {{/isDate}} + {{#isDateTime}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + {{/isDateTime}} + {{#isEnum}} + {{^isMap}} + {{#isNumeric}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}})utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); + {{/isNumeric}} + {{^isNumeric}} + string{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = utf8JsonReader.GetString(); + {{^isInnerEnum}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{{datatypeWithEnum}}}ValueConverter.FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); + {{/isInnerEnum}} + {{#isInnerEnum}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{classname}}.{{{datatypeWithEnum}}}FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); + {{/isInnerEnum}} + {{/isNumeric}} + {{/isMap}} + {{/isEnum}} + {{#isUuid}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetGuid()); + {{/isUuid}} + {{^isUuid}} + {{^isEnum}} + {{^isString}} + {{^isBoolean}} + {{^isNumeric}} + {{^isDate}} + {{^isDateTime}} + if (utf8JsonReader.TokenType != JsonTokenType.Null) + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref utf8JsonReader, jsonSerializerOptions){{^isNullable}}{{nrt!}}{{/isNullable}}); + {{/isDateTime}} + {{/isDate}} + {{/isNumeric}} + {{/isBoolean}} + {{/isString}} + {{/isEnum}} + {{/isUuid}} + break; + {{/allVars}} + default: + break; + } + } + } + + {{#allVars}} + {{#required}} + if (!{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet) + throw new ArgumentException("Property is required for class {{classname}}.", nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}})); + + {{/required}} + {{/allVars}} + {{#allVars}} + {{^isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet && {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.Value == null) + throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}), "Property is not nullable for class {{classname}}."); + + {{/isNullable}} + {{/allVars}} + {{^vendorExtensions.x-duplicated-data-type}} + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{#mappedModels}} + if ({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} != null) + return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); + + {{#-last}} + throw new JsonException(); + {{/-last}} + {{/mappedModels}} + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} + {{^composedSchemas.oneOf}} + {{^required}} + {{#model.composedSchemas.anyOf}} + Option<{{baseType}}{{>NullConditionalProperty}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null + ? default + : new Option<{{baseType}}{{>NullConditionalProperty}}>({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); + {{/model.composedSchemas.anyOf}} + {{#-last}} + + {{/-last}} + {{/required}} + return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue{{#required}}.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/required}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); + {{/composedSchemas.oneOf}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} != null) + return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}ParsedValue{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); + + {{/vendorExtensions.x-duplicated-data-type}} + {{#-last}} + throw new JsonException(); + {{/-last}} + {{/oneOf}} + {{/composedSchemas}} + {{/model.discriminator}} + {{/vendorExtensions.x-duplicated-data-type}} + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) + { + {{#lambda.trimLineBreaks}} + {{#lambda.copyText}} + {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} + {{/lambda.copyText}} + {{#discriminator}} + {{#children}} + if ({{#lambda.paste}}{{/lambda.paste}} is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){ + JsonSerializer.Serialize<{{{classname}}}>(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); + return; + } + + {{/children}} + {{/discriminator}} + writer.WriteStartObject(); + + {{#model.discriminator}} + {{#model.hasDiscriminatorWithNonEmptyMapping}} + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + {{#isPrimitiveType}} + {{#isString}} + writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); + {{/isString}} + {{#isBoolean}} + writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isBoolean}} + {{#isNumeric}} + writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isNumeric}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + { + {{baseType}}JsonConverter {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}} = ({{baseType}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.GetType())); + {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}}.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + {{/isPrimitiveType}} + + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + {{/model.hasDiscriminatorWithNonEmptyMapping}} + {{/model.discriminator}} + {{^model.discriminator}} + {{#composedSchemas}} + {{#anyOf}} + if ({{#lambda.joinWithAmpersand}}{{^required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet {{/required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null{{/lambda.joinWithAmpersand}}) + {{#isPrimitiveType}} + {{#isString}} + writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); + {{/isString}} + {{#isBoolean}} + writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isBoolean}} + {{#isNumeric}} + writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); + {{/isNumeric}} + {{/isPrimitiveType}} + {{^isPrimitiveType}} + { + {{datatypeWithEnum}}JsonConverter {{datatypeWithEnum}}JsonConverter = ({{datatypeWithEnum}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}.GetType())); + {{datatypeWithEnum}}JsonConverter.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}, jsonSerializerOptions); + } + {{/isPrimitiveType}} + + {{/anyOf}} + {{/composedSchemas}} + {{/model.discriminator}} + WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); + writer.WriteEndObject(); + {{/lambda.trimLineBreaks}} + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) + { + {{#lambda.trimTrailingWithNewLine}} + {{#lambda.trimLineBreaks}} + {{#allVars}} + {{^isDiscriminator}} + {{^isNullable}} + {{#vendorExtensions.x-is-reference-type}} + if ({{^required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet && {{/required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) + throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}), "Property is required for class {{classname}}."); + + {{/vendorExtensions.x-is-reference-type}} + {{/isNullable}} + {{/isDiscriminator}} + {{/allVars}} + {{#allVars}} + {{#isString}} + {{^isMap}} + {{^isEnum}} + {{^isUuid}} + {{#lambda.copyText}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isUuid}} + {{/isEnum}} + {{/isMap}} + {{/isString}} + {{#isBoolean}} + {{#lambda.copyText}} + writer.WriteBoolean("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isBoolean}} + {{^isEnum}} + {{#isNumeric}} + {{#lambda.copyText}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isNumeric}} + {{/isEnum}} + {{#isDate}} + {{#lambda.copyText}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isDate}} + {{#isDateTime}} + {{#lambda.copyText}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isDateTime}} + {{#isEnum}} + {{#isNumeric}} + {{#lambda.copyText}} + writer.WriteNumber("{{baseName}}", {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}})); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isNumeric}} + {{^isMap}} + {{^isNumeric}} + {{#isInnerEnum}} + {{#isNullable}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); + else + writer.WriteNull("{{baseName}}"); + + {{/isNullable}} + {{^isNullable}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); + {{/isNullable}} + {{/isInnerEnum}} + {{^isInnerEnum}} + {{#lambda.copyText}} + {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} + {{/lambda.copyText}} + {{#required}} + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) + writer.WriteNull("{{baseName}}"); + else + { + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.Value); + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + {{#isString}} + if ({{#lambda.paste}}{{/lambda.paste}}RawValue != null){{! we cant use name here because enumVar also has a name property, so use the paste lambda instead }} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); + else + writer.WriteNull("{{baseName}}"); + {{/isString}} + {{^isString}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); + {{/isString}} + {{/-first}} + {{/enumVars}} + {{/allowableValues}} + } + {{/isNullable}} + {{^isNullable}} + var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + {{^isNumeric}} + writer.WriteString("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); + {{/isNumeric}} + {{#isNumeric}} + writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{#lambda.paste}}{{/lambda.paste}}{{/lambda.camelcase_sanitize_param}}RawValue); + {{/isNumeric}} + {{/-first}} + {{/enumVars}} + {{/allowableValues}} + {{/isNullable}} + + {{/required}} + {{^required}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option{{nrt!}}.Value != null) + { + var {{#lambda.paste}}{{/lambda.paste}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value{{nrt!}}.Value); + writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + { + var {{#lambda.paste}}{{/lambda.paste}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{nrt!}}.Value); + writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); + } + {{/isNullable}} + {{/required}} + {{/isInnerEnum}} + {{/isNumeric}} + {{/isMap}} + {{/isEnum}} + {{#isUuid}} + {{#lambda.copyText}} + writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); + {{/lambda.copyText}} + {{#lambda.indent3}} + {{>WriteProperty}} + {{/lambda.indent3}} + {{/isUuid}} + {{^isUuid}} + {{^isEnum}} + {{^isString}} + {{^isBoolean}} + {{^isNumeric}} + {{^isDate}} + {{^isDateTime}} + {{#required}} + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + {{/isNullable}} + {{/required}} + {{^required}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) + {{#isNullable}} + if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value != null) + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + else + writer.WriteNull("{{baseName}}"); + {{/isNullable}} + {{^isNullable}} + { + writer.WritePropertyName("{{baseName}}"); + JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); + } + {{/isNullable}} + {{/required}} + {{/isDateTime}} + {{/isDate}} + {{/isNumeric}} + {{/isBoolean}} + {{/isString}} + {{/isEnum}} + {{/isUuid}} + {{/allVars}} + {{/lambda.trimLineBreaks}} + {{/lambda.trimTrailingWithNewLine}} + } + } \ No newline at end of file diff --git a/generator-templates/modelEnum.mustache b/generator-templates/modelEnum.mustache new file mode 100644 index 0000000..12744d8 --- /dev/null +++ b/generator-templates/modelEnum.mustache @@ -0,0 +1,185 @@ + /// + /// {{description}}{{^description}}Defines {{{name}}}{{/description}} + /// + {{#description}} + /// {{.}} + {{/description}} + {{#vendorExtensions.x-cls-compliant}} + [CLSCompliant({{{.}}})] + {{/vendorExtensions.x-cls-compliant}} + {{#vendorExtensions.x-com-visible}} + [ComVisible({{{.}}})] + {{/vendorExtensions.x-com-visible}} + {{#allowableValues}} + {{#enumVars}} + {{#-first}} + {{#isString}} + {{^useGenericHost}} + [JsonConverter(typeof(StringEnumConverter))] + {{/useGenericHost}} + {{/isString}} + {{/-first}} + {{/enumVars}} + {{/allowableValues}} + {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{#isLong}}: long{{/isLong}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} + { + {{#allowableValues}} + {{#enumVars}} + /// + /// Enum {{name}} for value: {{value}} + /// + {{#isString}} + {{^useGenericHost}} + {{! EnumMember not currently supported in System.Text.Json, use a converter instead }} + [EnumMember(Value = "{{{value}}}")] + {{/useGenericHost}} + {{/isString}} + {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}}{{^vendorExtensions.x-zero-based-enum}} = {{-index}}{{/vendorExtensions.x-zero-based-enum}}{{/isString}}{{^-last}},{{/-last}} + {{^-last}} + + {{/-last}} + {{/enumVars}} + {{/allowableValues}} + } + {{#useGenericHost}} + + /// + /// Converts to and from the JSON value + /// + public static class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter + { + /// + /// Parses a given value to + /// + /// + /// + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} FromString(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Could not convert value to type {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}: '{value}'"); + } + + /// + /// Parses a given value to + /// + /// + /// + public static {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? FromStringOrDefault(string value) + { + {{#allowableValues}} + {{#enumVars}} + if (value.Equals({{^isString}}({{{value}}}).ToString(){{/isString}}{{#isString}}"{{{value}}}"{{/isString}})) + return {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}; + + {{/enumVars}} + {{/allowableValues}} + return null; + } + + /// + /// Converts the to the json value + /// + /// + /// + /// + public static {{>EnumValueDataType}} ToJsonValue({{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} value) + { + {{^isString}} + return ({{>EnumValueDataType}}) value; + {{/isString}} + {{#isString}} + {{#allowableValues}} + {{#enumVars}} + if (value == {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}.{{name}}) + return {{^isNumeric}}"{{/isNumeric}}{{{value}}}{{^isNumeric}}"{{/isNumeric}}; + + {{/enumVars}} + {{/allowableValues}} + throw new NotImplementedException($"Value could not be handled: '{value}'"); + {{/isString}} + } + } + + /// + /// A Json converter for type + /// + /// + public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}JsonConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}> + { + /// + /// Returns a {{datatypeWithEnum}} from the Json object + /// + /// + /// + /// + /// + public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string{{nrt?}} rawValue = reader.GetString(); + + {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = rawValue == null + ? null + : {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} {{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions options) + { + writer.WriteStringValue({{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}.ToString()); + } + } + + /// + /// A Json converter for type + /// + public class {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}NullableJsonConverter : JsonConverter<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}?> + { + /// + /// Returns a {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} from the Json object + /// + /// + /// + /// + /// + public override {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + string{{nrt?}} rawValue = reader.GetString(); + + {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? result = rawValue == null + ? null + : {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}ValueConverter.FromStringOrDefault(rawValue); + + if (result != null) + return result.Value; + + throw new JsonException(); + } + + /// + /// Writes the DateTime to the json writer + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}? {{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions options) + { + writer.WriteStringValue({{#lambda.camelcase_sanitize_param}}{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{/lambda.camelcase_sanitize_param}}?.ToString() ?? "null"); + } + } + {{/useGenericHost}} diff --git a/generator-templates/modelGeneric.mustache b/generator-templates/modelGeneric.mustache new file mode 100644 index 0000000..acdcea7 --- /dev/null +++ b/generator-templates/modelGeneric.mustache @@ -0,0 +1,393 @@ + /// + /// {{description}}{{^description}}{{classname}}{{/description}} + /// + {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}}{{#readOnlyVars}}{{#-first}} : .{{/-first}}{{/readOnlyVars}}{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{>ImplementsIEquatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} + { + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + /// + /// Initializes a new instance of the class. + /// + /// + {{#composedSchemas.anyOf}} + /// + {{/composedSchemas.anyOf}} + {{#allVars}} + {{^isDiscriminator}} + /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{/isDiscriminator}} + {{/allVars}} + {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{{dataType}}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{#model.composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{baseType}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/model.composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{parent}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} + { + {{#composedSchemas.anyOf}} + {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/composedSchemas.anyOf}} + {{name}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{#allVars}} + {{^isDiscriminator}} + {{^isInherited}} + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isInherited}} + {{#isInherited}} + {{#isNew}} + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isNew}} + {{/isInherited}} + {{/isDiscriminator}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + {{name}} = {{^isEnum}}this.GetType().Name{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), this.GetType().Name){{/isEnum}}; + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{/allVars}} + OnCreated(); + } + + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + {{^composedSchemas.oneOf}} + /// + /// Initializes a new instance of the class. + /// + {{#composedSchemas.anyOf}} + /// + {{/composedSchemas.anyOf}} + {{#allVars}} + {{^isDiscriminator}} + /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} + {{/isDiscriminator}} + {{/allVars}} + {{^composedSchemas.anyOf}} + [JsonConstructor] + {{/composedSchemas.anyOf}} + {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{baseType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} + { + {{#composedSchemas.anyOf}} + {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/composedSchemas.anyOf}} + {{#allVars}} + {{^isDiscriminator}} + {{^isInherited}} + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isInherited}} + {{#isInherited}} + {{#isNew}} + {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; + {{/isNew}} + {{/isInherited}} + {{/isDiscriminator}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + {{name}} = {{defaultValue}}; + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{/allVars}} + OnCreated(); + } + + {{/composedSchemas.oneOf}} + partial void OnCreated(); + + {{#vars}} + {{#items.isEnum}} + {{#items}} + {{^complexType}} +{{>modelInnerEnum}} + {{/complexType}} + {{/items}} + {{/items.isEnum}} + {{#isEnum}} + {{^complexType}} +{{>modelInnerEnum}} + {{/complexType}} + {{/isEnum}} + {{^isDiscriminator}} + {{#isEnum}} + {{^required}} + /// + /// Used to track the state of {{{name}}} + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// + {{#description}} + /// {{.}} + {{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + [JsonPropertyName("{{baseName}}")] + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{#isNew}}new {{/isNew}}{{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + + {{/isEnum}} + {{/isDiscriminator}} + {{/vars}} + {{#composedSchemas.anyOf}} + {{^vendorExtensions.x-duplicated-data-type}} + {{^required}} + /// + /// Used to track the state of {{{name}}} + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option; } {{^isReadOnly}}set { this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.anyOf}} + {{#composedSchemas.oneOf}} + {{^vendorExtensions.x-duplicated-data-type}} + /// + /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{dataType}}}{{>NullConditionalProperty}} {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} + + {{/vendorExtensions.x-duplicated-data-type}} + {{/composedSchemas.oneOf}} + {{#allVars}} + {{#vendorExtensions.x-is-base-or-new-discriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + /// + /// The discriminator + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public {{#isNew}}new {{/isNew}}{{datatypeWithEnum}} {{name}} { get; } + + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{^vendorExtensions.x-is-base-or-new-discriminator}} + {{^isEnum}} + {{#isInherited}} + {{#isNew}} + {{^required}} + /// + /// Used to track the state of {{{name}}} + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + [JsonPropertyName("{{baseName}}")] + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public new {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + + {{/isNew}} + {{/isInherited}} + {{^isInherited}} + {{^required}} + /// + /// Used to track the state of {{{name}}} + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} + + {{/required}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /* {{.}} */ + {{/example}} + [JsonPropertyName("{{baseName}}")] + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} + + {{/isInherited}} + {{/isEnum}} + {{/vendorExtensions.x-is-base-or-new-discriminator}} + {{/allVars}} + {{#isAdditionalPropertiesTrue}} + {{^parentModel}} + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public Dictionary AdditionalProperties { get; } = new Dictionary(); + + {{/parentModel}} + {{/isAdditionalPropertiesTrue}} + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class {{classname}} {\n"); + {{#parent}} + sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + {{/parent}} + {{#vars}} + {{^isDiscriminator}} + sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); + {{/isDiscriminator}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + {{^parentModel}} + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + {{/parentModel}} + {{/isAdditionalPropertiesTrue}} + sb.Append("}\n"); + return sb.ToString(); + } + {{#equatable}} + {{#readOnlyVars}} + {{#-first}} + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object{{nrt?}} input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + return this.Equals(input as {{classname}}); + {{/useCompareNetObjects}} + } + + /// + /// Returns true if {{classname}} instances are equal + /// + /// Instance of {{classname}} to be compared + /// Boolean + public bool Equals({{classname}}{{nrt?}} input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + if (input == null) + return false; + + return {{#parent}}base.Equals(input) && {{/parent}}{{#readOnlyVars}}{{^isInherited}}{{^isContainer}} + ( + {{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}} + ({{name}} != null && + {{name}}.Equals(input.{{name}})) + {{/vendorExtensions.x-is-value-type}} + {{#vendorExtensions.x-is-value-type}} + {{name}}.Equals(input.{{name}}) + {{/vendorExtensions.x-is-value-type}} + ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} + ( + {{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}}{{name}} != null && + input.{{name}} != null && + {{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(input.{{name}}) + ){{^-last}} && {{/-last}}{{/isContainer}}{{/isInherited}}{{/readOnlyVars}}{{^readOnlyVars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/readOnlyVars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} + {{#isAdditionalPropertiesTrue}} + {{^parentModel}} + && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any()); + {{/parentModel}} + {{/isAdditionalPropertiesTrue}} + {{/useCompareNetObjects}} + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + {{#parent}} + int hashCode = base.GetHashCode(); + {{/parent}} + {{^parent}} + int hashCode = 41; + {{/parent}} + {{#readOnlyVars}} + {{#required}} + {{^isNullable}} + hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + {{/isNullable}} + {{/required}} + {{/readOnlyVars}} + {{#readOnlyVars}} + {{#lambda.copy}} + if ({{name}} != null) + hashCode = (hashCode * 59) + {{name}}.GetHashCode(); + + {{/lambda.copy}} + {{#isNullable}} + {{#lambda.pasteOnce}} + {{/lambda.pasteOnce}} + {{/isNullable}} + {{^required}} + {{#lambda.pasteOnce}} + {{/lambda.pasteOnce}} + {{/required}} + {{/readOnlyVars}} + {{#isAdditionalPropertiesTrue}} + {{^parentModel}} + hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); + {{/parentModel}} + {{/isAdditionalPropertiesTrue}} + + return hashCode; + } + } + {{/-first}} + {{/readOnlyVars}} + {{/equatable}} +{{#validatable}} +{{^parentModel}} + +{{>validatable}} +{{/parentModel}} +{{/validatable}} + } \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs index aae8bb1..b17cb8a 100644 --- a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs @@ -297,7 +297,7 @@ public interface IApiV2TransactionTransactionIdProcessPostApiResponse : Regula.D /// /// The /// - public interface IApiV2TransactionTransactionIdResultsGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + public interface IApiV2TransactionTransactionIdResultsGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk { /// /// Returns true if the response is 200 Ok @@ -1812,11 +1812,11 @@ public ApiV2TransactionTransactionIdResultsGetApiResponse(ILogger /// - public Regula.DocumentReader.WebClient.Model.TransactionProcessResponse? Ok() + public Regula.DocumentReader.WebClient.Model.ProcessResponse? Ok() { // This logic may be modified with the AsModel.mustache template return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) + ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) : null; } @@ -1825,7 +1825,7 @@ public ApiV2TransactionTransactionIdResultsGetApiResponse(ILogger /// /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessResponse? result) + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) { result = null; diff --git a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs index 3e95573..14b3cad 100644 --- a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs +++ b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs @@ -303,8 +303,6 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new TransactionInfoJsonConverter()); _jsonOptions.Converters.Add(new TransactionProcessGetResponseJsonConverter()); _jsonOptions.Converters.Add(new TransactionProcessRequestJsonConverter()); - _jsonOptions.Converters.Add(new TransactionProcessResponseJsonConverter()); - _jsonOptions.Converters.Add(new TransactionProcessResponseItemJsonConverter()); _jsonOptions.Converters.Add(new TransactionProcessResultJsonConverter()); _jsonOptions.Converters.Add(new TrfFtBytesJsonConverter()); _jsonOptions.Converters.Add(new TrfFtStringJsonConverter()); diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs index 90d11c7..c44849b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs @@ -39,7 +39,7 @@ public partial class AuthenticityCheckResultItem : IValidatableObject [JsonConstructor] public AuthenticityCheckResultItem(Option elementResult = default, Option elementDiagnose = default, Option percentValue = default) { - Type = this.GetType().Name; + Type = 0; ElementResultOption = elementResult; ElementDiagnoseOption = elementDiagnose; PercentValueOption = percentValue; @@ -159,19 +159,49 @@ public override AuthenticityCheckResultItem Read(ref Utf8JsonReader utf8JsonRead string? discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "Type"); - if (discriminator != null && discriminator.Equals("FiberResult")) + if (discriminator != null && discriminator.Equals("1")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("1024")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("1048576")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("128")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("131072")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("16")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("IdentResult")) + if (discriminator != null && discriminator.Equals("16384")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("2")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("2048")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("OCRSecurityTextResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("PhotoIdentResult")) + if (discriminator != null && discriminator.Equals("256")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("SecurityFeatureResult")) + if (discriminator != null && discriminator.Equals("262144")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("32")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("32768")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("4")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("4096")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("512")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("524288")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("64")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("65536")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("8")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("8192")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("8388608")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); while (utf8JsonReader.Read()) @@ -280,7 +310,7 @@ public override void Write(Utf8JsonWriter writer, AuthenticityCheckResultItem au /// public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResultItem authenticityCheckResultItem, JsonSerializerOptions jsonSerializerOptions) { - writer.WriteString("Type", authenticityCheckResultItem.Type); + writer.WriteNumber("Type", authenticityCheckResultItem.Type); if (authenticityCheckResultItem.ElementResultOption.IsSet) { diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs deleted file mode 100644 index ea41658..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs +++ /dev/null @@ -1,522 +0,0 @@ -// -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.4.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// AuthenticityCheckResultListInner - /// - public partial class AuthenticityCheckResultListInner : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// - public AuthenticityCheckResultListInner(SecurityFeatureResult securityFeatureResult) - { - SecurityFeatureResult = securityFeatureResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public AuthenticityCheckResultListInner(IdentResult identResult) - { - IdentResult = identResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public AuthenticityCheckResultListInner(FiberResult fiberResult) - { - FiberResult = fiberResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public AuthenticityCheckResultListInner(OCRSecurityTextResult oCRSecurityTextResult) - { - OCRSecurityTextResult = oCRSecurityTextResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public AuthenticityCheckResultListInner(PhotoIdentResult photoIdentResult) - { - PhotoIdentResult = photoIdentResult; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets SecurityFeatureResult - /// - public SecurityFeatureResult? SecurityFeatureResult { get; set; } - - /// - /// Gets or Sets IdentResult - /// - public IdentResult? IdentResult { get; set; } - - /// - /// Gets or Sets FiberResult - /// - public FiberResult? FiberResult { get; set; } - - /// - /// Gets or Sets OCRSecurityTextResult - /// - public OCRSecurityTextResult? OCRSecurityTextResult { get; set; } - - /// - /// Gets or Sets PhotoIdentResult - /// - public PhotoIdentResult? PhotoIdentResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AuthenticityCheckResultListInner {\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class AuthenticityCheckResultListInnerJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AuthenticityCheckResultListInner Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - - SecurityFeatureResult? securityFeatureResult = null; - IdentResult? identResult = null; - IdentResult? identResult = null; - PhotoIdentResult? photoIdentResult = null; - IdentResult? identResult = null; - FiberResult? fiberResult = null; - FiberResult? fiberResult = null; - SecurityFeatureResult? securityFeatureResult = null; - IdentResult? identResult = null; - PhotoIdentResult? photoIdentResult = null; - IdentResult? identResult = null; - IdentResult? identResult = null; - IdentResult? identResult = null; - IdentResult? identResult = null; - SecurityFeatureResult? securityFeatureResult = null; - SecurityFeatureResult? securityFeatureResult = null; - IdentResult? identResult = null; - OCRSecurityTextResult? oCRSecurityTextResult = null; - SecurityFeatureResult? securityFeatureResult = null; - SecurityFeatureResult? securityFeatureResult = null; - SecurityFeatureResult? securityFeatureResult = null; - SecurityFeatureResult? securityFeatureResult = null; - FiberResult? fiberResult = null; - IdentResult? identResult = null; - OCRSecurityTextResult? oCRSecurityTextResult = null; - PhotoIdentResult? photoIdentResult = null; - SecurityFeatureResult? securityFeatureResult = null; - - Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; - while (utf8JsonReaderDiscriminator.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); - utf8JsonReaderDiscriminator.Read(); - if (localVarJsonPropertyName?.Equals("Type") ?? false) - { - string? discriminator = utf8JsonReaderDiscriminator.GetString(); - if (discriminator?.Equals("1") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("1024") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("1048576") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("128") ?? false) - { - Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; - photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("131072") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("16") ?? false) - { - Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; - fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); - } - if (discriminator?.Equals("16384") ?? false) - { - Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; - fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); - } - if (discriminator?.Equals("2") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("2048") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("256") ?? false) - { - Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; - photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("262144") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("32") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("32768") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("4") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("4096") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("512") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("524288") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("64") ?? false) - { - Utf8JsonReader utf8JsonReaderOCRSecurityTextResult = utf8JsonReader; - oCRSecurityTextResult = JsonSerializer.Deserialize(ref utf8JsonReaderOCRSecurityTextResult, jsonSerializerOptions); - } - if (discriminator?.Equals("65536") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("8") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("8192") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("8388608") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("FiberResult") ?? false) - { - Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; - fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); - } - if (discriminator?.Equals("IdentResult") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("OCRSecurityTextResult") ?? false) - { - Utf8JsonReader utf8JsonReaderOCRSecurityTextResult = utf8JsonReader; - oCRSecurityTextResult = JsonSerializer.Deserialize(ref utf8JsonReaderOCRSecurityTextResult, jsonSerializerOptions); - } - if (discriminator?.Equals("PhotoIdentResult") ?? false) - { - Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; - photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("SecurityFeatureResult") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - } - } - } - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckResultListInner.", nameof(type)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class AuthenticityCheckResultListInner."); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (photoIdentResult != null) - return new AuthenticityCheckResultListInner(photoIdentResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (fiberResult != null) - return new AuthenticityCheckResultListInner(fiberResult); - - if (fiberResult != null) - return new AuthenticityCheckResultListInner(fiberResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (photoIdentResult != null) - return new AuthenticityCheckResultListInner(photoIdentResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (oCRSecurityTextResult != null) - return new AuthenticityCheckResultListInner(oCRSecurityTextResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (fiberResult != null) - return new AuthenticityCheckResultListInner(fiberResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (oCRSecurityTextResult != null) - return new AuthenticityCheckResultListInner(oCRSecurityTextResult); - - if (photoIdentResult != null) - return new AuthenticityCheckResultListInner(photoIdentResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - throw new JsonException(); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - if (authenticityCheckResultListInner.SecurityFeatureResult != null) - { - SecurityFeatureResultJsonConverter securityFeatureResultJsonConverter = (SecurityFeatureResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.SecurityFeatureResult.GetType())); - securityFeatureResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.SecurityFeatureResult, jsonSerializerOptions); - } - - if (authenticityCheckResultListInner.IdentResult != null) - { - IdentResultJsonConverter identResultJsonConverter = (IdentResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.IdentResult.GetType())); - identResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.IdentResult, jsonSerializerOptions); - } - - if (authenticityCheckResultListInner.FiberResult != null) - { - FiberResultJsonConverter fiberResultJsonConverter = (FiberResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.FiberResult.GetType())); - fiberResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.FiberResult, jsonSerializerOptions); - } - - if (authenticityCheckResultListInner.OCRSecurityTextResult != null) - { - OCRSecurityTextResultJsonConverter oCRSecurityTextResultJsonConverter = (OCRSecurityTextResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.OCRSecurityTextResult.GetType())); - oCRSecurityTextResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.OCRSecurityTextResult, jsonSerializerOptions); - } - - if (authenticityCheckResultListInner.PhotoIdentResult != null) - { - PhotoIdentResultJsonConverter photoIdentResultJsonConverter = (PhotoIdentResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.PhotoIdentResult.GetType())); - photoIdentResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.PhotoIdentResult, jsonSerializerOptions); - } - - WriteProperties(writer, authenticityCheckResultListInner, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) - { - - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs index d1eb777..d71a2c0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, AuthenticityResult authentici if (authenticityResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", authenticityResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", authenticityResult.ResultType); + writer.WriteNumber("result_type", authenticityResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs index edcfa38..e25328d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs @@ -29,7 +29,7 @@ namespace Regula.DocumentReader.WebClient.Model /// Enumeration describes available authenticity checks: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/. /// /// Enumeration describes available authenticity checks: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/. - public enum AuthenticityResultType + public enum AuthenticityResultType: long { /// /// Enum NONE for value: 0 diff --git a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs index ade19a1..ad9ccf0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, ByteArrayResult byteArrayResu if (byteArrayResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", byteArrayResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", byteArrayResult.ResultType); + writer.WriteNumber("result_type", byteArrayResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs index ec6ba17..667a0c5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs @@ -236,7 +236,7 @@ public void WriteProperties(Utf8JsonWriter writer, ChosenDocumentTypeResult chos if (chosenDocumentTypeResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", chosenDocumentTypeResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", chosenDocumentTypeResult.ResultType); + writer.WriteNumber("result_type", chosenDocumentTypeResult.ResultType); if (chosenDocumentTypeResult.XMLBufferOption.IsSet) writer.WriteString("XML_buffer", chosenDocumentTypeResult.XMLBuffer); diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs deleted file mode 100644 index 4180d96..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs +++ /dev/null @@ -1,1188 +0,0 @@ -// -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.4.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// ContainerListListInner - /// - public partial class ContainerListListInner : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(StatusResult statusResult) - { - StatusResult = statusResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(TextResult textResult) - { - TextResult = textResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(DocumentImageResult documentImageResult) - { - DocumentImageResult = documentImageResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(ImagesResult imagesResult) - { - ImagesResult = imagesResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(ChosenDocumentTypeResult chosenDocumentTypeResult) - { - ChosenDocumentTypeResult = chosenDocumentTypeResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(DocumentTypesCandidatesResult documentTypesCandidatesResult) - { - DocumentTypesCandidatesResult = documentTypesCandidatesResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(TextDataResult textDataResult) - { - TextDataResult = textDataResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(GraphicsResult graphicsResult) - { - GraphicsResult = graphicsResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(LexicalAnalysisResult lexicalAnalysisResult) - { - LexicalAnalysisResult = lexicalAnalysisResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(AuthenticityResult authenticityResult) - { - AuthenticityResult = authenticityResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(ImageQualityResult imageQualityResult) - { - ImageQualityResult = imageQualityResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(DocumentPositionResult documentPositionResult) - { - DocumentPositionResult = documentPositionResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(DocBarCodeInfo docBarCodeInfo) - { - DocBarCodeInfo = docBarCodeInfo; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(LicenseResult licenseResult) - { - LicenseResult = licenseResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(EncryptedRCLResult encryptedRCLResult) - { - EncryptedRCLResult = encryptedRCLResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(DocumentBinaryInfoResult documentBinaryInfoResult) - { - DocumentBinaryInfoResult = documentBinaryInfoResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(ByteArrayResult byteArrayResult) - { - ByteArrayResult = byteArrayResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(FaceDetectionResult faceDetectionResult) - { - FaceDetectionResult = faceDetectionResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(MRZDetectorResult mRZDetectorResult) - { - MRZDetectorResult = mRZDetectorResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(MRZPositionResult mRZPositionResult) - { - MRZPositionResult = mRZPositionResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(MRZTestQualityResult mRZTestQualityResult) - { - MRZTestQualityResult = mRZTestQualityResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(RFIDGraphicsInfoResult rFIDGraphicsInfoResult) - { - RFIDGraphicsInfoResult = rFIDGraphicsInfoResult; - OnCreated(); - } - - /// - /// Initializes a new instance of the class. - /// - /// - public ContainerListListInner(RFIDTextDataResult rFIDTextDataResult) - { - RFIDTextDataResult = rFIDTextDataResult; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets StatusResult - /// - public StatusResult? StatusResult { get; set; } - - /// - /// Gets or Sets TextResult - /// - public TextResult? TextResult { get; set; } - - /// - /// Gets or Sets DocumentImageResult - /// - public DocumentImageResult? DocumentImageResult { get; set; } - - /// - /// Gets or Sets ImagesResult - /// - public ImagesResult? ImagesResult { get; set; } - - /// - /// Gets or Sets ChosenDocumentTypeResult - /// - public ChosenDocumentTypeResult? ChosenDocumentTypeResult { get; set; } - - /// - /// Gets or Sets DocumentTypesCandidatesResult - /// - public DocumentTypesCandidatesResult? DocumentTypesCandidatesResult { get; set; } - - /// - /// Gets or Sets TextDataResult - /// - public TextDataResult? TextDataResult { get; set; } - - /// - /// Gets or Sets GraphicsResult - /// - public GraphicsResult? GraphicsResult { get; set; } - - /// - /// Gets or Sets LexicalAnalysisResult - /// - public LexicalAnalysisResult? LexicalAnalysisResult { get; set; } - - /// - /// Gets or Sets AuthenticityResult - /// - public AuthenticityResult? AuthenticityResult { get; set; } - - /// - /// Gets or Sets ImageQualityResult - /// - public ImageQualityResult? ImageQualityResult { get; set; } - - /// - /// Gets or Sets DocumentPositionResult - /// - public DocumentPositionResult? DocumentPositionResult { get; set; } - - /// - /// Gets or Sets DocBarCodeInfo - /// - public DocBarCodeInfo? DocBarCodeInfo { get; set; } - - /// - /// Gets or Sets LicenseResult - /// - public LicenseResult? LicenseResult { get; set; } - - /// - /// Gets or Sets EncryptedRCLResult - /// - public EncryptedRCLResult? EncryptedRCLResult { get; set; } - - /// - /// Gets or Sets DocumentBinaryInfoResult - /// - public DocumentBinaryInfoResult? DocumentBinaryInfoResult { get; set; } - - /// - /// Gets or Sets ByteArrayResult - /// - public ByteArrayResult? ByteArrayResult { get; set; } - - /// - /// Gets or Sets FaceDetectionResult - /// - public FaceDetectionResult? FaceDetectionResult { get; set; } - - /// - /// Gets or Sets MRZDetectorResult - /// - public MRZDetectorResult? MRZDetectorResult { get; set; } - - /// - /// Gets or Sets MRZPositionResult - /// - public MRZPositionResult? MRZPositionResult { get; set; } - - /// - /// Gets or Sets MRZTestQualityResult - /// - public MRZTestQualityResult? MRZTestQualityResult { get; set; } - - /// - /// Gets or Sets RFIDGraphicsInfoResult - /// - public RFIDGraphicsInfoResult? RFIDGraphicsInfoResult { get; set; } - - /// - /// Gets or Sets RFIDTextDataResult - /// - public RFIDTextDataResult? RFIDTextDataResult { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ContainerListListInner {\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class ContainerListListInnerJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ContainerListListInner Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option resultType = default; - - DocumentImageResult? documentImageResult = null; - DocumentBinaryInfoResult? documentBinaryInfoResult = null; - RFIDTextDataResult? rFIDTextDataResult = null; - GraphicsResult? graphicsResult = null; - DocumentBinaryInfoResult? documentBinaryInfoResult = null; - RFIDGraphicsInfoResult? rFIDGraphicsInfoResult = null; - ByteArrayResult? byteArrayResult = null; - LexicalAnalysisResult? lexicalAnalysisResult = null; - DocumentImageResult? documentImageResult = null; - TextDataResult? textDataResult = null; - TextDataResult? textDataResult = null; - GraphicsResult? graphicsResult = null; - AuthenticityResult? authenticityResult = null; - TextDataResult? textDataResult = null; - TextDataResult? textDataResult = null; - ImageQualityResult? imageQualityResult = null; - GraphicsResult? graphicsResult = null; - StatusResult? statusResult = null; - AuthenticityResult? authenticityResult = null; - GraphicsResult? graphicsResult = null; - TextResult? textResult = null; - ImagesResult? imagesResult = null; - GraphicsResult? graphicsResult = null; - AuthenticityResult? authenticityResult = null; - EncryptedRCLResult? encryptedRCLResult = null; - DocBarCodeInfo? docBarCodeInfo = null; - LicenseResult? licenseResult = null; - GraphicsResult? graphicsResult = null; - MRZPositionResult? mRZPositionResult = null; - DocumentPositionResult? documentPositionResult = null; - MRZTestQualityResult? mRZTestQualityResult = null; - DocumentTypesCandidatesResult? documentTypesCandidatesResult = null; - DocumentPositionResult? documentPositionResult = null; - MRZDetectorResult? mRZDetectorResult = null; - ChosenDocumentTypeResult? chosenDocumentTypeResult = null; - FaceDetectionResult? faceDetectionResult = null; - AuthenticityResult? authenticityResult = null; - ByteArrayResult? byteArrayResult = null; - ChosenDocumentTypeResult? chosenDocumentTypeResult = null; - DocBarCodeInfo? docBarCodeInfo = null; - DocumentBinaryInfoResult? documentBinaryInfoResult = null; - DocumentImageResult? documentImageResult = null; - DocumentPositionResult? documentPositionResult = null; - DocumentTypesCandidatesResult? documentTypesCandidatesResult = null; - EncryptedRCLResult? encryptedRCLResult = null; - FaceDetectionResult? faceDetectionResult = null; - GraphicsResult? graphicsResult = null; - ImageQualityResult? imageQualityResult = null; - ImagesResult? imagesResult = null; - LexicalAnalysisResult? lexicalAnalysisResult = null; - LicenseResult? licenseResult = null; - MRZDetectorResult? mRZDetectorResult = null; - MRZPositionResult? mRZPositionResult = null; - MRZTestQualityResult? mRZTestQualityResult = null; - RFIDGraphicsInfoResult? rFIDGraphicsInfoResult = null; - RFIDTextDataResult? rFIDTextDataResult = null; - StatusResult? statusResult = null; - TextDataResult? textDataResult = null; - TextResult? textResult = null; - - Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; - while (utf8JsonReaderDiscriminator.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); - utf8JsonReaderDiscriminator.Read(); - if (localVarJsonPropertyName?.Equals("result_type") ?? false) - { - string? discriminator = utf8JsonReaderDiscriminator.GetString(); - if (discriminator?.Equals("1") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; - documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); - } - if (discriminator?.Equals("101") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; - documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("102") ?? false) - { - Utf8JsonReader utf8JsonReaderRFIDTextDataResult = utf8JsonReader; - rFIDTextDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("103") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("104") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; - documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("105") ?? false) - { - Utf8JsonReader utf8JsonReaderRFIDGraphicsInfoResult = utf8JsonReader; - rFIDGraphicsInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDGraphicsInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("109") ?? false) - { - Utf8JsonReader utf8JsonReaderByteArrayResult = utf8JsonReader; - byteArrayResult = JsonSerializer.Deserialize(ref utf8JsonReaderByteArrayResult, jsonSerializerOptions); - } - if (discriminator?.Equals("15") ?? false) - { - Utf8JsonReader utf8JsonReaderLexicalAnalysisResult = utf8JsonReader; - lexicalAnalysisResult = JsonSerializer.Deserialize(ref utf8JsonReaderLexicalAnalysisResult, jsonSerializerOptions); - } - if (discriminator?.Equals("16") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; - documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); - } - if (discriminator?.Equals("17") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("18") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("19") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("20") ?? false) - { - Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; - authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("26") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("3") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("30") ?? false) - { - Utf8JsonReader utf8JsonReaderImageQualityResult = utf8JsonReader; - imageQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderImageQualityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("32") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("33") ?? false) - { - Utf8JsonReader utf8JsonReaderStatusResult = utf8JsonReader; - statusResult = JsonSerializer.Deserialize(ref utf8JsonReaderStatusResult, jsonSerializerOptions); - } - if (discriminator?.Equals("34") ?? false) - { - Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; - authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("35") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("36") ?? false) - { - Utf8JsonReader utf8JsonReaderTextResult = utf8JsonReader; - textResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextResult, jsonSerializerOptions); - } - if (discriminator?.Equals("37") ?? false) - { - Utf8JsonReader utf8JsonReaderImagesResult = utf8JsonReader; - imagesResult = JsonSerializer.Deserialize(ref utf8JsonReaderImagesResult, jsonSerializerOptions); - } - if (discriminator?.Equals("38") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("39") ?? false) - { - Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; - authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("49") ?? false) - { - Utf8JsonReader utf8JsonReaderEncryptedRCLResult = utf8JsonReader; - encryptedRCLResult = JsonSerializer.Deserialize(ref utf8JsonReaderEncryptedRCLResult, jsonSerializerOptions); - } - if (discriminator?.Equals("5") ?? false) - { - Utf8JsonReader utf8JsonReaderDocBarCodeInfo = utf8JsonReader; - docBarCodeInfo = JsonSerializer.Deserialize(ref utf8JsonReaderDocBarCodeInfo, jsonSerializerOptions); - } - if (discriminator?.Equals("50") ?? false) - { - Utf8JsonReader utf8JsonReaderLicenseResult = utf8JsonReader; - licenseResult = JsonSerializer.Deserialize(ref utf8JsonReaderLicenseResult, jsonSerializerOptions); - } - if (discriminator?.Equals("6") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("61") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZPositionResult = utf8JsonReader; - mRZPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("62") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; - documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("7") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZTestQualityResult = utf8JsonReader; - mRZTestQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZTestQualityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("8") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentTypesCandidatesResult = utf8JsonReader; - documentTypesCandidatesResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentTypesCandidatesResult, jsonSerializerOptions); - } - if (discriminator?.Equals("85") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; - documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("87") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZDetectorResult = utf8JsonReader; - mRZDetectorResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZDetectorResult, jsonSerializerOptions); - } - if (discriminator?.Equals("9") ?? false) - { - Utf8JsonReader utf8JsonReaderChosenDocumentTypeResult = utf8JsonReader; - chosenDocumentTypeResult = JsonSerializer.Deserialize(ref utf8JsonReaderChosenDocumentTypeResult, jsonSerializerOptions); - } - if (discriminator?.Equals("97") ?? false) - { - Utf8JsonReader utf8JsonReaderFaceDetectionResult = utf8JsonReader; - faceDetectionResult = JsonSerializer.Deserialize(ref utf8JsonReaderFaceDetectionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("AuthenticityResult") ?? false) - { - Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; - authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("ByteArrayResult") ?? false) - { - Utf8JsonReader utf8JsonReaderByteArrayResult = utf8JsonReader; - byteArrayResult = JsonSerializer.Deserialize(ref utf8JsonReaderByteArrayResult, jsonSerializerOptions); - } - if (discriminator?.Equals("ChosenDocumentTypeResult") ?? false) - { - Utf8JsonReader utf8JsonReaderChosenDocumentTypeResult = utf8JsonReader; - chosenDocumentTypeResult = JsonSerializer.Deserialize(ref utf8JsonReaderChosenDocumentTypeResult, jsonSerializerOptions); - } - if (discriminator?.Equals("DocBarCodeInfo") ?? false) - { - Utf8JsonReader utf8JsonReaderDocBarCodeInfo = utf8JsonReader; - docBarCodeInfo = JsonSerializer.Deserialize(ref utf8JsonReaderDocBarCodeInfo, jsonSerializerOptions); - } - if (discriminator?.Equals("DocumentBinaryInfoResult") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; - documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("DocumentImageResult") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; - documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); - } - if (discriminator?.Equals("DocumentPositionResult") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; - documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("DocumentTypesCandidatesResult") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentTypesCandidatesResult = utf8JsonReader; - documentTypesCandidatesResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentTypesCandidatesResult, jsonSerializerOptions); - } - if (discriminator?.Equals("EncryptedRCLResult") ?? false) - { - Utf8JsonReader utf8JsonReaderEncryptedRCLResult = utf8JsonReader; - encryptedRCLResult = JsonSerializer.Deserialize(ref utf8JsonReaderEncryptedRCLResult, jsonSerializerOptions); - } - if (discriminator?.Equals("FaceDetectionResult") ?? false) - { - Utf8JsonReader utf8JsonReaderFaceDetectionResult = utf8JsonReader; - faceDetectionResult = JsonSerializer.Deserialize(ref utf8JsonReaderFaceDetectionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("GraphicsResult") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("ImageQualityResult") ?? false) - { - Utf8JsonReader utf8JsonReaderImageQualityResult = utf8JsonReader; - imageQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderImageQualityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("ImagesResult") ?? false) - { - Utf8JsonReader utf8JsonReaderImagesResult = utf8JsonReader; - imagesResult = JsonSerializer.Deserialize(ref utf8JsonReaderImagesResult, jsonSerializerOptions); - } - if (discriminator?.Equals("LexicalAnalysisResult") ?? false) - { - Utf8JsonReader utf8JsonReaderLexicalAnalysisResult = utf8JsonReader; - lexicalAnalysisResult = JsonSerializer.Deserialize(ref utf8JsonReaderLexicalAnalysisResult, jsonSerializerOptions); - } - if (discriminator?.Equals("LicenseResult") ?? false) - { - Utf8JsonReader utf8JsonReaderLicenseResult = utf8JsonReader; - licenseResult = JsonSerializer.Deserialize(ref utf8JsonReaderLicenseResult, jsonSerializerOptions); - } - if (discriminator?.Equals("MRZDetectorResult") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZDetectorResult = utf8JsonReader; - mRZDetectorResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZDetectorResult, jsonSerializerOptions); - } - if (discriminator?.Equals("MRZPositionResult") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZPositionResult = utf8JsonReader; - mRZPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("MRZTestQualityResult") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZTestQualityResult = utf8JsonReader; - mRZTestQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZTestQualityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("RFIDGraphicsInfoResult") ?? false) - { - Utf8JsonReader utf8JsonReaderRFIDGraphicsInfoResult = utf8JsonReader; - rFIDGraphicsInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDGraphicsInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("RFIDTextDataResult") ?? false) - { - Utf8JsonReader utf8JsonReaderRFIDTextDataResult = utf8JsonReader; - rFIDTextDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("StatusResult") ?? false) - { - Utf8JsonReader utf8JsonReaderStatusResult = utf8JsonReader; - statusResult = JsonSerializer.Deserialize(ref utf8JsonReaderStatusResult, jsonSerializerOptions); - } - if (discriminator?.Equals("TextDataResult") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("TextResult") ?? false) - { - Utf8JsonReader utf8JsonReaderTextResult = utf8JsonReader; - textResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextResult, jsonSerializerOptions); - } - } - } - } - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class ContainerListListInner.", nameof(resultType)); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ContainerListListInner."); - - if (documentImageResult != null) - return new ContainerListListInner(documentImageResult); - - if (documentBinaryInfoResult != null) - return new ContainerListListInner(documentBinaryInfoResult); - - if (rFIDTextDataResult != null) - return new ContainerListListInner(rFIDTextDataResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (documentBinaryInfoResult != null) - return new ContainerListListInner(documentBinaryInfoResult); - - if (rFIDGraphicsInfoResult != null) - return new ContainerListListInner(rFIDGraphicsInfoResult); - - if (byteArrayResult != null) - return new ContainerListListInner(byteArrayResult); - - if (lexicalAnalysisResult != null) - return new ContainerListListInner(lexicalAnalysisResult); - - if (documentImageResult != null) - return new ContainerListListInner(documentImageResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (authenticityResult != null) - return new ContainerListListInner(authenticityResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (imageQualityResult != null) - return new ContainerListListInner(imageQualityResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (statusResult != null) - return new ContainerListListInner(statusResult); - - if (authenticityResult != null) - return new ContainerListListInner(authenticityResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (textResult != null) - return new ContainerListListInner(textResult); - - if (imagesResult != null) - return new ContainerListListInner(imagesResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (authenticityResult != null) - return new ContainerListListInner(authenticityResult); - - if (encryptedRCLResult != null) - return new ContainerListListInner(encryptedRCLResult); - - if (docBarCodeInfo != null) - return new ContainerListListInner(docBarCodeInfo); - - if (licenseResult != null) - return new ContainerListListInner(licenseResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (mRZPositionResult != null) - return new ContainerListListInner(mRZPositionResult); - - if (documentPositionResult != null) - return new ContainerListListInner(documentPositionResult); - - if (mRZTestQualityResult != null) - return new ContainerListListInner(mRZTestQualityResult); - - if (documentTypesCandidatesResult != null) - return new ContainerListListInner(documentTypesCandidatesResult); - - if (documentPositionResult != null) - return new ContainerListListInner(documentPositionResult); - - if (mRZDetectorResult != null) - return new ContainerListListInner(mRZDetectorResult); - - if (chosenDocumentTypeResult != null) - return new ContainerListListInner(chosenDocumentTypeResult); - - if (faceDetectionResult != null) - return new ContainerListListInner(faceDetectionResult); - - if (authenticityResult != null) - return new ContainerListListInner(authenticityResult); - - if (byteArrayResult != null) - return new ContainerListListInner(byteArrayResult); - - if (chosenDocumentTypeResult != null) - return new ContainerListListInner(chosenDocumentTypeResult); - - if (docBarCodeInfo != null) - return new ContainerListListInner(docBarCodeInfo); - - if (documentBinaryInfoResult != null) - return new ContainerListListInner(documentBinaryInfoResult); - - if (documentImageResult != null) - return new ContainerListListInner(documentImageResult); - - if (documentPositionResult != null) - return new ContainerListListInner(documentPositionResult); - - if (documentTypesCandidatesResult != null) - return new ContainerListListInner(documentTypesCandidatesResult); - - if (encryptedRCLResult != null) - return new ContainerListListInner(encryptedRCLResult); - - if (faceDetectionResult != null) - return new ContainerListListInner(faceDetectionResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (imageQualityResult != null) - return new ContainerListListInner(imageQualityResult); - - if (imagesResult != null) - return new ContainerListListInner(imagesResult); - - if (lexicalAnalysisResult != null) - return new ContainerListListInner(lexicalAnalysisResult); - - if (licenseResult != null) - return new ContainerListListInner(licenseResult); - - if (mRZDetectorResult != null) - return new ContainerListListInner(mRZDetectorResult); - - if (mRZPositionResult != null) - return new ContainerListListInner(mRZPositionResult); - - if (mRZTestQualityResult != null) - return new ContainerListListInner(mRZTestQualityResult); - - if (rFIDGraphicsInfoResult != null) - return new ContainerListListInner(rFIDGraphicsInfoResult); - - if (rFIDTextDataResult != null) - return new ContainerListListInner(rFIDTextDataResult); - - if (statusResult != null) - return new ContainerListListInner(statusResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (textResult != null) - return new ContainerListListInner(textResult); - - throw new JsonException(); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - if (containerListListInner.StatusResult != null) - { - StatusResultJsonConverter statusResultJsonConverter = (StatusResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.StatusResult.GetType())); - statusResultJsonConverter.WriteProperties(writer, containerListListInner.StatusResult, jsonSerializerOptions); - } - - if (containerListListInner.TextResult != null) - { - TextResultJsonConverter textResultJsonConverter = (TextResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.TextResult.GetType())); - textResultJsonConverter.WriteProperties(writer, containerListListInner.TextResult, jsonSerializerOptions); - } - - if (containerListListInner.DocumentImageResult != null) - { - DocumentImageResultJsonConverter documentImageResultJsonConverter = (DocumentImageResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentImageResult.GetType())); - documentImageResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentImageResult, jsonSerializerOptions); - } - - if (containerListListInner.ImagesResult != null) - { - ImagesResultJsonConverter imagesResultJsonConverter = (ImagesResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ImagesResult.GetType())); - imagesResultJsonConverter.WriteProperties(writer, containerListListInner.ImagesResult, jsonSerializerOptions); - } - - if (containerListListInner.ChosenDocumentTypeResult != null) - { - ChosenDocumentTypeResultJsonConverter chosenDocumentTypeResultJsonConverter = (ChosenDocumentTypeResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ChosenDocumentTypeResult.GetType())); - chosenDocumentTypeResultJsonConverter.WriteProperties(writer, containerListListInner.ChosenDocumentTypeResult, jsonSerializerOptions); - } - - if (containerListListInner.DocumentTypesCandidatesResult != null) - { - DocumentTypesCandidatesResultJsonConverter documentTypesCandidatesResultJsonConverter = (DocumentTypesCandidatesResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentTypesCandidatesResult.GetType())); - documentTypesCandidatesResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentTypesCandidatesResult, jsonSerializerOptions); - } - - if (containerListListInner.TextDataResult != null) - { - TextDataResultJsonConverter textDataResultJsonConverter = (TextDataResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.TextDataResult.GetType())); - textDataResultJsonConverter.WriteProperties(writer, containerListListInner.TextDataResult, jsonSerializerOptions); - } - - if (containerListListInner.GraphicsResult != null) - { - GraphicsResultJsonConverter graphicsResultJsonConverter = (GraphicsResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.GraphicsResult.GetType())); - graphicsResultJsonConverter.WriteProperties(writer, containerListListInner.GraphicsResult, jsonSerializerOptions); - } - - if (containerListListInner.LexicalAnalysisResult != null) - { - LexicalAnalysisResultJsonConverter lexicalAnalysisResultJsonConverter = (LexicalAnalysisResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.LexicalAnalysisResult.GetType())); - lexicalAnalysisResultJsonConverter.WriteProperties(writer, containerListListInner.LexicalAnalysisResult, jsonSerializerOptions); - } - - if (containerListListInner.AuthenticityResult != null) - { - AuthenticityResultJsonConverter authenticityResultJsonConverter = (AuthenticityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.AuthenticityResult.GetType())); - authenticityResultJsonConverter.WriteProperties(writer, containerListListInner.AuthenticityResult, jsonSerializerOptions); - } - - if (containerListListInner.ImageQualityResult != null) - { - ImageQualityResultJsonConverter imageQualityResultJsonConverter = (ImageQualityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ImageQualityResult.GetType())); - imageQualityResultJsonConverter.WriteProperties(writer, containerListListInner.ImageQualityResult, jsonSerializerOptions); - } - - if (containerListListInner.DocumentPositionResult != null) - { - DocumentPositionResultJsonConverter documentPositionResultJsonConverter = (DocumentPositionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentPositionResult.GetType())); - documentPositionResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentPositionResult, jsonSerializerOptions); - } - - if (containerListListInner.DocBarCodeInfo != null) - { - DocBarCodeInfoJsonConverter docBarCodeInfoJsonConverter = (DocBarCodeInfoJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocBarCodeInfo.GetType())); - docBarCodeInfoJsonConverter.WriteProperties(writer, containerListListInner.DocBarCodeInfo, jsonSerializerOptions); - } - - if (containerListListInner.LicenseResult != null) - { - LicenseResultJsonConverter licenseResultJsonConverter = (LicenseResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.LicenseResult.GetType())); - licenseResultJsonConverter.WriteProperties(writer, containerListListInner.LicenseResult, jsonSerializerOptions); - } - - if (containerListListInner.EncryptedRCLResult != null) - { - EncryptedRCLResultJsonConverter encryptedRCLResultJsonConverter = (EncryptedRCLResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.EncryptedRCLResult.GetType())); - encryptedRCLResultJsonConverter.WriteProperties(writer, containerListListInner.EncryptedRCLResult, jsonSerializerOptions); - } - - if (containerListListInner.DocumentBinaryInfoResult != null) - { - DocumentBinaryInfoResultJsonConverter documentBinaryInfoResultJsonConverter = (DocumentBinaryInfoResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentBinaryInfoResult.GetType())); - documentBinaryInfoResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentBinaryInfoResult, jsonSerializerOptions); - } - - if (containerListListInner.ByteArrayResult != null) - { - ByteArrayResultJsonConverter byteArrayResultJsonConverter = (ByteArrayResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ByteArrayResult.GetType())); - byteArrayResultJsonConverter.WriteProperties(writer, containerListListInner.ByteArrayResult, jsonSerializerOptions); - } - - if (containerListListInner.FaceDetectionResult != null) - { - FaceDetectionResultJsonConverter faceDetectionResultJsonConverter = (FaceDetectionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.FaceDetectionResult.GetType())); - faceDetectionResultJsonConverter.WriteProperties(writer, containerListListInner.FaceDetectionResult, jsonSerializerOptions); - } - - if (containerListListInner.MRZDetectorResult != null) - { - MRZDetectorResultJsonConverter mRZDetectorResultJsonConverter = (MRZDetectorResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZDetectorResult.GetType())); - mRZDetectorResultJsonConverter.WriteProperties(writer, containerListListInner.MRZDetectorResult, jsonSerializerOptions); - } - - if (containerListListInner.MRZPositionResult != null) - { - MRZPositionResultJsonConverter mRZPositionResultJsonConverter = (MRZPositionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZPositionResult.GetType())); - mRZPositionResultJsonConverter.WriteProperties(writer, containerListListInner.MRZPositionResult, jsonSerializerOptions); - } - - if (containerListListInner.MRZTestQualityResult != null) - { - MRZTestQualityResultJsonConverter mRZTestQualityResultJsonConverter = (MRZTestQualityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZTestQualityResult.GetType())); - mRZTestQualityResultJsonConverter.WriteProperties(writer, containerListListInner.MRZTestQualityResult, jsonSerializerOptions); - } - - if (containerListListInner.RFIDGraphicsInfoResult != null) - { - RFIDGraphicsInfoResultJsonConverter rFIDGraphicsInfoResultJsonConverter = (RFIDGraphicsInfoResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.RFIDGraphicsInfoResult.GetType())); - rFIDGraphicsInfoResultJsonConverter.WriteProperties(writer, containerListListInner.RFIDGraphicsInfoResult, jsonSerializerOptions); - } - - if (containerListListInner.RFIDTextDataResult != null) - { - RFIDTextDataResultJsonConverter rFIDTextDataResultJsonConverter = (RFIDTextDataResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.RFIDTextDataResult.GetType())); - rFIDTextDataResultJsonConverter.WriteProperties(writer, containerListListInner.RFIDTextDataResult, jsonSerializerOptions); - } - - WriteProperties(writer, containerListListInner, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) - { - - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs index 71fb091..9fabe37 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, DocBarCodeInfo docBarCodeInfo if (docBarCodeInfo.PageIdxOption.IsSet) writer.WriteNumber("page_idx", docBarCodeInfo.PageIdxOption.Value!.Value); - writer.WriteString("result_type", docBarCodeInfo.ResultType); + writer.WriteNumber("result_type", docBarCodeInfo.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs index e887e1d..73b936f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, DocumentBinaryInfoResult docu if (documentBinaryInfoResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", documentBinaryInfoResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", documentBinaryInfoResult.ResultType); + writer.WriteNumber("result_type", documentBinaryInfoResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs index df50a1a..9f8f4ed 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, DocumentImageResult documentI if (documentImageResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", documentImageResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", documentImageResult.ResultType); + writer.WriteNumber("result_type", documentImageResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs index 358fb78..3ec35da 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, DocumentPositionResult docume if (documentPositionResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", documentPositionResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", documentPositionResult.ResultType); + writer.WriteNumber("result_type", documentPositionResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs index af72c38..7172940 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs @@ -212,7 +212,7 @@ public void WriteProperties(Utf8JsonWriter writer, DocumentTypesCandidatesResult if (documentTypesCandidatesResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", documentTypesCandidatesResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", documentTypesCandidatesResult.ResultType); + writer.WriteNumber("result_type", documentTypesCandidatesResult.ResultType); if (documentTypesCandidatesResult.CandidatesListOption.IsSet) { diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index 296dd9e..888805e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs @@ -47,7 +47,7 @@ public EncryptedRCLItem(byte[] encryptedRCL) /// Base64 encoded data /// /// Base64 encoded data - /* [B@3209469d */ + /* [B@5eefd7ba */ [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs index dde2110..d86c832 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs @@ -51,7 +51,7 @@ public EncryptedRCLResult(byte[] encryptedRCL, Option bufLength = default, /// Base64 encoded data /// /// Base64 encoded data - /* [B@3209469d */ + /* [B@5eefd7ba */ [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } @@ -212,7 +212,7 @@ public void WriteProperties(Utf8JsonWriter writer, EncryptedRCLResult encryptedR if (encryptedRCLResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", encryptedRCLResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", encryptedRCLResult.ResultType); + writer.WriteNumber("result_type", encryptedRCLResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs index 9a0b1b3..3f1a3c1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs @@ -41,7 +41,7 @@ public partial class FaceApi : IValidatableObject /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. - /// Minimum age of a child, at which portrait comparison result will be effective. Default: 13. + /// The age threshold for the portrait comparison. Default: 13. /// Estimated duration of validity for a child's passport, years. Default: 5. [JsonConstructor] public FaceApi(Option url = default, Option mode = default, Option search = default, Option threshold = default, Option serviceTimeout = default, Option proxy = default, Option proxyUserpwd = default, Option proxyType = default, Option childAgeThreshold = default, Option childDocValidityYears = default) @@ -187,9 +187,9 @@ public FaceApi(Option url = default, Option mode = default, Op public Option ChildAgeThresholdOption { get; private set; } /// - /// Minimum age of a child, at which portrait comparison result will be effective. Default: 13. + /// The age threshold for the portrait comparison. Default: 13. /// - /// Minimum age of a child, at which portrait comparison result will be effective. Default: 13. + /// The age threshold for the portrait comparison. Default: 13. /* 13 */ [JsonPropertyName("childAgeThreshold")] public int? ChildAgeThreshold { get { return this.ChildAgeThresholdOption; } set { this.ChildAgeThresholdOption = new(value); } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs index fc1c3b2..e06329d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, FaceDetectionResult faceDetec if (faceDetectionResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", faceDetectionResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", faceDetectionResult.ResultType); + writer.WriteNumber("result_type", faceDetectionResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs index 6c5ecd4..67bbb1b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs @@ -393,7 +393,7 @@ public void WriteProperties(Utf8JsonWriter writer, FiberResult fiberResult, Json JsonSerializer.Serialize(writer, fiberResult.Area, jsonSerializerOptions); writer.WritePropertyName("ColorValues"); JsonSerializer.Serialize(writer, fiberResult.ColorValues, jsonSerializerOptions); - writer.WriteString("Type", fiberResult.Type); + writer.WriteNumber("Type", fiberResult.Type); if (fiberResult.ElementResultOption.IsSet) { diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs index 53f1970..2a7ff7b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, GraphicsResult graphicsResult if (graphicsResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", graphicsResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", graphicsResult.ResultType); + writer.WriteNumber("result_type", graphicsResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs index bcf7d4e..71690ca 100644 --- a/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs @@ -38,7 +38,7 @@ public partial class HealthcheckDocumentsDatabase : IValidatableObject /// Date of database creation. /// Description of the database contents, such as the list of supported countries and documents. [JsonConstructor] - public HealthcheckDocumentsDatabase(string? id = default, string? varVersion = default, DateOnly? exportDate = default, string? description = default) + public HealthcheckDocumentsDatabase(string? id = default, string? varVersion = default, string? exportDate = default, string? description = default) { Id = id; VarVersion = varVersion; @@ -68,7 +68,7 @@ public HealthcheckDocumentsDatabase(string? id = default, string? varVersion = d /// /// Date of database creation. [JsonPropertyName("exportDate")] - public DateOnly? ExportDate { get; set; } + public string? ExportDate { get; set; } /// /// Description of the database contents, such as the list of supported countries and documents. @@ -109,11 +109,6 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali /// public class HealthcheckDocumentsDatabaseJsonConverter : JsonConverter { - /// - /// The format to use to serialize ExportDate - /// - public static string ExportDateFormat { get; set; } = "yyyy'-'MM'-'dd"; - /// /// Deserializes json to /// @@ -133,7 +128,7 @@ public override HealthcheckDocumentsDatabase Read(ref Utf8JsonReader utf8JsonRea Option id = default; Option varVersion = default; - Option exportDate = default; + Option exportDate = default; Option description = default; while (utf8JsonReader.Read()) @@ -158,8 +153,7 @@ public override HealthcheckDocumentsDatabase Read(ref Utf8JsonReader utf8JsonRea varVersion = new Option(utf8JsonReader.GetString()); break; case "exportDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - exportDate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); + exportDate = new Option(utf8JsonReader.GetString()); break; case "description": description = new Option(utf8JsonReader.GetString()); @@ -220,7 +214,7 @@ public void WriteProperties(Utf8JsonWriter writer, HealthcheckDocumentsDatabase writer.WriteNull("version"); if (healthcheckDocumentsDatabase.ExportDate != null) - writer.WriteString("exportDate", healthcheckDocumentsDatabase.ExportDate.Value.ToString(ExportDateFormat)); + writer.WriteString("exportDate", healthcheckDocumentsDatabase.ExportDate); else writer.WriteNull("exportDate"); diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs index 8b56f85..725d30f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs @@ -318,7 +318,7 @@ public void WriteProperties(Utf8JsonWriter writer, IdentResult identResult, Json JsonSerializer.Serialize(writer, identResult.Image, jsonSerializerOptions); writer.WritePropertyName("EtalonImage"); JsonSerializer.Serialize(writer, identResult.EtalonImage, jsonSerializerOptions); - writer.WriteString("Type", identResult.Type); + writer.WriteNumber("Type", identResult.Type); if (identResult.ElementResultOption.IsSet) { diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs index d4bb04f..bf34467 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, ImageQualityResult imageQuali if (imageQualityResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", imageQualityResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", imageQualityResult.ResultType); + writer.WriteNumber("result_type", imageQualityResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs index a86d2c2..50c8411 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, ImagesResult imagesResult, Js if (imagesResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", imagesResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", imagesResult.ResultType); + writer.WriteNumber("result_type", imagesResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs index bb627ee..1ee1564 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, LexicalAnalysisResult lexical if (lexicalAnalysisResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", lexicalAnalysisResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", lexicalAnalysisResult.ResultType); + writer.WriteNumber("result_type", lexicalAnalysisResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs index bc34f2e..31b230f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs @@ -47,7 +47,7 @@ public LicenseItem(byte[] license) /// Base64 encoded data /// /// Base64 encoded data - /* [B@528027e0 */ + /* [B@24eabda6 */ [JsonPropertyName("License")] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs index e8f4547..f10d498 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs @@ -51,7 +51,7 @@ public LicenseResult(byte[] license, Option bufLength = default, Option /// Base64 encoded data - /* [B@528027e0 */ + /* [B@24eabda6 */ [JsonPropertyName("License")] public byte[] License { get; set; } @@ -212,7 +212,7 @@ public void WriteProperties(Utf8JsonWriter writer, LicenseResult licenseResult, if (licenseResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", licenseResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", licenseResult.ResultType); + writer.WriteNumber("result_type", licenseResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Light.cs b/src/Regula.DocumentReader.WebClient/Model/Light.cs index 1e3aef4..4b91194 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Light.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Light.cs @@ -29,7 +29,7 @@ namespace Regula.DocumentReader.WebClient.Model /// Image light index /// /// Image light index - public enum Light + public enum Light: long { /// /// Enum OFF for value: 0 diff --git a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs index ef65161..7c27597 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs @@ -38,14 +38,16 @@ public partial class LivenessParams : IValidatableObject /// This parameter is used to enable Hologram detection /// This parameter is used to enable Electronic device detection /// This parameter is used to enable Black and white copy check + /// This parameter is used to enable Dynaprint check [JsonConstructor] - public LivenessParams(Option checkOVI = default, Option checkMLI = default, Option checkHolo = default, Option checkED = default, Option checkBlackAndWhiteCopy = default) + public LivenessParams(Option checkOVI = default, Option checkMLI = default, Option checkHolo = default, Option checkED = default, Option checkBlackAndWhiteCopy = default, Option checkDynaprint = default) { CheckOVIOption = checkOVI; CheckMLIOption = checkMLI; CheckHoloOption = checkHolo; CheckEDOption = checkED; CheckBlackAndWhiteCopyOption = checkBlackAndWhiteCopy; + CheckDynaprintOption = checkDynaprint; OnCreated(); } @@ -121,6 +123,20 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = [JsonPropertyName("checkBlackAndWhiteCopy")] public bool? CheckBlackAndWhiteCopy { get { return this.CheckBlackAndWhiteCopyOption; } set { this.CheckBlackAndWhiteCopyOption = new(value); } } + /// + /// Used to track the state of CheckDynaprint + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option CheckDynaprintOption { get; private set; } + + /// + /// This parameter is used to enable Dynaprint check + /// + /// This parameter is used to enable Dynaprint check + [JsonPropertyName("checkDynaprint")] + public bool? CheckDynaprint { get { return this.CheckDynaprintOption; } set { this.CheckDynaprintOption = new(value); } } + /// /// Returns the string presentation of the object /// @@ -134,6 +150,7 @@ public override string ToString() sb.Append(" CheckHolo: ").Append(CheckHolo).Append("\n"); sb.Append(" CheckED: ").Append(CheckED).Append("\n"); sb.Append(" CheckBlackAndWhiteCopy: ").Append(CheckBlackAndWhiteCopy).Append("\n"); + sb.Append(" CheckDynaprint: ").Append(CheckDynaprint).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -176,6 +193,7 @@ public override LivenessParams Read(ref Utf8JsonReader utf8JsonReader, Type type Option checkHolo = default; Option checkED = default; Option checkBlackAndWhiteCopy = default; + Option checkDynaprint = default; while (utf8JsonReader.Read()) { @@ -212,6 +230,10 @@ public override LivenessParams Read(ref Utf8JsonReader utf8JsonReader, Type type if (utf8JsonReader.TokenType != JsonTokenType.Null) checkBlackAndWhiteCopy = new Option(utf8JsonReader.GetBoolean()); break; + case "checkDynaprint": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + checkDynaprint = new Option(utf8JsonReader.GetBoolean()); + break; default: break; } @@ -233,7 +255,10 @@ public override LivenessParams Read(ref Utf8JsonReader utf8JsonReader, Type type if (checkBlackAndWhiteCopy.IsSet && checkBlackAndWhiteCopy.Value == null) throw new ArgumentNullException(nameof(checkBlackAndWhiteCopy), "Property is not nullable for class LivenessParams."); - return new LivenessParams(checkOVI, checkMLI, checkHolo, checkED, checkBlackAndWhiteCopy); + if (checkDynaprint.IsSet && checkDynaprint.Value == null) + throw new ArgumentNullException(nameof(checkDynaprint), "Property is not nullable for class LivenessParams."); + + return new LivenessParams(checkOVI, checkMLI, checkHolo, checkED, checkBlackAndWhiteCopy, checkDynaprint); } /// @@ -274,6 +299,9 @@ public void WriteProperties(Utf8JsonWriter writer, LivenessParams livenessParams if (livenessParams.CheckBlackAndWhiteCopyOption.IsSet) writer.WriteBoolean("checkBlackAndWhiteCopy", livenessParams.CheckBlackAndWhiteCopyOption.Value!.Value); + + if (livenessParams.CheckDynaprintOption.IsSet) + writer.WriteBoolean("checkDynaprint", livenessParams.CheckDynaprintOption.Value!.Value); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs index 3f3321a..2142d45 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, MRZDetectorResult mRZDetector if (mRZDetectorResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", mRZDetectorResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", mRZDetectorResult.ResultType); + writer.WriteNumber("result_type", mRZDetectorResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs index 6cec704..112b0ac 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, MRZPositionResult mRZPosition if (mRZPositionResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", mRZPositionResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", mRZPositionResult.ResultType); + writer.WriteNumber("result_type", mRZPositionResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs index d0b9140..8a4a749 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, MRZTestQualityResult mRZTestQ if (mRZTestQualityResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", mRZTestQualityResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", mRZTestQualityResult.ResultType); + writer.WriteNumber("result_type", mRZTestQualityResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs index 1fb71a2..f71b39c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs @@ -426,7 +426,7 @@ public void WriteProperties(Utf8JsonWriter writer, OCRSecurityTextResult oCRSecu writer.WriteString("EtalonResultOCR", oCRSecurityTextResult.EtalonResultOCR); - writer.WriteString("Type", oCRSecurityTextResult.Type); + writer.WriteNumber("Type", oCRSecurityTextResult.Type); if (oCRSecurityTextResult.ElementResultOption.IsSet) { diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs b/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs index 17c9d1a..35585df 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs @@ -29,7 +29,7 @@ namespace Regula.DocumentReader.WebClient.Model /// The enumeration contains possible values of notification codes returned during the RFID chip processing. /// /// The enumeration contains possible values of notification codes returned during the RFID chip processing. - public enum ParsingNotificationCodes + public enum ParsingNotificationCodes: long { /// /// Enum ntfLDS_ASN_Certificate_IncorrectVersion for value: 2415919105 diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs index f24abdf..4c1247c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs @@ -436,7 +436,7 @@ public void WriteProperties(Utf8JsonWriter writer, PhotoIdentResult photoIdentRe JsonSerializer.Serialize(writer, photoIdentResult.SourceImage, jsonSerializerOptions); writer.WritePropertyName("ResultImages"); JsonSerializer.Serialize(writer, photoIdentResult.ResultImages, jsonSerializerOptions); - writer.WriteString("Type", photoIdentResult.Type); + writer.WriteNumber("Type", photoIdentResult.Type); if (photoIdentResult.ElementResultOption.IsSet) { diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs index 18b7aa3..8cf8e23 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs @@ -29,7 +29,7 @@ namespace Regula.DocumentReader.WebClient.Model /// Enumeration contains a set of error codes returned by SDK /// /// Enumeration contains a set of error codes returned by SDK - public enum RFIDErrorCodes + public enum RFIDErrorCodes: long { /// /// Enum RFID_ERROR_LAYER6_FILE_EOF1 for value: 2147508866 diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs index c2ee226..7280761 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, RFIDGraphicsInfoResult rFIDGr if (rFIDGraphicsInfoResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", rFIDGraphicsInfoResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", rFIDGraphicsInfoResult.ResultType); + writer.WriteNumber("result_type", rFIDGraphicsInfoResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs index 1fb6560..08e2b43 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, RFIDTextDataResult rFIDTextDa if (rFIDTextDataResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", rFIDTextDataResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", rFIDTextDataResult.ResultType); + writer.WriteNumber("result_type", rFIDTextDataResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs index 832a8ab..93adab8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs @@ -44,7 +44,7 @@ public ResultItem(Option bufLength = default, Option light = default LightOption = light; ListIdxOption = listIdx; PageIdxOption = pageIdx; - ResultType = this.GetType().Name; + ResultType = 0; OnCreated(); } @@ -176,74 +176,78 @@ public override ResultItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo string? discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "result_type"); - if (discriminator != null && discriminator.Equals("AuthenticityResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("ByteArrayResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("ChosenDocumentTypeResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("DocBarCodeInfo")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("DocumentBinaryInfoResult")) + if (discriminator != null && discriminator.Equals("1")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("101")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("DocumentImageResult")) + if (discriminator != null && discriminator.Equals("102")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("103")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("104")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("105")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("109")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("15")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("16")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("DocumentPositionResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("DocumentTypesCandidatesResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("EncryptedRCLResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("FaceDetectionResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("GraphicsResult")) + if (discriminator != null && discriminator.Equals("17")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("18")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("19")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("ImageQualityResult")) + if (discriminator != null && discriminator.Equals("20")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("26")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("3")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("30")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("ImagesResult")) + if (discriminator != null && discriminator.Equals("32")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("33")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("34")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("35")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("36")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("37")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("LexicalAnalysisResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("LicenseResult")) + if (discriminator != null && discriminator.Equals("38")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("39")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("49")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("5")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("50")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("MRZDetectorResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("MRZPositionResult")) + if (discriminator != null && discriminator.Equals("6")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("61")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("MRZTestQualityResult")) + if (discriminator != null && discriminator.Equals("62")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("7")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("RFIDGraphicsInfoResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("RFIDTextDataResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("StatusResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("TextDataResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - - if (discriminator != null && discriminator.Equals("TextResult")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("8")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("85")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("87")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("9")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); + if (discriminator != null && discriminator.Equals("97")) + return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); while (utf8JsonReader.Read()) { @@ -458,7 +462,7 @@ public void WriteProperties(Utf8JsonWriter writer, ResultItem resultItem, JsonSe if (resultItem.PageIdxOption.IsSet) writer.WriteNumber("page_idx", resultItem.PageIdxOption.Value!.Value); - writer.WriteString("result_type", resultItem.ResultType); + writer.WriteNumber("result_type", resultItem.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs index 71508fd..3d240bd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs @@ -314,7 +314,7 @@ public void WriteProperties(Utf8JsonWriter writer, SecurityFeatureResult securit var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(securityFeatureResult.CriticalFlag); writer.WriteNumber("CriticalFlag", criticalFlagRawValue); - writer.WriteString("Type", securityFeatureResult.Type); + writer.WriteNumber("Type", securityFeatureResult.Type); if (securityFeatureResult.ElementResultOption.IsSet) { diff --git a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs index bcbeb38..8b71e45 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, StatusResult statusResult, Js if (statusResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", statusResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", statusResult.ResultType); + writer.WriteNumber("result_type", statusResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs index a6ff408..74b321e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, TextDataResult textDataResult if (textDataResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", textDataResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", textDataResult.ResultType); + writer.WriteNumber("result_type", textDataResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs index 4db8bad..201fdfb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs @@ -3238,7 +3238,17 @@ public enum TextFieldType /// /// Enum EF_CARD_ACCESS for value: 692 /// - EF_CARD_ACCESS = 692 + EF_CARD_ACCESS = 692, + + /// + /// Enum SHORT_FLIGHT_NUMBER for value: 693 + /// + SHORT_FLIGHT_NUMBER = 693, + + /// + /// Enum AIRLINE_CODE for value: 694 + /// + AIRLINE_CODE = 694 } /// @@ -5179,6 +5189,12 @@ public static TextFieldType FromString(string value) if (value.Equals((692).ToString())) return TextFieldType.EF_CARD_ACCESS; + if (value.Equals((693).ToString())) + return TextFieldType.SHORT_FLIGHT_NUMBER; + + if (value.Equals((694).ToString())) + return TextFieldType.AIRLINE_CODE; + throw new NotImplementedException($"Could not convert value to type TextFieldType: '{value}'"); } @@ -7115,6 +7131,12 @@ public static TextFieldType FromString(string value) if (value.Equals((692).ToString())) return TextFieldType.EF_CARD_ACCESS; + if (value.Equals((693).ToString())) + return TextFieldType.SHORT_FLIGHT_NUMBER; + + if (value.Equals((694).ToString())) + return TextFieldType.AIRLINE_CODE; + return null; } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs index fcfdcb6..fd524ba 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs @@ -210,7 +210,7 @@ public void WriteProperties(Utf8JsonWriter writer, TextResult textResult, JsonSe if (textResult.PageIdxOption.IsSet) writer.WriteNumber("page_idx", textResult.PageIdxOption.Value!.Value); - writer.WriteString("result_type", textResult.ResultType); + writer.WriteNumber("result_type", textResult.ResultType); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs deleted file mode 100644 index 78ad809..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponse.cs +++ /dev/null @@ -1,288 +0,0 @@ -// -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.4.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// TransactionProcessResponse - /// - public partial class TransactionProcessResponse : ProcessResponse, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// chipPage - /// coreLibResultCode - /// processingFinished - /// containerList - /// transactionInfo - /// morePagesAvailable - /// Time the document processing has taken, ms. - /// Base64 encoded transaction processing log - /// Free-form object provided in request. See passBackObject property of ProcessRequest. - /// metadata - [JsonConstructor] - public TransactionProcessResponse(RfidLocation chipPage, int coreLibResultCode, ProcessingStatus processingFinished, ContainerList containerList, TransactionInfo transactionInfo, int morePagesAvailable, int elapsedTime, Option log = default, Option?> passBackObject = default, Option?> metadata = default) : base(chipPage, coreLibResultCode, processingFinished, containerList, transactionInfo, morePagesAvailable, elapsedTime, log, passBackObject, metadata) - { - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionProcessResponse {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); - sb.Append(" CoreLibResultCode: ").Append(CoreLibResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - } - - /// - /// A Json converter for type - /// - public class TransactionProcessResponseJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TransactionProcessResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option chipPage = default; - Option coreLibResultCode = default; - Option processingFinished = default; - Option containerList = default; - Option transactionInfo = default; - Option morePagesAvailable = default; - Option elapsedTime = default; - Option log = default; - Option?> passBackObject = default; - Option?> metadata = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ChipPage": - string? chipPageRawValue = utf8JsonReader.GetString(); - if (chipPageRawValue != null) - chipPage = new Option(RfidLocationValueConverter.FromStringOrDefault(chipPageRawValue)); - break; - case "CoreLibResultCode": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - coreLibResultCode = new Option(utf8JsonReader.GetInt32()); - break; - case "ProcessingFinished": - string? processingFinishedRawValue = utf8JsonReader.GetString(); - if (processingFinishedRawValue != null) - processingFinished = new Option(ProcessingStatusValueConverter.FromStringOrDefault(processingFinishedRawValue)); - break; - case "ContainerList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - containerList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "TransactionInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - transactionInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "morePagesAvailable": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - morePagesAvailable = new Option(utf8JsonReader.GetInt32()); - break; - case "elapsedTime": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - elapsedTime = new Option(utf8JsonReader.GetInt32()); - break; - case "log": - log = new Option(utf8JsonReader.GetString()!); - break; - case "passBackObject": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - passBackObject = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "metadata": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!chipPage.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(chipPage)); - - if (!coreLibResultCode.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(coreLibResultCode)); - - if (!processingFinished.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(processingFinished)); - - if (!containerList.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(containerList)); - - if (!transactionInfo.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(transactionInfo)); - - if (!morePagesAvailable.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(morePagesAvailable)); - - if (!elapsedTime.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessResponse.", nameof(elapsedTime)); - - if (chipPage.IsSet && chipPage.Value == null) - throw new ArgumentNullException(nameof(chipPage), "Property is not nullable for class TransactionProcessResponse."); - - if (coreLibResultCode.IsSet && coreLibResultCode.Value == null) - throw new ArgumentNullException(nameof(coreLibResultCode), "Property is not nullable for class TransactionProcessResponse."); - - if (processingFinished.IsSet && processingFinished.Value == null) - throw new ArgumentNullException(nameof(processingFinished), "Property is not nullable for class TransactionProcessResponse."); - - if (containerList.IsSet && containerList.Value == null) - throw new ArgumentNullException(nameof(containerList), "Property is not nullable for class TransactionProcessResponse."); - - if (transactionInfo.IsSet && transactionInfo.Value == null) - throw new ArgumentNullException(nameof(transactionInfo), "Property is not nullable for class TransactionProcessResponse."); - - if (morePagesAvailable.IsSet && morePagesAvailable.Value == null) - throw new ArgumentNullException(nameof(morePagesAvailable), "Property is not nullable for class TransactionProcessResponse."); - - if (elapsedTime.IsSet && elapsedTime.Value == null) - throw new ArgumentNullException(nameof(elapsedTime), "Property is not nullable for class TransactionProcessResponse."); - - if (log.IsSet && log.Value == null) - throw new ArgumentNullException(nameof(log), "Property is not nullable for class TransactionProcessResponse."); - - if (passBackObject.IsSet && passBackObject.Value == null) - throw new ArgumentNullException(nameof(passBackObject), "Property is not nullable for class TransactionProcessResponse."); - - if (metadata.IsSet && metadata.Value == null) - throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class TransactionProcessResponse."); - - return new TransactionProcessResponse(chipPage.Value!.Value!, coreLibResultCode.Value!.Value!, processingFinished.Value!.Value!, containerList.Value!, transactionInfo.Value!, morePagesAvailable.Value!.Value!, elapsedTime.Value!.Value!, log, passBackObject, metadata); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TransactionProcessResponse transactionProcessResponse, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, transactionProcessResponse, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TransactionProcessResponse transactionProcessResponse, JsonSerializerOptions jsonSerializerOptions) - { - if (transactionProcessResponse.ContainerList == null) - throw new ArgumentNullException(nameof(transactionProcessResponse.ContainerList), "Property is required for class TransactionProcessResponse."); - - if (transactionProcessResponse.TransactionInfo == null) - throw new ArgumentNullException(nameof(transactionProcessResponse.TransactionInfo), "Property is required for class TransactionProcessResponse."); - - if (transactionProcessResponse.LogOption.IsSet && transactionProcessResponse.Log == null) - throw new ArgumentNullException(nameof(transactionProcessResponse.Log), "Property is required for class TransactionProcessResponse."); - - if (transactionProcessResponse.PassBackObjectOption.IsSet && transactionProcessResponse.PassBackObject == null) - throw new ArgumentNullException(nameof(transactionProcessResponse.PassBackObject), "Property is required for class TransactionProcessResponse."); - - if (transactionProcessResponse.MetadataOption.IsSet && transactionProcessResponse.Metadata == null) - throw new ArgumentNullException(nameof(transactionProcessResponse.Metadata), "Property is required for class TransactionProcessResponse."); - - var chipPageRawValue = RfidLocationValueConverter.ToJsonValue(transactionProcessResponse.ChipPage); - writer.WriteNumber("ChipPage", chipPageRawValue); - - writer.WriteNumber("CoreLibResultCode", transactionProcessResponse.CoreLibResultCode); - - var processingFinishedRawValue = ProcessingStatusValueConverter.ToJsonValue(transactionProcessResponse.ProcessingFinished); - writer.WriteNumber("ProcessingFinished", processingFinishedRawValue); - - writer.WritePropertyName("ContainerList"); - JsonSerializer.Serialize(writer, transactionProcessResponse.ContainerList, jsonSerializerOptions); - writer.WritePropertyName("TransactionInfo"); - JsonSerializer.Serialize(writer, transactionProcessResponse.TransactionInfo, jsonSerializerOptions); - writer.WriteNumber("morePagesAvailable", transactionProcessResponse.MorePagesAvailable); - - writer.WriteNumber("elapsedTime", transactionProcessResponse.ElapsedTime); - - if (transactionProcessResponse.LogOption.IsSet) - writer.WriteString("log", transactionProcessResponse.Log); - - if (transactionProcessResponse.PassBackObjectOption.IsSet) - { - writer.WritePropertyName("passBackObject"); - JsonSerializer.Serialize(writer, transactionProcessResponse.PassBackObject, jsonSerializerOptions); - } - if (transactionProcessResponse.MetadataOption.IsSet) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, transactionProcessResponse.Metadata, jsonSerializerOptions); - } - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs deleted file mode 100644 index 0142cf9..0000000 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResponseItem.cs +++ /dev/null @@ -1,161 +0,0 @@ -// -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.4.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; - -namespace Regula.DocumentReader.WebClient.Model -{ - /// - /// TransactionProcessResponseItem - /// - public partial class TransactionProcessResponseItem : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// coreLibResultCode - [JsonConstructor] - public TransactionProcessResponseItem(int coreLibResultCode) - { - CoreLibResultCode = coreLibResultCode; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets CoreLibResultCode - /// - [JsonPropertyName("CoreLibResultCode")] - public int CoreLibResultCode { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TransactionProcessResponseItem {\n"); - sb.Append(" CoreLibResultCode: ").Append(CoreLibResultCode).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class TransactionProcessResponseItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TransactionProcessResponseItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option coreLibResultCode = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "CoreLibResultCode": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - coreLibResultCode = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!coreLibResultCode.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessResponseItem.", nameof(coreLibResultCode)); - - if (coreLibResultCode.IsSet && coreLibResultCode.Value == null) - throw new ArgumentNullException(nameof(coreLibResultCode), "Property is not nullable for class TransactionProcessResponseItem."); - - return new TransactionProcessResponseItem(coreLibResultCode.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TransactionProcessResponseItem transactionProcessResponseItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, transactionProcessResponseItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TransactionProcessResponseItem transactionProcessResponseItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("CoreLibResultCode", transactionProcessResponseItem.CoreLibResultCode); - } - } -} diff --git a/update-models.sh b/update-models.sh index 40e47ae..e45c062 100755 --- a/update-models.sh +++ b/update-models.sh @@ -9,4 +9,5 @@ openapitools/openapi-generator-cli:v7.12.0 generate \ -g csharp \ -i /definitions/index.yml \ -o /client/ --openapi-normalizer REF_AS_PARENT_IN_ALLOF=true \ +-t /client/generator-templates \ -c /client/csharp-generator-config.json || exit 1 \ No newline at end of file From 5cd4d2e21b757f63b2b477de71c8d72511d4723c Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Fri, 21 Mar 2025 17:01:57 +0300 Subject: [PATCH 03/12] Update templates --- .openapi-generator-ignore | 3 +- .openapi-generator/FILES | 4 +- csharp-generator-config.json | 1 + generator-templates/JsonConverter.mustache | 13 +- .../Api/HealthcheckApi.cs | 30 +- .../Api/ProcessApi.cs | 12 +- .../Api/TransactionApi.cs | 67 +- .../Client/ApiResponse`1.cs | 5 +- .../Client/ClientUtils.cs | 15 +- .../Client/DateTimeJsonConverter.cs | 4 +- .../Client/DateTimeNullableJsonConverter.cs | 4 +- .../Client/HostConfiguration.cs | 4 +- .../Client/RateLimitProvider`1.cs | 2 +- .../IServiceCollectionExtensions.cs | 4 +- .../Model/AuthParams.cs | 32 +- .../Model/AuthenticityCheckResult.cs | 2 +- .../Model/AuthenticityCheckResultItem.cs | 7 +- .../Model/AuthenticityCheckResultListInner.cs | 500 +++++++ .../Model/BinaryData.cs | 128 +- .../Model/CandidatesListItem.cs | 2 +- .../Model/ChosenDocumentType.cs | 2 +- .../Model/ContainerList.cs | 2 +- .../Model/ContainerListListInner.cs | 1152 +++++++++++++++++ .../Model/DataModule.cs | 4 +- .../Model/DetailsOptical.cs | 2 +- .../Model/DeviceInfo.cs | 12 +- .../Model/DocumentImage.cs | 2 +- .../Model/DocumentPosition.cs | 10 +- .../Model/DocumentTypesCandidates.cs | 4 +- .../Model/DocumentTypesCandidatesList.cs | 4 +- .../Model/DocumentTypesCandidatesResult.cs | 2 +- .../Model/DocumentsDatabase.cs | 8 +- .../Model/EncryptedRCLItem.cs | 2 +- .../Model/EncryptedRCLResult.cs | 2 +- .../Model/ErrorCoordinates.cs | 8 +- .../Model/FDSIDList.cs | 6 +- .../Model/FaceApi.cs | 20 +- .../Model/FaceApiSearch.cs | 6 +- .../Model/FaceDetection.cs | 4 +- .../Model/FiberItem.cs | 4 +- .../Model/FiberResult.cs | 4 +- .../Model/GetTransactionsByTagResponse.cs | 6 +- .../Model/Healthcheck.cs | 4 +- .../Model/IdentItem.cs | 4 +- .../Model/IdentResult.cs | 4 +- .../Model/ImageData.cs | 2 +- .../Model/ImageQA.cs | 18 +- .../Model/ImageQualityCheck.cs | 2 +- .../Model/ImageTransactionData.cs | 2 +- .../Model/Images.cs | 4 +- .../Model/ImagesField.cs | 2 +- .../Model/ImagesFieldValue.cs | 10 +- .../Model/InData.cs | 4 +- .../InDataTransactionImagesFieldValue.cs | 8 +- .../Model/InDataVideo.cs | 4 +- .../Model/LicenseItem.cs | 2 +- .../Model/LicenseResult.cs | 2 +- .../Model/ListTransactionsByTagResponse.cs | 4 +- .../Model/ListVerifiedFields.cs | 2 +- .../Model/LivenessParams.cs | 12 +- .../Model/MrzPosition.cs | 10 +- .../Model/OCRSecurityTextItem.cs | 4 +- .../Model/OCRSecurityTextResult.cs | 4 +- .../Model/OneCandidate.cs | 2 +- .../Model/OriginalSymbol.cs | 2 +- .../Model/OutData.cs | 4 +- .../OutDataTransactionImagesFieldValue.cs | 10 +- .../Model/PArrayField.cs | 6 +- .../Model/ParsedData.cs | 2 +- .../Model/PerDocumentConfig.cs | 4 +- .../Model/PhotoIdentItem.cs | 14 +- .../Model/PhotoIdentResult.cs | 14 +- .../Model/PointsContainer.cs | 2 +- .../Model/ProcessParams.cs | 118 +- .../Model/ProcessParamsRfid.cs | 2 +- .../Model/ProcessRequest.cs | 24 +- .../Model/ProcessRequestImage.cs | 6 +- .../Model/ProcessResponse.cs | 8 +- .../Model/ProcessSystemInfo.cs | 4 +- .../Model/RFIDDocVisualExtendedField.cs | 4 +- .../Model/RFIDDocVisualExtendedFieldItem.cs | 4 +- .../Model/ResultItem.cs | 9 +- .../Model/RfidAccessControlInfo.cs | 4 +- .../Model/RfidDataFile.cs | 20 +- .../Model/RfidSessionData.cs | 10 +- .../Model/SecurityFeatureItem.cs | 4 +- .../Model/SecurityFeatureResult.cs | 4 +- .../Model/SecurityObjectCertificates.cs | 2 +- .../Model/Status.cs | 2 +- .../Model/StringRecognitionResult.cs | 6 +- .../Model/SymbolCandidate.cs | 4 +- .../Model/SymbolRecognitionResult.cs | 6 +- .../Model/TDocBinaryInfo.cs | 4 +- .../Model/TextAvailableSource.cs | 2 +- .../Model/TextField.cs | 2 +- .../Model/TextFieldValue.cs | 10 +- .../Model/TransactionImage.cs | 2 +- .../Model/TransactionInfo.cs | 16 +- .../Model/TransactionProcessGetResponse.cs | 8 +- .../Model/TransactionProcessRequest.cs | 14 +- .../Model/TransactionProcessResult.cs | 8 +- .../Model/TrfFtString.cs | 6 +- .../Model/VerifiedFieldMap.cs | 10 +- .../Model/VisualExtendedFieldItem.cs | 12 +- .../Regula.DocumentReader.WebClient.csproj | 14 +- 105 files changed, 2128 insertions(+), 494 deletions(-) create mode 100644 src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore index 53d0157..d4704a1 100644 --- a/.openapi-generator-ignore +++ b/.openapi-generator-ignore @@ -13,5 +13,4 @@ src/Regula.DocumentReader.WebClient.Test/** src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.nuspec src/Regula.DocumentReader.WebClient/packages.config -src/Regula.DocumentReader.WebClient/README.md -src/Regula.DocumentReader.WebClient/Model/*Inner.cs \ No newline at end of file +src/Regula.DocumentReader.WebClient/README.md \ No newline at end of file diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 50a5645..7cdd8a1 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -8,8 +8,6 @@ src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs -src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs -src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs @@ -30,6 +28,7 @@ src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs @@ -46,6 +45,7 @@ src/Regula.DocumentReader.WebClient/Model/CheckResult.cs src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs src/Regula.DocumentReader.WebClient/Model/ContainerList.cs +src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs src/Regula.DocumentReader.WebClient/Model/Critical.cs src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs src/Regula.DocumentReader.WebClient/Model/DataModule.cs diff --git a/csharp-generator-config.json b/csharp-generator-config.json index 484feb8..41c7f7d 100644 --- a/csharp-generator-config.json +++ b/csharp-generator-config.json @@ -1,6 +1,7 @@ { "packageName": "Regula.DocumentReader.WebClient", "nullableReferenceTypes": true, + "targetFramework": "netstandard2.0", "typeMappings" : { "ContainerListListInner": "ResultItem", "AuthenticityCheckResultListInner": "AuthenticityCheckResultItem" diff --git a/generator-templates/JsonConverter.mustache b/generator-templates/JsonConverter.mustache index d8f49b2..163e432 100644 --- a/generator-templates/JsonConverter.mustache +++ b/generator-templates/JsonConverter.mustache @@ -49,26 +49,23 @@ {{#-first}} string{{nrt?}} discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "{{discriminator.propertyBaseName}}"); - {{/-first}} - {{/children}} {{#mappedModels}} if (discriminator != null && discriminator.Equals("{{mappingName}}")) return JsonSerializer.Deserialize<{{{model.classname}}}>(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); {{/mappedModels}} - + {{/-first}} + {{/children}} {{/discriminator}} {{#model.discriminator}} {{#model.hasDiscriminatorWithNonEmptyMapping}} - {{#mappedModels}} - {{#model}} + {{#composedSchemas.oneOf}} {{^vendorExtensions.x-duplicated-data-type}} - {{classname}}{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} = null; + {{name}}{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = null; {{#-last}} {{/-last}} {{/vendorExtensions.x-duplicated-data-type}} - {{/model}} - {{/mappedModels}} + {{/composedSchemas.oneOf}} Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; while (utf8JsonReaderDiscriminator.Read()) { diff --git a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs index d7c12c4..340f171 100644 --- a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs @@ -20,7 +20,6 @@ using System.Text.Json; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; -using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { @@ -369,18 +368,17 @@ public async Task HealthzAsync(Option xRequestID = if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Get; + httpRequestMessageLocalVar.Method = new HttpMethod("GET"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - HealthzApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/healthz", requestedAtLocalVar, _jsonSerializerOptions); + HealthzApiResponse apiResponseLocalVar = new HealthzApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/healthz", requestedAtLocalVar, _jsonSerializerOptions); AfterHealthzDefaultImplementation(apiResponseLocalVar, xRequestID); @@ -441,7 +439,7 @@ public HealthzApiResponse(ILogger logger, System.Net.Http.Ht // This logic may be modified with the AsModel.mustache template return IsOk ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -449,7 +447,7 @@ public HealthzApiResponse(ILogger logger, System.Net.Http.Ht /// /// /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.Healthcheck? result) + public bool TryOk(out Regula.DocumentReader.WebClient.Model.Healthcheck? result) { result = null; @@ -589,18 +587,17 @@ public async Task PingAsync(Option xRequestID = defaul if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Get; + httpRequestMessageLocalVar.Method = new HttpMethod("GET"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - PingApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/ping", requestedAtLocalVar, _jsonSerializerOptions); + PingApiResponse apiResponseLocalVar = new PingApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/ping", requestedAtLocalVar, _jsonSerializerOptions); AfterPingDefaultImplementation(apiResponseLocalVar, xRequestID); @@ -661,7 +658,7 @@ public PingApiResponse(ILogger logger, System.Net.Http.HttpRequ // This logic may be modified with the AsModel.mustache template return IsOk ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -669,7 +666,7 @@ public PingApiResponse(ILogger logger, System.Net.Http.HttpRequ /// /// /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.DeviceInfo? result) + public bool TryOk(out Regula.DocumentReader.WebClient.Model.DeviceInfo? result) { result = null; @@ -800,18 +797,17 @@ public async Task ReadyzAsync(Option xRequestID = de httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; - - httpRequestMessageLocalVar.Method = HttpMethod.Get; + httpRequestMessageLocalVar.Method = new HttpMethod("GET"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ReadyzApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/readyz", requestedAtLocalVar, _jsonSerializerOptions); + ReadyzApiResponse apiResponseLocalVar = new ReadyzApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/readyz", requestedAtLocalVar, _jsonSerializerOptions); AfterReadyzDefaultImplementation(apiResponseLocalVar, xRequestID); diff --git a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs index edfeb78..e6cd265 100644 --- a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs @@ -20,7 +20,6 @@ using System.Text.Json; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; -using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { @@ -288,18 +287,17 @@ public async Task ApiProcessAsync(ProcessRequest process if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Post; + httpRequestMessageLocalVar.Method = new HttpMethod("POST"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiProcessApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/process", requestedAtLocalVar, _jsonSerializerOptions); + ApiProcessApiResponse apiResponseLocalVar = new ApiProcessApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/process", requestedAtLocalVar, _jsonSerializerOptions); AfterApiProcessDefaultImplementation(apiResponseLocalVar, processRequest, xRequestID); @@ -360,7 +358,7 @@ public ApiProcessApiResponse(ILogger logger, System.Net.H // This logic may be modified with the AsModel.mustache template return IsOk ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -368,7 +366,7 @@ public ApiProcessApiResponse(ILogger logger, System.Net.H /// /// /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) + public bool TryOk(out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) { result = null; diff --git a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs index b17cb8a..8046bb4 100644 --- a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs @@ -20,7 +20,6 @@ using System.Text.Json; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; -using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { @@ -583,18 +582,17 @@ public async Task ApiV2TagTagIdDeleteAsync(Guid if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Delete; + httpRequestMessageLocalVar.Method = new HttpMethod("DELETE"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TagTagIdDeleteApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TagTagIdDeleteApiResponse apiResponseLocalVar = new ApiV2TagTagIdDeleteApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TagTagIdDeleteDefaultImplementation(apiResponseLocalVar, tagId); @@ -655,7 +653,7 @@ public ApiV2TagTagIdDeleteApiResponse(ILogger lo // This logic may be modified with the AsModel.mustache template return IsNoContent ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -663,7 +661,7 @@ public ApiV2TagTagIdDeleteApiResponse(ILogger lo /// /// /// - public bool TryNoContent([NotNullWhen(true)]out Object? result) + public bool TryNoContent(out Object? result) { result = null; @@ -813,18 +811,17 @@ public async Task ApiV2TagTagIdTransac if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Get; + httpRequestMessageLocalVar.Method = new HttpMethod("GET"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}/transactions", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar = new ApiV2TagTagIdTransactionsGetApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}/transactions", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TagTagIdTransactionsGetDefaultImplementation(apiResponseLocalVar, tagId); @@ -885,7 +882,7 @@ public ApiV2TagTagIdTransactionsGetApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -893,7 +890,7 @@ public ApiV2TagTagIdTransactionsGetApiResponse(ILogger /// /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ListTransactionsByTagResponse? result) + public bool TryOk(out Regula.DocumentReader.WebClient.Model.ListTransactionsByTagResponse? result) { result = null; @@ -1055,18 +1052,17 @@ public async Task ApiV2Transac if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Get; + httpRequestMessageLocalVar.Method = new HttpMethod("GET"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/file", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar = new ApiV2TransactionTransactionIdFileGetApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/file", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TransactionTransactionIdFileGetDefaultImplementation(apiResponseLocalVar, transactionId, name); @@ -1127,7 +1123,7 @@ public ApiV2TransactionTransactionIdFileGetApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -1135,7 +1131,7 @@ public ApiV2TransactionTransactionIdFileGetApiResponse(ILogger /// /// - public bool TryOk([NotNullWhen(true)]out System.IO.Stream? result) + public bool TryOk(out System.IO.Stream? result) { result = null; @@ -1266,18 +1262,17 @@ public async Task ApiV2Transaction if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Get; + httpRequestMessageLocalVar.Method = new HttpMethod("GET"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar = new ApiV2TransactionTransactionIdGetApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TransactionTransactionIdGetDefaultImplementation(apiResponseLocalVar, transactionId); @@ -1338,7 +1333,7 @@ public ApiV2TransactionTransactionIdGetApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -1346,7 +1341,7 @@ public ApiV2TransactionTransactionIdGetApiResponse(ILogger /// /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessGetResponse? result) + public bool TryOk(out Regula.DocumentReader.WebClient.Model.TransactionProcessGetResponse? result) { result = null; @@ -1515,18 +1510,17 @@ public async Task ApiV2Tra if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Post; + httpRequestMessageLocalVar.Method = new HttpMethod("POST"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/process", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar = new ApiV2TransactionTransactionIdProcessPostApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/process", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TransactionTransactionIdProcessPostDefaultImplementation(apiResponseLocalVar, transactionId, transactionProcessRequest); @@ -1587,7 +1581,7 @@ public ApiV2TransactionTransactionIdProcessPostApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -1595,7 +1589,7 @@ public ApiV2TransactionTransactionIdProcessPostApiResponse(ILogger /// /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessResult? result) + public bool TryOk(out Regula.DocumentReader.WebClient.Model.TransactionProcessResult? result) { result = null; @@ -1745,18 +1739,17 @@ public async Task ApiV2Tran if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Get; + httpRequestMessageLocalVar.Method = new HttpMethod("GET"); DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/results", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar = new ApiV2TransactionTransactionIdResultsGetApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/results", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TransactionTransactionIdResultsGetDefaultImplementation(apiResponseLocalVar, transactionId, withImages); @@ -1817,7 +1810,7 @@ public ApiV2TransactionTransactionIdResultsGetApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : null; + : default; } /// @@ -1825,7 +1818,7 @@ public ApiV2TransactionTransactionIdResultsGetApiResponse(ILogger /// /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) + public bool TryOk(out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) { result = null; diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs index 56b1e9a..7c2ef9e 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs @@ -11,7 +11,6 @@ #nullable enable using System; -using System.Diagnostics.CodeAnalysis; using System.Net; namespace Regula.DocumentReader.WebClient.Client @@ -167,7 +166,7 @@ public interface INoContent : IApiResponse /// /// /// - bool TryNoContent([NotNullWhen(true)]out TType? result); + bool TryNoContent(out TType? result); } /// @@ -187,6 +186,6 @@ public interface IOk : IApiResponse /// /// /// - bool TryOk([NotNullWhen(true)]out TType? result); + bool TryOk(out TType? result); } } diff --git a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs index 99eea23..2ea1aac 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs @@ -27,7 +27,7 @@ namespace Regula.DocumentReader.WebClient.Client /// /// Utility functions providing some benefit to API client consumers. /// - public static partial class ClientUtils + public static class ClientUtils { /// @@ -47,7 +47,7 @@ public static partial class ClientUtils /// /// /// - public static bool TryDeserialize(string json, JsonSerializerOptions options, [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) + public static bool TryDeserialize(string json, JsonSerializerOptions options, out T result) { try { @@ -69,7 +69,7 @@ public static bool TryDeserialize(string json, JsonSerializerOptions options, /// /// /// - public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, out T result) { try { @@ -105,8 +105,6 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return dateTimeOffset.ToString(format); - if (obj is DateOnly dateOnly) - return dateOnly.ToString(format); if (obj is bool boolean) return boolean ? "true" @@ -201,7 +199,7 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp return VisibilityValueConverter.ToJsonValue(visibility).ToString(); if (obj is ICollection collection) { - List entries = new(); + List entries = new List(); foreach (var entry in collection) entries.Add(ParameterToString(entry)); return string.Join(",", entries); @@ -311,8 +309,7 @@ public static byte[] ReadAsBytes(Stream inputStream) /// /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. /// - [GeneratedRegex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$")] - private static partial Regex JsonRegex(); + private static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); /// /// Check if the given MIME is a JSON MIME. @@ -328,7 +325,7 @@ public static bool IsJsonMime(string mime) { if (string.IsNullOrWhiteSpace(mime)) return false; - return JsonRegex().IsMatch(mime) || mime.Equals("application/json-patch+json"); + return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); } /// diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs index ebb5bfc..37a3330 100644 --- a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs +++ b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs @@ -15,7 +15,7 @@ namespace Regula.DocumentReader.WebClient.Client { /// - /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 + /// Formatter for 'date' and 'date-time' openapi formats ss defined by full-date - RFC3339 /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types /// public class DateTimeJsonConverter : JsonConverter @@ -32,6 +32,7 @@ public class DateTimeJsonConverter : JsonConverter "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyy'-'MM'-'dd", "yyyyMMddTHHmmss.fffffffK", "yyyyMMddTHHmmss.ffffffK", "yyyyMMddTHHmmss.fffffK", @@ -40,6 +41,7 @@ public class DateTimeJsonConverter : JsonConverter "yyyyMMddTHHmmss.ffK", "yyyyMMddTHHmmss.fK", "yyyyMMddTHHmmssK", + "yyyyMMdd" }; diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs index 442c351..1c7e243 100644 --- a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs +++ b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs @@ -15,7 +15,7 @@ namespace Regula.DocumentReader.WebClient.Client { /// - /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 + /// Formatter for 'date' and 'date-time' openapi formats ss defined by full-date - RFC3339 /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types /// public class DateTimeNullableJsonConverter : JsonConverter @@ -32,6 +32,7 @@ public class DateTimeNullableJsonConverter : JsonConverter "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", + "yyyy'-'MM'-'dd", "yyyyMMddTHHmmss.fffffffK", "yyyyMMddTHHmmss.ffffffK", "yyyyMMddTHHmmss.fffffK", @@ -40,6 +41,7 @@ public class DateTimeNullableJsonConverter : JsonConverter "yyyyMMddTHHmmss.ffK", "yyyyMMddTHHmmss.fK", "yyyyMMddTHHmmssK", + "yyyyMMdd" }; diff --git a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs index 14b3cad..17e480a 100644 --- a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs +++ b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs @@ -41,8 +41,6 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new JsonStringEnumConverter()); _jsonOptions.Converters.Add(new DateTimeJsonConverter()); _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); - _jsonOptions.Converters.Add(new DateOnlyJsonConverter()); - _jsonOptions.Converters.Add(new DateOnlyNullableJsonConverter()); _jsonOptions.Converters.Add(new AreaArrayJsonConverter()); _jsonOptions.Converters.Add(new AreaContainerJsonConverter()); _jsonOptions.Converters.Add(new AuthParamsJsonConverter()); @@ -312,7 +310,7 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new VisibilityJsonConverter()); _jsonOptions.Converters.Add(new VisibilityNullableJsonConverter()); _jsonOptions.Converters.Add(new VisualExtendedFieldItemJsonConverter()); - JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new(_jsonOptions); + JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new JsonSerializerOptionsProvider(_jsonOptions); _services.AddSingleton(jsonSerializerOptionsProvider); _services.AddSingleton(); _services.AddSingleton(); diff --git a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs index 43f0498..9fed0b8 100644 --- a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs +++ b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs @@ -22,7 +22,7 @@ namespace Regula.DocumentReader.WebClient.Client /// public class RateLimitProvider : TokenProvider where TTokenBase : TokenBase { - internal Dictionary> AvailableTokens { get; } = new(); + internal Dictionary> AvailableTokens { get; } = new Dictionary>(); /// /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs index a1df963..d3b6c94 100644 --- a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs @@ -27,7 +27,7 @@ public static class IServiceCollectionExtensions /// public static void AddApi(this IServiceCollection services) { - HostConfiguration config = new(services); + HostConfiguration config = new HostConfiguration(services); AddApi(services, config); } @@ -38,7 +38,7 @@ public static void AddApi(this IServiceCollection services) /// public static void AddApi(this IServiceCollection services, Action options) { - HostConfiguration config = new(services); + HostConfiguration config = new HostConfiguration(services); options(config); AddApi(services, config); } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs index 0baa1f1..0dd88d5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs @@ -85,7 +85,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable document liveness check [JsonPropertyName("checkLiveness")] - public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new(value); } } + public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new Option(value); } } /// /// Used to track the state of LivenessParams @@ -98,7 +98,7 @@ public AuthParams(Option checkLiveness = default, Option /// Gets or Sets LivenessParams /// [JsonPropertyName("livenessParams")] - public LivenessParams? LivenessParams { get { return this.LivenessParamsOption; } set { this.LivenessParamsOption = new(value); } } + public LivenessParams? LivenessParams { get { return this.LivenessParamsOption; } set { this.LivenessParamsOption = new Option(value); } } /// /// Used to track the state of CheckUVLuminiscence @@ -112,7 +112,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Document luminescence check in UV light [JsonPropertyName("checkUVLuminiscence")] - public bool? CheckUVLuminiscence { get { return this.CheckUVLuminiscenceOption; } set { this.CheckUVLuminiscenceOption = new(value); } } + public bool? CheckUVLuminiscence { get { return this.CheckUVLuminiscenceOption; } set { this.CheckUVLuminiscenceOption = new Option(value); } } /// /// Used to track the state of CheckIRB900 @@ -126,7 +126,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable B900 ink MRZ contrast check in IR light [JsonPropertyName("checkIRB900")] - public bool? CheckIRB900 { get { return this.CheckIRB900Option; } set { this.CheckIRB900Option = new(value); } } + public bool? CheckIRB900 { get { return this.CheckIRB900Option; } set { this.CheckIRB900Option = new Option(value); } } /// /// Used to track the state of CheckImagePatterns @@ -140,7 +140,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) [JsonPropertyName("checkImagePatterns")] - public bool? CheckImagePatterns { get { return this.CheckImagePatternsOption; } set { this.CheckImagePatternsOption = new(value); } } + public bool? CheckImagePatterns { get { return this.CheckImagePatternsOption; } set { this.CheckImagePatternsOption = new Option(value); } } /// /// Used to track the state of CheckFibers @@ -154,7 +154,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Fibers detection [JsonPropertyName("checkFibers")] - public bool? CheckFibers { get { return this.CheckFibersOption; } set { this.CheckFibersOption = new(value); } } + public bool? CheckFibers { get { return this.CheckFibersOption; } set { this.CheckFibersOption = new Option(value); } } /// /// Used to track the state of CheckExtMRZ @@ -168,7 +168,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Extended MRZ Check [JsonPropertyName("checkExtMRZ")] - public bool? CheckExtMRZ { get { return this.CheckExtMRZOption; } set { this.CheckExtMRZOption = new(value); } } + public bool? CheckExtMRZ { get { return this.CheckExtMRZOption; } set { this.CheckExtMRZOption = new Option(value); } } /// /// Used to track the state of CheckExtOCR @@ -182,7 +182,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Extended OCR Check [JsonPropertyName("checkExtOCR")] - public bool? CheckExtOCR { get { return this.CheckExtOCROption; } set { this.CheckExtOCROption = new(value); } } + public bool? CheckExtOCR { get { return this.CheckExtOCROption; } set { this.CheckExtOCROption = new Option(value); } } /// /// Used to track the state of CheckAxial @@ -196,7 +196,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable laminate integrity check in axial light [JsonPropertyName("checkAxial")] - public bool? CheckAxial { get { return this.CheckAxialOption; } set { this.CheckAxialOption = new(value); } } + public bool? CheckAxial { get { return this.CheckAxialOption; } set { this.CheckAxialOption = new Option(value); } } /// /// Used to track the state of CheckBarcodeFormat @@ -210,7 +210,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) [JsonPropertyName("checkBarcodeFormat")] - public bool? CheckBarcodeFormat { get { return this.CheckBarcodeFormatOption; } set { this.CheckBarcodeFormatOption = new(value); } } + public bool? CheckBarcodeFormat { get { return this.CheckBarcodeFormatOption; } set { this.CheckBarcodeFormatOption = new Option(value); } } /// /// Used to track the state of CheckIRVisibility @@ -224,7 +224,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Document elements visibility check in IR light [JsonPropertyName("checkIRVisibility")] - public bool? CheckIRVisibility { get { return this.CheckIRVisibilityOption; } set { this.CheckIRVisibilityOption = new(value); } } + public bool? CheckIRVisibility { get { return this.CheckIRVisibilityOption; } set { this.CheckIRVisibilityOption = new Option(value); } } /// /// Used to track the state of CheckIPI @@ -238,7 +238,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Invisible Personal Information (IPI) check [JsonPropertyName("checkIPI")] - public bool? CheckIPI { get { return this.CheckIPIOption; } set { this.CheckIPIOption = new(value); } } + public bool? CheckIPI { get { return this.CheckIPIOption; } set { this.CheckIPIOption = new Option(value); } } /// /// Used to track the state of CheckPhotoEmbedding @@ -252,7 +252,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) [JsonPropertyName("checkPhotoEmbedding")] - public bool? CheckPhotoEmbedding { get { return this.CheckPhotoEmbeddingOption; } set { this.CheckPhotoEmbeddingOption = new(value); } } + public bool? CheckPhotoEmbedding { get { return this.CheckPhotoEmbeddingOption; } set { this.CheckPhotoEmbeddingOption = new Option(value); } } /// /// Used to track the state of CheckPhotoComparison @@ -266,7 +266,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Portrait comparison check [JsonPropertyName("checkPhotoComparison")] - public bool? CheckPhotoComparison { get { return this.CheckPhotoComparisonOption; } set { this.CheckPhotoComparisonOption = new(value); } } + public bool? CheckPhotoComparison { get { return this.CheckPhotoComparisonOption; } set { this.CheckPhotoComparisonOption = new Option(value); } } /// /// Used to track the state of CheckLetterScreen @@ -280,7 +280,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable LetterScreen check [JsonPropertyName("checkLetterScreen")] - public bool? CheckLetterScreen { get { return this.CheckLetterScreenOption; } set { this.CheckLetterScreenOption = new(value); } } + public bool? CheckLetterScreen { get { return this.CheckLetterScreenOption; } set { this.CheckLetterScreenOption = new Option(value); } } /// /// Used to track the state of CheckSecurityText @@ -294,7 +294,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Security text check [JsonPropertyName("checkSecurityText")] - public bool? CheckSecurityText { get { return this.CheckSecurityTextOption; } set { this.CheckSecurityTextOption = new(value); } } + public bool? CheckSecurityText { get { return this.CheckSecurityTextOption; } set { this.CheckSecurityTextOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs index beb02f1..989059b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs @@ -79,7 +79,7 @@ public AuthenticityCheckResult(AuthenticityResultType type, CheckResult result, /// /// Count of items in List [JsonPropertyName("Count")] - public int? Count { get { return this.CountOption; } set { this.CountOption = new(value); } } + public int? Count { get { return this.CountOption; } set { this.CountOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs index c44849b..961a084 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs @@ -59,7 +59,7 @@ public AuthenticityCheckResultItem(Option elementResult = default, /// Gets or Sets ElementResult /// [JsonPropertyName("ElementResult")] - public CheckResult? ElementResult { get { return this.ElementResultOption; } set { this.ElementResultOption = new(value); } } + public CheckResult? ElementResult { get { return this.ElementResultOption; } set { this.ElementResultOption = new Option(value); } } /// /// Used to track the state of ElementDiagnose @@ -72,7 +72,7 @@ public AuthenticityCheckResultItem(Option elementResult = default, /// Gets or Sets ElementDiagnose /// [JsonPropertyName("ElementDiagnose")] - public CheckDiagnose? ElementDiagnose { get { return this.ElementDiagnoseOption; } set { this.ElementDiagnoseOption = new(value); } } + public CheckDiagnose? ElementDiagnose { get { return this.ElementDiagnoseOption; } set { this.ElementDiagnoseOption = new Option(value); } } /// /// The discriminator @@ -92,7 +92,7 @@ public AuthenticityCheckResultItem(Option elementResult = default, /// Gets or Sets PercentValue /// [JsonPropertyName("PercentValue")] - public int? PercentValue { get { return this.PercentValueOption; } set { this.PercentValueOption = new(value); } } + public int? PercentValue { get { return this.PercentValueOption; } set { this.PercentValueOption = new Option(value); } } /// /// Returns the string presentation of the object @@ -203,7 +203,6 @@ public override AuthenticityCheckResultItem Read(ref Utf8JsonReader utf8JsonRead return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); if (discriminator != null && discriminator.Equals("8388608")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - while (utf8JsonReader.Read()) { if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs new file mode 100644 index 0000000..95f8135 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs @@ -0,0 +1,500 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// AuthenticityCheckResultListInner + /// + public partial class AuthenticityCheckResultListInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(SecurityFeatureResult securityFeatureResult) + { + SecurityFeatureResult = securityFeatureResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(IdentResult identResult) + { + IdentResult = identResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(FiberResult fiberResult) + { + FiberResult = fiberResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(OCRSecurityTextResult oCRSecurityTextResult) + { + OCRSecurityTextResult = oCRSecurityTextResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public AuthenticityCheckResultListInner(PhotoIdentResult photoIdentResult) + { + PhotoIdentResult = photoIdentResult; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets SecurityFeatureResult + /// + public SecurityFeatureResult? SecurityFeatureResult { get; set; } + + /// + /// Gets or Sets IdentResult + /// + public IdentResult? IdentResult { get; set; } + + /// + /// Gets or Sets FiberResult + /// + public FiberResult? FiberResult { get; set; } + + /// + /// Gets or Sets OCRSecurityTextResult + /// + public OCRSecurityTextResult? OCRSecurityTextResult { get; set; } + + /// + /// Gets or Sets PhotoIdentResult + /// + public PhotoIdentResult? PhotoIdentResult { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class AuthenticityCheckResultListInner {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class AuthenticityCheckResultListInnerJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override AuthenticityCheckResultListInner Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option type = default; + + SecurityFeatureResult? securityFeatureResult = null; + IdentResult? identResult = null; + FiberResult? fiberResult = null; + OCRSecurityTextResult? oCRSecurityTextResult = null; + PhotoIdentResult? photoIdentResult = null; + + Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; + while (utf8JsonReaderDiscriminator.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); + utf8JsonReaderDiscriminator.Read(); + if (localVarJsonPropertyName?.Equals("Type") ?? false) + { + string? discriminator = utf8JsonReaderDiscriminator.GetString(); + if (discriminator?.Equals("1") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("1024") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("1048576") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("128") ?? false) + { + Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; + photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("131072") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("16") ?? false) + { + Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; + fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); + } + if (discriminator?.Equals("16384") ?? false) + { + Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; + fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); + } + if (discriminator?.Equals("2") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("2048") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("256") ?? false) + { + Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; + photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("262144") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("32") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("32768") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("4") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("4096") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("512") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("524288") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("64") ?? false) + { + Utf8JsonReader utf8JsonReaderOCRSecurityTextResult = utf8JsonReader; + oCRSecurityTextResult = JsonSerializer.Deserialize(ref utf8JsonReaderOCRSecurityTextResult, jsonSerializerOptions); + } + if (discriminator?.Equals("65536") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("8") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("8192") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("8388608") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + if (discriminator?.Equals("FiberResult") ?? false) + { + Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; + fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); + } + if (discriminator?.Equals("IdentResult") ?? false) + { + Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; + identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("OCRSecurityTextResult") ?? false) + { + Utf8JsonReader utf8JsonReaderOCRSecurityTextResult = utf8JsonReader; + oCRSecurityTextResult = JsonSerializer.Deserialize(ref utf8JsonReaderOCRSecurityTextResult, jsonSerializerOptions); + } + if (discriminator?.Equals("PhotoIdentResult") ?? false) + { + Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; + photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); + } + if (discriminator?.Equals("SecurityFeatureResult") ?? false) + { + Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; + securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); + } + } + } + } + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "Type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + type = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!type.IsSet) + throw new ArgumentException("Property is required for class AuthenticityCheckResultListInner.", nameof(type)); + + if (type.IsSet && type.Value == null) + throw new ArgumentNullException(nameof(type), "Property is not nullable for class AuthenticityCheckResultListInner."); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (photoIdentResult != null) + return new AuthenticityCheckResultListInner(photoIdentResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (fiberResult != null) + return new AuthenticityCheckResultListInner(fiberResult); + + if (fiberResult != null) + return new AuthenticityCheckResultListInner(fiberResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (photoIdentResult != null) + return new AuthenticityCheckResultListInner(photoIdentResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (oCRSecurityTextResult != null) + return new AuthenticityCheckResultListInner(oCRSecurityTextResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + if (fiberResult != null) + return new AuthenticityCheckResultListInner(fiberResult); + + if (identResult != null) + return new AuthenticityCheckResultListInner(identResult); + + if (oCRSecurityTextResult != null) + return new AuthenticityCheckResultListInner(oCRSecurityTextResult); + + if (photoIdentResult != null) + return new AuthenticityCheckResultListInner(photoIdentResult); + + if (securityFeatureResult != null) + return new AuthenticityCheckResultListInner(securityFeatureResult); + + throw new JsonException(); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + if (authenticityCheckResultListInner.SecurityFeatureResult != null) + { + SecurityFeatureResultJsonConverter securityFeatureResultJsonConverter = (SecurityFeatureResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.SecurityFeatureResult.GetType())); + securityFeatureResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.SecurityFeatureResult, jsonSerializerOptions); + } + + if (authenticityCheckResultListInner.IdentResult != null) + { + IdentResultJsonConverter identResultJsonConverter = (IdentResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.IdentResult.GetType())); + identResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.IdentResult, jsonSerializerOptions); + } + + if (authenticityCheckResultListInner.FiberResult != null) + { + FiberResultJsonConverter fiberResultJsonConverter = (FiberResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.FiberResult.GetType())); + fiberResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.FiberResult, jsonSerializerOptions); + } + + if (authenticityCheckResultListInner.OCRSecurityTextResult != null) + { + OCRSecurityTextResultJsonConverter oCRSecurityTextResultJsonConverter = (OCRSecurityTextResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.OCRSecurityTextResult.GetType())); + oCRSecurityTextResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.OCRSecurityTextResult, jsonSerializerOptions); + } + + if (authenticityCheckResultListInner.PhotoIdentResult != null) + { + PhotoIdentResultJsonConverter photoIdentResultJsonConverter = (PhotoIdentResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.PhotoIdentResult.GetType())); + photoIdentResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.PhotoIdentResult, jsonSerializerOptions); + } + + WriteProperties(writer, authenticityCheckResultListInner, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteNumber("Type", authenticityCheckResultListInner.Type); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs index 17c0b8d..89ac71d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs @@ -180,7 +180,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDAuthenticationInfo /// [JsonPropertyName("RFID_Authentication_Info")] - public Dictionary? RFIDAuthenticationInfo { get { return this.RFIDAuthenticationInfoOption; } set { this.RFIDAuthenticationInfoOption = new(value); } } + public Dictionary? RFIDAuthenticationInfo { get { return this.RFIDAuthenticationInfoOption; } set { this.RFIDAuthenticationInfoOption = new Option?>(value); } } /// /// Used to track the state of RFIDMIFAREDataValidity @@ -193,7 +193,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDMIFAREDataValidity /// [JsonPropertyName("RFID_MIFARE_Data_Validity")] - public Dictionary? RFIDMIFAREDataValidity { get { return this.RFIDMIFAREDataValidityOption; } set { this.RFIDMIFAREDataValidityOption = new(value); } } + public Dictionary? RFIDMIFAREDataValidity { get { return this.RFIDMIFAREDataValidityOption; } set { this.RFIDMIFAREDataValidityOption = new Option?>(value); } } /// /// Used to track the state of RFIDMIFAREData @@ -206,7 +206,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDMIFAREData /// [JsonPropertyName("RFID_MIFARE_Data")] - public Dictionary? RFIDMIFAREData { get { return this.RFIDMIFAREDataOption; } set { this.RFIDMIFAREDataOption = new(value); } } + public Dictionary? RFIDMIFAREData { get { return this.RFIDMIFAREDataOption; } set { this.RFIDMIFAREDataOption = new Option?>(value); } } /// /// Used to track the state of RFID_EF_COM @@ -219,7 +219,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFID_EF_COM /// [JsonPropertyName("RFID_EF_COM")] - public Dictionary? RFID_EF_COM { get { return this.RFID_EF_COMOption; } set { this.RFID_EF_COMOption = new(value); } } + public Dictionary? RFID_EF_COM { get { return this.RFID_EF_COMOption; } set { this.RFID_EF_COMOption = new Option?>(value); } } /// /// Used to track the state of RFIDDG1 @@ -232,7 +232,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG1 /// [JsonPropertyName("RFID_DG1")] - public RfidDG1? RFIDDG1 { get { return this.RFIDDG1Option; } set { this.RFIDDG1Option = new(value); } } + public RfidDG1? RFIDDG1 { get { return this.RFIDDG1Option; } set { this.RFIDDG1Option = new Option(value); } } /// /// Used to track the state of RFIDDG2 @@ -245,7 +245,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG2 /// [JsonPropertyName("RFID_DG2")] - public Dictionary? RFIDDG2 { get { return this.RFIDDG2Option; } set { this.RFIDDG2Option = new(value); } } + public Dictionary? RFIDDG2 { get { return this.RFIDDG2Option; } set { this.RFIDDG2Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG3 @@ -258,7 +258,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG3 /// [JsonPropertyName("RFID_DG3")] - public Dictionary? RFIDDG3 { get { return this.RFIDDG3Option; } set { this.RFIDDG3Option = new(value); } } + public Dictionary? RFIDDG3 { get { return this.RFIDDG3Option; } set { this.RFIDDG3Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG4 @@ -271,7 +271,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG4 /// [JsonPropertyName("RFID_DG4")] - public Dictionary? RFIDDG4 { get { return this.RFIDDG4Option; } set { this.RFIDDG4Option = new(value); } } + public Dictionary? RFIDDG4 { get { return this.RFIDDG4Option; } set { this.RFIDDG4Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG5 @@ -284,7 +284,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG5 /// [JsonPropertyName("RFID_DG5")] - public Dictionary? RFIDDG5 { get { return this.RFIDDG5Option; } set { this.RFIDDG5Option = new(value); } } + public Dictionary? RFIDDG5 { get { return this.RFIDDG5Option; } set { this.RFIDDG5Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG6 @@ -297,7 +297,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG6 /// [JsonPropertyName("RFID_DG6")] - public Dictionary? RFIDDG6 { get { return this.RFIDDG6Option; } set { this.RFIDDG6Option = new(value); } } + public Dictionary? RFIDDG6 { get { return this.RFIDDG6Option; } set { this.RFIDDG6Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG7 @@ -310,7 +310,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG7 /// [JsonPropertyName("RFID_DG7")] - public Dictionary? RFIDDG7 { get { return this.RFIDDG7Option; } set { this.RFIDDG7Option = new(value); } } + public Dictionary? RFIDDG7 { get { return this.RFIDDG7Option; } set { this.RFIDDG7Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG8 @@ -323,7 +323,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG8 /// [JsonPropertyName("RFID_DG8")] - public Dictionary? RFIDDG8 { get { return this.RFIDDG8Option; } set { this.RFIDDG8Option = new(value); } } + public Dictionary? RFIDDG8 { get { return this.RFIDDG8Option; } set { this.RFIDDG8Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG9 @@ -336,7 +336,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG9 /// [JsonPropertyName("RFID_DG9")] - public Dictionary? RFIDDG9 { get { return this.RFIDDG9Option; } set { this.RFIDDG9Option = new(value); } } + public Dictionary? RFIDDG9 { get { return this.RFIDDG9Option; } set { this.RFIDDG9Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG10 @@ -349,7 +349,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG10 /// [JsonPropertyName("RFID_DG10")] - public Dictionary? RFIDDG10 { get { return this.RFIDDG10Option; } set { this.RFIDDG10Option = new(value); } } + public Dictionary? RFIDDG10 { get { return this.RFIDDG10Option; } set { this.RFIDDG10Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG11 @@ -362,7 +362,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG11 /// [JsonPropertyName("RFID_DG11")] - public Dictionary? RFIDDG11 { get { return this.RFIDDG11Option; } set { this.RFIDDG11Option = new(value); } } + public Dictionary? RFIDDG11 { get { return this.RFIDDG11Option; } set { this.RFIDDG11Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG12 @@ -375,7 +375,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG12 /// [JsonPropertyName("RFID_DG12")] - public Dictionary? RFIDDG12 { get { return this.RFIDDG12Option; } set { this.RFIDDG12Option = new(value); } } + public Dictionary? RFIDDG12 { get { return this.RFIDDG12Option; } set { this.RFIDDG12Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG13 @@ -388,7 +388,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG13 /// [JsonPropertyName("RFID_DG13")] - public Dictionary? RFIDDG13 { get { return this.RFIDDG13Option; } set { this.RFIDDG13Option = new(value); } } + public Dictionary? RFIDDG13 { get { return this.RFIDDG13Option; } set { this.RFIDDG13Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG14 @@ -401,7 +401,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG14 /// [JsonPropertyName("RFID_DG14")] - public Dictionary? RFIDDG14 { get { return this.RFIDDG14Option; } set { this.RFIDDG14Option = new(value); } } + public Dictionary? RFIDDG14 { get { return this.RFIDDG14Option; } set { this.RFIDDG14Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG15 @@ -414,7 +414,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG15 /// [JsonPropertyName("RFID_DG15")] - public Dictionary? RFIDDG15 { get { return this.RFIDDG15Option; } set { this.RFIDDG15Option = new(value); } } + public Dictionary? RFIDDG15 { get { return this.RFIDDG15Option; } set { this.RFIDDG15Option = new Option?>(value); } } /// /// Used to track the state of RFIDDG16 @@ -427,7 +427,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG16 /// [JsonPropertyName("RFID_DG16")] - public Dictionary? RFIDDG16 { get { return this.RFIDDG16Option; } set { this.RFIDDG16Option = new(value); } } + public Dictionary? RFIDDG16 { get { return this.RFIDDG16Option; } set { this.RFIDDG16Option = new Option?>(value); } } /// /// Used to track the state of RFID_EF_SOD @@ -440,7 +440,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFID_EF_SOD /// [JsonPropertyName("RFID_EF_SOD")] - public Dictionary? RFID_EF_SOD { get { return this.RFID_EF_SODOption; } set { this.RFID_EF_SODOption = new(value); } } + public Dictionary? RFID_EF_SOD { get { return this.RFID_EF_SODOption; } set { this.RFID_EF_SODOption = new Option?>(value); } } /// /// Used to track the state of EIDDG1 @@ -453,7 +453,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG1 /// [JsonPropertyName("eID_DG1")] - public Dictionary? EIDDG1 { get { return this.EIDDG1Option; } set { this.EIDDG1Option = new(value); } } + public Dictionary? EIDDG1 { get { return this.EIDDG1Option; } set { this.EIDDG1Option = new Option?>(value); } } /// /// Used to track the state of EIDDG2 @@ -466,7 +466,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG2 /// [JsonPropertyName("eID_DG2")] - public Dictionary? EIDDG2 { get { return this.EIDDG2Option; } set { this.EIDDG2Option = new(value); } } + public Dictionary? EIDDG2 { get { return this.EIDDG2Option; } set { this.EIDDG2Option = new Option?>(value); } } /// /// Used to track the state of EIDDG3 @@ -479,7 +479,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG3 /// [JsonPropertyName("eID_DG3")] - public Dictionary? EIDDG3 { get { return this.EIDDG3Option; } set { this.EIDDG3Option = new(value); } } + public Dictionary? EIDDG3 { get { return this.EIDDG3Option; } set { this.EIDDG3Option = new Option?>(value); } } /// /// Used to track the state of EIDDG4 @@ -492,7 +492,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG4 /// [JsonPropertyName("eID_DG4")] - public Dictionary? EIDDG4 { get { return this.EIDDG4Option; } set { this.EIDDG4Option = new(value); } } + public Dictionary? EIDDG4 { get { return this.EIDDG4Option; } set { this.EIDDG4Option = new Option?>(value); } } /// /// Used to track the state of EIDDG5 @@ -505,7 +505,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG5 /// [JsonPropertyName("eID_DG5")] - public Dictionary? EIDDG5 { get { return this.EIDDG5Option; } set { this.EIDDG5Option = new(value); } } + public Dictionary? EIDDG5 { get { return this.EIDDG5Option; } set { this.EIDDG5Option = new Option?>(value); } } /// /// Used to track the state of EIDDG6 @@ -518,7 +518,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG6 /// [JsonPropertyName("eID_DG6")] - public Dictionary? EIDDG6 { get { return this.EIDDG6Option; } set { this.EIDDG6Option = new(value); } } + public Dictionary? EIDDG6 { get { return this.EIDDG6Option; } set { this.EIDDG6Option = new Option?>(value); } } /// /// Used to track the state of EIDDG7 @@ -531,7 +531,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG7 /// [JsonPropertyName("eID_DG7")] - public Dictionary? EIDDG7 { get { return this.EIDDG7Option; } set { this.EIDDG7Option = new(value); } } + public Dictionary? EIDDG7 { get { return this.EIDDG7Option; } set { this.EIDDG7Option = new Option?>(value); } } /// /// Used to track the state of EIDDG8 @@ -544,7 +544,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG8 /// [JsonPropertyName("eID_DG8")] - public Dictionary? EIDDG8 { get { return this.EIDDG8Option; } set { this.EIDDG8Option = new(value); } } + public Dictionary? EIDDG8 { get { return this.EIDDG8Option; } set { this.EIDDG8Option = new Option?>(value); } } /// /// Used to track the state of EIDDG9 @@ -557,7 +557,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG9 /// [JsonPropertyName("eID_DG9")] - public Dictionary? EIDDG9 { get { return this.EIDDG9Option; } set { this.EIDDG9Option = new(value); } } + public Dictionary? EIDDG9 { get { return this.EIDDG9Option; } set { this.EIDDG9Option = new Option?>(value); } } /// /// Used to track the state of EIDDG10 @@ -570,7 +570,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG10 /// [JsonPropertyName("eID_DG10")] - public Dictionary? EIDDG10 { get { return this.EIDDG10Option; } set { this.EIDDG10Option = new(value); } } + public Dictionary? EIDDG10 { get { return this.EIDDG10Option; } set { this.EIDDG10Option = new Option?>(value); } } /// /// Used to track the state of EIDDG11 @@ -583,7 +583,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG11 /// [JsonPropertyName("eID_DG11")] - public Dictionary? EIDDG11 { get { return this.EIDDG11Option; } set { this.EIDDG11Option = new(value); } } + public Dictionary? EIDDG11 { get { return this.EIDDG11Option; } set { this.EIDDG11Option = new Option?>(value); } } /// /// Used to track the state of EIDDG12 @@ -596,7 +596,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG12 /// [JsonPropertyName("eID_DG12")] - public Dictionary? EIDDG12 { get { return this.EIDDG12Option; } set { this.EIDDG12Option = new(value); } } + public Dictionary? EIDDG12 { get { return this.EIDDG12Option; } set { this.EIDDG12Option = new Option?>(value); } } /// /// Used to track the state of EIDDG13 @@ -609,7 +609,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG13 /// [JsonPropertyName("eID_DG13")] - public Dictionary? EIDDG13 { get { return this.EIDDG13Option; } set { this.EIDDG13Option = new(value); } } + public Dictionary? EIDDG13 { get { return this.EIDDG13Option; } set { this.EIDDG13Option = new Option?>(value); } } /// /// Used to track the state of EIDDG14 @@ -622,7 +622,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG14 /// [JsonPropertyName("eID_DG14")] - public Dictionary? EIDDG14 { get { return this.EIDDG14Option; } set { this.EIDDG14Option = new(value); } } + public Dictionary? EIDDG14 { get { return this.EIDDG14Option; } set { this.EIDDG14Option = new Option?>(value); } } /// /// Used to track the state of EIDDG15 @@ -635,7 +635,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG15 /// [JsonPropertyName("eID_DG15")] - public Dictionary? EIDDG15 { get { return this.EIDDG15Option; } set { this.EIDDG15Option = new(value); } } + public Dictionary? EIDDG15 { get { return this.EIDDG15Option; } set { this.EIDDG15Option = new Option?>(value); } } /// /// Used to track the state of EIDDG16 @@ -648,7 +648,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG16 /// [JsonPropertyName("eID_DG16")] - public Dictionary? EIDDG16 { get { return this.EIDDG16Option; } set { this.EIDDG16Option = new(value); } } + public Dictionary? EIDDG16 { get { return this.EIDDG16Option; } set { this.EIDDG16Option = new Option?>(value); } } /// /// Used to track the state of EIDDG17 @@ -661,7 +661,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG17 /// [JsonPropertyName("eID_DG17")] - public Dictionary? EIDDG17 { get { return this.EIDDG17Option; } set { this.EIDDG17Option = new(value); } } + public Dictionary? EIDDG17 { get { return this.EIDDG17Option; } set { this.EIDDG17Option = new Option?>(value); } } /// /// Used to track the state of EIDDG18 @@ -674,7 +674,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG18 /// [JsonPropertyName("eID_DG18")] - public Dictionary? EIDDG18 { get { return this.EIDDG18Option; } set { this.EIDDG18Option = new(value); } } + public Dictionary? EIDDG18 { get { return this.EIDDG18Option; } set { this.EIDDG18Option = new Option?>(value); } } /// /// Used to track the state of EIDDG19 @@ -687,7 +687,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG19 /// [JsonPropertyName("eID_DG19")] - public Dictionary? EIDDG19 { get { return this.EIDDG19Option; } set { this.EIDDG19Option = new(value); } } + public Dictionary? EIDDG19 { get { return this.EIDDG19Option; } set { this.EIDDG19Option = new Option?>(value); } } /// /// Used to track the state of EIDDG20 @@ -700,7 +700,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG20 /// [JsonPropertyName("eID_DG20")] - public Dictionary? EIDDG20 { get { return this.EIDDG20Option; } set { this.EIDDG20Option = new(value); } } + public Dictionary? EIDDG20 { get { return this.EIDDG20Option; } set { this.EIDDG20Option = new Option?>(value); } } /// /// Used to track the state of EIDDG21 @@ -713,7 +713,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG21 /// [JsonPropertyName("eID_DG21")] - public Dictionary? EIDDG21 { get { return this.EIDDG21Option; } set { this.EIDDG21Option = new(value); } } + public Dictionary? EIDDG21 { get { return this.EIDDG21Option; } set { this.EIDDG21Option = new Option?>(value); } } /// /// Used to track the state of EDLCOM @@ -726,7 +726,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLCOM /// [JsonPropertyName("eDL_COM")] - public Dictionary? EDLCOM { get { return this.EDLCOMOption; } set { this.EDLCOMOption = new(value); } } + public Dictionary? EDLCOM { get { return this.EDLCOMOption; } set { this.EDLCOMOption = new Option?>(value); } } /// /// Used to track the state of EDLSOD @@ -739,7 +739,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLSOD /// [JsonPropertyName("eDL_SOD")] - public Dictionary? EDLSOD { get { return this.EDLSODOption; } set { this.EDLSODOption = new(value); } } + public Dictionary? EDLSOD { get { return this.EDLSODOption; } set { this.EDLSODOption = new Option?>(value); } } /// /// Used to track the state of EDLDG1 @@ -752,7 +752,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG1 /// [JsonPropertyName("eDL_DG1")] - public Dictionary? EDLDG1 { get { return this.EDLDG1Option; } set { this.EDLDG1Option = new(value); } } + public Dictionary? EDLDG1 { get { return this.EDLDG1Option; } set { this.EDLDG1Option = new Option?>(value); } } /// /// Used to track the state of EDLDG2 @@ -765,7 +765,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG2 /// [JsonPropertyName("eDL_DG2")] - public Dictionary? EDLDG2 { get { return this.EDLDG2Option; } set { this.EDLDG2Option = new(value); } } + public Dictionary? EDLDG2 { get { return this.EDLDG2Option; } set { this.EDLDG2Option = new Option?>(value); } } /// /// Used to track the state of EDLDG3 @@ -778,7 +778,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG3 /// [JsonPropertyName("eDL_DG3")] - public Dictionary? EDLDG3 { get { return this.EDLDG3Option; } set { this.EDLDG3Option = new(value); } } + public Dictionary? EDLDG3 { get { return this.EDLDG3Option; } set { this.EDLDG3Option = new Option?>(value); } } /// /// Used to track the state of EDLDG4 @@ -791,7 +791,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG4 /// [JsonPropertyName("eDL_DG4")] - public Dictionary? EDLDG4 { get { return this.EDLDG4Option; } set { this.EDLDG4Option = new(value); } } + public Dictionary? EDLDG4 { get { return this.EDLDG4Option; } set { this.EDLDG4Option = new Option?>(value); } } /// /// Used to track the state of EDLDG5 @@ -804,7 +804,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG5 /// [JsonPropertyName("eDL_DG5")] - public Dictionary? EDLDG5 { get { return this.EDLDG5Option; } set { this.EDLDG5Option = new(value); } } + public Dictionary? EDLDG5 { get { return this.EDLDG5Option; } set { this.EDLDG5Option = new Option?>(value); } } /// /// Used to track the state of EDLDG6 @@ -817,7 +817,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG6 /// [JsonPropertyName("eDL_DG6")] - public Dictionary? EDLDG6 { get { return this.EDLDG6Option; } set { this.EDLDG6Option = new(value); } } + public Dictionary? EDLDG6 { get { return this.EDLDG6Option; } set { this.EDLDG6Option = new Option?>(value); } } /// /// Used to track the state of EDLDG7 @@ -830,7 +830,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG7 /// [JsonPropertyName("eDL_DG7")] - public Dictionary? EDLDG7 { get { return this.EDLDG7Option; } set { this.EDLDG7Option = new(value); } } + public Dictionary? EDLDG7 { get { return this.EDLDG7Option; } set { this.EDLDG7Option = new Option?>(value); } } /// /// Used to track the state of EDLDG8 @@ -843,7 +843,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG8 /// [JsonPropertyName("eDL_DG8")] - public Dictionary? EDLDG8 { get { return this.EDLDG8Option; } set { this.EDLDG8Option = new(value); } } + public Dictionary? EDLDG8 { get { return this.EDLDG8Option; } set { this.EDLDG8Option = new Option?>(value); } } /// /// Used to track the state of EDLDG9 @@ -856,7 +856,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG9 /// [JsonPropertyName("eDL_DG9")] - public Dictionary? EDLDG9 { get { return this.EDLDG9Option; } set { this.EDLDG9Option = new(value); } } + public Dictionary? EDLDG9 { get { return this.EDLDG9Option; } set { this.EDLDG9Option = new Option?>(value); } } /// /// Used to track the state of EDLDG10 @@ -869,7 +869,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG10 /// [JsonPropertyName("eDL_DG10")] - public Dictionary? EDLDG10 { get { return this.EDLDG10Option; } set { this.EDLDG10Option = new(value); } } + public Dictionary? EDLDG10 { get { return this.EDLDG10Option; } set { this.EDLDG10Option = new Option?>(value); } } /// /// Used to track the state of EDLDG11 @@ -882,7 +882,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG11 /// [JsonPropertyName("eDL_DG11")] - public Dictionary? EDLDG11 { get { return this.EDLDG11Option; } set { this.EDLDG11Option = new(value); } } + public Dictionary? EDLDG11 { get { return this.EDLDG11Option; } set { this.EDLDG11Option = new Option?>(value); } } /// /// Used to track the state of EDLDG12 @@ -895,7 +895,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG12 /// [JsonPropertyName("eDL_DG12")] - public Dictionary? EDLDG12 { get { return this.EDLDG12Option; } set { this.EDLDG12Option = new(value); } } + public Dictionary? EDLDG12 { get { return this.EDLDG12Option; } set { this.EDLDG12Option = new Option?>(value); } } /// /// Used to track the state of EDLDG13 @@ -908,7 +908,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG13 /// [JsonPropertyName("eDL_DG13")] - public Dictionary? EDLDG13 { get { return this.EDLDG13Option; } set { this.EDLDG13Option = new(value); } } + public Dictionary? EDLDG13 { get { return this.EDLDG13Option; } set { this.EDLDG13Option = new Option?>(value); } } /// /// Used to track the state of EDLDG14 @@ -921,7 +921,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG14 /// [JsonPropertyName("eDL_DG14")] - public Dictionary? EDLDG14 { get { return this.EDLDG14Option; } set { this.EDLDG14Option = new(value); } } + public Dictionary? EDLDG14 { get { return this.EDLDG14Option; } set { this.EDLDG14Option = new Option?>(value); } } /// /// Used to track the state of VisibleDigitalSeal @@ -934,7 +934,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets VisibleDigitalSeal /// [JsonPropertyName("Visible_Digital_Seal")] - public Dictionary? VisibleDigitalSeal { get { return this.VisibleDigitalSealOption; } set { this.VisibleDigitalSealOption = new(value); } } + public Dictionary? VisibleDigitalSeal { get { return this.VisibleDigitalSealOption; } set { this.VisibleDigitalSealOption = new Option?>(value); } } /// /// Used to track the state of VisibleDigitalSealNC @@ -947,7 +947,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets VisibleDigitalSealNC /// [JsonPropertyName("Visible_Digital_Seal_NC")] - public Dictionary? VisibleDigitalSealNC { get { return this.VisibleDigitalSealNCOption; } set { this.VisibleDigitalSealNCOption = new(value); } } + public Dictionary? VisibleDigitalSealNC { get { return this.VisibleDigitalSealNCOption; } set { this.VisibleDigitalSealNCOption = new Option?>(value); } } /// /// Used to track the state of DigitalSignature @@ -960,7 +960,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets DigitalSignature /// [JsonPropertyName("Digital_Signature")] - public Dictionary? DigitalSignature { get { return this.DigitalSignatureOption; } set { this.DigitalSignatureOption = new(value); } } + public Dictionary? DigitalSignature { get { return this.DigitalSignatureOption; } set { this.DigitalSignatureOption = new Option?>(value); } } /// /// Used to track the state of RFIDSessionData @@ -973,7 +973,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDSessionData /// [JsonPropertyName("RFID_Session_Data")] - public RfidSessionData? RFIDSessionData { get { return this.RFIDSessionDataOption; } set { this.RFIDSessionDataOption = new(value); } } + public RfidSessionData? RFIDSessionData { get { return this.RFIDSessionDataOption; } set { this.RFIDSessionDataOption = new Option(value); } } /// /// Used to track the state of RFIDSessionDataStatus @@ -986,7 +986,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDSessionDataStatus /// [JsonPropertyName("RFID_Session_Data_Status")] - public DetailsRFID? RFIDSessionDataStatus { get { return this.RFIDSessionDataStatusOption; } set { this.RFIDSessionDataStatusOption = new(value); } } + public DetailsRFID? RFIDSessionDataStatus { get { return this.RFIDSessionDataStatusOption; } set { this.RFIDSessionDataStatusOption = new Option(value); } } /// /// Used to track the state of RFIDEPasspDirectory @@ -1000,7 +1000,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// /// Indexes of groups that aren't read [JsonPropertyName("RFID_ePassp_Directory")] - public List? RFIDEPasspDirectory { get { return this.RFIDEPasspDirectoryOption; } set { this.RFIDEPasspDirectoryOption = new(value); } } + public List? RFIDEPasspDirectory { get { return this.RFIDEPasspDirectoryOption; } set { this.RFIDEPasspDirectoryOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs index d9292b3..4dfc022 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs @@ -54,7 +54,7 @@ public CandidatesListItem(Option candidatesList = /// Gets or Sets CandidatesList /// [JsonPropertyName("CandidatesList")] - public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new(value); } } + public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs index 844eccc..bd55ed5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs @@ -152,7 +152,7 @@ public ChosenDocumentType(string documentName, int iD, decimal p, int rotated180 /// Gets or Sets RotationAngle /// [JsonPropertyName("RotationAngle")] - public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new(value); } } + public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs index 5ff2612..2e0f44d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs @@ -63,7 +63,7 @@ public ContainerList(List list, Option count = default) /// /// Length of list (Count for items) [JsonPropertyName("Count")] - public int? Count { get { return this.CountOption; } set { this.CountOption = new(value); } } + public int? Count { get { return this.CountOption; } set { this.CountOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs new file mode 100644 index 0000000..cfd6388 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs @@ -0,0 +1,1152 @@ +// +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.4.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +#nullable enable + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using System.Text.Json; +using System.Text.Json.Serialization; +using System.ComponentModel.DataAnnotations; +using Regula.DocumentReader.WebClient.Client; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// ContainerListListInner + /// + public partial class ContainerListListInner : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(StatusResult statusResult) + { + StatusResult = statusResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(TextResult textResult) + { + TextResult = textResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocumentImageResult documentImageResult) + { + DocumentImageResult = documentImageResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(ImagesResult imagesResult) + { + ImagesResult = imagesResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(ChosenDocumentTypeResult chosenDocumentTypeResult) + { + ChosenDocumentTypeResult = chosenDocumentTypeResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocumentTypesCandidatesResult documentTypesCandidatesResult) + { + DocumentTypesCandidatesResult = documentTypesCandidatesResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(TextDataResult textDataResult) + { + TextDataResult = textDataResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(GraphicsResult graphicsResult) + { + GraphicsResult = graphicsResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(LexicalAnalysisResult lexicalAnalysisResult) + { + LexicalAnalysisResult = lexicalAnalysisResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(AuthenticityResult authenticityResult) + { + AuthenticityResult = authenticityResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(ImageQualityResult imageQualityResult) + { + ImageQualityResult = imageQualityResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocumentPositionResult documentPositionResult) + { + DocumentPositionResult = documentPositionResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocBarCodeInfo docBarCodeInfo) + { + DocBarCodeInfo = docBarCodeInfo; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(LicenseResult licenseResult) + { + LicenseResult = licenseResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(EncryptedRCLResult encryptedRCLResult) + { + EncryptedRCLResult = encryptedRCLResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(DocumentBinaryInfoResult documentBinaryInfoResult) + { + DocumentBinaryInfoResult = documentBinaryInfoResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(ByteArrayResult byteArrayResult) + { + ByteArrayResult = byteArrayResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(FaceDetectionResult faceDetectionResult) + { + FaceDetectionResult = faceDetectionResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(MRZDetectorResult mRZDetectorResult) + { + MRZDetectorResult = mRZDetectorResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(MRZPositionResult mRZPositionResult) + { + MRZPositionResult = mRZPositionResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(MRZTestQualityResult mRZTestQualityResult) + { + MRZTestQualityResult = mRZTestQualityResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(RFIDGraphicsInfoResult rFIDGraphicsInfoResult) + { + RFIDGraphicsInfoResult = rFIDGraphicsInfoResult; + OnCreated(); + } + + /// + /// Initializes a new instance of the class. + /// + /// + public ContainerListListInner(RFIDTextDataResult rFIDTextDataResult) + { + RFIDTextDataResult = rFIDTextDataResult; + OnCreated(); + } + + partial void OnCreated(); + + /// + /// Gets or Sets StatusResult + /// + public StatusResult? StatusResult { get; set; } + + /// + /// Gets or Sets TextResult + /// + public TextResult? TextResult { get; set; } + + /// + /// Gets or Sets DocumentImageResult + /// + public DocumentImageResult? DocumentImageResult { get; set; } + + /// + /// Gets or Sets ImagesResult + /// + public ImagesResult? ImagesResult { get; set; } + + /// + /// Gets or Sets ChosenDocumentTypeResult + /// + public ChosenDocumentTypeResult? ChosenDocumentTypeResult { get; set; } + + /// + /// Gets or Sets DocumentTypesCandidatesResult + /// + public DocumentTypesCandidatesResult? DocumentTypesCandidatesResult { get; set; } + + /// + /// Gets or Sets TextDataResult + /// + public TextDataResult? TextDataResult { get; set; } + + /// + /// Gets or Sets GraphicsResult + /// + public GraphicsResult? GraphicsResult { get; set; } + + /// + /// Gets or Sets LexicalAnalysisResult + /// + public LexicalAnalysisResult? LexicalAnalysisResult { get; set; } + + /// + /// Gets or Sets AuthenticityResult + /// + public AuthenticityResult? AuthenticityResult { get; set; } + + /// + /// Gets or Sets ImageQualityResult + /// + public ImageQualityResult? ImageQualityResult { get; set; } + + /// + /// Gets or Sets DocumentPositionResult + /// + public DocumentPositionResult? DocumentPositionResult { get; set; } + + /// + /// Gets or Sets DocBarCodeInfo + /// + public DocBarCodeInfo? DocBarCodeInfo { get; set; } + + /// + /// Gets or Sets LicenseResult + /// + public LicenseResult? LicenseResult { get; set; } + + /// + /// Gets or Sets EncryptedRCLResult + /// + public EncryptedRCLResult? EncryptedRCLResult { get; set; } + + /// + /// Gets or Sets DocumentBinaryInfoResult + /// + public DocumentBinaryInfoResult? DocumentBinaryInfoResult { get; set; } + + /// + /// Gets or Sets ByteArrayResult + /// + public ByteArrayResult? ByteArrayResult { get; set; } + + /// + /// Gets or Sets FaceDetectionResult + /// + public FaceDetectionResult? FaceDetectionResult { get; set; } + + /// + /// Gets or Sets MRZDetectorResult + /// + public MRZDetectorResult? MRZDetectorResult { get; set; } + + /// + /// Gets or Sets MRZPositionResult + /// + public MRZPositionResult? MRZPositionResult { get; set; } + + /// + /// Gets or Sets MRZTestQualityResult + /// + public MRZTestQualityResult? MRZTestQualityResult { get; set; } + + /// + /// Gets or Sets RFIDGraphicsInfoResult + /// + public RFIDGraphicsInfoResult? RFIDGraphicsInfoResult { get; set; } + + /// + /// Gets or Sets RFIDTextDataResult + /// + public RFIDTextDataResult? RFIDTextDataResult { get; set; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class ContainerListListInner {\n"); + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + return this.BaseValidate(validationContext); + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// A Json converter for type + /// + public class ContainerListListInnerJsonConverter : JsonConverter + { + /// + /// Deserializes json to + /// + /// + /// + /// + /// + /// + public override ContainerListListInner Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + { + int currentDepth = utf8JsonReader.CurrentDepth; + + if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) + throw new JsonException(); + + JsonTokenType startingTokenType = utf8JsonReader.TokenType; + + Option resultType = default; + + StatusResult? statusResult = null; + TextResult? textResult = null; + DocumentImageResult? documentImageResult = null; + ImagesResult? imagesResult = null; + ChosenDocumentTypeResult? chosenDocumentTypeResult = null; + DocumentTypesCandidatesResult? documentTypesCandidatesResult = null; + TextDataResult? textDataResult = null; + GraphicsResult? graphicsResult = null; + LexicalAnalysisResult? lexicalAnalysisResult = null; + AuthenticityResult? authenticityResult = null; + ImageQualityResult? imageQualityResult = null; + DocumentPositionResult? documentPositionResult = null; + DocBarCodeInfo? docBarCodeInfo = null; + LicenseResult? licenseResult = null; + EncryptedRCLResult? encryptedRCLResult = null; + DocumentBinaryInfoResult? documentBinaryInfoResult = null; + ByteArrayResult? byteArrayResult = null; + FaceDetectionResult? faceDetectionResult = null; + MRZDetectorResult? mRZDetectorResult = null; + MRZPositionResult? mRZPositionResult = null; + MRZTestQualityResult? mRZTestQualityResult = null; + RFIDGraphicsInfoResult? rFIDGraphicsInfoResult = null; + RFIDTextDataResult? rFIDTextDataResult = null; + + Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; + while (utf8JsonReaderDiscriminator.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) + break; + + if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); + utf8JsonReaderDiscriminator.Read(); + if (localVarJsonPropertyName?.Equals("result_type") ?? false) + { + string? discriminator = utf8JsonReaderDiscriminator.GetString(); + if (discriminator?.Equals("1") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; + documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); + } + if (discriminator?.Equals("101") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; + documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("102") ?? false) + { + Utf8JsonReader utf8JsonReaderRFIDTextDataResult = utf8JsonReader; + rFIDTextDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("103") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("104") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; + documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("105") ?? false) + { + Utf8JsonReader utf8JsonReaderRFIDGraphicsInfoResult = utf8JsonReader; + rFIDGraphicsInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDGraphicsInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("109") ?? false) + { + Utf8JsonReader utf8JsonReaderByteArrayResult = utf8JsonReader; + byteArrayResult = JsonSerializer.Deserialize(ref utf8JsonReaderByteArrayResult, jsonSerializerOptions); + } + if (discriminator?.Equals("15") ?? false) + { + Utf8JsonReader utf8JsonReaderLexicalAnalysisResult = utf8JsonReader; + lexicalAnalysisResult = JsonSerializer.Deserialize(ref utf8JsonReaderLexicalAnalysisResult, jsonSerializerOptions); + } + if (discriminator?.Equals("16") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; + documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); + } + if (discriminator?.Equals("17") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("18") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("19") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("20") ?? false) + { + Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; + authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("26") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("3") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("30") ?? false) + { + Utf8JsonReader utf8JsonReaderImageQualityResult = utf8JsonReader; + imageQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderImageQualityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("32") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("33") ?? false) + { + Utf8JsonReader utf8JsonReaderStatusResult = utf8JsonReader; + statusResult = JsonSerializer.Deserialize(ref utf8JsonReaderStatusResult, jsonSerializerOptions); + } + if (discriminator?.Equals("34") ?? false) + { + Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; + authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("35") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("36") ?? false) + { + Utf8JsonReader utf8JsonReaderTextResult = utf8JsonReader; + textResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextResult, jsonSerializerOptions); + } + if (discriminator?.Equals("37") ?? false) + { + Utf8JsonReader utf8JsonReaderImagesResult = utf8JsonReader; + imagesResult = JsonSerializer.Deserialize(ref utf8JsonReaderImagesResult, jsonSerializerOptions); + } + if (discriminator?.Equals("38") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("39") ?? false) + { + Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; + authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("49") ?? false) + { + Utf8JsonReader utf8JsonReaderEncryptedRCLResult = utf8JsonReader; + encryptedRCLResult = JsonSerializer.Deserialize(ref utf8JsonReaderEncryptedRCLResult, jsonSerializerOptions); + } + if (discriminator?.Equals("5") ?? false) + { + Utf8JsonReader utf8JsonReaderDocBarCodeInfo = utf8JsonReader; + docBarCodeInfo = JsonSerializer.Deserialize(ref utf8JsonReaderDocBarCodeInfo, jsonSerializerOptions); + } + if (discriminator?.Equals("50") ?? false) + { + Utf8JsonReader utf8JsonReaderLicenseResult = utf8JsonReader; + licenseResult = JsonSerializer.Deserialize(ref utf8JsonReaderLicenseResult, jsonSerializerOptions); + } + if (discriminator?.Equals("6") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("61") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZPositionResult = utf8JsonReader; + mRZPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("62") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; + documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("7") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZTestQualityResult = utf8JsonReader; + mRZTestQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZTestQualityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("8") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentTypesCandidatesResult = utf8JsonReader; + documentTypesCandidatesResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentTypesCandidatesResult, jsonSerializerOptions); + } + if (discriminator?.Equals("85") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; + documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("87") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZDetectorResult = utf8JsonReader; + mRZDetectorResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZDetectorResult, jsonSerializerOptions); + } + if (discriminator?.Equals("9") ?? false) + { + Utf8JsonReader utf8JsonReaderChosenDocumentTypeResult = utf8JsonReader; + chosenDocumentTypeResult = JsonSerializer.Deserialize(ref utf8JsonReaderChosenDocumentTypeResult, jsonSerializerOptions); + } + if (discriminator?.Equals("97") ?? false) + { + Utf8JsonReader utf8JsonReaderFaceDetectionResult = utf8JsonReader; + faceDetectionResult = JsonSerializer.Deserialize(ref utf8JsonReaderFaceDetectionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("AuthenticityResult") ?? false) + { + Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; + authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("ByteArrayResult") ?? false) + { + Utf8JsonReader utf8JsonReaderByteArrayResult = utf8JsonReader; + byteArrayResult = JsonSerializer.Deserialize(ref utf8JsonReaderByteArrayResult, jsonSerializerOptions); + } + if (discriminator?.Equals("ChosenDocumentTypeResult") ?? false) + { + Utf8JsonReader utf8JsonReaderChosenDocumentTypeResult = utf8JsonReader; + chosenDocumentTypeResult = JsonSerializer.Deserialize(ref utf8JsonReaderChosenDocumentTypeResult, jsonSerializerOptions); + } + if (discriminator?.Equals("DocBarCodeInfo") ?? false) + { + Utf8JsonReader utf8JsonReaderDocBarCodeInfo = utf8JsonReader; + docBarCodeInfo = JsonSerializer.Deserialize(ref utf8JsonReaderDocBarCodeInfo, jsonSerializerOptions); + } + if (discriminator?.Equals("DocumentBinaryInfoResult") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; + documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("DocumentImageResult") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; + documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); + } + if (discriminator?.Equals("DocumentPositionResult") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; + documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("DocumentTypesCandidatesResult") ?? false) + { + Utf8JsonReader utf8JsonReaderDocumentTypesCandidatesResult = utf8JsonReader; + documentTypesCandidatesResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentTypesCandidatesResult, jsonSerializerOptions); + } + if (discriminator?.Equals("EncryptedRCLResult") ?? false) + { + Utf8JsonReader utf8JsonReaderEncryptedRCLResult = utf8JsonReader; + encryptedRCLResult = JsonSerializer.Deserialize(ref utf8JsonReaderEncryptedRCLResult, jsonSerializerOptions); + } + if (discriminator?.Equals("FaceDetectionResult") ?? false) + { + Utf8JsonReader utf8JsonReaderFaceDetectionResult = utf8JsonReader; + faceDetectionResult = JsonSerializer.Deserialize(ref utf8JsonReaderFaceDetectionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("GraphicsResult") ?? false) + { + Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; + graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); + } + if (discriminator?.Equals("ImageQualityResult") ?? false) + { + Utf8JsonReader utf8JsonReaderImageQualityResult = utf8JsonReader; + imageQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderImageQualityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("ImagesResult") ?? false) + { + Utf8JsonReader utf8JsonReaderImagesResult = utf8JsonReader; + imagesResult = JsonSerializer.Deserialize(ref utf8JsonReaderImagesResult, jsonSerializerOptions); + } + if (discriminator?.Equals("LexicalAnalysisResult") ?? false) + { + Utf8JsonReader utf8JsonReaderLexicalAnalysisResult = utf8JsonReader; + lexicalAnalysisResult = JsonSerializer.Deserialize(ref utf8JsonReaderLexicalAnalysisResult, jsonSerializerOptions); + } + if (discriminator?.Equals("LicenseResult") ?? false) + { + Utf8JsonReader utf8JsonReaderLicenseResult = utf8JsonReader; + licenseResult = JsonSerializer.Deserialize(ref utf8JsonReaderLicenseResult, jsonSerializerOptions); + } + if (discriminator?.Equals("MRZDetectorResult") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZDetectorResult = utf8JsonReader; + mRZDetectorResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZDetectorResult, jsonSerializerOptions); + } + if (discriminator?.Equals("MRZPositionResult") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZPositionResult = utf8JsonReader; + mRZPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZPositionResult, jsonSerializerOptions); + } + if (discriminator?.Equals("MRZTestQualityResult") ?? false) + { + Utf8JsonReader utf8JsonReaderMRZTestQualityResult = utf8JsonReader; + mRZTestQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZTestQualityResult, jsonSerializerOptions); + } + if (discriminator?.Equals("RFIDGraphicsInfoResult") ?? false) + { + Utf8JsonReader utf8JsonReaderRFIDGraphicsInfoResult = utf8JsonReader; + rFIDGraphicsInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDGraphicsInfoResult, jsonSerializerOptions); + } + if (discriminator?.Equals("RFIDTextDataResult") ?? false) + { + Utf8JsonReader utf8JsonReaderRFIDTextDataResult = utf8JsonReader; + rFIDTextDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("StatusResult") ?? false) + { + Utf8JsonReader utf8JsonReaderStatusResult = utf8JsonReader; + statusResult = JsonSerializer.Deserialize(ref utf8JsonReaderStatusResult, jsonSerializerOptions); + } + if (discriminator?.Equals("TextDataResult") ?? false) + { + Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; + textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); + } + if (discriminator?.Equals("TextResult") ?? false) + { + Utf8JsonReader utf8JsonReaderTextResult = utf8JsonReader; + textResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextResult, jsonSerializerOptions); + } + } + } + } + + while (utf8JsonReader.Read()) + { + if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) + break; + + if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + { + string? localVarJsonPropertyName = utf8JsonReader.GetString(); + utf8JsonReader.Read(); + + switch (localVarJsonPropertyName) + { + case "result_type": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + resultType = new Option(utf8JsonReader.GetInt32()); + break; + default: + break; + } + } + } + + if (!resultType.IsSet) + throw new ArgumentException("Property is required for class ContainerListListInner.", nameof(resultType)); + + if (resultType.IsSet && resultType.Value == null) + throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ContainerListListInner."); + + if (documentImageResult != null) + return new ContainerListListInner(documentImageResult); + + if (documentBinaryInfoResult != null) + return new ContainerListListInner(documentBinaryInfoResult); + + if (rFIDTextDataResult != null) + return new ContainerListListInner(rFIDTextDataResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (documentBinaryInfoResult != null) + return new ContainerListListInner(documentBinaryInfoResult); + + if (rFIDGraphicsInfoResult != null) + return new ContainerListListInner(rFIDGraphicsInfoResult); + + if (byteArrayResult != null) + return new ContainerListListInner(byteArrayResult); + + if (lexicalAnalysisResult != null) + return new ContainerListListInner(lexicalAnalysisResult); + + if (documentImageResult != null) + return new ContainerListListInner(documentImageResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (authenticityResult != null) + return new ContainerListListInner(authenticityResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (imageQualityResult != null) + return new ContainerListListInner(imageQualityResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (statusResult != null) + return new ContainerListListInner(statusResult); + + if (authenticityResult != null) + return new ContainerListListInner(authenticityResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (textResult != null) + return new ContainerListListInner(textResult); + + if (imagesResult != null) + return new ContainerListListInner(imagesResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (authenticityResult != null) + return new ContainerListListInner(authenticityResult); + + if (encryptedRCLResult != null) + return new ContainerListListInner(encryptedRCLResult); + + if (docBarCodeInfo != null) + return new ContainerListListInner(docBarCodeInfo); + + if (licenseResult != null) + return new ContainerListListInner(licenseResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (mRZPositionResult != null) + return new ContainerListListInner(mRZPositionResult); + + if (documentPositionResult != null) + return new ContainerListListInner(documentPositionResult); + + if (mRZTestQualityResult != null) + return new ContainerListListInner(mRZTestQualityResult); + + if (documentTypesCandidatesResult != null) + return new ContainerListListInner(documentTypesCandidatesResult); + + if (documentPositionResult != null) + return new ContainerListListInner(documentPositionResult); + + if (mRZDetectorResult != null) + return new ContainerListListInner(mRZDetectorResult); + + if (chosenDocumentTypeResult != null) + return new ContainerListListInner(chosenDocumentTypeResult); + + if (faceDetectionResult != null) + return new ContainerListListInner(faceDetectionResult); + + if (authenticityResult != null) + return new ContainerListListInner(authenticityResult); + + if (byteArrayResult != null) + return new ContainerListListInner(byteArrayResult); + + if (chosenDocumentTypeResult != null) + return new ContainerListListInner(chosenDocumentTypeResult); + + if (docBarCodeInfo != null) + return new ContainerListListInner(docBarCodeInfo); + + if (documentBinaryInfoResult != null) + return new ContainerListListInner(documentBinaryInfoResult); + + if (documentImageResult != null) + return new ContainerListListInner(documentImageResult); + + if (documentPositionResult != null) + return new ContainerListListInner(documentPositionResult); + + if (documentTypesCandidatesResult != null) + return new ContainerListListInner(documentTypesCandidatesResult); + + if (encryptedRCLResult != null) + return new ContainerListListInner(encryptedRCLResult); + + if (faceDetectionResult != null) + return new ContainerListListInner(faceDetectionResult); + + if (graphicsResult != null) + return new ContainerListListInner(graphicsResult); + + if (imageQualityResult != null) + return new ContainerListListInner(imageQualityResult); + + if (imagesResult != null) + return new ContainerListListInner(imagesResult); + + if (lexicalAnalysisResult != null) + return new ContainerListListInner(lexicalAnalysisResult); + + if (licenseResult != null) + return new ContainerListListInner(licenseResult); + + if (mRZDetectorResult != null) + return new ContainerListListInner(mRZDetectorResult); + + if (mRZPositionResult != null) + return new ContainerListListInner(mRZPositionResult); + + if (mRZTestQualityResult != null) + return new ContainerListListInner(mRZTestQualityResult); + + if (rFIDGraphicsInfoResult != null) + return new ContainerListListInner(rFIDGraphicsInfoResult); + + if (rFIDTextDataResult != null) + return new ContainerListListInner(rFIDTextDataResult); + + if (statusResult != null) + return new ContainerListListInner(statusResult); + + if (textDataResult != null) + return new ContainerListListInner(textDataResult); + + if (textResult != null) + return new ContainerListListInner(textResult); + + throw new JsonException(); + } + + /// + /// Serializes a + /// + /// + /// + /// + /// + public override void Write(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteStartObject(); + + if (containerListListInner.StatusResult != null) + { + StatusResultJsonConverter statusResultJsonConverter = (StatusResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.StatusResult.GetType())); + statusResultJsonConverter.WriteProperties(writer, containerListListInner.StatusResult, jsonSerializerOptions); + } + + if (containerListListInner.TextResult != null) + { + TextResultJsonConverter textResultJsonConverter = (TextResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.TextResult.GetType())); + textResultJsonConverter.WriteProperties(writer, containerListListInner.TextResult, jsonSerializerOptions); + } + + if (containerListListInner.DocumentImageResult != null) + { + DocumentImageResultJsonConverter documentImageResultJsonConverter = (DocumentImageResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentImageResult.GetType())); + documentImageResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentImageResult, jsonSerializerOptions); + } + + if (containerListListInner.ImagesResult != null) + { + ImagesResultJsonConverter imagesResultJsonConverter = (ImagesResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ImagesResult.GetType())); + imagesResultJsonConverter.WriteProperties(writer, containerListListInner.ImagesResult, jsonSerializerOptions); + } + + if (containerListListInner.ChosenDocumentTypeResult != null) + { + ChosenDocumentTypeResultJsonConverter chosenDocumentTypeResultJsonConverter = (ChosenDocumentTypeResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ChosenDocumentTypeResult.GetType())); + chosenDocumentTypeResultJsonConverter.WriteProperties(writer, containerListListInner.ChosenDocumentTypeResult, jsonSerializerOptions); + } + + if (containerListListInner.DocumentTypesCandidatesResult != null) + { + DocumentTypesCandidatesResultJsonConverter documentTypesCandidatesResultJsonConverter = (DocumentTypesCandidatesResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentTypesCandidatesResult.GetType())); + documentTypesCandidatesResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentTypesCandidatesResult, jsonSerializerOptions); + } + + if (containerListListInner.TextDataResult != null) + { + TextDataResultJsonConverter textDataResultJsonConverter = (TextDataResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.TextDataResult.GetType())); + textDataResultJsonConverter.WriteProperties(writer, containerListListInner.TextDataResult, jsonSerializerOptions); + } + + if (containerListListInner.GraphicsResult != null) + { + GraphicsResultJsonConverter graphicsResultJsonConverter = (GraphicsResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.GraphicsResult.GetType())); + graphicsResultJsonConverter.WriteProperties(writer, containerListListInner.GraphicsResult, jsonSerializerOptions); + } + + if (containerListListInner.LexicalAnalysisResult != null) + { + LexicalAnalysisResultJsonConverter lexicalAnalysisResultJsonConverter = (LexicalAnalysisResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.LexicalAnalysisResult.GetType())); + lexicalAnalysisResultJsonConverter.WriteProperties(writer, containerListListInner.LexicalAnalysisResult, jsonSerializerOptions); + } + + if (containerListListInner.AuthenticityResult != null) + { + AuthenticityResultJsonConverter authenticityResultJsonConverter = (AuthenticityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.AuthenticityResult.GetType())); + authenticityResultJsonConverter.WriteProperties(writer, containerListListInner.AuthenticityResult, jsonSerializerOptions); + } + + if (containerListListInner.ImageQualityResult != null) + { + ImageQualityResultJsonConverter imageQualityResultJsonConverter = (ImageQualityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ImageQualityResult.GetType())); + imageQualityResultJsonConverter.WriteProperties(writer, containerListListInner.ImageQualityResult, jsonSerializerOptions); + } + + if (containerListListInner.DocumentPositionResult != null) + { + DocumentPositionResultJsonConverter documentPositionResultJsonConverter = (DocumentPositionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentPositionResult.GetType())); + documentPositionResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentPositionResult, jsonSerializerOptions); + } + + if (containerListListInner.DocBarCodeInfo != null) + { + DocBarCodeInfoJsonConverter docBarCodeInfoJsonConverter = (DocBarCodeInfoJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocBarCodeInfo.GetType())); + docBarCodeInfoJsonConverter.WriteProperties(writer, containerListListInner.DocBarCodeInfo, jsonSerializerOptions); + } + + if (containerListListInner.LicenseResult != null) + { + LicenseResultJsonConverter licenseResultJsonConverter = (LicenseResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.LicenseResult.GetType())); + licenseResultJsonConverter.WriteProperties(writer, containerListListInner.LicenseResult, jsonSerializerOptions); + } + + if (containerListListInner.EncryptedRCLResult != null) + { + EncryptedRCLResultJsonConverter encryptedRCLResultJsonConverter = (EncryptedRCLResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.EncryptedRCLResult.GetType())); + encryptedRCLResultJsonConverter.WriteProperties(writer, containerListListInner.EncryptedRCLResult, jsonSerializerOptions); + } + + if (containerListListInner.DocumentBinaryInfoResult != null) + { + DocumentBinaryInfoResultJsonConverter documentBinaryInfoResultJsonConverter = (DocumentBinaryInfoResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentBinaryInfoResult.GetType())); + documentBinaryInfoResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentBinaryInfoResult, jsonSerializerOptions); + } + + if (containerListListInner.ByteArrayResult != null) + { + ByteArrayResultJsonConverter byteArrayResultJsonConverter = (ByteArrayResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ByteArrayResult.GetType())); + byteArrayResultJsonConverter.WriteProperties(writer, containerListListInner.ByteArrayResult, jsonSerializerOptions); + } + + if (containerListListInner.FaceDetectionResult != null) + { + FaceDetectionResultJsonConverter faceDetectionResultJsonConverter = (FaceDetectionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.FaceDetectionResult.GetType())); + faceDetectionResultJsonConverter.WriteProperties(writer, containerListListInner.FaceDetectionResult, jsonSerializerOptions); + } + + if (containerListListInner.MRZDetectorResult != null) + { + MRZDetectorResultJsonConverter mRZDetectorResultJsonConverter = (MRZDetectorResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZDetectorResult.GetType())); + mRZDetectorResultJsonConverter.WriteProperties(writer, containerListListInner.MRZDetectorResult, jsonSerializerOptions); + } + + if (containerListListInner.MRZPositionResult != null) + { + MRZPositionResultJsonConverter mRZPositionResultJsonConverter = (MRZPositionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZPositionResult.GetType())); + mRZPositionResultJsonConverter.WriteProperties(writer, containerListListInner.MRZPositionResult, jsonSerializerOptions); + } + + if (containerListListInner.MRZTestQualityResult != null) + { + MRZTestQualityResultJsonConverter mRZTestQualityResultJsonConverter = (MRZTestQualityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZTestQualityResult.GetType())); + mRZTestQualityResultJsonConverter.WriteProperties(writer, containerListListInner.MRZTestQualityResult, jsonSerializerOptions); + } + + if (containerListListInner.RFIDGraphicsInfoResult != null) + { + RFIDGraphicsInfoResultJsonConverter rFIDGraphicsInfoResultJsonConverter = (RFIDGraphicsInfoResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.RFIDGraphicsInfoResult.GetType())); + rFIDGraphicsInfoResultJsonConverter.WriteProperties(writer, containerListListInner.RFIDGraphicsInfoResult, jsonSerializerOptions); + } + + if (containerListListInner.RFIDTextDataResult != null) + { + RFIDTextDataResultJsonConverter rFIDTextDataResultJsonConverter = (RFIDTextDataResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.RFIDTextDataResult.GetType())); + rFIDTextDataResultJsonConverter.WriteProperties(writer, containerListListInner.RFIDTextDataResult, jsonSerializerOptions); + } + + WriteProperties(writer, containerListListInner, jsonSerializerOptions); + writer.WriteEndObject(); + } + + /// + /// Serializes the properties of + /// + /// + /// + /// + /// + public void WriteProperties(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) + { + writer.WriteNumber("result_type", containerListListInner.ResultType); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs index 0bb73fe..8f4b7e1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs @@ -80,7 +80,7 @@ public DataModule(string mData, int mLength, BarCodeModuleType mType, Option [JsonPropertyName("mReserved1")] - public int? MReserved1 { get { return this.MReserved1Option; } set { this.MReserved1Option = new(value); } } + public int? MReserved1 { get { return this.MReserved1Option; } set { this.MReserved1Option = new Option(value); } } /// /// Used to track the state of MReserver2 @@ -93,7 +93,7 @@ public DataModule(string mData, int mLength, BarCodeModuleType mType, Option [JsonPropertyName("mReserver2")] - public int? MReserver2 { get { return this.MReserver2Option; } set { this.MReserver2Option = new(value); } } + public int? MReserver2 { get { return this.MReserver2Option; } set { this.MReserver2Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs index 515920d..46efcfd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs @@ -119,7 +119,7 @@ public DetailsOptical(CheckResult overallStatus, CheckResult docType, CheckResul /// Gets or Sets Vds /// [JsonPropertyName("vds")] - public int? Vds { get { return this.VdsOption; } set { this.VdsOption = new(value); } } + public int? Vds { get { return this.VdsOption; } set { this.VdsOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs index 3b94f7f..61b96cd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs @@ -64,7 +64,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets AppName /// [JsonPropertyName("app-name")] - public string? AppName { get { return this.AppNameOption; } set { this.AppNameOption = new(value); } } + public string? AppName { get { return this.AppNameOption; } set { this.AppNameOption = new Option(value); } } /// /// Used to track the state of VarVersion @@ -77,7 +77,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets VarVersion /// [JsonPropertyName("version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new Option(value); } } /// /// Used to track the state of LicenseId @@ -90,7 +90,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets LicenseId /// [JsonPropertyName("license-id")] - public string? LicenseId { get { return this.LicenseIdOption; } set { this.LicenseIdOption = new(value); } } + public string? LicenseId { get { return this.LicenseIdOption; } set { this.LicenseIdOption = new Option(value); } } /// /// Used to track the state of LicenseSerial @@ -103,7 +103,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets LicenseSerial /// [JsonPropertyName("license-serial")] - public string? LicenseSerial { get { return this.LicenseSerialOption; } set { this.LicenseSerialOption = new(value); } } + public string? LicenseSerial { get { return this.LicenseSerialOption; } set { this.LicenseSerialOption = new Option(value); } } /// /// Used to track the state of ValidUntil @@ -116,7 +116,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets ValidUntil /// [JsonPropertyName("valid-until")] - public DateTime? ValidUntil { get { return this.ValidUntilOption; } set { this.ValidUntilOption = new(value); } } + public DateTime? ValidUntil { get { return this.ValidUntilOption; } set { this.ValidUntilOption = new Option(value); } } /// /// Used to track the state of ServerTime @@ -129,7 +129,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets ServerTime /// [JsonPropertyName("server-time")] - public DateTime? ServerTime { get { return this.ServerTimeOption; } set { this.ServerTimeOption = new(value); } } + public DateTime? ServerTime { get { return this.ServerTimeOption; } set { this.ServerTimeOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs index 75b1b9c..deb64a4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs @@ -65,7 +65,7 @@ public DocumentImage(string image, Option format = default) /// /// Image format [JsonPropertyName("format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs index a94a5de..783e9e0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs @@ -145,7 +145,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets Inverse /// [JsonPropertyName("Inverse")] - public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new(value); } } + public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new Option(value); } } /// /// Used to track the state of ObjArea @@ -158,7 +158,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets ObjArea /// [JsonPropertyName("ObjArea")] - public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new(value); } } + public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new Option(value); } } /// /// Used to track the state of ObjIntAngleDev @@ -171,7 +171,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets ObjIntAngleDev /// [JsonPropertyName("ObjIntAngleDev")] - public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new(value); } } + public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new Option(value); } } /// /// Used to track the state of PerspectiveTr @@ -184,7 +184,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets PerspectiveTr /// [JsonPropertyName("PerspectiveTr")] - public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new(value); } } + public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new Option(value); } } /// /// Used to track the state of ResultStatus @@ -197,7 +197,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets ResultStatus /// [JsonPropertyName("ResultStatus")] - public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new(value); } } + public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs index c8a7e0d..ece1c33 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs @@ -56,7 +56,7 @@ public DocumentTypesCandidates(Option recResult /// Gets or Sets RecResult /// [JsonPropertyName("RecResult")] - public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new(value); } } + public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new Option(value); } } /// /// Used to track the state of Candidates @@ -69,7 +69,7 @@ public DocumentTypesCandidates(Option recResult /// Gets or Sets Candidates /// [JsonPropertyName("Candidates")] - public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new(value); } } + public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs index ff81ea6..5a886a6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs @@ -56,7 +56,7 @@ public DocumentTypesCandidatesList(Option recRes /// Gets or Sets RecResult /// [JsonPropertyName("RecResult")] - public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new(value); } } + public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new Option(value); } } /// /// Used to track the state of Candidates @@ -69,7 +69,7 @@ public DocumentTypesCandidatesList(Option recRes /// Gets or Sets Candidates /// [JsonPropertyName("Candidates")] - public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new(value); } } + public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs index 7172940..e41fc82 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs @@ -58,7 +58,7 @@ public DocumentTypesCandidatesResult(Option bufLength = default, Option [JsonPropertyName("CandidatesList")] - public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new(value); } } + public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs index 90a642a..fcf037e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs @@ -61,7 +61,7 @@ public DocumentsDatabase(Option description = default, Option /// /// Document database description [JsonPropertyName("Description")] - public string? Description { get { return this.DescriptionOption; } set { this.DescriptionOption = new(value); } } + public string? Description { get { return this.DescriptionOption; } set { this.DescriptionOption = new Option(value); } } /// /// Used to track the state of ExportDate @@ -75,7 +75,7 @@ public DocumentsDatabase(Option description = default, Option /// /// Date the document database was created [JsonPropertyName("ExportDate")] - public string? ExportDate { get { return this.ExportDateOption; } set { this.ExportDateOption = new(value); } } + public string? ExportDate { get { return this.ExportDateOption; } set { this.ExportDateOption = new Option(value); } } /// /// Used to track the state of ID @@ -89,7 +89,7 @@ public DocumentsDatabase(Option description = default, Option /// /// Document database identifier [JsonPropertyName("ID")] - public string? ID { get { return this.IDOption; } set { this.IDOption = new(value); } } + public string? ID { get { return this.IDOption; } set { this.IDOption = new Option(value); } } /// /// Used to track the state of VarVersion @@ -103,7 +103,7 @@ public DocumentsDatabase(Option description = default, Option /// /// Document database version [JsonPropertyName("Version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index 888805e..832d143 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs @@ -47,7 +47,7 @@ public EncryptedRCLItem(byte[] encryptedRCL) /// Base64 encoded data /// /// Base64 encoded data - /* [B@5eefd7ba */ + /* [B@5d92c7f5 */ [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs index d86c832..637c58c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs @@ -51,7 +51,7 @@ public EncryptedRCLResult(byte[] encryptedRCL, Option bufLength = default, /// Base64 encoded data /// /// Base64 encoded data - /* [B@5eefd7ba */ + /* [B@5d92c7f5 */ [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs index 35d7905..9a54b81 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs @@ -60,7 +60,7 @@ public ErrorCoordinates(Option left = default, Option top = /// Gets or Sets Left /// [JsonPropertyName("Left")] - public decimal? Left { get { return this.LeftOption; } set { this.LeftOption = new(value); } } + public decimal? Left { get { return this.LeftOption; } set { this.LeftOption = new Option(value); } } /// /// Used to track the state of Top @@ -73,7 +73,7 @@ public ErrorCoordinates(Option left = default, Option top = /// Gets or Sets Top /// [JsonPropertyName("Top")] - public decimal? Top { get { return this.TopOption; } set { this.TopOption = new(value); } } + public decimal? Top { get { return this.TopOption; } set { this.TopOption = new Option(value); } } /// /// Used to track the state of Right @@ -86,7 +86,7 @@ public ErrorCoordinates(Option left = default, Option top = /// Gets or Sets Right /// [JsonPropertyName("Right")] - public decimal? Right { get { return this.RightOption; } set { this.RightOption = new(value); } } + public decimal? Right { get { return this.RightOption; } set { this.RightOption = new Option(value); } } /// /// Used to track the state of Bottom @@ -99,7 +99,7 @@ public ErrorCoordinates(Option left = default, Option top = /// Gets or Sets Bottom /// [JsonPropertyName("Bottom")] - public decimal? Bottom { get { return this.BottomOption; } set { this.BottomOption = new(value); } } + public decimal? Bottom { get { return this.BottomOption; } set { this.BottomOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs index 2f9fdb5..7bdae73 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs @@ -138,7 +138,7 @@ public FDSIDList(string iCAOCode, decimal count, List list, DocumentType dT /// /// Document description [JsonPropertyName("dDescription")] - public string? DDescription { get { return this.DDescriptionOption; } set { this.DDescriptionOption = new(value); } } + public string? DDescription { get { return this.DDescriptionOption; } set { this.DDescriptionOption = new Option(value); } } /// /// Used to track the state of DStateCode @@ -152,7 +152,7 @@ public FDSIDList(string iCAOCode, decimal count, List list, DocumentType dT /// /// Issuing state code [JsonPropertyName("dStateCode")] - public string? DStateCode { get { return this.DStateCodeOption; } set { this.DStateCodeOption = new(value); } } + public string? DStateCode { get { return this.DStateCodeOption; } set { this.DStateCodeOption = new Option(value); } } /// /// Used to track the state of DStateName @@ -166,7 +166,7 @@ public FDSIDList(string iCAOCode, decimal count, List list, DocumentType dT /// /// Issuing state name [JsonPropertyName("dStateName")] - public string? DStateName { get { return this.DStateNameOption; } set { this.DStateNameOption = new(value); } } + public string? DStateName { get { return this.DStateNameOption; } set { this.DStateNameOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs index 3f1a3c1..3014add 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs @@ -74,7 +74,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The URL of the Regula Face Web service to be used. /* https://faceapi.regulaforensics.com */ [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } /// /// Used to track the state of Mode @@ -89,7 +89,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The processing mode: \"match\" or \"match+search\". /* match */ [JsonPropertyName("mode")] - public string? Mode { get { return this.ModeOption; } set { this.ModeOption = new(value); } } + public string? Mode { get { return this.ModeOption; } set { this.ModeOption = new Option(value); } } /// /// Used to track the state of Search @@ -102,7 +102,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Gets or Sets Search /// [JsonPropertyName("search")] - public FaceApiSearch? Search { get { return this.SearchOption; } set { this.SearchOption = new(value); } } + public FaceApiSearch? Search { get { return this.SearchOption; } set { this.SearchOption = new Option(value); } } /// /// Used to track the state of Threshold @@ -117,7 +117,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. /* 75 */ [JsonPropertyName("threshold")] - public int? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new(value); } } + public int? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new Option(value); } } /// /// Used to track the state of ServiceTimeout @@ -132,7 +132,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The Regula Face Web service requests timeout, ms. /* 3000 */ [JsonPropertyName("serviceTimeout")] - public int? ServiceTimeout { get { return this.ServiceTimeoutOption; } set { this.ServiceTimeoutOption = new(value); } } + public int? ServiceTimeout { get { return this.ServiceTimeoutOption; } set { this.ServiceTimeoutOption = new Option(value); } } /// /// Used to track the state of Proxy @@ -147,7 +147,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. /* http://localhost:8080 */ [JsonPropertyName("proxy")] - public string? Proxy { get { return this.ProxyOption; } set { this.ProxyOption = new(value); } } + public string? Proxy { get { return this.ProxyOption; } set { this.ProxyOption = new Option(value); } } /// /// Used to track the state of ProxyUserpwd @@ -162,7 +162,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. /* user:pass */ [JsonPropertyName("proxy_userpwd")] - public string? ProxyUserpwd { get { return this.ProxyUserpwdOption; } set { this.ProxyUserpwdOption = new(value); } } + public string? ProxyUserpwd { get { return this.ProxyUserpwdOption; } set { this.ProxyUserpwdOption = new Option(value); } } /// /// Used to track the state of ProxyType @@ -177,7 +177,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. /* 0 */ [JsonPropertyName("proxy_type")] - public int? ProxyType { get { return this.ProxyTypeOption; } set { this.ProxyTypeOption = new(value); } } + public int? ProxyType { get { return this.ProxyTypeOption; } set { this.ProxyTypeOption = new Option(value); } } /// /// Used to track the state of ChildAgeThreshold @@ -192,7 +192,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The age threshold for the portrait comparison. Default: 13. /* 13 */ [JsonPropertyName("childAgeThreshold")] - public int? ChildAgeThreshold { get { return this.ChildAgeThresholdOption; } set { this.ChildAgeThresholdOption = new(value); } } + public int? ChildAgeThreshold { get { return this.ChildAgeThresholdOption; } set { this.ChildAgeThresholdOption = new Option(value); } } /// /// Used to track the state of ChildDocValidityYears @@ -207,7 +207,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Estimated duration of validity for a child's passport, years. Default: 5. /* 5 */ [JsonPropertyName("childDocValidityYears")] - public int? ChildDocValidityYears { get { return this.ChildDocValidityYearsOption; } set { this.ChildDocValidityYearsOption = new(value); } } + public int? ChildDocValidityYears { get { return this.ChildDocValidityYearsOption; } set { this.ChildDocValidityYearsOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs index 383ffab..fa5664b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs @@ -59,7 +59,7 @@ public FaceApiSearch(Option limit = default, Option threshold = de /// /// The maximum number of results to be returned. [JsonPropertyName("limit")] - public int? Limit { get { return this.LimitOption; } set { this.LimitOption = new(value); } } + public int? Limit { get { return this.LimitOption; } set { this.LimitOption = new Option(value); } } /// /// Used to track the state of Threshold @@ -73,7 +73,7 @@ public FaceApiSearch(Option limit = default, Option threshold = de /// /// The similarity threshold. [JsonPropertyName("threshold")] - public float? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new(value); } } + public float? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new Option(value); } } /// /// Used to track the state of GroupIds @@ -87,7 +87,7 @@ public FaceApiSearch(Option limit = default, Option threshold = de /// /// The groups where to conduct the search. [JsonPropertyName("group_ids")] - public List? GroupIds { get { return this.GroupIdsOption; } set { this.GroupIdsOption = new(value); } } + public List? GroupIds { get { return this.GroupIdsOption; } set { this.GroupIdsOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs index 8c4e7f7..1aed8a7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs @@ -80,7 +80,7 @@ public FaceDetection(int count, int countFalseDetection, List res, Opt /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } /// /// Used to track the state of Reserved2 @@ -93,7 +93,7 @@ public FaceDetection(int count, int countFalseDetection, List res, Opt /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs index 01c92bb..03747b6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs @@ -70,7 +70,7 @@ public FiberItem(int rectCount, int expectedCount, List re /// Gets or Sets LightValue /// [JsonPropertyName("LightValue")] - public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new(value); } } + public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new Option(value); } } /// /// For UV_Fibers authenticity result type @@ -134,7 +134,7 @@ public FiberItem(int rectCount, int expectedCount, List re /// /// For UV_Background authentication result type [JsonPropertyName("LightDisp")] - public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new(value); } } + public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs index 67bbb1b..323c270 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs @@ -73,7 +73,7 @@ public FiberResult(int rectCount, int expectedCount, List /// Gets or Sets LightValue /// [JsonPropertyName("LightValue")] - public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new(value); } } + public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new Option(value); } } /// /// For UV_Fibers authenticity result type @@ -137,7 +137,7 @@ public FiberResult(int rectCount, int expectedCount, List /// /// For UV_Background authentication result type [JsonPropertyName("LightDisp")] - public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new(value); } } + public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs index 4e1e245..d919bbb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs @@ -59,7 +59,7 @@ public GetTransactionsByTagResponse(Option id = default, Option sta /// /// Transaction id [JsonPropertyName("id")] - public Guid? Id { get { return this.IdOption; } set { this.IdOption = new(value); } } + public Guid? Id { get { return this.IdOption; } set { this.IdOption = new Option(value); } } /// /// Used to track the state of State @@ -73,7 +73,7 @@ public GetTransactionsByTagResponse(Option id = default, Option sta /// /// Transaction status [JsonPropertyName("state")] - public int? State { get { return this.StateOption; } set { this.StateOption = new(value); } } + public int? State { get { return this.StateOption; } set { this.StateOption = new Option(value); } } /// /// Used to track the state of UpdatedAt @@ -87,7 +87,7 @@ public GetTransactionsByTagResponse(Option id = default, Option sta /// /// Last time updated [JsonPropertyName("updatedAt")] - public DateTime? UpdatedAt { get { return this.UpdatedAtOption; } set { this.UpdatedAtOption = new(value); } } + public DateTime? UpdatedAt { get { return this.UpdatedAtOption; } set { this.UpdatedAtOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs index 0f075b6..00c0149 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs @@ -119,7 +119,7 @@ public Healthcheck(string app, string? licenseId = default, string? licenseType /// Gets or Sets Metadata /// [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new Option?>(value); } } /// /// Used to track the state of DocumentsDatabase @@ -132,7 +132,7 @@ public Healthcheck(string app, string? licenseId = default, string? licenseType /// Gets or Sets DocumentsDatabase /// [JsonPropertyName("documentsDatabase")] - public HealthcheckDocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new(value); } } + public HealthcheckDocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs index 99bb4ef..09845fe 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs @@ -88,7 +88,7 @@ public IdentItem(SecurityFeatureType elementType, Light lightIndex, ImageData im /// Gets or Sets Area /// [JsonPropertyName("Area")] - public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new(value); } } + public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new Option(value); } } /// /// Used to track the state of AreaList @@ -101,7 +101,7 @@ public IdentItem(SecurityFeatureType elementType, Light lightIndex, ImageData im /// Gets or Sets AreaList /// [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs index 725d30f..2b92736 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs @@ -91,7 +91,7 @@ public IdentResult(SecurityFeatureType elementType, Light lightIndex, ImageData /// Gets or Sets Area /// [JsonPropertyName("Area")] - public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new(value); } } + public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new Option(value); } } /// /// Used to track the state of AreaList @@ -104,7 +104,7 @@ public IdentResult(SecurityFeatureType elementType, Light lightIndex, ImageData /// Gets or Sets AreaList /// [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs index 6d45c03..1cc4f52 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs @@ -65,7 +65,7 @@ public ImageData(string image, Option format = default) /// /// Image format [JsonPropertyName("format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs index 1d89d05..cb5ffc8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs @@ -71,7 +71,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// Set the threshold for an actual document brightness below which the check fails [JsonPropertyName("brightnessThreshold")] - public double? BrightnessThreshold { get { return this.BrightnessThresholdOption; } set { this.BrightnessThresholdOption = new(value); } } + public double? BrightnessThreshold { get { return this.BrightnessThresholdOption; } set { this.BrightnessThresholdOption = new Option(value); } } /// /// Used to track the state of DpiThreshold @@ -85,7 +85,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. [JsonPropertyName("dpiThreshold")] - public int? DpiThreshold { get { return this.DpiThresholdOption; } set { this.DpiThresholdOption = new(value); } } + public int? DpiThreshold { get { return this.DpiThresholdOption; } set { this.DpiThresholdOption = new Option(value); } } /// /// Used to track the state of AngleThreshold @@ -99,7 +99,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. [JsonPropertyName("angleThreshold")] - public int? AngleThreshold { get { return this.AngleThresholdOption; } set { this.AngleThresholdOption = new(value); } } + public int? AngleThreshold { get { return this.AngleThresholdOption; } set { this.AngleThresholdOption = new Option(value); } } /// /// Used to track the state of FocusCheck @@ -113,7 +113,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This option enables focus check while performing image quality validation. [JsonPropertyName("focusCheck")] - public bool? FocusCheck { get { return this.FocusCheckOption; } set { this.FocusCheckOption = new(value); } } + public bool? FocusCheck { get { return this.FocusCheckOption; } set { this.FocusCheckOption = new Option(value); } } /// /// Used to track the state of GlaresCheck @@ -127,7 +127,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This option enables glares check while performing image quality validation. [JsonPropertyName("glaresCheck")] - public bool? GlaresCheck { get { return this.GlaresCheckOption; } set { this.GlaresCheckOption = new(value); } } + public bool? GlaresCheck { get { return this.GlaresCheckOption; } set { this.GlaresCheckOption = new Option(value); } } /// /// Used to track the state of ColornessCheck @@ -141,7 +141,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This option enables colorness check while performing image quality validation. [JsonPropertyName("colornessCheck")] - public bool? ColornessCheck { get { return this.ColornessCheckOption; } set { this.ColornessCheckOption = new(value); } } + public bool? ColornessCheck { get { return this.ColornessCheckOption; } set { this.ColornessCheckOption = new Option(value); } } /// /// Used to track the state of MoireCheck @@ -155,7 +155,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This option enables screen capture (moire patterns) check while performing image quality validation. [JsonPropertyName("moireCheck")] - public bool? MoireCheck { get { return this.MoireCheckOption; } set { this.MoireCheckOption = new(value); } } + public bool? MoireCheck { get { return this.MoireCheckOption; } set { this.MoireCheckOption = new Option(value); } } /// /// Used to track the state of DocumentPositionIndent @@ -169,7 +169,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This parameter specifies the necessary margin. Default 0. [JsonPropertyName("documentPositionIndent")] - public int? DocumentPositionIndent { get { return this.DocumentPositionIndentOption; } set { this.DocumentPositionIndentOption = new(value); } } + public int? DocumentPositionIndent { get { return this.DocumentPositionIndentOption; } set { this.DocumentPositionIndentOption = new Option(value); } } /// /// Used to track the state of ExpectedPass @@ -183,7 +183,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. [JsonPropertyName("expectedPass")] - public List? ExpectedPass { get { return this.ExpectedPassOption; } set { this.ExpectedPassOption = new(value); } } + public List? ExpectedPass { get { return this.ExpectedPassOption; } set { this.ExpectedPassOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs index 7cdbbf7..d16c985 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs @@ -105,7 +105,7 @@ public ImageQualityCheck(ImageQualityCheckType type, CheckResult result, Securit /// Gets or Sets Areas /// [JsonPropertyName("areas")] - public AreaArray? Areas { get { return this.AreasOption; } set { this.AreasOption = new(value); } } + public AreaArray? Areas { get { return this.AreasOption; } set { this.AreasOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs index 3ef3636..e87992a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs @@ -54,7 +54,7 @@ public ImageTransactionData(Option image = default) /// Gets or Sets Image /// [JsonPropertyName("image")] - public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new(value); } } + public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Images.cs b/src/Regula.DocumentReader.WebClient/Model/Images.cs index 170165c..c7a085c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Images.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Images.cs @@ -73,7 +73,7 @@ public Images(List availableSourceList, List /// /// Fields count [JsonPropertyName("fieldCount")] - public int? FieldCount { get { return this.FieldCountOption; } set { this.FieldCountOption = new(value); } } + public int? FieldCount { get { return this.FieldCountOption; } set { this.FieldCountOption = new Option(value); } } /// /// Used to track the state of AvailableSourceCount @@ -87,7 +87,7 @@ public Images(List availableSourceList, List /// /// Available sources count [JsonPropertyName("availableSourceCount")] - public int? AvailableSourceCount { get { return this.AvailableSourceCountOption; } set { this.AvailableSourceCountOption = new(value); } } + public int? AvailableSourceCount { get { return this.AvailableSourceCountOption; } set { this.AvailableSourceCountOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs index ee67470..f8f1644 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs @@ -80,7 +80,7 @@ public ImagesField(string fieldName, GraphicFieldType fieldType, List /// Field value count [JsonPropertyName("valueCount")] - public decimal? ValueCount { get { return this.ValueCountOption; } set { this.ValueCountOption = new(value); } } + public decimal? ValueCount { get { return this.ValueCountOption; } set { this.ValueCountOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs index b9d189e..9dfac6a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs @@ -91,7 +91,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, OptionBase64 encoded image /* Base64 encoded image */ [JsonPropertyName("value")] - public string? Value { get { return this.ValueOption; } set { this.ValueOption = new(value); } } + public string? Value { get { return this.ValueOption; } set { this.ValueOption = new Option(value); } } /// /// Used to track the state of OriginalValue @@ -106,7 +106,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, OptionBase64 encoded image /* Base64 encoded image */ [JsonPropertyName("originalValue")] - public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new(value); } } + public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new Option(value); } } /// /// Used to track the state of OriginalPageIndex @@ -120,7 +120,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, Option /// Original page index [JsonPropertyName("originalPageIndex")] - public int? OriginalPageIndex { get { return this.OriginalPageIndexOption; } set { this.OriginalPageIndexOption = new(value); } } + public int? OriginalPageIndex { get { return this.OriginalPageIndexOption; } set { this.OriginalPageIndexOption = new Option(value); } } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. @@ -140,7 +140,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, Option [JsonPropertyName("fieldRect")] - public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new(value); } } + public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new Option(value); } } /// /// Used to track the state of RfidOrigin @@ -153,7 +153,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, Option [JsonPropertyName("rfidOrigin")] - public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new(value); } } + public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/InData.cs b/src/Regula.DocumentReader.WebClient/Model/InData.cs index a9fe4ff..3724d61 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InData.cs @@ -56,7 +56,7 @@ public InData(Option video = default, Option [JsonPropertyName("video")] - public InDataVideo? Video { get { return this.VideoOption; } set { this.VideoOption = new(value); } } + public InDataVideo? Video { get { return this.VideoOption; } set { this.VideoOption = new Option(value); } } /// /// Used to track the state of Images @@ -69,7 +69,7 @@ public InData(Option video = default, Option [JsonPropertyName("images")] - public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new(value); } } + public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs index 44608d5..6e48d70 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs @@ -60,7 +60,7 @@ public InDataTransactionImagesFieldValue(Option light = default, Option< /// Gets or Sets Light /// [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } + public Light? Light { get { return this.LightOption; } set { this.LightOption = new Option(value); } } /// /// Used to track the state of ListIdx @@ -73,7 +73,7 @@ public InDataTransactionImagesFieldValue(Option light = default, Option< /// Gets or Sets ListIdx /// [JsonPropertyName("listIdx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new Option(value); } } /// /// Used to track the state of PageIdx @@ -87,7 +87,7 @@ public InDataTransactionImagesFieldValue(Option light = default, Option< /// /// Page index of the image from input list [JsonPropertyName("pageIdx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new Option(value); } } /// /// Used to track the state of Url @@ -101,7 +101,7 @@ public InDataTransactionImagesFieldValue(Option light = default, Option< /// /// Image url [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs index d1199d6..c574752 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs @@ -57,7 +57,7 @@ public InDataVideo(Option?> metadata = default, Optio /// /// A free-form object containing video's extended attributes. [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new Option?>(value); } } /// /// Used to track the state of Url @@ -71,7 +71,7 @@ public InDataVideo(Option?> metadata = default, Optio /// /// Video url [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs index 31b230f..a371dc6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs @@ -47,7 +47,7 @@ public LicenseItem(byte[] license) /// Base64 encoded data /// /// Base64 encoded data - /* [B@24eabda6 */ + /* [B@7e6fb98c */ [JsonPropertyName("License")] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs index f10d498..aa8bd4f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs @@ -51,7 +51,7 @@ public LicenseResult(byte[] license, Option bufLength = default, Option /// Base64 encoded data - /* [B@24eabda6 */ + /* [B@7e6fb98c */ [JsonPropertyName("License")] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs index 3f8802e..1afc249 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs @@ -56,7 +56,7 @@ public ListTransactionsByTagResponse(Option?> /// Gets or Sets Items /// [JsonPropertyName("items")] - public List? Items { get { return this.ItemsOption; } set { this.ItemsOption = new(value); } } + public List? Items { get { return this.ItemsOption; } set { this.ItemsOption = new Option?>(value); } } /// /// Used to track the state of Metadata @@ -69,7 +69,7 @@ public ListTransactionsByTagResponse(Option?> /// Gets or Sets Metadata /// [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs index 98c965f..a2e4137 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs @@ -71,7 +71,7 @@ public ListVerifiedFields(decimal count, List pFieldMaps, Opti /// Gets or Sets PDateFormat /// [JsonPropertyName("pDateFormat")] - public string? PDateFormat { get { return this.PDateFormatOption; } set { this.PDateFormatOption = new(value); } } + public string? PDateFormat { get { return this.PDateFormatOption; } set { this.PDateFormatOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs index 7c27597..1e28725 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs @@ -65,7 +65,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable OVI check [JsonPropertyName("checkOVI")] - public bool? CheckOVI { get { return this.CheckOVIOption; } set { this.CheckOVIOption = new(value); } } + public bool? CheckOVI { get { return this.CheckOVIOption; } set { this.CheckOVIOption = new Option(value); } } /// /// Used to track the state of CheckMLI @@ -79,7 +79,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable MLI check [JsonPropertyName("checkMLI")] - public bool? CheckMLI { get { return this.CheckMLIOption; } set { this.CheckMLIOption = new(value); } } + public bool? CheckMLI { get { return this.CheckMLIOption; } set { this.CheckMLIOption = new Option(value); } } /// /// Used to track the state of CheckHolo @@ -93,7 +93,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable Hologram detection [JsonPropertyName("checkHolo")] - public bool? CheckHolo { get { return this.CheckHoloOption; } set { this.CheckHoloOption = new(value); } } + public bool? CheckHolo { get { return this.CheckHoloOption; } set { this.CheckHoloOption = new Option(value); } } /// /// Used to track the state of CheckED @@ -107,7 +107,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable Electronic device detection [JsonPropertyName("checkED")] - public bool? CheckED { get { return this.CheckEDOption; } set { this.CheckEDOption = new(value); } } + public bool? CheckED { get { return this.CheckEDOption; } set { this.CheckEDOption = new Option(value); } } /// /// Used to track the state of CheckBlackAndWhiteCopy @@ -121,7 +121,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable Black and white copy check [JsonPropertyName("checkBlackAndWhiteCopy")] - public bool? CheckBlackAndWhiteCopy { get { return this.CheckBlackAndWhiteCopyOption; } set { this.CheckBlackAndWhiteCopyOption = new(value); } } + public bool? CheckBlackAndWhiteCopy { get { return this.CheckBlackAndWhiteCopyOption; } set { this.CheckBlackAndWhiteCopyOption = new Option(value); } } /// /// Used to track the state of CheckDynaprint @@ -135,7 +135,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable Dynaprint check [JsonPropertyName("checkDynaprint")] - public bool? CheckDynaprint { get { return this.CheckDynaprintOption; } set { this.CheckDynaprintOption = new(value); } } + public bool? CheckDynaprint { get { return this.CheckDynaprintOption; } set { this.CheckDynaprintOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs index cba74cc..5a74dda 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs @@ -145,7 +145,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets Inverse /// [JsonPropertyName("Inverse")] - public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new(value); } } + public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new Option(value); } } /// /// Used to track the state of ObjArea @@ -158,7 +158,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets ObjArea /// [JsonPropertyName("ObjArea")] - public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new(value); } } + public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new Option(value); } } /// /// Used to track the state of ObjIntAngleDev @@ -171,7 +171,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets ObjIntAngleDev /// [JsonPropertyName("ObjIntAngleDev")] - public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new(value); } } + public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new Option(value); } } /// /// Used to track the state of PerspectiveTr @@ -184,7 +184,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets PerspectiveTr /// [JsonPropertyName("PerspectiveTr")] - public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new(value); } } + public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new Option(value); } } /// /// Used to track the state of ResultStatus @@ -197,7 +197,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets ResultStatus /// [JsonPropertyName("ResultStatus")] - public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new(value); } } + public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs index c572b0a..f33467b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs @@ -128,7 +128,7 @@ public OCRSecurityTextItem(Critical criticalFlag, Light lightType, RectangleCoor /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } /// /// Used to track the state of Reserved2 @@ -141,7 +141,7 @@ public OCRSecurityTextItem(Critical criticalFlag, Light lightType, RectangleCoor /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs index f71b39c..bf14cf0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs @@ -131,7 +131,7 @@ public OCRSecurityTextResult(Critical criticalFlag, Light lightType, RectangleCo /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } /// /// Used to track the state of Reserved2 @@ -144,7 +144,7 @@ public OCRSecurityTextResult(Critical criticalFlag, Light lightType, RectangleCo /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs index ffd9292..334337f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs @@ -152,7 +152,7 @@ public OneCandidate(string documentName, int iD, decimal p, int rotated180, Rfid /// Gets or Sets RotationAngle /// [JsonPropertyName("RotationAngle")] - public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new(value); } } + public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs index 70243c9..562214c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs @@ -72,7 +72,7 @@ public OriginalSymbol(long code, int probability, Option /// Gets or Sets Rect /// [JsonPropertyName("rect")] - public RectangleCoordinates? Rect { get { return this.RectOption; } set { this.RectOption = new(value); } } + public RectangleCoordinates? Rect { get { return this.RectOption; } set { this.RectOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OutData.cs b/src/Regula.DocumentReader.WebClient/Model/OutData.cs index 4f32df5..5f9b344 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutData.cs @@ -57,7 +57,7 @@ public OutData(Option url = default, Option /// Response url [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } /// /// Used to track the state of Images @@ -70,7 +70,7 @@ public OutData(Option url = default, Option [JsonPropertyName("images")] - public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new(value); } } + public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs index 247bf32..c026b7d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs @@ -62,7 +62,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// Gets or Sets FieldType /// [JsonPropertyName("fieldType")] - public GraphicFieldType? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new(value); } } + public GraphicFieldType? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new Option(value); } } /// /// Used to track the state of Light @@ -75,7 +75,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// Gets or Sets Light /// [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } + public Light? Light { get { return this.LightOption; } set { this.LightOption = new Option(value); } } /// /// Used to track the state of ListIdx @@ -88,7 +88,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// Gets or Sets ListIdx /// [JsonPropertyName("listIdx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new Option(value); } } /// /// Used to track the state of PageIdx @@ -102,7 +102,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// /// Page index of the image from input list [JsonPropertyName("pageIdx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new Option(value); } } /// /// Used to track the state of Url @@ -116,7 +116,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// /// Image url [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs index c1387e5..8d99448 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs @@ -114,7 +114,7 @@ public PArrayField(float bcAngleDETECT, int bcCodeResult, int bcCountModule, Lis /// Gets or Sets BcPDF417INFO /// [JsonPropertyName("bcPDF417INFO")] - public BcPDF417INFO? BcPDF417INFO { get { return this.BcPDF417INFOOption; } set { this.BcPDF417INFOOption = new(value); } } + public BcPDF417INFO? BcPDF417INFO { get { return this.BcPDF417INFOOption; } set { this.BcPDF417INFOOption = new Option(value); } } /// /// Used to track the state of BcTextDecoderTypes @@ -127,7 +127,7 @@ public PArrayField(float bcAngleDETECT, int bcCodeResult, int bcCountModule, Lis /// Gets or Sets BcTextDecoderTypes /// [JsonPropertyName("bcTextDecoderTypes")] - public int? BcTextDecoderTypes { get { return this.BcTextDecoderTypesOption; } set { this.BcTextDecoderTypesOption = new(value); } } + public int? BcTextDecoderTypes { get { return this.BcTextDecoderTypesOption; } set { this.BcTextDecoderTypesOption = new Option(value); } } /// /// Used to track the state of BcTextFieldType @@ -140,7 +140,7 @@ public PArrayField(float bcAngleDETECT, int bcCodeResult, int bcCountModule, Lis /// Gets or Sets BcTextFieldType /// [JsonPropertyName("bcTextFieldType")] - public int? BcTextFieldType { get { return this.BcTextFieldTypeOption; } set { this.BcTextFieldTypeOption = new(value); } } + public int? BcTextFieldType { get { return this.BcTextFieldTypeOption; } set { this.BcTextFieldTypeOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs index 6fe6250..f9afa65 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs @@ -54,7 +54,7 @@ public ParsedData(Option?> parsingNotifications = default) /// Gets or Sets ParsingNotifications /// [JsonPropertyName("ParsingNotifications")] - public List? ParsingNotifications { get { return this.ParsingNotificationsOption; } set { this.ParsingNotificationsOption = new(value); } } + public List? ParsingNotifications { get { return this.ParsingNotificationsOption; } set { this.ParsingNotificationsOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs index b897f5f..d157dd4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs @@ -57,7 +57,7 @@ public PerDocumentConfig(Option?> docID = default, Option exclud /// /// Specific template IDs, for which apply current custom configuration [JsonPropertyName("docID")] - public List? DocID { get { return this.DocIDOption; } set { this.DocIDOption = new(value); } } + public List? DocID { get { return this.DocIDOption; } set { this.DocIDOption = new Option?>(value); } } /// /// Used to track the state of ExcludeAuthChecks @@ -72,7 +72,7 @@ public PerDocumentConfig(Option?> docID = default, Option exclud /// Contains items from AuthenticityResultType as sum via OR operation /* 2 */ [JsonPropertyName("excludeAuthChecks")] - public int? ExcludeAuthChecks { get { return this.ExcludeAuthChecksOption; } set { this.ExcludeAuthChecksOption = new(value); } } + public int? ExcludeAuthChecks { get { return this.ExcludeAuthChecksOption; } set { this.ExcludeAuthChecksOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs index 1fa1fcf..b3b43c4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs @@ -98,7 +98,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets FieldTypesCount /// [JsonPropertyName("FieldTypesCount")] - public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new(value); } } + public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new Option(value); } } /// /// Used to track the state of FieldTypesList @@ -111,7 +111,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets FieldTypesList /// [JsonPropertyName("FieldTypesList")] - public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new(value); } } + public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new Option?>(value); } } /// /// Used to track the state of Step @@ -124,7 +124,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Step /// [JsonPropertyName("Step")] - public int? Step { get { return this.StepOption; } set { this.StepOption = new(value); } } + public int? Step { get { return this.StepOption; } set { this.StepOption = new Option(value); } } /// /// Used to track the state of Angle @@ -137,7 +137,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Angle /// [JsonPropertyName("Angle")] - public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new(value); } } + public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new Option(value); } } /// /// Used to track the state of Reserved1 @@ -150,7 +150,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } /// /// Used to track the state of Reserved2 @@ -163,7 +163,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } /// /// Used to track the state of Reserved3 @@ -176,7 +176,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Reserved3 /// [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs index 4c1247c..23a408e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs @@ -101,7 +101,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets FieldTypesCount /// [JsonPropertyName("FieldTypesCount")] - public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new(value); } } + public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new Option(value); } } /// /// Used to track the state of FieldTypesList @@ -114,7 +114,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets FieldTypesList /// [JsonPropertyName("FieldTypesList")] - public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new(value); } } + public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new Option?>(value); } } /// /// Used to track the state of Step @@ -127,7 +127,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Step /// [JsonPropertyName("Step")] - public int? Step { get { return this.StepOption; } set { this.StepOption = new(value); } } + public int? Step { get { return this.StepOption; } set { this.StepOption = new Option(value); } } /// /// Used to track the state of Angle @@ -140,7 +140,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Angle /// [JsonPropertyName("Angle")] - public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new(value); } } + public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new Option(value); } } /// /// Used to track the state of Reserved1 @@ -153,7 +153,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } /// /// Used to track the state of Reserved2 @@ -166,7 +166,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } /// /// Used to track the state of Reserved3 @@ -179,7 +179,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Reserved3 /// [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs index 4bd34fb..4468b14 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs @@ -62,7 +62,7 @@ public PointsContainer(List pointsList, Option pointCount = default /// Gets or Sets PointCount /// [JsonPropertyName("PointCount")] - public int? PointCount { get { return this.PointCountOption; } set { this.PointCountOption = new(value); } } + public int? PointCount { get { return this.PointCountOption; } set { this.PointCountOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index 19f0a39..94d2788 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -178,7 +178,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets MeasureSystem /// [JsonPropertyName("measureSystem")] - public MeasureSystem? MeasureSystem { get { return this.MeasureSystemOption; } set { this.MeasureSystemOption = new(value); } } + public MeasureSystem? MeasureSystem { get { return this.MeasureSystemOption; } set { this.MeasureSystemOption = new Option(value); } } /// /// Used to track the state of LogLevel @@ -191,7 +191,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets LogLevel /// [JsonPropertyName("logLevel")] - public LogLevel? LogLevel { get { return this.LogLevelOption; } set { this.LogLevelOption = new(value); } } + public LogLevel? LogLevel { get { return this.LogLevelOption; } set { this.LogLevelOption = new Option(value); } } /// /// Used to track the state of ForceDocFormat @@ -204,7 +204,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets ForceDocFormat /// [JsonPropertyName("forceDocFormat")] - public DocumentFormat? ForceDocFormat { get { return this.ForceDocFormatOption; } set { this.ForceDocFormatOption = new(value); } } + public DocumentFormat? ForceDocFormat { get { return this.ForceDocFormatOption; } set { this.ForceDocFormatOption = new Option(value); } } /// /// Used to track the state of ConvertCase @@ -217,7 +217,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets ConvertCase /// [JsonPropertyName("convertCase")] - public TextPostProcessing? ConvertCase { get { return this.ConvertCaseOption; } set { this.ConvertCaseOption = new(value); } } + public TextPostProcessing? ConvertCase { get { return this.ConvertCaseOption; } set { this.ConvertCaseOption = new Option(value); } } /// /// Used to track the state of MrzDetectMode @@ -230,7 +230,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets MrzDetectMode /// [JsonPropertyName("mrzDetectMode")] - public MrzDetectModeEnum? MrzDetectMode { get { return this.MrzDetectModeOption; } set { this.MrzDetectModeOption = new(value); } } + public MrzDetectModeEnum? MrzDetectMode { get { return this.MrzDetectModeOption; } set { this.MrzDetectModeOption = new Option(value); } } /// /// Used to track the state of GenerateDTCVC @@ -244,7 +244,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to generate separate DTC-VC data container from RFID session data. [JsonPropertyName("generateDTCVC")] - public bool? GenerateDTCVC { get { return this.GenerateDTCVCOption; } set { this.GenerateDTCVCOption = new(value); } } + public bool? GenerateDTCVC { get { return this.GenerateDTCVCOption; } set { this.GenerateDTCVCOption = new Option(value); } } /// /// Used to track the state of LcidFilter @@ -258,7 +258,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. [JsonPropertyName("lcidFilter")] - public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } + public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new Option?>(value); } } /// /// Used to track the state of CheckLiveness @@ -272,7 +272,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to enable document liveness check. [JsonPropertyName("checkLiveness")] - public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new(value); } } + public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new Option(value); } } /// /// Used to track the state of LcidIgnoreFilter @@ -286,7 +286,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. [JsonPropertyName("lcidIgnoreFilter")] - public List? LcidIgnoreFilter { get { return this.LcidIgnoreFilterOption; } set { this.LcidIgnoreFilterOption = new(value); } } + public List? LcidIgnoreFilter { get { return this.LcidIgnoreFilterOption; } set { this.LcidIgnoreFilterOption = new Option?>(value); } } /// /// Used to track the state of OneShotIdentification @@ -300,7 +300,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face [JsonPropertyName("oneShotIdentification")] - public bool? OneShotIdentification { get { return this.OneShotIdentificationOption; } set { this.OneShotIdentificationOption = new(value); } } + public bool? OneShotIdentification { get { return this.OneShotIdentificationOption; } set { this.OneShotIdentificationOption = new Option(value); } } /// /// Used to track the state of UseFaceApi @@ -314,7 +314,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows comparing faces on Regula Face Web Service [JsonPropertyName("useFaceApi")] - public bool? UseFaceApi { get { return this.UseFaceApiOption; } set { this.UseFaceApiOption = new(value); } } + public bool? UseFaceApi { get { return this.UseFaceApiOption; } set { this.UseFaceApiOption = new Option(value); } } /// /// Used to track the state of FaceApi @@ -327,7 +327,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets FaceApi /// [JsonPropertyName("faceApi")] - public FaceApi? FaceApi { get { return this.FaceApiOption; } set { this.FaceApiOption = new(value); } } + public FaceApi? FaceApi { get { return this.FaceApiOption; } set { this.FaceApiOption = new Option(value); } } /// /// Used to track the state of DoDetectCan @@ -341,7 +341,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. [JsonPropertyName("doDetectCan")] - public bool? DoDetectCan { get { return this.DoDetectCanOption; } set { this.DoDetectCanOption = new(value); } } + public bool? DoDetectCan { get { return this.DoDetectCanOption; } set { this.DoDetectCanOption = new Option(value); } } /// /// Used to track the state of ImageOutputMaxHeight @@ -355,7 +355,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. [JsonPropertyName("imageOutputMaxHeight")] - public int? ImageOutputMaxHeight { get { return this.ImageOutputMaxHeightOption; } set { this.ImageOutputMaxHeightOption = new(value); } } + public int? ImageOutputMaxHeight { get { return this.ImageOutputMaxHeightOption; } set { this.ImageOutputMaxHeightOption = new Option(value); } } /// /// Used to track the state of ImageOutputMaxWidth @@ -369,7 +369,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. [JsonPropertyName("imageOutputMaxWidth")] - public int? ImageOutputMaxWidth { get { return this.ImageOutputMaxWidthOption; } set { this.ImageOutputMaxWidthOption = new(value); } } + public int? ImageOutputMaxWidth { get { return this.ImageOutputMaxWidthOption; } set { this.ImageOutputMaxWidthOption = new Option(value); } } /// /// Used to track the state of ResultTypeOutput @@ -383,7 +383,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Types of results to return in response. See 'Result' enum for available options [JsonPropertyName("resultTypeOutput")] - public List? ResultTypeOutput { get { return this.ResultTypeOutputOption; } set { this.ResultTypeOutputOption = new(value); } } + public List? ResultTypeOutput { get { return this.ResultTypeOutputOption; } set { this.ResultTypeOutputOption = new Option?>(value); } } /// /// Used to track the state of DoublePageSpread @@ -398,7 +398,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. [JsonPropertyName("doublePageSpread")] [Obsolete] - public bool? DoublePageSpread { get { return this.DoublePageSpreadOption; } set { this.DoublePageSpreadOption = new(value); } } + public bool? DoublePageSpread { get { return this.DoublePageSpreadOption; } set { this.DoublePageSpreadOption = new Option(value); } } /// /// Used to track the state of GenerateDoublePageSpreadImage @@ -412,7 +412,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. [JsonPropertyName("generateDoublePageSpreadImage")] - public bool? GenerateDoublePageSpreadImage { get { return this.GenerateDoublePageSpreadImageOption; } set { this.GenerateDoublePageSpreadImageOption = new(value); } } + public bool? GenerateDoublePageSpreadImage { get { return this.GenerateDoublePageSpreadImageOption; } set { this.GenerateDoublePageSpreadImageOption = new Option(value); } } /// /// Used to track the state of FieldTypesFilter @@ -426,7 +426,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. [JsonPropertyName("fieldTypesFilter")] - public List? FieldTypesFilter { get { return this.FieldTypesFilterOption; } set { this.FieldTypesFilterOption = new(value); } } + public List? FieldTypesFilter { get { return this.FieldTypesFilterOption; } set { this.FieldTypesFilterOption = new Option?>(value); } } /// /// Used to track the state of DateFormat @@ -441,7 +441,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). /* MM/dd/yyyy */ [JsonPropertyName("dateFormat")] - public string? DateFormat { get { return this.DateFormatOption; } set { this.DateFormatOption = new(value); } } + public string? DateFormat { get { return this.DateFormatOption; } set { this.DateFormatOption = new Option(value); } } /// /// Used to track the state of ImageDpiOutMax @@ -455,7 +455,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. [JsonPropertyName("imageDpiOutMax")] - public int? ImageDpiOutMax { get { return this.ImageDpiOutMaxOption; } set { this.ImageDpiOutMaxOption = new(value); } } + public int? ImageDpiOutMax { get { return this.ImageDpiOutMaxOption; } set { this.ImageDpiOutMaxOption = new Option(value); } } /// /// Used to track the state of AlreadyCropped @@ -469,7 +469,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. [JsonPropertyName("alreadyCropped")] - public bool? AlreadyCropped { get { return this.AlreadyCroppedOption; } set { this.AlreadyCroppedOption = new(value); } } + public bool? AlreadyCropped { get { return this.AlreadyCroppedOption; } set { this.AlreadyCroppedOption = new Option(value); } } /// /// Used to track the state of CustomParams @@ -483,7 +483,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows passing custom processing parameters that can be implemented in future without changing API. [JsonPropertyName("customParams")] - public Dictionary? CustomParams { get { return this.CustomParamsOption; } set { this.CustomParamsOption = new(value); } } + public Dictionary? CustomParams { get { return this.CustomParamsOption; } set { this.CustomParamsOption = new Option?>(value); } } /// /// Used to track the state of Config @@ -497,7 +497,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. [JsonPropertyName("config")] - public List? Config { get { return this.ConfigOption; } set { this.ConfigOption = new(value); } } + public List? Config { get { return this.ConfigOption; } set { this.ConfigOption = new Option?>(value); } } /// /// Used to track the state of Log @@ -511,7 +511,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, results will contain transaction processing log. Disabled by default [JsonPropertyName("log")] - public bool? Log { get { return this.LogOption; } set { this.LogOption = new(value); } } + public bool? Log { get { return this.LogOption; } set { this.LogOption = new Option(value); } } /// /// Used to track the state of ForceDocID @@ -525,7 +525,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Force use of specific template ID and skip document type identification step. [JsonPropertyName("forceDocID")] - public int? ForceDocID { get { return this.ForceDocIDOption; } set { this.ForceDocIDOption = new(value); } } + public int? ForceDocID { get { return this.ForceDocIDOption; } set { this.ForceDocIDOption = new Option(value); } } /// /// Used to track the state of MatchTextFieldMask @@ -539,7 +539,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. [JsonPropertyName("matchTextFieldMask")] - public bool? MatchTextFieldMask { get { return this.MatchTextFieldMaskOption; } set { this.MatchTextFieldMaskOption = new(value); } } + public bool? MatchTextFieldMask { get { return this.MatchTextFieldMaskOption; } set { this.MatchTextFieldMaskOption = new Option(value); } } /// /// Used to track the state of FastDocDetect @@ -554,7 +554,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. [JsonPropertyName("fastDocDetect")] [Obsolete] - public bool? FastDocDetect { get { return this.FastDocDetectOption; } set { this.FastDocDetectOption = new(value); } } + public bool? FastDocDetect { get { return this.FastDocDetectOption; } set { this.FastDocDetectOption = new Option(value); } } /// /// Used to track the state of UpdateOCRValidityByGlare @@ -568,7 +568,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. [JsonPropertyName("updateOCRValidityByGlare")] - public bool? UpdateOCRValidityByGlare { get { return this.UpdateOCRValidityByGlareOption; } set { this.UpdateOCRValidityByGlareOption = new(value); } } + public bool? UpdateOCRValidityByGlare { get { return this.UpdateOCRValidityByGlareOption; } set { this.UpdateOCRValidityByGlareOption = new Option(value); } } /// /// Used to track the state of CheckRequiredTextFields @@ -582,7 +582,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. [JsonPropertyName("checkRequiredTextFields")] - public bool? CheckRequiredTextFields { get { return this.CheckRequiredTextFieldsOption; } set { this.CheckRequiredTextFieldsOption = new(value); } } + public bool? CheckRequiredTextFields { get { return this.CheckRequiredTextFieldsOption; } set { this.CheckRequiredTextFieldsOption = new Option(value); } } /// /// Used to track the state of ReturnCroppedBarcode @@ -596,7 +596,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. [JsonPropertyName("returnCroppedBarcode")] - public bool? ReturnCroppedBarcode { get { return this.ReturnCroppedBarcodeOption; } set { this.ReturnCroppedBarcodeOption = new(value); } } + public bool? ReturnCroppedBarcode { get { return this.ReturnCroppedBarcodeOption; } set { this.ReturnCroppedBarcodeOption = new Option(value); } } /// /// Used to track the state of ImageQa @@ -609,7 +609,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets ImageQa /// [JsonPropertyName("imageQa")] - public ImageQA? ImageQa { get { return this.ImageQaOption; } set { this.ImageQaOption = new(value); } } + public ImageQA? ImageQa { get { return this.ImageQaOption; } set { this.ImageQaOption = new Option(value); } } /// /// Used to track the state of StrictImageQuality @@ -623,7 +623,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. [JsonPropertyName("strictImageQuality")] - public bool? StrictImageQuality { get { return this.StrictImageQualityOption; } set { this.StrictImageQualityOption = new(value); } } + public bool? StrictImageQuality { get { return this.StrictImageQualityOption; } set { this.StrictImageQualityOption = new Option(value); } } /// /// Used to track the state of RespectImageQuality @@ -638,7 +638,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. [JsonPropertyName("respectImageQuality")] [Obsolete] - public bool? RespectImageQuality { get { return this.RespectImageQualityOption; } set { this.RespectImageQualityOption = new(value); } } + public bool? RespectImageQuality { get { return this.RespectImageQualityOption; } set { this.RespectImageQualityOption = new Option(value); } } /// /// Used to track the state of NoGraphics @@ -652,7 +652,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, no graphic fields will be cropped from document image. Disabled by default. [JsonPropertyName("noGraphics")] - public bool? NoGraphics { get { return this.NoGraphicsOption; } set { this.NoGraphicsOption = new(value); } } + public bool? NoGraphics { get { return this.NoGraphicsOption; } set { this.NoGraphicsOption = new Option(value); } } /// /// Used to track the state of DepersonalizeLog @@ -666,7 +666,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. [JsonPropertyName("depersonalizeLog")] - public bool? DepersonalizeLog { get { return this.DepersonalizeLogOption; } set { this.DepersonalizeLogOption = new(value); } } + public bool? DepersonalizeLog { get { return this.DepersonalizeLogOption; } set { this.DepersonalizeLogOption = new Option(value); } } /// /// Used to track the state of MultiDocOnImage @@ -680,7 +680,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. [JsonPropertyName("multiDocOnImage")] - public bool? MultiDocOnImage { get { return this.MultiDocOnImageOption; } set { this.MultiDocOnImageOption = new(value); } } + public bool? MultiDocOnImage { get { return this.MultiDocOnImageOption; } set { this.MultiDocOnImageOption = new Option(value); } } /// /// Used to track the state of ShiftExpiryDate @@ -694,7 +694,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default [JsonPropertyName("shiftExpiryDate")] - public int? ShiftExpiryDate { get { return this.ShiftExpiryDateOption; } set { this.ShiftExpiryDateOption = new(value); } } + public int? ShiftExpiryDate { get { return this.ShiftExpiryDateOption; } set { this.ShiftExpiryDateOption = new Option(value); } } /// /// Used to track the state of MinimalHolderAge @@ -708,7 +708,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. [JsonPropertyName("minimalHolderAge")] - public int? MinimalHolderAge { get { return this.MinimalHolderAgeOption; } set { this.MinimalHolderAgeOption = new(value); } } + public int? MinimalHolderAge { get { return this.MinimalHolderAgeOption; } set { this.MinimalHolderAgeOption = new Option(value); } } /// /// Used to track the state of ReturnUncroppedImage @@ -722,7 +722,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, returns input images in output. Disabled by default. [JsonPropertyName("returnUncroppedImage")] - public bool? ReturnUncroppedImage { get { return this.ReturnUncroppedImageOption; } set { this.ReturnUncroppedImageOption = new(value); } } + public bool? ReturnUncroppedImage { get { return this.ReturnUncroppedImageOption; } set { this.ReturnUncroppedImageOption = new Option(value); } } /// /// Used to track the state of MrzFormatsFilter @@ -736,7 +736,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows limiting MRZ formats to be recognized by specifying them in array. [JsonPropertyName("mrzFormatsFilter")] - public List? MrzFormatsFilter { get { return this.MrzFormatsFilterOption; } set { this.MrzFormatsFilterOption = new(value); } } + public List? MrzFormatsFilter { get { return this.MrzFormatsFilterOption; } set { this.MrzFormatsFilterOption = new Option?>(value); } } /// /// Used to track the state of ForceReadMrzBeforeLocate @@ -750,7 +750,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. [JsonPropertyName("forceReadMrzBeforeLocate")] - public bool? ForceReadMrzBeforeLocate { get { return this.ForceReadMrzBeforeLocateOption; } set { this.ForceReadMrzBeforeLocateOption = new(value); } } + public bool? ForceReadMrzBeforeLocate { get { return this.ForceReadMrzBeforeLocateOption; } set { this.ForceReadMrzBeforeLocateOption = new Option(value); } } /// /// Used to track the state of ParseBarcodes @@ -764,7 +764,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. [JsonPropertyName("parseBarcodes")] - public bool? ParseBarcodes { get { return this.ParseBarcodesOption; } set { this.ParseBarcodesOption = new(value); } } + public bool? ParseBarcodes { get { return this.ParseBarcodesOption; } set { this.ParseBarcodesOption = new Option(value); } } /// /// Used to track the state of SplitNames @@ -778,7 +778,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. [JsonPropertyName("splitNames")] - public bool? SplitNames { get { return this.SplitNamesOption; } set { this.SplitNamesOption = new(value); } } + public bool? SplitNames { get { return this.SplitNamesOption; } set { this.SplitNamesOption = new Option(value); } } /// /// Used to track the state of DisablePerforationOCR @@ -792,7 +792,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. [JsonPropertyName("disablePerforationOCR")] - public bool? DisablePerforationOCR { get { return this.DisablePerforationOCROption; } set { this.DisablePerforationOCROption = new(value); } } + public bool? DisablePerforationOCR { get { return this.DisablePerforationOCROption; } set { this.DisablePerforationOCROption = new Option(value); } } /// /// Used to track the state of DocumentGroupFilter @@ -806,7 +806,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. [JsonPropertyName("documentGroupFilter")] - public List? DocumentGroupFilter { get { return this.DocumentGroupFilterOption; } set { this.DocumentGroupFilterOption = new(value); } } + public List? DocumentGroupFilter { get { return this.DocumentGroupFilterOption; } set { this.DocumentGroupFilterOption = new Option?>(value); } } /// /// Used to track the state of ProcessAuth @@ -820,7 +820,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. [JsonPropertyName("processAuth")] - public long? ProcessAuth { get { return this.ProcessAuthOption; } set { this.ProcessAuthOption = new(value); } } + public long? ProcessAuth { get { return this.ProcessAuthOption; } set { this.ProcessAuthOption = new Option(value); } } /// /// Used to track the state of DeviceId @@ -834,7 +834,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. [JsonPropertyName("deviceId")] - public int? DeviceId { get { return this.DeviceIdOption; } set { this.DeviceIdOption = new(value); } } + public int? DeviceId { get { return this.DeviceIdOption; } set { this.DeviceIdOption = new Option(value); } } /// /// Used to track the state of DeviceType @@ -848,7 +848,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. [JsonPropertyName("deviceType")] - public int? DeviceType { get { return this.DeviceTypeOption; } set { this.DeviceTypeOption = new(value); } } + public int? DeviceType { get { return this.DeviceTypeOption; } set { this.DeviceTypeOption = new Option(value); } } /// /// Used to track the state of DeviceTypeHex @@ -862,7 +862,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to specify the document reader device type from which input images were captured [JsonPropertyName("deviceTypeHex")] - public string? DeviceTypeHex { get { return this.DeviceTypeHexOption; } set { this.DeviceTypeHexOption = new(value); } } + public string? DeviceTypeHex { get { return this.DeviceTypeHexOption; } set { this.DeviceTypeHexOption = new Option(value); } } /// /// Used to track the state of IgnoreDeviceIdFromImage @@ -876,7 +876,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false [JsonPropertyName("ignoreDeviceIdFromImage")] - public bool? IgnoreDeviceIdFromImage { get { return this.IgnoreDeviceIdFromImageOption; } set { this.IgnoreDeviceIdFromImageOption = new(value); } } + public bool? IgnoreDeviceIdFromImage { get { return this.IgnoreDeviceIdFromImageOption; } set { this.IgnoreDeviceIdFromImageOption = new Option(value); } } /// /// Used to track the state of DocumentIdList @@ -890,7 +890,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// List of the document ID's to process. All documents will be processed, if empty. [JsonPropertyName("documentIdList")] - public List? DocumentIdList { get { return this.DocumentIdListOption; } set { this.DocumentIdListOption = new(value); } } + public List? DocumentIdList { get { return this.DocumentIdListOption; } set { this.DocumentIdListOption = new Option?>(value); } } /// /// Used to track the state of Rfid @@ -903,7 +903,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets Rfid /// [JsonPropertyName("rfid")] - public ProcessParamsRfid? Rfid { get { return this.RfidOption; } set { this.RfidOption = new(value); } } + public ProcessParamsRfid? Rfid { get { return this.RfidOption; } set { this.RfidOption = new Option(value); } } /// /// Used to track the state of CheckAuth @@ -917,7 +917,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to enable authenticity checks [JsonPropertyName("checkAuth")] - public bool? CheckAuth { get { return this.CheckAuthOption; } set { this.CheckAuthOption = new(value); } } + public bool? CheckAuth { get { return this.CheckAuthOption; } set { this.CheckAuthOption = new Option(value); } } /// /// Used to track the state of AuthParams @@ -930,7 +930,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets AuthParams /// [JsonPropertyName("authParams")] - public AuthParams? AuthParams { get { return this.AuthParamsOption; } set { this.AuthParamsOption = new(value); } } + public AuthParams? AuthParams { get { return this.AuthParamsOption; } set { this.AuthParamsOption = new Option(value); } } /// /// Used to track the state of GenerateNumericCodes @@ -944,7 +944,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to generate numeric representation for issuing state and nationality codes [JsonPropertyName("generateNumericCodes")] - public bool? GenerateNumericCodes { get { return this.GenerateNumericCodesOption; } set { this.GenerateNumericCodesOption = new(value); } } + public bool? GenerateNumericCodes { get { return this.GenerateNumericCodesOption; } set { this.GenerateNumericCodesOption = new Option(value); } } /// /// Used to track the state of StrictBarcodeDigitalSignatureCheck @@ -958,7 +958,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. [JsonPropertyName("strictBarcodeDigitalSignatureCheck")] - public bool? StrictBarcodeDigitalSignatureCheck { get { return this.StrictBarcodeDigitalSignatureCheckOption; } set { this.StrictBarcodeDigitalSignatureCheckOption = new(value); } } + public bool? StrictBarcodeDigitalSignatureCheck { get { return this.StrictBarcodeDigitalSignatureCheckOption; } set { this.StrictBarcodeDigitalSignatureCheckOption = new Option(value); } } /// /// Used to track the state of SelectLongestNames @@ -972,7 +972,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. [JsonPropertyName("selectLongestNames")] - public bool? SelectLongestNames { get { return this.SelectLongestNamesOption; } set { this.SelectLongestNamesOption = new(value); } } + public bool? SelectLongestNames { get { return this.SelectLongestNamesOption; } set { this.SelectLongestNamesOption = new Option(value); } } /// /// Used to track the state of DoBarcodes @@ -986,7 +986,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Set the types of barcodes to process. [JsonPropertyName("doBarcodes")] - public List? DoBarcodes { get { return this.DoBarcodesOption; } set { this.DoBarcodesOption = new(value); } } + public List? DoBarcodes { get { return this.DoBarcodesOption; } set { this.DoBarcodesOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs index 45c652d..b9d0aa4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs @@ -55,7 +55,7 @@ public ProcessParamsRfid(Option?> paSensitiveCode /// /// A list of notification codes that should be ignored during passive authentication (PA) [JsonPropertyName("paSensitiveCodesDisable")] - public List? PaSensitiveCodesDisable { get { return this.PaSensitiveCodesDisableOption; } set { this.PaSensitiveCodesDisableOption = new(value); } } + public List? PaSensitiveCodesDisable { get { return this.PaSensitiveCodesDisableOption; } set { this.PaSensitiveCodesDisableOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs index 7e8b2bc..d66a3d5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs @@ -85,7 +85,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. [JsonPropertyName("lcidFilter")] - public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } + public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new Option?>(value); } } /// /// Used to track the state of List @@ -98,7 +98,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Gets or Sets List /// [JsonPropertyName("List")] - public List? List { get { return this.ListOption; } set { this.ListOption = new(value); } } + public List? List { get { return this.ListOption; } set { this.ListOption = new Option?>(value); } } /// /// Used to track the state of Tag @@ -112,7 +112,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Session ID [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } + public string? Tag { get { return this.TagOption; } set { this.TagOption = new Option(value); } } /// /// Used to track the state of Tenant @@ -126,7 +126,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Customer name [JsonPropertyName("tenant")] - public string? Tenant { get { return this.TenantOption; } set { this.TenantOption = new(value); } } + public string? Tenant { get { return this.TenantOption; } set { this.TenantOption = new Option(value); } } /// /// Used to track the state of Env @@ -140,7 +140,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Environment type [JsonPropertyName("env")] - public string? Env { get { return this.EnvOption; } set { this.EnvOption = new(value); } } + public string? Env { get { return this.EnvOption; } set { this.EnvOption = new Option(value); } } /// /// Used to track the state of LivePortrait @@ -155,7 +155,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Live portrait photo /* Base64 encoded data */ [JsonPropertyName("livePortrait")] - public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new(value); } } + public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new Option(value); } } /// /// Used to track the state of ExtPortrait @@ -170,7 +170,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Portrait photo from an external source /* Base64 encoded data */ [JsonPropertyName("extPortrait")] - public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new(value); } } + public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new Option(value); } } /// /// Used to track the state of ContainerList @@ -183,7 +183,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Gets or Sets ContainerList /// [JsonPropertyName("ContainerList")] - public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new(value); } } + public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new Option(value); } } /// /// Used to track the state of SystemInfo @@ -196,7 +196,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Gets or Sets SystemInfo /// [JsonPropertyName("systemInfo")] - public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } + public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new Option(value); } } /// /// Used to track the state of PassBackObject @@ -210,7 +210,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new Option?>(value); } } /// /// Used to track the state of Dtc @@ -224,7 +224,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing [JsonPropertyName("dtc")] - public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new(value); } } + public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new Option(value); } } /// /// Used to track the state of ImageUrls @@ -238,7 +238,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// URLs to the document images for processing. [JsonPropertyName("ImageUrls")] - public List? ImageUrls { get { return this.ImageUrlsOption; } set { this.ImageUrlsOption = new(value); } } + public List? ImageUrls { get { return this.ImageUrlsOption; } set { this.ImageUrlsOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs index 76f0632..36c101f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs @@ -58,7 +58,7 @@ public ProcessRequestImage(Option imageData = default, Option [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } + public Light? Light { get { return this.LightOption; } set { this.LightOption = new Option(value); } } /// /// Used to track the state of ImageData @@ -71,7 +71,7 @@ public ProcessRequestImage(Option imageData = default, Option [JsonPropertyName("ImageData")] - public ImageData? ImageData { get { return this.ImageDataOption; } set { this.ImageDataOption = new(value); } } + public ImageData? ImageData { get { return this.ImageDataOption; } set { this.ImageDataOption = new Option(value); } } /// /// Used to track the state of PageIdx @@ -85,7 +85,7 @@ public ProcessRequestImage(Option imageData = default, Option /// page/image number [JsonPropertyName("page_idx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs index 884bb83..8ba40df 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs @@ -109,7 +109,7 @@ public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinishe /// Gets or Sets CoreLibResultCode /// [JsonPropertyName("CoreLibResultCode")] - public int? CoreLibResultCode { get { return this.CoreLibResultCodeOption; } set { this.CoreLibResultCodeOption = new(value); } } + public int? CoreLibResultCode { get { return this.CoreLibResultCodeOption; } set { this.CoreLibResultCodeOption = new Option(value); } } /// /// Used to track the state of Log @@ -123,7 +123,7 @@ public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinishe /// /// Base64 encoded transaction processing log [JsonPropertyName("log")] - public string? Log { get { return this.LogOption; } set { this.LogOption = new(value); } } + public string? Log { get { return this.LogOption; } set { this.LogOption = new Option(value); } } /// /// Used to track the state of PassBackObject @@ -137,7 +137,7 @@ public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinishe /// /// Free-form object provided in request. See passBackObject property of ProcessRequest. [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new Option?>(value); } } /// /// Used to track the state of Metadata @@ -150,7 +150,7 @@ public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinishe /// Gets or Sets Metadata /// [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs index 5513997..8e1cf57 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs @@ -57,7 +57,7 @@ public ProcessSystemInfo(Option license = default, Option reca /// /// Base64 encoded license file [JsonPropertyName("license")] - public string? License { get { return this.LicenseOption; } set { this.LicenseOption = new(value); } } + public string? License { get { return this.LicenseOption; } set { this.LicenseOption = new Option(value); } } /// /// Used to track the state of RecaptchaToken @@ -71,7 +71,7 @@ public ProcessSystemInfo(Option license = default, Option reca /// /// For internal use. Demo-sites recaptcha token. [JsonPropertyName("recaptcha_token")] - public string? RecaptchaToken { get { return this.RecaptchaTokenOption; } set { this.RecaptchaTokenOption = new(value); } } + public string? RecaptchaToken { get { return this.RecaptchaTokenOption; } set { this.RecaptchaTokenOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs index 9c20e6b..d1fdf65 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs @@ -86,7 +86,7 @@ public RFIDDocVisualExtendedField(int fieldType, TextFieldType wFieldType, strin /// Gets or Sets OriginDGTag /// [JsonPropertyName("OriginDGTag")] - public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new(value); } } + public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new Option(value); } } /// /// Used to track the state of OriginEntryView @@ -99,7 +99,7 @@ public RFIDDocVisualExtendedField(int fieldType, TextFieldType wFieldType, strin /// Gets or Sets OriginEntryView /// [JsonPropertyName("OriginEntryView")] - public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new(value); } } + public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs index 812377d..61557e3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs @@ -73,7 +73,7 @@ public RFIDDocVisualExtendedFieldItem(int originDG, decimal originTagEntry, Opti /// Gets or Sets OriginDGTag /// [JsonPropertyName("OriginDGTag")] - public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new(value); } } + public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new Option(value); } } /// /// Used to track the state of OriginEntryView @@ -86,7 +86,7 @@ public RFIDDocVisualExtendedFieldItem(int originDG, decimal originTagEntry, Opti /// Gets or Sets OriginEntryView /// [JsonPropertyName("OriginEntryView")] - public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new(value); } } + public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs index 93adab8..5ca72d2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs @@ -61,7 +61,7 @@ public ResultItem(Option bufLength = default, Option light = default /// Gets or Sets BufLength /// [JsonPropertyName("buf_length")] - public int? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new(value); } } + public int? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new Option(value); } } /// /// Used to track the state of Light @@ -74,7 +74,7 @@ public ResultItem(Option bufLength = default, Option light = default /// Gets or Sets Light /// [JsonPropertyName("light")] - public int? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } + public int? Light { get { return this.LightOption; } set { this.LightOption = new Option(value); } } /// /// Used to track the state of ListIdx @@ -87,7 +87,7 @@ public ResultItem(Option bufLength = default, Option light = default /// Gets or Sets ListIdx /// [JsonPropertyName("list_idx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new Option(value); } } /// /// Used to track the state of PageIdx @@ -100,7 +100,7 @@ public ResultItem(Option bufLength = default, Option light = default /// Gets or Sets PageIdx /// [JsonPropertyName("page_idx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new Option(value); } } /// /// The discriminator @@ -248,7 +248,6 @@ public override ResultItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToCo return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); if (discriminator != null && discriminator.Equals("97")) return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - while (utf8JsonReader.Read()) { if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs index 20253fe..f1732ac 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs @@ -82,7 +82,7 @@ public RfidAccessControlInfo(RfidAccessControlProcedureType type, RFIDErrorCodes /// /// Index of the active variant of the procedure [JsonPropertyName("ActiveOptionIdx")] - public decimal? ActiveOptionIdx { get { return this.ActiveOptionIdxOption; } set { this.ActiveOptionIdxOption = new(value); } } + public decimal? ActiveOptionIdx { get { return this.ActiveOptionIdxOption; } set { this.ActiveOptionIdxOption = new Option(value); } } /// /// Used to track the state of AccessControlOptions @@ -96,7 +96,7 @@ public RfidAccessControlInfo(RfidAccessControlProcedureType type, RFIDErrorCodes /// /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document [JsonPropertyName("AccessControlOptions")] - public List? AccessControlOptions { get { return this.AccessControlOptionsOption; } set { this.AccessControlOptionsOption = new(value); } } + public List? AccessControlOptions { get { return this.AccessControlOptionsOption; } set { this.AccessControlOptionsOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs index b7220af..8d0d398 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs @@ -88,7 +88,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// Gets or Sets PAStatus /// [JsonPropertyName("PA_Status")] - public RFIDErrorCodes? PAStatus { get { return this.PAStatusOption; } set { this.PAStatusOption = new(value); } } + public RFIDErrorCodes? PAStatus { get { return this.PAStatusOption; } set { this.PAStatusOption = new Option(value); } } /// /// Used to track the state of FileID @@ -102,7 +102,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) [JsonPropertyName("FileID")] - public string? FileID { get { return this.FileIDOption; } set { this.FileIDOption = new(value); } } + public string? FileID { get { return this.FileIDOption; } set { this.FileIDOption = new Option(value); } } /// /// Used to track the state of FileData @@ -115,7 +115,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// Gets or Sets FileData /// [JsonPropertyName("FileData")] - public TrfFtBytes? FileData { get { return this.FileDataOption; } set { this.FileDataOption = new(value); } } + public TrfFtBytes? FileData { get { return this.FileDataOption; } set { this.FileDataOption = new Option(value); } } /// /// Used to track the state of ReadingTime @@ -129,7 +129,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// Time of reading, milliseconds [JsonPropertyName("ReadingTime")] - public decimal? ReadingTime { get { return this.ReadingTimeOption; } set { this.ReadingTimeOption = new(value); } } + public decimal? ReadingTime { get { return this.ReadingTimeOption; } set { this.ReadingTimeOption = new Option(value); } } /// /// Used to track the state of Notifications @@ -143,7 +143,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. [JsonPropertyName("Notifications")] - public List? Notifications { get { return this.NotificationsOption; } set { this.NotificationsOption = new(value); } } + public List? Notifications { get { return this.NotificationsOption; } set { this.NotificationsOption = new Option?>(value); } } /// /// Used to track the state of DocFieldsText @@ -157,7 +157,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// List of document text fields formed on the basis of the file contents [JsonPropertyName("DocFields_Text")] - public List? DocFieldsText { get { return this.DocFieldsTextOption; } set { this.DocFieldsTextOption = new(value); } } + public List? DocFieldsText { get { return this.DocFieldsTextOption; } set { this.DocFieldsTextOption = new Option?>(value); } } /// /// Used to track the state of DocFieldsGraphics @@ -171,7 +171,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// List of document graphic fields formed on the basis of the file contents [JsonPropertyName("DocFields_Graphics")] - public List? DocFieldsGraphics { get { return this.DocFieldsGraphicsOption; } set { this.DocFieldsGraphicsOption = new(value); } } + public List? DocFieldsGraphics { get { return this.DocFieldsGraphicsOption; } set { this.DocFieldsGraphicsOption = new Option?>(value); } } /// /// Used to track the state of DocFieldsOriginals @@ -185,7 +185,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// List of the original binary representation of graphic document fields formed on the basis of the file contents [JsonPropertyName("DocFields_Originals")] - public List? DocFieldsOriginals { get { return this.DocFieldsOriginalsOption; } set { this.DocFieldsOriginalsOption = new(value); } } + public List? DocFieldsOriginals { get { return this.DocFieldsOriginalsOption; } set { this.DocFieldsOriginalsOption = new Option?>(value); } } /// /// Used to track the state of ParsedData @@ -198,7 +198,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// Gets or Sets ParsedData /// [JsonPropertyName("ParsedData")] - public ParsedData? ParsedData { get { return this.ParsedDataOption; } set { this.ParsedDataOption = new(value); } } + public ParsedData? ParsedData { get { return this.ParsedDataOption; } set { this.ParsedDataOption = new Option(value); } } /// /// Used to track the state of SecurityObjectCertificates @@ -211,7 +211,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// Gets or Sets SecurityObjectCertificates /// [JsonPropertyName("SecurityObject_Certificates")] - public SecurityObjectCertificates? SecurityObjectCertificates { get { return this.SecurityObjectCertificatesOption; } set { this.SecurityObjectCertificatesOption = new(value); } } + public SecurityObjectCertificates? SecurityObjectCertificates { get { return this.SecurityObjectCertificatesOption; } set { this.SecurityObjectCertificatesOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs index c296f1c..1570c5f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs @@ -98,7 +98,7 @@ public RfidSessionData(List applications, List [JsonPropertyName("Status")] - public CheckResult? Status { get { return this.StatusOption; } set { this.StatusOption = new(value); } } + public CheckResult? Status { get { return this.StatusOption; } set { this.StatusOption = new Option(value); } } /// /// List of containers to store information about the involved applications of electronic document @@ -179,7 +179,7 @@ public RfidSessionData(List applications, List /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document [JsonPropertyName("VirtualMode")] - public string? VirtualMode { get { return this.VirtualModeOption; } set { this.VirtualModeOption = new(value); } } + public string? VirtualMode { get { return this.VirtualModeOption; } set { this.VirtualModeOption = new Option(value); } } /// /// Used to track the state of SDKVersion @@ -193,7 +193,7 @@ public RfidSessionData(List applications, List /// Text SDKVersion value in format A.B (e.g. 3.1) [JsonPropertyName("SDKVersion")] - public string? SDKVersion { get { return this.SDKVersionOption; } set { this.SDKVersionOption = new(value); } } + public string? SDKVersion { get { return this.SDKVersionOption; } set { this.SDKVersionOption = new Option(value); } } /// /// Used to track the state of DriverVersion @@ -207,7 +207,7 @@ public RfidSessionData(List applications, List /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) [JsonPropertyName("DriverVersion")] - public string? DriverVersion { get { return this.DriverVersionOption; } set { this.DriverVersionOption = new(value); } } + public string? DriverVersion { get { return this.DriverVersionOption; } set { this.DriverVersionOption = new Option(value); } } /// /// Used to track the state of FirmwareVersion @@ -221,7 +221,7 @@ public RfidSessionData(List applications, List /// Text FirmwareVersion value in format A.B (e.g. 5.19) [JsonPropertyName("FirmwareVersion")] - public string? FirmwareVersion { get { return this.FirmwareVersionOption; } set { this.FirmwareVersionOption = new(value); } } + public string? FirmwareVersion { get { return this.FirmwareVersionOption; } set { this.FirmwareVersionOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs index b8443cb..74deab4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs @@ -88,7 +88,7 @@ public SecurityFeatureItem(SecurityFeatureType elementType, RectangleCoordinates /// Gets or Sets AreaList /// [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new Option(value); } } /// /// Used to track the state of Reserved2 @@ -101,7 +101,7 @@ public SecurityFeatureItem(SecurityFeatureType elementType, RectangleCoordinates /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs index 3d240bd..541b222 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs @@ -91,7 +91,7 @@ public SecurityFeatureResult(SecurityFeatureType elementType, RectangleCoordinat /// Gets or Sets AreaList /// [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new Option(value); } } /// /// Used to track the state of Reserved2 @@ -104,7 +104,7 @@ public SecurityFeatureResult(SecurityFeatureType elementType, RectangleCoordinat /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs index a6d696c..e7cd073 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs @@ -54,7 +54,7 @@ public SecurityObjectCertificates(Option certificateData = def /// Gets or Sets CertificateData /// [JsonPropertyName("Certificate_Data")] - public CertificateData? CertificateData { get { return this.CertificateDataOption; } set { this.CertificateDataOption = new(value); } } + public CertificateData? CertificateData { get { return this.CertificateDataOption; } set { this.CertificateDataOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Status.cs b/src/Regula.DocumentReader.WebClient/Model/Status.cs index ed7e5de..bed0f13 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Status.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Status.cs @@ -102,7 +102,7 @@ public Status(CheckResult overallStatus, CheckResult optical, CheckResult portra /// Gets or Sets DetailsRFID /// [JsonPropertyName("detailsRFID")] - public DetailsRFID? DetailsRFID { get { return this.DetailsRFIDOption; } set { this.DetailsRFIDOption = new(value); } } + public DetailsRFID? DetailsRFID { get { return this.DetailsRFIDOption; } set { this.DetailsRFIDOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs index ac331d3..f68c81e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs @@ -77,7 +77,7 @@ public StringRecognitionResult(decimal symbolsCount, List /// Buf_Text text string length [JsonPropertyName("Buf_Length")] - public decimal? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new(value); } } + public decimal? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new Option(value); } } /// /// Used to track the state of BufText @@ -91,7 +91,7 @@ public StringRecognitionResult(decimal symbolsCount, List /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' [JsonPropertyName("Buf_Text")] - public string? BufText { get { return this.BufTextOption; } set { this.BufTextOption = new(value); } } + public string? BufText { get { return this.BufTextOption; } set { this.BufTextOption = new Option(value); } } /// /// Used to track the state of Reserved @@ -104,7 +104,7 @@ public StringRecognitionResult(decimal symbolsCount, List [JsonPropertyName("Reserved")] - public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new(value); } } + public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs index 4ef6923..de8ac3a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs @@ -74,7 +74,7 @@ public SymbolCandidate(int symbolCode, int symbolProbability, Option @clas /// Gets or Sets Class /// [JsonPropertyName("Class")] - public int? Class { get { return this.ClassOption; } set { this.ClassOption = new(value); } } + public int? Class { get { return this.ClassOption; } set { this.ClassOption = new Option(value); } } /// /// Used to track the state of SubClass @@ -87,7 +87,7 @@ public SymbolCandidate(int symbolCode, int symbolProbability, Option @clas /// Gets or Sets SubClass /// [JsonPropertyName("SubClass")] - public int? SubClass { get { return this.SubClassOption; } set { this.SubClassOption = new(value); } } + public int? SubClass { get { return this.SubClassOption; } set { this.SubClassOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs index 75ec95c..28c291b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs @@ -84,7 +84,7 @@ public SymbolRecognitionResult(RectangleCoordinates symbolRect, decimal candidat /// Gets or Sets BaseLineBottom /// [JsonPropertyName("BaseLineBottom")] - public int? BaseLineBottom { get { return this.BaseLineBottomOption; } set { this.BaseLineBottomOption = new(value); } } + public int? BaseLineBottom { get { return this.BaseLineBottomOption; } set { this.BaseLineBottomOption = new Option(value); } } /// /// Used to track the state of BaseLineTop @@ -97,7 +97,7 @@ public SymbolRecognitionResult(RectangleCoordinates symbolRect, decimal candidat /// Gets or Sets BaseLineTop /// [JsonPropertyName("BaseLineTop")] - public int? BaseLineTop { get { return this.BaseLineTopOption; } set { this.BaseLineTopOption = new(value); } } + public int? BaseLineTop { get { return this.BaseLineTopOption; } set { this.BaseLineTopOption = new Option(value); } } /// /// Used to track the state of Reserved @@ -110,7 +110,7 @@ public SymbolRecognitionResult(RectangleCoordinates symbolRect, decimal candidat /// Gets or Sets Reserved /// [JsonPropertyName("Reserved")] - public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new(value); } } + public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs index 825b6ff..fb125cb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs @@ -56,7 +56,7 @@ public TDocBinaryInfo(Option rFIDBINARYDATA = default, Option [JsonPropertyName("RFID_BINARY_DATA")] - public BinaryData? RFID_BINARY_DATA { get { return this.RFID_BINARY_DATAOption; } set { this.RFID_BINARY_DATAOption = new(value); } } + public BinaryData? RFID_BINARY_DATA { get { return this.RFID_BINARY_DATAOption; } set { this.RFID_BINARY_DATAOption = new Option(value); } } /// /// Used to track the state of RFID_RAW_DATA @@ -69,7 +69,7 @@ public TDocBinaryInfo(Option rFIDBINARYDATA = default, Option [JsonPropertyName("RFID_RAW_DATA")] - public List? RFID_RAW_DATA { get { return this.RFID_RAW_DATAOption; } set { this.RFID_RAW_DATAOption = new(value); } } + public List? RFID_RAW_DATA { get { return this.RFID_RAW_DATAOption; } set { this.RFID_RAW_DATAOption = new Option?>(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs index 1d956e8..11668de 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs @@ -71,7 +71,7 @@ public TextAvailableSource(Source source, CheckResult validityStatus, Option /// Same as Result type, but used for safe parsing of not-described values. See Result type. [JsonPropertyName("containerType")] - public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new(value); } } + public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextField.cs b/src/Regula.DocumentReader.WebClient/Model/TextField.cs index 1d38006..5d7a22d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextField.cs @@ -138,7 +138,7 @@ public TextField(TextFieldType fieldType, string fieldName, LCID lcid, CheckResu /// /// LCID name [JsonPropertyName("lcidName")] - public string? LcidName { get { return this.LcidNameOption; } set { this.LcidNameOption = new(value); } } + public string? LcidName { get { return this.LcidNameOption; } set { this.LcidNameOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs index 897876c..1eb27d5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs @@ -106,7 +106,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// /// Original value as seen in the document [JsonPropertyName("originalValue")] - public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new(value); } } + public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new Option(value); } } /// /// Used to track the state of OriginalSymbols @@ -119,7 +119,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// Gets or Sets OriginalSymbols /// [JsonPropertyName("originalSymbols")] - public List? OriginalSymbols { get { return this.OriginalSymbolsOption; } set { this.OriginalSymbolsOption = new(value); } } + public List? OriginalSymbols { get { return this.OriginalSymbolsOption; } set { this.OriginalSymbolsOption = new Option?>(value); } } /// /// Used to track the state of FieldRect @@ -132,7 +132,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// Gets or Sets FieldRect /// [JsonPropertyName("fieldRect")] - public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new(value); } } + public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new Option(value); } } /// /// Used to track the state of RfidOrigin @@ -145,7 +145,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// Gets or Sets RfidOrigin /// [JsonPropertyName("rfidOrigin")] - public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new(value); } } + public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new Option(value); } } /// /// Used to track the state of ContainerType @@ -159,7 +159,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. [JsonPropertyName("containerType")] - public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new(value); } } + public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs index 6cc8b3e..8efa16a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs @@ -54,7 +54,7 @@ public TransactionImage(Option image = default) /// Gets or Sets Image /// [JsonPropertyName("image")] - public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new(value); } } + public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs index 57457eb..e7c3573 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs @@ -69,7 +69,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// Computer name [JsonPropertyName("ComputerName")] - public string? ComputerName { get { return this.ComputerNameOption; } set { this.ComputerNameOption = new(value); } } + public string? ComputerName { get { return this.ComputerNameOption; } set { this.ComputerNameOption = new Option(value); } } /// /// Used to track the state of DateTime @@ -83,7 +83,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// Date and time [JsonPropertyName("DateTime")] - public string? DateTime { get { return this.DateTimeOption; } set { this.DateTimeOption = new(value); } } + public string? DateTime { get { return this.DateTimeOption; } set { this.DateTimeOption = new Option(value); } } /// /// Used to track the state of DocumentsDatabase @@ -96,7 +96,7 @@ public TransactionInfo(Option computerName = default, Option d /// Gets or Sets DocumentsDatabase /// [JsonPropertyName("DocumentsDatabase")] - public DocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new(value); } } + public DocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new Option(value); } } /// /// Used to track the state of SystemInfo @@ -110,7 +110,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// System information [JsonPropertyName("SystemInfo")] - public string? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } + public string? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new Option(value); } } /// /// Used to track the state of Tag @@ -124,7 +124,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// Transaction tag [JsonPropertyName("Tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } + public string? Tag { get { return this.TagOption; } set { this.TagOption = new Option(value); } } /// /// Used to track the state of TransactionID @@ -138,7 +138,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// Transaction identifier [JsonPropertyName("TransactionID")] - public string? TransactionID { get { return this.TransactionIDOption; } set { this.TransactionIDOption = new(value); } } + public string? TransactionID { get { return this.TransactionIDOption; } set { this.TransactionIDOption = new Option(value); } } /// /// Used to track the state of UserName @@ -152,7 +152,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// User name [JsonPropertyName("UserName")] - public string? UserName { get { return this.UserNameOption; } set { this.UserNameOption = new(value); } } + public string? UserName { get { return this.UserNameOption; } set { this.UserNameOption = new Option(value); } } /// /// Used to track the state of VarVersion @@ -166,7 +166,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// SDK version [JsonPropertyName("Version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs index ce230ed..68c065e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs @@ -60,7 +60,7 @@ public TransactionProcessGetResponse(Option transactionId = default, Opti /// Gets or Sets TransactionId /// [JsonPropertyName("transactionId")] - public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new(value); } } + public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new Option(value); } } /// /// Used to track the state of Tag @@ -73,7 +73,7 @@ public TransactionProcessGetResponse(Option transactionId = default, Opti /// Gets or Sets Tag /// [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } + public string? Tag { get { return this.TagOption; } set { this.TagOption = new Option(value); } } /// /// Used to track the state of OutData @@ -86,7 +86,7 @@ public TransactionProcessGetResponse(Option transactionId = default, Opti /// Gets or Sets OutData /// [JsonPropertyName("outData")] - public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new(value); } } + public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new Option(value); } } /// /// Used to track the state of InData @@ -99,7 +99,7 @@ public TransactionProcessGetResponse(Option transactionId = default, Opti /// Gets or Sets InData /// [JsonPropertyName("inData")] - public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new(value); } } + public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs index 9d38f7d..7617a7e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs @@ -74,7 +74,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option [JsonPropertyName("List")] - public List? List { get { return this.ListOption; } set { this.ListOption = new(value); } } + public List? List { get { return this.ListOption; } set { this.ListOption = new Option?>(value); } } /// /// Used to track the state of LivePortrait @@ -89,7 +89,7 @@ public TransactionProcessRequest(ProcessParams processParam, OptionLive portrait photo /* Base64 encoded data */ [JsonPropertyName("livePortrait")] - public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new(value); } } + public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new Option(value); } } /// /// Used to track the state of ExtPortrait @@ -104,7 +104,7 @@ public TransactionProcessRequest(ProcessParams processParam, OptionPortrait photo from an external source /* Base64 encoded data */ [JsonPropertyName("extPortrait")] - public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new(value); } } + public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new Option(value); } } /// /// Used to track the state of ContainerList @@ -117,7 +117,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option [JsonPropertyName("ContainerList")] - public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new(value); } } + public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new Option(value); } } /// /// Used to track the state of SystemInfo @@ -130,7 +130,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option [JsonPropertyName("systemInfo")] - public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } + public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new Option(value); } } /// /// Used to track the state of PassBackObject @@ -144,7 +144,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new Option?>(value); } } /// /// Used to track the state of Dtc @@ -158,7 +158,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option /// Digital Travel Credential (DTC-VC) data in base64 format for processing [JsonPropertyName("dtc")] - public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new(value); } } + public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs index ef0f83b..fbd5375 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs @@ -60,7 +60,7 @@ public TransactionProcessResult(Option outData = default, Option [JsonPropertyName("OutData")] - public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new(value); } } + public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new Option(value); } } /// /// Used to track the state of InData @@ -73,7 +73,7 @@ public TransactionProcessResult(Option outData = default, Option [JsonPropertyName("InData")] - public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new(value); } } + public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new Option(value); } } /// /// Used to track the state of Tag @@ -86,7 +86,7 @@ public TransactionProcessResult(Option outData = default, Option [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } + public string? Tag { get { return this.TagOption; } set { this.TagOption = new Option(value); } } /// /// Used to track the state of TransactionId @@ -99,7 +99,7 @@ public TransactionProcessResult(Option outData = default, Option [JsonPropertyName("transactionId")] - public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new(value); } } + public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs index 391ca74..db4a312 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs @@ -67,7 +67,7 @@ public TrfFtString(string data, Option type = default, Option status /// Gets or Sets Type /// [JsonPropertyName("Type")] - public int? Type { get { return this.TypeOption; } set { this.TypeOption = new(value); } } + public int? Type { get { return this.TypeOption; } set { this.TypeOption = new Option(value); } } /// /// Used to track the state of Status @@ -81,7 +81,7 @@ public TrfFtString(string data, Option type = default, Option status /// /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification [JsonPropertyName("Status")] - public int? Status { get { return this.StatusOption; } set { this.StatusOption = new(value); } } + public int? Status { get { return this.StatusOption; } set { this.StatusOption = new Option(value); } } /// /// Used to track the state of Format @@ -95,7 +95,7 @@ public TrfFtString(string data, Option type = default, Option status /// /// Mask of format of text information (for example, «YYMMDD» for date of birth) [JsonPropertyName("Format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs index 715c775..dd86dc3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs @@ -89,7 +89,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List /// Field data extracted from mrz(machine readable zone) [JsonPropertyName("Field_MRZ")] - public string? FieldMRZ { get { return this.FieldMRZOption; } set { this.FieldMRZOption = new(value); } } + public string? FieldMRZ { get { return this.FieldMRZOption; } set { this.FieldMRZOption = new Option(value); } } /// /// Used to track the state of FieldVisual @@ -103,7 +103,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List /// Field data extracted from visual zone [JsonPropertyName("Field_Visual")] - public string? FieldVisual { get { return this.FieldVisualOption; } set { this.FieldVisualOption = new(value); } } + public string? FieldVisual { get { return this.FieldVisualOption; } set { this.FieldVisualOption = new Option(value); } } /// /// Used to track the state of FieldBarcode @@ -117,7 +117,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List /// Field data extracted from barcode [JsonPropertyName("Field_Barcode")] - public string? FieldBarcode { get { return this.FieldBarcodeOption; } set { this.FieldBarcodeOption = new(value); } } + public string? FieldBarcode { get { return this.FieldBarcodeOption; } set { this.FieldBarcodeOption = new Option(value); } } /// /// Used to track the state of FieldRFID @@ -131,7 +131,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List /// Field data extracted from rfid chip [JsonPropertyName("Field_RFID")] - public string? FieldRFID { get { return this.FieldRFIDOption; } set { this.FieldRFIDOption = new(value); } } + public string? FieldRFID { get { return this.FieldRFIDOption; } set { this.FieldRFIDOption = new Option(value); } } /// /// Used to track the state of FieldType @@ -144,7 +144,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List [JsonPropertyName("FieldType")] - public int? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new(value); } } + public int? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs index 6b29d95..399b285 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs @@ -125,7 +125,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets FieldMask /// [JsonPropertyName("FieldMask")] - public string? FieldMask { get { return this.FieldMaskOption; } set { this.FieldMaskOption = new(value); } } + public string? FieldMask { get { return this.FieldMaskOption; } set { this.FieldMaskOption = new Option(value); } } /// /// Used to track the state of Validity @@ -138,7 +138,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets Validity /// [JsonPropertyName("Validity")] - public int? Validity { get { return this.ValidityOption; } set { this.ValidityOption = new(value); } } + public int? Validity { get { return this.ValidityOption; } set { this.ValidityOption = new Option(value); } } /// /// Used to track the state of InComparison @@ -151,7 +151,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets InComparison /// [JsonPropertyName("InComparison")] - public int? InComparison { get { return this.InComparisonOption; } set { this.InComparisonOption = new(value); } } + public int? InComparison { get { return this.InComparisonOption; } set { this.InComparisonOption = new Option(value); } } /// /// Used to track the state of WLCID @@ -164,7 +164,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets WLCID /// [JsonPropertyName("wLCID")] - public int? WLCID { get { return this.WLCIDOption; } set { this.WLCIDOption = new(value); } } + public int? WLCID { get { return this.WLCIDOption; } set { this.WLCIDOption = new Option(value); } } /// /// Used to track the state of Reserved2 @@ -177,7 +177,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } /// /// Used to track the state of Reserved3 @@ -190,7 +190,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets Reserved3 /// [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new Option(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj b/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj index ba90f2c..720c5e3 100644 --- a/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj +++ b/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj @@ -1,23 +1,25 @@  + true netstandard2.0 Alexander Satsukevich Regula Ltd. DocumentReader WebClient regula document processing id card rfid ocr barcode ipi Regula.DocumentReader.WebClient + Regula.DocumentReader.WebClient 5.8.3 5.8.3 true regula_web_client.snk 10 + enable - - - - - - + + + + + \ No newline at end of file From 4e18cd3ee0ac90c3e38428de25e7eca70061b158 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Fri, 21 Mar 2025 17:17:18 +0300 Subject: [PATCH 04/12] Update templates --- generator-templates/JsonConverter.mustache | 10 ++++++++++ .../Model/AuthenticityCheckResultListInner.cs | 2 +- .../Model/ContainerListListInner.cs | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/generator-templates/JsonConverter.mustache b/generator-templates/JsonConverter.mustache index 163e432..a9039aa 100644 --- a/generator-templates/JsonConverter.mustache +++ b/generator-templates/JsonConverter.mustache @@ -435,6 +435,15 @@ {{/isDiscriminator}} {{/allVars}} {{#allVars}} + {{#isDiscriminator}} + {{^model.composedSchemas.anyOf}} + {{^model.composedSchemas.oneOf}} + writer.WriteNumber("{{baseName}}", {{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{/isEnum}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}.Value{{/required}}){{/isEnum}}); + + {{/model.composedSchemas.oneOf}} + {{/model.composedSchemas.anyOf}} + {{/isDiscriminator}} + {{^isDiscriminator}} {{#isString}} {{^isMap}} {{^isEnum}} @@ -630,6 +639,7 @@ {{/isString}} {{/isEnum}} {{/isUuid}} + {{/isDiscriminator}} {{/allVars}} {{/lambda.trimLineBreaks}} {{/lambda.trimTrailingWithNewLine}} diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs index 95f8135..f6bc892 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs @@ -494,7 +494,7 @@ public override void Write(Utf8JsonWriter writer, AuthenticityCheckResultListInn /// public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) { - writer.WriteNumber("Type", authenticityCheckResultListInner.Type); + } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs index cfd6388..892a4d2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs @@ -1146,7 +1146,7 @@ public override void Write(Utf8JsonWriter writer, ContainerListListInner contain /// public void WriteProperties(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) { - writer.WriteNumber("result_type", containerListListInner.ResultType); + } } } From 100f84bdc86641eb6c6a3839650576a91f41cb6e Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Fri, 21 Mar 2025 17:51:19 +0300 Subject: [PATCH 05/12] Update project settings --- .openapi-generator/FILES | 2 + csharp-generator-config.json | 2 +- ...egula.DocumentReader.NetCoreExample.csproj | 2 +- ...ntReader.NetCoreExampleEncryptedRcl.csproj | 2 +- .../Api/HealthcheckApi.cs | 30 ++-- .../Api/ProcessApi.cs | 12 +- .../Api/TransactionApi.cs | 67 +++++---- .../Client/ApiResponse`1.cs | 5 +- .../Client/ClientUtils.cs | 15 +- .../Client/DateTimeJsonConverter.cs | 4 +- .../Client/DateTimeNullableJsonConverter.cs | 4 +- .../Client/HostConfiguration.cs | 4 +- .../Client/RateLimitProvider`1.cs | 2 +- .../IServiceCollectionExtensions.cs | 4 +- .../Model/AuthParams.cs | 32 ++--- .../Model/AuthenticityCheckResult.cs | 2 +- .../Model/AuthenticityCheckResultItem.cs | 6 +- .../Model/BinaryData.cs | 128 +++++++++--------- .../Model/CandidatesListItem.cs | 2 +- .../Model/ChosenDocumentType.cs | 2 +- .../Model/ContainerList.cs | 2 +- .../Model/DataModule.cs | 4 +- .../Model/DetailsOptical.cs | 2 +- .../Model/DeviceInfo.cs | 12 +- .../Model/DocumentImage.cs | 2 +- .../Model/DocumentPosition.cs | 10 +- .../Model/DocumentTypesCandidates.cs | 4 +- .../Model/DocumentTypesCandidatesList.cs | 4 +- .../Model/DocumentTypesCandidatesResult.cs | 2 +- .../Model/DocumentsDatabase.cs | 8 +- .../Model/EncryptedRCLItem.cs | 2 +- .../Model/EncryptedRCLResult.cs | 2 +- .../Model/ErrorCoordinates.cs | 8 +- .../Model/FDSIDList.cs | 6 +- .../Model/FaceApi.cs | 20 +-- .../Model/FaceApiSearch.cs | 6 +- .../Model/FaceDetection.cs | 4 +- .../Model/FiberItem.cs | 4 +- .../Model/FiberResult.cs | 4 +- .../Model/GetTransactionsByTagResponse.cs | 6 +- .../Model/Healthcheck.cs | 4 +- .../Model/IdentItem.cs | 4 +- .../Model/IdentResult.cs | 4 +- .../Model/ImageData.cs | 2 +- .../Model/ImageQA.cs | 18 +-- .../Model/ImageQualityCheck.cs | 2 +- .../Model/ImageTransactionData.cs | 2 +- .../Model/Images.cs | 4 +- .../Model/ImagesField.cs | 2 +- .../Model/ImagesFieldValue.cs | 10 +- .../Model/InData.cs | 4 +- .../InDataTransactionImagesFieldValue.cs | 8 +- .../Model/InDataVideo.cs | 4 +- .../Model/LicenseItem.cs | 2 +- .../Model/LicenseResult.cs | 2 +- .../Model/ListTransactionsByTagResponse.cs | 4 +- .../Model/ListVerifiedFields.cs | 2 +- .../Model/LivenessParams.cs | 12 +- .../Model/MrzPosition.cs | 10 +- .../Model/OCRSecurityTextItem.cs | 4 +- .../Model/OCRSecurityTextResult.cs | 4 +- .../Model/OneCandidate.cs | 2 +- .../Model/OriginalSymbol.cs | 2 +- .../Model/OutData.cs | 4 +- .../OutDataTransactionImagesFieldValue.cs | 10 +- .../Model/PArrayField.cs | 6 +- .../Model/ParsedData.cs | 2 +- .../Model/PerDocumentConfig.cs | 4 +- .../Model/PhotoIdentItem.cs | 14 +- .../Model/PhotoIdentResult.cs | 14 +- .../Model/PointsContainer.cs | 2 +- .../Model/ProcessParams.cs | 118 ++++++++-------- .../Model/ProcessParamsRfid.cs | 2 +- .../Model/ProcessRequest.cs | 24 ++-- .../Model/ProcessRequestImage.cs | 6 +- .../Model/ProcessResponse.cs | 8 +- .../Model/ProcessSystemInfo.cs | 4 +- .../Model/RFIDDocVisualExtendedField.cs | 4 +- .../Model/RFIDDocVisualExtendedFieldItem.cs | 4 +- .../Model/ResultItem.cs | 8 +- .../Model/RfidAccessControlInfo.cs | 4 +- .../Model/RfidDataFile.cs | 20 +-- .../Model/RfidSessionData.cs | 10 +- .../Model/SecurityFeatureItem.cs | 4 +- .../Model/SecurityFeatureResult.cs | 4 +- .../Model/SecurityObjectCertificates.cs | 2 +- .../Model/Status.cs | 2 +- .../Model/StringRecognitionResult.cs | 6 +- .../Model/SymbolCandidate.cs | 4 +- .../Model/SymbolRecognitionResult.cs | 6 +- .../Model/TDocBinaryInfo.cs | 4 +- .../Model/TextAvailableSource.cs | 2 +- .../Model/TextField.cs | 2 +- .../Model/TextFieldValue.cs | 10 +- .../Model/TransactionImage.cs | 2 +- .../Model/TransactionInfo.cs | 16 +-- .../Model/TransactionProcessGetResponse.cs | 8 +- .../Model/TransactionProcessRequest.cs | 14 +- .../Model/TransactionProcessResult.cs | 8 +- .../Model/TrfFtString.cs | 6 +- .../Model/VerifiedFieldMap.cs | 10 +- .../Model/VisualExtendedFieldItem.cs | 12 +- .../Regula.DocumentReader.WebClient.csproj | 4 +- 103 files changed, 481 insertions(+), 464 deletions(-) diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 7cdd8a1..a6fe252 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -8,6 +8,8 @@ src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs +src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs +src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs diff --git a/csharp-generator-config.json b/csharp-generator-config.json index 41c7f7d..7cb55b6 100644 --- a/csharp-generator-config.json +++ b/csharp-generator-config.json @@ -1,7 +1,7 @@ { "packageName": "Regula.DocumentReader.WebClient", "nullableReferenceTypes": true, - "targetFramework": "netstandard2.0", + "targetFramework": "net8.0", "typeMappings" : { "ContainerListListInner": "ResultItem", "AuthenticityCheckResultListInner": "AuthenticityCheckResultItem" diff --git a/src/Regula.DocumentReader.NetCoreExample/Regula.DocumentReader.NetCoreExample.csproj b/src/Regula.DocumentReader.NetCoreExample/Regula.DocumentReader.NetCoreExample.csproj index fd38b5b..3cfb1ca 100644 --- a/src/Regula.DocumentReader.NetCoreExample/Regula.DocumentReader.NetCoreExample.csproj +++ b/src/Regula.DocumentReader.NetCoreExample/Regula.DocumentReader.NetCoreExample.csproj @@ -3,7 +3,7 @@ Exe DocumentReader WebClient Example Regula.DocumentReader.NetCoreExampple - net6.0;net7.0;net8.0 + net8.0 diff --git a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj index 3ba8d42..84f9fc7 100644 --- a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj +++ b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj @@ -3,7 +3,7 @@ Exe DocumentReader WebClient Example EncryptedRcl Regula.DocumentReader.NetCoreExampleEncryptedRcl - net6.0;net7.0;net8.0 + net8.0 diff --git a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs index 340f171..d7c12c4 100644 --- a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs @@ -20,6 +20,7 @@ using System.Text.Json; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; +using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { @@ -368,17 +369,18 @@ public async Task HealthzAsync(Option xRequestID = if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("GET"); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - HealthzApiResponse apiResponseLocalVar = new HealthzApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/healthz", requestedAtLocalVar, _jsonSerializerOptions); + HealthzApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/healthz", requestedAtLocalVar, _jsonSerializerOptions); AfterHealthzDefaultImplementation(apiResponseLocalVar, xRequestID); @@ -439,7 +441,7 @@ public HealthzApiResponse(ILogger logger, System.Net.Http.Ht // This logic may be modified with the AsModel.mustache template return IsOk ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -447,7 +449,7 @@ public HealthzApiResponse(ILogger logger, System.Net.Http.Ht /// /// /// - public bool TryOk(out Regula.DocumentReader.WebClient.Model.Healthcheck? result) + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.Healthcheck? result) { result = null; @@ -587,17 +589,18 @@ public async Task PingAsync(Option xRequestID = defaul if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("GET"); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - PingApiResponse apiResponseLocalVar = new PingApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/ping", requestedAtLocalVar, _jsonSerializerOptions); + PingApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/ping", requestedAtLocalVar, _jsonSerializerOptions); AfterPingDefaultImplementation(apiResponseLocalVar, xRequestID); @@ -658,7 +661,7 @@ public PingApiResponse(ILogger logger, System.Net.Http.HttpRequ // This logic may be modified with the AsModel.mustache template return IsOk ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -666,7 +669,7 @@ public PingApiResponse(ILogger logger, System.Net.Http.HttpRequ /// /// /// - public bool TryOk(out Regula.DocumentReader.WebClient.Model.DeviceInfo? result) + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.DeviceInfo? result) { result = null; @@ -797,17 +800,18 @@ public async Task ReadyzAsync(Option xRequestID = de httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; - httpRequestMessageLocalVar.Method = new HttpMethod("GET"); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ReadyzApiResponse apiResponseLocalVar = new ReadyzApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/readyz", requestedAtLocalVar, _jsonSerializerOptions); + ReadyzApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/readyz", requestedAtLocalVar, _jsonSerializerOptions); AfterReadyzDefaultImplementation(apiResponseLocalVar, xRequestID); diff --git a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs index e6cd265..edfeb78 100644 --- a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs @@ -20,6 +20,7 @@ using System.Text.Json; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; +using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { @@ -287,17 +288,18 @@ public async Task ApiProcessAsync(ProcessRequest process if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("POST"); + + httpRequestMessageLocalVar.Method = HttpMethod.Post; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiProcessApiResponse apiResponseLocalVar = new ApiProcessApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/process", requestedAtLocalVar, _jsonSerializerOptions); + ApiProcessApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/process", requestedAtLocalVar, _jsonSerializerOptions); AfterApiProcessDefaultImplementation(apiResponseLocalVar, processRequest, xRequestID); @@ -358,7 +360,7 @@ public ApiProcessApiResponse(ILogger logger, System.Net.H // This logic may be modified with the AsModel.mustache template return IsOk ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -366,7 +368,7 @@ public ApiProcessApiResponse(ILogger logger, System.Net.H /// /// /// - public bool TryOk(out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) { result = null; diff --git a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs index 8046bb4..b17cb8a 100644 --- a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs @@ -20,6 +20,7 @@ using System.Text.Json; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; +using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { @@ -582,17 +583,18 @@ public async Task ApiV2TagTagIdDeleteAsync(Guid if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("DELETE"); + + httpRequestMessageLocalVar.Method = HttpMethod.Delete; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TagTagIdDeleteApiResponse apiResponseLocalVar = new ApiV2TagTagIdDeleteApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TagTagIdDeleteApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TagTagIdDeleteDefaultImplementation(apiResponseLocalVar, tagId); @@ -653,7 +655,7 @@ public ApiV2TagTagIdDeleteApiResponse(ILogger lo // This logic may be modified with the AsModel.mustache template return IsNoContent ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -661,7 +663,7 @@ public ApiV2TagTagIdDeleteApiResponse(ILogger lo /// /// /// - public bool TryNoContent(out Object? result) + public bool TryNoContent([NotNullWhen(true)]out Object? result) { result = null; @@ -811,17 +813,18 @@ public async Task ApiV2TagTagIdTransac if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("GET"); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar = new ApiV2TagTagIdTransactionsGetApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}/transactions", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}/transactions", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TagTagIdTransactionsGetDefaultImplementation(apiResponseLocalVar, tagId); @@ -882,7 +885,7 @@ public ApiV2TagTagIdTransactionsGetApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -890,7 +893,7 @@ public ApiV2TagTagIdTransactionsGetApiResponse(ILogger /// /// - public bool TryOk(out Regula.DocumentReader.WebClient.Model.ListTransactionsByTagResponse? result) + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ListTransactionsByTagResponse? result) { result = null; @@ -1052,17 +1055,18 @@ public async Task ApiV2Transac if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("GET"); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar = new ApiV2TransactionTransactionIdFileGetApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/file", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/file", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TransactionTransactionIdFileGetDefaultImplementation(apiResponseLocalVar, transactionId, name); @@ -1123,7 +1127,7 @@ public ApiV2TransactionTransactionIdFileGetApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -1131,7 +1135,7 @@ public ApiV2TransactionTransactionIdFileGetApiResponse(ILogger /// /// - public bool TryOk(out System.IO.Stream? result) + public bool TryOk([NotNullWhen(true)]out System.IO.Stream? result) { result = null; @@ -1262,17 +1266,18 @@ public async Task ApiV2Transaction if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("GET"); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar = new ApiV2TransactionTransactionIdGetApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TransactionTransactionIdGetDefaultImplementation(apiResponseLocalVar, transactionId); @@ -1333,7 +1338,7 @@ public ApiV2TransactionTransactionIdGetApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -1341,7 +1346,7 @@ public ApiV2TransactionTransactionIdGetApiResponse(ILogger /// /// - public bool TryOk(out Regula.DocumentReader.WebClient.Model.TransactionProcessGetResponse? result) + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessGetResponse? result) { result = null; @@ -1510,17 +1515,18 @@ public async Task ApiV2Tra if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("POST"); + + httpRequestMessageLocalVar.Method = HttpMethod.Post; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar = new ApiV2TransactionTransactionIdProcessPostApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/process", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/process", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TransactionTransactionIdProcessPostDefaultImplementation(apiResponseLocalVar, transactionId, transactionProcessRequest); @@ -1581,7 +1587,7 @@ public ApiV2TransactionTransactionIdProcessPostApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -1589,7 +1595,7 @@ public ApiV2TransactionTransactionIdProcessPostApiResponse(ILogger /// /// - public bool TryOk(out Regula.DocumentReader.WebClient.Model.TransactionProcessResult? result) + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessResult? result) { result = null; @@ -1739,17 +1745,18 @@ public async Task ApiV2Tran if (acceptLocalVar != null) httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = new HttpMethod("GET"); + + httpRequestMessageLocalVar.Method = HttpMethod.Get; DateTime requestedAtLocalVar = DateTime.UtcNow; using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false); + string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar = new ApiV2TransactionTransactionIdResultsGetApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/results", requestedAtLocalVar, _jsonSerializerOptions); + ApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/results", requestedAtLocalVar, _jsonSerializerOptions); AfterApiV2TransactionTransactionIdResultsGetDefaultImplementation(apiResponseLocalVar, transactionId, withImages); @@ -1810,7 +1817,7 @@ public ApiV2TransactionTransactionIdResultsGetApiResponse(ILogger(RawContent, _jsonSerializerOptions) - : default; + : null; } /// @@ -1818,7 +1825,7 @@ public ApiV2TransactionTransactionIdResultsGetApiResponse(ILogger /// /// - public bool TryOk(out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) + public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) { result = null; diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs index 7c2ef9e..56b1e9a 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs @@ -11,6 +11,7 @@ #nullable enable using System; +using System.Diagnostics.CodeAnalysis; using System.Net; namespace Regula.DocumentReader.WebClient.Client @@ -166,7 +167,7 @@ public interface INoContent : IApiResponse /// /// /// - bool TryNoContent(out TType? result); + bool TryNoContent([NotNullWhen(true)]out TType? result); } /// @@ -186,6 +187,6 @@ public interface IOk : IApiResponse /// /// /// - bool TryOk(out TType? result); + bool TryOk([NotNullWhen(true)]out TType? result); } } diff --git a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs index 2ea1aac..99eea23 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs @@ -27,7 +27,7 @@ namespace Regula.DocumentReader.WebClient.Client /// /// Utility functions providing some benefit to API client consumers. /// - public static class ClientUtils + public static partial class ClientUtils { /// @@ -47,7 +47,7 @@ public static class ClientUtils /// /// /// - public static bool TryDeserialize(string json, JsonSerializerOptions options, out T result) + public static bool TryDeserialize(string json, JsonSerializerOptions options, [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) { try { @@ -69,7 +69,7 @@ public static bool TryDeserialize(string json, JsonSerializerOptions options, /// /// /// - public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, out T result) + public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) { try { @@ -105,6 +105,8 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 return dateTimeOffset.ToString(format); + if (obj is DateOnly dateOnly) + return dateOnly.ToString(format); if (obj is bool boolean) return boolean ? "true" @@ -199,7 +201,7 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp return VisibilityValueConverter.ToJsonValue(visibility).ToString(); if (obj is ICollection collection) { - List entries = new List(); + List entries = new(); foreach (var entry in collection) entries.Add(ParameterToString(entry)); return string.Join(",", entries); @@ -309,7 +311,8 @@ public static byte[] ReadAsBytes(Stream inputStream) /// /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. /// - private static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); + [GeneratedRegex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$")] + private static partial Regex JsonRegex(); /// /// Check if the given MIME is a JSON MIME. @@ -325,7 +328,7 @@ public static bool IsJsonMime(string mime) { if (string.IsNullOrWhiteSpace(mime)) return false; - return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); + return JsonRegex().IsMatch(mime) || mime.Equals("application/json-patch+json"); } /// diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs index 37a3330..ebb5bfc 100644 --- a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs +++ b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs @@ -15,7 +15,7 @@ namespace Regula.DocumentReader.WebClient.Client { /// - /// Formatter for 'date' and 'date-time' openapi formats ss defined by full-date - RFC3339 + /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types /// public class DateTimeJsonConverter : JsonConverter @@ -32,7 +32,6 @@ public class DateTimeJsonConverter : JsonConverter "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", - "yyyy'-'MM'-'dd", "yyyyMMddTHHmmss.fffffffK", "yyyyMMddTHHmmss.ffffffK", "yyyyMMddTHHmmss.fffffK", @@ -41,7 +40,6 @@ public class DateTimeJsonConverter : JsonConverter "yyyyMMddTHHmmss.ffK", "yyyyMMddTHHmmss.fK", "yyyyMMddTHHmmssK", - "yyyyMMdd" }; diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs index 1c7e243..442c351 100644 --- a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs +++ b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs @@ -15,7 +15,7 @@ namespace Regula.DocumentReader.WebClient.Client { /// - /// Formatter for 'date' and 'date-time' openapi formats ss defined by full-date - RFC3339 + /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types /// public class DateTimeNullableJsonConverter : JsonConverter @@ -32,7 +32,6 @@ public class DateTimeNullableJsonConverter : JsonConverter "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", - "yyyy'-'MM'-'dd", "yyyyMMddTHHmmss.fffffffK", "yyyyMMddTHHmmss.ffffffK", "yyyyMMddTHHmmss.fffffK", @@ -41,7 +40,6 @@ public class DateTimeNullableJsonConverter : JsonConverter "yyyyMMddTHHmmss.ffK", "yyyyMMddTHHmmss.fK", "yyyyMMddTHHmmssK", - "yyyyMMdd" }; diff --git a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs index 17e480a..14b3cad 100644 --- a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs +++ b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs @@ -41,6 +41,8 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new JsonStringEnumConverter()); _jsonOptions.Converters.Add(new DateTimeJsonConverter()); _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); + _jsonOptions.Converters.Add(new DateOnlyJsonConverter()); + _jsonOptions.Converters.Add(new DateOnlyNullableJsonConverter()); _jsonOptions.Converters.Add(new AreaArrayJsonConverter()); _jsonOptions.Converters.Add(new AreaContainerJsonConverter()); _jsonOptions.Converters.Add(new AuthParamsJsonConverter()); @@ -310,7 +312,7 @@ public HostConfiguration(IServiceCollection services) _jsonOptions.Converters.Add(new VisibilityJsonConverter()); _jsonOptions.Converters.Add(new VisibilityNullableJsonConverter()); _jsonOptions.Converters.Add(new VisualExtendedFieldItemJsonConverter()); - JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new JsonSerializerOptionsProvider(_jsonOptions); + JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new(_jsonOptions); _services.AddSingleton(jsonSerializerOptionsProvider); _services.AddSingleton(); _services.AddSingleton(); diff --git a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs index 9fed0b8..43f0498 100644 --- a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs +++ b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs @@ -22,7 +22,7 @@ namespace Regula.DocumentReader.WebClient.Client /// public class RateLimitProvider : TokenProvider where TTokenBase : TokenBase { - internal Dictionary> AvailableTokens { get; } = new Dictionary>(); + internal Dictionary> AvailableTokens { get; } = new(); /// /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs index d3b6c94..a1df963 100644 --- a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs @@ -27,7 +27,7 @@ public static class IServiceCollectionExtensions /// public static void AddApi(this IServiceCollection services) { - HostConfiguration config = new HostConfiguration(services); + HostConfiguration config = new(services); AddApi(services, config); } @@ -38,7 +38,7 @@ public static void AddApi(this IServiceCollection services) /// public static void AddApi(this IServiceCollection services, Action options) { - HostConfiguration config = new HostConfiguration(services); + HostConfiguration config = new(services); options(config); AddApi(services, config); } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs index 0dd88d5..0baa1f1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs @@ -85,7 +85,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable document liveness check [JsonPropertyName("checkLiveness")] - public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new Option(value); } } + public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new(value); } } /// /// Used to track the state of LivenessParams @@ -98,7 +98,7 @@ public AuthParams(Option checkLiveness = default, Option /// Gets or Sets LivenessParams /// [JsonPropertyName("livenessParams")] - public LivenessParams? LivenessParams { get { return this.LivenessParamsOption; } set { this.LivenessParamsOption = new Option(value); } } + public LivenessParams? LivenessParams { get { return this.LivenessParamsOption; } set { this.LivenessParamsOption = new(value); } } /// /// Used to track the state of CheckUVLuminiscence @@ -112,7 +112,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Document luminescence check in UV light [JsonPropertyName("checkUVLuminiscence")] - public bool? CheckUVLuminiscence { get { return this.CheckUVLuminiscenceOption; } set { this.CheckUVLuminiscenceOption = new Option(value); } } + public bool? CheckUVLuminiscence { get { return this.CheckUVLuminiscenceOption; } set { this.CheckUVLuminiscenceOption = new(value); } } /// /// Used to track the state of CheckIRB900 @@ -126,7 +126,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable B900 ink MRZ contrast check in IR light [JsonPropertyName("checkIRB900")] - public bool? CheckIRB900 { get { return this.CheckIRB900Option; } set { this.CheckIRB900Option = new Option(value); } } + public bool? CheckIRB900 { get { return this.CheckIRB900Option; } set { this.CheckIRB900Option = new(value); } } /// /// Used to track the state of CheckImagePatterns @@ -140,7 +140,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) [JsonPropertyName("checkImagePatterns")] - public bool? CheckImagePatterns { get { return this.CheckImagePatternsOption; } set { this.CheckImagePatternsOption = new Option(value); } } + public bool? CheckImagePatterns { get { return this.CheckImagePatternsOption; } set { this.CheckImagePatternsOption = new(value); } } /// /// Used to track the state of CheckFibers @@ -154,7 +154,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Fibers detection [JsonPropertyName("checkFibers")] - public bool? CheckFibers { get { return this.CheckFibersOption; } set { this.CheckFibersOption = new Option(value); } } + public bool? CheckFibers { get { return this.CheckFibersOption; } set { this.CheckFibersOption = new(value); } } /// /// Used to track the state of CheckExtMRZ @@ -168,7 +168,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Extended MRZ Check [JsonPropertyName("checkExtMRZ")] - public bool? CheckExtMRZ { get { return this.CheckExtMRZOption; } set { this.CheckExtMRZOption = new Option(value); } } + public bool? CheckExtMRZ { get { return this.CheckExtMRZOption; } set { this.CheckExtMRZOption = new(value); } } /// /// Used to track the state of CheckExtOCR @@ -182,7 +182,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Extended OCR Check [JsonPropertyName("checkExtOCR")] - public bool? CheckExtOCR { get { return this.CheckExtOCROption; } set { this.CheckExtOCROption = new Option(value); } } + public bool? CheckExtOCR { get { return this.CheckExtOCROption; } set { this.CheckExtOCROption = new(value); } } /// /// Used to track the state of CheckAxial @@ -196,7 +196,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable laminate integrity check in axial light [JsonPropertyName("checkAxial")] - public bool? CheckAxial { get { return this.CheckAxialOption; } set { this.CheckAxialOption = new Option(value); } } + public bool? CheckAxial { get { return this.CheckAxialOption; } set { this.CheckAxialOption = new(value); } } /// /// Used to track the state of CheckBarcodeFormat @@ -210,7 +210,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) [JsonPropertyName("checkBarcodeFormat")] - public bool? CheckBarcodeFormat { get { return this.CheckBarcodeFormatOption; } set { this.CheckBarcodeFormatOption = new Option(value); } } + public bool? CheckBarcodeFormat { get { return this.CheckBarcodeFormatOption; } set { this.CheckBarcodeFormatOption = new(value); } } /// /// Used to track the state of CheckIRVisibility @@ -224,7 +224,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Document elements visibility check in IR light [JsonPropertyName("checkIRVisibility")] - public bool? CheckIRVisibility { get { return this.CheckIRVisibilityOption; } set { this.CheckIRVisibilityOption = new Option(value); } } + public bool? CheckIRVisibility { get { return this.CheckIRVisibilityOption; } set { this.CheckIRVisibilityOption = new(value); } } /// /// Used to track the state of CheckIPI @@ -238,7 +238,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Invisible Personal Information (IPI) check [JsonPropertyName("checkIPI")] - public bool? CheckIPI { get { return this.CheckIPIOption; } set { this.CheckIPIOption = new Option(value); } } + public bool? CheckIPI { get { return this.CheckIPIOption; } set { this.CheckIPIOption = new(value); } } /// /// Used to track the state of CheckPhotoEmbedding @@ -252,7 +252,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) [JsonPropertyName("checkPhotoEmbedding")] - public bool? CheckPhotoEmbedding { get { return this.CheckPhotoEmbeddingOption; } set { this.CheckPhotoEmbeddingOption = new Option(value); } } + public bool? CheckPhotoEmbedding { get { return this.CheckPhotoEmbeddingOption; } set { this.CheckPhotoEmbeddingOption = new(value); } } /// /// Used to track the state of CheckPhotoComparison @@ -266,7 +266,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Portrait comparison check [JsonPropertyName("checkPhotoComparison")] - public bool? CheckPhotoComparison { get { return this.CheckPhotoComparisonOption; } set { this.CheckPhotoComparisonOption = new Option(value); } } + public bool? CheckPhotoComparison { get { return this.CheckPhotoComparisonOption; } set { this.CheckPhotoComparisonOption = new(value); } } /// /// Used to track the state of CheckLetterScreen @@ -280,7 +280,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable LetterScreen check [JsonPropertyName("checkLetterScreen")] - public bool? CheckLetterScreen { get { return this.CheckLetterScreenOption; } set { this.CheckLetterScreenOption = new Option(value); } } + public bool? CheckLetterScreen { get { return this.CheckLetterScreenOption; } set { this.CheckLetterScreenOption = new(value); } } /// /// Used to track the state of CheckSecurityText @@ -294,7 +294,7 @@ public AuthParams(Option checkLiveness = default, Option /// /// This parameter is used to enable Security text check [JsonPropertyName("checkSecurityText")] - public bool? CheckSecurityText { get { return this.CheckSecurityTextOption; } set { this.CheckSecurityTextOption = new Option(value); } } + public bool? CheckSecurityText { get { return this.CheckSecurityTextOption; } set { this.CheckSecurityTextOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs index 989059b..beb02f1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs @@ -79,7 +79,7 @@ public AuthenticityCheckResult(AuthenticityResultType type, CheckResult result, /// /// Count of items in List [JsonPropertyName("Count")] - public int? Count { get { return this.CountOption; } set { this.CountOption = new Option(value); } } + public int? Count { get { return this.CountOption; } set { this.CountOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs index 961a084..bfe2d17 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs @@ -59,7 +59,7 @@ public AuthenticityCheckResultItem(Option elementResult = default, /// Gets or Sets ElementResult /// [JsonPropertyName("ElementResult")] - public CheckResult? ElementResult { get { return this.ElementResultOption; } set { this.ElementResultOption = new Option(value); } } + public CheckResult? ElementResult { get { return this.ElementResultOption; } set { this.ElementResultOption = new(value); } } /// /// Used to track the state of ElementDiagnose @@ -72,7 +72,7 @@ public AuthenticityCheckResultItem(Option elementResult = default, /// Gets or Sets ElementDiagnose /// [JsonPropertyName("ElementDiagnose")] - public CheckDiagnose? ElementDiagnose { get { return this.ElementDiagnoseOption; } set { this.ElementDiagnoseOption = new Option(value); } } + public CheckDiagnose? ElementDiagnose { get { return this.ElementDiagnoseOption; } set { this.ElementDiagnoseOption = new(value); } } /// /// The discriminator @@ -92,7 +92,7 @@ public AuthenticityCheckResultItem(Option elementResult = default, /// Gets or Sets PercentValue /// [JsonPropertyName("PercentValue")] - public int? PercentValue { get { return this.PercentValueOption; } set { this.PercentValueOption = new Option(value); } } + public int? PercentValue { get { return this.PercentValueOption; } set { this.PercentValueOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs index 89ac71d..17c0b8d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs @@ -180,7 +180,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDAuthenticationInfo /// [JsonPropertyName("RFID_Authentication_Info")] - public Dictionary? RFIDAuthenticationInfo { get { return this.RFIDAuthenticationInfoOption; } set { this.RFIDAuthenticationInfoOption = new Option?>(value); } } + public Dictionary? RFIDAuthenticationInfo { get { return this.RFIDAuthenticationInfoOption; } set { this.RFIDAuthenticationInfoOption = new(value); } } /// /// Used to track the state of RFIDMIFAREDataValidity @@ -193,7 +193,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDMIFAREDataValidity /// [JsonPropertyName("RFID_MIFARE_Data_Validity")] - public Dictionary? RFIDMIFAREDataValidity { get { return this.RFIDMIFAREDataValidityOption; } set { this.RFIDMIFAREDataValidityOption = new Option?>(value); } } + public Dictionary? RFIDMIFAREDataValidity { get { return this.RFIDMIFAREDataValidityOption; } set { this.RFIDMIFAREDataValidityOption = new(value); } } /// /// Used to track the state of RFIDMIFAREData @@ -206,7 +206,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDMIFAREData /// [JsonPropertyName("RFID_MIFARE_Data")] - public Dictionary? RFIDMIFAREData { get { return this.RFIDMIFAREDataOption; } set { this.RFIDMIFAREDataOption = new Option?>(value); } } + public Dictionary? RFIDMIFAREData { get { return this.RFIDMIFAREDataOption; } set { this.RFIDMIFAREDataOption = new(value); } } /// /// Used to track the state of RFID_EF_COM @@ -219,7 +219,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFID_EF_COM /// [JsonPropertyName("RFID_EF_COM")] - public Dictionary? RFID_EF_COM { get { return this.RFID_EF_COMOption; } set { this.RFID_EF_COMOption = new Option?>(value); } } + public Dictionary? RFID_EF_COM { get { return this.RFID_EF_COMOption; } set { this.RFID_EF_COMOption = new(value); } } /// /// Used to track the state of RFIDDG1 @@ -232,7 +232,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG1 /// [JsonPropertyName("RFID_DG1")] - public RfidDG1? RFIDDG1 { get { return this.RFIDDG1Option; } set { this.RFIDDG1Option = new Option(value); } } + public RfidDG1? RFIDDG1 { get { return this.RFIDDG1Option; } set { this.RFIDDG1Option = new(value); } } /// /// Used to track the state of RFIDDG2 @@ -245,7 +245,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG2 /// [JsonPropertyName("RFID_DG2")] - public Dictionary? RFIDDG2 { get { return this.RFIDDG2Option; } set { this.RFIDDG2Option = new Option?>(value); } } + public Dictionary? RFIDDG2 { get { return this.RFIDDG2Option; } set { this.RFIDDG2Option = new(value); } } /// /// Used to track the state of RFIDDG3 @@ -258,7 +258,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG3 /// [JsonPropertyName("RFID_DG3")] - public Dictionary? RFIDDG3 { get { return this.RFIDDG3Option; } set { this.RFIDDG3Option = new Option?>(value); } } + public Dictionary? RFIDDG3 { get { return this.RFIDDG3Option; } set { this.RFIDDG3Option = new(value); } } /// /// Used to track the state of RFIDDG4 @@ -271,7 +271,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG4 /// [JsonPropertyName("RFID_DG4")] - public Dictionary? RFIDDG4 { get { return this.RFIDDG4Option; } set { this.RFIDDG4Option = new Option?>(value); } } + public Dictionary? RFIDDG4 { get { return this.RFIDDG4Option; } set { this.RFIDDG4Option = new(value); } } /// /// Used to track the state of RFIDDG5 @@ -284,7 +284,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG5 /// [JsonPropertyName("RFID_DG5")] - public Dictionary? RFIDDG5 { get { return this.RFIDDG5Option; } set { this.RFIDDG5Option = new Option?>(value); } } + public Dictionary? RFIDDG5 { get { return this.RFIDDG5Option; } set { this.RFIDDG5Option = new(value); } } /// /// Used to track the state of RFIDDG6 @@ -297,7 +297,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG6 /// [JsonPropertyName("RFID_DG6")] - public Dictionary? RFIDDG6 { get { return this.RFIDDG6Option; } set { this.RFIDDG6Option = new Option?>(value); } } + public Dictionary? RFIDDG6 { get { return this.RFIDDG6Option; } set { this.RFIDDG6Option = new(value); } } /// /// Used to track the state of RFIDDG7 @@ -310,7 +310,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG7 /// [JsonPropertyName("RFID_DG7")] - public Dictionary? RFIDDG7 { get { return this.RFIDDG7Option; } set { this.RFIDDG7Option = new Option?>(value); } } + public Dictionary? RFIDDG7 { get { return this.RFIDDG7Option; } set { this.RFIDDG7Option = new(value); } } /// /// Used to track the state of RFIDDG8 @@ -323,7 +323,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG8 /// [JsonPropertyName("RFID_DG8")] - public Dictionary? RFIDDG8 { get { return this.RFIDDG8Option; } set { this.RFIDDG8Option = new Option?>(value); } } + public Dictionary? RFIDDG8 { get { return this.RFIDDG8Option; } set { this.RFIDDG8Option = new(value); } } /// /// Used to track the state of RFIDDG9 @@ -336,7 +336,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG9 /// [JsonPropertyName("RFID_DG9")] - public Dictionary? RFIDDG9 { get { return this.RFIDDG9Option; } set { this.RFIDDG9Option = new Option?>(value); } } + public Dictionary? RFIDDG9 { get { return this.RFIDDG9Option; } set { this.RFIDDG9Option = new(value); } } /// /// Used to track the state of RFIDDG10 @@ -349,7 +349,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG10 /// [JsonPropertyName("RFID_DG10")] - public Dictionary? RFIDDG10 { get { return this.RFIDDG10Option; } set { this.RFIDDG10Option = new Option?>(value); } } + public Dictionary? RFIDDG10 { get { return this.RFIDDG10Option; } set { this.RFIDDG10Option = new(value); } } /// /// Used to track the state of RFIDDG11 @@ -362,7 +362,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG11 /// [JsonPropertyName("RFID_DG11")] - public Dictionary? RFIDDG11 { get { return this.RFIDDG11Option; } set { this.RFIDDG11Option = new Option?>(value); } } + public Dictionary? RFIDDG11 { get { return this.RFIDDG11Option; } set { this.RFIDDG11Option = new(value); } } /// /// Used to track the state of RFIDDG12 @@ -375,7 +375,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG12 /// [JsonPropertyName("RFID_DG12")] - public Dictionary? RFIDDG12 { get { return this.RFIDDG12Option; } set { this.RFIDDG12Option = new Option?>(value); } } + public Dictionary? RFIDDG12 { get { return this.RFIDDG12Option; } set { this.RFIDDG12Option = new(value); } } /// /// Used to track the state of RFIDDG13 @@ -388,7 +388,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG13 /// [JsonPropertyName("RFID_DG13")] - public Dictionary? RFIDDG13 { get { return this.RFIDDG13Option; } set { this.RFIDDG13Option = new Option?>(value); } } + public Dictionary? RFIDDG13 { get { return this.RFIDDG13Option; } set { this.RFIDDG13Option = new(value); } } /// /// Used to track the state of RFIDDG14 @@ -401,7 +401,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG14 /// [JsonPropertyName("RFID_DG14")] - public Dictionary? RFIDDG14 { get { return this.RFIDDG14Option; } set { this.RFIDDG14Option = new Option?>(value); } } + public Dictionary? RFIDDG14 { get { return this.RFIDDG14Option; } set { this.RFIDDG14Option = new(value); } } /// /// Used to track the state of RFIDDG15 @@ -414,7 +414,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG15 /// [JsonPropertyName("RFID_DG15")] - public Dictionary? RFIDDG15 { get { return this.RFIDDG15Option; } set { this.RFIDDG15Option = new Option?>(value); } } + public Dictionary? RFIDDG15 { get { return this.RFIDDG15Option; } set { this.RFIDDG15Option = new(value); } } /// /// Used to track the state of RFIDDG16 @@ -427,7 +427,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDDG16 /// [JsonPropertyName("RFID_DG16")] - public Dictionary? RFIDDG16 { get { return this.RFIDDG16Option; } set { this.RFIDDG16Option = new Option?>(value); } } + public Dictionary? RFIDDG16 { get { return this.RFIDDG16Option; } set { this.RFIDDG16Option = new(value); } } /// /// Used to track the state of RFID_EF_SOD @@ -440,7 +440,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFID_EF_SOD /// [JsonPropertyName("RFID_EF_SOD")] - public Dictionary? RFID_EF_SOD { get { return this.RFID_EF_SODOption; } set { this.RFID_EF_SODOption = new Option?>(value); } } + public Dictionary? RFID_EF_SOD { get { return this.RFID_EF_SODOption; } set { this.RFID_EF_SODOption = new(value); } } /// /// Used to track the state of EIDDG1 @@ -453,7 +453,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG1 /// [JsonPropertyName("eID_DG1")] - public Dictionary? EIDDG1 { get { return this.EIDDG1Option; } set { this.EIDDG1Option = new Option?>(value); } } + public Dictionary? EIDDG1 { get { return this.EIDDG1Option; } set { this.EIDDG1Option = new(value); } } /// /// Used to track the state of EIDDG2 @@ -466,7 +466,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG2 /// [JsonPropertyName("eID_DG2")] - public Dictionary? EIDDG2 { get { return this.EIDDG2Option; } set { this.EIDDG2Option = new Option?>(value); } } + public Dictionary? EIDDG2 { get { return this.EIDDG2Option; } set { this.EIDDG2Option = new(value); } } /// /// Used to track the state of EIDDG3 @@ -479,7 +479,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG3 /// [JsonPropertyName("eID_DG3")] - public Dictionary? EIDDG3 { get { return this.EIDDG3Option; } set { this.EIDDG3Option = new Option?>(value); } } + public Dictionary? EIDDG3 { get { return this.EIDDG3Option; } set { this.EIDDG3Option = new(value); } } /// /// Used to track the state of EIDDG4 @@ -492,7 +492,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG4 /// [JsonPropertyName("eID_DG4")] - public Dictionary? EIDDG4 { get { return this.EIDDG4Option; } set { this.EIDDG4Option = new Option?>(value); } } + public Dictionary? EIDDG4 { get { return this.EIDDG4Option; } set { this.EIDDG4Option = new(value); } } /// /// Used to track the state of EIDDG5 @@ -505,7 +505,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG5 /// [JsonPropertyName("eID_DG5")] - public Dictionary? EIDDG5 { get { return this.EIDDG5Option; } set { this.EIDDG5Option = new Option?>(value); } } + public Dictionary? EIDDG5 { get { return this.EIDDG5Option; } set { this.EIDDG5Option = new(value); } } /// /// Used to track the state of EIDDG6 @@ -518,7 +518,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG6 /// [JsonPropertyName("eID_DG6")] - public Dictionary? EIDDG6 { get { return this.EIDDG6Option; } set { this.EIDDG6Option = new Option?>(value); } } + public Dictionary? EIDDG6 { get { return this.EIDDG6Option; } set { this.EIDDG6Option = new(value); } } /// /// Used to track the state of EIDDG7 @@ -531,7 +531,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG7 /// [JsonPropertyName("eID_DG7")] - public Dictionary? EIDDG7 { get { return this.EIDDG7Option; } set { this.EIDDG7Option = new Option?>(value); } } + public Dictionary? EIDDG7 { get { return this.EIDDG7Option; } set { this.EIDDG7Option = new(value); } } /// /// Used to track the state of EIDDG8 @@ -544,7 +544,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG8 /// [JsonPropertyName("eID_DG8")] - public Dictionary? EIDDG8 { get { return this.EIDDG8Option; } set { this.EIDDG8Option = new Option?>(value); } } + public Dictionary? EIDDG8 { get { return this.EIDDG8Option; } set { this.EIDDG8Option = new(value); } } /// /// Used to track the state of EIDDG9 @@ -557,7 +557,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG9 /// [JsonPropertyName("eID_DG9")] - public Dictionary? EIDDG9 { get { return this.EIDDG9Option; } set { this.EIDDG9Option = new Option?>(value); } } + public Dictionary? EIDDG9 { get { return this.EIDDG9Option; } set { this.EIDDG9Option = new(value); } } /// /// Used to track the state of EIDDG10 @@ -570,7 +570,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG10 /// [JsonPropertyName("eID_DG10")] - public Dictionary? EIDDG10 { get { return this.EIDDG10Option; } set { this.EIDDG10Option = new Option?>(value); } } + public Dictionary? EIDDG10 { get { return this.EIDDG10Option; } set { this.EIDDG10Option = new(value); } } /// /// Used to track the state of EIDDG11 @@ -583,7 +583,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG11 /// [JsonPropertyName("eID_DG11")] - public Dictionary? EIDDG11 { get { return this.EIDDG11Option; } set { this.EIDDG11Option = new Option?>(value); } } + public Dictionary? EIDDG11 { get { return this.EIDDG11Option; } set { this.EIDDG11Option = new(value); } } /// /// Used to track the state of EIDDG12 @@ -596,7 +596,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG12 /// [JsonPropertyName("eID_DG12")] - public Dictionary? EIDDG12 { get { return this.EIDDG12Option; } set { this.EIDDG12Option = new Option?>(value); } } + public Dictionary? EIDDG12 { get { return this.EIDDG12Option; } set { this.EIDDG12Option = new(value); } } /// /// Used to track the state of EIDDG13 @@ -609,7 +609,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG13 /// [JsonPropertyName("eID_DG13")] - public Dictionary? EIDDG13 { get { return this.EIDDG13Option; } set { this.EIDDG13Option = new Option?>(value); } } + public Dictionary? EIDDG13 { get { return this.EIDDG13Option; } set { this.EIDDG13Option = new(value); } } /// /// Used to track the state of EIDDG14 @@ -622,7 +622,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG14 /// [JsonPropertyName("eID_DG14")] - public Dictionary? EIDDG14 { get { return this.EIDDG14Option; } set { this.EIDDG14Option = new Option?>(value); } } + public Dictionary? EIDDG14 { get { return this.EIDDG14Option; } set { this.EIDDG14Option = new(value); } } /// /// Used to track the state of EIDDG15 @@ -635,7 +635,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG15 /// [JsonPropertyName("eID_DG15")] - public Dictionary? EIDDG15 { get { return this.EIDDG15Option; } set { this.EIDDG15Option = new Option?>(value); } } + public Dictionary? EIDDG15 { get { return this.EIDDG15Option; } set { this.EIDDG15Option = new(value); } } /// /// Used to track the state of EIDDG16 @@ -648,7 +648,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG16 /// [JsonPropertyName("eID_DG16")] - public Dictionary? EIDDG16 { get { return this.EIDDG16Option; } set { this.EIDDG16Option = new Option?>(value); } } + public Dictionary? EIDDG16 { get { return this.EIDDG16Option; } set { this.EIDDG16Option = new(value); } } /// /// Used to track the state of EIDDG17 @@ -661,7 +661,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG17 /// [JsonPropertyName("eID_DG17")] - public Dictionary? EIDDG17 { get { return this.EIDDG17Option; } set { this.EIDDG17Option = new Option?>(value); } } + public Dictionary? EIDDG17 { get { return this.EIDDG17Option; } set { this.EIDDG17Option = new(value); } } /// /// Used to track the state of EIDDG18 @@ -674,7 +674,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG18 /// [JsonPropertyName("eID_DG18")] - public Dictionary? EIDDG18 { get { return this.EIDDG18Option; } set { this.EIDDG18Option = new Option?>(value); } } + public Dictionary? EIDDG18 { get { return this.EIDDG18Option; } set { this.EIDDG18Option = new(value); } } /// /// Used to track the state of EIDDG19 @@ -687,7 +687,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG19 /// [JsonPropertyName("eID_DG19")] - public Dictionary? EIDDG19 { get { return this.EIDDG19Option; } set { this.EIDDG19Option = new Option?>(value); } } + public Dictionary? EIDDG19 { get { return this.EIDDG19Option; } set { this.EIDDG19Option = new(value); } } /// /// Used to track the state of EIDDG20 @@ -700,7 +700,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG20 /// [JsonPropertyName("eID_DG20")] - public Dictionary? EIDDG20 { get { return this.EIDDG20Option; } set { this.EIDDG20Option = new Option?>(value); } } + public Dictionary? EIDDG20 { get { return this.EIDDG20Option; } set { this.EIDDG20Option = new(value); } } /// /// Used to track the state of EIDDG21 @@ -713,7 +713,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EIDDG21 /// [JsonPropertyName("eID_DG21")] - public Dictionary? EIDDG21 { get { return this.EIDDG21Option; } set { this.EIDDG21Option = new Option?>(value); } } + public Dictionary? EIDDG21 { get { return this.EIDDG21Option; } set { this.EIDDG21Option = new(value); } } /// /// Used to track the state of EDLCOM @@ -726,7 +726,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLCOM /// [JsonPropertyName("eDL_COM")] - public Dictionary? EDLCOM { get { return this.EDLCOMOption; } set { this.EDLCOMOption = new Option?>(value); } } + public Dictionary? EDLCOM { get { return this.EDLCOMOption; } set { this.EDLCOMOption = new(value); } } /// /// Used to track the state of EDLSOD @@ -739,7 +739,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLSOD /// [JsonPropertyName("eDL_SOD")] - public Dictionary? EDLSOD { get { return this.EDLSODOption; } set { this.EDLSODOption = new Option?>(value); } } + public Dictionary? EDLSOD { get { return this.EDLSODOption; } set { this.EDLSODOption = new(value); } } /// /// Used to track the state of EDLDG1 @@ -752,7 +752,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG1 /// [JsonPropertyName("eDL_DG1")] - public Dictionary? EDLDG1 { get { return this.EDLDG1Option; } set { this.EDLDG1Option = new Option?>(value); } } + public Dictionary? EDLDG1 { get { return this.EDLDG1Option; } set { this.EDLDG1Option = new(value); } } /// /// Used to track the state of EDLDG2 @@ -765,7 +765,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG2 /// [JsonPropertyName("eDL_DG2")] - public Dictionary? EDLDG2 { get { return this.EDLDG2Option; } set { this.EDLDG2Option = new Option?>(value); } } + public Dictionary? EDLDG2 { get { return this.EDLDG2Option; } set { this.EDLDG2Option = new(value); } } /// /// Used to track the state of EDLDG3 @@ -778,7 +778,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG3 /// [JsonPropertyName("eDL_DG3")] - public Dictionary? EDLDG3 { get { return this.EDLDG3Option; } set { this.EDLDG3Option = new Option?>(value); } } + public Dictionary? EDLDG3 { get { return this.EDLDG3Option; } set { this.EDLDG3Option = new(value); } } /// /// Used to track the state of EDLDG4 @@ -791,7 +791,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG4 /// [JsonPropertyName("eDL_DG4")] - public Dictionary? EDLDG4 { get { return this.EDLDG4Option; } set { this.EDLDG4Option = new Option?>(value); } } + public Dictionary? EDLDG4 { get { return this.EDLDG4Option; } set { this.EDLDG4Option = new(value); } } /// /// Used to track the state of EDLDG5 @@ -804,7 +804,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG5 /// [JsonPropertyName("eDL_DG5")] - public Dictionary? EDLDG5 { get { return this.EDLDG5Option; } set { this.EDLDG5Option = new Option?>(value); } } + public Dictionary? EDLDG5 { get { return this.EDLDG5Option; } set { this.EDLDG5Option = new(value); } } /// /// Used to track the state of EDLDG6 @@ -817,7 +817,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG6 /// [JsonPropertyName("eDL_DG6")] - public Dictionary? EDLDG6 { get { return this.EDLDG6Option; } set { this.EDLDG6Option = new Option?>(value); } } + public Dictionary? EDLDG6 { get { return this.EDLDG6Option; } set { this.EDLDG6Option = new(value); } } /// /// Used to track the state of EDLDG7 @@ -830,7 +830,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG7 /// [JsonPropertyName("eDL_DG7")] - public Dictionary? EDLDG7 { get { return this.EDLDG7Option; } set { this.EDLDG7Option = new Option?>(value); } } + public Dictionary? EDLDG7 { get { return this.EDLDG7Option; } set { this.EDLDG7Option = new(value); } } /// /// Used to track the state of EDLDG8 @@ -843,7 +843,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG8 /// [JsonPropertyName("eDL_DG8")] - public Dictionary? EDLDG8 { get { return this.EDLDG8Option; } set { this.EDLDG8Option = new Option?>(value); } } + public Dictionary? EDLDG8 { get { return this.EDLDG8Option; } set { this.EDLDG8Option = new(value); } } /// /// Used to track the state of EDLDG9 @@ -856,7 +856,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG9 /// [JsonPropertyName("eDL_DG9")] - public Dictionary? EDLDG9 { get { return this.EDLDG9Option; } set { this.EDLDG9Option = new Option?>(value); } } + public Dictionary? EDLDG9 { get { return this.EDLDG9Option; } set { this.EDLDG9Option = new(value); } } /// /// Used to track the state of EDLDG10 @@ -869,7 +869,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG10 /// [JsonPropertyName("eDL_DG10")] - public Dictionary? EDLDG10 { get { return this.EDLDG10Option; } set { this.EDLDG10Option = new Option?>(value); } } + public Dictionary? EDLDG10 { get { return this.EDLDG10Option; } set { this.EDLDG10Option = new(value); } } /// /// Used to track the state of EDLDG11 @@ -882,7 +882,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG11 /// [JsonPropertyName("eDL_DG11")] - public Dictionary? EDLDG11 { get { return this.EDLDG11Option; } set { this.EDLDG11Option = new Option?>(value); } } + public Dictionary? EDLDG11 { get { return this.EDLDG11Option; } set { this.EDLDG11Option = new(value); } } /// /// Used to track the state of EDLDG12 @@ -895,7 +895,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG12 /// [JsonPropertyName("eDL_DG12")] - public Dictionary? EDLDG12 { get { return this.EDLDG12Option; } set { this.EDLDG12Option = new Option?>(value); } } + public Dictionary? EDLDG12 { get { return this.EDLDG12Option; } set { this.EDLDG12Option = new(value); } } /// /// Used to track the state of EDLDG13 @@ -908,7 +908,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG13 /// [JsonPropertyName("eDL_DG13")] - public Dictionary? EDLDG13 { get { return this.EDLDG13Option; } set { this.EDLDG13Option = new Option?>(value); } } + public Dictionary? EDLDG13 { get { return this.EDLDG13Option; } set { this.EDLDG13Option = new(value); } } /// /// Used to track the state of EDLDG14 @@ -921,7 +921,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets EDLDG14 /// [JsonPropertyName("eDL_DG14")] - public Dictionary? EDLDG14 { get { return this.EDLDG14Option; } set { this.EDLDG14Option = new Option?>(value); } } + public Dictionary? EDLDG14 { get { return this.EDLDG14Option; } set { this.EDLDG14Option = new(value); } } /// /// Used to track the state of VisibleDigitalSeal @@ -934,7 +934,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets VisibleDigitalSeal /// [JsonPropertyName("Visible_Digital_Seal")] - public Dictionary? VisibleDigitalSeal { get { return this.VisibleDigitalSealOption; } set { this.VisibleDigitalSealOption = new Option?>(value); } } + public Dictionary? VisibleDigitalSeal { get { return this.VisibleDigitalSealOption; } set { this.VisibleDigitalSealOption = new(value); } } /// /// Used to track the state of VisibleDigitalSealNC @@ -947,7 +947,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets VisibleDigitalSealNC /// [JsonPropertyName("Visible_Digital_Seal_NC")] - public Dictionary? VisibleDigitalSealNC { get { return this.VisibleDigitalSealNCOption; } set { this.VisibleDigitalSealNCOption = new Option?>(value); } } + public Dictionary? VisibleDigitalSealNC { get { return this.VisibleDigitalSealNCOption; } set { this.VisibleDigitalSealNCOption = new(value); } } /// /// Used to track the state of DigitalSignature @@ -960,7 +960,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets DigitalSignature /// [JsonPropertyName("Digital_Signature")] - public Dictionary? DigitalSignature { get { return this.DigitalSignatureOption; } set { this.DigitalSignatureOption = new Option?>(value); } } + public Dictionary? DigitalSignature { get { return this.DigitalSignatureOption; } set { this.DigitalSignatureOption = new(value); } } /// /// Used to track the state of RFIDSessionData @@ -973,7 +973,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDSessionData /// [JsonPropertyName("RFID_Session_Data")] - public RfidSessionData? RFIDSessionData { get { return this.RFIDSessionDataOption; } set { this.RFIDSessionDataOption = new Option(value); } } + public RfidSessionData? RFIDSessionData { get { return this.RFIDSessionDataOption; } set { this.RFIDSessionDataOption = new(value); } } /// /// Used to track the state of RFIDSessionDataStatus @@ -986,7 +986,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// Gets or Sets RFIDSessionDataStatus /// [JsonPropertyName("RFID_Session_Data_Status")] - public DetailsRFID? RFIDSessionDataStatus { get { return this.RFIDSessionDataStatusOption; } set { this.RFIDSessionDataStatusOption = new Option(value); } } + public DetailsRFID? RFIDSessionDataStatus { get { return this.RFIDSessionDataStatusOption; } set { this.RFIDSessionDataStatusOption = new(value); } } /// /// Used to track the state of RFIDEPasspDirectory @@ -1000,7 +1000,7 @@ public BinaryData(Option?> rFIDAuthenticationInfo = d /// /// Indexes of groups that aren't read [JsonPropertyName("RFID_ePassp_Directory")] - public List? RFIDEPasspDirectory { get { return this.RFIDEPasspDirectoryOption; } set { this.RFIDEPasspDirectoryOption = new Option?>(value); } } + public List? RFIDEPasspDirectory { get { return this.RFIDEPasspDirectoryOption; } set { this.RFIDEPasspDirectoryOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs index 4dfc022..d9292b3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs @@ -54,7 +54,7 @@ public CandidatesListItem(Option candidatesList = /// Gets or Sets CandidatesList /// [JsonPropertyName("CandidatesList")] - public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new Option(value); } } + public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs index bd55ed5..844eccc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs @@ -152,7 +152,7 @@ public ChosenDocumentType(string documentName, int iD, decimal p, int rotated180 /// Gets or Sets RotationAngle /// [JsonPropertyName("RotationAngle")] - public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new Option(value); } } + public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs index 2e0f44d..5ff2612 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs @@ -63,7 +63,7 @@ public ContainerList(List list, Option count = default) /// /// Length of list (Count for items) [JsonPropertyName("Count")] - public int? Count { get { return this.CountOption; } set { this.CountOption = new Option(value); } } + public int? Count { get { return this.CountOption; } set { this.CountOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs index 8f4b7e1..0bb73fe 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs @@ -80,7 +80,7 @@ public DataModule(string mData, int mLength, BarCodeModuleType mType, Option [JsonPropertyName("mReserved1")] - public int? MReserved1 { get { return this.MReserved1Option; } set { this.MReserved1Option = new Option(value); } } + public int? MReserved1 { get { return this.MReserved1Option; } set { this.MReserved1Option = new(value); } } /// /// Used to track the state of MReserver2 @@ -93,7 +93,7 @@ public DataModule(string mData, int mLength, BarCodeModuleType mType, Option [JsonPropertyName("mReserver2")] - public int? MReserver2 { get { return this.MReserver2Option; } set { this.MReserver2Option = new Option(value); } } + public int? MReserver2 { get { return this.MReserver2Option; } set { this.MReserver2Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs index 46efcfd..515920d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs @@ -119,7 +119,7 @@ public DetailsOptical(CheckResult overallStatus, CheckResult docType, CheckResul /// Gets or Sets Vds /// [JsonPropertyName("vds")] - public int? Vds { get { return this.VdsOption; } set { this.VdsOption = new Option(value); } } + public int? Vds { get { return this.VdsOption; } set { this.VdsOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs index 61b96cd..3b94f7f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs @@ -64,7 +64,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets AppName /// [JsonPropertyName("app-name")] - public string? AppName { get { return this.AppNameOption; } set { this.AppNameOption = new Option(value); } } + public string? AppName { get { return this.AppNameOption; } set { this.AppNameOption = new(value); } } /// /// Used to track the state of VarVersion @@ -77,7 +77,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets VarVersion /// [JsonPropertyName("version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new Option(value); } } + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } /// /// Used to track the state of LicenseId @@ -90,7 +90,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets LicenseId /// [JsonPropertyName("license-id")] - public string? LicenseId { get { return this.LicenseIdOption; } set { this.LicenseIdOption = new Option(value); } } + public string? LicenseId { get { return this.LicenseIdOption; } set { this.LicenseIdOption = new(value); } } /// /// Used to track the state of LicenseSerial @@ -103,7 +103,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets LicenseSerial /// [JsonPropertyName("license-serial")] - public string? LicenseSerial { get { return this.LicenseSerialOption; } set { this.LicenseSerialOption = new Option(value); } } + public string? LicenseSerial { get { return this.LicenseSerialOption; } set { this.LicenseSerialOption = new(value); } } /// /// Used to track the state of ValidUntil @@ -116,7 +116,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets ValidUntil /// [JsonPropertyName("valid-until")] - public DateTime? ValidUntil { get { return this.ValidUntilOption; } set { this.ValidUntilOption = new Option(value); } } + public DateTime? ValidUntil { get { return this.ValidUntilOption; } set { this.ValidUntilOption = new(value); } } /// /// Used to track the state of ServerTime @@ -129,7 +129,7 @@ public DeviceInfo(Option appName = default, Option varVersion /// Gets or Sets ServerTime /// [JsonPropertyName("server-time")] - public DateTime? ServerTime { get { return this.ServerTimeOption; } set { this.ServerTimeOption = new Option(value); } } + public DateTime? ServerTime { get { return this.ServerTimeOption; } set { this.ServerTimeOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs index deb64a4..75b1b9c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs @@ -65,7 +65,7 @@ public DocumentImage(string image, Option format = default) /// /// Image format [JsonPropertyName("format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new Option(value); } } + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs index 783e9e0..a94a5de 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs @@ -145,7 +145,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets Inverse /// [JsonPropertyName("Inverse")] - public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new Option(value); } } + public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new(value); } } /// /// Used to track the state of ObjArea @@ -158,7 +158,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets ObjArea /// [JsonPropertyName("ObjArea")] - public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new Option(value); } } + public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new(value); } } /// /// Used to track the state of ObjIntAngleDev @@ -171,7 +171,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets ObjIntAngleDev /// [JsonPropertyName("ObjIntAngleDev")] - public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new Option(value); } } + public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new(value); } } /// /// Used to track the state of PerspectiveTr @@ -184,7 +184,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets PerspectiveTr /// [JsonPropertyName("PerspectiveTr")] - public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new Option(value); } } + public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new(value); } } /// /// Used to track the state of ResultStatus @@ -197,7 +197,7 @@ public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int /// Gets or Sets ResultStatus /// [JsonPropertyName("ResultStatus")] - public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new Option(value); } } + public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs index ece1c33..c8a7e0d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs @@ -56,7 +56,7 @@ public DocumentTypesCandidates(Option recResult /// Gets or Sets RecResult /// [JsonPropertyName("RecResult")] - public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new Option(value); } } + public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new(value); } } /// /// Used to track the state of Candidates @@ -69,7 +69,7 @@ public DocumentTypesCandidates(Option recResult /// Gets or Sets Candidates /// [JsonPropertyName("Candidates")] - public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new Option?>(value); } } + public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs index 5a886a6..ff81ea6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs @@ -56,7 +56,7 @@ public DocumentTypesCandidatesList(Option recRes /// Gets or Sets RecResult /// [JsonPropertyName("RecResult")] - public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new Option(value); } } + public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new(value); } } /// /// Used to track the state of Candidates @@ -69,7 +69,7 @@ public DocumentTypesCandidatesList(Option recRes /// Gets or Sets Candidates /// [JsonPropertyName("Candidates")] - public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new Option?>(value); } } + public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs index e41fc82..7172940 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs @@ -58,7 +58,7 @@ public DocumentTypesCandidatesResult(Option bufLength = default, Option [JsonPropertyName("CandidatesList")] - public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new Option(value); } } + public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs index fcf037e..90a642a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs @@ -61,7 +61,7 @@ public DocumentsDatabase(Option description = default, Option /// /// Document database description [JsonPropertyName("Description")] - public string? Description { get { return this.DescriptionOption; } set { this.DescriptionOption = new Option(value); } } + public string? Description { get { return this.DescriptionOption; } set { this.DescriptionOption = new(value); } } /// /// Used to track the state of ExportDate @@ -75,7 +75,7 @@ public DocumentsDatabase(Option description = default, Option /// /// Date the document database was created [JsonPropertyName("ExportDate")] - public string? ExportDate { get { return this.ExportDateOption; } set { this.ExportDateOption = new Option(value); } } + public string? ExportDate { get { return this.ExportDateOption; } set { this.ExportDateOption = new(value); } } /// /// Used to track the state of ID @@ -89,7 +89,7 @@ public DocumentsDatabase(Option description = default, Option /// /// Document database identifier [JsonPropertyName("ID")] - public string? ID { get { return this.IDOption; } set { this.IDOption = new Option(value); } } + public string? ID { get { return this.IDOption; } set { this.IDOption = new(value); } } /// /// Used to track the state of VarVersion @@ -103,7 +103,7 @@ public DocumentsDatabase(Option description = default, Option /// /// Document database version [JsonPropertyName("Version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new Option(value); } } + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index 832d143..3ff4d45 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs @@ -47,7 +47,7 @@ public EncryptedRCLItem(byte[] encryptedRCL) /// Base64 encoded data /// /// Base64 encoded data - /* [B@5d92c7f5 */ + /* [B@59bfa4b2 */ [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs index 637c58c..37a9476 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs @@ -51,7 +51,7 @@ public EncryptedRCLResult(byte[] encryptedRCL, Option bufLength = default, /// Base64 encoded data /// /// Base64 encoded data - /* [B@5d92c7f5 */ + /* [B@59bfa4b2 */ [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs index 9a54b81..35d7905 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs @@ -60,7 +60,7 @@ public ErrorCoordinates(Option left = default, Option top = /// Gets or Sets Left /// [JsonPropertyName("Left")] - public decimal? Left { get { return this.LeftOption; } set { this.LeftOption = new Option(value); } } + public decimal? Left { get { return this.LeftOption; } set { this.LeftOption = new(value); } } /// /// Used to track the state of Top @@ -73,7 +73,7 @@ public ErrorCoordinates(Option left = default, Option top = /// Gets or Sets Top /// [JsonPropertyName("Top")] - public decimal? Top { get { return this.TopOption; } set { this.TopOption = new Option(value); } } + public decimal? Top { get { return this.TopOption; } set { this.TopOption = new(value); } } /// /// Used to track the state of Right @@ -86,7 +86,7 @@ public ErrorCoordinates(Option left = default, Option top = /// Gets or Sets Right /// [JsonPropertyName("Right")] - public decimal? Right { get { return this.RightOption; } set { this.RightOption = new Option(value); } } + public decimal? Right { get { return this.RightOption; } set { this.RightOption = new(value); } } /// /// Used to track the state of Bottom @@ -99,7 +99,7 @@ public ErrorCoordinates(Option left = default, Option top = /// Gets or Sets Bottom /// [JsonPropertyName("Bottom")] - public decimal? Bottom { get { return this.BottomOption; } set { this.BottomOption = new Option(value); } } + public decimal? Bottom { get { return this.BottomOption; } set { this.BottomOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs index 7bdae73..2f9fdb5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs @@ -138,7 +138,7 @@ public FDSIDList(string iCAOCode, decimal count, List list, DocumentType dT /// /// Document description [JsonPropertyName("dDescription")] - public string? DDescription { get { return this.DDescriptionOption; } set { this.DDescriptionOption = new Option(value); } } + public string? DDescription { get { return this.DDescriptionOption; } set { this.DDescriptionOption = new(value); } } /// /// Used to track the state of DStateCode @@ -152,7 +152,7 @@ public FDSIDList(string iCAOCode, decimal count, List list, DocumentType dT /// /// Issuing state code [JsonPropertyName("dStateCode")] - public string? DStateCode { get { return this.DStateCodeOption; } set { this.DStateCodeOption = new Option(value); } } + public string? DStateCode { get { return this.DStateCodeOption; } set { this.DStateCodeOption = new(value); } } /// /// Used to track the state of DStateName @@ -166,7 +166,7 @@ public FDSIDList(string iCAOCode, decimal count, List list, DocumentType dT /// /// Issuing state name [JsonPropertyName("dStateName")] - public string? DStateName { get { return this.DStateNameOption; } set { this.DStateNameOption = new Option(value); } } + public string? DStateName { get { return this.DStateNameOption; } set { this.DStateNameOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs index 3014add..3f1a3c1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs @@ -74,7 +74,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The URL of the Regula Face Web service to be used. /* https://faceapi.regulaforensics.com */ [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } /// /// Used to track the state of Mode @@ -89,7 +89,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The processing mode: \"match\" or \"match+search\". /* match */ [JsonPropertyName("mode")] - public string? Mode { get { return this.ModeOption; } set { this.ModeOption = new Option(value); } } + public string? Mode { get { return this.ModeOption; } set { this.ModeOption = new(value); } } /// /// Used to track the state of Search @@ -102,7 +102,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Gets or Sets Search /// [JsonPropertyName("search")] - public FaceApiSearch? Search { get { return this.SearchOption; } set { this.SearchOption = new Option(value); } } + public FaceApiSearch? Search { get { return this.SearchOption; } set { this.SearchOption = new(value); } } /// /// Used to track the state of Threshold @@ -117,7 +117,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. /* 75 */ [JsonPropertyName("threshold")] - public int? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new Option(value); } } + public int? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new(value); } } /// /// Used to track the state of ServiceTimeout @@ -132,7 +132,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The Regula Face Web service requests timeout, ms. /* 3000 */ [JsonPropertyName("serviceTimeout")] - public int? ServiceTimeout { get { return this.ServiceTimeoutOption; } set { this.ServiceTimeoutOption = new Option(value); } } + public int? ServiceTimeout { get { return this.ServiceTimeoutOption; } set { this.ServiceTimeoutOption = new(value); } } /// /// Used to track the state of Proxy @@ -147,7 +147,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. /* http://localhost:8080 */ [JsonPropertyName("proxy")] - public string? Proxy { get { return this.ProxyOption; } set { this.ProxyOption = new Option(value); } } + public string? Proxy { get { return this.ProxyOption; } set { this.ProxyOption = new(value); } } /// /// Used to track the state of ProxyUserpwd @@ -162,7 +162,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. /* user:pass */ [JsonPropertyName("proxy_userpwd")] - public string? ProxyUserpwd { get { return this.ProxyUserpwdOption; } set { this.ProxyUserpwdOption = new Option(value); } } + public string? ProxyUserpwd { get { return this.ProxyUserpwdOption; } set { this.ProxyUserpwdOption = new(value); } } /// /// Used to track the state of ProxyType @@ -177,7 +177,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. /* 0 */ [JsonPropertyName("proxy_type")] - public int? ProxyType { get { return this.ProxyTypeOption; } set { this.ProxyTypeOption = new Option(value); } } + public int? ProxyType { get { return this.ProxyTypeOption; } set { this.ProxyTypeOption = new(value); } } /// /// Used to track the state of ChildAgeThreshold @@ -192,7 +192,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// The age threshold for the portrait comparison. Default: 13. /* 13 */ [JsonPropertyName("childAgeThreshold")] - public int? ChildAgeThreshold { get { return this.ChildAgeThresholdOption; } set { this.ChildAgeThresholdOption = new Option(value); } } + public int? ChildAgeThreshold { get { return this.ChildAgeThresholdOption; } set { this.ChildAgeThresholdOption = new(value); } } /// /// Used to track the state of ChildDocValidityYears @@ -207,7 +207,7 @@ public FaceApi(Option url = default, Option mode = default, Op /// Estimated duration of validity for a child's passport, years. Default: 5. /* 5 */ [JsonPropertyName("childDocValidityYears")] - public int? ChildDocValidityYears { get { return this.ChildDocValidityYearsOption; } set { this.ChildDocValidityYearsOption = new Option(value); } } + public int? ChildDocValidityYears { get { return this.ChildDocValidityYearsOption; } set { this.ChildDocValidityYearsOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs index fa5664b..383ffab 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs @@ -59,7 +59,7 @@ public FaceApiSearch(Option limit = default, Option threshold = de /// /// The maximum number of results to be returned. [JsonPropertyName("limit")] - public int? Limit { get { return this.LimitOption; } set { this.LimitOption = new Option(value); } } + public int? Limit { get { return this.LimitOption; } set { this.LimitOption = new(value); } } /// /// Used to track the state of Threshold @@ -73,7 +73,7 @@ public FaceApiSearch(Option limit = default, Option threshold = de /// /// The similarity threshold. [JsonPropertyName("threshold")] - public float? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new Option(value); } } + public float? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new(value); } } /// /// Used to track the state of GroupIds @@ -87,7 +87,7 @@ public FaceApiSearch(Option limit = default, Option threshold = de /// /// The groups where to conduct the search. [JsonPropertyName("group_ids")] - public List? GroupIds { get { return this.GroupIdsOption; } set { this.GroupIdsOption = new Option?>(value); } } + public List? GroupIds { get { return this.GroupIdsOption; } set { this.GroupIdsOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs index 1aed8a7..8c4e7f7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs @@ -80,7 +80,7 @@ public FaceDetection(int count, int countFalseDetection, List res, Opt /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } /// /// Used to track the state of Reserved2 @@ -93,7 +93,7 @@ public FaceDetection(int count, int countFalseDetection, List res, Opt /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs index 03747b6..01c92bb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs @@ -70,7 +70,7 @@ public FiberItem(int rectCount, int expectedCount, List re /// Gets or Sets LightValue /// [JsonPropertyName("LightValue")] - public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new Option(value); } } + public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new(value); } } /// /// For UV_Fibers authenticity result type @@ -134,7 +134,7 @@ public FiberItem(int rectCount, int expectedCount, List re /// /// For UV_Background authentication result type [JsonPropertyName("LightDisp")] - public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new Option(value); } } + public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs index 323c270..67bbb1b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs @@ -73,7 +73,7 @@ public FiberResult(int rectCount, int expectedCount, List /// Gets or Sets LightValue /// [JsonPropertyName("LightValue")] - public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new Option(value); } } + public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new(value); } } /// /// For UV_Fibers authenticity result type @@ -137,7 +137,7 @@ public FiberResult(int rectCount, int expectedCount, List /// /// For UV_Background authentication result type [JsonPropertyName("LightDisp")] - public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new Option(value); } } + public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs index d919bbb..4e1e245 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs @@ -59,7 +59,7 @@ public GetTransactionsByTagResponse(Option id = default, Option sta /// /// Transaction id [JsonPropertyName("id")] - public Guid? Id { get { return this.IdOption; } set { this.IdOption = new Option(value); } } + public Guid? Id { get { return this.IdOption; } set { this.IdOption = new(value); } } /// /// Used to track the state of State @@ -73,7 +73,7 @@ public GetTransactionsByTagResponse(Option id = default, Option sta /// /// Transaction status [JsonPropertyName("state")] - public int? State { get { return this.StateOption; } set { this.StateOption = new Option(value); } } + public int? State { get { return this.StateOption; } set { this.StateOption = new(value); } } /// /// Used to track the state of UpdatedAt @@ -87,7 +87,7 @@ public GetTransactionsByTagResponse(Option id = default, Option sta /// /// Last time updated [JsonPropertyName("updatedAt")] - public DateTime? UpdatedAt { get { return this.UpdatedAtOption; } set { this.UpdatedAtOption = new Option(value); } } + public DateTime? UpdatedAt { get { return this.UpdatedAtOption; } set { this.UpdatedAtOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs index 00c0149..0f075b6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs @@ -119,7 +119,7 @@ public Healthcheck(string app, string? licenseId = default, string? licenseType /// Gets or Sets Metadata /// [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new Option?>(value); } } + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } /// /// Used to track the state of DocumentsDatabase @@ -132,7 +132,7 @@ public Healthcheck(string app, string? licenseId = default, string? licenseType /// Gets or Sets DocumentsDatabase /// [JsonPropertyName("documentsDatabase")] - public HealthcheckDocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new Option(value); } } + public HealthcheckDocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs index 09845fe..99bb4ef 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs @@ -88,7 +88,7 @@ public IdentItem(SecurityFeatureType elementType, Light lightIndex, ImageData im /// Gets or Sets Area /// [JsonPropertyName("Area")] - public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new Option(value); } } + public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new(value); } } /// /// Used to track the state of AreaList @@ -101,7 +101,7 @@ public IdentItem(SecurityFeatureType elementType, Light lightIndex, ImageData im /// Gets or Sets AreaList /// [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new Option(value); } } + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs index 2b92736..725d30f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs @@ -91,7 +91,7 @@ public IdentResult(SecurityFeatureType elementType, Light lightIndex, ImageData /// Gets or Sets Area /// [JsonPropertyName("Area")] - public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new Option(value); } } + public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new(value); } } /// /// Used to track the state of AreaList @@ -104,7 +104,7 @@ public IdentResult(SecurityFeatureType elementType, Light lightIndex, ImageData /// Gets or Sets AreaList /// [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new Option(value); } } + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs index 1cc4f52..6d45c03 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs @@ -65,7 +65,7 @@ public ImageData(string image, Option format = default) /// /// Image format [JsonPropertyName("format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new Option(value); } } + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs index cb5ffc8..1d89d05 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs @@ -71,7 +71,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// Set the threshold for an actual document brightness below which the check fails [JsonPropertyName("brightnessThreshold")] - public double? BrightnessThreshold { get { return this.BrightnessThresholdOption; } set { this.BrightnessThresholdOption = new Option(value); } } + public double? BrightnessThreshold { get { return this.BrightnessThresholdOption; } set { this.BrightnessThresholdOption = new(value); } } /// /// Used to track the state of DpiThreshold @@ -85,7 +85,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. [JsonPropertyName("dpiThreshold")] - public int? DpiThreshold { get { return this.DpiThresholdOption; } set { this.DpiThresholdOption = new Option(value); } } + public int? DpiThreshold { get { return this.DpiThresholdOption; } set { this.DpiThresholdOption = new(value); } } /// /// Used to track the state of AngleThreshold @@ -99,7 +99,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. [JsonPropertyName("angleThreshold")] - public int? AngleThreshold { get { return this.AngleThresholdOption; } set { this.AngleThresholdOption = new Option(value); } } + public int? AngleThreshold { get { return this.AngleThresholdOption; } set { this.AngleThresholdOption = new(value); } } /// /// Used to track the state of FocusCheck @@ -113,7 +113,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This option enables focus check while performing image quality validation. [JsonPropertyName("focusCheck")] - public bool? FocusCheck { get { return this.FocusCheckOption; } set { this.FocusCheckOption = new Option(value); } } + public bool? FocusCheck { get { return this.FocusCheckOption; } set { this.FocusCheckOption = new(value); } } /// /// Used to track the state of GlaresCheck @@ -127,7 +127,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This option enables glares check while performing image quality validation. [JsonPropertyName("glaresCheck")] - public bool? GlaresCheck { get { return this.GlaresCheckOption; } set { this.GlaresCheckOption = new Option(value); } } + public bool? GlaresCheck { get { return this.GlaresCheckOption; } set { this.GlaresCheckOption = new(value); } } /// /// Used to track the state of ColornessCheck @@ -141,7 +141,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This option enables colorness check while performing image quality validation. [JsonPropertyName("colornessCheck")] - public bool? ColornessCheck { get { return this.ColornessCheckOption; } set { this.ColornessCheckOption = new Option(value); } } + public bool? ColornessCheck { get { return this.ColornessCheckOption; } set { this.ColornessCheckOption = new(value); } } /// /// Used to track the state of MoireCheck @@ -155,7 +155,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This option enables screen capture (moire patterns) check while performing image quality validation. [JsonPropertyName("moireCheck")] - public bool? MoireCheck { get { return this.MoireCheckOption; } set { this.MoireCheckOption = new Option(value); } } + public bool? MoireCheck { get { return this.MoireCheckOption; } set { this.MoireCheckOption = new(value); } } /// /// Used to track the state of DocumentPositionIndent @@ -169,7 +169,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This parameter specifies the necessary margin. Default 0. [JsonPropertyName("documentPositionIndent")] - public int? DocumentPositionIndent { get { return this.DocumentPositionIndentOption; } set { this.DocumentPositionIndentOption = new Option(value); } } + public int? DocumentPositionIndent { get { return this.DocumentPositionIndentOption; } set { this.DocumentPositionIndentOption = new(value); } } /// /// Used to track the state of ExpectedPass @@ -183,7 +183,7 @@ public ImageQA(Option brightnessThreshold = default, Option dpiTh /// /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. [JsonPropertyName("expectedPass")] - public List? ExpectedPass { get { return this.ExpectedPassOption; } set { this.ExpectedPassOption = new Option?>(value); } } + public List? ExpectedPass { get { return this.ExpectedPassOption; } set { this.ExpectedPassOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs index d16c985..7cdbbf7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs @@ -105,7 +105,7 @@ public ImageQualityCheck(ImageQualityCheckType type, CheckResult result, Securit /// Gets or Sets Areas /// [JsonPropertyName("areas")] - public AreaArray? Areas { get { return this.AreasOption; } set { this.AreasOption = new Option(value); } } + public AreaArray? Areas { get { return this.AreasOption; } set { this.AreasOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs index e87992a..3ef3636 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs @@ -54,7 +54,7 @@ public ImageTransactionData(Option image = default) /// Gets or Sets Image /// [JsonPropertyName("image")] - public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new Option(value); } } + public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Images.cs b/src/Regula.DocumentReader.WebClient/Model/Images.cs index c7a085c..170165c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Images.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Images.cs @@ -73,7 +73,7 @@ public Images(List availableSourceList, List /// /// Fields count [JsonPropertyName("fieldCount")] - public int? FieldCount { get { return this.FieldCountOption; } set { this.FieldCountOption = new Option(value); } } + public int? FieldCount { get { return this.FieldCountOption; } set { this.FieldCountOption = new(value); } } /// /// Used to track the state of AvailableSourceCount @@ -87,7 +87,7 @@ public Images(List availableSourceList, List /// /// Available sources count [JsonPropertyName("availableSourceCount")] - public int? AvailableSourceCount { get { return this.AvailableSourceCountOption; } set { this.AvailableSourceCountOption = new Option(value); } } + public int? AvailableSourceCount { get { return this.AvailableSourceCountOption; } set { this.AvailableSourceCountOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs index f8f1644..ee67470 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs @@ -80,7 +80,7 @@ public ImagesField(string fieldName, GraphicFieldType fieldType, List /// Field value count [JsonPropertyName("valueCount")] - public decimal? ValueCount { get { return this.ValueCountOption; } set { this.ValueCountOption = new Option(value); } } + public decimal? ValueCount { get { return this.ValueCountOption; } set { this.ValueCountOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs index 9dfac6a..b9d189e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs @@ -91,7 +91,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, OptionBase64 encoded image /* Base64 encoded image */ [JsonPropertyName("value")] - public string? Value { get { return this.ValueOption; } set { this.ValueOption = new Option(value); } } + public string? Value { get { return this.ValueOption; } set { this.ValueOption = new(value); } } /// /// Used to track the state of OriginalValue @@ -106,7 +106,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, OptionBase64 encoded image /* Base64 encoded image */ [JsonPropertyName("originalValue")] - public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new Option(value); } } + public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new(value); } } /// /// Used to track the state of OriginalPageIndex @@ -120,7 +120,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, Option /// Original page index [JsonPropertyName("originalPageIndex")] - public int? OriginalPageIndex { get { return this.OriginalPageIndexOption; } set { this.OriginalPageIndexOption = new Option(value); } } + public int? OriginalPageIndex { get { return this.OriginalPageIndexOption; } set { this.OriginalPageIndexOption = new(value); } } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. @@ -140,7 +140,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, Option [JsonPropertyName("fieldRect")] - public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new Option(value); } } + public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new(value); } } /// /// Used to track the state of RfidOrigin @@ -153,7 +153,7 @@ public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, Option [JsonPropertyName("rfidOrigin")] - public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new Option(value); } } + public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/InData.cs b/src/Regula.DocumentReader.WebClient/Model/InData.cs index 3724d61..a9fe4ff 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InData.cs @@ -56,7 +56,7 @@ public InData(Option video = default, Option [JsonPropertyName("video")] - public InDataVideo? Video { get { return this.VideoOption; } set { this.VideoOption = new Option(value); } } + public InDataVideo? Video { get { return this.VideoOption; } set { this.VideoOption = new(value); } } /// /// Used to track the state of Images @@ -69,7 +69,7 @@ public InData(Option video = default, Option [JsonPropertyName("images")] - public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new Option?>(value); } } + public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs index 6e48d70..44608d5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs @@ -60,7 +60,7 @@ public InDataTransactionImagesFieldValue(Option light = default, Option< /// Gets or Sets Light /// [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new Option(value); } } + public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } /// /// Used to track the state of ListIdx @@ -73,7 +73,7 @@ public InDataTransactionImagesFieldValue(Option light = default, Option< /// Gets or Sets ListIdx /// [JsonPropertyName("listIdx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new Option(value); } } + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } /// /// Used to track the state of PageIdx @@ -87,7 +87,7 @@ public InDataTransactionImagesFieldValue(Option light = default, Option< /// /// Page index of the image from input list [JsonPropertyName("pageIdx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new Option(value); } } + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } /// /// Used to track the state of Url @@ -101,7 +101,7 @@ public InDataTransactionImagesFieldValue(Option light = default, Option< /// /// Image url [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs index c574752..d1199d6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs @@ -57,7 +57,7 @@ public InDataVideo(Option?> metadata = default, Optio /// /// A free-form object containing video's extended attributes. [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new Option?>(value); } } + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } /// /// Used to track the state of Url @@ -71,7 +71,7 @@ public InDataVideo(Option?> metadata = default, Optio /// /// Video url [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs index a371dc6..91b79bb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs @@ -47,7 +47,7 @@ public LicenseItem(byte[] license) /// Base64 encoded data /// /// Base64 encoded data - /* [B@7e6fb98c */ + /* [B@5eefd7ba */ [JsonPropertyName("License")] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs index aa8bd4f..50df967 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs @@ -51,7 +51,7 @@ public LicenseResult(byte[] license, Option bufLength = default, Option /// Base64 encoded data - /* [B@7e6fb98c */ + /* [B@5eefd7ba */ [JsonPropertyName("License")] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs index 1afc249..3f8802e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs @@ -56,7 +56,7 @@ public ListTransactionsByTagResponse(Option?> /// Gets or Sets Items /// [JsonPropertyName("items")] - public List? Items { get { return this.ItemsOption; } set { this.ItemsOption = new Option?>(value); } } + public List? Items { get { return this.ItemsOption; } set { this.ItemsOption = new(value); } } /// /// Used to track the state of Metadata @@ -69,7 +69,7 @@ public ListTransactionsByTagResponse(Option?> /// Gets or Sets Metadata /// [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new Option?>(value); } } + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs index a2e4137..98c965f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs @@ -71,7 +71,7 @@ public ListVerifiedFields(decimal count, List pFieldMaps, Opti /// Gets or Sets PDateFormat /// [JsonPropertyName("pDateFormat")] - public string? PDateFormat { get { return this.PDateFormatOption; } set { this.PDateFormatOption = new Option(value); } } + public string? PDateFormat { get { return this.PDateFormatOption; } set { this.PDateFormatOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs index 1e28725..7c27597 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs @@ -65,7 +65,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable OVI check [JsonPropertyName("checkOVI")] - public bool? CheckOVI { get { return this.CheckOVIOption; } set { this.CheckOVIOption = new Option(value); } } + public bool? CheckOVI { get { return this.CheckOVIOption; } set { this.CheckOVIOption = new(value); } } /// /// Used to track the state of CheckMLI @@ -79,7 +79,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable MLI check [JsonPropertyName("checkMLI")] - public bool? CheckMLI { get { return this.CheckMLIOption; } set { this.CheckMLIOption = new Option(value); } } + public bool? CheckMLI { get { return this.CheckMLIOption; } set { this.CheckMLIOption = new(value); } } /// /// Used to track the state of CheckHolo @@ -93,7 +93,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable Hologram detection [JsonPropertyName("checkHolo")] - public bool? CheckHolo { get { return this.CheckHoloOption; } set { this.CheckHoloOption = new Option(value); } } + public bool? CheckHolo { get { return this.CheckHoloOption; } set { this.CheckHoloOption = new(value); } } /// /// Used to track the state of CheckED @@ -107,7 +107,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable Electronic device detection [JsonPropertyName("checkED")] - public bool? CheckED { get { return this.CheckEDOption; } set { this.CheckEDOption = new Option(value); } } + public bool? CheckED { get { return this.CheckEDOption; } set { this.CheckEDOption = new(value); } } /// /// Used to track the state of CheckBlackAndWhiteCopy @@ -121,7 +121,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable Black and white copy check [JsonPropertyName("checkBlackAndWhiteCopy")] - public bool? CheckBlackAndWhiteCopy { get { return this.CheckBlackAndWhiteCopyOption; } set { this.CheckBlackAndWhiteCopyOption = new Option(value); } } + public bool? CheckBlackAndWhiteCopy { get { return this.CheckBlackAndWhiteCopyOption; } set { this.CheckBlackAndWhiteCopyOption = new(value); } } /// /// Used to track the state of CheckDynaprint @@ -135,7 +135,7 @@ public LivenessParams(Option checkOVI = default, Option checkMLI = /// /// This parameter is used to enable Dynaprint check [JsonPropertyName("checkDynaprint")] - public bool? CheckDynaprint { get { return this.CheckDynaprintOption; } set { this.CheckDynaprintOption = new Option(value); } } + public bool? CheckDynaprint { get { return this.CheckDynaprintOption; } set { this.CheckDynaprintOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs index 5a74dda..cba74cc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs @@ -145,7 +145,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets Inverse /// [JsonPropertyName("Inverse")] - public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new Option(value); } } + public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new(value); } } /// /// Used to track the state of ObjArea @@ -158,7 +158,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets ObjArea /// [JsonPropertyName("ObjArea")] - public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new Option(value); } } + public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new(value); } } /// /// Used to track the state of ObjIntAngleDev @@ -171,7 +171,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets ObjIntAngleDev /// [JsonPropertyName("ObjIntAngleDev")] - public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new Option(value); } } + public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new(value); } } /// /// Used to track the state of PerspectiveTr @@ -184,7 +184,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets PerspectiveTr /// [JsonPropertyName("PerspectiveTr")] - public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new Option(value); } } + public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new(value); } } /// /// Used to track the state of ResultStatus @@ -197,7 +197,7 @@ public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int heigh /// Gets or Sets ResultStatus /// [JsonPropertyName("ResultStatus")] - public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new Option(value); } } + public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs index f33467b..c572b0a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs @@ -128,7 +128,7 @@ public OCRSecurityTextItem(Critical criticalFlag, Light lightType, RectangleCoor /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } /// /// Used to track the state of Reserved2 @@ -141,7 +141,7 @@ public OCRSecurityTextItem(Critical criticalFlag, Light lightType, RectangleCoor /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs index bf14cf0..f71b39c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs @@ -131,7 +131,7 @@ public OCRSecurityTextResult(Critical criticalFlag, Light lightType, RectangleCo /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } /// /// Used to track the state of Reserved2 @@ -144,7 +144,7 @@ public OCRSecurityTextResult(Critical criticalFlag, Light lightType, RectangleCo /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs index 334337f..ffd9292 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs @@ -152,7 +152,7 @@ public OneCandidate(string documentName, int iD, decimal p, int rotated180, Rfid /// Gets or Sets RotationAngle /// [JsonPropertyName("RotationAngle")] - public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new Option(value); } } + public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs index 562214c..70243c9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs @@ -72,7 +72,7 @@ public OriginalSymbol(long code, int probability, Option /// Gets or Sets Rect /// [JsonPropertyName("rect")] - public RectangleCoordinates? Rect { get { return this.RectOption; } set { this.RectOption = new Option(value); } } + public RectangleCoordinates? Rect { get { return this.RectOption; } set { this.RectOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OutData.cs b/src/Regula.DocumentReader.WebClient/Model/OutData.cs index 5f9b344..4f32df5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutData.cs @@ -57,7 +57,7 @@ public OutData(Option url = default, Option /// Response url [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } /// /// Used to track the state of Images @@ -70,7 +70,7 @@ public OutData(Option url = default, Option [JsonPropertyName("images")] - public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new Option?>(value); } } + public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs index c026b7d..247bf32 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs @@ -62,7 +62,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// Gets or Sets FieldType /// [JsonPropertyName("fieldType")] - public GraphicFieldType? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new Option(value); } } + public GraphicFieldType? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new(value); } } /// /// Used to track the state of Light @@ -75,7 +75,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// Gets or Sets Light /// [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new Option(value); } } + public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } /// /// Used to track the state of ListIdx @@ -88,7 +88,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// Gets or Sets ListIdx /// [JsonPropertyName("listIdx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new Option(value); } } + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } /// /// Used to track the state of PageIdx @@ -102,7 +102,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// /// Page index of the image from input list [JsonPropertyName("pageIdx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new Option(value); } } + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } /// /// Used to track the state of Url @@ -116,7 +116,7 @@ public OutDataTransactionImagesFieldValue(Option fieldType = /// /// Image url [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new Option(value); } } + public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs index 8d99448..c1387e5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs @@ -114,7 +114,7 @@ public PArrayField(float bcAngleDETECT, int bcCodeResult, int bcCountModule, Lis /// Gets or Sets BcPDF417INFO /// [JsonPropertyName("bcPDF417INFO")] - public BcPDF417INFO? BcPDF417INFO { get { return this.BcPDF417INFOOption; } set { this.BcPDF417INFOOption = new Option(value); } } + public BcPDF417INFO? BcPDF417INFO { get { return this.BcPDF417INFOOption; } set { this.BcPDF417INFOOption = new(value); } } /// /// Used to track the state of BcTextDecoderTypes @@ -127,7 +127,7 @@ public PArrayField(float bcAngleDETECT, int bcCodeResult, int bcCountModule, Lis /// Gets or Sets BcTextDecoderTypes /// [JsonPropertyName("bcTextDecoderTypes")] - public int? BcTextDecoderTypes { get { return this.BcTextDecoderTypesOption; } set { this.BcTextDecoderTypesOption = new Option(value); } } + public int? BcTextDecoderTypes { get { return this.BcTextDecoderTypesOption; } set { this.BcTextDecoderTypesOption = new(value); } } /// /// Used to track the state of BcTextFieldType @@ -140,7 +140,7 @@ public PArrayField(float bcAngleDETECT, int bcCodeResult, int bcCountModule, Lis /// Gets or Sets BcTextFieldType /// [JsonPropertyName("bcTextFieldType")] - public int? BcTextFieldType { get { return this.BcTextFieldTypeOption; } set { this.BcTextFieldTypeOption = new Option(value); } } + public int? BcTextFieldType { get { return this.BcTextFieldTypeOption; } set { this.BcTextFieldTypeOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs index f9afa65..6fe6250 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs @@ -54,7 +54,7 @@ public ParsedData(Option?> parsingNotifications = default) /// Gets or Sets ParsingNotifications /// [JsonPropertyName("ParsingNotifications")] - public List? ParsingNotifications { get { return this.ParsingNotificationsOption; } set { this.ParsingNotificationsOption = new Option?>(value); } } + public List? ParsingNotifications { get { return this.ParsingNotificationsOption; } set { this.ParsingNotificationsOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs index d157dd4..b897f5f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs @@ -57,7 +57,7 @@ public PerDocumentConfig(Option?> docID = default, Option exclud /// /// Specific template IDs, for which apply current custom configuration [JsonPropertyName("docID")] - public List? DocID { get { return this.DocIDOption; } set { this.DocIDOption = new Option?>(value); } } + public List? DocID { get { return this.DocIDOption; } set { this.DocIDOption = new(value); } } /// /// Used to track the state of ExcludeAuthChecks @@ -72,7 +72,7 @@ public PerDocumentConfig(Option?> docID = default, Option exclud /// Contains items from AuthenticityResultType as sum via OR operation /* 2 */ [JsonPropertyName("excludeAuthChecks")] - public int? ExcludeAuthChecks { get { return this.ExcludeAuthChecksOption; } set { this.ExcludeAuthChecksOption = new Option(value); } } + public int? ExcludeAuthChecks { get { return this.ExcludeAuthChecksOption; } set { this.ExcludeAuthChecksOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs index b3b43c4..1fa1fcf 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs @@ -98,7 +98,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets FieldTypesCount /// [JsonPropertyName("FieldTypesCount")] - public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new Option(value); } } + public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new(value); } } /// /// Used to track the state of FieldTypesList @@ -111,7 +111,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets FieldTypesList /// [JsonPropertyName("FieldTypesList")] - public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new Option?>(value); } } + public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new(value); } } /// /// Used to track the state of Step @@ -124,7 +124,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Step /// [JsonPropertyName("Step")] - public int? Step { get { return this.StepOption; } set { this.StepOption = new Option(value); } } + public int? Step { get { return this.StepOption; } set { this.StepOption = new(value); } } /// /// Used to track the state of Angle @@ -137,7 +137,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Angle /// [JsonPropertyName("Angle")] - public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new Option(value); } } + public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new(value); } } /// /// Used to track the state of Reserved1 @@ -150,7 +150,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } /// /// Used to track the state of Reserved2 @@ -163,7 +163,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Used to track the state of Reserved3 @@ -176,7 +176,7 @@ public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sou /// Gets or Sets Reserved3 /// [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new Option(value); } } + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs index 23a408e..4c1247c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs @@ -101,7 +101,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets FieldTypesCount /// [JsonPropertyName("FieldTypesCount")] - public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new Option(value); } } + public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new(value); } } /// /// Used to track the state of FieldTypesList @@ -114,7 +114,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets FieldTypesList /// [JsonPropertyName("FieldTypesList")] - public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new Option?>(value); } } + public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new(value); } } /// /// Used to track the state of Step @@ -127,7 +127,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Step /// [JsonPropertyName("Step")] - public int? Step { get { return this.StepOption; } set { this.StepOption = new Option(value); } } + public int? Step { get { return this.StepOption; } set { this.StepOption = new(value); } } /// /// Used to track the state of Angle @@ -140,7 +140,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Angle /// [JsonPropertyName("Angle")] - public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new Option(value); } } + public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new(value); } } /// /// Used to track the state of Reserved1 @@ -153,7 +153,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Reserved1 /// [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new Option(value); } } + public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } /// /// Used to track the state of Reserved2 @@ -166,7 +166,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Used to track the state of Reserved3 @@ -179,7 +179,7 @@ public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData s /// Gets or Sets Reserved3 /// [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new Option(value); } } + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs index 4468b14..4bd34fb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs @@ -62,7 +62,7 @@ public PointsContainer(List pointsList, Option pointCount = default /// Gets or Sets PointCount /// [JsonPropertyName("PointCount")] - public int? PointCount { get { return this.PointCountOption; } set { this.PointCountOption = new Option(value); } } + public int? PointCount { get { return this.PointCountOption; } set { this.PointCountOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index 94d2788..19f0a39 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -178,7 +178,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets MeasureSystem /// [JsonPropertyName("measureSystem")] - public MeasureSystem? MeasureSystem { get { return this.MeasureSystemOption; } set { this.MeasureSystemOption = new Option(value); } } + public MeasureSystem? MeasureSystem { get { return this.MeasureSystemOption; } set { this.MeasureSystemOption = new(value); } } /// /// Used to track the state of LogLevel @@ -191,7 +191,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets LogLevel /// [JsonPropertyName("logLevel")] - public LogLevel? LogLevel { get { return this.LogLevelOption; } set { this.LogLevelOption = new Option(value); } } + public LogLevel? LogLevel { get { return this.LogLevelOption; } set { this.LogLevelOption = new(value); } } /// /// Used to track the state of ForceDocFormat @@ -204,7 +204,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets ForceDocFormat /// [JsonPropertyName("forceDocFormat")] - public DocumentFormat? ForceDocFormat { get { return this.ForceDocFormatOption; } set { this.ForceDocFormatOption = new Option(value); } } + public DocumentFormat? ForceDocFormat { get { return this.ForceDocFormatOption; } set { this.ForceDocFormatOption = new(value); } } /// /// Used to track the state of ConvertCase @@ -217,7 +217,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets ConvertCase /// [JsonPropertyName("convertCase")] - public TextPostProcessing? ConvertCase { get { return this.ConvertCaseOption; } set { this.ConvertCaseOption = new Option(value); } } + public TextPostProcessing? ConvertCase { get { return this.ConvertCaseOption; } set { this.ConvertCaseOption = new(value); } } /// /// Used to track the state of MrzDetectMode @@ -230,7 +230,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets MrzDetectMode /// [JsonPropertyName("mrzDetectMode")] - public MrzDetectModeEnum? MrzDetectMode { get { return this.MrzDetectModeOption; } set { this.MrzDetectModeOption = new Option(value); } } + public MrzDetectModeEnum? MrzDetectMode { get { return this.MrzDetectModeOption; } set { this.MrzDetectModeOption = new(value); } } /// /// Used to track the state of GenerateDTCVC @@ -244,7 +244,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to generate separate DTC-VC data container from RFID session data. [JsonPropertyName("generateDTCVC")] - public bool? GenerateDTCVC { get { return this.GenerateDTCVCOption; } set { this.GenerateDTCVCOption = new Option(value); } } + public bool? GenerateDTCVC { get { return this.GenerateDTCVCOption; } set { this.GenerateDTCVCOption = new(value); } } /// /// Used to track the state of LcidFilter @@ -258,7 +258,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. [JsonPropertyName("lcidFilter")] - public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new Option?>(value); } } + public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } /// /// Used to track the state of CheckLiveness @@ -272,7 +272,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to enable document liveness check. [JsonPropertyName("checkLiveness")] - public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new Option(value); } } + public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new(value); } } /// /// Used to track the state of LcidIgnoreFilter @@ -286,7 +286,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. [JsonPropertyName("lcidIgnoreFilter")] - public List? LcidIgnoreFilter { get { return this.LcidIgnoreFilterOption; } set { this.LcidIgnoreFilterOption = new Option?>(value); } } + public List? LcidIgnoreFilter { get { return this.LcidIgnoreFilterOption; } set { this.LcidIgnoreFilterOption = new(value); } } /// /// Used to track the state of OneShotIdentification @@ -300,7 +300,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face [JsonPropertyName("oneShotIdentification")] - public bool? OneShotIdentification { get { return this.OneShotIdentificationOption; } set { this.OneShotIdentificationOption = new Option(value); } } + public bool? OneShotIdentification { get { return this.OneShotIdentificationOption; } set { this.OneShotIdentificationOption = new(value); } } /// /// Used to track the state of UseFaceApi @@ -314,7 +314,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows comparing faces on Regula Face Web Service [JsonPropertyName("useFaceApi")] - public bool? UseFaceApi { get { return this.UseFaceApiOption; } set { this.UseFaceApiOption = new Option(value); } } + public bool? UseFaceApi { get { return this.UseFaceApiOption; } set { this.UseFaceApiOption = new(value); } } /// /// Used to track the state of FaceApi @@ -327,7 +327,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets FaceApi /// [JsonPropertyName("faceApi")] - public FaceApi? FaceApi { get { return this.FaceApiOption; } set { this.FaceApiOption = new Option(value); } } + public FaceApi? FaceApi { get { return this.FaceApiOption; } set { this.FaceApiOption = new(value); } } /// /// Used to track the state of DoDetectCan @@ -341,7 +341,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. [JsonPropertyName("doDetectCan")] - public bool? DoDetectCan { get { return this.DoDetectCanOption; } set { this.DoDetectCanOption = new Option(value); } } + public bool? DoDetectCan { get { return this.DoDetectCanOption; } set { this.DoDetectCanOption = new(value); } } /// /// Used to track the state of ImageOutputMaxHeight @@ -355,7 +355,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. [JsonPropertyName("imageOutputMaxHeight")] - public int? ImageOutputMaxHeight { get { return this.ImageOutputMaxHeightOption; } set { this.ImageOutputMaxHeightOption = new Option(value); } } + public int? ImageOutputMaxHeight { get { return this.ImageOutputMaxHeightOption; } set { this.ImageOutputMaxHeightOption = new(value); } } /// /// Used to track the state of ImageOutputMaxWidth @@ -369,7 +369,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. [JsonPropertyName("imageOutputMaxWidth")] - public int? ImageOutputMaxWidth { get { return this.ImageOutputMaxWidthOption; } set { this.ImageOutputMaxWidthOption = new Option(value); } } + public int? ImageOutputMaxWidth { get { return this.ImageOutputMaxWidthOption; } set { this.ImageOutputMaxWidthOption = new(value); } } /// /// Used to track the state of ResultTypeOutput @@ -383,7 +383,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Types of results to return in response. See 'Result' enum for available options [JsonPropertyName("resultTypeOutput")] - public List? ResultTypeOutput { get { return this.ResultTypeOutputOption; } set { this.ResultTypeOutputOption = new Option?>(value); } } + public List? ResultTypeOutput { get { return this.ResultTypeOutputOption; } set { this.ResultTypeOutputOption = new(value); } } /// /// Used to track the state of DoublePageSpread @@ -398,7 +398,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. [JsonPropertyName("doublePageSpread")] [Obsolete] - public bool? DoublePageSpread { get { return this.DoublePageSpreadOption; } set { this.DoublePageSpreadOption = new Option(value); } } + public bool? DoublePageSpread { get { return this.DoublePageSpreadOption; } set { this.DoublePageSpreadOption = new(value); } } /// /// Used to track the state of GenerateDoublePageSpreadImage @@ -412,7 +412,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. [JsonPropertyName("generateDoublePageSpreadImage")] - public bool? GenerateDoublePageSpreadImage { get { return this.GenerateDoublePageSpreadImageOption; } set { this.GenerateDoublePageSpreadImageOption = new Option(value); } } + public bool? GenerateDoublePageSpreadImage { get { return this.GenerateDoublePageSpreadImageOption; } set { this.GenerateDoublePageSpreadImageOption = new(value); } } /// /// Used to track the state of FieldTypesFilter @@ -426,7 +426,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. [JsonPropertyName("fieldTypesFilter")] - public List? FieldTypesFilter { get { return this.FieldTypesFilterOption; } set { this.FieldTypesFilterOption = new Option?>(value); } } + public List? FieldTypesFilter { get { return this.FieldTypesFilterOption; } set { this.FieldTypesFilterOption = new(value); } } /// /// Used to track the state of DateFormat @@ -441,7 +441,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). /* MM/dd/yyyy */ [JsonPropertyName("dateFormat")] - public string? DateFormat { get { return this.DateFormatOption; } set { this.DateFormatOption = new Option(value); } } + public string? DateFormat { get { return this.DateFormatOption; } set { this.DateFormatOption = new(value); } } /// /// Used to track the state of ImageDpiOutMax @@ -455,7 +455,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. [JsonPropertyName("imageDpiOutMax")] - public int? ImageDpiOutMax { get { return this.ImageDpiOutMaxOption; } set { this.ImageDpiOutMaxOption = new Option(value); } } + public int? ImageDpiOutMax { get { return this.ImageDpiOutMaxOption; } set { this.ImageDpiOutMaxOption = new(value); } } /// /// Used to track the state of AlreadyCropped @@ -469,7 +469,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. [JsonPropertyName("alreadyCropped")] - public bool? AlreadyCropped { get { return this.AlreadyCroppedOption; } set { this.AlreadyCroppedOption = new Option(value); } } + public bool? AlreadyCropped { get { return this.AlreadyCroppedOption; } set { this.AlreadyCroppedOption = new(value); } } /// /// Used to track the state of CustomParams @@ -483,7 +483,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows passing custom processing parameters that can be implemented in future without changing API. [JsonPropertyName("customParams")] - public Dictionary? CustomParams { get { return this.CustomParamsOption; } set { this.CustomParamsOption = new Option?>(value); } } + public Dictionary? CustomParams { get { return this.CustomParamsOption; } set { this.CustomParamsOption = new(value); } } /// /// Used to track the state of Config @@ -497,7 +497,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. [JsonPropertyName("config")] - public List? Config { get { return this.ConfigOption; } set { this.ConfigOption = new Option?>(value); } } + public List? Config { get { return this.ConfigOption; } set { this.ConfigOption = new(value); } } /// /// Used to track the state of Log @@ -511,7 +511,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, results will contain transaction processing log. Disabled by default [JsonPropertyName("log")] - public bool? Log { get { return this.LogOption; } set { this.LogOption = new Option(value); } } + public bool? Log { get { return this.LogOption; } set { this.LogOption = new(value); } } /// /// Used to track the state of ForceDocID @@ -525,7 +525,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Force use of specific template ID and skip document type identification step. [JsonPropertyName("forceDocID")] - public int? ForceDocID { get { return this.ForceDocIDOption; } set { this.ForceDocIDOption = new Option(value); } } + public int? ForceDocID { get { return this.ForceDocIDOption; } set { this.ForceDocIDOption = new(value); } } /// /// Used to track the state of MatchTextFieldMask @@ -539,7 +539,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. [JsonPropertyName("matchTextFieldMask")] - public bool? MatchTextFieldMask { get { return this.MatchTextFieldMaskOption; } set { this.MatchTextFieldMaskOption = new Option(value); } } + public bool? MatchTextFieldMask { get { return this.MatchTextFieldMaskOption; } set { this.MatchTextFieldMaskOption = new(value); } } /// /// Used to track the state of FastDocDetect @@ -554,7 +554,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. [JsonPropertyName("fastDocDetect")] [Obsolete] - public bool? FastDocDetect { get { return this.FastDocDetectOption; } set { this.FastDocDetectOption = new Option(value); } } + public bool? FastDocDetect { get { return this.FastDocDetectOption; } set { this.FastDocDetectOption = new(value); } } /// /// Used to track the state of UpdateOCRValidityByGlare @@ -568,7 +568,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. [JsonPropertyName("updateOCRValidityByGlare")] - public bool? UpdateOCRValidityByGlare { get { return this.UpdateOCRValidityByGlareOption; } set { this.UpdateOCRValidityByGlareOption = new Option(value); } } + public bool? UpdateOCRValidityByGlare { get { return this.UpdateOCRValidityByGlareOption; } set { this.UpdateOCRValidityByGlareOption = new(value); } } /// /// Used to track the state of CheckRequiredTextFields @@ -582,7 +582,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. [JsonPropertyName("checkRequiredTextFields")] - public bool? CheckRequiredTextFields { get { return this.CheckRequiredTextFieldsOption; } set { this.CheckRequiredTextFieldsOption = new Option(value); } } + public bool? CheckRequiredTextFields { get { return this.CheckRequiredTextFieldsOption; } set { this.CheckRequiredTextFieldsOption = new(value); } } /// /// Used to track the state of ReturnCroppedBarcode @@ -596,7 +596,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. [JsonPropertyName("returnCroppedBarcode")] - public bool? ReturnCroppedBarcode { get { return this.ReturnCroppedBarcodeOption; } set { this.ReturnCroppedBarcodeOption = new Option(value); } } + public bool? ReturnCroppedBarcode { get { return this.ReturnCroppedBarcodeOption; } set { this.ReturnCroppedBarcodeOption = new(value); } } /// /// Used to track the state of ImageQa @@ -609,7 +609,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets ImageQa /// [JsonPropertyName("imageQa")] - public ImageQA? ImageQa { get { return this.ImageQaOption; } set { this.ImageQaOption = new Option(value); } } + public ImageQA? ImageQa { get { return this.ImageQaOption; } set { this.ImageQaOption = new(value); } } /// /// Used to track the state of StrictImageQuality @@ -623,7 +623,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. [JsonPropertyName("strictImageQuality")] - public bool? StrictImageQuality { get { return this.StrictImageQualityOption; } set { this.StrictImageQualityOption = new Option(value); } } + public bool? StrictImageQuality { get { return this.StrictImageQualityOption; } set { this.StrictImageQualityOption = new(value); } } /// /// Used to track the state of RespectImageQuality @@ -638,7 +638,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. [JsonPropertyName("respectImageQuality")] [Obsolete] - public bool? RespectImageQuality { get { return this.RespectImageQualityOption; } set { this.RespectImageQualityOption = new Option(value); } } + public bool? RespectImageQuality { get { return this.RespectImageQualityOption; } set { this.RespectImageQualityOption = new(value); } } /// /// Used to track the state of NoGraphics @@ -652,7 +652,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, no graphic fields will be cropped from document image. Disabled by default. [JsonPropertyName("noGraphics")] - public bool? NoGraphics { get { return this.NoGraphicsOption; } set { this.NoGraphicsOption = new Option(value); } } + public bool? NoGraphics { get { return this.NoGraphicsOption; } set { this.NoGraphicsOption = new(value); } } /// /// Used to track the state of DepersonalizeLog @@ -666,7 +666,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. [JsonPropertyName("depersonalizeLog")] - public bool? DepersonalizeLog { get { return this.DepersonalizeLogOption; } set { this.DepersonalizeLogOption = new Option(value); } } + public bool? DepersonalizeLog { get { return this.DepersonalizeLogOption; } set { this.DepersonalizeLogOption = new(value); } } /// /// Used to track the state of MultiDocOnImage @@ -680,7 +680,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. [JsonPropertyName("multiDocOnImage")] - public bool? MultiDocOnImage { get { return this.MultiDocOnImageOption; } set { this.MultiDocOnImageOption = new Option(value); } } + public bool? MultiDocOnImage { get { return this.MultiDocOnImageOption; } set { this.MultiDocOnImageOption = new(value); } } /// /// Used to track the state of ShiftExpiryDate @@ -694,7 +694,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default [JsonPropertyName("shiftExpiryDate")] - public int? ShiftExpiryDate { get { return this.ShiftExpiryDateOption; } set { this.ShiftExpiryDateOption = new Option(value); } } + public int? ShiftExpiryDate { get { return this.ShiftExpiryDateOption; } set { this.ShiftExpiryDateOption = new(value); } } /// /// Used to track the state of MinimalHolderAge @@ -708,7 +708,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. [JsonPropertyName("minimalHolderAge")] - public int? MinimalHolderAge { get { return this.MinimalHolderAgeOption; } set { this.MinimalHolderAgeOption = new Option(value); } } + public int? MinimalHolderAge { get { return this.MinimalHolderAgeOption; } set { this.MinimalHolderAgeOption = new(value); } } /// /// Used to track the state of ReturnUncroppedImage @@ -722,7 +722,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, returns input images in output. Disabled by default. [JsonPropertyName("returnUncroppedImage")] - public bool? ReturnUncroppedImage { get { return this.ReturnUncroppedImageOption; } set { this.ReturnUncroppedImageOption = new Option(value); } } + public bool? ReturnUncroppedImage { get { return this.ReturnUncroppedImageOption; } set { this.ReturnUncroppedImageOption = new(value); } } /// /// Used to track the state of MrzFormatsFilter @@ -736,7 +736,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option allows limiting MRZ formats to be recognized by specifying them in array. [JsonPropertyName("mrzFormatsFilter")] - public List? MrzFormatsFilter { get { return this.MrzFormatsFilterOption; } set { this.MrzFormatsFilterOption = new Option?>(value); } } + public List? MrzFormatsFilter { get { return this.MrzFormatsFilterOption; } set { this.MrzFormatsFilterOption = new(value); } } /// /// Used to track the state of ForceReadMrzBeforeLocate @@ -750,7 +750,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. [JsonPropertyName("forceReadMrzBeforeLocate")] - public bool? ForceReadMrzBeforeLocate { get { return this.ForceReadMrzBeforeLocateOption; } set { this.ForceReadMrzBeforeLocateOption = new Option(value); } } + public bool? ForceReadMrzBeforeLocate { get { return this.ForceReadMrzBeforeLocateOption; } set { this.ForceReadMrzBeforeLocateOption = new(value); } } /// /// Used to track the state of ParseBarcodes @@ -764,7 +764,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. [JsonPropertyName("parseBarcodes")] - public bool? ParseBarcodes { get { return this.ParseBarcodesOption; } set { this.ParseBarcodesOption = new Option(value); } } + public bool? ParseBarcodes { get { return this.ParseBarcodesOption; } set { this.ParseBarcodesOption = new(value); } } /// /// Used to track the state of SplitNames @@ -778,7 +778,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. [JsonPropertyName("splitNames")] - public bool? SplitNames { get { return this.SplitNamesOption; } set { this.SplitNamesOption = new Option(value); } } + public bool? SplitNames { get { return this.SplitNamesOption; } set { this.SplitNamesOption = new(value); } } /// /// Used to track the state of DisablePerforationOCR @@ -792,7 +792,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. [JsonPropertyName("disablePerforationOCR")] - public bool? DisablePerforationOCR { get { return this.DisablePerforationOCROption; } set { this.DisablePerforationOCROption = new Option(value); } } + public bool? DisablePerforationOCR { get { return this.DisablePerforationOCROption; } set { this.DisablePerforationOCROption = new(value); } } /// /// Used to track the state of DocumentGroupFilter @@ -806,7 +806,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. [JsonPropertyName("documentGroupFilter")] - public List? DocumentGroupFilter { get { return this.DocumentGroupFilterOption; } set { this.DocumentGroupFilterOption = new Option?>(value); } } + public List? DocumentGroupFilter { get { return this.DocumentGroupFilterOption; } set { this.DocumentGroupFilterOption = new(value); } } /// /// Used to track the state of ProcessAuth @@ -820,7 +820,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. [JsonPropertyName("processAuth")] - public long? ProcessAuth { get { return this.ProcessAuthOption; } set { this.ProcessAuthOption = new Option(value); } } + public long? ProcessAuth { get { return this.ProcessAuthOption; } set { this.ProcessAuthOption = new(value); } } /// /// Used to track the state of DeviceId @@ -834,7 +834,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. [JsonPropertyName("deviceId")] - public int? DeviceId { get { return this.DeviceIdOption; } set { this.DeviceIdOption = new Option(value); } } + public int? DeviceId { get { return this.DeviceIdOption; } set { this.DeviceIdOption = new(value); } } /// /// Used to track the state of DeviceType @@ -848,7 +848,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. [JsonPropertyName("deviceType")] - public int? DeviceType { get { return this.DeviceTypeOption; } set { this.DeviceTypeOption = new Option(value); } } + public int? DeviceType { get { return this.DeviceTypeOption; } set { this.DeviceTypeOption = new(value); } } /// /// Used to track the state of DeviceTypeHex @@ -862,7 +862,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to specify the document reader device type from which input images were captured [JsonPropertyName("deviceTypeHex")] - public string? DeviceTypeHex { get { return this.DeviceTypeHexOption; } set { this.DeviceTypeHexOption = new Option(value); } } + public string? DeviceTypeHex { get { return this.DeviceTypeHexOption; } set { this.DeviceTypeHexOption = new(value); } } /// /// Used to track the state of IgnoreDeviceIdFromImage @@ -876,7 +876,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false [JsonPropertyName("ignoreDeviceIdFromImage")] - public bool? IgnoreDeviceIdFromImage { get { return this.IgnoreDeviceIdFromImageOption; } set { this.IgnoreDeviceIdFromImageOption = new Option(value); } } + public bool? IgnoreDeviceIdFromImage { get { return this.IgnoreDeviceIdFromImageOption; } set { this.IgnoreDeviceIdFromImageOption = new(value); } } /// /// Used to track the state of DocumentIdList @@ -890,7 +890,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// List of the document ID's to process. All documents will be processed, if empty. [JsonPropertyName("documentIdList")] - public List? DocumentIdList { get { return this.DocumentIdListOption; } set { this.DocumentIdListOption = new Option?>(value); } } + public List? DocumentIdList { get { return this.DocumentIdListOption; } set { this.DocumentIdListOption = new(value); } } /// /// Used to track the state of Rfid @@ -903,7 +903,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets Rfid /// [JsonPropertyName("rfid")] - public ProcessParamsRfid? Rfid { get { return this.RfidOption; } set { this.RfidOption = new Option(value); } } + public ProcessParamsRfid? Rfid { get { return this.RfidOption; } set { this.RfidOption = new(value); } } /// /// Used to track the state of CheckAuth @@ -917,7 +917,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to enable authenticity checks [JsonPropertyName("checkAuth")] - public bool? CheckAuth { get { return this.CheckAuthOption; } set { this.CheckAuthOption = new Option(value); } } + public bool? CheckAuth { get { return this.CheckAuthOption; } set { this.CheckAuthOption = new(value); } } /// /// Used to track the state of AuthParams @@ -930,7 +930,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// Gets or Sets AuthParams /// [JsonPropertyName("authParams")] - public AuthParams? AuthParams { get { return this.AuthParamsOption; } set { this.AuthParamsOption = new Option(value); } } + public AuthParams? AuthParams { get { return this.AuthParamsOption; } set { this.AuthParamsOption = new(value); } } /// /// Used to track the state of GenerateNumericCodes @@ -944,7 +944,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter is used to generate numeric representation for issuing state and nationality codes [JsonPropertyName("generateNumericCodes")] - public bool? GenerateNumericCodes { get { return this.GenerateNumericCodesOption; } set { this.GenerateNumericCodesOption = new Option(value); } } + public bool? GenerateNumericCodes { get { return this.GenerateNumericCodesOption; } set { this.GenerateNumericCodesOption = new(value); } } /// /// Used to track the state of StrictBarcodeDigitalSignatureCheck @@ -958,7 +958,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. [JsonPropertyName("strictBarcodeDigitalSignatureCheck")] - public bool? StrictBarcodeDigitalSignatureCheck { get { return this.StrictBarcodeDigitalSignatureCheckOption; } set { this.StrictBarcodeDigitalSignatureCheckOption = new Option(value); } } + public bool? StrictBarcodeDigitalSignatureCheck { get { return this.StrictBarcodeDigitalSignatureCheckOption; } set { this.StrictBarcodeDigitalSignatureCheckOption = new(value); } } /// /// Used to track the state of SelectLongestNames @@ -972,7 +972,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. [JsonPropertyName("selectLongestNames")] - public bool? SelectLongestNames { get { return this.SelectLongestNamesOption; } set { this.SelectLongestNamesOption = new Option(value); } } + public bool? SelectLongestNames { get { return this.SelectLongestNamesOption; } set { this.SelectLongestNamesOption = new(value); } } /// /// Used to track the state of DoBarcodes @@ -986,7 +986,7 @@ public ProcessParams(Scenario scenario, Option generateDTCVC = default, O /// /// Set the types of barcodes to process. [JsonPropertyName("doBarcodes")] - public List? DoBarcodes { get { return this.DoBarcodesOption; } set { this.DoBarcodesOption = new Option?>(value); } } + public List? DoBarcodes { get { return this.DoBarcodesOption; } set { this.DoBarcodesOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs index b9d0aa4..45c652d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs @@ -55,7 +55,7 @@ public ProcessParamsRfid(Option?> paSensitiveCode /// /// A list of notification codes that should be ignored during passive authentication (PA) [JsonPropertyName("paSensitiveCodesDisable")] - public List? PaSensitiveCodesDisable { get { return this.PaSensitiveCodesDisableOption; } set { this.PaSensitiveCodesDisableOption = new Option?>(value); } } + public List? PaSensitiveCodesDisable { get { return this.PaSensitiveCodesDisableOption; } set { this.PaSensitiveCodesDisableOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs index d66a3d5..7e8b2bc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs @@ -85,7 +85,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. [JsonPropertyName("lcidFilter")] - public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new Option?>(value); } } + public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } /// /// Used to track the state of List @@ -98,7 +98,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Gets or Sets List /// [JsonPropertyName("List")] - public List? List { get { return this.ListOption; } set { this.ListOption = new Option?>(value); } } + public List? List { get { return this.ListOption; } set { this.ListOption = new(value); } } /// /// Used to track the state of Tag @@ -112,7 +112,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Session ID [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new Option(value); } } + public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } /// /// Used to track the state of Tenant @@ -126,7 +126,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Customer name [JsonPropertyName("tenant")] - public string? Tenant { get { return this.TenantOption; } set { this.TenantOption = new Option(value); } } + public string? Tenant { get { return this.TenantOption; } set { this.TenantOption = new(value); } } /// /// Used to track the state of Env @@ -140,7 +140,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Environment type [JsonPropertyName("env")] - public string? Env { get { return this.EnvOption; } set { this.EnvOption = new Option(value); } } + public string? Env { get { return this.EnvOption; } set { this.EnvOption = new(value); } } /// /// Used to track the state of LivePortrait @@ -155,7 +155,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Live portrait photo /* Base64 encoded data */ [JsonPropertyName("livePortrait")] - public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new Option(value); } } + public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new(value); } } /// /// Used to track the state of ExtPortrait @@ -170,7 +170,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Portrait photo from an external source /* Base64 encoded data */ [JsonPropertyName("extPortrait")] - public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new Option(value); } } + public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new(value); } } /// /// Used to track the state of ContainerList @@ -183,7 +183,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Gets or Sets ContainerList /// [JsonPropertyName("ContainerList")] - public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new Option(value); } } + public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new(value); } } /// /// Used to track the state of SystemInfo @@ -196,7 +196,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// Gets or Sets SystemInfo /// [JsonPropertyName("systemInfo")] - public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new Option(value); } } + public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } /// /// Used to track the state of PassBackObject @@ -210,7 +210,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new Option?>(value); } } + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } /// /// Used to track the state of Dtc @@ -224,7 +224,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing [JsonPropertyName("dtc")] - public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new Option(value); } } + public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new(value); } } /// /// Used to track the state of ImageUrls @@ -238,7 +238,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter /// /// URLs to the document images for processing. [JsonPropertyName("ImageUrls")] - public List? ImageUrls { get { return this.ImageUrlsOption; } set { this.ImageUrlsOption = new Option?>(value); } } + public List? ImageUrls { get { return this.ImageUrlsOption; } set { this.ImageUrlsOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs index 36c101f..76f0632 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs @@ -58,7 +58,7 @@ public ProcessRequestImage(Option imageData = default, Option [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new Option(value); } } + public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } /// /// Used to track the state of ImageData @@ -71,7 +71,7 @@ public ProcessRequestImage(Option imageData = default, Option [JsonPropertyName("ImageData")] - public ImageData? ImageData { get { return this.ImageDataOption; } set { this.ImageDataOption = new Option(value); } } + public ImageData? ImageData { get { return this.ImageDataOption; } set { this.ImageDataOption = new(value); } } /// /// Used to track the state of PageIdx @@ -85,7 +85,7 @@ public ProcessRequestImage(Option imageData = default, Option /// page/image number [JsonPropertyName("page_idx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new Option(value); } } + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs index 8ba40df..884bb83 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs @@ -109,7 +109,7 @@ public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinishe /// Gets or Sets CoreLibResultCode /// [JsonPropertyName("CoreLibResultCode")] - public int? CoreLibResultCode { get { return this.CoreLibResultCodeOption; } set { this.CoreLibResultCodeOption = new Option(value); } } + public int? CoreLibResultCode { get { return this.CoreLibResultCodeOption; } set { this.CoreLibResultCodeOption = new(value); } } /// /// Used to track the state of Log @@ -123,7 +123,7 @@ public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinishe /// /// Base64 encoded transaction processing log [JsonPropertyName("log")] - public string? Log { get { return this.LogOption; } set { this.LogOption = new Option(value); } } + public string? Log { get { return this.LogOption; } set { this.LogOption = new(value); } } /// /// Used to track the state of PassBackObject @@ -137,7 +137,7 @@ public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinishe /// /// Free-form object provided in request. See passBackObject property of ProcessRequest. [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new Option?>(value); } } + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } /// /// Used to track the state of Metadata @@ -150,7 +150,7 @@ public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinishe /// Gets or Sets Metadata /// [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new Option?>(value); } } + public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs index 8e1cf57..5513997 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs @@ -57,7 +57,7 @@ public ProcessSystemInfo(Option license = default, Option reca /// /// Base64 encoded license file [JsonPropertyName("license")] - public string? License { get { return this.LicenseOption; } set { this.LicenseOption = new Option(value); } } + public string? License { get { return this.LicenseOption; } set { this.LicenseOption = new(value); } } /// /// Used to track the state of RecaptchaToken @@ -71,7 +71,7 @@ public ProcessSystemInfo(Option license = default, Option reca /// /// For internal use. Demo-sites recaptcha token. [JsonPropertyName("recaptcha_token")] - public string? RecaptchaToken { get { return this.RecaptchaTokenOption; } set { this.RecaptchaTokenOption = new Option(value); } } + public string? RecaptchaToken { get { return this.RecaptchaTokenOption; } set { this.RecaptchaTokenOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs index d1fdf65..9c20e6b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs @@ -86,7 +86,7 @@ public RFIDDocVisualExtendedField(int fieldType, TextFieldType wFieldType, strin /// Gets or Sets OriginDGTag /// [JsonPropertyName("OriginDGTag")] - public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new Option(value); } } + public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new(value); } } /// /// Used to track the state of OriginEntryView @@ -99,7 +99,7 @@ public RFIDDocVisualExtendedField(int fieldType, TextFieldType wFieldType, strin /// Gets or Sets OriginEntryView /// [JsonPropertyName("OriginEntryView")] - public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new Option(value); } } + public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs index 61557e3..812377d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs @@ -73,7 +73,7 @@ public RFIDDocVisualExtendedFieldItem(int originDG, decimal originTagEntry, Opti /// Gets or Sets OriginDGTag /// [JsonPropertyName("OriginDGTag")] - public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new Option(value); } } + public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new(value); } } /// /// Used to track the state of OriginEntryView @@ -86,7 +86,7 @@ public RFIDDocVisualExtendedFieldItem(int originDG, decimal originTagEntry, Opti /// Gets or Sets OriginEntryView /// [JsonPropertyName("OriginEntryView")] - public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new Option(value); } } + public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs index 5ca72d2..d85526b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs @@ -61,7 +61,7 @@ public ResultItem(Option bufLength = default, Option light = default /// Gets or Sets BufLength /// [JsonPropertyName("buf_length")] - public int? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new Option(value); } } + public int? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new(value); } } /// /// Used to track the state of Light @@ -74,7 +74,7 @@ public ResultItem(Option bufLength = default, Option light = default /// Gets or Sets Light /// [JsonPropertyName("light")] - public int? Light { get { return this.LightOption; } set { this.LightOption = new Option(value); } } + public int? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } /// /// Used to track the state of ListIdx @@ -87,7 +87,7 @@ public ResultItem(Option bufLength = default, Option light = default /// Gets or Sets ListIdx /// [JsonPropertyName("list_idx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new Option(value); } } + public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } /// /// Used to track the state of PageIdx @@ -100,7 +100,7 @@ public ResultItem(Option bufLength = default, Option light = default /// Gets or Sets PageIdx /// [JsonPropertyName("page_idx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new Option(value); } } + public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } /// /// The discriminator diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs index f1732ac..20253fe 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs @@ -82,7 +82,7 @@ public RfidAccessControlInfo(RfidAccessControlProcedureType type, RFIDErrorCodes /// /// Index of the active variant of the procedure [JsonPropertyName("ActiveOptionIdx")] - public decimal? ActiveOptionIdx { get { return this.ActiveOptionIdxOption; } set { this.ActiveOptionIdxOption = new Option(value); } } + public decimal? ActiveOptionIdx { get { return this.ActiveOptionIdxOption; } set { this.ActiveOptionIdxOption = new(value); } } /// /// Used to track the state of AccessControlOptions @@ -96,7 +96,7 @@ public RfidAccessControlInfo(RfidAccessControlProcedureType type, RFIDErrorCodes /// /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document [JsonPropertyName("AccessControlOptions")] - public List? AccessControlOptions { get { return this.AccessControlOptionsOption; } set { this.AccessControlOptionsOption = new Option?>(value); } } + public List? AccessControlOptions { get { return this.AccessControlOptionsOption; } set { this.AccessControlOptionsOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs index 8d0d398..b7220af 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs @@ -88,7 +88,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// Gets or Sets PAStatus /// [JsonPropertyName("PA_Status")] - public RFIDErrorCodes? PAStatus { get { return this.PAStatusOption; } set { this.PAStatusOption = new Option(value); } } + public RFIDErrorCodes? PAStatus { get { return this.PAStatusOption; } set { this.PAStatusOption = new(value); } } /// /// Used to track the state of FileID @@ -102,7 +102,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) [JsonPropertyName("FileID")] - public string? FileID { get { return this.FileIDOption; } set { this.FileIDOption = new Option(value); } } + public string? FileID { get { return this.FileIDOption; } set { this.FileIDOption = new(value); } } /// /// Used to track the state of FileData @@ -115,7 +115,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// Gets or Sets FileData /// [JsonPropertyName("FileData")] - public TrfFtBytes? FileData { get { return this.FileDataOption; } set { this.FileDataOption = new Option(value); } } + public TrfFtBytes? FileData { get { return this.FileDataOption; } set { this.FileDataOption = new(value); } } /// /// Used to track the state of ReadingTime @@ -129,7 +129,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// Time of reading, milliseconds [JsonPropertyName("ReadingTime")] - public decimal? ReadingTime { get { return this.ReadingTimeOption; } set { this.ReadingTimeOption = new Option(value); } } + public decimal? ReadingTime { get { return this.ReadingTimeOption; } set { this.ReadingTimeOption = new(value); } } /// /// Used to track the state of Notifications @@ -143,7 +143,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. [JsonPropertyName("Notifications")] - public List? Notifications { get { return this.NotificationsOption; } set { this.NotificationsOption = new Option?>(value); } } + public List? Notifications { get { return this.NotificationsOption; } set { this.NotificationsOption = new(value); } } /// /// Used to track the state of DocFieldsText @@ -157,7 +157,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// List of document text fields formed on the basis of the file contents [JsonPropertyName("DocFields_Text")] - public List? DocFieldsText { get { return this.DocFieldsTextOption; } set { this.DocFieldsTextOption = new Option?>(value); } } + public List? DocFieldsText { get { return this.DocFieldsTextOption; } set { this.DocFieldsTextOption = new(value); } } /// /// Used to track the state of DocFieldsGraphics @@ -171,7 +171,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// List of document graphic fields formed on the basis of the file contents [JsonPropertyName("DocFields_Graphics")] - public List? DocFieldsGraphics { get { return this.DocFieldsGraphicsOption; } set { this.DocFieldsGraphicsOption = new Option?>(value); } } + public List? DocFieldsGraphics { get { return this.DocFieldsGraphicsOption; } set { this.DocFieldsGraphicsOption = new(value); } } /// /// Used to track the state of DocFieldsOriginals @@ -185,7 +185,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// /// List of the original binary representation of graphic document fields formed on the basis of the file contents [JsonPropertyName("DocFields_Originals")] - public List? DocFieldsOriginals { get { return this.DocFieldsOriginalsOption; } set { this.DocFieldsOriginalsOption = new Option?>(value); } } + public List? DocFieldsOriginals { get { return this.DocFieldsOriginalsOption; } set { this.DocFieldsOriginalsOption = new(value); } } /// /// Used to track the state of ParsedData @@ -198,7 +198,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// Gets or Sets ParsedData /// [JsonPropertyName("ParsedData")] - public ParsedData? ParsedData { get { return this.ParsedDataOption; } set { this.ParsedDataOption = new Option(value); } } + public ParsedData? ParsedData { get { return this.ParsedDataOption; } set { this.ParsedDataOption = new(value); } } /// /// Used to track the state of SecurityObjectCertificates @@ -211,7 +211,7 @@ public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option< /// Gets or Sets SecurityObjectCertificates /// [JsonPropertyName("SecurityObject_Certificates")] - public SecurityObjectCertificates? SecurityObjectCertificates { get { return this.SecurityObjectCertificatesOption; } set { this.SecurityObjectCertificatesOption = new Option(value); } } + public SecurityObjectCertificates? SecurityObjectCertificates { get { return this.SecurityObjectCertificatesOption; } set { this.SecurityObjectCertificatesOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs index 1570c5f..c296f1c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs @@ -98,7 +98,7 @@ public RfidSessionData(List applications, List [JsonPropertyName("Status")] - public CheckResult? Status { get { return this.StatusOption; } set { this.StatusOption = new Option(value); } } + public CheckResult? Status { get { return this.StatusOption; } set { this.StatusOption = new(value); } } /// /// List of containers to store information about the involved applications of electronic document @@ -179,7 +179,7 @@ public RfidSessionData(List applications, List /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document [JsonPropertyName("VirtualMode")] - public string? VirtualMode { get { return this.VirtualModeOption; } set { this.VirtualModeOption = new Option(value); } } + public string? VirtualMode { get { return this.VirtualModeOption; } set { this.VirtualModeOption = new(value); } } /// /// Used to track the state of SDKVersion @@ -193,7 +193,7 @@ public RfidSessionData(List applications, List /// Text SDKVersion value in format A.B (e.g. 3.1) [JsonPropertyName("SDKVersion")] - public string? SDKVersion { get { return this.SDKVersionOption; } set { this.SDKVersionOption = new Option(value); } } + public string? SDKVersion { get { return this.SDKVersionOption; } set { this.SDKVersionOption = new(value); } } /// /// Used to track the state of DriverVersion @@ -207,7 +207,7 @@ public RfidSessionData(List applications, List /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) [JsonPropertyName("DriverVersion")] - public string? DriverVersion { get { return this.DriverVersionOption; } set { this.DriverVersionOption = new Option(value); } } + public string? DriverVersion { get { return this.DriverVersionOption; } set { this.DriverVersionOption = new(value); } } /// /// Used to track the state of FirmwareVersion @@ -221,7 +221,7 @@ public RfidSessionData(List applications, List /// Text FirmwareVersion value in format A.B (e.g. 5.19) [JsonPropertyName("FirmwareVersion")] - public string? FirmwareVersion { get { return this.FirmwareVersionOption; } set { this.FirmwareVersionOption = new Option(value); } } + public string? FirmwareVersion { get { return this.FirmwareVersionOption; } set { this.FirmwareVersionOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs index 74deab4..b8443cb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs @@ -88,7 +88,7 @@ public SecurityFeatureItem(SecurityFeatureType elementType, RectangleCoordinates /// Gets or Sets AreaList /// [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new Option(value); } } + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } /// /// Used to track the state of Reserved2 @@ -101,7 +101,7 @@ public SecurityFeatureItem(SecurityFeatureType elementType, RectangleCoordinates /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs index 541b222..3d240bd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs @@ -91,7 +91,7 @@ public SecurityFeatureResult(SecurityFeatureType elementType, RectangleCoordinat /// Gets or Sets AreaList /// [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new Option(value); } } + public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } /// /// Used to track the state of Reserved2 @@ -104,7 +104,7 @@ public SecurityFeatureResult(SecurityFeatureType elementType, RectangleCoordinat /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs index e7cd073..a6d696c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs @@ -54,7 +54,7 @@ public SecurityObjectCertificates(Option certificateData = def /// Gets or Sets CertificateData /// [JsonPropertyName("Certificate_Data")] - public CertificateData? CertificateData { get { return this.CertificateDataOption; } set { this.CertificateDataOption = new Option(value); } } + public CertificateData? CertificateData { get { return this.CertificateDataOption; } set { this.CertificateDataOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Status.cs b/src/Regula.DocumentReader.WebClient/Model/Status.cs index bed0f13..ed7e5de 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Status.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Status.cs @@ -102,7 +102,7 @@ public Status(CheckResult overallStatus, CheckResult optical, CheckResult portra /// Gets or Sets DetailsRFID /// [JsonPropertyName("detailsRFID")] - public DetailsRFID? DetailsRFID { get { return this.DetailsRFIDOption; } set { this.DetailsRFIDOption = new Option(value); } } + public DetailsRFID? DetailsRFID { get { return this.DetailsRFIDOption; } set { this.DetailsRFIDOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs index f68c81e..ac331d3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs @@ -77,7 +77,7 @@ public StringRecognitionResult(decimal symbolsCount, List /// Buf_Text text string length [JsonPropertyName("Buf_Length")] - public decimal? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new Option(value); } } + public decimal? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new(value); } } /// /// Used to track the state of BufText @@ -91,7 +91,7 @@ public StringRecognitionResult(decimal symbolsCount, List /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' [JsonPropertyName("Buf_Text")] - public string? BufText { get { return this.BufTextOption; } set { this.BufTextOption = new Option(value); } } + public string? BufText { get { return this.BufTextOption; } set { this.BufTextOption = new(value); } } /// /// Used to track the state of Reserved @@ -104,7 +104,7 @@ public StringRecognitionResult(decimal symbolsCount, List [JsonPropertyName("Reserved")] - public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new Option(value); } } + public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs index de8ac3a..4ef6923 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs @@ -74,7 +74,7 @@ public SymbolCandidate(int symbolCode, int symbolProbability, Option @clas /// Gets or Sets Class /// [JsonPropertyName("Class")] - public int? Class { get { return this.ClassOption; } set { this.ClassOption = new Option(value); } } + public int? Class { get { return this.ClassOption; } set { this.ClassOption = new(value); } } /// /// Used to track the state of SubClass @@ -87,7 +87,7 @@ public SymbolCandidate(int symbolCode, int symbolProbability, Option @clas /// Gets or Sets SubClass /// [JsonPropertyName("SubClass")] - public int? SubClass { get { return this.SubClassOption; } set { this.SubClassOption = new Option(value); } } + public int? SubClass { get { return this.SubClassOption; } set { this.SubClassOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs index 28c291b..75ec95c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs @@ -84,7 +84,7 @@ public SymbolRecognitionResult(RectangleCoordinates symbolRect, decimal candidat /// Gets or Sets BaseLineBottom /// [JsonPropertyName("BaseLineBottom")] - public int? BaseLineBottom { get { return this.BaseLineBottomOption; } set { this.BaseLineBottomOption = new Option(value); } } + public int? BaseLineBottom { get { return this.BaseLineBottomOption; } set { this.BaseLineBottomOption = new(value); } } /// /// Used to track the state of BaseLineTop @@ -97,7 +97,7 @@ public SymbolRecognitionResult(RectangleCoordinates symbolRect, decimal candidat /// Gets or Sets BaseLineTop /// [JsonPropertyName("BaseLineTop")] - public int? BaseLineTop { get { return this.BaseLineTopOption; } set { this.BaseLineTopOption = new Option(value); } } + public int? BaseLineTop { get { return this.BaseLineTopOption; } set { this.BaseLineTopOption = new(value); } } /// /// Used to track the state of Reserved @@ -110,7 +110,7 @@ public SymbolRecognitionResult(RectangleCoordinates symbolRect, decimal candidat /// Gets or Sets Reserved /// [JsonPropertyName("Reserved")] - public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new Option(value); } } + public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs index fb125cb..825b6ff 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs @@ -56,7 +56,7 @@ public TDocBinaryInfo(Option rFIDBINARYDATA = default, Option [JsonPropertyName("RFID_BINARY_DATA")] - public BinaryData? RFID_BINARY_DATA { get { return this.RFID_BINARY_DATAOption; } set { this.RFID_BINARY_DATAOption = new Option(value); } } + public BinaryData? RFID_BINARY_DATA { get { return this.RFID_BINARY_DATAOption; } set { this.RFID_BINARY_DATAOption = new(value); } } /// /// Used to track the state of RFID_RAW_DATA @@ -69,7 +69,7 @@ public TDocBinaryInfo(Option rFIDBINARYDATA = default, Option [JsonPropertyName("RFID_RAW_DATA")] - public List? RFID_RAW_DATA { get { return this.RFID_RAW_DATAOption; } set { this.RFID_RAW_DATAOption = new Option?>(value); } } + public List? RFID_RAW_DATA { get { return this.RFID_RAW_DATAOption; } set { this.RFID_RAW_DATAOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs index 11668de..1d956e8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs @@ -71,7 +71,7 @@ public TextAvailableSource(Source source, CheckResult validityStatus, Option /// Same as Result type, but used for safe parsing of not-described values. See Result type. [JsonPropertyName("containerType")] - public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new Option(value); } } + public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextField.cs b/src/Regula.DocumentReader.WebClient/Model/TextField.cs index 5d7a22d..1d38006 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextField.cs @@ -138,7 +138,7 @@ public TextField(TextFieldType fieldType, string fieldName, LCID lcid, CheckResu /// /// LCID name [JsonPropertyName("lcidName")] - public string? LcidName { get { return this.LcidNameOption; } set { this.LcidNameOption = new Option(value); } } + public string? LcidName { get { return this.LcidNameOption; } set { this.LcidNameOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs index 1eb27d5..897876c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs @@ -106,7 +106,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// /// Original value as seen in the document [JsonPropertyName("originalValue")] - public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new Option(value); } } + public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new(value); } } /// /// Used to track the state of OriginalSymbols @@ -119,7 +119,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// Gets or Sets OriginalSymbols /// [JsonPropertyName("originalSymbols")] - public List? OriginalSymbols { get { return this.OriginalSymbolsOption; } set { this.OriginalSymbolsOption = new Option?>(value); } } + public List? OriginalSymbols { get { return this.OriginalSymbolsOption; } set { this.OriginalSymbolsOption = new(value); } } /// /// Used to track the state of FieldRect @@ -132,7 +132,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// Gets or Sets FieldRect /// [JsonPropertyName("fieldRect")] - public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new Option(value); } } + public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new(value); } } /// /// Used to track the state of RfidOrigin @@ -145,7 +145,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// Gets or Sets RfidOrigin /// [JsonPropertyName("rfidOrigin")] - public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new Option(value); } } + public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new(value); } } /// /// Used to track the state of ContainerType @@ -159,7 +159,7 @@ public TextFieldValue(Source source, string value, CheckResult originalValidity, /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. [JsonPropertyName("containerType")] - public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new Option(value); } } + public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs index 8efa16a..6cc8b3e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs @@ -54,7 +54,7 @@ public TransactionImage(Option image = default) /// Gets or Sets Image /// [JsonPropertyName("image")] - public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new Option(value); } } + public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs index e7c3573..57457eb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs @@ -69,7 +69,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// Computer name [JsonPropertyName("ComputerName")] - public string? ComputerName { get { return this.ComputerNameOption; } set { this.ComputerNameOption = new Option(value); } } + public string? ComputerName { get { return this.ComputerNameOption; } set { this.ComputerNameOption = new(value); } } /// /// Used to track the state of DateTime @@ -83,7 +83,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// Date and time [JsonPropertyName("DateTime")] - public string? DateTime { get { return this.DateTimeOption; } set { this.DateTimeOption = new Option(value); } } + public string? DateTime { get { return this.DateTimeOption; } set { this.DateTimeOption = new(value); } } /// /// Used to track the state of DocumentsDatabase @@ -96,7 +96,7 @@ public TransactionInfo(Option computerName = default, Option d /// Gets or Sets DocumentsDatabase /// [JsonPropertyName("DocumentsDatabase")] - public DocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new Option(value); } } + public DocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new(value); } } /// /// Used to track the state of SystemInfo @@ -110,7 +110,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// System information [JsonPropertyName("SystemInfo")] - public string? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new Option(value); } } + public string? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } /// /// Used to track the state of Tag @@ -124,7 +124,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// Transaction tag [JsonPropertyName("Tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new Option(value); } } + public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } /// /// Used to track the state of TransactionID @@ -138,7 +138,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// Transaction identifier [JsonPropertyName("TransactionID")] - public string? TransactionID { get { return this.TransactionIDOption; } set { this.TransactionIDOption = new Option(value); } } + public string? TransactionID { get { return this.TransactionIDOption; } set { this.TransactionIDOption = new(value); } } /// /// Used to track the state of UserName @@ -152,7 +152,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// User name [JsonPropertyName("UserName")] - public string? UserName { get { return this.UserNameOption; } set { this.UserNameOption = new Option(value); } } + public string? UserName { get { return this.UserNameOption; } set { this.UserNameOption = new(value); } } /// /// Used to track the state of VarVersion @@ -166,7 +166,7 @@ public TransactionInfo(Option computerName = default, Option d /// /// SDK version [JsonPropertyName("Version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new Option(value); } } + public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs index 68c065e..ce230ed 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs @@ -60,7 +60,7 @@ public TransactionProcessGetResponse(Option transactionId = default, Opti /// Gets or Sets TransactionId /// [JsonPropertyName("transactionId")] - public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new Option(value); } } + public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new(value); } } /// /// Used to track the state of Tag @@ -73,7 +73,7 @@ public TransactionProcessGetResponse(Option transactionId = default, Opti /// Gets or Sets Tag /// [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new Option(value); } } + public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } /// /// Used to track the state of OutData @@ -86,7 +86,7 @@ public TransactionProcessGetResponse(Option transactionId = default, Opti /// Gets or Sets OutData /// [JsonPropertyName("outData")] - public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new Option(value); } } + public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new(value); } } /// /// Used to track the state of InData @@ -99,7 +99,7 @@ public TransactionProcessGetResponse(Option transactionId = default, Opti /// Gets or Sets InData /// [JsonPropertyName("inData")] - public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new Option(value); } } + public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs index 7617a7e..9d38f7d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs @@ -74,7 +74,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option [JsonPropertyName("List")] - public List? List { get { return this.ListOption; } set { this.ListOption = new Option?>(value); } } + public List? List { get { return this.ListOption; } set { this.ListOption = new(value); } } /// /// Used to track the state of LivePortrait @@ -89,7 +89,7 @@ public TransactionProcessRequest(ProcessParams processParam, OptionLive portrait photo /* Base64 encoded data */ [JsonPropertyName("livePortrait")] - public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new Option(value); } } + public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new(value); } } /// /// Used to track the state of ExtPortrait @@ -104,7 +104,7 @@ public TransactionProcessRequest(ProcessParams processParam, OptionPortrait photo from an external source /* Base64 encoded data */ [JsonPropertyName("extPortrait")] - public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new Option(value); } } + public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new(value); } } /// /// Used to track the state of ContainerList @@ -117,7 +117,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option [JsonPropertyName("ContainerList")] - public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new Option(value); } } + public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new(value); } } /// /// Used to track the state of SystemInfo @@ -130,7 +130,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option [JsonPropertyName("systemInfo")] - public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new Option(value); } } + public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } /// /// Used to track the state of PassBackObject @@ -144,7 +144,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new Option?>(value); } } + public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } /// /// Used to track the state of Dtc @@ -158,7 +158,7 @@ public TransactionProcessRequest(ProcessParams processParam, Option /// Digital Travel Credential (DTC-VC) data in base64 format for processing [JsonPropertyName("dtc")] - public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new Option(value); } } + public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs index fbd5375..ef0f83b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs @@ -60,7 +60,7 @@ public TransactionProcessResult(Option outData = default, Option [JsonPropertyName("OutData")] - public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new Option(value); } } + public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new(value); } } /// /// Used to track the state of InData @@ -73,7 +73,7 @@ public TransactionProcessResult(Option outData = default, Option [JsonPropertyName("InData")] - public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new Option(value); } } + public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new(value); } } /// /// Used to track the state of Tag @@ -86,7 +86,7 @@ public TransactionProcessResult(Option outData = default, Option [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new Option(value); } } + public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } /// /// Used to track the state of TransactionId @@ -99,7 +99,7 @@ public TransactionProcessResult(Option outData = default, Option [JsonPropertyName("transactionId")] - public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new Option(value); } } + public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs index db4a312..391ca74 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs @@ -67,7 +67,7 @@ public TrfFtString(string data, Option type = default, Option status /// Gets or Sets Type /// [JsonPropertyName("Type")] - public int? Type { get { return this.TypeOption; } set { this.TypeOption = new Option(value); } } + public int? Type { get { return this.TypeOption; } set { this.TypeOption = new(value); } } /// /// Used to track the state of Status @@ -81,7 +81,7 @@ public TrfFtString(string data, Option type = default, Option status /// /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification [JsonPropertyName("Status")] - public int? Status { get { return this.StatusOption; } set { this.StatusOption = new Option(value); } } + public int? Status { get { return this.StatusOption; } set { this.StatusOption = new(value); } } /// /// Used to track the state of Format @@ -95,7 +95,7 @@ public TrfFtString(string data, Option type = default, Option status /// /// Mask of format of text information (for example, «YYMMDD» for date of birth) [JsonPropertyName("Format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new Option(value); } } + public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs index dd86dc3..715c775 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs @@ -89,7 +89,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List /// Field data extracted from mrz(machine readable zone) [JsonPropertyName("Field_MRZ")] - public string? FieldMRZ { get { return this.FieldMRZOption; } set { this.FieldMRZOption = new Option(value); } } + public string? FieldMRZ { get { return this.FieldMRZOption; } set { this.FieldMRZOption = new(value); } } /// /// Used to track the state of FieldVisual @@ -103,7 +103,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List /// Field data extracted from visual zone [JsonPropertyName("Field_Visual")] - public string? FieldVisual { get { return this.FieldVisualOption; } set { this.FieldVisualOption = new Option(value); } } + public string? FieldVisual { get { return this.FieldVisualOption; } set { this.FieldVisualOption = new(value); } } /// /// Used to track the state of FieldBarcode @@ -117,7 +117,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List /// Field data extracted from barcode [JsonPropertyName("Field_Barcode")] - public string? FieldBarcode { get { return this.FieldBarcodeOption; } set { this.FieldBarcodeOption = new Option(value); } } + public string? FieldBarcode { get { return this.FieldBarcodeOption; } set { this.FieldBarcodeOption = new(value); } } /// /// Used to track the state of FieldRFID @@ -131,7 +131,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List /// Field data extracted from rfid chip [JsonPropertyName("Field_RFID")] - public string? FieldRFID { get { return this.FieldRFIDOption; } set { this.FieldRFIDOption = new Option(value); } } + public string? FieldRFID { get { return this.FieldRFIDOption; } set { this.FieldRFIDOption = new(value); } } /// /// Used to track the state of FieldType @@ -144,7 +144,7 @@ public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List [JsonPropertyName("FieldType")] - public int? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new Option(value); } } + public int? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs index 399b285..6b29d95 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs @@ -125,7 +125,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets FieldMask /// [JsonPropertyName("FieldMask")] - public string? FieldMask { get { return this.FieldMaskOption; } set { this.FieldMaskOption = new Option(value); } } + public string? FieldMask { get { return this.FieldMaskOption; } set { this.FieldMaskOption = new(value); } } /// /// Used to track the state of Validity @@ -138,7 +138,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets Validity /// [JsonPropertyName("Validity")] - public int? Validity { get { return this.ValidityOption; } set { this.ValidityOption = new Option(value); } } + public int? Validity { get { return this.ValidityOption; } set { this.ValidityOption = new(value); } } /// /// Used to track the state of InComparison @@ -151,7 +151,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets InComparison /// [JsonPropertyName("InComparison")] - public int? InComparison { get { return this.InComparisonOption; } set { this.InComparisonOption = new Option(value); } } + public int? InComparison { get { return this.InComparisonOption; } set { this.InComparisonOption = new(value); } } /// /// Used to track the state of WLCID @@ -164,7 +164,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets WLCID /// [JsonPropertyName("wLCID")] - public int? WLCID { get { return this.WLCIDOption; } set { this.WLCIDOption = new Option(value); } } + public int? WLCID { get { return this.WLCIDOption; } set { this.WLCIDOption = new(value); } } /// /// Used to track the state of Reserved2 @@ -177,7 +177,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets Reserved2 /// [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new Option(value); } } + public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } /// /// Used to track the state of Reserved3 @@ -190,7 +190,7 @@ public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string f /// Gets or Sets Reserved3 /// [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new Option(value); } } + public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj b/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj index 720c5e3..ccf9971 100644 --- a/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj +++ b/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj @@ -1,11 +1,11 @@  true - netstandard2.0 + net8.0 Alexander Satsukevich Regula Ltd. DocumentReader WebClient - regula document processing id card rfid ocr barcode ipi + Regula document processing id card rfid ocr barcode ipi Regula.DocumentReader.WebClient Regula.DocumentReader.WebClient 5.8.3 From 96846afcab21370578552342c48ee3d20c4e83b9 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Tue, 25 Mar 2025 17:36:38 +0300 Subject: [PATCH 06/12] Fix ext files --- generator-templates/Assembly.mustache | 1 + .../Api/DocumentReaderApi.cs | 98 +++++++++---------- .../Api/HealthcheckApi.cs | 2 +- .../Api/ProcessApi.cs | 2 +- .../Api/TransactionApi.cs | 2 +- .../Client/ApiException.cs | 2 +- .../Client/ApiResponse`1.cs | 2 +- .../Client/ClientUtils.cs | 3 +- .../Client/DateOnlyJsonConverter.cs | 2 +- .../Client/DateOnlyNullableJsonConverter.cs | 2 +- .../Client/DateTimeJsonConverter.cs | 2 +- .../Client/DateTimeNullableJsonConverter.cs | 2 +- .../Client/HostConfiguration.cs | 2 +- .../Client/Option.cs | 2 +- .../Client/RateLimitProvider`1.cs | 2 +- .../Client/TokenProvider`1.cs | 2 +- .../Extensions.cs | 21 ---- .../Extensions/IHostBuilderExtensions.cs | 2 +- .../IHttpClientBuilderExtensions.cs | 2 +- .../IServiceCollectionExtensions.cs | 2 +- .../Model/AreaArray.cs | 2 +- .../Model/AreaContainer.cs | 2 +- .../Model/AuthParams.cs | 2 +- .../Model/AuthenticityCheckList.cs | 2 +- .../Model/AuthenticityCheckListItem.cs | 2 +- .../Model/AuthenticityCheckResult.cs | 2 +- .../Model/AuthenticityCheckResultItem.cs | 2 +- .../Model/AuthenticityCheckResultListInner.cs | 2 +- .../Model/AuthenticityResult.cs | 2 +- .../Model/AuthenticityResultType.cs | 2 +- .../Model/BarCodeModuleType.cs | 2 +- .../Model/BarcodeType.cs | 2 +- .../Model/BcPDF417INFO.cs | 2 +- .../Model/BcROIDETECT.cs | 2 +- .../Model/BinaryData.cs | 2 +- .../Model/ByteArrayItem.cs | 2 +- .../Model/ByteArrayResult.cs | 2 +- .../Model/CandidatesListItem.cs | 2 +- .../Model/CertificateData.cs | 2 +- .../Model/CheckDiagnose.cs | 2 +- .../Model/CheckResult.cs | 2 +- .../Model/ChosenDocumentType.cs | 2 +- .../Model/ChosenDocumentTypeResult.cs | 2 +- .../Model/ContainerList.cs | 2 +- .../Model/ContainerListListInner.cs | 2 +- .../Model/Critical.cs | 2 +- .../Model/CrossSourceValueComparison.cs | 2 +- .../Model/DataModule.cs | 2 +- .../Model/DetailsOptical.cs | 2 +- .../Model/DetailsRFID.cs | 2 +- .../Model/DeviceInfo.cs | 2 +- .../Model/DocBarCodeInfo.cs | 2 +- .../Model/DocBarCodeInfoFieldsList.cs | 2 +- .../Model/DocBarCodeInfoItem.cs | 2 +- .../Model/DocGraphicsInfoItem.cs | 2 +- .../Model/DocVisualExtendedField.cs | 2 +- .../Model/DocVisualExtendedFieldItem.cs | 2 +- .../Model/DocVisualExtendedInfo.cs | 2 +- .../Model/DocVisualExtendedInfoItem.cs | 2 +- .../Model/DocumentBinaryInfoResult.cs | 2 +- .../Model/DocumentFormat.cs | 2 +- .../Model/DocumentImage.cs | 2 +- .../Model/DocumentImageResult.cs | 2 +- .../Model/DocumentPosition.cs | 2 +- .../Model/DocumentPositionItem.cs | 2 +- .../Model/DocumentPositionResult.cs | 2 +- .../Model/DocumentType.cs | 2 +- .../Model/DocumentTypeRecognitionResult.cs | 2 +- .../Model/DocumentTypesCandidates.cs | 2 +- .../Model/DocumentTypesCandidatesList.cs | 2 +- .../Model/DocumentTypesCandidatesResult.cs | 2 +- .../Model/DocumentsDatabase.cs | 2 +- .../Model/EncryptedRCLItem.cs | 4 +- .../Model/EncryptedRCLResult.cs | 4 +- .../Model/ErrorCoordinates.cs | 2 +- .../Model/Ext/Autheticity/Autheticity.cs | 12 +-- .../Model/Ext/ImageDataExt.cs | 5 +- .../Model/Ext/ImagesExtensions.cs | 4 +- .../Model/Ext/ImagesFieldExtensions.cs | 2 +- .../Model/Ext/ProcessRequestImage.cs | 5 +- .../Model/Ext/RecognitionParams.cs | 9 +- .../Model/Ext/RecognitionResponse.cs | 18 ++-- .../Model/Ext/TextExtensions.cs | 12 +-- .../Model/Ext/TextFieldExtensions.cs | 6 +- .../Model/FDSIDList.cs | 2 +- .../Model/FaceApi.cs | 2 +- .../Model/FaceApiSearch.cs | 2 +- .../Model/FaceDetection.cs | 2 +- .../Model/FaceDetectionItem.cs | 2 +- .../Model/FaceDetectionResult.cs | 2 +- .../Model/FaceItem.cs | 2 +- .../Model/FiberItem.cs | 2 +- .../Model/FiberResult.cs | 2 +- .../Model/FieldItem.cs | 2 +- .../Model/FileImage.cs | 2 +- .../Model/GetTransactionsByTagResponse.cs | 2 +- .../Model/GraphData.cs | 2 +- .../Model/GraphicField.cs | 2 +- .../Model/GraphicFieldType.cs | 2 +- .../Model/GraphicFieldsList.cs | 2 +- .../Model/GraphicsResult.cs | 2 +- .../Model/Healthcheck.cs | 2 +- .../Model/HealthcheckDocumentsDatabase.cs | 2 +- .../Model/IdentItem.cs | 2 +- .../Model/IdentResult.cs | 2 +- .../Model/ImageData.cs | 2 +- .../Model/ImageQA.cs | 2 +- .../Model/ImageQualityCheck.cs | 2 +- .../Model/ImageQualityCheckList.cs | 2 +- .../Model/ImageQualityCheckListItem.cs | 2 +- .../Model/ImageQualityCheckType.cs | 15 ++- .../Model/ImageQualityResult.cs | 2 +- .../Model/ImageTransactionData.cs | 2 +- .../Model/Images.cs | 2 +- .../Model/ImagesAvailableSource.cs | 2 +- .../Model/ImagesField.cs | 2 +- .../Model/ImagesFieldValue.cs | 2 +- .../Model/ImagesItem.cs | 2 +- .../Model/ImagesResult.cs | 2 +- .../Model/InData.cs | 2 +- .../InDataTransactionImagesFieldValue.cs | 2 +- .../Model/InDataVideo.cs | 2 +- .../Model/InputBarcodeType.cs | 2 +- .../Model/InputImageQualityChecks.cs | 18 +++- .../Model/LCID.cs | 2 +- .../Model/LexicalAnalysisResult.cs | 2 +- .../Model/LicenseItem.cs | 4 +- .../Model/LicenseResult.cs | 4 +- .../Model/Light.cs | 2 +- .../Model/ListTransactionsByTagResponse.cs | 2 +- .../Model/ListVerifiedFields.cs | 2 +- .../Model/ListVerifiedFieldsItem.cs | 2 +- .../Model/LivenessParams.cs | 2 +- .../Model/LogLevel.cs | 2 +- .../Model/MRZDetectorResult.cs | 2 +- .../Model/MRZFormat.cs | 2 +- .../Model/MRZPositionResult.cs | 2 +- .../Model/MRZRowsItem.cs | 2 +- .../Model/MRZTestQuality.cs | 2 +- .../Model/MRZTestQualityItem.cs | 2 +- .../Model/MRZTestQualityResult.cs | 2 +- .../Model/MeasureSystem.cs | 2 +- .../Model/MrzDetectModeEnum.cs | 2 +- .../Model/MrzPosition.cs | 2 +- .../Model/MrzPositionItem.cs | 2 +- .../Model/OCRSecurityTextItem.cs | 2 +- .../Model/OCRSecurityTextResult.cs | 2 +- .../Model/OneCandidate.cs | 2 +- .../Model/OneCandidateItem.cs | 2 +- .../Model/OriginalSymbol.cs | 2 +- .../Model/OutData.cs | 2 +- .../OutDataTransactionImagesFieldValue.cs | 2 +- .../Model/PArrayField.cs | 2 +- .../Model/ParsedData.cs | 2 +- .../Model/ParsingNotificationCodes.cs | 2 +- .../Model/PerDocumentConfig.cs | 2 +- .../Model/PhotoIdentItem.cs | 2 +- .../Model/PhotoIdentResult.cs | 2 +- .../Model/Point.cs | 2 +- .../Model/PointArray.cs | 2 +- .../Model/PointsContainer.cs | 2 +- .../Model/ProcessParams.cs | 2 +- .../Model/ProcessParamsRfid.cs | 2 +- .../Model/ProcessRequest.cs | 72 +++++++------- .../Model/ProcessRequestImage.cs | 2 +- .../Model/ProcessResponse.cs | 2 +- .../Model/ProcessSystemInfo.cs | 2 +- .../Model/ProcessingStatus.cs | 2 +- .../Model/RFIDDocVisualExtendedField.cs | 2 +- .../Model/RFIDDocVisualExtendedFieldItem.cs | 2 +- .../Model/RFIDDocVisualExtendedInfo.cs | 2 +- .../Model/RFIDDocVisualExtendedInfoItem.cs | 2 +- .../Model/RFIDErrorCodes.cs | 2 +- .../Model/RFIDGraphicsInfoResult.cs | 2 +- .../Model/RFIDPKDResourceType.cs | 2 +- .../Model/RFIDTextDataResult.cs | 2 +- .../Model/RawImageContainerItem.cs | 2 +- .../Model/RawImageContainerList.cs | 2 +- .../Model/RectangleCoordinates.cs | 2 +- .../Model/Result.cs | 2 +- .../Model/ResultItem.cs | 2 +- .../Model/ResultMRZDetector.cs | 2 +- .../Model/ResultMRZDetectorItem.cs | 2 +- .../Model/RfidAChip.cs | 2 +- .../Model/RfidAccessControlInfo.cs | 2 +- .../Model/RfidAccessControlProcedureType.cs | 2 +- .../Model/RfidAccessKey.cs | 2 +- .../Model/RfidApplication.cs | 2 +- .../Model/RfidApplicationType.cs | 2 +- .../Model/RfidAttributeData.cs | 2 +- .../Model/RfidAttributeName.cs | 2 +- .../Model/RfidAuthenticationProcedureType.cs | 2 +- .../Model/RfidBaudRate.cs | 2 +- .../Model/RfidCardPropertiesExt.cs | 2 +- .../Model/RfidCertificateEx.cs | 2 +- .../Model/RfidCertificateOrigin.cs | 2 +- .../Model/RfidCertificateType.cs | 2 +- .../Model/RfidDG1.cs | 2 +- .../Model/RfidDataFile.cs | 2 +- .../Model/RfidDataFileType.cs | 2 +- .../Model/RfidDataGroupTypeTag.cs | 2 +- .../Model/RfidDistinguishedName.cs | 2 +- .../Model/RfidLocation.cs | 2 +- .../Model/RfidOrigin.cs | 2 +- .../Model/RfidPasswordType.cs | 2 +- .../Model/RfidPkiExtension.cs | 2 +- .../Model/RfidRawData.cs | 2 +- .../Model/RfidSecurityObject.cs | 2 +- .../Model/RfidSessionData.cs | 2 +- .../Model/RfidSignerInfoEx.cs | 2 +- .../Model/RfidTerminal.cs | 2 +- .../Model/RfidTerminalType.cs | 2 +- .../Model/RfidType.cs | 2 +- .../Model/RfidValidity.cs | 2 +- .../Model/Scenario.cs | 2 +- .../Model/SecurityFeatureItem.cs | 2 +- .../Model/SecurityFeatureResult.cs | 2 +- .../Model/SecurityFeatureType.cs | 2 +- .../Model/SecurityObjectCertificates.cs | 2 +- .../Model/Source.cs | 2 +- .../Model/SourceValidity.cs | 2 +- .../Model/Status.cs | 2 +- .../Model/StatusItem.cs | 2 +- .../Model/StatusResult.cs | 2 +- .../Model/StringItem.cs | 2 +- .../Model/StringRecognitionResult.cs | 2 +- .../Model/Symbol.cs | 2 +- .../Model/SymbolCandidate.cs | 2 +- .../Model/SymbolEstimationItem.cs | 2 +- .../Model/SymbolRecognitionResult.cs | 2 +- .../Model/TDocBinaryInfo.cs | 2 +- .../Model/TDocBinaryInfoItem.cs | 2 +- .../Model/TOriginalRFIDGraphicsInfo.cs | 2 +- .../Model/TOriginalRFIDGraphicsInfoItem.cs | 2 +- .../Model/Text.cs | 2 +- .../Model/TextAvailableSource.cs | 2 +- .../Model/TextDataResult.cs | 2 +- .../Model/TextField.cs | 2 +- .../Model/TextFieldType.cs | 2 +- .../Model/TextFieldValue.cs | 2 +- .../Model/TextItem.cs | 2 +- .../Model/TextPostProcessing.cs | 2 +- .../Model/TextResult.cs | 2 +- .../Model/TransactionImage.cs | 2 +- .../Model/TransactionInfo.cs | 2 +- .../Model/TransactionProcessGetResponse.cs | 2 +- .../Model/TransactionProcessRequest.cs | 2 +- .../Model/TransactionProcessResult.cs | 2 +- .../Model/TrfFtBytes.cs | 2 +- .../Model/TrfFtString.cs | 2 +- .../Model/VerificationResult.cs | 2 +- .../Model/VerifiedFieldMap.cs | 2 +- .../Model/Visibility.cs | 2 +- .../Model/VisualExtendedFieldItem.cs | 2 +- .../Regula.DocumentReader.WebClient.csproj | 4 +- 255 files changed, 395 insertions(+), 394 deletions(-) create mode 100644 generator-templates/Assembly.mustache delete mode 100644 src/Regula.DocumentReader.WebClient/Extensions.cs diff --git a/generator-templates/Assembly.mustache b/generator-templates/Assembly.mustache new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/generator-templates/Assembly.mustache @@ -0,0 +1 @@ + diff --git a/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs b/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs index c1bdb62..1403aed 100644 --- a/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs @@ -1,7 +1,9 @@ using System; -using System.Collections.Generic; +using System.Net.Http; +using System.Text.Json; using System.Threading; using System.Threading.Tasks; +using Microsoft.Extensions.Logging; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; using Regula.DocumentReader.WebClient.Model.Ext; @@ -10,95 +12,87 @@ namespace Regula.DocumentReader.WebClient.Api { public class DocumentReaderApi { - private readonly DefaultApi _defaultApi; + private readonly HealthcheckApi _healthcheckApi; private readonly ProcessApi _processApi; public DocumentReaderApi(string basePath) { - this._defaultApi = new DefaultApi(basePath); - this._processApi = new ProcessApi(basePath); - } + var loggerFactory = LoggerFactory.Create(builder => + { + builder.AddConsole(); + }); - public Configuration Configuration - { - get => this._processApi.Configuration; - set => this._processApi.Configuration = value; - } + ILogger healthcheckLogger = loggerFactory.CreateLogger(); + ILogger processLogger = loggerFactory.CreateLogger(); - private string License { get; set; } + var httpClient = new HttpClient + { + BaseAddress = new Uri(basePath) + }; + var jsonSerializerOptionsProvider = new JsonSerializerOptionsProvider(new JsonSerializerOptions()); + var healthcheckApiEvents = new HealthcheckApiEvents(); + var processApiEvents = new ProcessApiEvents(); - public RecognitionResponse Process(ProcessRequest processRequest) - { - return Process(processRequest, new Dictionary(), default(string)); + this._healthcheckApi = new HealthcheckApi( + healthcheckLogger, + loggerFactory, + httpClient, + jsonSerializerOptionsProvider, + healthcheckApiEvents + ); + this._processApi = new ProcessApi( + processLogger, + loggerFactory, + httpClient, + jsonSerializerOptionsProvider, + processApiEvents + ); } - public RecognitionResponse Process(ProcessRequest processRequest, Dictionary headers) - { - return Process(processRequest, headers, default(string)); - } - - public RecognitionResponse Process(ProcessRequest processRequest, String xRequestID) - { - return Process(processRequest, new Dictionary(), xRequestID); - } - - public RecognitionResponse Process(ProcessRequest processRequest, Dictionary headers, String xRequestID) - { - if (processRequest.SystemInfo == null) - processRequest.SystemInfo = new ProcessSystemInfo(License); - else - processRequest.SystemInfo.License = License; - - return new RecognitionResponse(this._processApi.ApiProcessWithHttpInfo(processRequest, headers, xRequestID)); - } + private string License { get; set; } public async Task ProcessAsync(ProcessRequest processRequest) { - return await ProcessAsync(processRequest, new Dictionary(), default(string)); - } - - public async Task ProcessAsync(ProcessRequest processRequest, Dictionary headers) - { - return await ProcessAsync(processRequest, headers, default(string)); + return await ProcessAsync(processRequest); } public async Task ProcessAsync(ProcessRequest processRequest, String xRequestID) { - return await ProcessAsync(processRequest, new Dictionary(), xRequestID); + return await ProcessAsync(processRequest, xRequestID); } - public async Task ProcessAsync(ProcessRequest processRequest, Dictionary headers, String xRequestID, CancellationToken cancellationToken = default(CancellationToken)) + public async Task ProcessAsync(ProcessRequest processRequest, string xRequestID = default, CancellationToken cancellationToken = default) { if (processRequest.SystemInfo == null) processRequest.SystemInfo = new ProcessSystemInfo(License); else processRequest.SystemInfo.License = License; - var response = await this._processApi.ApiProcessWithHttpInfoAsync(processRequest, headers, xRequestID, cancellationToken); + var response = await this._processApi.ApiProcessAsync(processRequest, xRequestID, cancellationToken); return new RecognitionResponse(response); } - public DeviceInfo Ping(string xRequestID) + public async Task PingAsync(string xRequestID) { - return this._defaultApi.Ping(new Dictionary(), xRequestID); + return await this._healthcheckApi.PingAsync(xRequestID); } - public DeviceInfo Ping() + public async Task PingAsync() { - return this._defaultApi.Ping(new Dictionary()); + return await this._healthcheckApi.PingAsync(); } - - public DeviceInfo Ping(string xRequestID, Dictionary headers) + + public async Task HealthAsync(string xRequestID) { - return this._defaultApi.Ping(headers, xRequestID); + return await this._healthcheckApi.HealthzAsync(xRequestID); } - - public DeviceInfo Ping(Dictionary headers) + + public async Task HealthAsync() { - return this._defaultApi.Ping(headers); + return await this._healthcheckApi.HealthzAsync(); } public DocumentReaderApi WithLicense(string license) diff --git a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs index d7c12c4..23effea 100644 --- a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs index edfeb78..4425cc2 100644 --- a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs index b17cb8a..3ca53b0 100644 --- a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiException.cs b/src/Regula.DocumentReader.WebClient/Client/ApiException.cs index 06aa8cb..337fb8f 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ApiException.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ApiException.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs index 56b1e9a..33d5137 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs index 99eea23..4360de0 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -20,7 +20,6 @@ using Regula.DocumentReader.WebClient.Model; using System.Runtime.CompilerServices; -[assembly: InternalsVisibleTo("Regula.DocumentReader.WebClient.Test")] namespace Regula.DocumentReader.WebClient.Client { diff --git a/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs index f61b69f..6ca4176 100644 --- a/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs +++ b/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs index 0690193..6dc5543 100644 --- a/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs +++ b/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs index ebb5bfc..6257cf8 100644 --- a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs +++ b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs index 442c351..901a225 100644 --- a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs +++ b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs index 14b3cad..778fdbd 100644 --- a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs +++ b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/Option.cs b/src/Regula.DocumentReader.WebClient/Client/Option.cs index 51f31bb..bb5862a 100644 --- a/src/Regula.DocumentReader.WebClient/Client/Option.cs +++ b/src/Regula.DocumentReader.WebClient/Client/Option.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs index 43f0498..31dd6ba 100644 --- a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs +++ b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs b/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs index 4e7fd43..69436b7 100644 --- a/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs +++ b/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Extensions.cs b/src/Regula.DocumentReader.WebClient/Extensions.cs deleted file mode 100644 index 058ffb9..0000000 --- a/src/Regula.DocumentReader.WebClient/Extensions.cs +++ /dev/null @@ -1,21 +0,0 @@ -using System; -using System.Collections.Generic; - -namespace Regula.DocumentReader.WebClient -{ - public static class CollectionExtensions - { - public static Dictionary ToDictionarySafe(this IEnumerable collection, - Func keySelector, - Func elementSelector) - where TKey : notnull - { - var result = new Dictionary(); - foreach (var value in collection) - { - result[keySelector(value)] = elementSelector(value); - } - return result; - } - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs index f64bab7..e685f62 100644 --- a/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs index e77609e..d962506 100644 --- a/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs index a1df963..e9a776b 100644 --- a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs @@ -3,7 +3,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs b/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs index 5f7ccf3..5bfccb8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs b/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs index 71d4217..5c5844b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs index 0baa1f1..6b6cffa 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs index e1c9321..51d5c72 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs index 2c177a6..f1613ef 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs index beb02f1..95abfa4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs index bfe2d17..d8c86d5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs index f6bc892..f679247 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs index d71a2c0..b9f5787 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs index e25328d..d0420be 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs b/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs index ec85d28..abfb0d3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs b/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs index 91424a7..cfd3eae 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs b/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs index 9d3ae12..067ffb0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs b/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs index 316b691..d006a10 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs index 17c0b8d..7809099 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs b/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs index 5ef96ef..32e38dd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs index ad9ccf0..cc750da 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs index d9292b3..2784871 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs b/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs index 33098f1..4c34053 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs b/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs index e1deea9..441a770 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs index 2606426..b1c91c2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs index 844eccc..e541296 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs index 667a0c5..0fa4833 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs index 5ff2612..45add25 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs index 892a4d2..3e8cdc8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Critical.cs b/src/Regula.DocumentReader.WebClient/Model/Critical.cs index ee57b21..2aa8380 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Critical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Critical.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs b/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs index 7796e85..a7c9635 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs index 0bb73fe..cca0e3d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs index 515920d..6febc8a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs index a0e3739..3318145 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs index 3b94f7f..69a4273 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs index 9fabe37..854409c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs index a221f2e..910e307 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs index 12f15d1..f6af96e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs index bc6c03b..819dc7e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs index 0390a6a..b7d8c23 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs index 05e988b..e676e06 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs index 00c03d8..953cb3e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs index fc3700f..9f10efa 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs index 73b936f..18851df 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs index 037415f..c6dada2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs index 75b1b9c..823a232 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs index 9f8f4ed..472394e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs index a94a5de..0e948a7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs index 0ed6ba8..bb7b7ff 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs index 3ec35da..3df2c24 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs index f244415..fe5b52f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs index 8a38a06..ccb734d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs index c8a7e0d..c5238ff 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs index ff81ea6..dbc5edd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs index 7172940..9412cca 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs index 90a642a..a0bbcf4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index 3ff4d45..10dec06 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -47,7 +47,7 @@ public EncryptedRCLItem(byte[] encryptedRCL) /// Base64 encoded data /// /// Base64 encoded data - /* [B@59bfa4b2 */ + /* [B@4f262bf7 */ [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs index 37a9476..c67732d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -51,7 +51,7 @@ public EncryptedRCLResult(byte[] encryptedRCL, Option bufLength = default, /// Base64 encoded data /// /// Base64 encoded data - /* [B@59bfa4b2 */ + /* [B@4f262bf7 */ [JsonPropertyName("EncryptedRCL")] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs index 35d7905..05baa71 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/Autheticity.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/Autheticity.cs index 8d59238..6b563a5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/Autheticity.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/Autheticity.cs @@ -88,36 +88,36 @@ public static IdentChecks LetterScreenChecks(this AuthenticityCheckList auth) } - private static AuthenticityCheckResult resultByType(this AuthenticityCheckList auth, int type) + private static AuthenticityCheckResult resultByType(this AuthenticityCheckList auth, AuthenticityResultType type) { return auth?.List.FirstOrDefault(t => t.Type == type); } - private static FiberChecks filberOrNull(this AuthenticityCheckList auth, int type) + private static FiberChecks filberOrNull(this AuthenticityCheckList auth, AuthenticityResultType type) { AuthenticityCheckResult result = auth.resultByType(type); return result != null ? new FiberChecks(result) : null; } - private static IdentChecks identOrNull(this AuthenticityCheckList auth, int type) + private static IdentChecks identOrNull(this AuthenticityCheckList auth, AuthenticityResultType type) { AuthenticityCheckResult result = auth.resultByType(type); return result != null ? new IdentChecks(result) : null; } - private static ImageIdentChecks imageIdentOrNull(this AuthenticityCheckList auth, int type) + private static ImageIdentChecks imageIdentOrNull(this AuthenticityCheckList auth, AuthenticityResultType type) { AuthenticityCheckResult result = auth.resultByType(type); return result != null ? new ImageIdentChecks(result) : null; } - private static OCRSecurityTextChecks ocrSecurityTextOrNull(this AuthenticityCheckList auth, int type) + private static OCRSecurityTextChecks ocrSecurityTextOrNull(this AuthenticityCheckList auth, AuthenticityResultType type) { AuthenticityCheckResult result = auth.resultByType(type); return result != null ? new OCRSecurityTextChecks(result) : null; } - private static SecurityFeatureChecks securityFeatureOrNull(this AuthenticityCheckList auth, int type) + private static SecurityFeatureChecks securityFeatureOrNull(this AuthenticityCheckList auth, AuthenticityResultType type) { AuthenticityCheckResult result = auth.resultByType(type); return result != null ? new SecurityFeatureChecks(result) : null; diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/ImageDataExt.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/ImageDataExt.cs index c0022da..8e5e464 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/ImageDataExt.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/ImageDataExt.cs @@ -1,15 +1,12 @@ using System; -using System.Transactions; namespace Regula.DocumentReader.WebClient.Model.Ext { public class ImageDataExt : ImageData { public ImageDataExt(byte[] imageData) + : base(Convert.ToBase64String(imageData)) { - string base64Image = Convert.ToBase64String(imageData); - - Image = base64Image; } } } \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/ImagesExtensions.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/ImagesExtensions.cs index 55260e2..d5de775 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/ImagesExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/ImagesExtensions.cs @@ -4,7 +4,7 @@ namespace Regula.DocumentReader.WebClient.Model.Ext { public static class ImagesExtensions { - public static ImagesField GetField(this Images imgs, int fieldType) + public static ImagesField GetField(this Images imgs, GraphicFieldType fieldType) { foreach (var field in imgs.FieldList) { @@ -14,7 +14,7 @@ public static ImagesField GetField(this Images imgs, int fieldType) return null; } - public static List GetFields(this Images imgs, int fieldType) + public static List GetFields(this Images imgs, GraphicFieldType fieldType) { var fields = new List(); diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/ImagesFieldExtensions.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/ImagesFieldExtensions.cs index bc12879..73b27a9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/ImagesFieldExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/ImagesFieldExtensions.cs @@ -5,7 +5,7 @@ namespace Regula.DocumentReader.WebClient.Model.Ext { public static class ImagesFieldExtensions { - public static byte[] GetValue(this ImagesField field, string source, bool original = false) + public static byte[] GetValue(this ImagesField field, Source source, bool original = false) { string strResult; foreach (var value in field.ValueList) diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/ProcessRequestImage.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/ProcessRequestImage.cs index 7ba83a1..936676c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/ProcessRequestImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/ProcessRequestImage.cs @@ -6,7 +6,7 @@ namespace Regula.DocumentReader.WebClient.Model { public partial class ProcessRequestImage { - public ProcessRequestImage(byte[] image, int lightIndex = -1) + public ProcessRequestImage(byte[] image, Light lightIndex = Model.Light.WHITE) { if (image == null) { @@ -15,8 +15,7 @@ public ProcessRequestImage(byte[] image, int lightIndex = -1) ImageData = new ImageDataExt(image); - if (lightIndex >= 0) - Light = lightIndex; + Light = lightIndex; } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs index 7f9dcbd..bdcedf4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs @@ -5,11 +5,16 @@ namespace Regula.DocumentReader.WebClient.Model.Ext { public class RecognitionParams : ProcessParams { + public RecognitionParams(Scenario scenario) + : base(scenario) + { + } + public RecognitionParams WithCustomParams(Dictionary customParams){ CustomParams = customParams; return this; } - public RecognitionParams WithResultTypeOutput(List resultTypes) { + public RecognitionParams WithResultTypeOutput(List resultTypes) { ResultTypeOutput = resultTypes; return this; } @@ -25,7 +30,7 @@ public RecognitionParams WithFaceApi(string url) { return this; } - public RecognitionParams WithScenario(string scenario) + public RecognitionParams WithScenario(Scenario scenario) { Scenario = scenario; return this; diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs index 2a8705b..91e81f7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs @@ -3,22 +3,22 @@ using System.IO; using System.Text; using ICSharpCode.SharpZipLib.Zip.Compression.Streams; -using Regula.DocumentReader.WebClient.Client; +using Regula.DocumentReader.WebClient.Api; namespace Regula.DocumentReader.WebClient.Model.Ext { public class RecognitionResponse { - private readonly ApiResponse _apiResponse; + private readonly IApiProcessApiResponse _apiResponse; - public RecognitionResponse(ApiResponse apiResponse) + public RecognitionResponse(IApiProcessApiResponse apiResponse) { _apiResponse = apiResponse; } - public ProcessResponse OriginalResponse => this._apiResponse.Data; + public ProcessResponse OriginalResponse => this._apiResponse.Ok(); - public string Json => this._apiResponse.RawResponse; + // public string Json => this._apiResponse.RawResponse; public AuthenticityResult PortraitComparison() { @@ -80,11 +80,11 @@ public string Log() } } - public T ResultByType(int type, int? pageIdx=0) where T: ResultItem + public T ResultByType(Result type, int? pageIdx=0) where T: ResultItem { foreach(var item in OriginalResponse.ContainerList.List) { - if (item.ResultType == type) { + if (item.ResultType == (int)type) { if (pageIdx == null) return (T) item; @@ -97,12 +97,12 @@ public T ResultByType(int type, int? pageIdx=0) where T: ResultItem return default; } - public List ResultsByType(int type) where T: ResultItem + public List ResultsByType(Result type) where T: ResultItem { var results = new List(); foreach(var item in OriginalResponse.ContainerList.List) { - if (item.ResultType == type) { + if (item.ResultType == (int)type) { results.Add((T)item); } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/TextExtensions.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/TextExtensions.cs index b784da7..2a9250d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/TextExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/TextExtensions.cs @@ -3,7 +3,7 @@ namespace Regula.DocumentReader.WebClient.Model.Ext public static class TextExtensions { - public static TextField GetField(this Text txt, int fieldType) + public static TextField GetField(this Text txt, TextFieldType fieldType) { TextField result = null; foreach (var field in txt.FieldList) @@ -16,7 +16,7 @@ public static TextField GetField(this Text txt, int fieldType) return result; } - public static TextField GetField(this Text txt, int fieldType, int lcid) + public static TextField GetField(this Text txt, TextFieldType fieldType, LCID lcid) { foreach (var field in txt.FieldList) { @@ -39,7 +39,7 @@ public static TextField GetField(this Text txt, string fieldName) return result; } - public static TextField GetField(this Text txt, string fieldName, int lcid) + public static TextField GetField(this Text txt, string fieldName, LCID lcid) { foreach (var field in txt.FieldList) { @@ -49,12 +49,12 @@ public static TextField GetField(this Text txt, string fieldName, int lcid) return null; } - public static string GetFieldValue(this Text txt, int fieldType) + public static string GetFieldValue(this Text txt, TextFieldType fieldType) { return txt.GetField(fieldType)?.Value; } - public static string GetFieldValue(this Text txt, int fieldType, int lcid) + public static string GetFieldValue(this Text txt, TextFieldType fieldType, LCID lcid) { return txt.GetField(fieldType, lcid)?.Value; } @@ -64,7 +64,7 @@ public static string GetFieldValue(this Text txt, string fieldName) return txt.GetField(fieldName)?.Value; } - public static string GetFieldValue(this Text txt, string fieldName, int lcid) + public static string GetFieldValue(this Text txt, string fieldName, LCID lcid) { return txt.GetField(fieldName, lcid)?.Value; } diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/TextFieldExtensions.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/TextFieldExtensions.cs index 7734402..52a75db 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/TextFieldExtensions.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/TextFieldExtensions.cs @@ -2,7 +2,7 @@ namespace Regula.DocumentReader.WebClient.Model.Ext { public static class TextFieldExtensions { - public static string GetValue(this TextField field, string source, bool original = false) + public static string GetValue(this TextField field, Source source, bool original = false) { foreach (var value in field.ValueList) { @@ -19,7 +19,7 @@ public static string GetValue(this TextField field, string source, bool original return null; } - public static int SourceValidity(this TextField field, string source) + public static CheckResult SourceValidity(this TextField field, Source source) { foreach (var sourceValidity in field.ValidityList) { @@ -31,7 +31,7 @@ public static int SourceValidity(this TextField field, string source) return CheckResult.WAS_NOT_DONE; } - public static int CrossSourceComparison(this TextField field, string one, string other) + public static CheckResult CrossSourceComparison(this TextField field, Source one, Source other) { foreach (var comparison in field.ComparisonList) { diff --git a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs index 2f9fdb5..e7648d8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs index 3f1a3c1..26b7ce2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs index 383ffab..549e4a0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs index 8c4e7f7..4849918 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs index 1f3c497..24c1026 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs index e06329d..c2c23f8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs b/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs index 49814f2..34a1f61 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs index 01c92bb..6724d03 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs index 67bbb1b..20458d8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs index 9ea294f..7d09f9b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/FileImage.cs b/src/Regula.DocumentReader.WebClient/Model/FileImage.cs index 817a8f3..a10b893 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FileImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FileImage.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs index 4e1e245..44604b2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphData.cs b/src/Regula.DocumentReader.WebClient/Model/GraphData.cs index 3e8a007..dfb96c5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs index b07f80d..4c27811 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs index 9cf86cf..84ace81 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs index e80c943..d9d3328 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs index 2a7ff7b..74cfbec 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs index 0f075b6..1c5a830 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs index 71690ca..2a022ef 100644 --- a/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs index 99bb4ef..b96d4a9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs index 725d30f..4e481ed 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs index 6d45c03..905a2af 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs index 1d89d05..63af573 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs index 7cdbbf7..0afc0eb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs index 706eb91..19e8245 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs index 56af399..70a6398 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs index 2200271..d77a699 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -69,7 +69,12 @@ public enum ImageQualityCheckType /// /// Enum Brightness for value: 9 /// - Brightness = 9 + Brightness = 9, + + /// + /// Enum Occlusion for value: 10 + /// + Occlusion = 10 } /// @@ -108,6 +113,9 @@ public static ImageQualityCheckType FromString(string value) if (value.Equals((9).ToString())) return ImageQualityCheckType.Brightness; + if (value.Equals((10).ToString())) + return ImageQualityCheckType.Occlusion; + throw new NotImplementedException($"Could not convert value to type ImageQualityCheckType: '{value}'"); } @@ -142,6 +150,9 @@ public static ImageQualityCheckType FromString(string value) if (value.Equals((9).ToString())) return ImageQualityCheckType.Brightness; + if (value.Equals((10).ToString())) + return ImageQualityCheckType.Occlusion; + return null; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs index bf34467..65bb1a3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs index 3ef3636..1b45990 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Images.cs b/src/Regula.DocumentReader.WebClient/Model/Images.cs index 170165c..cb16dfb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Images.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Images.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs index f27b7e5..32c907e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs index ee67470..be72291 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs index b9d189e..6172ef6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs index 0acfaf9..42bf460 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs index 50c8411..2ff4425 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/InData.cs b/src/Regula.DocumentReader.WebClient/Model/InData.cs index a9fe4ff..ea83ada 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs index 44608d5..4a20702 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs index d1199d6..c62df4e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs b/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs index c1e241e..7327546 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs b/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs index 7b08493..fbbbb5b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -69,7 +69,12 @@ public enum InputImageQualityChecks /// /// Enum Brightness for value: brightnessCheck /// - Brightness = 8 + Brightness = 8, + + /// + /// Enum Occlusion for value: occlusionCheck + /// + Occlusion = 9 } /// @@ -108,6 +113,9 @@ public static InputImageQualityChecks FromString(string value) if (value.Equals("brightnessCheck")) return InputImageQualityChecks.Brightness; + if (value.Equals("occlusionCheck")) + return InputImageQualityChecks.Occlusion; + throw new NotImplementedException($"Could not convert value to type InputImageQualityChecks: '{value}'"); } @@ -142,6 +150,9 @@ public static InputImageQualityChecks FromString(string value) if (value.Equals("brightnessCheck")) return InputImageQualityChecks.Brightness; + if (value.Equals("occlusionCheck")) + return InputImageQualityChecks.Occlusion; + return null; } @@ -177,6 +188,9 @@ public static string ToJsonValue(InputImageQualityChecks value) if (value == InputImageQualityChecks.Brightness) return "brightnessCheck"; + if (value == InputImageQualityChecks.Occlusion) + return "occlusionCheck"; + throw new NotImplementedException($"Value could not be handled: '{value}'"); } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LCID.cs b/src/Regula.DocumentReader.WebClient/Model/LCID.cs index ea53b31..ce91841 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LCID.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LCID.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs index 1ee1564..a510f8e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs index 91b79bb..9694fed 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -47,7 +47,7 @@ public LicenseItem(byte[] license) /// Base64 encoded data /// /// Base64 encoded data - /* [B@5eefd7ba */ + /* [B@32eb43ed */ [JsonPropertyName("License")] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs index 50df967..f6f9bed 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -51,7 +51,7 @@ public LicenseResult(byte[] license, Option bufLength = default, Option /// Base64 encoded data - /* [B@5eefd7ba */ + /* [B@32eb43ed */ [JsonPropertyName("License")] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/Light.cs b/src/Regula.DocumentReader.WebClient/Model/Light.cs index 4b91194..d200256 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Light.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Light.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs index 3f8802e..6442468 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs index 98c965f..5534029 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs index cab4ad2..275d968 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs index 7c27597..0f76fe7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs b/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs index 9f305c8..f7ccfe5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs index 2142d45..e8f784c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs b/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs index 86652d3..cf9f4c1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs index 112b0ac..8e14a48 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs b/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs index bd76f83..00ba465 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs index efd4469..1ed4da6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs index d2cda30..7253b37 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs index 8a4a749..f42e9db 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs b/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs index 046f1b2..c871ac9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs b/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs index 177cf92..276c73c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs index cba74cc..0b78e6d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs index 2f0c495..e09d15a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs index c572b0a..170fb45 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs index f71b39c..3a45df7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs index ffd9292..7a1e863 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs index faa4fb4..60f9e11 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs index 70243c9..dc6baaf 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/OutData.cs b/src/Regula.DocumentReader.WebClient/Model/OutData.cs index 4f32df5..f6c92f7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs index 247bf32..4b930b4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs index c1387e5..bb77a6e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs index 6fe6250..0451b48 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs b/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs index 35585df..a2f126b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs index b897f5f..d55b378 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs index 1fa1fcf..4c71794 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs index 4c1247c..75b3bed 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Point.cs b/src/Regula.DocumentReader.WebClient/Model/Point.cs index eacbedb..9125c72 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Point.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Point.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/PointArray.cs b/src/Regula.DocumentReader.WebClient/Model/PointArray.cs index ac65367..342b781 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointArray.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointArray.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs index 4bd34fb..aa5b7b4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index 19f0a39..94ba98a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs index 45c652d..c97241b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs index 7e8b2bc..88c03f0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ @@ -34,7 +34,6 @@ public partial class ProcessRequest : IValidatableObject /// Initializes a new instance of the class. /// /// processParam - /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. /// list /// Session ID /// Customer name @@ -46,11 +45,11 @@ public partial class ProcessRequest : IValidatableObject /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. /// Digital Travel Credential (DTC-VC) data in base64 format for processing /// URLs to the document images for processing. + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. [JsonConstructor] - public ProcessRequest(ProcessParams processParam, Option?> lcidFilter = default, Option?> list = default, Option tag = default, Option tenant = default, Option env = default, Option livePortrait = default, Option extPortrait = default, Option containerList = default, Option systemInfo = default, Option?> passBackObject = default, Option dtc = default, Option?> imageUrls = default) + public ProcessRequest(ProcessParams processParam, Option?> list = default, Option tag = default, Option tenant = default, Option env = default, Option livePortrait = default, Option extPortrait = default, Option containerList = default, Option systemInfo = default, Option?> passBackObject = default, Option dtc = default, Option?> imageUrls = default, Option?> lcidFilter = default) { ProcessParam = processParam; - LcidFilterOption = lcidFilter; ListOption = list; TagOption = tag; TenantOption = tenant; @@ -62,6 +61,7 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter PassBackObjectOption = passBackObject; DtcOption = dtc; ImageUrlsOption = imageUrls; + LcidFilterOption = lcidFilter; OnCreated(); } @@ -73,20 +73,6 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter [JsonPropertyName("processParam")] public ProcessParams ProcessParam { get; set; } - /// - /// Used to track the state of LcidFilter - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> LcidFilterOption { get; private set; } - - /// - /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. - /// - /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. - [JsonPropertyName("lcidFilter")] - public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } - /// /// Used to track the state of List /// @@ -240,6 +226,20 @@ public ProcessRequest(ProcessParams processParam, Option?> lcidFilter [JsonPropertyName("ImageUrls")] public List? ImageUrls { get { return this.ImageUrlsOption; } set { this.ImageUrlsOption = new(value); } } + /// + /// Used to track the state of LcidFilter + /// + [JsonIgnore] + [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] + public Option?> LcidFilterOption { get; private set; } + + /// + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. + /// + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. + [JsonPropertyName("lcidFilter")] + public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } + /// /// Returns the string presentation of the object /// @@ -249,7 +249,6 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ProcessRequest {\n"); sb.Append(" ProcessParam: ").Append(ProcessParam).Append("\n"); - sb.Append(" LcidFilter: ").Append(LcidFilter).Append("\n"); sb.Append(" List: ").Append(List).Append("\n"); sb.Append(" Tag: ").Append(Tag).Append("\n"); sb.Append(" Tenant: ").Append(Tenant).Append("\n"); @@ -261,6 +260,7 @@ public override string ToString() sb.Append(" PassBackObject: ").Append(PassBackObject).Append("\n"); sb.Append(" Dtc: ").Append(Dtc).Append("\n"); sb.Append(" ImageUrls: ").Append(ImageUrls).Append("\n"); + sb.Append(" LcidFilter: ").Append(LcidFilter).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -299,7 +299,6 @@ public override ProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type type JsonTokenType startingTokenType = utf8JsonReader.TokenType; Option processParam = default; - Option?> lcidFilter = default; Option?> list = default; Option tag = default; Option tenant = default; @@ -311,6 +310,7 @@ public override ProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type type Option?> passBackObject = default; Option dtc = default; Option?> imageUrls = default; + Option?> lcidFilter = default; while (utf8JsonReader.Read()) { @@ -331,10 +331,6 @@ public override ProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type type if (utf8JsonReader.TokenType != JsonTokenType.Null) processParam = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); break; - case "lcidFilter": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - lcidFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; case "List": if (utf8JsonReader.TokenType != JsonTokenType.Null) list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); @@ -373,6 +369,10 @@ public override ProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type type if (utf8JsonReader.TokenType != JsonTokenType.Null) imageUrls = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); break; + case "lcidFilter": + if (utf8JsonReader.TokenType != JsonTokenType.Null) + lcidFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); + break; default: break; } @@ -385,9 +385,6 @@ public override ProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type type if (processParam.IsSet && processParam.Value == null) throw new ArgumentNullException(nameof(processParam), "Property is not nullable for class ProcessRequest."); - if (lcidFilter.IsSet && lcidFilter.Value == null) - throw new ArgumentNullException(nameof(lcidFilter), "Property is not nullable for class ProcessRequest."); - if (list.IsSet && list.Value == null) throw new ArgumentNullException(nameof(list), "Property is not nullable for class ProcessRequest."); @@ -421,7 +418,10 @@ public override ProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type type if (imageUrls.IsSet && imageUrls.Value == null) throw new ArgumentNullException(nameof(imageUrls), "Property is not nullable for class ProcessRequest."); - return new ProcessRequest(processParam.Value!, lcidFilter, list, tag, tenant, env, livePortrait, extPortrait, containerList, systemInfo, passBackObject, dtc, imageUrls); + if (lcidFilter.IsSet && lcidFilter.Value == null) + throw new ArgumentNullException(nameof(lcidFilter), "Property is not nullable for class ProcessRequest."); + + return new ProcessRequest(processParam.Value!, list, tag, tenant, env, livePortrait, extPortrait, containerList, systemInfo, passBackObject, dtc, imageUrls, lcidFilter); } /// @@ -451,9 +451,6 @@ public void WriteProperties(Utf8JsonWriter writer, ProcessRequest processRequest if (processRequest.ProcessParam == null) throw new ArgumentNullException(nameof(processRequest.ProcessParam), "Property is required for class ProcessRequest."); - if (processRequest.LcidFilterOption.IsSet && processRequest.LcidFilter == null) - throw new ArgumentNullException(nameof(processRequest.LcidFilter), "Property is required for class ProcessRequest."); - if (processRequest.ListOption.IsSet && processRequest.List == null) throw new ArgumentNullException(nameof(processRequest.List), "Property is required for class ProcessRequest."); @@ -487,13 +484,11 @@ public void WriteProperties(Utf8JsonWriter writer, ProcessRequest processRequest if (processRequest.ImageUrlsOption.IsSet && processRequest.ImageUrls == null) throw new ArgumentNullException(nameof(processRequest.ImageUrls), "Property is required for class ProcessRequest."); + if (processRequest.LcidFilterOption.IsSet && processRequest.LcidFilter == null) + throw new ArgumentNullException(nameof(processRequest.LcidFilter), "Property is required for class ProcessRequest."); + writer.WritePropertyName("processParam"); JsonSerializer.Serialize(writer, processRequest.ProcessParam, jsonSerializerOptions); - if (processRequest.LcidFilterOption.IsSet) - { - writer.WritePropertyName("lcidFilter"); - JsonSerializer.Serialize(writer, processRequest.LcidFilter, jsonSerializerOptions); - } if (processRequest.ListOption.IsSet) { writer.WritePropertyName("List"); @@ -537,6 +532,11 @@ public void WriteProperties(Utf8JsonWriter writer, ProcessRequest processRequest writer.WritePropertyName("ImageUrls"); JsonSerializer.Serialize(writer, processRequest.ImageUrls, jsonSerializerOptions); } + if (processRequest.LcidFilterOption.IsSet) + { + writer.WritePropertyName("lcidFilter"); + JsonSerializer.Serialize(writer, processRequest.LcidFilter, jsonSerializerOptions); + } } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs index 76f0632..78210c7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs index 884bb83..8673324 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs index 5513997..536efcb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs index f2ea7dd..719ded0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs index 9c20e6b..c481e89 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs index 812377d..3857dd8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs index 16ddf23..75b067f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs index bc8d2da..b456a27 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs index 8cf8e23..5d7f8b3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs index 7280761..a301478 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs index 0cb9759..b817f7e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs index 08e2b43..575f4d3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs index 01e7fe9..69952fb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs index 5fe323d..ee8f1ec 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs index f68eec0..4d8e6ec 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Result.cs b/src/Regula.DocumentReader.WebClient/Model/Result.cs index cd324cb..9931466 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Result.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Result.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs index d85526b..f13888b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs index af98515..4eca59c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs index 2c2a489..93c6120 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs index cbb8b57..4f49783 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs index 20253fe..c47fe22 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs index 3a36a1a..cd2ee3a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs index 09241c5..818106e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs b/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs index 9675a2c..a456c9a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs index 7d18c08..a485577 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs index 2b86822..f5d3218 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs index 879bb5d..a427dae 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs index 4905b84..3d31e8b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs b/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs index 6035207..1c58ef0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs index bf61f9c..e568a90 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs index 65978ed..2383eda 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs index e56b95f..1479bf8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs index c7934bb..c6143d7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs index 547f0f7..d548e77 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs index b7220af..4768fd1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs index 827d29c..a386c37 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs index e218f81..bf3e0ea 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs index 556dd46..8a047ac 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs b/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs index aafa6c3..b59b90a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs b/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs index 95065b3..6065d01 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs index 8a4c802..5fb76db 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs b/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs index 837c834..f960b51 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs index 3e5be98..2dc56db 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs index 7adc7fa..6bd154e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs index c296f1c..b6a0b46 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs index 1813861..e6539fc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs b/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs index 300a6c2..7da0cb7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs index 8b4950a..bb8206d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidType.cs index 9adb893..9361a75 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs b/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs index beae917..ed6187b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Scenario.cs b/src/Regula.DocumentReader.WebClient/Model/Scenario.cs index e2b9e9f..03f83c5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Scenario.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Scenario.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs index b8443cb..aaf2ccd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs index 3d240bd..ae8bf9d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs index 234ef8b..28d9abe 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs index a6d696c..d0c4667 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Source.cs b/src/Regula.DocumentReader.WebClient/Model/Source.cs index a76e084..8506a5a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Source.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Source.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs b/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs index 7398232..a1c46a6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Status.cs b/src/Regula.DocumentReader.WebClient/Model/Status.cs index ed7e5de..296d29d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Status.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Status.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs b/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs index 8b1dca6..dd65757 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs index 8b71e45..de7aea1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/StringItem.cs b/src/Regula.DocumentReader.WebClient/Model/StringItem.cs index f7e549d..055563a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StringItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StringItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs index ac331d3..a053f91 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Symbol.cs b/src/Regula.DocumentReader.WebClient/Model/Symbol.cs index 26a6b5e..18dab18 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Symbol.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Symbol.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs index 4ef6923..c96b981 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs index 7faa19a..f135e4a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs index 75ec95c..516f5ac 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs index 825b6ff..f41a0fc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs index 11a5417..0ba7b12 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs index 7a18e9a..4b5d25c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs index 111123b..1e3cfca 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Text.cs b/src/Regula.DocumentReader.WebClient/Model/Text.cs index ac9a1ae..eac2aef 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Text.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Text.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs index 1d956e8..33f7046 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs index 74b321e..c6bf688 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TextField.cs b/src/Regula.DocumentReader.WebClient/Model/TextField.cs index 1d38006..a013eb5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextField.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs index 201fdfb..16a96f3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs index 897876c..a65d57f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TextItem.cs b/src/Regula.DocumentReader.WebClient/Model/TextItem.cs index e6e5df4..cb055ad 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs b/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs index 61f4d5d..7e2d66f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs index fd524ba..053ffef 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs index 6cc8b3e..50df3c5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs index 57457eb..0402e4f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs index ce230ed..2e6c560 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs index 9d38f7d..382d6cc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs index ef0f83b..b331490 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs index 066dd45..edc95a2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs index 391ca74..8c702cf 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs b/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs index faabda3..e3c5ad1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs index 715c775..19b523e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/Visibility.cs b/src/Regula.DocumentReader.WebClient/Model/Visibility.cs index dfac4bb..80acfb5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Visibility.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Visibility.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs index 6b29d95..d889cbb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs @@ -4,7 +4,7 @@ * * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core * - * The version of the OpenAPI document: 7.4.0 + * The version of the OpenAPI document: 7.6.0 * Generated by: https://github.com/openapitools/openapi-generator.git */ diff --git a/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj b/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj index ccf9971..d711bb2 100644 --- a/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj +++ b/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj @@ -5,7 +5,7 @@ Alexander Satsukevich Regula Ltd. DocumentReader WebClient - Regula document processing id card rfid ocr barcode ipi + Regula document processing ID card RFID OCR barcode IPI Regula.DocumentReader.WebClient Regula.DocumentReader.WebClient 5.8.3 @@ -21,5 +21,7 @@ + + \ No newline at end of file From 720841fa73d800ae6198fe2ae8b0099ce9a85e3d Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Wed, 26 Mar 2025 11:27:34 +0300 Subject: [PATCH 07/12] Update library, models, settings --- .openapi-generator/FILES | 36 +- csharp-generator-config.json | 1 + generator-templates/Assembly.mustache | 1 - generator-templates/JsonConverter.mustache | 647 --- generator-templates/modelGeneric.mustache | 393 -- .../Api/DocumentReaderApi.cs | 94 +- .../Api/HealthcheckApi.cs | 1046 ++--- .../Api/IApi.cs | 15 - .../Api/ProcessApi.cs | 538 +-- .../Api/TransactionApi.cs | 2087 +++------ .../Client/ApiClient.cs | 788 ++++ .../Client/ApiException.cs | 52 +- .../Client/ApiFactory.cs | 49 - .../Client/ApiResponse.cs | 166 + .../Client/ApiResponseEventArgs.cs | 24 - .../Client/ApiResponse`1.cs | 192 - .../Client/ClientUtils.cs | 334 +- .../Client/Configuration.cs | 624 +++ .../Client/CookieContainer.cs | 20 - .../Client/DateOnlyJsonConverter.cs | 61 - .../Client/DateOnlyNullableJsonConverter.cs | 66 - .../Client/DateTimeJsonConverter.cs | 75 - .../Client/DateTimeNullableJsonConverter.cs | 80 - .../Client/ExceptionEventArgs.cs | 24 - .../Client/ExceptionFactory.cs | 22 + .../Client/FileParameter.cs | 80 + .../Client/GlobalConfiguration.cs | 67 + .../Client/HostConfiguration.cs | 407 -- .../Client/IApiAccessor.cs | 37 + .../Client/IAsynchronousClient.cs | 100 + .../Client/IReadableConfiguration.cs | 141 + .../Client/ISynchronousClient.cs | 93 + .../Client/JsonSerializerOptionsProvider.cs | 27 - .../Client/Multimap.cs | 295 ++ .../Client/OpenAPIDateConverter.cs | 29 + .../Client/Option.cs | 53 - .../Client/RateLimitProvider`1.cs | 56 - .../Client/RequestOptions.cs | 74 + .../Client/RetryConfiguration.cs | 31 + .../Client/TokenBase.cs | 71 - .../Client/TokenContainer`1.cs | 37 - .../Client/TokenProvider`1.cs | 44 - .../Client/WebRequestPathBuilder.cs | 53 + .../Extensions/IHostBuilderExtensions.cs | 59 - .../IHttpClientBuilderExtensions.cs | 79 - .../IServiceCollectionExtensions.cs | 73 - .../Model/AbstractOpenAPISchema.cs | 76 + .../Model/AreaArray.cs | 178 +- .../Model/AreaContainer.cs | 178 +- .../Model/AuthParams.cs | 520 +-- .../Model/AuthenticityCheckList.cs | 151 +- .../Model/AuthenticityCheckListItem.cs | 132 +- .../Model/AuthenticityCheckResult.cs | 213 +- .../Model/AuthenticityCheckResultItem.cs | 312 +- .../Model/AuthenticityCheckResultListInner.cs | 658 ++- .../Model/AuthenticityResult.cs | 196 +- .../Model/AuthenticityResultType.cs | 286 +- .../Model/BarCodeModuleType.cs | 154 +- .../Model/BarcodeType.cs | 250 +- .../Model/BcPDF417INFO.cs | 218 +- .../Model/BcROIDETECT.cs | 180 +- .../Model/BinaryData.cs | 2084 ++------- .../Model/ByteArrayItem.cs | 130 +- .../Model/ByteArrayResult.cs | 195 +- .../Model/CandidatesListItem.cs | 131 +- .../Model/CertificateData.cs | 156 +- .../Model/CheckDiagnose.cs | 874 +--- .../Model/CheckResult.cs | 142 +- .../Model/ChosenDocumentType.cs | 370 +- .../Model/ChosenDocumentTypeResult.cs | 228 +- .../Model/ContainerList.cs | 167 +- .../Model/ContainerListListInner.cs | 1746 ++++---- .../Model/Critical.cs | 136 +- .../Model/CrossSourceValueComparison.cs | 177 +- .../Model/DataModule.cs | 234 +- .../Model/DetailsOptical.cs | 306 +- .../Model/DetailsRFID.cs | 261 +- .../Model/DeviceInfo.cs | 273 +- .../Model/DocBarCodeInfo.cs | 196 +- .../Model/DocBarCodeInfoFieldsList.cs | 151 +- .../Model/DocBarCodeInfoItem.cs | 132 +- .../Model/DocGraphicsInfoItem.cs | 132 +- .../Model/DocVisualExtendedField.cs | 323 +- .../Model/DocVisualExtendedFieldItem.cs | 132 +- .../Model/DocVisualExtendedInfo.cs | 151 +- .../Model/DocVisualExtendedInfoItem.cs | 132 +- .../Model/DocumentBinaryInfoResult.cs | 196 +- .../Model/DocumentFormat.cs | 208 +- .../Model/DocumentImage.cs | 162 +- .../Model/DocumentImageResult.cs | 196 +- .../Model/DocumentPosition.cs | 476 +- .../Model/DocumentPositionItem.cs | 132 +- .../Model/DocumentPositionResult.cs | 196 +- .../Model/DocumentType.cs | 1504 +------ .../Model/DocumentTypeRecognitionResult.cs | 142 +- .../Model/DocumentTypesCandidates.cs | 166 +- .../Model/DocumentTypesCandidatesList.cs | 166 +- .../Model/DocumentTypesCandidatesResult.cs | 197 +- .../Model/DocumentsDatabase.cs | 211 +- .../Model/EncryptedRCLItem.cs | 136 +- .../Model/EncryptedRCLResult.cs | 200 +- .../Model/ErrorCoordinates.cs | 203 +- .../Ext/Autheticity/AuthenticityResult.cs | 5 +- .../Model/Ext/Autheticity/Autheticity.cs | 4 +- .../Model/Ext/Autheticity/FiberChecks.cs | 6 +- .../Model/Ext/Autheticity/IdentChecks.cs | 4 +- .../Model/Ext/Autheticity/ImageIdentChecks.cs | 6 +- .../Ext/Autheticity/OCRSecurityTextChecks.cs | 6 +- .../Ext/Autheticity/SecurityFeatureChecks.cs | 4 +- .../Model/Ext/ImageDataExt.cs | 4 +- .../Model/Ext/RecognitionParams.cs | 6 - .../Model/Ext/RecognitionResponse.cs | 10 +- .../Model/FDSIDList.cs | 426 +- .../Model/FaceApi.cs | 408 +- .../Model/FaceApiSearch.cs | 183 +- .../Model/FaceDetection.cs | 221 +- .../Model/FaceDetectionItem.cs | 132 +- .../Model/FaceDetectionResult.cs | 196 +- .../Model/FaceItem.cs | 292 +- .../Model/FiberItem.cs | 356 +- .../Model/FiberResult.cs | 410 +- .../Model/FieldItem.cs | 218 +- .../Model/FileImage.cs | 149 +- .../Model/GetTransactionsByTagResponse.cs | 182 +- .../Model/GraphData.cs | 245 +- .../Model/GraphicField.cs | 216 +- .../Model/GraphicFieldType.cs | 286 +- .../Model/GraphicFieldsList.cs | 150 +- .../Model/GraphicsResult.cs | 196 +- .../Model/Healthcheck.cs | 350 +- .../Model/HealthcheckDocumentsDatabase.cs | 204 +- .../Model/IdentItem.cs | 277 +- .../Model/IdentResult.cs | 331 +- .../Model/ImageData.cs | 162 +- .../Model/ImageQA.cs | 339 +- .../Model/ImageQualityCheck.cs | 276 +- .../Model/ImageQualityCheckList.cs | 181 +- .../Model/ImageQualityCheckListItem.cs | 132 +- .../Model/ImageQualityCheckType.cs | 178 +- .../Model/ImageQualityResult.cs | 196 +- .../Model/ImageTransactionData.cs | 131 +- .../Model/Images.cs | 230 +- .../Model/ImagesAvailableSource.cs | 156 +- .../Model/ImagesField.cs | 214 +- .../Model/ImagesFieldValue.cs | 353 +- .../Model/ImagesItem.cs | 132 +- .../Model/ImagesResult.cs | 196 +- .../Model/InData.cs | 162 +- .../InDataTransactionImagesFieldValue.cs | 214 +- .../Model/InDataVideo.cs | 158 +- .../Model/InputBarcodeType.cs | 325 +- .../Model/InputImageQualityChecks.cs | 215 +- .../Model/LCID.cs | 1120 +---- .../Model/LexicalAnalysisResult.cs | 196 +- .../Model/LicenseItem.cs | 136 +- .../Model/LicenseResult.cs | 200 +- .../Model/Light.cs | 376 +- .../Model/ListTransactionsByTagResponse.cs | 162 +- .../Model/ListVerifiedFields.cs | 178 +- .../Model/ListVerifiedFieldsItem.cs | 132 +- .../Model/LivenessParams.cs | 255 +- .../Model/LogLevel.cs | 175 +- .../Model/MRZDetectorResult.cs | 196 +- .../Model/MRZFormat.cs | 185 +- .../Model/MRZPositionResult.cs | 196 +- .../Model/MRZRowsItem.cs | 170 +- .../Model/MRZTestQuality.cs | 302 +- .../Model/MRZTestQualityItem.cs | 132 +- .../Model/MRZTestQualityResult.cs | 196 +- .../Model/MeasureSystem.cs | 136 +- .../Model/MrzDetectModeEnum.cs | 142 +- .../Model/MrzPosition.cs | 476 +- .../Model/MrzPositionItem.cs | 132 +- .../Model/OCRSecurityTextItem.cs | 371 +- .../Model/OCRSecurityTextResult.cs | 425 +- .../Model/OneCandidate.cs | 370 +- .../Model/OneCandidateItem.cs | 163 +- .../Model/OriginalSymbol.cs | 174 +- .../Model/OutData.cs | 159 +- .../OutDataTransactionImagesFieldValue.cs | 243 +- .../Model/PArrayField.cs | 364 +- .../Model/ParsedData.cs | 131 +- .../Model/ParsingNotificationCodes.cs | 1456 +----- .../Model/PerDocumentConfig.cs | 160 +- .../Model/PhotoIdentItem.cs | 403 +- .../Model/PhotoIdentResult.cs | 457 +- .../Model/Point.cs | 142 +- .../Model/PointArray.cs | 132 +- .../Model/PointsContainer.cs | 165 +- .../Model/ProcessParams.cs | 1759 ++------ .../Model/ProcessParamsRfid.cs | 131 +- .../Model/ProcessRequest.cs | 494 +- .../Model/ProcessRequestImage.cs | 191 +- .../Model/ProcessResponse.cs | 387 +- .../Model/ProcessSystemInfo.cs | 155 +- .../Model/ProcessingStatus.cs | 142 +- .../Model/RFIDDocVisualExtendedField.cs | 394 +- .../Model/RFIDDocVisualExtendedFieldItem.cs | 202 +- .../Model/RFIDDocVisualExtendedInfo.cs | 151 +- .../Model/RFIDDocVisualExtendedInfoItem.cs | 132 +- .../Model/RFIDErrorCodes.cs | 808 +--- .../Model/RFIDGraphicsInfoResult.cs | 196 +- .../Model/RFIDPKDResourceType.cs | 172 +- .../Model/RFIDTextDataResult.cs | 196 +- .../Model/RawImageContainerItem.cs | 132 +- .../Model/RawImageContainerList.cs | 151 +- .../Model/RectangleCoordinates.cs | 180 +- .../Model/Result.cs | 340 +- .../Model/ResultItem.cs | 460 +- .../Model/ResultMRZDetector.cs | 197 +- .../Model/ResultMRZDetectorItem.cs | 132 +- .../Model/RfidAChip.cs | 160 +- .../Model/RfidAccessControlInfo.cs | 241 +- .../Model/RfidAccessControlProcedureType.cs | 172 +- .../Model/RfidAccessKey.cs | 201 +- .../Model/RfidApplication.cs | 288 +- .../Model/RfidApplicationType.cs | 184 +- .../Model/RfidAttributeData.cs | 156 +- .../Model/RfidAttributeName.cs | 158 +- .../Model/RfidAuthenticationProcedureType.cs | 148 +- .../Model/RfidBaudRate.cs | 154 +- .../Model/RfidCardPropertiesExt.cs | 462 +- .../Model/RfidCertificateEx.cs | 436 +- .../Model/RfidCertificateOrigin.cs | 178 +- .../Model/RfidCertificateType.cs | 172 +- .../Model/RfidDG1.cs | 485 +- .../Model/RfidDataFile.cs | 455 +- .../Model/RfidDataFileType.cs | 676 +-- .../Model/RfidDataGroupTypeTag.cs | 454 +- .../Model/RfidDistinguishedName.cs | 185 +- .../Model/RfidLocation.cs | 142 +- .../Model/RfidOrigin.cs | 180 +- .../Model/RfidPasswordType.cs | 166 +- .../Model/RfidPkiExtension.cs | 156 +- .../Model/RfidRawData.cs | 149 +- .../Model/RfidSecurityObject.cs | 223 +- .../Model/RfidSessionData.cs | 586 +-- .../Model/RfidSignerInfoEx.cs | 422 +- .../Model/RfidTerminal.cs | 173 +- .../Model/RfidTerminalType.cs | 154 +- .../Model/RfidType.cs | 142 +- .../Model/RfidValidity.cs | 159 +- .../Model/Scenario.cs | 315 +- .../Model/SecurityFeatureItem.cs | 259 +- .../Model/SecurityFeatureResult.cs | 313 +- .../Model/SecurityFeatureType.cs | 442 +- .../Model/SecurityObjectCertificates.cs | 131 +- .../Model/Source.cs | 185 +- .../Model/SourceValidity.cs | 156 +- .../Model/Status.cs | 282 +- .../Model/StatusItem.cs | 132 +- .../Model/StatusResult.cs | 196 +- .../Model/StringItem.cs | 460 +- .../Model/StringRecognitionResult.cs | 230 +- .../Model/Symbol.cs | 132 +- .../Model/SymbolCandidate.cs | 194 +- .../Model/SymbolEstimationItem.cs | 436 +- .../Model/SymbolRecognitionResult.cs | 255 +- .../Model/TDocBinaryInfo.cs | 162 +- .../Model/TDocBinaryInfoItem.cs | 132 +- .../Model/TOriginalRFIDGraphicsInfo.cs | 132 +- .../Model/TOriginalRFIDGraphicsInfoItem.cs | 132 +- .../Model/Text.cs | 258 +- .../Model/TextAvailableSource.cs | 178 +- .../Model/TextDataResult.cs | 196 +- .../Model/TextField.cs | 392 +- .../Model/TextFieldType.cs | 3988 +---------------- .../Model/TextFieldValue.cs | 383 +- .../Model/TextItem.cs | 132 +- .../Model/TextPostProcessing.cs | 148 +- .../Model/TextResult.cs | 196 +- .../Model/TransactionImage.cs | 131 +- .../Model/TransactionInfo.cs | 326 +- .../Model/TransactionProcessGetResponse.cs | 216 +- .../Model/TransactionProcessRequest.cs | 347 +- .../Model/TransactionProcessResult.cs | 215 +- .../Model/TrfFtBytes.cs | 186 +- .../Model/TrfFtString.cs | 222 +- .../Model/VerificationResult.cs | 154 +- .../Model/VerifiedFieldMap.cs | 325 +- .../Model/Visibility.cs | 154 +- .../Model/VisualExtendedFieldItem.cs | 429 +- .../Regula.DocumentReader.WebClient.csproj | 51 +- 283 files changed, 15037 insertions(+), 59819 deletions(-) delete mode 100644 generator-templates/Assembly.mustache delete mode 100644 generator-templates/JsonConverter.mustache delete mode 100644 generator-templates/modelGeneric.mustache delete mode 100644 src/Regula.DocumentReader.WebClient/Api/IApi.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiClient.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/Configuration.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/FileParameter.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/IAsynchronousClient.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/ISynchronousClient.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/Multimap.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/Option.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/RequestOptions.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/RetryConfiguration.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/TokenBase.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs create mode 100644 src/Regula.DocumentReader.WebClient/Client/WebRequestPathBuilder.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs delete mode 100644 src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs create mode 100644 src/Regula.DocumentReader.WebClient/Model/AbstractOpenAPISchema.cs diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index a6fe252..e8cc603 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,28 +1,24 @@ src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs -src/Regula.DocumentReader.WebClient/Api/IApi.cs src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs +src/Regula.DocumentReader.WebClient/Client/ApiClient.cs src/Regula.DocumentReader.WebClient/Client/ApiException.cs -src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs -src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs -src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs +src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs -src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs -src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs -src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs -src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs -src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs -src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs -src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs -src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs -src/Regula.DocumentReader.WebClient/Client/Option.cs -src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs -src/Regula.DocumentReader.WebClient/Client/TokenBase.cs -src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs -src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs -src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs -src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs -src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs +src/Regula.DocumentReader.WebClient/Client/Configuration.cs +src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs +src/Regula.DocumentReader.WebClient/Client/FileParameter.cs +src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs +src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs +src/Regula.DocumentReader.WebClient/Client/IAsynchronousClient.cs +src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs +src/Regula.DocumentReader.WebClient/Client/ISynchronousClient.cs +src/Regula.DocumentReader.WebClient/Client/Multimap.cs +src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs +src/Regula.DocumentReader.WebClient/Client/RequestOptions.cs +src/Regula.DocumentReader.WebClient/Client/RetryConfiguration.cs +src/Regula.DocumentReader.WebClient/Client/WebRequestPathBuilder.cs +src/Regula.DocumentReader.WebClient/Model/AbstractOpenAPISchema.cs src/Regula.DocumentReader.WebClient/Model/AreaArray.cs src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs src/Regula.DocumentReader.WebClient/Model/AuthParams.cs diff --git a/csharp-generator-config.json b/csharp-generator-config.json index 7cb55b6..9e04e42 100644 --- a/csharp-generator-config.json +++ b/csharp-generator-config.json @@ -1,5 +1,6 @@ { "packageName": "Regula.DocumentReader.WebClient", + "library": "httpclient", "nullableReferenceTypes": true, "targetFramework": "net8.0", "typeMappings" : { diff --git a/generator-templates/Assembly.mustache b/generator-templates/Assembly.mustache deleted file mode 100644 index 8b13789..0000000 --- a/generator-templates/Assembly.mustache +++ /dev/null @@ -1 +0,0 @@ - diff --git a/generator-templates/JsonConverter.mustache b/generator-templates/JsonConverter.mustache deleted file mode 100644 index a9039aa..0000000 --- a/generator-templates/JsonConverter.mustache +++ /dev/null @@ -1,647 +0,0 @@ - /// - /// A Json converter for type - /// - {{>visibility}} class {{classname}}JsonConverter : JsonConverter<{{classname}}> - { - {{#allVars}} - {{#isDateTime}} - /// - /// The format to use to serialize {{name}} - /// - public static string {{name}}Format { get; set; } = "{{{dateTimeFormat}}}"; - - {{/isDateTime}} - {{#isDate}} - /// - /// The format to use to serialize {{name}} - /// - public static string {{name}}Format { get; set; } = "{{{dateFormat}}}"; - - {{/isDate}} - {{/allVars}} - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override {{classname}} Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - {{#lambda.trimTrailingWithNewLine}} - {{#lambda.trimLineBreaks}} - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - {{#allVars}} - Option<{{#isInnerEnum}}{{^isMap}}{{classname}}.{{/isMap}}{{/isInnerEnum}}{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; - {{#-last}} - - {{/-last}} - {{/allVars}} - {{#discriminator}} - {{#children}} - {{#-first}} - string{{nrt?}} discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "{{discriminator.propertyBaseName}}"); - - {{#mappedModels}} - if (discriminator != null && discriminator.Equals("{{mappingName}}")) - return JsonSerializer.Deserialize<{{{model.classname}}}>(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - {{/mappedModels}} - {{/-first}} - {{/children}} - {{/discriminator}} - {{#model.discriminator}} - {{#model.hasDiscriminatorWithNonEmptyMapping}} - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{name}}{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = null; - {{#-last}} - - {{/-last}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} - Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; - while (utf8JsonReaderDiscriminator.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) - { - string{{nrt?}} localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); - utf8JsonReaderDiscriminator.Read(); - if (localVarJsonPropertyName{{nrt?}}.Equals("{{propertyBaseName}}"){{#nrt}} ?? false{{/nrt}}) - { - string{{nrt?}} discriminator = utf8JsonReaderDiscriminator.GetString(); - {{#mappedModels}} - if (discriminator{{nrt?}}.Equals("{{mappingName}}"){{#nrt}} ?? false{{/nrt}}) - { - Utf8JsonReader utf8JsonReader{{model.classname}} = utf8JsonReader; - {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} = JsonSerializer.Deserialize<{{{model.classname}}}>(ref utf8JsonReader{{model.classname}}, jsonSerializerOptions); - } - {{/mappedModels}} - } - } - } - - {{/model.hasDiscriminatorWithNonEmptyMapping}} - {{/model.discriminator}} - {{^model.discriminator}} - {{#composedSchemas}} - {{#oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; - {{#-last}} - - Utf8JsonReader utf8JsonReaderOneOf = utf8JsonReader; - while (utf8JsonReaderOneOf.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderOneOf.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderOneOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderOneOf.CurrentDepth) - break; - - if (utf8JsonReaderOneOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderOneOf.CurrentDepth - 1) - { - {{#oneOf}} - Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; - ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); - {{^-last}} - - {{/-last}} - {{/oneOf}} - } - } - {{/-last}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/oneOf}} - - {{#anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = default; - {{#-last}} - - Utf8JsonReader utf8JsonReaderAnyOf = utf8JsonReader; - while (utf8JsonReaderAnyOf.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderAnyOf.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderAnyOf.CurrentDepth) - break; - - if (utf8JsonReaderAnyOf.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderAnyOf.CurrentDepth - 1) - { - {{#anyOf}} - Utf8JsonReader utf8JsonReader{{name}} = utf8JsonReader; - ClientUtils.TryDeserialize<{{{datatypeWithEnum}}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}}>(ref utf8JsonReader{{name}}, jsonSerializerOptions, out {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); - {{^-last}} - - {{/-last}} - {{/anyOf}} - } - } - {{/-last}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/anyOf}} - - {{/composedSchemas}} - {{/model.discriminator}} - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string{{nrt?}} localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - {{#allVars}} - case "{{baseName}}": - {{#isString}} - {{^isMap}} - {{^isEnum}} - {{^isUuid}} - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetString(){{^isNullable}}{{nrt!}}{{/isNullable}}); - {{/isUuid}} - {{/isEnum}} - {{/isMap}} - {{/isString}} - {{#isBoolean}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetBoolean()); - {{/isBoolean}} - {{#isNumeric}} - {{^isEnum}} - {{#isDouble}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDouble()); - {{/isDouble}} - {{#isDecimal}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetDecimal()); - {{/isDecimal}} - {{#isFloat}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}(float)utf8JsonReader.GetDouble()); - {{/isFloat}} - {{#isLong}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int64()); - {{/isLong}} - {{^isLong}} - {{^isFloat}} - {{^isDecimal}} - {{^isDouble}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); - {{/isDouble}} - {{/isDecimal}} - {{/isFloat}} - {{/isLong}} - {{/isEnum}} - {{/isNumeric}} - {{#isDate}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{#supportsDateOnly}}DateOnly{{/supportsDateOnly}}{{^supportsDateOnly}}DateTime{{/supportsDateOnly}}{{#isNullable}}?{{/isNullable}}>(ref utf8JsonReader, jsonSerializerOptions)); - {{/isDate}} - {{#isDateTime}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - {{/isDateTime}} - {{#isEnum}} - {{^isMap}} - {{#isNumeric}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}({{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}})utf8JsonReader.Get{{#vendorExtensions.x-unsigned}}U{{/vendorExtensions.x-unsigned}}Int32()); - {{/isNumeric}} - {{^isNumeric}} - string{{nrt?}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = utf8JsonReader.GetString(); - {{^isInnerEnum}} - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{{datatypeWithEnum}}}ValueConverter.FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); - {{/isInnerEnum}} - {{#isInnerEnum}} - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}{{classname}}.{{{datatypeWithEnum}}}FromStringOrDefault({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue)); - {{/isInnerEnum}} - {{/isNumeric}} - {{/isMap}} - {{/isEnum}} - {{#isUuid}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}utf8JsonReader.GetGuid()); - {{/isUuid}} - {{^isUuid}} - {{^isEnum}} - {{^isString}} - {{^isBoolean}} - {{^isNumeric}} - {{^isDate}} - {{^isDateTime}} - if (utf8JsonReader.TokenType != JsonTokenType.Null) - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{>OptionProperty}}JsonSerializer.Deserialize<{{{datatypeWithEnum}}}>(ref utf8JsonReader, jsonSerializerOptions){{^isNullable}}{{nrt!}}{{/isNullable}}); - {{/isDateTime}} - {{/isDate}} - {{/isNumeric}} - {{/isBoolean}} - {{/isString}} - {{/isEnum}} - {{/isUuid}} - break; - {{/allVars}} - default: - break; - } - } - } - - {{#allVars}} - {{#required}} - if (!{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet) - throw new ArgumentException("Property is required for class {{classname}}.", nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}})); - - {{/required}} - {{/allVars}} - {{#allVars}} - {{^isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.IsSet && {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}.Value == null) - throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}), "Property is not nullable for class {{classname}}."); - - {{/isNullable}} - {{/allVars}} - {{^vendorExtensions.x-duplicated-data-type}} - {{#model.discriminator}} - {{#model.hasDiscriminatorWithNonEmptyMapping}} - {{#mappedModels}} - if ({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}} != null) - return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); - - {{#-last}} - throw new JsonException(); - {{/-last}} - {{/mappedModels}} - {{/model.hasDiscriminatorWithNonEmptyMapping}} - {{/model.discriminator}} - {{^composedSchemas.oneOf}} - {{^required}} - {{#model.composedSchemas.anyOf}} - Option<{{baseType}}{{>NullConditionalProperty}}> {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null - ? default - : new Option<{{baseType}}{{>NullConditionalProperty}}>({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}); - {{/model.composedSchemas.anyOf}} - {{#-last}} - - {{/-last}} - {{/required}} - return new {{classname}}({{#lambda.joinWithComma}}{{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}ParsedValue{{#required}}.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/required}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}.Value{{nrt!}}{{^isNullable}}{{#vendorExtensions.x-is-value-type}}.Value{{nrt!}}{{/vendorExtensions.x-is-value-type}}{{/isNullable}}{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); - {{/composedSchemas.oneOf}} - {{^model.discriminator}} - {{#composedSchemas}} - {{#oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} != null) - return new {{classname}}({{#lambda.joinWithComma}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}.Value{{/vendorExtensions.x-is-value-type}} {{#model.composedSchemas.anyOf}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#vendorExtensions.x-is-value-type}}{{^isNullable}}.Value{{/isNullable}}{{/vendorExtensions.x-is-value-type}} {{/model.composedSchemas.anyOf}}{{#allVars}}{{^isDiscriminator}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{#required}}ParsedValue{{/required}} {{/isDiscriminator}}{{/allVars}}{{/lambda.joinWithComma}}); - - {{/vendorExtensions.x-duplicated-data-type}} - {{#-last}} - throw new JsonException(); - {{/-last}} - {{/oneOf}} - {{/composedSchemas}} - {{/model.discriminator}} - {{/vendorExtensions.x-duplicated-data-type}} - {{/lambda.trimLineBreaks}} - {{/lambda.trimTrailingWithNewLine}} - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) - { - {{#lambda.trimLineBreaks}} - {{#lambda.copyText}} - {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}} - {{/lambda.copyText}} - {{#discriminator}} - {{#children}} - if ({{#lambda.paste}}{{/lambda.paste}} is {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}){ - JsonSerializer.Serialize<{{{classname}}}>(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); - return; - } - - {{/children}} - {{/discriminator}} - writer.WriteStartObject(); - - {{#model.discriminator}} - {{#model.hasDiscriminatorWithNonEmptyMapping}} - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) - {{#isPrimitiveType}} - {{#isString}} - writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); - {{/isString}} - {{#isBoolean}} - writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); - {{/isBoolean}} - {{#isNumeric}} - writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); - {{/isNumeric}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - { - {{baseType}}JsonConverter {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}} = ({{baseType}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.GetType())); - {{#lambda.camelcase_sanitize_param}}{{baseType}}JsonConverter{{/lambda.camelcase_sanitize_param}}.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - } - {{/isPrimitiveType}} - - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} - {{/model.hasDiscriminatorWithNonEmptyMapping}} - {{/model.discriminator}} - {{^model.discriminator}} - {{#composedSchemas}} - {{#anyOf}} - if ({{#lambda.joinWithAmpersand}}{{^required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet {{/required}}{{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}} != null{{/lambda.joinWithAmpersand}}) - {{#isPrimitiveType}} - {{#isString}} - writer.WriteString("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value); - {{/isString}} - {{#isBoolean}} - writer.WriteBoolean("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); - {{/isBoolean}} - {{#isNumeric}} - writer.WriteNumber("{{vendorExtensions.x-base-name}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value.Value); - {{/isNumeric}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - { - {{datatypeWithEnum}}JsonConverter {{datatypeWithEnum}}JsonConverter = ({{datatypeWithEnum}}JsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert({{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}.GetType())); - {{datatypeWithEnum}}JsonConverter.WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{model.classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{/required}}, jsonSerializerOptions); - } - {{/isPrimitiveType}} - - {{/anyOf}} - {{/composedSchemas}} - {{/model.discriminator}} - WriteProperties(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, jsonSerializerOptions); - writer.WriteEndObject(); - {{/lambda.trimLineBreaks}} - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, {{classname}} {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}, JsonSerializerOptions jsonSerializerOptions) - { - {{#lambda.trimTrailingWithNewLine}} - {{#lambda.trimLineBreaks}} - {{#allVars}} - {{^isDiscriminator}} - {{^isNullable}} - {{#vendorExtensions.x-is-reference-type}} - if ({{^required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet && {{/required}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) - throw new ArgumentNullException(nameof({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}), "Property is required for class {{classname}}."); - - {{/vendorExtensions.x-is-reference-type}} - {{/isNullable}} - {{/isDiscriminator}} - {{/allVars}} - {{#allVars}} - {{#isDiscriminator}} - {{^model.composedSchemas.anyOf}} - {{^model.composedSchemas.oneOf}} - writer.WriteNumber("{{baseName}}", {{^isEnum}}{{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{/isEnum}}{{#isEnum}}{{#isInnerEnum}}{{classname}}.{{{datatypeWithEnum}}}ToJsonValue{{/isInnerEnum}}{{^isInnerEnum}}{{{datatypeWithEnum}}}ValueConverter.ToJsonValue{{/isInnerEnum}}({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}.Value{{/required}}){{/isEnum}}); - - {{/model.composedSchemas.oneOf}} - {{/model.composedSchemas.anyOf}} - {{/isDiscriminator}} - {{^isDiscriminator}} - {{#isString}} - {{^isMap}} - {{^isEnum}} - {{^isUuid}} - {{#lambda.copyText}} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); - {{/lambda.copyText}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isUuid}} - {{/isEnum}} - {{/isMap}} - {{/isString}} - {{#isBoolean}} - {{#lambda.copyText}} - writer.WriteBoolean("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copyText}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isBoolean}} - {{^isEnum}} - {{#isNumeric}} - {{#lambda.copyText}} - writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copyText}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isNumeric}} - {{/isEnum}} - {{#isDate}} - {{#lambda.copyText}} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); - {{/lambda.copyText}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isDate}} - {{#isDateTime}} - {{#lambda.copyText}} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}.ToString({{name}}Format)); - {{/lambda.copyText}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isDateTime}} - {{#isEnum}} - {{#isNumeric}} - {{#lambda.copyText}} - writer.WriteNumber("{{baseName}}", {{#isInnerEnum}}{{classname}}.{{/isInnerEnum}}{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}})); - {{/lambda.copyText}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isNumeric}} - {{^isMap}} - {{^isNumeric}} - {{#isInnerEnum}} - {{#isNullable}} - var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); - if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue != null) - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); - else - writer.WriteNull("{{baseName}}"); - - {{/isNullable}} - {{^isNullable}} - var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{classname}}.{{{datatypeWithEnum}}}ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}{{nrt!}}.Value{{/isNullable}}{{/required}}); - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue); - {{/isNullable}} - {{/isInnerEnum}} - {{^isInnerEnum}} - {{#lambda.copyText}} - {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} - {{/lambda.copyText}} - {{#required}} - {{#isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} == null) - writer.WriteNull("{{baseName}}"); - else - { - var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}.Value); - {{#allowableValues}} - {{#enumVars}} - {{#-first}} - {{#isString}} - if ({{#lambda.paste}}{{/lambda.paste}}RawValue != null){{! we cant use name here because enumVar also has a name property, so use the paste lambda instead }} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); - else - writer.WriteNull("{{baseName}}"); - {{/isString}} - {{^isString}} - writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{nameInPascalCase}}{{/lambda.camelcase_sanitize_param}}RawValue); - {{/isString}} - {{/-first}} - {{/enumVars}} - {{/allowableValues}} - } - {{/isNullable}} - {{^isNullable}} - var {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}); - {{#allowableValues}} - {{#enumVars}} - {{#-first}} - {{^isNumeric}} - writer.WriteString("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); - {{/isNumeric}} - {{#isNumeric}} - writer.WriteNumber("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{#lambda.paste}}{{/lambda.paste}}{{/lambda.camelcase_sanitize_param}}RawValue); - {{/isNumeric}} - {{/-first}} - {{/enumVars}} - {{/allowableValues}} - {{/isNullable}} - - {{/required}} - {{^required}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) - {{#isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option{{nrt!}}.Value != null) - { - var {{#lambda.paste}}{{/lambda.paste}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value{{nrt!}}.Value); - writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); - } - else - writer.WriteNull("{{baseName}}"); - {{/isNullable}} - {{^isNullable}} - { - var {{#lambda.paste}}{{/lambda.paste}}RawValue = {{{datatypeWithEnum}}}ValueConverter.ToJsonValue({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{nrt!}}.Value); - writer.{{#lambda.first}}{{#allowableValues}}{{#enumVars}}{{^isNumeric}}WriteString {{/isNumeric}}{{#isNumeric}}WriteNumber {{/isNumeric}}{{/enumVars}}{{/allowableValues}}{{/lambda.first}}("{{baseName}}", {{#lambda.paste}}{{/lambda.paste}}RawValue); - } - {{/isNullable}} - {{/required}} - {{/isInnerEnum}} - {{/isNumeric}} - {{/isMap}} - {{/isEnum}} - {{#isUuid}} - {{#lambda.copyText}} - writer.WriteString("{{baseName}}", {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}{{^required}}Option.Value{{#vendorExtensions.x-is-value-type}}{{nrt!}}.Value{{/vendorExtensions.x-is-value-type}}{{/required}}{{#required}}{{#isNullable}}.Value{{/isNullable}}{{/required}}); - {{/lambda.copyText}} - {{#lambda.indent3}} - {{>WriteProperty}} - {{/lambda.indent3}} - {{/isUuid}} - {{^isUuid}} - {{^isEnum}} - {{^isString}} - {{^isBoolean}} - {{^isNumeric}} - {{^isDate}} - {{^isDateTime}} - {{#required}} - {{#isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}} != null) - { - writer.WritePropertyName("{{baseName}}"); - JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - } - else - writer.WriteNull("{{baseName}}"); - {{/isNullable}} - {{^isNullable}} - writer.WritePropertyName("{{baseName}}"); - JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - {{/isNullable}} - {{/required}} - {{^required}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.IsSet) - {{#isNullable}} - if ({{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}Option.Value != null) - { - writer.WritePropertyName("{{baseName}}"); - JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - } - else - writer.WriteNull("{{baseName}}"); - {{/isNullable}} - {{^isNullable}} - { - writer.WritePropertyName("{{baseName}}"); - JsonSerializer.Serialize(writer, {{#lambda.camelcase_sanitize_param}}{{classname}}{{/lambda.camelcase_sanitize_param}}.{{name}}, jsonSerializerOptions); - } - {{/isNullable}} - {{/required}} - {{/isDateTime}} - {{/isDate}} - {{/isNumeric}} - {{/isBoolean}} - {{/isString}} - {{/isEnum}} - {{/isUuid}} - {{/isDiscriminator}} - {{/allVars}} - {{/lambda.trimLineBreaks}} - {{/lambda.trimTrailingWithNewLine}} - } - } \ No newline at end of file diff --git a/generator-templates/modelGeneric.mustache b/generator-templates/modelGeneric.mustache deleted file mode 100644 index acdcea7..0000000 --- a/generator-templates/modelGeneric.mustache +++ /dev/null @@ -1,393 +0,0 @@ - /// - /// {{description}}{{^description}}{{classname}}{{/description}} - /// - {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}}{{#readOnlyVars}}{{#-first}} : .{{/-first}}{{/readOnlyVars}}{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{>ImplementsIEquatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} - { - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - /// - /// Initializes a new instance of the class. - /// - /// - {{#composedSchemas.anyOf}} - /// - {{/composedSchemas.anyOf}} - {{#allVars}} - {{^isDiscriminator}} - /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} - {{/isDiscriminator}} - {{/allVars}} - {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{{dataType}}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{#model.composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{dataType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{baseType}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/model.composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{#parentModel.composedSchemas.oneOf}}{{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{parent}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}.{{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{/parentModel.composedSchemas.oneOf}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} - { - {{#composedSchemas.anyOf}} - {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/composedSchemas.anyOf}} - {{name}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{#allVars}} - {{^isDiscriminator}} - {{^isInherited}} - {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/isInherited}} - {{#isInherited}} - {{#isNew}} - {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/isNew}} - {{/isInherited}} - {{/isDiscriminator}} - {{#vendorExtensions.x-is-base-or-new-discriminator}} - {{^model.composedSchemas.anyOf}} - {{^model.composedSchemas.oneOf}} - {{name}} = {{^isEnum}}this.GetType().Name{{/isEnum}}{{#isEnum}}({{datatypeWithEnum}})Enum.Parse(typeof({{datatypeWithEnum}}), this.GetType().Name){{/isEnum}}; - {{/model.composedSchemas.oneOf}} - {{/model.composedSchemas.anyOf}} - {{/vendorExtensions.x-is-base-or-new-discriminator}} - {{/allVars}} - OnCreated(); - } - - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} - {{^composedSchemas.oneOf}} - /// - /// Initializes a new instance of the class. - /// - {{#composedSchemas.anyOf}} - /// - {{/composedSchemas.anyOf}} - {{#allVars}} - {{^isDiscriminator}} - /// {{description}}{{^description}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/description}}{{#defaultValue}} (default to {{.}}){{/defaultValue}} - {{/isDiscriminator}} - {{/allVars}} - {{^composedSchemas.anyOf}} - [JsonConstructor] - {{/composedSchemas.anyOf}} - {{#model.vendorExtensions.x-model-is-mutable}}{{>visibility}}{{/model.vendorExtensions.x-model-is-mutable}}{{^model.vendorExtensions.x-model-is-mutable}}internal{{/model.vendorExtensions.x-model-is-mutable}} {{classname}}({{#lambda.joinWithComma}}{{#composedSchemas.anyOf}}{{^required}}Option<{{/required}}{{{baseType}}}{{>NullConditionalProperty}}{{^required}}>{{/required}} {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}} {{/composedSchemas.anyOf}}{{>ModelSignature}}{{/lambda.joinWithComma}}){{#parent}} : base({{#lambda.joinWithComma}}{{>ModelBaseSignature}}{{/lambda.joinWithComma}}){{/parent}} - { - {{#composedSchemas.anyOf}} - {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/composedSchemas.anyOf}} - {{#allVars}} - {{^isDiscriminator}} - {{^isInherited}} - {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/isInherited}} - {{#isInherited}} - {{#isNew}} - {{name}}{{^required}}Option{{/required}} = {{#lambda.escape_reserved_word}}{{#lambda.camel_case}}{{name}}{{/lambda.camel_case}}{{/lambda.escape_reserved_word}}; - {{/isNew}} - {{/isInherited}} - {{/isDiscriminator}} - {{#vendorExtensions.x-is-base-or-new-discriminator}} - {{^model.composedSchemas.anyOf}} - {{^model.composedSchemas.oneOf}} - {{name}} = {{defaultValue}}; - {{/model.composedSchemas.oneOf}} - {{/model.composedSchemas.anyOf}} - {{/vendorExtensions.x-is-base-or-new-discriminator}} - {{/allVars}} - OnCreated(); - } - - {{/composedSchemas.oneOf}} - partial void OnCreated(); - - {{#vars}} - {{#items.isEnum}} - {{#items}} - {{^complexType}} -{{>modelInnerEnum}} - {{/complexType}} - {{/items}} - {{/items.isEnum}} - {{#isEnum}} - {{^complexType}} -{{>modelInnerEnum}} - {{/complexType}} - {{/isEnum}} - {{^isDiscriminator}} - {{#isEnum}} - {{^required}} - /// - /// Used to track the state of {{{name}}} - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} - - {{/required}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{#example}} - /* {{.}} */ - {{/example}} - [JsonPropertyName("{{baseName}}")] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{#isNew}}new {{/isNew}}{{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - - {{/isEnum}} - {{/isDiscriminator}} - {{/vars}} - {{#composedSchemas.anyOf}} - {{^vendorExtensions.x-duplicated-data-type}} - {{^required}} - /// - /// Used to track the state of {{{name}}} - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public {{#isNew}}new {{/isNew}}Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} - - {{/required}} - /// - /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /* {{.}} */ - {{/example}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{#lambda.titlecase}}{{baseType}}{{/lambda.titlecase}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option; } {{^isReadOnly}}set { this.{{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.anyOf}} - {{#composedSchemas.oneOf}} - {{^vendorExtensions.x-duplicated-data-type}} - /// - /// {{description}}{{^description}}Gets or Sets {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /* {{.}} */ - {{/example}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}}{{>NullConditionalProperty}} {{#lambda.titlecase}}{{name}}{{/lambda.titlecase}} { get; {{^isReadOnly}}set; {{/isReadOnly}}} - - {{/vendorExtensions.x-duplicated-data-type}} - {{/composedSchemas.oneOf}} - {{#allVars}} - {{#vendorExtensions.x-is-base-or-new-discriminator}} - {{^model.composedSchemas.anyOf}} - {{^model.composedSchemas.oneOf}} - /// - /// The discriminator - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public {{#isNew}}new {{/isNew}}{{datatypeWithEnum}} {{name}} { get; } - - {{/model.composedSchemas.oneOf}} - {{/model.composedSchemas.anyOf}} - {{/vendorExtensions.x-is-base-or-new-discriminator}} - {{^vendorExtensions.x-is-base-or-new-discriminator}} - {{^isEnum}} - {{#isInherited}} - {{#isNew}} - {{^required}} - /// - /// Used to track the state of {{{name}}} - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public new Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} - - {{/required}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /* {{.}} */ - {{/example}} - [JsonPropertyName("{{baseName}}")] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public new {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - - {{/isNew}} - {{/isInherited}} - {{^isInherited}} - {{^required}} - /// - /// Used to track the state of {{{name}}} - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}> {{name}}Option { get; {{^isReadOnly}}private set; {{/isReadOnly}}} - - {{/required}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - {{#example}} - /* {{.}} */ - {{/example}} - [JsonPropertyName("{{baseName}}")] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{datatypeWithEnum}}}{{#lambda.first}}{{#isNullable}}{{>NullConditionalProperty}} {{/isNullable}}{{^required}}{{nrt?}}{{^nrt}}{{#vendorExtensions.x-is-value-type}}?{{/vendorExtensions.x-is-value-type}}{{/nrt}} {{/required}}{{/lambda.first}} {{name}} {{#required}}{ get; {{^isReadOnly}}set; {{/isReadOnly}}}{{/required}}{{^required}}{ get { return this.{{name}}Option; } {{^isReadOnly}}set { this.{{name}}Option = new{{^net70OrLater}} Option<{{{datatypeWithEnum}}}{{>NullConditionalProperty}}>{{/net70OrLater}}(value); } {{/isReadOnly}}}{{/required}} - - {{/isInherited}} - {{/isEnum}} - {{/vendorExtensions.x-is-base-or-new-discriminator}} - {{/allVars}} - {{#isAdditionalPropertiesTrue}} - {{^parentModel}} - /// - /// Gets or Sets additional properties - /// - [JsonExtensionData] - public Dictionary AdditionalProperties { get; } = new Dictionary(); - - {{/parentModel}} - {{/isAdditionalPropertiesTrue}} - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class {{classname}} {\n"); - {{#parent}} - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); - {{/parent}} - {{#vars}} - {{^isDiscriminator}} - sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); - {{/isDiscriminator}} - {{/vars}} - {{#isAdditionalPropertiesTrue}} - {{^parentModel}} - sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); - {{/parentModel}} - {{/isAdditionalPropertiesTrue}} - sb.Append("}\n"); - return sb.ToString(); - } - {{#equatable}} - {{#readOnlyVars}} - {{#-first}} - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object{{nrt?}} input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - return this.Equals(input as {{classname}}); - {{/useCompareNetObjects}} - } - - /// - /// Returns true if {{classname}} instances are equal - /// - /// Instance of {{classname}} to be compared - /// Boolean - public bool Equals({{classname}}{{nrt?}} input) - { - {{#useCompareNetObjects}} - return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; - {{/useCompareNetObjects}} - {{^useCompareNetObjects}} - if (input == null) - return false; - - return {{#parent}}base.Equals(input) && {{/parent}}{{#readOnlyVars}}{{^isInherited}}{{^isContainer}} - ( - {{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}} - ({{name}} != null && - {{name}}.Equals(input.{{name}})) - {{/vendorExtensions.x-is-value-type}} - {{#vendorExtensions.x-is-value-type}} - {{name}}.Equals(input.{{name}}) - {{/vendorExtensions.x-is-value-type}} - ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} - ( - {{name}} == input.{{name}} || - {{^vendorExtensions.x-is-value-type}}{{name}} != null && - input.{{name}} != null && - {{/vendorExtensions.x-is-value-type}}{{name}}.SequenceEqual(input.{{name}}) - ){{^-last}} && {{/-last}}{{/isContainer}}{{/isInherited}}{{/readOnlyVars}}{{^readOnlyVars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/readOnlyVars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} - {{#isAdditionalPropertiesTrue}} - {{^parentModel}} - && (AdditionalProperties.Count == input.AdditionalProperties.Count && !AdditionalProperties.Except(input.AdditionalProperties).Any()); - {{/parentModel}} - {{/isAdditionalPropertiesTrue}} - {{/useCompareNetObjects}} - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - {{#parent}} - int hashCode = base.GetHashCode(); - {{/parent}} - {{^parent}} - int hashCode = 41; - {{/parent}} - {{#readOnlyVars}} - {{#required}} - {{^isNullable}} - hashCode = (hashCode * 59) + {{name}}.GetHashCode(); - {{/isNullable}} - {{/required}} - {{/readOnlyVars}} - {{#readOnlyVars}} - {{#lambda.copy}} - if ({{name}} != null) - hashCode = (hashCode * 59) + {{name}}.GetHashCode(); - - {{/lambda.copy}} - {{#isNullable}} - {{#lambda.pasteOnce}} - {{/lambda.pasteOnce}} - {{/isNullable}} - {{^required}} - {{#lambda.pasteOnce}} - {{/lambda.pasteOnce}} - {{/required}} - {{/readOnlyVars}} - {{#isAdditionalPropertiesTrue}} - {{^parentModel}} - hashCode = (hashCode * 59) + AdditionalProperties.GetHashCode(); - {{/parentModel}} - {{/isAdditionalPropertiesTrue}} - - return hashCode; - } - } - {{/-first}} - {{/readOnlyVars}} - {{/equatable}} -{{#validatable}} -{{^parentModel}} - -{{>validatable}} -{{/parentModel}} -{{/validatable}} - } \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs b/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs index 1403aed..a40e0ba 100644 --- a/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs @@ -1,9 +1,7 @@ using System; -using System.Net.Http; -using System.Text.Json; +using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; -using Microsoft.Extensions.Logging; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; using Regula.DocumentReader.WebClient.Model.Ext; @@ -17,82 +15,90 @@ public class DocumentReaderApi public DocumentReaderApi(string basePath) { - var loggerFactory = LoggerFactory.Create(builder => - { - builder.AddConsole(); - }); + this._healthcheckApi = new HealthcheckApi(basePath); + this._processApi = new ProcessApi(basePath); + } - ILogger healthcheckLogger = loggerFactory.CreateLogger(); - ILogger processLogger = loggerFactory.CreateLogger(); + public IReadableConfiguration Configuration + { + get => this._processApi.Configuration; + set => this._processApi.Configuration = value; + } - var httpClient = new HttpClient - { - BaseAddress = new Uri(basePath) - }; + private string License { get; set; } - var jsonSerializerOptionsProvider = new JsonSerializerOptionsProvider(new JsonSerializerOptions()); - var healthcheckApiEvents = new HealthcheckApiEvents(); - var processApiEvents = new ProcessApiEvents(); - this._healthcheckApi = new HealthcheckApi( - healthcheckLogger, - loggerFactory, - httpClient, - jsonSerializerOptionsProvider, - healthcheckApiEvents - ); - this._processApi = new ProcessApi( - processLogger, - loggerFactory, - httpClient, - jsonSerializerOptionsProvider, - processApiEvents - ); + public RecognitionResponse Process(ProcessRequest processRequest) + { + return Process(processRequest, new Dictionary(), default(string)); } - private string License { get; set; } + public RecognitionResponse Process(ProcessRequest processRequest, Dictionary headers) + { + return Process(processRequest, headers, default(string)); + } + + public RecognitionResponse Process(ProcessRequest processRequest, String xRequestID) + { + return Process(processRequest, new Dictionary(), xRequestID); + } + + public RecognitionResponse Process(ProcessRequest processRequest, Dictionary headers, String xRequestID) + { + if (processRequest.SystemInfo == null) + processRequest.SystemInfo = new ProcessSystemInfo(License); + else + processRequest.SystemInfo.License = License; + + return new RecognitionResponse(this._processApi.ApiProcessWithHttpInfo(processRequest, xRequestID)); + } public async Task ProcessAsync(ProcessRequest processRequest) { - return await ProcessAsync(processRequest); + return await ProcessAsync(processRequest, new Dictionary(), default(string)); + } + + public async Task ProcessAsync(ProcessRequest processRequest, Dictionary headers) + { + return await ProcessAsync(processRequest, headers, default(string)); } public async Task ProcessAsync(ProcessRequest processRequest, String xRequestID) { - return await ProcessAsync(processRequest, xRequestID); + return await ProcessAsync(processRequest, new Dictionary(), xRequestID); } - public async Task ProcessAsync(ProcessRequest processRequest, string xRequestID = default, CancellationToken cancellationToken = default) + public async Task ProcessAsync(ProcessRequest processRequest, Dictionary headers, String xRequestID, CancellationToken cancellationToken = default(CancellationToken)) { if (processRequest.SystemInfo == null) processRequest.SystemInfo = new ProcessSystemInfo(License); else processRequest.SystemInfo.License = License; - var response = await this._processApi.ApiProcessAsync(processRequest, xRequestID, cancellationToken); + var response = await this._processApi.ApiProcessWithHttpInfoAsync(processRequest, xRequestID, cancellationToken); return new RecognitionResponse(response); } - public async Task PingAsync(string xRequestID) + public DeviceInfo Ping(string xRequestID) { - return await this._healthcheckApi.PingAsync(xRequestID); + return this._healthcheckApi.Ping(xRequestID); } - public async Task PingAsync() + public DeviceInfo Ping() { - return await this._healthcheckApi.PingAsync(); + return this._healthcheckApi.Ping(); } - - public async Task HealthAsync(string xRequestID) + + public Healthcheck Health(string xRequestID) { - return await this._healthcheckApi.HealthzAsync(xRequestID); + return this._healthcheckApi.Healthz(xRequestID); } - public async Task HealthAsync() + public Healthcheck Health() { - return await this._healthcheckApi.HealthzAsync(); + return this._healthcheckApi.Healthz(); } public DocumentReaderApi WithLicense(string license) diff --git a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs index 23effea..0f7c4b5 100644 --- a/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,32 +7,33 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; using System.Net; -using System.Threading.Tasks; -using Microsoft.Extensions.Logging; using System.Net.Http; -using System.Net.Http.Headers; -using System.Text.Json; +using System.Net.Mime; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; -using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { + /// /// Represents a collection of functions to interact with the API endpoints - /// This class is registered as transient. /// - public interface IHealthcheckApi : IApi + public interface IHealthcheckApiSync : IApiAccessor { + #region Synchronous Operations /// - /// The class containing the events + /// Server health check /// - HealthcheckApiEvents Events { get; } + /// Thrown when fails to make API call + /// (optional) + /// Healthcheck + Healthcheck Healthz(string? xRequestID = default(string?)); /// /// Server health check @@ -41,11 +41,18 @@ public interface IHealthcheckApi : IApi /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) - /// Cancellation Token to cancel the request. - /// <> - Task HealthzAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + /// ApiResponse of Healthcheck + ApiResponse HealthzWithHttpInfo(string? xRequestID = default(string?)); + /// + /// Server health check + /// + /// Thrown when fails to make API call + /// (optional) + /// DeviceInfo + [Obsolete] + DeviceInfo Ping(string? xRequestID = default(string?)); /// /// Server health check @@ -53,23 +60,49 @@ public interface IHealthcheckApi : IApi /// /// /// + /// Thrown when fails to make API call /// (optional) - /// Cancellation Token to cancel the request. - /// <?> - Task HealthzOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + /// ApiResponse of DeviceInfo + [Obsolete] + ApiResponse PingWithHttpInfo(string? xRequestID = default(string?)); + /// + /// License health check + /// + /// Thrown when fails to make API call + /// (optional) + /// + void Readyz(string? xRequestID = default(string?)); + /// + /// License health check + /// + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + ApiResponse ReadyzWithHttpInfo(string? xRequestID = default(string?)); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IHealthcheckApiAsync : IApiAccessor + { + #region Asynchronous Operations /// /// Server health check /// /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <> - [Obsolete] - Task PingAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + /// Task of Healthcheck + System.Threading.Tasks.Task HealthzAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Server health check @@ -77,807 +110,610 @@ public interface IHealthcheckApi : IApi /// /// /// + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <?> - [Obsolete] - Task PingOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); - + /// Task of ApiResponse (Healthcheck) + System.Threading.Tasks.Task> HealthzWithHttpInfoAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// License health check + /// Server health check /// /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <> - Task ReadyzAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + /// Task of DeviceInfo + [Obsolete] + System.Threading.Tasks.Task PingAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// License health check + /// Server health check /// /// /// /// + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <?> - Task ReadyzOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); - } - - /// - /// The - /// - public interface IHealthzApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk - { + /// Task of ApiResponse (DeviceInfo) + [Obsolete] + System.Threading.Tasks.Task> PingWithHttpInfoAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// Returns true if the response is 200 Ok + /// License health check /// - /// - bool IsOk { get; } - } + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of void + System.Threading.Tasks.Task ReadyzAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// The - /// - public interface IPingApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk - { /// - /// Returns true if the response is 200 Ok + /// License health check /// - /// - bool IsOk { get; } + /// + /// + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse + System.Threading.Tasks.Task> ReadyzWithHttpInfoAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + #endregion Asynchronous Operations } /// - /// The + /// Represents a collection of functions to interact with the API endpoints /// - public interface IReadyzApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse + public interface IHealthcheckApi : IHealthcheckApiSync, IHealthcheckApiAsync { - /// - /// Returns true if the response is 200 Ok - /// - /// - bool IsOk { get; } - /// - /// Returns true if the response is 400 BadRequest - /// - /// - bool IsBadRequest { get; } } /// /// Represents a collection of functions to interact with the API endpoints /// - public class HealthcheckApiEvents + public partial class HealthcheckApi : IDisposable, IHealthcheckApi { - /// - /// The event raised after the server response - /// - public event EventHandler? OnHealthz; + private Regula.DocumentReader.WebClient.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// - /// The event raised after an error querying the server + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// - public event EventHandler? OnErrorHealthz; - - internal void ExecuteOnHealthz(HealthcheckApi.HealthzApiResponse apiResponse) - { - OnHealthz?.Invoke(this, new ApiResponseEventArgs(apiResponse)); - } - - internal void ExecuteOnErrorHealthz(Exception exception) + /// + public HealthcheckApi() : this((string)null) { - OnErrorHealthz?.Invoke(this, new ExceptionEventArgs(exception)); } /// - /// The event raised after the server response + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// - public event EventHandler? OnPing; + /// The target service's base path in URL format. + /// + /// + public HealthcheckApi(string basePath) + { + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + new Regula.DocumentReader.WebClient.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + } /// - /// The event raised after an error querying the server + /// Initializes a new instance of the class using Configuration object. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// - public event EventHandler? OnErrorPing; - - internal void ExecuteOnPing(HealthcheckApi.PingApiResponse apiResponse) + /// An instance of Configuration. + /// + /// + public HealthcheckApi(Regula.DocumentReader.WebClient.Client.Configuration configuration) { - OnPing?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; } - internal void ExecuteOnErrorPing(Exception exception) + /// + /// Initializes a new instance of the class. + /// + /// An instance of HttpClient. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// + /// + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public HealthcheckApi(HttpClient client, HttpClientHandler handler = null) : this(client, (string)null, handler) { - OnErrorPing?.Invoke(this, new ExceptionEventArgs(exception)); } /// - /// The event raised after the server response + /// Initializes a new instance of the class. /// - public event EventHandler? OnReadyz; + /// An instance of HttpClient. + /// The target service's base path in URL format. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// + /// + /// + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public HealthcheckApi(HttpClient client, string basePath, HttpClientHandler handler = null) + { + if (client == null) throw new ArgumentNullException("client"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + new Regula.DocumentReader.WebClient.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(client, this.Configuration.BasePath, handler); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + } /// - /// The event raised after an error querying the server + /// Initializes a new instance of the class using Configuration object. /// - public event EventHandler? OnErrorReadyz; - - internal void ExecuteOnReadyz(HealthcheckApi.ReadyzApiResponse apiResponse) + /// An instance of HttpClient. + /// An instance of Configuration. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// + /// + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public HealthcheckApi(HttpClient client, Regula.DocumentReader.WebClient.Client.Configuration configuration, HttpClientHandler handler = null) { - OnReadyz?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + if (configuration == null) throw new ArgumentNullException("configuration"); + if (client == null) throw new ArgumentNullException("client"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(client, this.Configuration.BasePath, handler); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; } - internal void ExecuteOnErrorReadyz(Exception exception) + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + /// + public HealthcheckApi(Regula.DocumentReader.WebClient.Client.ISynchronousClient client, Regula.DocumentReader.WebClient.Client.IAsynchronousClient asyncClient, Regula.DocumentReader.WebClient.Client.IReadableConfiguration configuration) { - OnErrorReadyz?.Invoke(this, new ExceptionEventArgs(exception)); + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; } - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public sealed partial class HealthcheckApi : IHealthcheckApi - { - private JsonSerializerOptions _jsonSerializerOptions; /// - /// The logger factory + /// Disposes resources if they were created by us /// - public ILoggerFactory LoggerFactory { get; } + public void Dispose() + { + this.ApiClient?.Dispose(); + } /// - /// The logger + /// Holds the ApiClient if created /// - public ILogger Logger { get; } + public Regula.DocumentReader.WebClient.Client.ApiClient ApiClient { get; set; } = null; /// - /// The HttpClient + /// The client for accessing this underlying API asynchronously. /// - public HttpClient HttpClient { get; } + public Regula.DocumentReader.WebClient.Client.IAsynchronousClient AsynchronousClient { get; set; } /// - /// The class containing the events + /// The client for accessing this underlying API synchronously. /// - public HealthcheckApiEvents Events { get; } + public Regula.DocumentReader.WebClient.Client.ISynchronousClient Client { get; set; } /// - /// Initializes a new instance of the class. + /// Gets the base path of the API client. /// - /// - public HealthcheckApi(ILogger logger, ILoggerFactory loggerFactory, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, HealthcheckApiEvents healthcheckApiEvents) + /// The base path + public string GetBasePath() { - _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - LoggerFactory = loggerFactory; - Logger = LoggerFactory.CreateLogger(); - HttpClient = httpClient; - Events = healthcheckApiEvents; + return this.Configuration.BasePath; } - partial void FormatHealthz(ref Option xRequestID); - /// - /// Validates the request parameters + /// Gets or sets the configuration object /// - /// - /// - private void ValidateHealthz(Option xRequestID) - { - if (xRequestID.IsSet && xRequestID.Value == null) - throw new ArgumentNullException(nameof(xRequestID)); - } + /// An instance of the Configuration + public Regula.DocumentReader.WebClient.Client.IReadableConfiguration Configuration { get; set; } /// - /// Processes the server response + /// Provides a factory method hook for the creation of exceptions. /// - /// - /// - private void AfterHealthzDefaultImplementation(IHealthzApiResponse apiResponseLocalVar, Option xRequestID) + public Regula.DocumentReader.WebClient.Client.ExceptionFactory ExceptionFactory { - bool suppressDefaultLog = false; - AfterHealthz(ref suppressDefaultLog, apiResponseLocalVar, xRequestID); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } } /// - /// Processes the server response - /// - /// - /// - /// - partial void AfterHealthz(ref bool suppressDefaultLog, IHealthzApiResponse apiResponseLocalVar, Option xRequestID); - - /// - /// Logs exceptions that occur while retrieving the server response + /// Server health check /// - /// - /// - /// - /// - private void OnErrorHealthzDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID) + /// Thrown when fails to make API call + /// (optional) + /// Healthcheck + public Healthcheck Healthz(string? xRequestID = default(string?)) { - bool suppressDefaultLogLocalVar = false; - OnErrorHealthz(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, xRequestID); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = HealthzWithHttpInfo(xRequestID); + return localVarResponse.Data; } - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - partial void OnErrorHealthz(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID); - /// /// Server health check /// + /// Thrown when fails to make API call /// (optional) - /// Cancellation Token to cancel the request. - /// <> - public async Task HealthzOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + /// ApiResponse of Healthcheck + public Regula.DocumentReader.WebClient.Client.ApiResponse HealthzWithHttpInfo(string? xRequestID = default(string?)) { - try + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); + + string[] _contentTypes = new string[] { + }; + + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; + + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + if (xRequestID != null) { - return await HealthzAsync(xRequestID, cancellationToken).ConfigureAwait(false); + localVarRequestOptions.HeaderParameters.Add("X-RequestID", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(xRequestID)); // header parameter } - catch (Exception) + + + // make the HTTP request + var localVarResponse = this.Client.Get("/api/healthz", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) { - return null; + Exception _exception = this.ExceptionFactory("Healthz", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// /// Server health check /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <> - public async Task HealthzAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + /// Task of Healthcheck + public async System.Threading.Tasks.Task HealthzAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - ValidateHealthz(xRequestID); - - FormatHealthz(ref xRequestID); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/healthz"; - - if (xRequestID.IsSet) - httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await HealthzWithHttpInfoAsync(xRequestID, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + /// + /// Server health check + /// + /// Thrown when fails to make API call + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Healthcheck) + public async System.Threading.Tasks.Task> HealthzWithHttpInfoAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { - string[] acceptLocalVars = new string[] { - "application/json" - }; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + string[] _contentTypes = new string[] { + }; - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - httpRequestMessageLocalVar.Method = HttpMethod.Get; - DateTime requestedAtLocalVar = DateTime.UtcNow; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + if (xRequestID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-RequestID", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(xRequestID)); // header parameter + } - HealthzApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/healthz", requestedAtLocalVar, _jsonSerializerOptions); - AfterHealthzDefaultImplementation(apiResponseLocalVar, xRequestID); + // make the HTTP request - Events.ExecuteOnHealthz(apiResponseLocalVar); + var localVarResponse = await this.AsynchronousClient.GetAsync("/api/healthz", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (this.ExceptionFactory != null) { - OnErrorHealthzDefaultImplementation(e, "/api/healthz", uriBuilderLocalVar.Path, xRequestID); - Events.ExecuteOnErrorHealthz(e); - throw; + Exception _exception = this.ExceptionFactory("Healthz", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// - /// The + /// Server health check /// - public partial class HealthzApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IHealthzApiResponse + /// Thrown when fails to make API call + /// (optional) + /// DeviceInfo + [Obsolete] + public DeviceInfo Ping(string? xRequestID = default(string?)) { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public HealthzApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } - - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = PingWithHttpInfo(xRequestID); + return localVarResponse.Data; + } - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; + /// + /// Server health check + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of DeviceInfo + [Obsolete] + public Regula.DocumentReader.WebClient.Client.ApiResponse PingWithHttpInfo(string? xRequestID = default(string?)) + { + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// Deserializes the response if the response is 200 Ok - /// - /// - public Regula.DocumentReader.WebClient.Model.Healthcheck? Ok() - { - // This logic may be modified with the AsModel.mustache template - return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; - } + string[] _contentTypes = new string[] { + }; - /// - /// Returns true if the response is 200 Ok and the deserialized response is not null - /// - /// - /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.Healthcheck? result) - { - result = null; + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - try - { - result = Ok(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); - } + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - return result != null; - } + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + if (xRequestID != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + localVarRequestOptions.HeaderParameters.Add("X-RequestID", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(xRequestID)); // header parameter } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); - } - partial void FormatPing(ref Option xRequestID); + // make the HTTP request + var localVarResponse = this.Client.Get("/api/ping", localVarRequestOptions, this.Configuration); - /// - /// Validates the request parameters - /// - /// - /// - private void ValidatePing(Option xRequestID) - { - if (xRequestID.IsSet && xRequestID.Value == null) - throw new ArgumentNullException(nameof(xRequestID)); - } - - /// - /// Processes the server response - /// - /// - /// - private void AfterPingDefaultImplementation(IPingApiResponse apiResponseLocalVar, Option xRequestID) - { - bool suppressDefaultLog = false; - AfterPing(ref suppressDefaultLog, apiResponseLocalVar, xRequestID); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); - } - - /// - /// Processes the server response - /// - /// - /// - /// - partial void AfterPing(ref bool suppressDefaultLog, IPingApiResponse apiResponseLocalVar, Option xRequestID); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Ping", localVarResponse); + if (_exception != null) throw _exception; + } - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - /// - private void OnErrorPingDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID) - { - bool suppressDefaultLogLocalVar = false; - OnErrorPing(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, xRequestID); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + return localVarResponse; } - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - partial void OnErrorPing(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID); - /// /// Server health check /// + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <> - public async Task PingOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + /// Task of DeviceInfo + [Obsolete] + public async System.Threading.Tasks.Task PingAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - try - { - return await PingAsync(xRequestID, cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await PingWithHttpInfoAsync(xRequestID, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// /// Server health check /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <> - public async Task PingAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + /// Task of ApiResponse (DeviceInfo) + [Obsolete] + public async System.Threading.Tasks.Task> PingWithHttpInfoAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - ValidatePing(xRequestID); - - FormatPing(ref xRequestID); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/ping"; - - if (xRequestID.IsSet) - httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - string[] acceptLocalVars = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { + }; - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = HttpMethod.Get; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - DateTime requestedAtLocalVar = DateTime.UtcNow; + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + if (xRequestID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-RequestID", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(xRequestID)); // header parameter + } - PingApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/ping", requestedAtLocalVar, _jsonSerializerOptions); - AfterPingDefaultImplementation(apiResponseLocalVar, xRequestID); + // make the HTTP request - Events.ExecuteOnPing(apiResponseLocalVar); + var localVarResponse = await this.AsynchronousClient.GetAsync("/api/ping", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (this.ExceptionFactory != null) { - OnErrorPingDefaultImplementation(e, "/api/ping", uriBuilderLocalVar.Path, xRequestID); - Events.ExecuteOnErrorPing(e); - throw; + Exception _exception = this.ExceptionFactory("Ping", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// - /// The + /// License health check /// - public partial class PingApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IPingApiResponse + /// Thrown when fails to make API call + /// (optional) + /// + public void Readyz(string? xRequestID = default(string?)) { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public PingApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } + ReadyzWithHttpInfo(xRequestID); + } - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + /// + /// License health check + /// + /// Thrown when fails to make API call + /// (optional) + /// ApiResponse of Object(void) + public Regula.DocumentReader.WebClient.Client.ApiResponse ReadyzWithHttpInfo(string? xRequestID = default(string?)) + { + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; + string[] _contentTypes = new string[] { + }; - /// - /// Deserializes the response if the response is 200 Ok - /// - /// - public Regula.DocumentReader.WebClient.Model.DeviceInfo? Ok() - { - // This logic may be modified with the AsModel.mustache template - return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; - } + // to determine the Accept header + string[] _accepts = new string[] { + }; - /// - /// Returns true if the response is 200 Ok and the deserialized response is not null - /// - /// - /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.DeviceInfo? result) - { - result = null; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - try - { - result = Ok(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); - } + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - return result != null; - } - - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + if (xRequestID != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + localVarRequestOptions.HeaderParameters.Add("X-RequestID", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(xRequestID)); // header parameter } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); - } - partial void FormatReadyz(ref Option xRequestID); + // make the HTTP request + var localVarResponse = this.Client.Get("/api/readyz", localVarRequestOptions, this.Configuration); - /// - /// Validates the request parameters - /// - /// - /// - private void ValidateReadyz(Option xRequestID) - { - if (xRequestID.IsSet && xRequestID.Value == null) - throw new ArgumentNullException(nameof(xRequestID)); - } - - /// - /// Processes the server response - /// - /// - /// - private void AfterReadyzDefaultImplementation(IReadyzApiResponse apiResponseLocalVar, Option xRequestID) - { - bool suppressDefaultLog = false; - AfterReadyz(ref suppressDefaultLog, apiResponseLocalVar, xRequestID); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); - } - - /// - /// Processes the server response - /// - /// - /// - /// - partial void AfterReadyz(ref bool suppressDefaultLog, IReadyzApiResponse apiResponseLocalVar, Option xRequestID); + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Readyz", localVarResponse); + if (_exception != null) throw _exception; + } - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - /// - private void OnErrorReadyzDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID) - { - bool suppressDefaultLogLocalVar = false; - OnErrorReadyz(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, xRequestID); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + return localVarResponse; } - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - partial void OnErrorReadyz(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Option xRequestID); - /// /// License health check /// + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <> - public async Task ReadyzOrDefaultAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + /// Task of void + public async System.Threading.Tasks.Task ReadyzAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - try - { - return await ReadyzAsync(xRequestID, cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } + await ReadyzWithHttpInfoAsync(xRequestID, cancellationToken).ConfigureAwait(false); } /// /// License health check /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// (optional) /// Cancellation Token to cancel the request. - /// <> - public async Task ReadyzAsync(Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + /// Task of ApiResponse + public async System.Threading.Tasks.Task> ReadyzWithHttpInfoAsync(string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - ValidateReadyz(xRequestID); - - FormatReadyz(ref xRequestID); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/readyz"; - - if (xRequestID.IsSet) - httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - httpRequestMessageLocalVar.Method = HttpMethod.Get; + string[] _contentTypes = new string[] { + }; - DateTime requestedAtLocalVar = DateTime.UtcNow; + // to determine the Accept header + string[] _accepts = new string[] { + }; - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - ReadyzApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/readyz", requestedAtLocalVar, _jsonSerializerOptions); + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - AfterReadyzDefaultImplementation(apiResponseLocalVar, xRequestID); - - Events.ExecuteOnReadyz(apiResponseLocalVar); - - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (xRequestID != null) { - OnErrorReadyzDefaultImplementation(e, "/api/readyz", uriBuilderLocalVar.Path, xRequestID); - Events.ExecuteOnErrorReadyz(e); - throw; - } - } - - /// - /// The - /// - public partial class ReadyzApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IReadyzApiResponse - { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public ReadyzApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); + localVarRequestOptions.HeaderParameters.Add("X-RequestID", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(xRequestID)); // header parameter } - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; + // make the HTTP request - /// - /// Returns true if the response is 400 BadRequest - /// - /// - public bool IsBadRequest => 400 == (int)StatusCode; + var localVarResponse = await this.AsynchronousClient.GetAsync("/api/readyz", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + if (this.ExceptionFactory != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + Exception _exception = this.ExceptionFactory("Readyz", localVarResponse); + if (_exception != null) throw _exception; } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + return localVarResponse; } + } } diff --git a/src/Regula.DocumentReader.WebClient/Api/IApi.cs b/src/Regula.DocumentReader.WebClient/Api/IApi.cs deleted file mode 100644 index 91406aa..0000000 --- a/src/Regula.DocumentReader.WebClient/Api/IApi.cs +++ /dev/null @@ -1,15 +0,0 @@ -using System.Net.Http; - -namespace Regula.DocumentReader.WebClient.Api -{ - /// - /// Any Api client - /// - public interface IApi - { - /// - /// The HttpClient - /// - HttpClient HttpClient { get; } - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs index 4425cc2..e6747b3 100644 --- a/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,45 +7,34 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; using System.Net; -using System.Threading.Tasks; -using Microsoft.Extensions.Logging; using System.Net.Http; -using System.Net.Http.Headers; -using System.Text.Json; +using System.Net.Mime; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; -using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { + /// /// Represents a collection of functions to interact with the API endpoints - /// This class is registered as transient. /// - public interface IProcessApi : IApi + public interface IProcessApiSync : IApiAccessor { - /// - /// The class containing the events - /// - ProcessApiEvents Events { get; } - + #region Synchronous Operations /// /// Process list of documents images and return extracted data /// - /// - /// - /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) - /// Cancellation Token to cancel the request. - /// <> - Task ApiProcessAsync(ProcessRequest processRequest, Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + /// ProcessResponse + ProcessResponse ApiProcess(ProcessRequest processRequest, string? xRequestID = default(string?)); /// /// Process list of documents images and return extracted data @@ -54,356 +42,386 @@ public interface IProcessApi : IApi /// /// /// + /// Thrown when fails to make API call /// /// (optional) - /// Cancellation Token to cancel the request. - /// <?> - Task ApiProcessOrDefaultAsync(ProcessRequest processRequest, Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default); + /// ApiResponse of ProcessResponse + ApiResponse ApiProcessWithHttpInfo(ProcessRequest processRequest, string? xRequestID = default(string?)); + #endregion Synchronous Operations } /// - /// The + /// Represents a collection of functions to interact with the API endpoints /// - public interface IApiProcessApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + public interface IProcessApiAsync : IApiAccessor { + #region Asynchronous Operations /// - /// Returns true if the response is 200 Ok - /// - /// - bool IsOk { get; } - - /// - /// Returns true if the response is 400 BadRequest + /// Process list of documents images and return extracted data /// - /// - bool IsBadRequest { get; } + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ProcessResponse + System.Threading.Tasks.Task ApiProcessAsync(ProcessRequest processRequest, string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// - /// Returns true if the response is 403 Forbidden + /// Process list of documents images and return extracted data /// - /// - bool IsForbidden { get; } + /// + /// + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ProcessResponse) + System.Threading.Tasks.Task> ApiProcessWithHttpInfoAsync(ProcessRequest processRequest, string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + #endregion Asynchronous Operations } /// /// Represents a collection of functions to interact with the API endpoints /// - public class ProcessApiEvents + public interface IProcessApi : IProcessApiSync, IProcessApiAsync { - /// - /// The event raised after the server response - /// - public event EventHandler? OnApiProcess; - - /// - /// The event raised after an error querying the server - /// - public event EventHandler? OnErrorApiProcess; - internal void ExecuteOnApiProcess(ProcessApi.ApiProcessApiResponse apiResponse) - { - OnApiProcess?.Invoke(this, new ApiResponseEventArgs(apiResponse)); - } - - internal void ExecuteOnErrorApiProcess(Exception exception) - { - OnErrorApiProcess?.Invoke(this, new ExceptionEventArgs(exception)); - } } /// /// Represents a collection of functions to interact with the API endpoints /// - public sealed partial class ProcessApi : IProcessApi + public partial class ProcessApi : IDisposable, IProcessApi { - private JsonSerializerOptions _jsonSerializerOptions; + private Regula.DocumentReader.WebClient.Client.ExceptionFactory _exceptionFactory = (name, response) => null; /// - /// The logger factory + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// - public ILoggerFactory LoggerFactory { get; } + /// + public ProcessApi() : this((string)null) + { + } /// - /// The logger + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// - public ILogger Logger { get; } + /// The target service's base path in URL format. + /// + /// + public ProcessApi(string basePath) + { + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + new Regula.DocumentReader.WebClient.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + } /// - /// The HttpClient + /// Initializes a new instance of the class using Configuration object. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// - public HttpClient HttpClient { get; } + /// An instance of Configuration. + /// + /// + public ProcessApi(Regula.DocumentReader.WebClient.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + } /// - /// The class containing the events + /// Initializes a new instance of the class. /// - public ProcessApiEvents Events { get; } + /// An instance of HttpClient. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// + /// + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public ProcessApi(HttpClient client, HttpClientHandler handler = null) : this(client, (string)null, handler) + { + } /// /// Initializes a new instance of the class. /// + /// An instance of HttpClient. + /// The target service's base path in URL format. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// + /// /// - public ProcessApi(ILogger logger, ILoggerFactory loggerFactory, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, ProcessApiEvents processApiEvents) + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public ProcessApi(HttpClient client, string basePath, HttpClientHandler handler = null) { - _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - LoggerFactory = loggerFactory; - Logger = LoggerFactory.CreateLogger(); - HttpClient = httpClient; - Events = processApiEvents; + if (client == null) throw new ArgumentNullException("client"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + new Regula.DocumentReader.WebClient.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(client, this.Configuration.BasePath, handler); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; } - partial void FormatApiProcess(ProcessRequest processRequest, ref Option xRequestID); - /// - /// Validates the request parameters + /// Initializes a new instance of the class using Configuration object. /// - /// - /// + /// An instance of HttpClient. + /// An instance of Configuration. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// /// - private void ValidateApiProcess(ProcessRequest processRequest, Option xRequestID) + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public ProcessApi(HttpClient client, Regula.DocumentReader.WebClient.Client.Configuration configuration, HttpClientHandler handler = null) { - if (processRequest == null) - throw new ArgumentNullException(nameof(processRequest)); + if (configuration == null) throw new ArgumentNullException("configuration"); + if (client == null) throw new ArgumentNullException("client"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(client, this.Configuration.BasePath, handler); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + } - if (xRequestID.IsSet && xRequestID.Value == null) - throw new ArgumentNullException(nameof(xRequestID)); + /// + /// Initializes a new instance of the class + /// using a Configuration object and client instance. + /// + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + /// + public ProcessApi(Regula.DocumentReader.WebClient.Client.ISynchronousClient client, Regula.DocumentReader.WebClient.Client.IAsynchronousClient asyncClient, Regula.DocumentReader.WebClient.Client.IReadableConfiguration configuration) + { + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; } /// - /// Processes the server response + /// Disposes resources if they were created by us /// - /// - /// - /// - private void AfterApiProcessDefaultImplementation(IApiProcessApiResponse apiResponseLocalVar, ProcessRequest processRequest, Option xRequestID) + public void Dispose() { - bool suppressDefaultLog = false; - AfterApiProcess(ref suppressDefaultLog, apiResponseLocalVar, processRequest, xRequestID); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + this.ApiClient?.Dispose(); } /// - /// Processes the server response + /// Holds the ApiClient if created /// - /// - /// - /// - /// - partial void AfterApiProcess(ref bool suppressDefaultLog, IApiProcessApiResponse apiResponseLocalVar, ProcessRequest processRequest, Option xRequestID); + public Regula.DocumentReader.WebClient.Client.ApiClient ApiClient { get; set; } = null; /// - /// Logs exceptions that occur while retrieving the server response + /// The client for accessing this underlying API asynchronously. /// - /// - /// - /// - /// - /// - private void OnErrorApiProcessDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, ProcessRequest processRequest, Option xRequestID) + public Regula.DocumentReader.WebClient.Client.IAsynchronousClient AsynchronousClient { get; set; } + + /// + /// The client for accessing this underlying API synchronously. + /// + public Regula.DocumentReader.WebClient.Client.ISynchronousClient Client { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public string GetBasePath() { - bool suppressDefaultLogLocalVar = false; - OnErrorApiProcess(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, processRequest, xRequestID); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + return this.Configuration.BasePath; } /// - /// A partial method that gives developers a way to provide customized exception handling + /// Gets or sets the configuration object /// - /// - /// - /// - /// - /// - /// - partial void OnErrorApiProcess(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, ProcessRequest processRequest, Option xRequestID); + /// An instance of the Configuration + public Regula.DocumentReader.WebClient.Client.IReadableConfiguration Configuration { get; set; } /// - /// Process list of documents images and return extracted data + /// Provides a factory method hook for the creation of exceptions. /// - /// - /// (optional) - /// Cancellation Token to cancel the request. - /// <> - public async Task ApiProcessOrDefaultAsync(ProcessRequest processRequest, Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + public Regula.DocumentReader.WebClient.Client.ExceptionFactory ExceptionFactory { - try - { - return await ApiProcessAsync(processRequest, xRequestID, cancellationToken).ConfigureAwait(false); - } - catch (Exception) + get { - return null; + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; } + set { _exceptionFactory = value; } } /// /// Process list of documents images and return extracted data /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// /// (optional) - /// Cancellation Token to cancel the request. - /// <> - public async Task ApiProcessAsync(ProcessRequest processRequest, Option xRequestID = default, System.Threading.CancellationToken cancellationToken = default) + /// ProcessResponse + public ProcessResponse ApiProcess(ProcessRequest processRequest, string? xRequestID = default(string?)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - ValidateApiProcess(processRequest, xRequestID); - - FormatApiProcess(processRequest, ref xRequestID); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/process"; - - if (xRequestID.IsSet) - httpRequestMessageLocalVar.Headers.Add("X-RequestID", ClientUtils.ParameterToString(xRequestID.Value)); - - httpRequestMessageLocalVar.Content = (processRequest as object) is System.IO.Stream stream - ? httpRequestMessageLocalVar.Content = new StreamContent(stream) - : httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(processRequest, _jsonSerializerOptions)); - - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; - - string[] contentTypes = new string[] { - "application/json" - }; - - string? contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes); - - if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null) - httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar); - - string[] acceptLocalVars = new string[] { - "application/json" - }; + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiProcessWithHttpInfo(processRequest, xRequestID); + return localVarResponse.Data; + } - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + /// + /// Process list of documents images and return extracted data + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// ApiResponse of ProcessResponse + public Regula.DocumentReader.WebClient.Client.ApiResponse ApiProcessWithHttpInfo(ProcessRequest processRequest, string? xRequestID = default(string?)) + { + // verify the required parameter 'processRequest' is set + if (processRequest == null) + throw new Regula.DocumentReader.WebClient.Client.ApiException(400, "Missing required parameter 'processRequest' when calling ProcessApi->ApiProcess"); - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - httpRequestMessageLocalVar.Method = HttpMethod.Post; + string[] _contentTypes = new string[] { + "application/json" + }; - DateTime requestedAtLocalVar = DateTime.UtcNow; + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - ApiProcessApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/process", requestedAtLocalVar, _jsonSerializerOptions); + if (xRequestID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-RequestID", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(xRequestID)); // header parameter + } + localVarRequestOptions.Data = processRequest; - AfterApiProcessDefaultImplementation(apiResponseLocalVar, processRequest, xRequestID); - Events.ExecuteOnApiProcess(apiResponseLocalVar); + // make the HTTP request + var localVarResponse = this.Client.Post("/api/process", localVarRequestOptions, this.Configuration); - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (this.ExceptionFactory != null) { - OnErrorApiProcessDefaultImplementation(e, "/api/process", uriBuilderLocalVar.Path, processRequest, xRequestID); - Events.ExecuteOnErrorApiProcess(e); - throw; + Exception _exception = this.ExceptionFactory("ApiProcess", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// - /// The + /// Process list of documents images and return extracted data /// - public partial class ApiProcessApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiProcessApiResponse + /// Thrown when fails to make API call + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ProcessResponse + public async System.Threading.Tasks.Task ApiProcessAsync(ProcessRequest processRequest, string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public ApiProcessApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiProcessWithHttpInfoAsync(processRequest, xRequestID, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Process list of documents images and return extracted data + /// + /// Thrown when fails to make API call + /// + /// (optional) + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (ProcessResponse) + public async System.Threading.Tasks.Task> ApiProcessWithHttpInfoAsync(ProcessRequest processRequest, string? xRequestID = default(string?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + // verify the required parameter 'processRequest' is set + if (processRequest == null) + throw new Regula.DocumentReader.WebClient.Client.ApiException(400, "Missing required parameter 'processRequest' when calling ProcessApi->ApiProcess"); - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// Deserializes the response if the response is 200 Ok - /// - /// - public Regula.DocumentReader.WebClient.Model.ProcessResponse? Ok() - { - // This logic may be modified with the AsModel.mustache template - return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; - } + string[] _contentTypes = new string[] { + "application/json" + }; - /// - /// Returns true if the response is 200 Ok and the deserialized response is not null - /// - /// - /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) - { - result = null; + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - try - { - result = Ok(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); - } - return result != null; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); + + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + if (xRequestID != null) + { + localVarRequestOptions.HeaderParameters.Add("X-RequestID", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(xRequestID)); // header parameter } + localVarRequestOptions.Data = processRequest; - /// - /// Returns true if the response is 400 BadRequest - /// - /// - public bool IsBadRequest => 400 == (int)StatusCode; - /// - /// Returns true if the response is 403 Forbidden - /// - /// - public bool IsForbidden => 403 == (int)StatusCode; + // make the HTTP request - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + var localVarResponse = await this.AsynchronousClient.PostAsync("/api/process", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + Exception _exception = this.ExceptionFactory("ApiProcess", localVarResponse); + if (_exception != null) throw _exception; } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + return localVarResponse; } + } } diff --git a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs index 3ca53b0..ec48920 100644 --- a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,32 +7,33 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; using System.Net; -using System.Threading.Tasks; -using Microsoft.Extensions.Logging; using System.Net.Http; -using System.Net.Http.Headers; -using System.Text.Json; +using System.Net.Mime; using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; -using System.Diagnostics.CodeAnalysis; namespace Regula.DocumentReader.WebClient.Api { + /// /// Represents a collection of functions to interact with the API endpoints - /// This class is registered as transient. /// - public interface ITransactionApi : IApi + public interface ITransactionApiSync : IApiAccessor { + #region Synchronous Operations /// - /// The class containing the events + /// Delete Reprocess transactions by tag /// - TransactionApiEvents Events { get; } + /// Thrown when fails to make API call + /// Tag id + /// Object + Object ApiV2TagTagIdDelete(Guid tagId); /// /// Delete Reprocess transactions by tag @@ -41,34 +41,149 @@ public interface ITransactionApi : IApi /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Tag id - /// Cancellation Token to cancel the request. - /// <> - Task ApiV2TagTagIdDeleteAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default); + /// ApiResponse of Object + ApiResponse ApiV2TagTagIdDeleteWithHttpInfo(Guid tagId); + /// + /// Get transactions by tag + /// + /// Thrown when fails to make API call + /// Tag id + /// ListTransactionsByTagResponse + ListTransactionsByTagResponse ApiV2TagTagIdTransactionsGet(string tagId); + + /// + /// Get transactions by tag + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Tag id + /// ApiResponse of ListTransactionsByTagResponse + ApiResponse ApiV2TagTagIdTransactionsGetWithHttpInfo(string tagId); + /// + /// Get Reprocess transaction file + /// + /// Thrown when fails to make API call + /// Transaction id + /// File name + /// FileParameter + FileParameter ApiV2TransactionTransactionIdFileGet(Guid transactionId, string name); + + /// + /// Get Reprocess transaction file + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Transaction id + /// File name + /// ApiResponse of FileParameter + ApiResponse ApiV2TransactionTransactionIdFileGetWithHttpInfo(Guid transactionId, string name); + /// + /// Get Reprocess transaction data + /// + /// Thrown when fails to make API call + /// Transaction id + /// TransactionProcessGetResponse + TransactionProcessGetResponse ApiV2TransactionTransactionIdGet(Guid transactionId); + + /// + /// Get Reprocess transaction data + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Transaction id + /// ApiResponse of TransactionProcessGetResponse + ApiResponse ApiV2TransactionTransactionIdGetWithHttpInfo(Guid transactionId); + /// + /// Reprocess + /// + /// Thrown when fails to make API call + /// Transaction id + /// + /// TransactionProcessResult + TransactionProcessResult ApiV2TransactionTransactionIdProcessPost(Guid transactionId, TransactionProcessRequest transactionProcessRequest); + + /// + /// Reprocess + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Transaction id + /// + /// ApiResponse of TransactionProcessResult + ApiResponse ApiV2TransactionTransactionIdProcessPostWithHttpInfo(Guid transactionId, TransactionProcessRequest transactionProcessRequest); + /// + /// Get Reprocess transaction result + /// + /// Thrown when fails to make API call + /// Transaction id + /// With base64 images or url (optional) + /// ProcessResponse + ProcessResponse ApiV2TransactionTransactionIdResultsGet(Guid transactionId, bool? withImages = default(bool?)); + + /// + /// Get Reprocess transaction result + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Transaction id + /// With base64 images or url (optional) + /// ApiResponse of ProcessResponse + ApiResponse ApiV2TransactionTransactionIdResultsGetWithHttpInfo(Guid transactionId, bool? withImages = default(bool?)); + #endregion Synchronous Operations + } + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITransactionApiAsync : IApiAccessor + { + #region Asynchronous Operations /// /// Delete Reprocess transactions by tag /// /// /// /// + /// Thrown when fails to make API call /// Tag id /// Cancellation Token to cancel the request. - /// <?> - Task ApiV2TagTagIdDeleteOrDefaultAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default); + /// Task of Object + System.Threading.Tasks.Task ApiV2TagTagIdDeleteAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + /// + /// Delete Reprocess transactions by tag + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Tag id + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (Object) + System.Threading.Tasks.Task> ApiV2TagTagIdDeleteWithHttpInfoAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get transactions by tag /// /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Tag id /// Cancellation Token to cancel the request. - /// <> - Task ApiV2TagTagIdTransactionsGetAsync(string tagId, System.Threading.CancellationToken cancellationToken = default); + /// Task of ListTransactionsByTagResponse + System.Threading.Tasks.Task ApiV2TagTagIdTransactionsGetAsync(string tagId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get transactions by tag @@ -76,23 +191,23 @@ public interface ITransactionApi : IApi /// /// /// + /// Thrown when fails to make API call /// Tag id /// Cancellation Token to cancel the request. - /// <?> - Task ApiV2TagTagIdTransactionsGetOrDefaultAsync(string tagId, System.Threading.CancellationToken cancellationToken = default); - + /// Task of ApiResponse (ListTransactionsByTagResponse) + System.Threading.Tasks.Task> ApiV2TagTagIdTransactionsGetWithHttpInfoAsync(string tagId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Reprocess transaction file /// /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Transaction id /// File name /// Cancellation Token to cancel the request. - /// <> - Task ApiV2TransactionTransactionIdFileGetAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default); + /// Task of FileParameter + System.Threading.Tasks.Task ApiV2TransactionTransactionIdFileGetAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Reprocess transaction file @@ -100,23 +215,23 @@ public interface ITransactionApi : IApi /// /// /// + /// Thrown when fails to make API call /// Transaction id /// File name /// Cancellation Token to cancel the request. - /// <?> - Task ApiV2TransactionTransactionIdFileGetOrDefaultAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default); - + /// Task of ApiResponse (FileParameter) + System.Threading.Tasks.Task> ApiV2TransactionTransactionIdFileGetWithHttpInfoAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Reprocess transaction data /// /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Transaction id /// Cancellation Token to cancel the request. - /// <> - Task ApiV2TransactionTransactionIdGetAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default); + /// Task of TransactionProcessGetResponse + System.Threading.Tasks.Task ApiV2TransactionTransactionIdGetAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Reprocess transaction data @@ -124,23 +239,23 @@ public interface ITransactionApi : IApi /// /// /// + /// Thrown when fails to make API call /// Transaction id /// Cancellation Token to cancel the request. - /// <?> - Task ApiV2TransactionTransactionIdGetOrDefaultAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default); - + /// Task of ApiResponse (TransactionProcessGetResponse) + System.Threading.Tasks.Task> ApiV2TransactionTransactionIdGetWithHttpInfoAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Reprocess /// /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Transaction id /// /// Cancellation Token to cancel the request. - /// <> - Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default); + /// Task of TransactionProcessResult + System.Threading.Tasks.Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Reprocess @@ -148,24 +263,24 @@ public interface ITransactionApi : IApi /// /// /// + /// Thrown when fails to make API call /// Transaction id /// /// Cancellation Token to cancel the request. - /// <?> - Task ApiV2TransactionTransactionIdProcessPostOrDefaultAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default); - + /// Task of ApiResponse (TransactionProcessResult) + System.Threading.Tasks.Task> ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Reprocess transaction result /// /// /// /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Transaction id /// With base64 images or url (optional) /// Cancellation Token to cancel the request. - /// <> - Task ApiV2TransactionTransactionIdResultsGetAsync(Guid transactionId, Option withImages = default, System.Threading.CancellationToken cancellationToken = default); + /// Task of ProcessResponse + System.Threading.Tasks.Task ApiV2TransactionTransactionIdResultsGetAsync(Guid transactionId, bool? withImages = default(bool?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); /// /// Get Reprocess transaction result @@ -173,1694 +288,916 @@ public interface ITransactionApi : IApi /// /// /// + /// Thrown when fails to make API call /// Transaction id /// With base64 images or url (optional) /// Cancellation Token to cancel the request. - /// <?> - Task ApiV2TransactionTransactionIdResultsGetOrDefaultAsync(Guid transactionId, Option withImages = default, System.Threading.CancellationToken cancellationToken = default); - } - - /// - /// The - /// - public interface IApiV2TagTagIdDeleteApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, INoContent - { - /// - /// Returns true if the response is 204 NoContent - /// - /// - bool IsNoContent { get; } - - /// - /// Returns true if the response is 400 BadRequest - /// - /// - bool IsBadRequest { get; } - - /// - /// Returns true if the response is 403 Forbidden - /// - /// - bool IsForbidden { get; } - } - - /// - /// The - /// - public interface IApiV2TagTagIdTransactionsGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk - { - /// - /// Returns true if the response is 200 Ok - /// - /// - bool IsOk { get; } - - /// - /// Returns true if the response is 400 BadRequest - /// - /// - bool IsBadRequest { get; } - - /// - /// Returns true if the response is 403 Forbidden - /// - /// - bool IsForbidden { get; } + /// Task of ApiResponse (ProcessResponse) + System.Threading.Tasks.Task> ApiV2TransactionTransactionIdResultsGetWithHttpInfoAsync(Guid transactionId, bool? withImages = default(bool?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + #endregion Asynchronous Operations } /// - /// The + /// Represents a collection of functions to interact with the API endpoints /// - public interface IApiV2TransactionTransactionIdFileGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + public interface ITransactionApi : ITransactionApiSync, ITransactionApiAsync { - /// - /// Returns true if the response is 200 Ok - /// - /// - bool IsOk { get; } - /// - /// Returns true if the response is 404 NotFound - /// - /// - bool IsNotFound { get; } } /// - /// The + /// Represents a collection of functions to interact with the API endpoints /// - public interface IApiV2TransactionTransactionIdGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk + public partial class TransactionApi : IDisposable, ITransactionApi { - /// - /// Returns true if the response is 200 Ok - /// - /// - bool IsOk { get; } - - /// - /// Returns true if the response is 400 BadRequest - /// - /// - bool IsBadRequest { get; } - - /// - /// Returns true if the response is 403 Forbidden - /// - /// - bool IsForbidden { get; } - } + private Regula.DocumentReader.WebClient.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - /// - /// The - /// - public interface IApiV2TransactionTransactionIdProcessPostApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk - { /// - /// Returns true if the response is 200 Ok + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// /// - bool IsOk { get; } + public TransactionApi() : this((string)null) + { + } /// - /// Returns true if the response is 400 BadRequest + /// Initializes a new instance of the class. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// + /// The target service's base path in URL format. + /// /// - bool IsBadRequest { get; } + public TransactionApi(string basePath) + { + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + new Regula.DocumentReader.WebClient.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + } /// - /// Returns true if the response is 403 Forbidden + /// Initializes a new instance of the class using Configuration object. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. /// + /// An instance of Configuration. + /// /// - bool IsForbidden { get; } - } + public TransactionApi(Regula.DocumentReader.WebClient.Client.Configuration configuration) + { + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(this.Configuration.BasePath); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + } - /// - /// The - /// - public interface IApiV2TransactionTransactionIdResultsGetApiResponse : Regula.DocumentReader.WebClient.Client.IApiResponse, IOk - { /// - /// Returns true if the response is 200 Ok + /// Initializes a new instance of the class. /// + /// An instance of HttpClient. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// /// - bool IsOk { get; } + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public TransactionApi(HttpClient client, HttpClientHandler handler = null) : this(client, (string)null, handler) + { + } /// - /// Returns true if the response is 400 BadRequest + /// Initializes a new instance of the class. /// + /// An instance of HttpClient. + /// The target service's base path in URL format. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// + /// /// - bool IsBadRequest { get; } + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public TransactionApi(HttpClient client, string basePath, HttpClientHandler handler = null) + { + if (client == null) throw new ArgumentNullException("client"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + new Regula.DocumentReader.WebClient.Client.Configuration { BasePath = basePath } + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(client, this.Configuration.BasePath, handler); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; + } /// - /// Returns true if the response is 403 Forbidden + /// Initializes a new instance of the class using Configuration object. /// + /// An instance of HttpClient. + /// An instance of Configuration. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// /// - bool IsForbidden { get; } - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public class TransactionApiEvents - { - /// - /// The event raised after the server response - /// - public event EventHandler? OnApiV2TagTagIdDelete; - - /// - /// The event raised after an error querying the server - /// - public event EventHandler? OnErrorApiV2TagTagIdDelete; - - internal void ExecuteOnApiV2TagTagIdDelete(TransactionApi.ApiV2TagTagIdDeleteApiResponse apiResponse) - { - OnApiV2TagTagIdDelete?.Invoke(this, new ApiResponseEventArgs(apiResponse)); - } - - internal void ExecuteOnErrorApiV2TagTagIdDelete(Exception exception) + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public TransactionApi(HttpClient client, Regula.DocumentReader.WebClient.Client.Configuration configuration, HttpClientHandler handler = null) { - OnErrorApiV2TagTagIdDelete?.Invoke(this, new ExceptionEventArgs(exception)); + if (configuration == null) throw new ArgumentNullException("configuration"); + if (client == null) throw new ArgumentNullException("client"); + + this.Configuration = Regula.DocumentReader.WebClient.Client.Configuration.MergeConfigurations( + Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance, + configuration + ); + this.ApiClient = new Regula.DocumentReader.WebClient.Client.ApiClient(client, this.Configuration.BasePath, handler); + this.Client = this.ApiClient; + this.AsynchronousClient = this.ApiClient; + ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; } /// - /// The event raised after the server response - /// - public event EventHandler? OnApiV2TagTagIdTransactionsGet; - - /// - /// The event raised after an error querying the server + /// Initializes a new instance of the class + /// using a Configuration object and client instance. /// - public event EventHandler? OnErrorApiV2TagTagIdTransactionsGet; - - internal void ExecuteOnApiV2TagTagIdTransactionsGet(TransactionApi.ApiV2TagTagIdTransactionsGetApiResponse apiResponse) - { - OnApiV2TagTagIdTransactionsGet?.Invoke(this, new ApiResponseEventArgs(apiResponse)); - } - - internal void ExecuteOnErrorApiV2TagTagIdTransactionsGet(Exception exception) + /// The client interface for synchronous API access. + /// The client interface for asynchronous API access. + /// The configuration object. + /// + public TransactionApi(Regula.DocumentReader.WebClient.Client.ISynchronousClient client, Regula.DocumentReader.WebClient.Client.IAsynchronousClient asyncClient, Regula.DocumentReader.WebClient.Client.IReadableConfiguration configuration) { - OnErrorApiV2TagTagIdTransactionsGet?.Invoke(this, new ExceptionEventArgs(exception)); + if (client == null) throw new ArgumentNullException("client"); + if (asyncClient == null) throw new ArgumentNullException("asyncClient"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + this.Client = client; + this.AsynchronousClient = asyncClient; + this.Configuration = configuration; + this.ExceptionFactory = Regula.DocumentReader.WebClient.Client.Configuration.DefaultExceptionFactory; } /// - /// The event raised after the server response + /// Disposes resources if they were created by us /// - public event EventHandler? OnApiV2TransactionTransactionIdFileGet; - - /// - /// The event raised after an error querying the server - /// - public event EventHandler? OnErrorApiV2TransactionTransactionIdFileGet; - - internal void ExecuteOnApiV2TransactionTransactionIdFileGet(TransactionApi.ApiV2TransactionTransactionIdFileGetApiResponse apiResponse) + public void Dispose() { - OnApiV2TransactionTransactionIdFileGet?.Invoke(this, new ApiResponseEventArgs(apiResponse)); - } - - internal void ExecuteOnErrorApiV2TransactionTransactionIdFileGet(Exception exception) - { - OnErrorApiV2TransactionTransactionIdFileGet?.Invoke(this, new ExceptionEventArgs(exception)); + this.ApiClient?.Dispose(); } /// - /// The event raised after the server response + /// Holds the ApiClient if created /// - public event EventHandler? OnApiV2TransactionTransactionIdGet; + public Regula.DocumentReader.WebClient.Client.ApiClient ApiClient { get; set; } = null; /// - /// The event raised after an error querying the server + /// The client for accessing this underlying API asynchronously. /// - public event EventHandler? OnErrorApiV2TransactionTransactionIdGet; - - internal void ExecuteOnApiV2TransactionTransactionIdGet(TransactionApi.ApiV2TransactionTransactionIdGetApiResponse apiResponse) - { - OnApiV2TransactionTransactionIdGet?.Invoke(this, new ApiResponseEventArgs(apiResponse)); - } - - internal void ExecuteOnErrorApiV2TransactionTransactionIdGet(Exception exception) - { - OnErrorApiV2TransactionTransactionIdGet?.Invoke(this, new ExceptionEventArgs(exception)); - } + public Regula.DocumentReader.WebClient.Client.IAsynchronousClient AsynchronousClient { get; set; } /// - /// The event raised after the server response + /// The client for accessing this underlying API synchronously. /// - public event EventHandler? OnApiV2TransactionTransactionIdProcessPost; + public Regula.DocumentReader.WebClient.Client.ISynchronousClient Client { get; set; } /// - /// The event raised after an error querying the server + /// Gets the base path of the API client. /// - public event EventHandler? OnErrorApiV2TransactionTransactionIdProcessPost; - - internal void ExecuteOnApiV2TransactionTransactionIdProcessPost(TransactionApi.ApiV2TransactionTransactionIdProcessPostApiResponse apiResponse) - { - OnApiV2TransactionTransactionIdProcessPost?.Invoke(this, new ApiResponseEventArgs(apiResponse)); - } - - internal void ExecuteOnErrorApiV2TransactionTransactionIdProcessPost(Exception exception) + /// The base path + public string GetBasePath() { - OnErrorApiV2TransactionTransactionIdProcessPost?.Invoke(this, new ExceptionEventArgs(exception)); + return this.Configuration.BasePath; } /// - /// The event raised after the server response + /// Gets or sets the configuration object /// - public event EventHandler? OnApiV2TransactionTransactionIdResultsGet; + /// An instance of the Configuration + public Regula.DocumentReader.WebClient.Client.IReadableConfiguration Configuration { get; set; } /// - /// The event raised after an error querying the server + /// Provides a factory method hook for the creation of exceptions. /// - public event EventHandler? OnErrorApiV2TransactionTransactionIdResultsGet; - - internal void ExecuteOnApiV2TransactionTransactionIdResultsGet(TransactionApi.ApiV2TransactionTransactionIdResultsGetApiResponse apiResponse) + public Regula.DocumentReader.WebClient.Client.ExceptionFactory ExceptionFactory { - OnApiV2TransactionTransactionIdResultsGet?.Invoke(this, new ApiResponseEventArgs(apiResponse)); + get + { + if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) + { + throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); + } + return _exceptionFactory; + } + set { _exceptionFactory = value; } } - internal void ExecuteOnErrorApiV2TransactionTransactionIdResultsGet(Exception exception) + /// + /// Delete Reprocess transactions by tag + /// + /// Thrown when fails to make API call + /// Tag id + /// Object + public Object ApiV2TagTagIdDelete(Guid tagId) { - OnErrorApiV2TransactionTransactionIdResultsGet?.Invoke(this, new ExceptionEventArgs(exception)); + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiV2TagTagIdDeleteWithHttpInfo(tagId); + return localVarResponse.Data; } - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public sealed partial class TransactionApi : ITransactionApi - { - private JsonSerializerOptions _jsonSerializerOptions; /// - /// The logger factory + /// Delete Reprocess transactions by tag /// - public ILoggerFactory LoggerFactory { get; } + /// Thrown when fails to make API call + /// Tag id + /// ApiResponse of Object + public Regula.DocumentReader.WebClient.Client.ApiResponse ApiV2TagTagIdDeleteWithHttpInfo(Guid tagId) + { + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// The logger - /// - public ILogger Logger { get; } + string[] _contentTypes = new string[] { + }; - /// - /// The HttpClient - /// - public HttpClient HttpClient { get; } + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - /// - /// The class containing the events - /// - public TransactionApiEvents Events { get; } + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - /// - /// Initializes a new instance of the class. - /// - /// - public TransactionApi(ILogger logger, ILoggerFactory loggerFactory, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, TransactionApiEvents transactionApiEvents) - { - _jsonSerializerOptions = jsonSerializerOptionsProvider.Options; - LoggerFactory = loggerFactory; - Logger = LoggerFactory.CreateLogger(); - HttpClient = httpClient; - Events = transactionApiEvents; - } + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - partial void FormatApiV2TagTagIdDelete(ref Guid tagId); + localVarRequestOptions.PathParameters.Add("tagId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(tagId)); // path parameter - /// - /// Processes the server response - /// - /// - /// - private void AfterApiV2TagTagIdDeleteDefaultImplementation(IApiV2TagTagIdDeleteApiResponse apiResponseLocalVar, Guid tagId) - { - bool suppressDefaultLog = false; - AfterApiV2TagTagIdDelete(ref suppressDefaultLog, apiResponseLocalVar, tagId); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); - } - /// - /// Processes the server response - /// - /// - /// - /// - partial void AfterApiV2TagTagIdDelete(ref bool suppressDefaultLog, IApiV2TagTagIdDeleteApiResponse apiResponseLocalVar, Guid tagId); + // make the HTTP request + var localVarResponse = this.Client.Delete("/api/v2/tag/{tagId}", localVarRequestOptions, this.Configuration); - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - /// - private void OnErrorApiV2TagTagIdDeleteDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid tagId) - { - bool suppressDefaultLogLocalVar = false; - OnErrorApiV2TagTagIdDelete(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, tagId); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); - } + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("ApiV2TagTagIdDelete", localVarResponse); + if (_exception != null) throw _exception; + } - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - partial void OnErrorApiV2TagTagIdDelete(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid tagId); + return localVarResponse; + } /// /// Delete Reprocess transactions by tag /// + /// Thrown when fails to make API call /// Tag id /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TagTagIdDeleteOrDefaultAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default) + /// Task of Object + public async System.Threading.Tasks.Task ApiV2TagTagIdDeleteAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - try - { - return await ApiV2TagTagIdDeleteAsync(tagId, cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiV2TagTagIdDeleteWithHttpInfoAsync(tagId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// /// Delete Reprocess transactions by tag /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Tag id /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TagTagIdDeleteAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default) + /// Task of ApiResponse (Object) + public async System.Threading.Tasks.Task> ApiV2TagTagIdDeleteWithHttpInfoAsync(Guid tagId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - try - { - FormatApiV2TagTagIdDelete(ref tagId); + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/tag/{tagId}"; - uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtagId%7D", Uri.EscapeDataString(tagId.ToString())); + string[] _contentTypes = new string[] { + }; - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - string[] acceptLocalVars = new string[] { - "application/json" - }; - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - httpRequestMessageLocalVar.Method = HttpMethod.Delete; + localVarRequestOptions.PathParameters.Add("tagId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(tagId)); // path parameter - DateTime requestedAtLocalVar = DateTime.UtcNow; - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + // make the HTTP request - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + var localVarResponse = await this.AsynchronousClient.DeleteAsync("/api/v2/tag/{tagId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - ApiV2TagTagIdDeleteApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}", requestedAtLocalVar, _jsonSerializerOptions); - - AfterApiV2TagTagIdDeleteDefaultImplementation(apiResponseLocalVar, tagId); - - Events.ExecuteOnApiV2TagTagIdDelete(apiResponseLocalVar); - - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (this.ExceptionFactory != null) { - OnErrorApiV2TagTagIdDeleteDefaultImplementation(e, "/api/v2/tag/{tagId}", uriBuilderLocalVar.Path, tagId); - Events.ExecuteOnErrorApiV2TagTagIdDelete(e); - throw; + Exception _exception = this.ExceptionFactory("ApiV2TagTagIdDelete", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// - /// The + /// Get transactions by tag /// - public partial class ApiV2TagTagIdDeleteApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TagTagIdDeleteApiResponse + /// Thrown when fails to make API call + /// Tag id + /// ListTransactionsByTagResponse + public ListTransactionsByTagResponse ApiV2TagTagIdTransactionsGet(string tagId) { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public ApiV2TagTagIdDeleteApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiV2TagTagIdTransactionsGetWithHttpInfo(tagId); + return localVarResponse.Data; + } - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + /// + /// Get transactions by tag + /// + /// Thrown when fails to make API call + /// Tag id + /// ApiResponse of ListTransactionsByTagResponse + public Regula.DocumentReader.WebClient.Client.ApiResponse ApiV2TagTagIdTransactionsGetWithHttpInfo(string tagId) + { + // verify the required parameter 'tagId' is set + if (tagId == null) + throw new Regula.DocumentReader.WebClient.Client.ApiException(400, "Missing required parameter 'tagId' when calling TransactionApi->ApiV2TagTagIdTransactionsGet"); - /// - /// Returns true if the response is 204 NoContent - /// - /// - public bool IsNoContent => 204 == (int)StatusCode; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// Deserializes the response if the response is 204 NoContent - /// - /// - public Object? NoContent() - { - // This logic may be modified with the AsModel.mustache template - return IsNoContent - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; - } + string[] _contentTypes = new string[] { + }; - /// - /// Returns true if the response is 204 NoContent and the deserialized response is not null - /// - /// - /// - public bool TryNoContent([NotNullWhen(true)]out Object? result) - { - result = null; + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - try - { - result = NoContent(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)204); - } + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - return result != null; - } + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("tagId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(tagId)); // path parameter - /// - /// Returns true if the response is 400 BadRequest - /// - /// - public bool IsBadRequest => 400 == (int)StatusCode; - /// - /// Returns true if the response is 403 Forbidden - /// - /// - public bool IsForbidden => 403 == (int)StatusCode; + // make the HTTP request + var localVarResponse = this.Client.Get("/api/v2/tag/{tagId}/transactions", localVarRequestOptions, this.Configuration); - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + if (this.ExceptionFactory != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + Exception _exception = this.ExceptionFactory("ApiV2TagTagIdTransactionsGet", localVarResponse); + if (_exception != null) throw _exception; } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); - } - - partial void FormatApiV2TagTagIdTransactionsGet(ref string tagId); - - /// - /// Validates the request parameters - /// - /// - /// - private void ValidateApiV2TagTagIdTransactionsGet(string tagId) - { - if (tagId == null) - throw new ArgumentNullException(nameof(tagId)); - } - - /// - /// Processes the server response - /// - /// - /// - private void AfterApiV2TagTagIdTransactionsGetDefaultImplementation(IApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar, string tagId) - { - bool suppressDefaultLog = false; - AfterApiV2TagTagIdTransactionsGet(ref suppressDefaultLog, apiResponseLocalVar, tagId); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); - } - - /// - /// Processes the server response - /// - /// - /// - /// - partial void AfterApiV2TagTagIdTransactionsGet(ref bool suppressDefaultLog, IApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar, string tagId); - - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - /// - private void OnErrorApiV2TagTagIdTransactionsGetDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, string tagId) - { - bool suppressDefaultLogLocalVar = false; - OnErrorApiV2TagTagIdTransactionsGet(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, tagId); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); + return localVarResponse; } - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - partial void OnErrorApiV2TagTagIdTransactionsGet(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, string tagId); - /// /// Get transactions by tag /// + /// Thrown when fails to make API call /// Tag id /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TagTagIdTransactionsGetOrDefaultAsync(string tagId, System.Threading.CancellationToken cancellationToken = default) + /// Task of ListTransactionsByTagResponse + public async System.Threading.Tasks.Task ApiV2TagTagIdTransactionsGetAsync(string tagId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - try - { - return await ApiV2TagTagIdTransactionsGetAsync(tagId, cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiV2TagTagIdTransactionsGetWithHttpInfoAsync(tagId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// /// Get transactions by tag /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Tag id /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TagTagIdTransactionsGetAsync(string tagId, System.Threading.CancellationToken cancellationToken = default) + /// Task of ApiResponse (ListTransactionsByTagResponse) + public async System.Threading.Tasks.Task> ApiV2TagTagIdTransactionsGetWithHttpInfoAsync(string tagId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - ValidateApiV2TagTagIdTransactionsGet(tagId); - - FormatApiV2TagTagIdTransactionsGet(ref tagId); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/tag/{tagId}/transactions"; - uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtagId%7D", Uri.EscapeDataString(tagId.ToString())); + // verify the required parameter 'tagId' is set + if (tagId == null) + throw new Regula.DocumentReader.WebClient.Client.ApiException(400, "Missing required parameter 'tagId' when calling TransactionApi->ApiV2TagTagIdTransactionsGet"); - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; - string[] acceptLocalVars = new string[] { - "application/json" - }; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + string[] _contentTypes = new string[] { + }; - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - httpRequestMessageLocalVar.Method = HttpMethod.Get; - DateTime requestedAtLocalVar = DateTime.UtcNow; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + localVarRequestOptions.PathParameters.Add("tagId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(tagId)); // path parameter - ApiV2TagTagIdTransactionsGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/tag/{tagId}/transactions", requestedAtLocalVar, _jsonSerializerOptions); - AfterApiV2TagTagIdTransactionsGetDefaultImplementation(apiResponseLocalVar, tagId); + // make the HTTP request - Events.ExecuteOnApiV2TagTagIdTransactionsGet(apiResponseLocalVar); + var localVarResponse = await this.AsynchronousClient.GetAsync("/api/v2/tag/{tagId}/transactions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (this.ExceptionFactory != null) { - OnErrorApiV2TagTagIdTransactionsGetDefaultImplementation(e, "/api/v2/tag/{tagId}/transactions", uriBuilderLocalVar.Path, tagId); - Events.ExecuteOnErrorApiV2TagTagIdTransactionsGet(e); - throw; + Exception _exception = this.ExceptionFactory("ApiV2TagTagIdTransactionsGet", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// - /// The + /// Get Reprocess transaction file /// - public partial class ApiV2TagTagIdTransactionsGetApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TagTagIdTransactionsGetApiResponse + /// Thrown when fails to make API call + /// Transaction id + /// File name + /// FileParameter + public FileParameter ApiV2TransactionTransactionIdFileGet(Guid transactionId, string name) { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public ApiV2TagTagIdTransactionsGetApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiV2TransactionTransactionIdFileGetWithHttpInfo(transactionId, name); + return localVarResponse.Data; + } - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + /// + /// Get Reprocess transaction file + /// + /// Thrown when fails to make API call + /// Transaction id + /// File name + /// ApiResponse of FileParameter + public Regula.DocumentReader.WebClient.Client.ApiResponse ApiV2TransactionTransactionIdFileGetWithHttpInfo(Guid transactionId, string name) + { + // verify the required parameter 'name' is set + if (name == null) + throw new Regula.DocumentReader.WebClient.Client.ApiException(400, "Missing required parameter 'name' when calling TransactionApi->ApiV2TransactionTransactionIdFileGet"); - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// Deserializes the response if the response is 200 Ok - /// - /// - public Regula.DocumentReader.WebClient.Model.ListTransactionsByTagResponse? Ok() - { - // This logic may be modified with the AsModel.mustache template - return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; - } + string[] _contentTypes = new string[] { + }; - /// - /// Returns true if the response is 200 Ok and the deserialized response is not null - /// - /// - /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ListTransactionsByTagResponse? result) - { - result = null; + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream" + }; - try - { - result = Ok(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); - } + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - return result != null; - } + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter + localVarRequestOptions.QueryParameters.Add(Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToMultiMap("", "name", name)); - /// - /// Returns true if the response is 400 BadRequest - /// - /// - public bool IsBadRequest => 400 == (int)StatusCode; - /// - /// Returns true if the response is 403 Forbidden - /// - /// - public bool IsForbidden => 403 == (int)StatusCode; + // make the HTTP request + var localVarResponse = this.Client.Get("/api/v2/transaction/{transactionId}/file", localVarRequestOptions, this.Configuration); - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + if (this.ExceptionFactory != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + Exception _exception = this.ExceptionFactory("ApiV2TransactionTransactionIdFileGet", localVarResponse); + if (_exception != null) throw _exception; } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); - } - - partial void FormatApiV2TransactionTransactionIdFileGet(ref Guid transactionId, ref string name); - - /// - /// Validates the request parameters - /// - /// - /// - private void ValidateApiV2TransactionTransactionIdFileGet(string name) - { - if (name == null) - throw new ArgumentNullException(nameof(name)); - } - - /// - /// Processes the server response - /// - /// - /// - /// - private void AfterApiV2TransactionTransactionIdFileGetDefaultImplementation(IApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar, Guid transactionId, string name) - { - bool suppressDefaultLog = false; - AfterApiV2TransactionTransactionIdFileGet(ref suppressDefaultLog, apiResponseLocalVar, transactionId, name); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + return localVarResponse; } - /// - /// Processes the server response - /// - /// - /// - /// - /// - partial void AfterApiV2TransactionTransactionIdFileGet(ref bool suppressDefaultLog, IApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar, Guid transactionId, string name); - - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - /// - /// - private void OnErrorApiV2TransactionTransactionIdFileGetDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, string name) - { - bool suppressDefaultLogLocalVar = false; - OnErrorApiV2TransactionTransactionIdFileGet(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, transactionId, name); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); - } - - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - /// - partial void OnErrorApiV2TransactionTransactionIdFileGet(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, string name); - /// /// Get Reprocess transaction file /// + /// Thrown when fails to make API call /// Transaction id /// File name /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TransactionTransactionIdFileGetOrDefaultAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default) + /// Task of FileParameter + public async System.Threading.Tasks.Task ApiV2TransactionTransactionIdFileGetAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - try - { - return await ApiV2TransactionTransactionIdFileGetAsync(transactionId, name, cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiV2TransactionTransactionIdFileGetWithHttpInfoAsync(transactionId, name, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// /// Get Reprocess transaction file /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Transaction id /// File name /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TransactionTransactionIdFileGetAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default) + /// Task of ApiResponse (FileParameter) + public async System.Threading.Tasks.Task> ApiV2TransactionTransactionIdFileGetWithHttpInfoAsync(Guid transactionId, string name, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - ValidateApiV2TransactionTransactionIdFileGet(name); - - FormatApiV2TransactionTransactionIdFileGet(ref transactionId, ref name); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/transaction/{transactionId}/file"; - uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtransactionId%7D", Uri.EscapeDataString(transactionId.ToString())); - - System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - - parseQueryStringLocalVar["name"] = ClientUtils.ParameterToString(name); - - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); + // verify the required parameter 'name' is set + if (name == null) + throw new Regula.DocumentReader.WebClient.Client.ApiException(400, "Missing required parameter 'name' when calling TransactionApi->ApiV2TransactionTransactionIdFileGet"); - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; - string[] acceptLocalVars = new string[] { - "application/octet-stream" - }; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + string[] _contentTypes = new string[] { + }; - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + // to determine the Accept header + string[] _accepts = new string[] { + "application/octet-stream" + }; - httpRequestMessageLocalVar.Method = HttpMethod.Get; - DateTime requestedAtLocalVar = DateTime.UtcNow; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter + localVarRequestOptions.QueryParameters.Add(Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToMultiMap("", "name", name)); - ApiV2TransactionTransactionIdFileGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/file", requestedAtLocalVar, _jsonSerializerOptions); - AfterApiV2TransactionTransactionIdFileGetDefaultImplementation(apiResponseLocalVar, transactionId, name); + // make the HTTP request - Events.ExecuteOnApiV2TransactionTransactionIdFileGet(apiResponseLocalVar); + var localVarResponse = await this.AsynchronousClient.GetAsync("/api/v2/transaction/{transactionId}/file", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (this.ExceptionFactory != null) { - OnErrorApiV2TransactionTransactionIdFileGetDefaultImplementation(e, "/api/v2/transaction/{transactionId}/file", uriBuilderLocalVar.Path, transactionId, name); - Events.ExecuteOnErrorApiV2TransactionTransactionIdFileGet(e); - throw; + Exception _exception = this.ExceptionFactory("ApiV2TransactionTransactionIdFileGet", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// - /// The + /// Get Reprocess transaction data /// - public partial class ApiV2TransactionTransactionIdFileGetApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TransactionTransactionIdFileGetApiResponse + /// Thrown when fails to make API call + /// Transaction id + /// TransactionProcessGetResponse + public TransactionProcessGetResponse ApiV2TransactionTransactionIdGet(Guid transactionId) { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public ApiV2TransactionTransactionIdFileGetApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiV2TransactionTransactionIdGetWithHttpInfo(transactionId); + return localVarResponse.Data; + } - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + /// + /// Get Reprocess transaction data + /// + /// Thrown when fails to make API call + /// Transaction id + /// ApiResponse of TransactionProcessGetResponse + public Regula.DocumentReader.WebClient.Client.ApiResponse ApiV2TransactionTransactionIdGetWithHttpInfo(Guid transactionId) + { + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; + string[] _contentTypes = new string[] { + }; - /// - /// Deserializes the response if the response is 200 Ok - /// - /// - public System.IO.Stream? Ok() - { - // This logic may be modified with the AsModel.mustache template - return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; - } + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - /// - /// Returns true if the response is 200 Ok and the deserialized response is not null - /// - /// - /// - public bool TryOk([NotNullWhen(true)]out System.IO.Stream? result) - { - result = null; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - try - { - result = Ok(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); - } + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - return result != null; - } + localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter - /// - /// Returns true if the response is 404 NotFound - /// - /// - public bool IsNotFound => 404 == (int)StatusCode; - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + // make the HTTP request + var localVarResponse = this.Client.Get("/api/v2/transaction/{transactionId}", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + Exception _exception = this.ExceptionFactory("ApiV2TransactionTransactionIdGet", localVarResponse); + if (_exception != null) throw _exception; } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); - } - - partial void FormatApiV2TransactionTransactionIdGet(ref Guid transactionId); - - /// - /// Processes the server response - /// - /// - /// - private void AfterApiV2TransactionTransactionIdGetDefaultImplementation(IApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar, Guid transactionId) - { - bool suppressDefaultLog = false; - AfterApiV2TransactionTransactionIdGet(ref suppressDefaultLog, apiResponseLocalVar, transactionId); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + return localVarResponse; } - /// - /// Processes the server response - /// - /// - /// - /// - partial void AfterApiV2TransactionTransactionIdGet(ref bool suppressDefaultLog, IApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar, Guid transactionId); - - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - /// - private void OnErrorApiV2TransactionTransactionIdGetDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId) - { - bool suppressDefaultLogLocalVar = false; - OnErrorApiV2TransactionTransactionIdGet(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, transactionId); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); - } - - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - partial void OnErrorApiV2TransactionTransactionIdGet(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId); - /// /// Get Reprocess transaction data /// + /// Thrown when fails to make API call /// Transaction id /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TransactionTransactionIdGetOrDefaultAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default) + /// Task of TransactionProcessGetResponse + public async System.Threading.Tasks.Task ApiV2TransactionTransactionIdGetAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - try - { - return await ApiV2TransactionTransactionIdGetAsync(transactionId, cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiV2TransactionTransactionIdGetWithHttpInfoAsync(transactionId, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// /// Get Reprocess transaction data /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Transaction id /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TransactionTransactionIdGetAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default) + /// Task of ApiResponse (TransactionProcessGetResponse) + public async System.Threading.Tasks.Task> ApiV2TransactionTransactionIdGetWithHttpInfoAsync(Guid transactionId, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - FormatApiV2TransactionTransactionIdGet(ref transactionId); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/transaction/{transactionId}"; - uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtransactionId%7D", Uri.EscapeDataString(transactionId.ToString())); - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - string[] acceptLocalVars = new string[] { - "application/json" - }; + string[] _contentTypes = new string[] { + }; - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - httpRequestMessageLocalVar.Method = HttpMethod.Get; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - DateTime requestedAtLocalVar = DateTime.UtcNow; + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}", requestedAtLocalVar, _jsonSerializerOptions); + // make the HTTP request - AfterApiV2TransactionTransactionIdGetDefaultImplementation(apiResponseLocalVar, transactionId); + var localVarResponse = await this.AsynchronousClient.GetAsync("/api/v2/transaction/{transactionId}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - Events.ExecuteOnApiV2TransactionTransactionIdGet(apiResponseLocalVar); - - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (this.ExceptionFactory != null) { - OnErrorApiV2TransactionTransactionIdGetDefaultImplementation(e, "/api/v2/transaction/{transactionId}", uriBuilderLocalVar.Path, transactionId); - Events.ExecuteOnErrorApiV2TransactionTransactionIdGet(e); - throw; + Exception _exception = this.ExceptionFactory("ApiV2TransactionTransactionIdGet", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// - /// The + /// Reprocess /// - public partial class ApiV2TransactionTransactionIdGetApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TransactionTransactionIdGetApiResponse + /// Thrown when fails to make API call + /// Transaction id + /// + /// TransactionProcessResult + public TransactionProcessResult ApiV2TransactionTransactionIdProcessPost(Guid transactionId, TransactionProcessRequest transactionProcessRequest) { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public ApiV2TransactionTransactionIdGetApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiV2TransactionTransactionIdProcessPostWithHttpInfo(transactionId, transactionProcessRequest); + return localVarResponse.Data; + } - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + /// + /// Reprocess + /// + /// Thrown when fails to make API call + /// Transaction id + /// + /// ApiResponse of TransactionProcessResult + public Regula.DocumentReader.WebClient.Client.ApiResponse ApiV2TransactionTransactionIdProcessPostWithHttpInfo(Guid transactionId, TransactionProcessRequest transactionProcessRequest) + { + // verify the required parameter 'transactionProcessRequest' is set + if (transactionProcessRequest == null) + throw new Regula.DocumentReader.WebClient.Client.ApiException(400, "Missing required parameter 'transactionProcessRequest' when calling TransactionApi->ApiV2TransactionTransactionIdProcessPost"); - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// Deserializes the response if the response is 200 Ok - /// - /// - public Regula.DocumentReader.WebClient.Model.TransactionProcessGetResponse? Ok() - { - // This logic may be modified with the AsModel.mustache template - return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; - } + string[] _contentTypes = new string[] { + "application/json" + }; - /// - /// Returns true if the response is 200 Ok and the deserialized response is not null - /// - /// - /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessGetResponse? result) - { - result = null; + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - try - { - result = Ok(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); - } + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - return result != null; - } + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); + + localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter + localVarRequestOptions.Data = transactionProcessRequest; - /// - /// Returns true if the response is 400 BadRequest - /// - /// - public bool IsBadRequest => 400 == (int)StatusCode; - /// - /// Returns true if the response is 403 Forbidden - /// - /// - public bool IsForbidden => 403 == (int)StatusCode; + // make the HTTP request + var localVarResponse = this.Client.Post("/api/v2/transaction/{transactionId}/process", localVarRequestOptions, this.Configuration); - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + if (this.ExceptionFactory != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + Exception _exception = this.ExceptionFactory("ApiV2TransactionTransactionIdProcessPost", localVarResponse); + if (_exception != null) throw _exception; } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); - } - - partial void FormatApiV2TransactionTransactionIdProcessPost(ref Guid transactionId, TransactionProcessRequest transactionProcessRequest); - - /// - /// Validates the request parameters - /// - /// - /// - private void ValidateApiV2TransactionTransactionIdProcessPost(TransactionProcessRequest transactionProcessRequest) - { - if (transactionProcessRequest == null) - throw new ArgumentNullException(nameof(transactionProcessRequest)); - } - - /// - /// Processes the server response - /// - /// - /// - /// - private void AfterApiV2TransactionTransactionIdProcessPostDefaultImplementation(IApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar, Guid transactionId, TransactionProcessRequest transactionProcessRequest) - { - bool suppressDefaultLog = false; - AfterApiV2TransactionTransactionIdProcessPost(ref suppressDefaultLog, apiResponseLocalVar, transactionId, transactionProcessRequest); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + return localVarResponse; } - /// - /// Processes the server response - /// - /// - /// - /// - /// - partial void AfterApiV2TransactionTransactionIdProcessPost(ref bool suppressDefaultLog, IApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar, Guid transactionId, TransactionProcessRequest transactionProcessRequest); - - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - /// - /// - private void OnErrorApiV2TransactionTransactionIdProcessPostDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, TransactionProcessRequest transactionProcessRequest) - { - bool suppressDefaultLogLocalVar = false; - OnErrorApiV2TransactionTransactionIdProcessPost(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, transactionId, transactionProcessRequest); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); - } - - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - /// - partial void OnErrorApiV2TransactionTransactionIdProcessPost(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, TransactionProcessRequest transactionProcessRequest); - /// /// Reprocess /// + /// Thrown when fails to make API call /// Transaction id /// /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TransactionTransactionIdProcessPostOrDefaultAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default) + /// Task of TransactionProcessResult + public async System.Threading.Tasks.Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - try - { - return await ApiV2TransactionTransactionIdProcessPostAsync(transactionId, transactionProcessRequest, cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(transactionId, transactionProcessRequest, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// /// Reprocess /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Transaction id /// /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default) + /// Task of ApiResponse (TransactionProcessResult) + public async System.Threading.Tasks.Task> ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - ValidateApiV2TransactionTransactionIdProcessPost(transactionProcessRequest); - - FormatApiV2TransactionTransactionIdProcessPost(ref transactionId, transactionProcessRequest); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/transaction/{transactionId}/process"; - uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtransactionId%7D", Uri.EscapeDataString(transactionId.ToString())); - - httpRequestMessageLocalVar.Content = (transactionProcessRequest as object) is System.IO.Stream stream - ? httpRequestMessageLocalVar.Content = new StreamContent(stream) - : httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(transactionProcessRequest, _jsonSerializerOptions)); - - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; - - string[] contentTypes = new string[] { - "application/json" - }; - - string? contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes); + // verify the required parameter 'transactionProcessRequest' is set + if (transactionProcessRequest == null) + throw new Regula.DocumentReader.WebClient.Client.ApiException(400, "Missing required parameter 'transactionProcessRequest' when calling TransactionApi->ApiV2TransactionTransactionIdProcessPost"); - if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null) - httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar); - string[] acceptLocalVars = new string[] { - "application/json" - }; + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); + string[] _contentTypes = new string[] { + "application/json" + }; - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - httpRequestMessageLocalVar.Method = HttpMethod.Post; - DateTime requestedAtLocalVar = DateTime.UtcNow; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); + localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter + localVarRequestOptions.Data = transactionProcessRequest; - ApiV2TransactionTransactionIdProcessPostApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/process", requestedAtLocalVar, _jsonSerializerOptions); - AfterApiV2TransactionTransactionIdProcessPostDefaultImplementation(apiResponseLocalVar, transactionId, transactionProcessRequest); + // make the HTTP request - Events.ExecuteOnApiV2TransactionTransactionIdProcessPost(apiResponseLocalVar); + var localVarResponse = await this.AsynchronousClient.PostAsync("/api/v2/transaction/{transactionId}/process", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - return apiResponseLocalVar; - } - } - } - catch(Exception e) + if (this.ExceptionFactory != null) { - OnErrorApiV2TransactionTransactionIdProcessPostDefaultImplementation(e, "/api/v2/transaction/{transactionId}/process", uriBuilderLocalVar.Path, transactionId, transactionProcessRequest); - Events.ExecuteOnErrorApiV2TransactionTransactionIdProcessPost(e); - throw; + Exception _exception = this.ExceptionFactory("ApiV2TransactionTransactionIdProcessPost", localVarResponse); + if (_exception != null) throw _exception; } + + return localVarResponse; } /// - /// The + /// Get Reprocess transaction result /// - public partial class ApiV2TransactionTransactionIdProcessPostApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TransactionTransactionIdProcessPostApiResponse + /// Thrown when fails to make API call + /// Transaction id + /// With base64 images or url (optional) + /// ProcessResponse + public ProcessResponse ApiV2TransactionTransactionIdResultsGet(Guid transactionId, bool? withImages = default(bool?)) { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public ApiV2TransactionTransactionIdProcessPostApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiV2TransactionTransactionIdResultsGetWithHttpInfo(transactionId, withImages); + return localVarResponse.Data; + } - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + /// + /// Get Reprocess transaction result + /// + /// Thrown when fails to make API call + /// Transaction id + /// With base64 images or url (optional) + /// ApiResponse of ProcessResponse + public Regula.DocumentReader.WebClient.Client.ApiResponse ApiV2TransactionTransactionIdResultsGetWithHttpInfo(Guid transactionId, bool? withImages = default(bool?)) + { + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; + string[] _contentTypes = new string[] { + }; - /// - /// Deserializes the response if the response is 200 Ok - /// - /// - public Regula.DocumentReader.WebClient.Model.TransactionProcessResult? Ok() - { - // This logic may be modified with the AsModel.mustache template - return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; - } + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - /// - /// Returns true if the response is 200 Ok and the deserialized response is not null - /// - /// - /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.TransactionProcessResult? result) - { - result = null; + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - try - { - result = Ok(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); - } + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - return result != null; + localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter + if (withImages != null) + { + localVarRequestOptions.QueryParameters.Add(Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToMultiMap("", "withImages", withImages)); } - /// - /// Returns true if the response is 400 BadRequest - /// - /// - public bool IsBadRequest => 400 == (int)StatusCode; - /// - /// Returns true if the response is 403 Forbidden - /// - /// - public bool IsForbidden => 403 == (int)StatusCode; + // make the HTTP request + var localVarResponse = this.Client.Get("/api/v2/transaction/{transactionId}/results", localVarRequestOptions, this.Configuration); - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + if (this.ExceptionFactory != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + Exception _exception = this.ExceptionFactory("ApiV2TransactionTransactionIdResultsGet", localVarResponse); + if (_exception != null) throw _exception; } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); - } - - partial void FormatApiV2TransactionTransactionIdResultsGet(ref Guid transactionId, ref Option withImages); - - /// - /// Processes the server response - /// - /// - /// - /// - private void AfterApiV2TransactionTransactionIdResultsGetDefaultImplementation(IApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar, Guid transactionId, Option withImages) - { - bool suppressDefaultLog = false; - AfterApiV2TransactionTransactionIdResultsGet(ref suppressDefaultLog, apiResponseLocalVar, transactionId, withImages); - if (!suppressDefaultLog) - Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path); + return localVarResponse; } - /// - /// Processes the server response - /// - /// - /// - /// - /// - partial void AfterApiV2TransactionTransactionIdResultsGet(ref bool suppressDefaultLog, IApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar, Guid transactionId, Option withImages); - - /// - /// Logs exceptions that occur while retrieving the server response - /// - /// - /// - /// - /// - /// - private void OnErrorApiV2TransactionTransactionIdResultsGetDefaultImplementation(Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, Option withImages) - { - bool suppressDefaultLogLocalVar = false; - OnErrorApiV2TransactionTransactionIdResultsGet(ref suppressDefaultLogLocalVar, exceptionLocalVar, pathFormatLocalVar, pathLocalVar, transactionId, withImages); - if (!suppressDefaultLogLocalVar) - Logger.LogError(exceptionLocalVar, "An error occurred while sending the request to the server."); - } - - /// - /// A partial method that gives developers a way to provide customized exception handling - /// - /// - /// - /// - /// - /// - /// - partial void OnErrorApiV2TransactionTransactionIdResultsGet(ref bool suppressDefaultLogLocalVar, Exception exceptionLocalVar, string pathFormatLocalVar, string pathLocalVar, Guid transactionId, Option withImages); - /// /// Get Reprocess transaction result /// + /// Thrown when fails to make API call /// Transaction id /// With base64 images or url (optional) /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TransactionTransactionIdResultsGetOrDefaultAsync(Guid transactionId, Option withImages = default, System.Threading.CancellationToken cancellationToken = default) + /// Task of ProcessResponse + public async System.Threading.Tasks.Task ApiV2TransactionTransactionIdResultsGetAsync(Guid transactionId, bool? withImages = default(bool?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - try - { - return await ApiV2TransactionTransactionIdResultsGetAsync(transactionId, withImages, cancellationToken).ConfigureAwait(false); - } - catch (Exception) - { - return null; - } + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiV2TransactionTransactionIdResultsGetWithHttpInfoAsync(transactionId, withImages, cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; } /// /// Get Reprocess transaction result /// - /// Thrown when fails to make API call + /// Thrown when fails to make API call /// Transaction id /// With base64 images or url (optional) /// Cancellation Token to cancel the request. - /// <> - public async Task ApiV2TransactionTransactionIdResultsGetAsync(Guid transactionId, Option withImages = default, System.Threading.CancellationToken cancellationToken = default) + /// Task of ApiResponse (ProcessResponse) + public async System.Threading.Tasks.Task> ApiV2TransactionTransactionIdResultsGetWithHttpInfoAsync(Guid transactionId, bool? withImages = default(bool?), System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) { - UriBuilder uriBuilderLocalVar = new UriBuilder(); - - try - { - FormatApiV2TransactionTransactionIdResultsGet(ref transactionId, ref withImages); - - using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage()) - { - uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host; - uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port; - uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme; - uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/api/v2/transaction/{transactionId}/results"; - uriBuilderLocalVar.Path = uriBuilderLocalVar.Path.Replace("%7BtransactionId%7D", Uri.EscapeDataString(transactionId.ToString())); - - System.Collections.Specialized.NameValueCollection parseQueryStringLocalVar = System.Web.HttpUtility.ParseQueryString(string.Empty); - - if (withImages.IsSet) - parseQueryStringLocalVar["withImages"] = ClientUtils.ParameterToString(withImages.Value); - - uriBuilderLocalVar.Query = parseQueryStringLocalVar.ToString(); - - httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri; - - string[] acceptLocalVars = new string[] { - "application/json" - }; - - string? acceptLocalVar = ClientUtils.SelectHeaderAccept(acceptLocalVars); - - if (acceptLocalVar != null) - httpRequestMessageLocalVar.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(acceptLocalVar)); - - httpRequestMessageLocalVar.Method = HttpMethod.Get; - - DateTime requestedAtLocalVar = DateTime.UtcNow; - - using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false)) - { - string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false); - - ILogger apiResponseLoggerLocalVar = LoggerFactory.CreateLogger(); - ApiV2TransactionTransactionIdResultsGetApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/api/v2/transaction/{transactionId}/results", requestedAtLocalVar, _jsonSerializerOptions); + Regula.DocumentReader.WebClient.Client.RequestOptions localVarRequestOptions = new Regula.DocumentReader.WebClient.Client.RequestOptions(); - AfterApiV2TransactionTransactionIdResultsGetDefaultImplementation(apiResponseLocalVar, transactionId, withImages); + string[] _contentTypes = new string[] { + }; - Events.ExecuteOnApiV2TransactionTransactionIdResultsGet(apiResponseLocalVar); + // to determine the Accept header + string[] _accepts = new string[] { + "application/json" + }; - return apiResponseLocalVar; - } - } - } - catch(Exception e) - { - OnErrorApiV2TransactionTransactionIdResultsGetDefaultImplementation(e, "/api/v2/transaction/{transactionId}/results", uriBuilderLocalVar.Path, transactionId, withImages); - Events.ExecuteOnErrorApiV2TransactionTransactionIdResultsGet(e); - throw; - } - } - /// - /// The - /// - public partial class ApiV2TransactionTransactionIdResultsGetApiResponse : Regula.DocumentReader.WebClient.Client.ApiResponse, IApiV2TransactionTransactionIdResultsGetApiResponse - { - /// - /// The logger - /// - public ILogger Logger { get; } - - /// - /// The - /// - /// - /// - /// - /// - /// - /// - /// - public ApiV2TransactionTransactionIdResultsGetApiResponse(ILogger logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions) - { - Logger = logger; - OnCreated(httpRequestMessage, httpResponseMessage); - } + var localVarContentType = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderContentType(_contentTypes); + if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); + var localVarAccept = Regula.DocumentReader.WebClient.Client.ClientUtils.SelectHeaderAccept(_accepts); + if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - /// - /// Returns true if the response is 200 Ok - /// - /// - public bool IsOk => 200 == (int)StatusCode; - - /// - /// Deserializes the response if the response is 200 Ok - /// - /// - public Regula.DocumentReader.WebClient.Model.ProcessResponse? Ok() + localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter + if (withImages != null) { - // This logic may be modified with the AsModel.mustache template - return IsOk - ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions) - : null; + localVarRequestOptions.QueryParameters.Add(Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToMultiMap("", "withImages", withImages)); } - /// - /// Returns true if the response is 200 Ok and the deserialized response is not null - /// - /// - /// - public bool TryOk([NotNullWhen(true)]out Regula.DocumentReader.WebClient.Model.ProcessResponse? result) - { - result = null; - try - { - result = Ok(); - } catch (Exception e) - { - OnDeserializationErrorDefaultImplementation(e, (HttpStatusCode)200); - } + // make the HTTP request - return result != null; - } - - /// - /// Returns true if the response is 400 BadRequest - /// - /// - public bool IsBadRequest => 400 == (int)StatusCode; + var localVarResponse = await this.AsynchronousClient.GetAsync("/api/v2/transaction/{transactionId}/results", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - /// - /// Returns true if the response is 403 Forbidden - /// - /// - public bool IsForbidden => 403 == (int)StatusCode; - - private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode) + if (this.ExceptionFactory != null) { - bool suppressDefaultLog = false; - OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode); - if (!suppressDefaultLog) - Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode); + Exception _exception = this.ExceptionFactory("ApiV2TransactionTransactionIdResultsGet", localVarResponse); + if (_exception != null) throw _exception; } - partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode); + return localVarResponse; } + } } diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiClient.cs b/src/Regula.DocumentReader.WebClient/Client/ApiClient.cs new file mode 100644 index 0000000..5412fd7 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ApiClient.cs @@ -0,0 +1,788 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Formatters; +using System.Text; +using System.Threading; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using System.Web; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using ErrorEventArgs = Newtonsoft.Json.Serialization.ErrorEventArgs; +using System.Net.Http; +using System.Net.Http.Headers; +using Polly; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// To Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. + /// + internal class CustomJsonCodec + { + private readonly IReadableConfiguration _configuration; + private static readonly string _contentType = "application/json"; + private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + public CustomJsonCodec(IReadableConfiguration configuration) + { + _configuration = configuration; + } + + public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) + { + _serializerSettings = serializerSettings; + _configuration = configuration; + } + + /// + /// Serialize the object into a JSON string. + /// + /// Object to be serialized. + /// A JSON string. + public string Serialize(object obj) + { + if (obj != null && obj is Regula.DocumentReader.WebClient.Model.AbstractOpenAPISchema) + { + // the object to be serialized is an oneOf/anyOf schema + return ((Regula.DocumentReader.WebClient.Model.AbstractOpenAPISchema)obj).ToJson(); + } + else + { + return JsonConvert.SerializeObject(obj, _serializerSettings); + } + } + + public async Task Deserialize(HttpResponseMessage response) + { + var result = (T) await Deserialize(response, typeof(T)).ConfigureAwait(false); + return result; + } + + /// + /// Deserialize the JSON string into a proper object. + /// + /// The HTTP response. + /// Object type. + /// Object representation of the JSON string. + internal async Task Deserialize(HttpResponseMessage response, Type type) + { + IList headers = new List(); + // process response headers, e.g. Access-Control-Allow-Methods + foreach (var responseHeader in response.Headers) + { + headers.Add(responseHeader.Key + "=" + ClientUtils.ParameterToString(responseHeader.Value)); + } + + // process response content headers, e.g. Content-Type + foreach (var responseHeader in response.Content.Headers) + { + headers.Add(responseHeader.Key + "=" + ClientUtils.ParameterToString(responseHeader.Value)); + } + + // RFC 2183 & RFC 2616 + var fileNameRegex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$", RegexOptions.IgnoreCase); + if (type == typeof(byte[])) // return byte array + { + return await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); + } + else if (type == typeof(FileParameter)) + { + if (headers != null) { + foreach (var header in headers) + { + var match = fileNameRegex.Match(header.ToString()); + if (match.Success) + { + string fileName = ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + return new FileParameter(fileName, await response.Content.ReadAsStreamAsync().ConfigureAwait(false)); + } + } + } + return new FileParameter(await response.Content.ReadAsStreamAsync().ConfigureAwait(false)); + } + + // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) + if (type == typeof(Stream)) + { + var bytes = await response.Content.ReadAsByteArrayAsync().ConfigureAwait(false); + if (headers != null) + { + var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) + ? Path.GetTempPath() + : _configuration.TempFolderPath; + + foreach (var header in headers) + { + var match = fileNameRegex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); + File.WriteAllBytes(fileName, bytes); + return new FileStream(fileName, FileMode.Open); + } + } + } + var stream = new MemoryStream(bytes); + return stream; + } + + if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object + { + return DateTime.Parse(await response.Content.ReadAsStringAsync().ConfigureAwait(false), null, System.Globalization.DateTimeStyles.RoundtripKind); + } + + if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type + { + return Convert.ChangeType(await response.Content.ReadAsStringAsync().ConfigureAwait(false), type); + } + + // at this point, it must be a model (json) + try + { + return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync().ConfigureAwait(false), type, _serializerSettings); + } + catch (Exception e) + { + throw new ApiException(500, e.Message); + } + } + + public string RootElement { get; set; } + public string Namespace { get; set; } + public string DateFormat { get; set; } + + public string ContentType + { + get { return _contentType; } + set { throw new InvalidOperationException("Not allowed to set content type."); } + } + } + /// + /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), + /// encapsulating general REST accessor use cases. + /// + /// + /// The Dispose method will manage the HttpClient lifecycle when not passed by constructor. + /// + public partial class ApiClient : IDisposable, ISynchronousClient, IAsynchronousClient + { + private readonly string _baseUrl; + + private readonly HttpClientHandler _httpClientHandler; + private readonly HttpClient _httpClient; + private readonly bool _disposeClient; + + /// + /// Specifies the settings on a object. + /// These settings can be adjusted to accommodate custom serialization rules. + /// + public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Initializes a new instance of the , defaulting to the global configurations' base url. + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + public ApiClient() : + this(Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance.BasePath) + { + } + + /// + /// Initializes a new instance of the . + /// **IMPORTANT** This will also create an instance of HttpClient, which is less than ideal. + /// It's better to reuse the HttpClient and HttpClientHandler. + /// + /// The target service's base path in URL format. + /// + public ApiClient(string basePath) + { + if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); + + _httpClientHandler = new HttpClientHandler(); + _httpClient = new HttpClient(_httpClientHandler, true); + _disposeClient = true; + _baseUrl = basePath; + } + + /// + /// Initializes a new instance of the , defaulting to the global configurations' base url. + /// + /// An instance of HttpClient. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public ApiClient(HttpClient client, HttpClientHandler handler = null) : + this(client, Regula.DocumentReader.WebClient.Client.GlobalConfiguration.Instance.BasePath, handler) + { + } + + /// + /// Initializes a new instance of the . + /// + /// An instance of HttpClient. + /// The target service's base path in URL format. + /// An optional instance of HttpClientHandler that is used by HttpClient. + /// + /// + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public ApiClient(HttpClient client, string basePath, HttpClientHandler handler = null) + { + if (client == null) throw new ArgumentNullException("client cannot be null"); + if (string.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); + + _httpClientHandler = handler; + _httpClient = client; + _baseUrl = basePath; + } + + /// + /// Disposes resources if they were created by us + /// + public void Dispose() + { + if(_disposeClient) { + _httpClient.Dispose(); + } + } + + /// Prepares multipart/form-data content + HttpContent PrepareMultipartFormDataContent(RequestOptions options) + { + string boundary = "---------" + Guid.NewGuid().ToString().ToUpperInvariant(); + var multipartContent = new MultipartFormDataContent(boundary); + foreach (var formParameter in options.FormParameters) + { + multipartContent.Add(new StringContent(formParameter.Value), formParameter.Key); + } + + if (options.FileParameters != null && options.FileParameters.Count > 0) + { + foreach (var fileParam in options.FileParameters) + { + foreach (var file in fileParam.Value) + { + var content = new StreamContent(file.Content); + content.Headers.ContentType = new MediaTypeHeaderValue(file.ContentType); + multipartContent.Add(content, fileParam.Key, file.Name); + } + } + } + return multipartContent; + } + + /// + /// Provides all logic for constructing a new HttpRequestMessage. + /// At this point, all information for querying the service is known. Here, it is simply + /// mapped into the a HttpRequestMessage. + /// + /// The http verb. + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// [private] A new HttpRequestMessage instance. + /// + private HttpRequestMessage NewRequest( + HttpMethod method, + string path, + RequestOptions options, + IReadableConfiguration configuration) + { + if (path == null) throw new ArgumentNullException("path"); + if (options == null) throw new ArgumentNullException("options"); + if (configuration == null) throw new ArgumentNullException("configuration"); + + WebRequestPathBuilder builder = new WebRequestPathBuilder(_baseUrl, path); + + builder.AddPathParameters(options.PathParameters); + + builder.AddQueryParameters(options.QueryParameters); + + HttpRequestMessage request = new HttpRequestMessage(method, builder.GetFullUri()); + + if (configuration.UserAgent != null) + { + request.Headers.TryAddWithoutValidation("User-Agent", configuration.UserAgent); + } + + if (configuration.DefaultHeaders != null) + { + foreach (var headerParam in configuration.DefaultHeaders) + { + request.Headers.Add(headerParam.Key, headerParam.Value); + } + } + + if (options.HeaderParameters != null) + { + foreach (var headerParam in options.HeaderParameters) + { + foreach (var value in headerParam.Value) + { + // Todo make content headers actually content headers + request.Headers.TryAddWithoutValidation(headerParam.Key, value); + } + } + } + + List> contentList = new List>(); + + string contentType = null; + if (options.HeaderParameters != null && options.HeaderParameters.ContainsKey("Content-Type")) + { + var contentTypes = options.HeaderParameters["Content-Type"]; + contentType = contentTypes.FirstOrDefault(); + } + + if (contentType == "multipart/form-data") + { + request.Content = PrepareMultipartFormDataContent(options); + } + else if (contentType == "application/x-www-form-urlencoded") + { + request.Content = new FormUrlEncodedContent(options.FormParameters); + } + else + { + if (options.Data != null) + { + if (options.Data is FileParameter fp) + { + contentType = contentType ?? "application/octet-stream"; + + var streamContent = new StreamContent(fp.Content); + streamContent.Headers.ContentType = new MediaTypeHeaderValue(contentType); + request.Content = streamContent; + } + else + { + var serializer = new CustomJsonCodec(SerializerSettings, configuration); + request.Content = new StringContent(serializer.Serialize(options.Data), new UTF8Encoding(), + "application/json"); + } + } + } + + + + // TODO provide an alternative that allows cookies per request instead of per API client + if (options.Cookies != null && options.Cookies.Count > 0) + { + request.Properties["CookieContainer"] = options.Cookies; + } + + return request; + } + + partial void InterceptRequest(HttpRequestMessage req); + partial void InterceptResponse(HttpRequestMessage req, HttpResponseMessage response); + + private async Task> ToApiResponse(HttpResponseMessage response, object responseData, Uri uri) + { + T result = (T) responseData; + string rawContent = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + + var transformed = new ApiResponse(response.StatusCode, new Multimap(), result, rawContent) + { + ErrorText = response.ReasonPhrase, + Cookies = new List() + }; + + // process response headers, e.g. Access-Control-Allow-Methods + if (response.Headers != null) + { + foreach (var responseHeader in response.Headers) + { + transformed.Headers.Add(responseHeader.Key, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + // process response content headers, e.g. Content-Type + if (response.Content.Headers != null) + { + foreach (var responseHeader in response.Content.Headers) + { + transformed.Headers.Add(responseHeader.Key, ClientUtils.ParameterToString(responseHeader.Value)); + } + } + + if (_httpClientHandler != null && response != null) + { + try { + foreach (Cookie cookie in _httpClientHandler.CookieContainer.GetCookies(uri)) + { + transformed.Cookies.Add(cookie); + } + } + catch (PlatformNotSupportedException) {} + } + + return transformed; + } + + private ApiResponse Exec(HttpRequestMessage req, IReadableConfiguration configuration) + { + return ExecAsync(req, configuration).GetAwaiter().GetResult(); + } + + private async Task> ExecAsync(HttpRequestMessage req, + IReadableConfiguration configuration, + System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + CancellationTokenSource timeoutTokenSource = null; + CancellationTokenSource finalTokenSource = null; + var deserializer = new CustomJsonCodec(SerializerSettings, configuration); + var finalToken = cancellationToken; + + try + { + if (configuration.Timeout > TimeSpan.Zero) + { + timeoutTokenSource = new CancellationTokenSource(configuration.Timeout); + finalTokenSource = CancellationTokenSource.CreateLinkedTokenSource(finalToken, timeoutTokenSource.Token); + finalToken = finalTokenSource.Token; + } + + if (configuration.Proxy != null) + { + if(_httpClientHandler == null) throw new InvalidOperationException("Configuration `Proxy` not supported when the client is explicitly created without an HttpClientHandler, use the proper constructor."); + _httpClientHandler.Proxy = configuration.Proxy; + } + + if (configuration.ClientCertificates != null) + { + if(_httpClientHandler == null) throw new InvalidOperationException("Configuration `ClientCertificates` not supported when the client is explicitly created without an HttpClientHandler, use the proper constructor."); + _httpClientHandler.ClientCertificates.AddRange(configuration.ClientCertificates); + } + + var cookieContainer = req.Properties.ContainsKey("CookieContainer") ? req.Properties["CookieContainer"] as List : null; + + if (cookieContainer != null) + { + if(_httpClientHandler == null) throw new InvalidOperationException("Request property `CookieContainer` not supported when the client is explicitly created without an HttpClientHandler, use the proper constructor."); + foreach (var cookie in cookieContainer) + { + _httpClientHandler.CookieContainer.Add(cookie); + } + } + + InterceptRequest(req); + + HttpResponseMessage response; + if (RetryConfiguration.AsyncRetryPolicy != null) + { + var policy = RetryConfiguration.AsyncRetryPolicy; + var policyResult = await policy + .ExecuteAndCaptureAsync(() => _httpClient.SendAsync(req, finalToken)) + .ConfigureAwait(false); + response = (policyResult.Outcome == OutcomeType.Successful) ? + policyResult.Result : new HttpResponseMessage() + { + ReasonPhrase = policyResult.FinalException.ToString(), + RequestMessage = req + }; + } + else + { + response = await _httpClient.SendAsync(req, finalToken).ConfigureAwait(false); + } + + if (!response.IsSuccessStatusCode) + { + return await ToApiResponse(response, default(T), req.RequestUri).ConfigureAwait(false); + } + + object responseData = await deserializer.Deserialize(response).ConfigureAwait(false); + + // if the response type is oneOf/anyOf, call FromJSON to deserialize the data + if (typeof(Regula.DocumentReader.WebClient.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) + { + responseData = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); + } + else if (typeof(T).Name == "Stream") // for binary response + { + responseData = (T) (object) await response.Content.ReadAsStreamAsync().ConfigureAwait(false); + } + + InterceptResponse(req, response); + + return await ToApiResponse(response, responseData, req.RequestUri).ConfigureAwait(false); + } + catch (OperationCanceledException original) + { + if (timeoutTokenSource != null && timeoutTokenSource.IsCancellationRequested) + { + throw new TaskCanceledException($"[{req.Method}] {req.RequestUri} was timeout.", + new TimeoutException(original.Message, original)); + } + throw; + } + finally + { + if (timeoutTokenSource != null) + { + timeoutTokenSource.Dispose(); + } + + if (finalTokenSource != null) + { + finalTokenSource.Dispose(); + } + } + } + + #region IAsynchronousClient + /// + /// Make a HTTP GET request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), config, cancellationToken); + } + + /// + /// Make a HTTP POST request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), config, cancellationToken); + } + + /// + /// Make a HTTP PUT request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), config, cancellationToken); + } + + /// + /// Make a HTTP DELETE request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), config, cancellationToken); + } + + /// + /// Make a HTTP HEAD request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), config, cancellationToken); + } + + /// + /// Make a HTTP OPTION request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), config, cancellationToken); + } + + /// + /// Make a HTTP PATCH request (async). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// Token that enables callers to cancel the request. + /// A Task containing ApiResponse + public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) + { + var config = configuration ?? GlobalConfiguration.Instance; + return ExecAsync(NewRequest(new HttpMethod("PATCH"), path, options, config), config, cancellationToken); + } + #endregion IAsynchronousClient + + #region ISynchronousClient + /// + /// Make a HTTP GET request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Get, path, options, config), config); + } + + /// + /// Make a HTTP POST request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Post, path, options, config), config); + } + + /// + /// Make a HTTP PUT request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Put, path, options, config), config); + } + + /// + /// Make a HTTP DELETE request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Delete, path, options, config), config); + } + + /// + /// Make a HTTP HEAD request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Head, path, options, config), config); + } + + /// + /// Make a HTTP OPTION request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(HttpMethod.Options, path, options, config), config); + } + + /// + /// Make a HTTP PATCH request (synchronous). + /// + /// The target path (or resource). + /// The additional request options. + /// A per-request configuration object. It is assumed that any merge with + /// GlobalConfiguration has been done before calling this method. + /// A Task containing ApiResponse + public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) + { + var config = configuration ?? GlobalConfiguration.Instance; + return Exec(NewRequest(new HttpMethod("PATCH"), path, options, config), config); + } + #endregion ISynchronousClient + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiException.cs b/src/Regula.DocumentReader.WebClient/Client/ApiException.cs index 337fb8f..e589aa5 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ApiException.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ApiException.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; @@ -20,33 +18,51 @@ namespace Regula.DocumentReader.WebClient.Client public class ApiException : Exception { /// - /// The reason the api request failed + /// Gets or sets the error code (HTTP status code) /// - public string? ReasonPhrase { get; } + /// The error code (HTTP status code). + public int ErrorCode { get; set; } /// - /// The HttpStatusCode + /// Gets or sets the error content (body json object) /// - public System.Net.HttpStatusCode StatusCode { get; } + /// The error content (Http response body). + public object ErrorContent { get; private set; } /// - /// The raw data returned by the api + /// Gets or sets the HTTP headers /// - public string RawContent { get; } - + /// HTTP headers + public Multimap Headers { get; private set; } + /// - /// Construct the ApiException from parts of the response + /// Initializes a new instance of the class. /// - /// - /// - /// - public ApiException(string? reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent) : base(reasonPhrase ?? rawContent) - { - ReasonPhrase = reasonPhrase; + public ApiException() { } - StatusCode = statusCode; + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } - RawContent = rawContent; + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + /// HTTP Headers. + public ApiException(int errorCode, string message, object errorContent = null, Multimap headers = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + this.Headers = headers; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs b/src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs deleted file mode 100644 index deff534..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/ApiFactory.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System; -using Microsoft.Extensions.DependencyInjection; -using Regula.DocumentReader.WebClient.Api; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// An IApiFactory interface - /// - public interface IApiFactory - { - /// - /// A method to create an IApi of type IResult - /// - /// - /// - IResult Create() where IResult : IApi; - } - - /// - /// An ApiFactory - /// - public class ApiFactory : IApiFactory - { - /// - /// The service provider - /// - public IServiceProvider Services { get; } - - /// - /// Initializes a new instance of the class. - /// - /// - public ApiFactory(IServiceProvider services) - { - Services = services; - } - - /// - /// A method to create an IApi of type IResult - /// - /// - /// - public IResult Create() where IResult : IApi - { - return Services.GetRequiredService(); - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs new file mode 100644 index 0000000..b0f29c7 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ApiResponse.cs @@ -0,0 +1,166 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Net; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Provides a non-generic contract for the ApiResponse wrapper. + /// + public interface IApiResponse + { + /// + /// The data type of + /// + Type ResponseType { get; } + + /// + /// The content of this response + /// + Object Content { get; } + + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + HttpStatusCode StatusCode { get; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + Multimap Headers { get; } + + /// + /// Gets or sets any error text defined by the calling client. + /// + string ErrorText { get; set; } + + /// + /// Gets or sets any cookies passed along on the response. + /// + List Cookies { get; set; } + + /// + /// The raw content of this response + /// + string RawContent { get; } + } + + /// + /// API Response + /// + public class ApiResponse : IApiResponse + { + #region Properties + + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public HttpStatusCode StatusCode { get; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public Multimap Headers { get; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; } + + /// + /// Gets or sets any error text defined by the calling client. + /// + public string ErrorText { get; set; } + + /// + /// Gets or sets any cookies passed along on the response. + /// + public List Cookies { get; set; } + + /// + /// The content of this response + /// + public Type ResponseType + { + get { return typeof(T); } + } + + /// + /// The data type of + /// + public object Content + { + get { return Data; } + } + + /// + /// The raw content + /// + public string RawContent { get; } + + #endregion Properties + + #region Constructors + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + /// Raw content. + public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data, string rawContent) + { + StatusCode = statusCode; + Headers = headers; + Data = data; + RawContent = rawContent; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// HTTP headers. + /// Data (parsed HTTP body) + public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data) : this(statusCode, headers, data, null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Data (parsed HTTP body) + /// Raw content. + public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) : this(statusCode, null, data, rawContent) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Data (parsed HTTP body) + public ApiResponse(HttpStatusCode statusCode, T data) : this(statusCode, data, null) + { + } + + #endregion Constructors + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs deleted file mode 100644 index 8ea5bff..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/ApiResponseEventArgs.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Useful for tracking server health - /// - public class ApiResponseEventArgs : EventArgs - { - /// - /// The ApiResponse - /// - public ApiResponse ApiResponse { get; } - - /// - /// The ApiResponseEventArgs - /// - /// - public ApiResponseEventArgs(ApiResponse apiResponse) - { - ApiResponse = apiResponse; - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs b/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs deleted file mode 100644 index 33d5137..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/ApiResponse`1.cs +++ /dev/null @@ -1,192 +0,0 @@ -// -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Diagnostics.CodeAnalysis; -using System.Net; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Provides a non-generic contract for the ApiResponse wrapper. - /// - public partial interface IApiResponse - { - /// - /// The IsSuccessStatusCode from the api response - /// - bool IsSuccessStatusCode { get; } - - /// - /// Gets the status code (HTTP status code) - /// - /// The status code. - HttpStatusCode StatusCode { get; } - - /// - /// The raw content of this response. - /// - string RawContent { get; } - - /// - /// The DateTime when the request was retrieved. - /// - DateTime DownloadedAt { get; } - - /// - /// The headers contained in the api response - /// - System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - - /// - /// The path used when making the request. - /// - string Path { get; } - - /// - /// The reason phrase contained in the api response - /// - string? ReasonPhrase { get; } - - /// - /// The DateTime when the request was sent. - /// - DateTime RequestedAt { get; } - - /// - /// The Uri used when making the request. - /// - Uri? RequestUri { get; } - } - - /// - /// API Response - /// - public partial class ApiResponse : IApiResponse - { - /// - /// Gets the status code (HTTP status code) - /// - /// The status code. - public HttpStatusCode StatusCode { get; } - - /// - /// The raw data - /// - public string RawContent { get; protected set; } - - /// - /// The IsSuccessStatusCode from the api response - /// - public bool IsSuccessStatusCode { get; } - - /// - /// The reason phrase contained in the api response - /// - public string? ReasonPhrase { get; } - - /// - /// The headers contained in the api response - /// - public System.Net.Http.Headers.HttpResponseHeaders Headers { get; } - - /// - /// The DateTime when the request was retrieved. - /// - public DateTime DownloadedAt { get; } = DateTime.UtcNow; - - /// - /// The DateTime when the request was sent. - /// - public DateTime RequestedAt { get; } - - /// - /// The path used when making the request. - /// - public string Path { get; } - - /// - /// The Uri used when making the request. - /// - public Uri? RequestUri { get; } - - /// - /// The - /// - protected System.Text.Json.JsonSerializerOptions _jsonSerializerOptions; - - /// - /// Construct the response using an HttpResponseMessage - /// - /// - /// - /// - /// - /// - /// - public ApiResponse(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) - { - StatusCode = httpResponseMessage.StatusCode; - Headers = httpResponseMessage.Headers; - IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode; - ReasonPhrase = httpResponseMessage.ReasonPhrase; - RawContent = rawContent; - Path = path; - RequestUri = httpRequestMessage.RequestUri; - RequestedAt = requestedAt; - _jsonSerializerOptions = jsonSerializerOptions; - OnCreated(httpRequestMessage, httpResponseMessage); - } - - partial void OnCreated(global::System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage); - } - - /// - /// An interface for responses of type - /// - /// - public interface INoContent : IApiResponse - { - /// - /// Deserializes the response if the response is NoContent - /// - /// - TType NoContent(); - - /// - /// Returns true if the response is NoContent and the deserialized response is not null - /// - /// - /// - bool TryNoContent([NotNullWhen(true)]out TType? result); - } - - /// - /// An interface for responses of type - /// - /// - public interface IOk : IApiResponse - { - /// - /// Deserializes the response if the response is Ok - /// - /// - TType Ok(); - - /// - /// Returns true if the response is Ok and the deserialized response is not null - /// - /// - /// - bool TryOk([NotNullWhen(true)]out TType? result); - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs index 4360de0..464aaa0 100644 --- a/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs +++ b/src/Regula.DocumentReader.WebClient/Client/ClientUtils.cs @@ -7,79 +7,75 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; -using System.IO; -using System.Linq; using System.Collections; using System.Collections.Generic; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Runtime.Serialization; using System.Text; -using System.Text.Json; using System.Text.RegularExpressions; -using Regula.DocumentReader.WebClient.Model; -using System.Runtime.CompilerServices; - namespace Regula.DocumentReader.WebClient.Client { /// /// Utility functions providing some benefit to API client consumers. /// - public static partial class ClientUtils + public static class ClientUtils { - - /// - /// A delegate for events. - /// - /// - /// - /// - /// - public delegate void EventHandler(object sender, T e) where T : EventArgs; - /// - /// Returns true when deserialization succeeds. + /// Sanitize filename by removing the path /// - /// - /// - /// - /// - /// - public static bool TryDeserialize(string json, JsonSerializerOptions options, [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) + /// Filename + /// Filename + public static string SanitizeFilename(string filename) { - try - { - result = JsonSerializer.Deserialize(json, options); - return result != null; - } - catch (Exception) - { - result = default; - return false; - } + Match match = Regex.Match(filename, @".*[/\\](.*)$"); + return match.Success ? match.Groups[1].Value : filename; } /// - /// Returns true when deserialization succeeds. + /// Convert params to key/value pairs. + /// Use collectionFormat to properly format lists and collections. /// - /// - /// - /// - /// - /// - public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, [global::System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result) + /// The swagger-supported collection format, one of: csv, tsv, ssv, pipes, multi + /// Key name. + /// Value object. + /// A multimap of keys with 1..n associated values. + public static Multimap ParameterToMultiMap(string collectionFormat, string name, object value) { - try + var parameters = new Multimap(); + + if (value is ICollection collection && collectionFormat == "multi") + { + foreach (var item in collection) + { + parameters.Add(name, ParameterToString(item)); + } + } + else if (value is IDictionary dictionary) { - result = JsonSerializer.Deserialize(ref reader, options); - return result != null; + if(collectionFormat == "deepObject") { + foreach (DictionaryEntry entry in dictionary) + { + parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value)); + } + } + else { + foreach (DictionaryEntry entry in dictionary) + { + parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value)); + } + } } - catch (Exception) + else { - result = default; - return false; + parameters.Add(name, ParameterToString(value)); } + + return parameters; } /// @@ -88,160 +84,50 @@ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOp /// Otherwise just return the string. /// /// The parameter (header, path, query, form). - /// The DateTime serialization format. + /// An optional configuration instance, providing formatting options used in processing. /// Formatted string. - public static string? ParameterToString(object? obj, string? format = ISO8601_DATETIME_FORMAT) + public static string ParameterToString(object obj, IReadableConfiguration configuration = null) { if (obj is DateTime dateTime) // Return a formatted date string - Can be customized with Configuration.DateTimeFormat // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 - return dateTime.ToString(format); + return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is DateTimeOffset dateTimeOffset) // Return a formatted date string - Can be customized with Configuration.DateTimeFormat // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 // For example: 2009-06-15T13:45:30.0000000 - return dateTimeOffset.ToString(format); + return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is DateOnly dateOnly) - return dateOnly.ToString(format); + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15 + return dateOnly.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); if (obj is bool boolean) - return boolean - ? "true" - : "false"; - if (obj is AuthenticityResultType authenticityResultType) - return AuthenticityResultTypeValueConverter.ToJsonValue(authenticityResultType).ToString(); - if (obj is BarCodeModuleType barCodeModuleType) - return BarCodeModuleTypeValueConverter.ToJsonValue(barCodeModuleType).ToString(); - if (obj is BarcodeType barcodeType) - return BarcodeTypeValueConverter.ToJsonValue(barcodeType).ToString(); - if (obj is CheckDiagnose checkDiagnose) - return CheckDiagnoseValueConverter.ToJsonValue(checkDiagnose).ToString(); - if (obj is CheckResult checkResult) - return CheckResultValueConverter.ToJsonValue(checkResult).ToString(); - if (obj is Critical critical) - return CriticalValueConverter.ToJsonValue(critical).ToString(); - if (obj is DocumentFormat documentFormat) - return DocumentFormatValueConverter.ToJsonValue(documentFormat).ToString(); - if (obj is DocumentType documentType) - return DocumentTypeValueConverter.ToJsonValue(documentType).ToString(); - if (obj is DocumentTypeRecognitionResult documentTypeRecognitionResult) - return DocumentTypeRecognitionResultValueConverter.ToJsonValue(documentTypeRecognitionResult).ToString(); - if (obj is GraphicFieldType graphicFieldType) - return GraphicFieldTypeValueConverter.ToJsonValue(graphicFieldType).ToString(); - if (obj is ImageQualityCheckType imageQualityCheckType) - return ImageQualityCheckTypeValueConverter.ToJsonValue(imageQualityCheckType).ToString(); - if (obj is InputBarcodeType inputBarcodeType) - return InputBarcodeTypeValueConverter.ToJsonValue(inputBarcodeType); - if (obj is InputImageQualityChecks inputImageQualityChecks) - return InputImageQualityChecksValueConverter.ToJsonValue(inputImageQualityChecks); - if (obj is LCID lCID) - return LCIDValueConverter.ToJsonValue(lCID).ToString(); - if (obj is Light light) - return LightValueConverter.ToJsonValue(light).ToString(); - if (obj is LogLevel logLevel) - return LogLevelValueConverter.ToJsonValue(logLevel); - if (obj is MRZFormat mRZFormat) - return MRZFormatValueConverter.ToJsonValue(mRZFormat); - if (obj is MeasureSystem measureSystem) - return MeasureSystemValueConverter.ToJsonValue(measureSystem).ToString(); - if (obj is MrzDetectModeEnum mrzDetectModeEnum) - return MrzDetectModeEnumValueConverter.ToJsonValue(mrzDetectModeEnum).ToString(); - if (obj is ParsingNotificationCodes parsingNotificationCodes) - return ParsingNotificationCodesValueConverter.ToJsonValue(parsingNotificationCodes).ToString(); - if (obj is ProcessingStatus processingStatus) - return ProcessingStatusValueConverter.ToJsonValue(processingStatus).ToString(); - if (obj is RFIDErrorCodes rFIDErrorCodes) - return RFIDErrorCodesValueConverter.ToJsonValue(rFIDErrorCodes).ToString(); - if (obj is RFIDPKDResourceType rFIDPKDResourceType) - return RFIDPKDResourceTypeValueConverter.ToJsonValue(rFIDPKDResourceType).ToString(); - if (obj is Result result) - return ResultValueConverter.ToJsonValue(result).ToString(); - if (obj is RfidAChip rfidAChip) - return RfidAChipValueConverter.ToJsonValue(rfidAChip).ToString(); - if (obj is RfidAccessControlProcedureType rfidAccessControlProcedureType) - return RfidAccessControlProcedureTypeValueConverter.ToJsonValue(rfidAccessControlProcedureType).ToString(); - if (obj is RfidApplicationType rfidApplicationType) - return RfidApplicationTypeValueConverter.ToJsonValue(rfidApplicationType).ToString(); - if (obj is RfidAuthenticationProcedureType rfidAuthenticationProcedureType) - return RfidAuthenticationProcedureTypeValueConverter.ToJsonValue(rfidAuthenticationProcedureType).ToString(); - if (obj is RfidBaudRate rfidBaudRate) - return RfidBaudRateValueConverter.ToJsonValue(rfidBaudRate).ToString(); - if (obj is RfidCertificateOrigin rfidCertificateOrigin) - return RfidCertificateOriginValueConverter.ToJsonValue(rfidCertificateOrigin).ToString(); - if (obj is RfidCertificateType rfidCertificateType) - return RfidCertificateTypeValueConverter.ToJsonValue(rfidCertificateType).ToString(); - if (obj is RfidDataFileType rfidDataFileType) - return RfidDataFileTypeValueConverter.ToJsonValue(rfidDataFileType).ToString(); - if (obj is RfidDataGroupTypeTag rfidDataGroupTypeTag) - return RfidDataGroupTypeTagValueConverter.ToJsonValue(rfidDataGroupTypeTag).ToString(); - if (obj is RfidLocation rfidLocation) - return RfidLocationValueConverter.ToJsonValue(rfidLocation).ToString(); - if (obj is RfidPasswordType rfidPasswordType) - return RfidPasswordTypeValueConverter.ToJsonValue(rfidPasswordType).ToString(); - if (obj is RfidTerminalType rfidTerminalType) - return RfidTerminalTypeValueConverter.ToJsonValue(rfidTerminalType).ToString(); - if (obj is RfidType rfidType) - return RfidTypeValueConverter.ToJsonValue(rfidType).ToString(); - if (obj is Scenario scenario) - return ScenarioValueConverter.ToJsonValue(scenario); - if (obj is SecurityFeatureType securityFeatureType) - return SecurityFeatureTypeValueConverter.ToJsonValue(securityFeatureType).ToString(); - if (obj is Source source) - return SourceValueConverter.ToJsonValue(source); - if (obj is TextFieldType textFieldType) - return TextFieldTypeValueConverter.ToJsonValue(textFieldType).ToString(); - if (obj is TextPostProcessing textPostProcessing) - return TextPostProcessingValueConverter.ToJsonValue(textPostProcessing).ToString(); - if (obj is VerificationResult verificationResult) - return VerificationResultValueConverter.ToJsonValue(verificationResult).ToString(); - if (obj is Visibility visibility) - return VisibilityValueConverter.ToJsonValue(visibility).ToString(); - if (obj is ICollection collection) - { - List entries = new(); + return boolean ? "true" : "false"; + if (obj is ICollection collection) { + List entries = new List(); foreach (var entry in collection) - entries.Add(ParameterToString(entry)); + entries.Add(ParameterToString(entry, configuration)); return string.Join(",", entries); } + if (obj is Enum && HasEnumMemberAttrValue(obj)) + return GetEnumMemberAttrValue(obj); - return Convert.ToString(obj, System.Globalization.CultureInfo.InvariantCulture); + return Convert.ToString(obj, CultureInfo.InvariantCulture); } /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// Serializes the given object when not null. Otherwise return null. /// - /// string to be URL encoded - /// Byte array - public static string UrlEncode(string input) + /// The object to serialize. + /// Serialized string. + public static string Serialize(object obj) { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); + return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; } /// @@ -275,7 +161,7 @@ public static byte[] ReadAsBytes(Stream inputStream) /// /// The Content-Type array to select from. /// The Content-Type header to use. - public static string? SelectHeaderContentType(string[] contentTypes) + public static string SelectHeaderContentType(string[] contentTypes) { if (contentTypes.Length == 0) return null; @@ -296,7 +182,7 @@ public static byte[] ReadAsBytes(Stream inputStream) /// /// The accepts array to select from. /// The Accept header to use. - public static string? SelectHeaderAccept(string[] accepts) + public static string SelectHeaderAccept(string[] accepts) { if (accepts.Length == 0) return null; @@ -310,8 +196,7 @@ public static byte[] ReadAsBytes(Stream inputStream) /// /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. /// - [GeneratedRegex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$")] - private static partial Regex JsonRegex(); + public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); /// /// Check if the given MIME is a JSON MIME. @@ -327,69 +212,42 @@ public static bool IsJsonMime(string mime) { if (string.IsNullOrWhiteSpace(mime)) return false; - return JsonRegex().IsMatch(mime) || mime.Equals("application/json-patch+json"); + return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); } /// - /// Get the discriminator + /// Is the Enum decorated with EnumMember Attribute /// - /// - /// - /// - /// - public static string? GetDiscriminator(Utf8JsonReader utf8JsonReader, string discriminator) + /// + /// true if found + private static bool HasEnumMemberAttrValue(object enumVal) { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - if (localVarJsonPropertyName != null && localVarJsonPropertyName.Equals(discriminator)) - return utf8JsonReader.GetString(); - } - } - - throw new JsonException("The specified discriminator was not found."); + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) return true; + return false; } /// - /// The base path of the API + /// Get the EnumMember value /// - public const string BASE_ADDRESS = "https://api.regulaforensics.com"; - - /// - /// The scheme of the API - /// - public const string SCHEME = "https"; - - /// - /// The context path of the API - /// - public const string CONTEXT_PATH = ""; - - /// - /// The host of the API - /// - public const string HOST = "api.regulaforensics.com"; - - /// - /// The format to use for DateTime serialization - /// - public const string ISO8601_DATETIME_FORMAT = "o"; + /// + /// EnumMember value as string otherwise null + private static string GetEnumMemberAttrValue(object enumVal) + { + if (enumVal == null) + throw new ArgumentNullException(nameof(enumVal)); + var enumType = enumVal.GetType(); + var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); + var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); + if (attr != null) + { + return attr.Value; + } + return null; + } } } diff --git a/src/Regula.DocumentReader.WebClient/Client/Configuration.cs b/src/Regula.DocumentReader.WebClient/Client/Configuration.cs new file mode 100644 index 0000000..4efc27a --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/Configuration.cs @@ -0,0 +1,624 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Net; +using System.Reflection; +using System.Security.Cryptography.X509Certificates; +using System.Text; +using System.Net.Http; +using System.Net.Security; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Represents a set of configuration settings + /// + public class Configuration : IReadableConfiguration + { + #region Constants + + /// + /// Version of the package. + /// + /// Version of the package. + public const string Version = "1.0.0"; + + /// + /// Identifier for ISO 8601 DateTime Format + /// + /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. + // ReSharper disable once InconsistentNaming + public const string ISO8601_DATETIME_FORMAT = "o"; + + #endregion Constants + + #region Static Members + + /// + /// Default creation of exceptions for a given method name and response object + /// + public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => + { + var status = (int)response.StatusCode; + if (status >= 400) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.RawContent), + response.RawContent, response.Headers); + } + if (status == 0) + { + return new ApiException(status, + string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); + } + return null; + }; + + #endregion Static Members + + #region Private Members + + /// + /// Defines the base path of the target API server. + /// Example: http://localhost:3000/v1/ + /// + private string _basePath; + + private bool _useDefaultCredentials = false; + + /// + /// Gets or sets the API key based on the authentication name. + /// This is the key and value comprising the "secret" for accessing an API. + /// + /// The API key. + private IDictionary _apiKey; + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// The prefix of the API key. + private IDictionary _apiKeyPrefix; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + private string _tempFolderPath = Path.GetTempPath(); + + /// + /// Gets or sets the servers defined in the OpenAPI spec. + /// + /// The servers + private IList> _servers; + + /// + /// Gets or sets the operation servers defined in the OpenAPI spec. + /// + /// The operation servers + private IReadOnlyDictionary>> _operationServers; + + #endregion Private Members + + #region Constructors + + /// + /// Initializes a new instance of the class + /// + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + public Configuration() + { + Proxy = null; + UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp"); + BasePath = "https://api.regulaforensics.com"; + DefaultHeaders = new ConcurrentDictionary(); + ApiKey = new ConcurrentDictionary(); + ApiKeyPrefix = new ConcurrentDictionary(); + Servers = new List>() + { + { + new Dictionary { + {"url", "https://api.regulaforensics.com"}, + {"description", "Latest stable Regula Document Reader demo endpoint"}, + } + }, + { + new Dictionary { + {"url", "https://nightly-api.regulaforensics.com"}, + {"description", "Nightly Regula document reader demo endpoint"}, + } + }, + { + new Dictionary { + {"url", "http://localhost:8080"}, + {"description", "Local on-premise installation"}, + } + } + }; + OperationServers = new Dictionary>>() + { + }; + + // Setting Timeout has side effects (forces ApiClient creation). + Timeout = TimeSpan.FromSeconds(100); + } + + /// + /// Initializes a new instance of the class + /// + [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] + public Configuration( + IDictionary defaultHeaders, + IDictionary apiKey, + IDictionary apiKeyPrefix, + string basePath = "https://api.regulaforensics.com") : this() + { + if (string.IsNullOrWhiteSpace(basePath)) + throw new ArgumentException("The provided basePath is invalid.", "basePath"); + if (defaultHeaders == null) + throw new ArgumentNullException("defaultHeaders"); + if (apiKey == null) + throw new ArgumentNullException("apiKey"); + if (apiKeyPrefix == null) + throw new ArgumentNullException("apiKeyPrefix"); + + BasePath = basePath; + + foreach (var keyValuePair in defaultHeaders) + { + DefaultHeaders.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKey) + { + ApiKey.Add(keyValuePair); + } + + foreach (var keyValuePair in apiKeyPrefix) + { + ApiKeyPrefix.Add(keyValuePair); + } + } + + #endregion Constructors + + #region Properties + + /// + /// Gets or sets the base path for API access. + /// + public virtual string BasePath + { + get { return _basePath; } + set { _basePath = value; } + } + + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + public virtual bool UseDefaultCredentials + { + get { return _useDefaultCredentials; } + set { _useDefaultCredentials = value; } + } + + /// + /// Gets or sets the default header. + /// + [Obsolete("Use DefaultHeaders instead.")] + public virtual IDictionary DefaultHeader + { + get + { + return DefaultHeaders; + } + set + { + DefaultHeaders = value; + } + } + + /// + /// Gets or sets the default headers. + /// + public virtual IDictionary DefaultHeaders { get; set; } + + /// + /// Gets or sets the HTTP timeout of ApiClient. Defaults to 100 seconds. + /// + public virtual TimeSpan Timeout { get; set; } + + /// + /// Gets or sets the proxy + /// + /// Proxy. + public virtual WebProxy Proxy { get; set; } + + /// + /// Gets or sets the HTTP user agent. + /// + /// Http user agent. + public virtual string UserAgent { get; set; } + + /// + /// Gets or sets the username (HTTP basic authentication). + /// + /// The username. + public virtual string Username { get; set; } + + /// + /// Gets or sets the password (HTTP basic authentication). + /// + /// The password. + public virtual string Password { get; set; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix(string apiKeyIdentifier) + { + string apiKeyValue; + ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); + string apiKeyPrefix; + if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) + { + return apiKeyPrefix + " " + apiKeyValue; + } + + return apiKeyValue; + } + + /// + /// Gets or sets certificate collection to be sent with requests. + /// + /// X509 Certificate collection. + public X509CertificateCollection ClientCertificates { get; set; } + + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// This helper property simplifies code generation. + /// + /// The access token. + public virtual string AccessToken { get; set; } + + /// + /// Gets or sets the temporary folder path to store the files downloaded from the server. + /// + /// Folder path. + public virtual string TempFolderPath + { + get { return _tempFolderPath; } + + set + { + if (string.IsNullOrEmpty(value)) + { + _tempFolderPath = Path.GetTempPath(); + return; + } + + // create the directory if it does not exist + if (!Directory.Exists(value)) + { + Directory.CreateDirectory(value); + } + + // check if the path contains directory separator at the end + if (value[value.Length - 1] == Path.DirectorySeparatorChar) + { + _tempFolderPath = value; + } + else + { + _tempFolderPath = value + Path.DirectorySeparatorChar; + } + } + } + + /// + /// Gets or sets the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public virtual string DateTimeFormat + { + get { return _dateTimeFormat; } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + + /// + /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. + /// + /// Whatever you set here will be prepended to the value defined in AddApiKey. + /// + /// An example invocation here might be: + /// + /// ApiKeyPrefix["Authorization"] = "Bearer"; + /// + /// … where ApiKey["Authorization"] would then be used to set the value of your bearer token. + /// + /// + /// OAuth2 workflows should set tokens via AccessToken. + /// + /// + /// The prefix of the API key. + public virtual IDictionary ApiKeyPrefix + { + get { return _apiKeyPrefix; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); + } + _apiKeyPrefix = value; + } + } + + /// + /// Gets or sets the API key based on the authentication name. + /// + /// The API key. + public virtual IDictionary ApiKey + { + get { return _apiKey; } + set + { + if (value == null) + { + throw new InvalidOperationException("ApiKey collection may not be null."); + } + _apiKey = value; + } + } + + /// + /// Gets or sets the servers. + /// + /// The servers. + public virtual IList> Servers + { + get { return _servers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Servers may not be null."); + } + _servers = value; + } + } + + /// + /// Gets or sets the operation servers. + /// + /// The operation servers. + public virtual IReadOnlyDictionary>> OperationServers + { + get { return _operationServers; } + set + { + if (value == null) + { + throw new InvalidOperationException("Operation servers may not be null."); + } + _operationServers = value; + } + } + + /// + /// Returns URL based on server settings without providing values + /// for the variables + /// + /// Array index of the server settings. + /// The server URL. + public string GetServerUrl(int index) + { + return GetServerUrl(Servers, index, null); + } + + /// + /// Returns URL based on server settings. + /// + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + public string GetServerUrl(int index, Dictionary inputVariables) + { + return GetServerUrl(Servers, index, inputVariables); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index) + { + return GetOperationServerUrl(operation, index, null); + } + + /// + /// Returns URL based on operation server settings. + /// + /// Operation associated with the request path. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The operation server URL. + public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) + { + if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) + { + return GetServerUrl(operationServer, index, inputVariables); + } + + return null; + } + + /// + /// Returns URL based on server settings. + /// + /// Dictionary of server settings. + /// Array index of the server settings. + /// Dictionary of the variables and the corresponding values. + /// The server URL. + private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) + { + if (index < 0 || index >= servers.Count) + { + throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); + } + + if (inputVariables == null) + { + inputVariables = new Dictionary(); + } + + IReadOnlyDictionary server = servers[index]; + string url = (string)server["url"]; + + if (server.ContainsKey("variables")) + { + // go through each variable and assign a value + foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) + { + + IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); + + if (inputVariables.ContainsKey(variable.Key)) + { + if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) + { + url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); + } + else + { + throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); + } + } + else + { + // use default value + url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); + } + } + } + + return url; + } + + /// + /// Gets and Sets the RemoteCertificateValidationCallback + /// + public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } + + #endregion Properties + + #region Methods + + /// + /// Returns a string with essential information for debugging. + /// + public static string ToDebugReport() + { + string report = "C# SDK (Regula.DocumentReader.WebClient) Debug Report:\n"; + report += " OS: " + System.Environment.OSVersion + "\n"; + report += " .NET Framework Version: " + System.Environment.Version + "\n"; + report += " Version of the API: 7.6.0\n"; + report += " SDK Package Version: 1.0.0\n"; + + return report; + } + + /// + /// Add Api Key Header. + /// + /// Api Key name. + /// Api Key value. + /// + public void AddApiKey(string key, string value) + { + ApiKey[key] = value; + } + + /// + /// Sets the API key prefix. + /// + /// Api Key name. + /// Api Key value. + public void AddApiKeyPrefix(string key, string value) + { + ApiKeyPrefix[key] = value; + } + + #endregion Methods + + #region Static Members + /// + /// Merge configurations. + /// + /// First configuration. + /// Second configuration. + /// Merged configuration. + public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second) + { + if (second == null) return first ?? GlobalConfiguration.Instance; + + Dictionary apiKey = first.ApiKey.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); + + foreach (var kvp in second.ApiKey) apiKey[kvp.Key] = kvp.Value; + foreach (var kvp in second.ApiKeyPrefix) apiKeyPrefix[kvp.Key] = kvp.Value; + foreach (var kvp in second.DefaultHeaders) defaultHeaders[kvp.Key] = kvp.Value; + + var config = new Configuration + { + ApiKey = apiKey, + ApiKeyPrefix = apiKeyPrefix, + DefaultHeaders = defaultHeaders, + BasePath = second.BasePath ?? first.BasePath, + Timeout = second.Timeout, + Proxy = second.Proxy ?? first.Proxy, + UserAgent = second.UserAgent ?? first.UserAgent, + Username = second.Username ?? first.Username, + Password = second.Password ?? first.Password, + AccessToken = second.AccessToken ?? first.AccessToken, + TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, + DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, + ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, + UseDefaultCredentials = second.UseDefaultCredentials, + RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, + }; + return config; + } + #endregion Static Members + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs b/src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs deleted file mode 100644 index 278c8ee..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/CookieContainer.cs +++ /dev/null @@ -1,20 +0,0 @@ -// - -#nullable enable - -using System.Linq; -using System.Collections.Generic; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// A class containing a CookieContainer - /// - public sealed class CookieContainer - { - /// - /// The collection of tokens - /// - public System.Net.CookieContainer Value { get; } = new System.Net.CookieContainer(); - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs deleted file mode 100644 index 6ca4176..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/DateOnlyJsonConverter.cs +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class DateOnlyJsonConverter : JsonConverter - { - /// - /// The formats used to deserialize the date - /// - public static string[] Formats { get; } = { - "yyyy'-'MM'-'dd", - "yyyyMMdd" - - }; - - /// - /// Returns a DateOnly from the Json object - /// - /// - /// - /// - /// - public override DateOnly Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if (reader.TokenType == JsonTokenType.Null) - throw new NotSupportedException(); - - string value = reader.GetString()!; - - foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) - return result; - - throw new NotSupportedException(); - } - - /// - /// Writes the DateOnly to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateOnly dateOnlyValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateOnlyValue.ToString("yyyy'-'MM'-'dd", CultureInfo.InvariantCulture)); - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs deleted file mode 100644 index 6dc5543..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/DateOnlyNullableJsonConverter.cs +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class DateOnlyNullableJsonConverter : JsonConverter - { - /// - /// The formats used to deserialize the date - /// - public static string[] Formats { get; } = { - "yyyy'-'MM'-'dd", - "yyyyMMdd" - - }; - - /// - /// Returns a DateOnly from the Json object - /// - /// - /// - /// - /// - public override DateOnly? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if (reader.TokenType == JsonTokenType.Null) - return null; - - string value = reader.GetString()!; - - foreach(string format in Formats) - if (DateOnly.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateOnly result)) - return result; - - throw new NotSupportedException(); - } - - /// - /// Writes the DateOnly to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateOnly? dateOnlyValue, JsonSerializerOptions options) - { - if (dateOnlyValue == null) - writer.WriteNullValue(); - else - writer.WriteStringValue(dateOnlyValue.Value.ToString("yyyy'-'MM'-'dd", CultureInfo.InvariantCulture)); - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs deleted file mode 100644 index 6257cf8..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/DateTimeJsonConverter.cs +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class DateTimeJsonConverter : JsonConverter - { - /// - /// The formats used to deserialize the date - /// - public static string[] Formats { get; } = { - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", - "yyyyMMddTHHmmss.fffffffK", - "yyyyMMddTHHmmss.ffffffK", - "yyyyMMddTHHmmss.fffffK", - "yyyyMMddTHHmmss.ffffK", - "yyyyMMddTHHmmss.fffK", - "yyyyMMddTHHmmss.ffK", - "yyyyMMddTHHmmss.fK", - "yyyyMMddTHHmmssK", - - }; - - /// - /// Returns a DateTime from the Json object - /// - /// - /// - /// - /// - public override DateTime Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if (reader.TokenType == JsonTokenType.Null) - throw new NotSupportedException(); - - string value = reader.GetString()!; - - foreach(string format in Formats) - if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) - return result; - - throw new NotSupportedException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateTime dateTimeValue, JsonSerializerOptions options) => - writer.WriteStringValue(dateTimeValue.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", CultureInfo.InvariantCulture)); - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs b/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs deleted file mode 100644 index 901a225..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/DateTimeNullableJsonConverter.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Globalization; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Formatter for 'date-time' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class DateTimeNullableJsonConverter : JsonConverter - { - /// - /// The formats used to deserialize the date - /// - public static string[] Formats { get; } = { - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'ffK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fK", - "yyyy'-'MM'-'dd'T'HH':'mm':'ssK", - "yyyyMMddTHHmmss.fffffffK", - "yyyyMMddTHHmmss.ffffffK", - "yyyyMMddTHHmmss.fffffK", - "yyyyMMddTHHmmss.ffffK", - "yyyyMMddTHHmmss.fffK", - "yyyyMMddTHHmmss.ffK", - "yyyyMMddTHHmmss.fK", - "yyyyMMddTHHmmssK", - - }; - - /// - /// Returns a DateTime from the Json object - /// - /// - /// - /// - /// - public override DateTime? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) { - if (reader.TokenType == JsonTokenType.Null) - return null; - - string value = reader.GetString()!; - - foreach(string format in Formats) - if (DateTime.TryParseExact(value, format, CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out DateTime result)) - return result; - - return null; - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DateTime? dateTimeValue, JsonSerializerOptions options) - { - if (dateTimeValue == null) - writer.WriteNullValue(); - else - writer.WriteStringValue(dateTimeValue.Value.ToString("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK", CultureInfo.InvariantCulture)); - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs b/src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs deleted file mode 100644 index b5ee313..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/ExceptionEventArgs.cs +++ /dev/null @@ -1,24 +0,0 @@ -using System; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Useful for tracking server health - /// - public class ExceptionEventArgs : EventArgs - { - /// - /// The ApiResponse - /// - public Exception Exception { get; } - - /// - /// The ExceptionEventArgs - /// - /// - public ExceptionEventArgs(Exception exception) - { - Exception = exception; - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs b/src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs new file mode 100644 index 0000000..6945bee --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ExceptionFactory.cs @@ -0,0 +1,22 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// A delegate to ExceptionFactory method + /// + /// Method name + /// Response + /// Exceptions + public delegate Exception ExceptionFactory(string methodName, IApiResponse response); +} diff --git a/src/Regula.DocumentReader.WebClient/Client/FileParameter.cs b/src/Regula.DocumentReader.WebClient/Client/FileParameter.cs new file mode 100644 index 0000000..ad9966d --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/FileParameter.cs @@ -0,0 +1,80 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System.IO; + +namespace Regula.DocumentReader.WebClient.Client +{ + + /// + /// Represents a File passed to the API as a Parameter, allows using different backends for files + /// + public class FileParameter + { + /// + /// The filename + /// + public string Name { get; set; } = "no_name_provided"; + + /// + /// The content type of the file + /// + public string ContentType { get; set; } = "application/octet-stream"; + + /// + /// The content of the file + /// + public Stream Content { get; set; } + + /// + /// Construct a FileParameter just from the contents, will extract the filename from a filestream + /// + /// The file content + public FileParameter(Stream content) + { + if (content is FileStream fs) + { + Name = fs.Name; + } + Content = content; + } + + /// + /// Construct a FileParameter from name and content + /// + /// The filename + /// The file content + public FileParameter(string filename, Stream content) + { + Name = filename; + Content = content; + } + + /// + /// Construct a FileParameter from name and content + /// + /// The filename + /// The content type of the file + /// The file content + public FileParameter(string filename, string contentType, Stream content) + { + Name = filename; + ContentType = contentType; + Content = content; + } + + /// + /// Implicit conversion of stream to file parameter. Useful for backwards compatibility. + /// + /// Stream to convert + /// FileParameter + public static implicit operator FileParameter(Stream s) => new FileParameter(s); + } +} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs new file mode 100644 index 0000000..8c0fae4 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/GlobalConfiguration.cs @@ -0,0 +1,67 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System.Collections.Generic; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// provides a compile-time extension point for globally configuring + /// API Clients. + /// + /// + /// A customized implementation via partial class may reside in another file and may + /// be excluded from automatic generation via a .openapi-generator-ignore file. + /// + public partial class GlobalConfiguration : Configuration + { + #region Private Members + + private static readonly object GlobalConfigSync = new { }; + private static IReadableConfiguration _globalConfiguration; + + #endregion Private Members + + #region Constructors + + /// + private GlobalConfiguration() + { + } + + /// + public GlobalConfiguration(IDictionary defaultHeader, IDictionary apiKey, IDictionary apiKeyPrefix, string basePath = "http://localhost:3000/api") : base(defaultHeader, apiKey, apiKeyPrefix, basePath) + { + } + + static GlobalConfiguration() + { + Instance = new GlobalConfiguration(); + } + + #endregion Constructors + + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static IReadableConfiguration Instance + { + get { return _globalConfiguration; } + set + { + lock (GlobalConfigSync) + { + _globalConfiguration = value; + } + } + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs deleted file mode 100644 index 778fdbd..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/HostConfiguration.cs +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text.Json; -using System.Text.Json.Serialization; -using System.Net.Http; -using Microsoft.Extensions.DependencyInjection; -using Regula.DocumentReader.WebClient.Api; -using Regula.DocumentReader.WebClient.Model; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Provides hosting configuration for Regula.DocumentReader.WebClient - /// - public class HostConfiguration - { - private readonly IServiceCollection _services; - private readonly JsonSerializerOptions _jsonOptions = new JsonSerializerOptions(); - - internal bool HttpClientsAdded { get; private set; } - - /// - /// Instantiates the class - /// - /// - public HostConfiguration(IServiceCollection services) - { - _services = services; - _jsonOptions.Converters.Add(new JsonStringEnumConverter()); - _jsonOptions.Converters.Add(new DateTimeJsonConverter()); - _jsonOptions.Converters.Add(new DateTimeNullableJsonConverter()); - _jsonOptions.Converters.Add(new DateOnlyJsonConverter()); - _jsonOptions.Converters.Add(new DateOnlyNullableJsonConverter()); - _jsonOptions.Converters.Add(new AreaArrayJsonConverter()); - _jsonOptions.Converters.Add(new AreaContainerJsonConverter()); - _jsonOptions.Converters.Add(new AuthParamsJsonConverter()); - _jsonOptions.Converters.Add(new AuthenticityCheckListJsonConverter()); - _jsonOptions.Converters.Add(new AuthenticityCheckListItemJsonConverter()); - _jsonOptions.Converters.Add(new AuthenticityCheckResultJsonConverter()); - _jsonOptions.Converters.Add(new AuthenticityCheckResultItemJsonConverter()); - _jsonOptions.Converters.Add(new AuthenticityCheckResultListInnerJsonConverter()); - _jsonOptions.Converters.Add(new AuthenticityResultJsonConverter()); - _jsonOptions.Converters.Add(new AuthenticityResultTypeJsonConverter()); - _jsonOptions.Converters.Add(new AuthenticityResultTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new BarCodeModuleTypeJsonConverter()); - _jsonOptions.Converters.Add(new BarCodeModuleTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new BarcodeTypeJsonConverter()); - _jsonOptions.Converters.Add(new BarcodeTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new BcPDF417INFOJsonConverter()); - _jsonOptions.Converters.Add(new BcROIDETECTJsonConverter()); - _jsonOptions.Converters.Add(new BinaryDataJsonConverter()); - _jsonOptions.Converters.Add(new ByteArrayItemJsonConverter()); - _jsonOptions.Converters.Add(new ByteArrayResultJsonConverter()); - _jsonOptions.Converters.Add(new CandidatesListItemJsonConverter()); - _jsonOptions.Converters.Add(new CertificateDataJsonConverter()); - _jsonOptions.Converters.Add(new CheckDiagnoseJsonConverter()); - _jsonOptions.Converters.Add(new CheckDiagnoseNullableJsonConverter()); - _jsonOptions.Converters.Add(new CheckResultJsonConverter()); - _jsonOptions.Converters.Add(new CheckResultNullableJsonConverter()); - _jsonOptions.Converters.Add(new ChosenDocumentTypeJsonConverter()); - _jsonOptions.Converters.Add(new ChosenDocumentTypeResultJsonConverter()); - _jsonOptions.Converters.Add(new ContainerListJsonConverter()); - _jsonOptions.Converters.Add(new ContainerListListInnerJsonConverter()); - _jsonOptions.Converters.Add(new CriticalJsonConverter()); - _jsonOptions.Converters.Add(new CriticalNullableJsonConverter()); - _jsonOptions.Converters.Add(new CrossSourceValueComparisonJsonConverter()); - _jsonOptions.Converters.Add(new DataModuleJsonConverter()); - _jsonOptions.Converters.Add(new DetailsOpticalJsonConverter()); - _jsonOptions.Converters.Add(new DetailsRFIDJsonConverter()); - _jsonOptions.Converters.Add(new DeviceInfoJsonConverter()); - _jsonOptions.Converters.Add(new DocBarCodeInfoJsonConverter()); - _jsonOptions.Converters.Add(new DocBarCodeInfoFieldsListJsonConverter()); - _jsonOptions.Converters.Add(new DocBarCodeInfoItemJsonConverter()); - _jsonOptions.Converters.Add(new DocGraphicsInfoItemJsonConverter()); - _jsonOptions.Converters.Add(new DocVisualExtendedFieldJsonConverter()); - _jsonOptions.Converters.Add(new DocVisualExtendedFieldItemJsonConverter()); - _jsonOptions.Converters.Add(new DocVisualExtendedInfoJsonConverter()); - _jsonOptions.Converters.Add(new DocVisualExtendedInfoItemJsonConverter()); - _jsonOptions.Converters.Add(new DocumentBinaryInfoResultJsonConverter()); - _jsonOptions.Converters.Add(new DocumentFormatJsonConverter()); - _jsonOptions.Converters.Add(new DocumentFormatNullableJsonConverter()); - _jsonOptions.Converters.Add(new DocumentImageJsonConverter()); - _jsonOptions.Converters.Add(new DocumentImageResultJsonConverter()); - _jsonOptions.Converters.Add(new DocumentPositionJsonConverter()); - _jsonOptions.Converters.Add(new DocumentPositionItemJsonConverter()); - _jsonOptions.Converters.Add(new DocumentPositionResultJsonConverter()); - _jsonOptions.Converters.Add(new DocumentTypeJsonConverter()); - _jsonOptions.Converters.Add(new DocumentTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new DocumentTypeRecognitionResultJsonConverter()); - _jsonOptions.Converters.Add(new DocumentTypeRecognitionResultNullableJsonConverter()); - _jsonOptions.Converters.Add(new DocumentTypesCandidatesJsonConverter()); - _jsonOptions.Converters.Add(new DocumentTypesCandidatesListJsonConverter()); - _jsonOptions.Converters.Add(new DocumentTypesCandidatesResultJsonConverter()); - _jsonOptions.Converters.Add(new DocumentsDatabaseJsonConverter()); - _jsonOptions.Converters.Add(new EncryptedRCLItemJsonConverter()); - _jsonOptions.Converters.Add(new EncryptedRCLResultJsonConverter()); - _jsonOptions.Converters.Add(new ErrorCoordinatesJsonConverter()); - _jsonOptions.Converters.Add(new FDSIDListJsonConverter()); - _jsonOptions.Converters.Add(new FaceApiJsonConverter()); - _jsonOptions.Converters.Add(new FaceApiSearchJsonConverter()); - _jsonOptions.Converters.Add(new FaceDetectionJsonConverter()); - _jsonOptions.Converters.Add(new FaceDetectionItemJsonConverter()); - _jsonOptions.Converters.Add(new FaceDetectionResultJsonConverter()); - _jsonOptions.Converters.Add(new FaceItemJsonConverter()); - _jsonOptions.Converters.Add(new FiberItemJsonConverter()); - _jsonOptions.Converters.Add(new FiberResultJsonConverter()); - _jsonOptions.Converters.Add(new FieldItemJsonConverter()); - _jsonOptions.Converters.Add(new FileImageJsonConverter()); - _jsonOptions.Converters.Add(new GetTransactionsByTagResponseJsonConverter()); - _jsonOptions.Converters.Add(new GraphDataJsonConverter()); - _jsonOptions.Converters.Add(new GraphicFieldJsonConverter()); - _jsonOptions.Converters.Add(new GraphicFieldTypeJsonConverter()); - _jsonOptions.Converters.Add(new GraphicFieldTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new GraphicFieldsListJsonConverter()); - _jsonOptions.Converters.Add(new GraphicsResultJsonConverter()); - _jsonOptions.Converters.Add(new HealthcheckJsonConverter()); - _jsonOptions.Converters.Add(new HealthcheckDocumentsDatabaseJsonConverter()); - _jsonOptions.Converters.Add(new IdentItemJsonConverter()); - _jsonOptions.Converters.Add(new IdentResultJsonConverter()); - _jsonOptions.Converters.Add(new ImageDataJsonConverter()); - _jsonOptions.Converters.Add(new ImageQAJsonConverter()); - _jsonOptions.Converters.Add(new ImageQualityCheckJsonConverter()); - _jsonOptions.Converters.Add(new ImageQualityCheckListJsonConverter()); - _jsonOptions.Converters.Add(new ImageQualityCheckListItemJsonConverter()); - _jsonOptions.Converters.Add(new ImageQualityCheckTypeJsonConverter()); - _jsonOptions.Converters.Add(new ImageQualityCheckTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new ImageQualityResultJsonConverter()); - _jsonOptions.Converters.Add(new ImageTransactionDataJsonConverter()); - _jsonOptions.Converters.Add(new ImagesJsonConverter()); - _jsonOptions.Converters.Add(new ImagesAvailableSourceJsonConverter()); - _jsonOptions.Converters.Add(new ImagesFieldJsonConverter()); - _jsonOptions.Converters.Add(new ImagesFieldValueJsonConverter()); - _jsonOptions.Converters.Add(new ImagesItemJsonConverter()); - _jsonOptions.Converters.Add(new ImagesResultJsonConverter()); - _jsonOptions.Converters.Add(new InDataJsonConverter()); - _jsonOptions.Converters.Add(new InDataTransactionImagesFieldValueJsonConverter()); - _jsonOptions.Converters.Add(new InDataVideoJsonConverter()); - _jsonOptions.Converters.Add(new InputBarcodeTypeJsonConverter()); - _jsonOptions.Converters.Add(new InputBarcodeTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new InputImageQualityChecksJsonConverter()); - _jsonOptions.Converters.Add(new InputImageQualityChecksNullableJsonConverter()); - _jsonOptions.Converters.Add(new LCIDJsonConverter()); - _jsonOptions.Converters.Add(new LCIDNullableJsonConverter()); - _jsonOptions.Converters.Add(new LexicalAnalysisResultJsonConverter()); - _jsonOptions.Converters.Add(new LicenseItemJsonConverter()); - _jsonOptions.Converters.Add(new LicenseResultJsonConverter()); - _jsonOptions.Converters.Add(new LightJsonConverter()); - _jsonOptions.Converters.Add(new LightNullableJsonConverter()); - _jsonOptions.Converters.Add(new ListTransactionsByTagResponseJsonConverter()); - _jsonOptions.Converters.Add(new ListVerifiedFieldsJsonConverter()); - _jsonOptions.Converters.Add(new ListVerifiedFieldsItemJsonConverter()); - _jsonOptions.Converters.Add(new LivenessParamsJsonConverter()); - _jsonOptions.Converters.Add(new LogLevelJsonConverter()); - _jsonOptions.Converters.Add(new LogLevelNullableJsonConverter()); - _jsonOptions.Converters.Add(new MRZDetectorResultJsonConverter()); - _jsonOptions.Converters.Add(new MRZFormatJsonConverter()); - _jsonOptions.Converters.Add(new MRZFormatNullableJsonConverter()); - _jsonOptions.Converters.Add(new MRZPositionResultJsonConverter()); - _jsonOptions.Converters.Add(new MRZRowsItemJsonConverter()); - _jsonOptions.Converters.Add(new MRZTestQualityJsonConverter()); - _jsonOptions.Converters.Add(new MRZTestQualityItemJsonConverter()); - _jsonOptions.Converters.Add(new MRZTestQualityResultJsonConverter()); - _jsonOptions.Converters.Add(new MeasureSystemJsonConverter()); - _jsonOptions.Converters.Add(new MeasureSystemNullableJsonConverter()); - _jsonOptions.Converters.Add(new MrzDetectModeEnumJsonConverter()); - _jsonOptions.Converters.Add(new MrzDetectModeEnumNullableJsonConverter()); - _jsonOptions.Converters.Add(new MrzPositionJsonConverter()); - _jsonOptions.Converters.Add(new MrzPositionItemJsonConverter()); - _jsonOptions.Converters.Add(new OCRSecurityTextItemJsonConverter()); - _jsonOptions.Converters.Add(new OCRSecurityTextResultJsonConverter()); - _jsonOptions.Converters.Add(new OneCandidateJsonConverter()); - _jsonOptions.Converters.Add(new OneCandidateItemJsonConverter()); - _jsonOptions.Converters.Add(new OriginalSymbolJsonConverter()); - _jsonOptions.Converters.Add(new OutDataJsonConverter()); - _jsonOptions.Converters.Add(new OutDataTransactionImagesFieldValueJsonConverter()); - _jsonOptions.Converters.Add(new PArrayFieldJsonConverter()); - _jsonOptions.Converters.Add(new ParsedDataJsonConverter()); - _jsonOptions.Converters.Add(new ParsingNotificationCodesJsonConverter()); - _jsonOptions.Converters.Add(new ParsingNotificationCodesNullableJsonConverter()); - _jsonOptions.Converters.Add(new PerDocumentConfigJsonConverter()); - _jsonOptions.Converters.Add(new PhotoIdentItemJsonConverter()); - _jsonOptions.Converters.Add(new PhotoIdentResultJsonConverter()); - _jsonOptions.Converters.Add(new PointJsonConverter()); - _jsonOptions.Converters.Add(new PointArrayJsonConverter()); - _jsonOptions.Converters.Add(new PointsContainerJsonConverter()); - _jsonOptions.Converters.Add(new ProcessParamsJsonConverter()); - _jsonOptions.Converters.Add(new ProcessParamsRfidJsonConverter()); - _jsonOptions.Converters.Add(new ProcessRequestJsonConverter()); - _jsonOptions.Converters.Add(new ProcessRequestImageJsonConverter()); - _jsonOptions.Converters.Add(new ProcessResponseJsonConverter()); - _jsonOptions.Converters.Add(new ProcessSystemInfoJsonConverter()); - _jsonOptions.Converters.Add(new ProcessingStatusJsonConverter()); - _jsonOptions.Converters.Add(new ProcessingStatusNullableJsonConverter()); - _jsonOptions.Converters.Add(new RFIDDocVisualExtendedFieldJsonConverter()); - _jsonOptions.Converters.Add(new RFIDDocVisualExtendedFieldItemJsonConverter()); - _jsonOptions.Converters.Add(new RFIDDocVisualExtendedInfoJsonConverter()); - _jsonOptions.Converters.Add(new RFIDDocVisualExtendedInfoItemJsonConverter()); - _jsonOptions.Converters.Add(new RFIDErrorCodesJsonConverter()); - _jsonOptions.Converters.Add(new RFIDErrorCodesNullableJsonConverter()); - _jsonOptions.Converters.Add(new RFIDGraphicsInfoResultJsonConverter()); - _jsonOptions.Converters.Add(new RFIDPKDResourceTypeJsonConverter()); - _jsonOptions.Converters.Add(new RFIDPKDResourceTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RFIDTextDataResultJsonConverter()); - _jsonOptions.Converters.Add(new RawImageContainerItemJsonConverter()); - _jsonOptions.Converters.Add(new RawImageContainerListJsonConverter()); - _jsonOptions.Converters.Add(new RectangleCoordinatesJsonConverter()); - _jsonOptions.Converters.Add(new ResultJsonConverter()); - _jsonOptions.Converters.Add(new ResultNullableJsonConverter()); - _jsonOptions.Converters.Add(new ResultItemJsonConverter()); - _jsonOptions.Converters.Add(new ResultMRZDetectorJsonConverter()); - _jsonOptions.Converters.Add(new ResultMRZDetectorItemJsonConverter()); - _jsonOptions.Converters.Add(new RfidAChipJsonConverter()); - _jsonOptions.Converters.Add(new RfidAChipNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidAccessControlInfoJsonConverter()); - _jsonOptions.Converters.Add(new RfidAccessControlProcedureTypeJsonConverter()); - _jsonOptions.Converters.Add(new RfidAccessControlProcedureTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidAccessKeyJsonConverter()); - _jsonOptions.Converters.Add(new RfidApplicationJsonConverter()); - _jsonOptions.Converters.Add(new RfidApplicationTypeJsonConverter()); - _jsonOptions.Converters.Add(new RfidApplicationTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidAttributeDataJsonConverter()); - _jsonOptions.Converters.Add(new RfidAttributeNameJsonConverter()); - _jsonOptions.Converters.Add(new RfidAuthenticationProcedureTypeJsonConverter()); - _jsonOptions.Converters.Add(new RfidAuthenticationProcedureTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidBaudRateJsonConverter()); - _jsonOptions.Converters.Add(new RfidBaudRateNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidCardPropertiesExtJsonConverter()); - _jsonOptions.Converters.Add(new RfidCertificateExJsonConverter()); - _jsonOptions.Converters.Add(new RfidCertificateOriginJsonConverter()); - _jsonOptions.Converters.Add(new RfidCertificateOriginNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidCertificateTypeJsonConverter()); - _jsonOptions.Converters.Add(new RfidCertificateTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidDG1JsonConverter()); - _jsonOptions.Converters.Add(new RfidDataFileJsonConverter()); - _jsonOptions.Converters.Add(new RfidDataFileTypeJsonConverter()); - _jsonOptions.Converters.Add(new RfidDataFileTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidDataGroupTypeTagJsonConverter()); - _jsonOptions.Converters.Add(new RfidDataGroupTypeTagNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidDistinguishedNameJsonConverter()); - _jsonOptions.Converters.Add(new RfidLocationJsonConverter()); - _jsonOptions.Converters.Add(new RfidLocationNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidOriginJsonConverter()); - _jsonOptions.Converters.Add(new RfidPasswordTypeJsonConverter()); - _jsonOptions.Converters.Add(new RfidPasswordTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidPkiExtensionJsonConverter()); - _jsonOptions.Converters.Add(new RfidRawDataJsonConverter()); - _jsonOptions.Converters.Add(new RfidSecurityObjectJsonConverter()); - _jsonOptions.Converters.Add(new RfidSessionDataJsonConverter()); - _jsonOptions.Converters.Add(new RfidSignerInfoExJsonConverter()); - _jsonOptions.Converters.Add(new RfidTerminalJsonConverter()); - _jsonOptions.Converters.Add(new RfidTerminalTypeJsonConverter()); - _jsonOptions.Converters.Add(new RfidTerminalTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidTypeJsonConverter()); - _jsonOptions.Converters.Add(new RfidTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new RfidValidityJsonConverter()); - _jsonOptions.Converters.Add(new ScenarioJsonConverter()); - _jsonOptions.Converters.Add(new ScenarioNullableJsonConverter()); - _jsonOptions.Converters.Add(new SecurityFeatureItemJsonConverter()); - _jsonOptions.Converters.Add(new SecurityFeatureResultJsonConverter()); - _jsonOptions.Converters.Add(new SecurityFeatureTypeJsonConverter()); - _jsonOptions.Converters.Add(new SecurityFeatureTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new SecurityObjectCertificatesJsonConverter()); - _jsonOptions.Converters.Add(new SourceJsonConverter()); - _jsonOptions.Converters.Add(new SourceNullableJsonConverter()); - _jsonOptions.Converters.Add(new SourceValidityJsonConverter()); - _jsonOptions.Converters.Add(new StatusJsonConverter()); - _jsonOptions.Converters.Add(new StatusItemJsonConverter()); - _jsonOptions.Converters.Add(new StatusResultJsonConverter()); - _jsonOptions.Converters.Add(new StringItemJsonConverter()); - _jsonOptions.Converters.Add(new StringRecognitionResultJsonConverter()); - _jsonOptions.Converters.Add(new SymbolJsonConverter()); - _jsonOptions.Converters.Add(new SymbolCandidateJsonConverter()); - _jsonOptions.Converters.Add(new SymbolEstimationItemJsonConverter()); - _jsonOptions.Converters.Add(new SymbolRecognitionResultJsonConverter()); - _jsonOptions.Converters.Add(new TDocBinaryInfoJsonConverter()); - _jsonOptions.Converters.Add(new TDocBinaryInfoItemJsonConverter()); - _jsonOptions.Converters.Add(new TOriginalRFIDGraphicsInfoJsonConverter()); - _jsonOptions.Converters.Add(new TOriginalRFIDGraphicsInfoItemJsonConverter()); - _jsonOptions.Converters.Add(new TextJsonConverter()); - _jsonOptions.Converters.Add(new TextAvailableSourceJsonConverter()); - _jsonOptions.Converters.Add(new TextDataResultJsonConverter()); - _jsonOptions.Converters.Add(new TextFieldJsonConverter()); - _jsonOptions.Converters.Add(new TextFieldTypeJsonConverter()); - _jsonOptions.Converters.Add(new TextFieldTypeNullableJsonConverter()); - _jsonOptions.Converters.Add(new TextFieldValueJsonConverter()); - _jsonOptions.Converters.Add(new TextItemJsonConverter()); - _jsonOptions.Converters.Add(new TextPostProcessingJsonConverter()); - _jsonOptions.Converters.Add(new TextPostProcessingNullableJsonConverter()); - _jsonOptions.Converters.Add(new TextResultJsonConverter()); - _jsonOptions.Converters.Add(new TransactionImageJsonConverter()); - _jsonOptions.Converters.Add(new TransactionInfoJsonConverter()); - _jsonOptions.Converters.Add(new TransactionProcessGetResponseJsonConverter()); - _jsonOptions.Converters.Add(new TransactionProcessRequestJsonConverter()); - _jsonOptions.Converters.Add(new TransactionProcessResultJsonConverter()); - _jsonOptions.Converters.Add(new TrfFtBytesJsonConverter()); - _jsonOptions.Converters.Add(new TrfFtStringJsonConverter()); - _jsonOptions.Converters.Add(new VerificationResultJsonConverter()); - _jsonOptions.Converters.Add(new VerificationResultNullableJsonConverter()); - _jsonOptions.Converters.Add(new VerifiedFieldMapJsonConverter()); - _jsonOptions.Converters.Add(new VisibilityJsonConverter()); - _jsonOptions.Converters.Add(new VisibilityNullableJsonConverter()); - _jsonOptions.Converters.Add(new VisualExtendedFieldItemJsonConverter()); - JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new(_jsonOptions); - _services.AddSingleton(jsonSerializerOptionsProvider); - _services.AddSingleton(); - _services.AddSingleton(); - _services.AddTransient(); - _services.AddSingleton(); - _services.AddTransient(); - _services.AddSingleton(); - _services.AddTransient(); - } - - /// - /// Configures the HttpClients. - /// - /// - /// - /// - public HostConfiguration AddApiHttpClients - ( - Action? client = null, Action? builder = null) - { - if (client == null) - client = c => c.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS); - - List builders = new List(); - - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - builders.Add(_services.AddHttpClient(client)); - - if (builder != null) - foreach (IHttpClientBuilder instance in builders) - builder(instance); - - HttpClientsAdded = true; - - return this; - } - - /// - /// Configures the JsonSerializerSettings - /// - /// - /// - public HostConfiguration ConfigureJsonOptions(Action options) - { - options(_jsonOptions); - - return this; - } - - /// - /// Adds tokens to your IServiceCollection - /// - /// - /// - /// - public HostConfiguration AddTokens(TTokenBase token) where TTokenBase : TokenBase - { - return AddTokens(new TTokenBase[]{ token }); - } - - /// - /// Adds tokens to your IServiceCollection - /// - /// - /// - /// - public HostConfiguration AddTokens(IEnumerable tokens) where TTokenBase : TokenBase - { - TokenContainer container = new TokenContainer(tokens); - _services.AddSingleton(services => container); - - return this; - } - - /// - /// Adds a token provider to your IServiceCollection - /// - /// - /// - /// - public HostConfiguration UseProvider() - where TTokenProvider : TokenProvider - where TTokenBase : TokenBase - { - _services.AddSingleton(); - _services.AddSingleton>(services => services.GetRequiredService()); - - return this; - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs b/src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs new file mode 100644 index 0000000..2f70fa7 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/IApiAccessor.cs @@ -0,0 +1,37 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Represents configuration aspects required to interact with the API endpoints. + /// + public interface IApiAccessor + { + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + IReadableConfiguration Configuration { get; set; } + + /// + /// Gets the base path of the API client. + /// + /// The base path + string GetBasePath(); + + /// + /// Provides a factory method hook for the creation of exceptions. + /// + ExceptionFactory ExceptionFactory { get; set; } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/IAsynchronousClient.cs b/src/Regula.DocumentReader.WebClient/Client/IAsynchronousClient.cs new file mode 100644 index 0000000..7aa0820 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/IAsynchronousClient.cs @@ -0,0 +1,100 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Threading.Tasks; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Contract for Asynchronous RESTful API interactions. + /// + /// This interface allows consumers to provide a custom API accessor client. + /// + public interface IAsynchronousClient + { + /// + /// Executes a non-blocking call to some using the GET http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the POST http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the PUT http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the DELETE http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the HEAD http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the OPTIONS http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + + /// + /// Executes a non-blocking call to some using the PATCH http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// Cancellation Token to cancel the request. + /// The return type. + /// A task eventually representing the response data, decorated with + Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs new file mode 100644 index 0000000..f899023 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/IReadableConfiguration.cs @@ -0,0 +1,141 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Security; +using System.Security.Cryptography.X509Certificates; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Represents a readable-only configuration contract. + /// + public interface IReadableConfiguration + { + /// + /// Gets the access token. + /// + /// Access token. + string AccessToken { get; } + + /// + /// Gets the API key. + /// + /// API key. + IDictionary ApiKey { get; } + + /// + /// Gets the API key prefix. + /// + /// API key prefix. + IDictionary ApiKeyPrefix { get; } + + /// + /// Gets the base path. + /// + /// Base path. + string BasePath { get; } + + /// + /// Gets the date time format. + /// + /// Date time format. + string DateTimeFormat { get; } + + /// + /// Gets the default header. + /// + /// Default header. + [Obsolete("Use DefaultHeaders instead.")] + IDictionary DefaultHeader { get; } + + /// + /// Gets the default headers. + /// + /// Default headers. + IDictionary DefaultHeaders { get; } + + /// + /// Gets the temp folder path. + /// + /// Temp folder path. + string TempFolderPath { get; } + + /// + /// Gets the HTTP connection timeout. + /// + /// HTTP connection timeout. + TimeSpan Timeout { get; } + + /// + /// Gets the proxy. + /// + /// Proxy. + WebProxy Proxy { get; } + + /// + /// Gets the user agent. + /// + /// User agent. + string UserAgent { get; } + + /// + /// Gets the username. + /// + /// Username. + string Username { get; } + + /// + /// Gets the password. + /// + /// Password. + string Password { get; } + + /// + /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. + /// + bool UseDefaultCredentials { get; } + + /// + /// Get the servers associated with the operation. + /// + /// Operation servers. + IReadOnlyDictionary>> OperationServers { get; } + + /// + /// Gets the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + string GetApiKeyWithPrefix(string apiKeyIdentifier); + + /// + /// Gets the Operation server url at the provided index. + /// + /// Operation server name. + /// Index of the operation server settings. + /// + string GetOperationServerUrl(string operation, int index); + + /// + /// Gets certificate collection to be sent with requests. + /// + /// X509 Certificate collection. + X509CertificateCollection ClientCertificates { get; } + + /// + /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and + /// overriding certificate errors in the scope of a request. + /// + RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/ISynchronousClient.cs b/src/Regula.DocumentReader.WebClient/Client/ISynchronousClient.cs new file mode 100644 index 0000000..3a3a68b --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/ISynchronousClient.cs @@ -0,0 +1,93 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.IO; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Contract for Synchronous RESTful API interactions. + /// + /// This interface allows consumers to provide a custom API accessor client. + /// + public interface ISynchronousClient + { + /// + /// Executes a blocking call to some using the GET http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the POST http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the PUT http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the DELETE http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the HEAD http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the OPTIONS http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null); + + /// + /// Executes a blocking call to some using the PATCH http verb. + /// + /// The relative path to invoke. + /// The request parameters to pass along to the client. + /// Per-request configurable settings. + /// The return type. + /// The response data, decorated with + ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null); + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs b/src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs deleted file mode 100644 index 209e5bf..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/JsonSerializerOptionsProvider.cs +++ /dev/null @@ -1,27 +0,0 @@ -// - -#nullable enable - -using System.Text.Json; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Provides the JsonSerializerOptions - /// - public class JsonSerializerOptionsProvider - { - /// - /// the JsonSerializerOptions - /// - public JsonSerializerOptions Options { get; } - - /// - /// Instantiates a JsonSerializerOptionsProvider - /// - public JsonSerializerOptionsProvider(JsonSerializerOptions options) - { - Options = options; - } - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/Multimap.cs b/src/Regula.DocumentReader.WebClient/Client/Multimap.cs new file mode 100644 index 0000000..54ee0ce --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/Multimap.cs @@ -0,0 +1,295 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// A dictionary in which one key has many associated values. + /// + /// The type of the key + /// The type of the value associated with the key. + public class Multimap : IDictionary> + { + #region Private Fields + + private readonly Dictionary> _dictionary; + + #endregion Private Fields + + #region Constructors + + /// + /// Empty Constructor. + /// + public Multimap() + { + _dictionary = new Dictionary>(); + } + + /// + /// Constructor with comparer. + /// + /// + public Multimap(IEqualityComparer comparer) + { + _dictionary = new Dictionary>(comparer); + } + + #endregion Constructors + + #region Enumerators + + /// + /// To get the enumerator. + /// + /// Enumerator + public IEnumerator>> GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + /// + /// To get the enumerator. + /// + /// Enumerator + IEnumerator IEnumerable.GetEnumerator() + { + return _dictionary.GetEnumerator(); + } + + #endregion Enumerators + + #region Public Members + /// + /// Add values to Multimap + /// + /// Key value pair + public void Add(KeyValuePair> item) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + + /// + /// Add Multimap to Multimap + /// + /// Multimap + public void Add(Multimap multimap) + { + foreach (var item in multimap) + { + if (!TryAdd(item.Key, item.Value)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + + /// + /// Clear Multimap + /// + public void Clear() + { + _dictionary.Clear(); + } + + /// + /// Determines whether Multimap contains the specified item. + /// + /// Key value pair + /// Method needs to be implemented + /// true if the Multimap contains the item; otherwise, false. + public bool Contains(KeyValuePair> item) + { + throw new NotImplementedException(); + } + + /// + /// Copy items of the Multimap to an array, + /// starting at a particular array index. + /// + /// The array that is the destination of the items copied + /// from Multimap. The array must have zero-based indexing. + /// The zero-based index in array at which copying begins. + /// Method needs to be implemented + public void CopyTo(KeyValuePair>[] array, int arrayIndex) + { + throw new NotImplementedException(); + } + + /// + /// Removes the specified item from the Multimap. + /// + /// Key value pair + /// true if the item is successfully removed; otherwise, false. + /// Method needs to be implemented + public bool Remove(KeyValuePair> item) + { + throw new NotImplementedException(); + } + + /// + /// Gets the number of items contained in the Multimap. + /// + public int Count => _dictionary.Count; + + /// + /// Gets a value indicating whether the Multimap is read-only. + /// + public bool IsReadOnly => false; + + /// + /// Adds an item with the provided key and value to the Multimap. + /// + /// The object to use as the key of the item to add. + /// The object to use as the value of the item to add. + /// Thrown when couldn't add the value to Multimap. + public void Add(TKey key, IList value) + { + if (value != null && value.Count > 0) + { + if (_dictionary.TryGetValue(key, out var list)) + { + foreach (var k in value) list.Add(k); + } + else + { + list = new List(value); + if (!TryAdd(key, list)) + throw new InvalidOperationException("Could not add values to Multimap."); + } + } + } + + /// + /// Determines whether the Multimap contains an item with the specified key. + /// + /// The key to locate in the Multimap. + /// true if the Multimap contains an item with + /// the key; otherwise, false. + public bool ContainsKey(TKey key) + { + return _dictionary.ContainsKey(key); + } + + /// + /// Removes item with the specified key from the Multimap. + /// + /// The key to locate in the Multimap. + /// true if the item is successfully removed; otherwise, false. + public bool Remove(TKey key) + { + return TryRemove(key, out var _); + } + + /// + /// Gets the value associated with the specified key. + /// + /// The key whose value to get. + /// When this method returns, the value associated with the specified key, if the + /// key is found; otherwise, the default value for the type of the value parameter. + /// This parameter is passed uninitialized. + /// true if the object that implements Multimap contains + /// an item with the specified key; otherwise, false. + public bool TryGetValue(TKey key, out IList value) + { + return _dictionary.TryGetValue(key, out value); + } + + /// + /// Gets or sets the item with the specified key. + /// + /// The key of the item to get or set. + /// The value of the specified key. + public IList this[TKey key] + { + get => _dictionary[key]; + set => _dictionary[key] = value; + } + + /// + /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. + /// + public ICollection Keys => _dictionary.Keys; + + /// + /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. + /// + public ICollection> Values => _dictionary.Values; + + /// + /// Copy the items of the Multimap to an System.Array, + /// starting at a particular System.Array index. + /// + /// The one-dimensional System.Array that is the destination of the items copied + /// from Multimap. The System.Array must have zero-based indexing. + /// The zero-based index in array at which copying begins. + public void CopyTo(Array array, int index) + { + ((ICollection)_dictionary).CopyTo(array, index); + } + + /// + /// Adds an item with the provided key and value to the Multimap. + /// + /// The object to use as the key of the item to add. + /// The object to use as the value of the item to add. + /// Thrown when couldn't add value to Multimap. + public void Add(TKey key, TValue value) + { + if (value != null) + { + if (_dictionary.TryGetValue(key, out var list)) + { + list.Add(value); + } + else + { + list = new List { value }; + if (!TryAdd(key, list)) + throw new InvalidOperationException("Could not add value to Multimap."); + } + } + } + + #endregion Public Members + + #region Private Members + + /** + * Helper method to encapsulate generator differences between dictionary types. + */ + private bool TryRemove(TKey key, out IList value) + { + _dictionary.TryGetValue(key, out value); + return _dictionary.Remove(key); + } + + /** + * Helper method to encapsulate generator differences between dictionary types. + */ + private bool TryAdd(TKey key, IList value) + { + try + { + _dictionary.Add(key, value); + } + catch (ArgumentException) + { + return false; + } + + return true; + } + #endregion Private Members + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs b/src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs new file mode 100644 index 0000000..6c6a4bf --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/OpenAPIDateConverter.cs @@ -0,0 +1,29 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using Newtonsoft.Json.Converters; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 + /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types + /// + public class OpenAPIDateConverter : IsoDateTimeConverter + { + /// + /// Initializes a new instance of the class. + /// + public OpenAPIDateConverter() + { + // full-date = date-fullyear "-" date-month "-" date-mday + DateTimeFormat = "yyyy-MM-dd"; + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/Option.cs b/src/Regula.DocumentReader.WebClient/Client/Option.cs deleted file mode 100644 index bb5862a..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/Option.cs +++ /dev/null @@ -1,53 +0,0 @@ -// -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// A wrapper for operation parameters which are not required - /// - public struct Option - { - /// - /// The value to send to the server - /// - public TType Value { get; } - - /// - /// When true the value will be sent to the server - /// - internal bool IsSet { get; } - - /// - /// A wrapper for operation parameters which are not required - /// - /// - public Option(TType value) - { - IsSet = true; - Value = value; - } - - /// - /// Implicitly converts this option to the contained type - /// - /// - public static implicit operator TType(Option option) => option.Value; - - /// - /// Implicitly converts the provided value to an Option - /// - /// - public static implicit operator Option(TType value) => new Option(value); - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs b/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs deleted file mode 100644 index 31dd6ba..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/RateLimitProvider`1.cs +++ /dev/null @@ -1,56 +0,0 @@ -// -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// Provides a token to the api clients. Tokens will be rate limited based on the provided TimeSpan. - /// - /// - public class RateLimitProvider : TokenProvider where TTokenBase : TokenBase - { - internal Dictionary> AvailableTokens { get; } = new(); - - /// - /// Instantiates a ThrottledTokenProvider. Your tokens will be rate limited based on the token's timeout. - /// - /// - public RateLimitProvider(TokenContainer container) : base(container.Tokens) - { - foreach(TTokenBase token in _tokens) - token.StartTimer(token.Timeout ?? TimeSpan.FromMilliseconds(40)); - - global::System.Threading.Channels.BoundedChannelOptions options = new global::System.Threading.Channels.BoundedChannelOptions(_tokens.Length) - { - FullMode = global::System.Threading.Channels.BoundedChannelFullMode.DropWrite - }; - - AvailableTokens.Add(string.Empty, global::System.Threading.Channels.Channel.CreateBounded(options)); - - foreach(global::System.Threading.Channels.Channel tokens in AvailableTokens.Values) - for (int i = 0; i < _tokens.Length; i++) - _tokens[i].TokenBecameAvailable += ((sender) => tokens.Writer.TryWrite((TTokenBase) sender)); - } - - internal override async System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default) - { - if (!AvailableTokens.TryGetValue(header, out global::System.Threading.Channels.Channel? tokens)) - throw new KeyNotFoundException($"Could not locate a token for header '{header}'."); - - return await tokens.Reader.ReadAsync(cancellation).ConfigureAwait(false); - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Client/RequestOptions.cs b/src/Regula.DocumentReader.WebClient/Client/RequestOptions.cs new file mode 100644 index 0000000..e90df56 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/RequestOptions.cs @@ -0,0 +1,74 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// A container for generalized request inputs. This type allows consumers to extend the request functionality + /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). + /// + public class RequestOptions + { + /// + /// Parameters to be bound to path parts of the Request's URL + /// + public Dictionary PathParameters { get; set; } + + /// + /// Query parameters to be applied to the request. + /// Keys may have 1 or more values associated. + /// + public Multimap QueryParameters { get; set; } + + /// + /// Header parameters to be applied to the request. + /// Keys may have 1 or more values associated. + /// + public Multimap HeaderParameters { get; set; } + + /// + /// Form parameters to be sent along with the request. + /// + public Dictionary FormParameters { get; set; } + + /// + /// File parameters to be sent along with the request. + /// + public Multimap FileParameters { get; set; } + + /// + /// Cookies to be sent along with the request. + /// + public List Cookies { get; set; } + + /// + /// Any data associated with a request body. + /// + public Object Data { get; set; } + + /// + /// Constructs a new instance of + /// + public RequestOptions() + { + PathParameters = new Dictionary(); + QueryParameters = new Multimap(); + HeaderParameters = new Multimap(); + FormParameters = new Dictionary(); + FileParameters = new Multimap(); + Cookies = new List(); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/RetryConfiguration.cs b/src/Regula.DocumentReader.WebClient/Client/RetryConfiguration.cs new file mode 100644 index 0000000..619d4f6 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/RetryConfiguration.cs @@ -0,0 +1,31 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using Polly; +using System.Net.Http; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// Configuration class to set the polly retry policies to be applied to the requests. + /// + public static class RetryConfiguration + { + /// + /// Retry policy + /// + public static Policy RetryPolicy { get; set; } + + /// + /// Async retry policy + /// + public static AsyncPolicy AsyncRetryPolicy { get; set; } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Client/TokenBase.cs b/src/Regula.DocumentReader.WebClient/Client/TokenBase.cs deleted file mode 100644 index 478ac2f..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/TokenBase.cs +++ /dev/null @@ -1,71 +0,0 @@ -// - -#nullable enable - -using System; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// The base for all tokens. - /// - public abstract class TokenBase - { - private DateTime _nextAvailable = DateTime.UtcNow; - private object _nextAvailableLock = new object(); - private readonly System.Timers.Timer _timer = new System.Timers.Timer(); - - - internal TimeSpan? Timeout { get; set; } - internal delegate void TokenBecameAvailableEventHandler(object sender); - internal event TokenBecameAvailableEventHandler? TokenBecameAvailable; - - - /// - /// Initialize a TokenBase object. - /// - /// - internal TokenBase(TimeSpan? timeout = null) - { - Timeout = timeout; - - if (Timeout != null) - StartTimer(Timeout.Value); - } - - - /// - /// Starts the token's timer - /// - /// - internal void StartTimer(TimeSpan timeout) - { - Timeout = timeout; - _timer.Interval = Timeout.Value.TotalMilliseconds; - _timer.Elapsed += OnTimer; - _timer.AutoReset = true; - _timer.Start(); - } - - /// - /// Returns true while the token is rate limited. - /// - public bool IsRateLimited => _nextAvailable > DateTime.UtcNow; - - /// - /// Triggered when the server returns status code TooManyRequests - /// Once triggered the local timeout will be extended an arbitrary length of time. - /// - public void BeginRateLimit() - { - lock(_nextAvailableLock) - _nextAvailable = DateTime.UtcNow.AddSeconds(5); - } - - private void OnTimer(object? sender, System.Timers.ElapsedEventArgs e) - { - if (TokenBecameAvailable != null && !IsRateLimited) - TokenBecameAvailable.Invoke(this); - } - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs b/src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs deleted file mode 100644 index d5b34d1..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/TokenContainer`1.cs +++ /dev/null @@ -1,37 +0,0 @@ -// - -#nullable enable - -using System.Linq; -using System.Collections.Generic; - -namespace Regula.DocumentReader.WebClient.Client -{ - /// - /// A container for a collection of tokens. - /// - /// - public sealed class TokenContainer where TTokenBase : TokenBase - { - /// - /// The collection of tokens - /// - public List Tokens { get; } = new List(); - - /// - /// Instantiates a TokenContainer - /// - public TokenContainer() - { - } - - /// - /// Instantiates a TokenContainer - /// - /// - public TokenContainer(global::System.Collections.Generic.IEnumerable tokens) - { - Tokens = tokens.ToList(); - } - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs b/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs deleted file mode 100644 index 69436b7..0000000 --- a/src/Regula.DocumentReader.WebClient/Client/TokenProvider`1.cs +++ /dev/null @@ -1,44 +0,0 @@ -// -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Linq; -using System.Collections.Generic; -using Regula.DocumentReader.WebClient.Client; - -namespace Regula.DocumentReader.WebClient -{ - /// - /// A class which will provide tokens. - /// - public abstract class TokenProvider where TTokenBase : TokenBase - { - /// - /// The array of tokens. - /// - protected TTokenBase[] _tokens; - - internal abstract System.Threading.Tasks.ValueTask GetAsync(string header = "", System.Threading.CancellationToken cancellation = default); - - /// - /// Instantiates a TokenProvider. - /// - /// - public TokenProvider(IEnumerable tokens) - { - _tokens = tokens.ToArray(); - - if (_tokens.Length == 0) - throw new ArgumentException("You did not provide any tokens."); - } - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Client/WebRequestPathBuilder.cs b/src/Regula.DocumentReader.WebClient/Client/WebRequestPathBuilder.cs new file mode 100644 index 0000000..08599c6 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Client/WebRequestPathBuilder.cs @@ -0,0 +1,53 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + +using System; +using System.Collections.Generic; + +namespace Regula.DocumentReader.WebClient.Client +{ + /// + /// A URI builder + /// + class WebRequestPathBuilder + { + private string _baseUrl; + private string _path; + private string _query = "?"; + public WebRequestPathBuilder(string baseUrl, string path) + { + _baseUrl = baseUrl; + _path = path; + } + + public void AddPathParameters(Dictionary parameters) + { + foreach (var parameter in parameters) + { + _path = _path.Replace("{" + parameter.Key + "}", Uri.EscapeDataString(parameter.Value)); + } + } + + public void AddQueryParameters(Multimap parameters) + { + foreach (var parameter in parameters) + { + foreach (var value in parameter.Value) + { + _query = _query + parameter.Key + "=" + Uri.EscapeDataString(value) + "&"; + } + } + } + + public string GetFullUri() + { + return _baseUrl + _path + _query.Substring(0, _query.Length - 1); + } + } +} diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs deleted file mode 100644 index e685f62..0000000 --- a/src/Regula.DocumentReader.WebClient/Extensions/IHostBuilderExtensions.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using Microsoft.Extensions.DependencyInjection; -using Microsoft.Extensions.Hosting; -using Regula.DocumentReader.WebClient.Client; - -namespace Regula.DocumentReader.WebClient.Extensions -{ - /// - /// Extension methods for IHostBuilder - /// - public static class IHostBuilderExtensions - { - /// - /// Add the api to your host builder. - /// - /// - public static IHostBuilder ConfigureApi(this IHostBuilder builder) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - IServiceCollectionExtensions.AddApi(services, config); - }); - - return builder; - } - - /// - /// Add the api to your host builder. - /// - /// - /// - public static IHostBuilder ConfigureApi(this IHostBuilder builder, Action options) - { - builder.ConfigureServices((context, services) => - { - HostConfiguration config = new HostConfiguration(services); - - options(context, services, config); - - IServiceCollectionExtensions.AddApi(services, config); - }); - - return builder; - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs deleted file mode 100644 index d962506..0000000 --- a/src/Regula.DocumentReader.WebClient/Extensions/IHttpClientBuilderExtensions.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Net.Http; -using Microsoft.Extensions.DependencyInjection; -using Polly.Timeout; -using Polly.Extensions.Http; -using Polly; - -namespace Regula.DocumentReader.WebClient.Extensions -{ - /// - /// Extension methods for IHttpClientBuilder - /// - public static class IHttpClientBuilderExtensions - { - /// - /// Adds a Polly retry policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddRetryPolicy(this IHttpClientBuilder client, int retries) - { - client.AddPolicyHandler(RetryPolicy(retries)); - - return client; - } - - /// - /// Adds a Polly timeout policy to your clients. - /// - /// - /// - /// - public static IHttpClientBuilder AddTimeoutPolicy(this IHttpClientBuilder client, TimeSpan timeout) - { - client.AddPolicyHandler(TimeoutPolicy(timeout)); - - return client; - } - - /// - /// Adds a Polly circuit breaker to your clients. - /// - /// - /// - /// - /// - public static IHttpClientBuilder AddCircuitBreakerPolicy(this IHttpClientBuilder client, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - { - client.AddTransientHttpErrorPolicy(builder => CircuitBreakerPolicy(builder, handledEventsAllowedBeforeBreaking, durationOfBreak)); - - return client; - } - - private static Polly.Retry.AsyncRetryPolicy RetryPolicy(int retries) - => HttpPolicyExtensions - .HandleTransientHttpError() - .Or() - .RetryAsync(retries); - - private static AsyncTimeoutPolicy TimeoutPolicy(TimeSpan timeout) - => Policy.TimeoutAsync(timeout); - - private static Polly.CircuitBreaker.AsyncCircuitBreakerPolicy CircuitBreakerPolicy( - PolicyBuilder builder, int handledEventsAllowedBeforeBreaking, TimeSpan durationOfBreak) - => builder.CircuitBreakerAsync(handledEventsAllowedBeforeBreaking, durationOfBreak); - } -} diff --git a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs b/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs deleted file mode 100644 index e9a776b..0000000 --- a/src/Regula.DocumentReader.WebClient/Extensions/IServiceCollectionExtensions.cs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Regula Document Reader Web API - * - * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core - * - * The version of the OpenAPI document: 7.6.0 - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -#nullable enable - -using System; -using System.Linq; -using Microsoft.Extensions.DependencyInjection; -using Regula.DocumentReader.WebClient.Client; - -namespace Regula.DocumentReader.WebClient.Extensions -{ - /// - /// Extension methods for IServiceCollection - /// - public static class IServiceCollectionExtensions - { - /// - /// Add the api to your host builder. - /// - /// - public static void AddApi(this IServiceCollection services) - { - HostConfiguration config = new(services); - AddApi(services, config); - } - - /// - /// Add the api to your host builder. - /// - /// - /// - public static void AddApi(this IServiceCollection services, Action options) - { - HostConfiguration config = new(services); - options(config); - AddApi(services, config); - } - - internal static void AddApi(IServiceCollection services, HostConfiguration host) - { - if (!host.HttpClientsAdded) - host.AddApiHttpClients(); - - services.AddSingleton(); - - // ensure that a token provider was provided for this token type - // if not, default to RateLimitProvider - var containerServices = services.Where(s => s.ServiceType.IsGenericType && - s.ServiceType.GetGenericTypeDefinition().IsAssignableFrom(typeof(TokenContainer<>))).ToArray(); - - foreach(var containerService in containerServices) - { - var tokenType = containerService.ServiceType.GenericTypeArguments[0]; - - var provider = services.FirstOrDefault(s => s.ServiceType.IsAssignableFrom(typeof(TokenProvider<>).MakeGenericType(tokenType))); - - if (provider == null) - { - services.AddSingleton(typeof(RateLimitProvider<>).MakeGenericType(tokenType)); - services.AddSingleton(typeof(TokenProvider<>).MakeGenericType(tokenType), - s => s.GetRequiredService(typeof(RateLimitProvider<>).MakeGenericType(tokenType))); - } - } - } - } -} diff --git a/src/Regula.DocumentReader.WebClient/Model/AbstractOpenAPISchema.cs b/src/Regula.DocumentReader.WebClient/Model/AbstractOpenAPISchema.cs new file mode 100644 index 0000000..597d843 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/AbstractOpenAPISchema.cs @@ -0,0 +1,76 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 7.6.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification + /// + public abstract partial class AbstractOpenAPISchema + { + /// + /// Custom JSON serializer + /// + static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Error, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Custom JSON serializer for objects with additional properties + /// + static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings + { + // OpenAPI generated types generally hide default constructors. + ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, + MissingMemberHandling = MissingMemberHandling.Ignore, + ContractResolver = new DefaultContractResolver + { + NamingStrategy = new CamelCaseNamingStrategy + { + OverrideSpecifiedNames = false + } + } + }; + + /// + /// Gets or Sets the actual instance + /// + public abstract Object ActualInstance { get; set; } + + /// + /// Gets or Sets IsNullable to indicate whether the instance is nullable + /// + public bool IsNullable { get; protected set; } + + /// + /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` + /// + public string SchemaType { get; protected set; } + + /// + /// Converts the instance into JSON string. + /// + public abstract string ToJson(); + } +} diff --git a/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs b/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs index 5bfccb8..ff45764 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AreaArray.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,54 +14,69 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// AreaArray /// + [DataContract(Name = "AreaArray")] public partial class AreaArray : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Number of elements in List and Points - /// list - /// points - [JsonConstructor] - public AreaArray(decimal count, List list, List points) + [JsonConstructorAttribute] + protected AreaArray() { } + /// + /// Initializes a new instance of the class. + /// + /// Number of elements in List and Points (required). + /// list (required). + /// points (required). + public AreaArray(decimal count = default(decimal), List list = default(List), List points = default(List)) { - Count = count; - List = list; - Points = points; - OnCreated(); + this.Count = count; + // to ensure "list" is required (not null) + if (list == null) + { + throw new ArgumentNullException("list is a required property for AreaArray and cannot be null"); + } + this.List = list; + // to ensure "points" is required (not null) + if (points == null) + { + throw new ArgumentNullException("points is a required property for AreaArray and cannot be null"); + } + this.Points = points; } - partial void OnCreated(); - /// /// Number of elements in List and Points /// /// Number of elements in List and Points - [JsonPropertyName("Count")] + [DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)] public decimal Count { get; set; } /// /// Gets or Sets List /// - [JsonPropertyName("List")] + [DataMember(Name = "List", IsRequired = true, EmitDefaultValue = true)] public List List { get; set; } /// /// Gets or Sets Points /// - [JsonPropertyName("Points")] + [DataMember(Name = "Points", IsRequired = true, EmitDefaultValue = true)] public List Points { get; set; } /// @@ -81,6 +94,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -92,122 +114,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class AreaArrayJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AreaArray Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option count = default; - Option?> list = default; - Option?> points = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetDecimal()); - break; - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Points": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - points = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!count.IsSet) - throw new ArgumentException("Property is required for class AreaArray.", nameof(count)); - - if (!list.IsSet) - throw new ArgumentException("Property is required for class AreaArray.", nameof(list)); - - if (!points.IsSet) - throw new ArgumentException("Property is required for class AreaArray.", nameof(points)); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class AreaArray."); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class AreaArray."); - - if (points.IsSet && points.Value == null) - throw new ArgumentNullException(nameof(points), "Property is not nullable for class AreaArray."); - - return new AreaArray(count.Value!.Value!, list.Value!, points.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AreaArray areaArray, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, areaArray, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AreaArray areaArray, JsonSerializerOptions jsonSerializerOptions) - { - if (areaArray.List == null) - throw new ArgumentNullException(nameof(areaArray.List), "Property is required for class AreaArray."); - - if (areaArray.Points == null) - throw new ArgumentNullException(nameof(areaArray.Points), "Property is required for class AreaArray."); - - writer.WriteNumber("Count", areaArray.Count); - - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, areaArray.List, jsonSerializerOptions); - writer.WritePropertyName("Points"); - JsonSerializer.Serialize(writer, areaArray.Points, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs b/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs index 5c5844b..e0f30cb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AreaContainer.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,53 +14,68 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Checked fragment coordinates /// + [DataContract(Name = "AreaContainer")] public partial class AreaContainer : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// count - /// list - /// points - [JsonConstructor] - public AreaContainer(int count, List list, List points) + [JsonConstructorAttribute] + protected AreaContainer() { } + /// + /// Initializes a new instance of the class. + /// + /// count (required). + /// list (required). + /// points (required). + public AreaContainer(int count = default(int), List list = default(List), List points = default(List)) { - Count = count; - List = list; - Points = points; - OnCreated(); + this.Count = count; + // to ensure "list" is required (not null) + if (list == null) + { + throw new ArgumentNullException("list is a required property for AreaContainer and cannot be null"); + } + this.List = list; + // to ensure "points" is required (not null) + if (points == null) + { + throw new ArgumentNullException("points is a required property for AreaContainer and cannot be null"); + } + this.Points = points; } - partial void OnCreated(); - /// /// Gets or Sets Count /// - [JsonPropertyName("Count")] + [DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)] public int Count { get; set; } /// /// Gets or Sets List /// - [JsonPropertyName("List")] + [DataMember(Name = "List", IsRequired = true, EmitDefaultValue = true)] public List List { get; set; } /// /// Gets or Sets Points /// - [JsonPropertyName("Points")] + [DataMember(Name = "Points", IsRequired = true, EmitDefaultValue = true)] public List Points { get; set; } /// @@ -80,6 +93,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -91,122 +113,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class AreaContainerJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AreaContainer Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option count = default; - Option?> list = default; - Option?> points = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetInt32()); - break; - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Points": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - points = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!count.IsSet) - throw new ArgumentException("Property is required for class AreaContainer.", nameof(count)); - - if (!list.IsSet) - throw new ArgumentException("Property is required for class AreaContainer.", nameof(list)); - - if (!points.IsSet) - throw new ArgumentException("Property is required for class AreaContainer.", nameof(points)); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class AreaContainer."); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class AreaContainer."); - - if (points.IsSet && points.Value == null) - throw new ArgumentNullException(nameof(points), "Property is not nullable for class AreaContainer."); - - return new AreaContainer(count.Value!.Value!, list.Value!, points.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AreaContainer areaContainer, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, areaContainer, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AreaContainer areaContainer, JsonSerializerOptions jsonSerializerOptions) - { - if (areaContainer.List == null) - throw new ArgumentNullException(nameof(areaContainer.List), "Property is required for class AreaContainer."); - - if (areaContainer.Points == null) - throw new ArgumentNullException(nameof(areaContainer.Points), "Property is required for class AreaContainer."); - - writer.WriteNumber("Count", areaContainer.Count); - - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, areaContainer.List, jsonSerializerOptions); - writer.WritePropertyName("Points"); - JsonSerializer.Serialize(writer, areaContainer.Points, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs index 6b6cffa..f9dc837 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,285 +14,173 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthParams /// + [DataContract(Name = "AuthParams")] public partial class AuthParams : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// This parameter is used to enable document liveness check - /// livenessParams - /// This parameter is used to enable Document luminescence check in UV light - /// This parameter is used to enable B900 ink MRZ contrast check in IR light - /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) - /// This parameter is used to enable Fibers detection - /// This parameter is used to enable Extended MRZ Check - /// This parameter is used to enable Extended OCR Check - /// This parameter is used to enable laminate integrity check in axial light - /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) - /// This parameter is used to enable Document elements visibility check in IR light - /// This parameter is used to enable Invisible Personal Information (IPI) check - /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) - /// This parameter is used to enable Portrait comparison check - /// This parameter is used to enable LetterScreen check - /// This parameter is used to enable Security text check - [JsonConstructor] - public AuthParams(Option checkLiveness = default, Option livenessParams = default, Option checkUVLuminiscence = default, Option checkIRB900 = default, Option checkImagePatterns = default, Option checkFibers = default, Option checkExtMRZ = default, Option checkExtOCR = default, Option checkAxial = default, Option checkBarcodeFormat = default, Option checkIRVisibility = default, Option checkIPI = default, Option checkPhotoEmbedding = default, Option checkPhotoComparison = default, Option checkLetterScreen = default, Option checkSecurityText = default) + /// This parameter is used to enable document liveness check. + /// livenessParams. + /// This parameter is used to enable Document luminescence check in UV light. + /// This parameter is used to enable B900 ink MRZ contrast check in IR light. + /// This parameter is used to enable Image patterns presence/absence check (position, shape, color). + /// This parameter is used to enable Fibers detection. + /// This parameter is used to enable Extended MRZ Check. + /// This parameter is used to enable Extended OCR Check. + /// This parameter is used to enable laminate integrity check in axial light. + /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.). + /// This parameter is used to enable Document elements visibility check in IR light. + /// This parameter is used to enable Invisible Personal Information (IPI) check. + /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked). + /// This parameter is used to enable Portrait comparison check. + /// This parameter is used to enable LetterScreen check. + /// This parameter is used to enable Security text check. + public AuthParams(bool checkLiveness = default(bool), LivenessParams livenessParams = default(LivenessParams), bool checkUVLuminiscence = default(bool), bool checkIRB900 = default(bool), bool checkImagePatterns = default(bool), bool checkFibers = default(bool), bool checkExtMRZ = default(bool), bool checkExtOCR = default(bool), bool checkAxial = default(bool), bool checkBarcodeFormat = default(bool), bool checkIRVisibility = default(bool), bool checkIPI = default(bool), bool checkPhotoEmbedding = default(bool), bool checkPhotoComparison = default(bool), bool checkLetterScreen = default(bool), bool checkSecurityText = default(bool)) { - CheckLivenessOption = checkLiveness; - LivenessParamsOption = livenessParams; - CheckUVLuminiscenceOption = checkUVLuminiscence; - CheckIRB900Option = checkIRB900; - CheckImagePatternsOption = checkImagePatterns; - CheckFibersOption = checkFibers; - CheckExtMRZOption = checkExtMRZ; - CheckExtOCROption = checkExtOCR; - CheckAxialOption = checkAxial; - CheckBarcodeFormatOption = checkBarcodeFormat; - CheckIRVisibilityOption = checkIRVisibility; - CheckIPIOption = checkIPI; - CheckPhotoEmbeddingOption = checkPhotoEmbedding; - CheckPhotoComparisonOption = checkPhotoComparison; - CheckLetterScreenOption = checkLetterScreen; - CheckSecurityTextOption = checkSecurityText; - OnCreated(); + this.CheckLiveness = checkLiveness; + this.LivenessParams = livenessParams; + this.CheckUVLuminiscence = checkUVLuminiscence; + this.CheckIRB900 = checkIRB900; + this.CheckImagePatterns = checkImagePatterns; + this.CheckFibers = checkFibers; + this.CheckExtMRZ = checkExtMRZ; + this.CheckExtOCR = checkExtOCR; + this.CheckAxial = checkAxial; + this.CheckBarcodeFormat = checkBarcodeFormat; + this.CheckIRVisibility = checkIRVisibility; + this.CheckIPI = checkIPI; + this.CheckPhotoEmbedding = checkPhotoEmbedding; + this.CheckPhotoComparison = checkPhotoComparison; + this.CheckLetterScreen = checkLetterScreen; + this.CheckSecurityText = checkSecurityText; } - partial void OnCreated(); - - /// - /// Used to track the state of CheckLiveness - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckLivenessOption { get; private set; } - /// /// This parameter is used to enable document liveness check /// /// This parameter is used to enable document liveness check - [JsonPropertyName("checkLiveness")] - public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new(value); } } - - /// - /// Used to track the state of LivenessParams - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LivenessParamsOption { get; private set; } + [DataMember(Name = "checkLiveness", EmitDefaultValue = true)] + public bool CheckLiveness { get; set; } /// /// Gets or Sets LivenessParams /// - [JsonPropertyName("livenessParams")] - public LivenessParams? LivenessParams { get { return this.LivenessParamsOption; } set { this.LivenessParamsOption = new(value); } } - - /// - /// Used to track the state of CheckUVLuminiscence - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckUVLuminiscenceOption { get; private set; } + [DataMember(Name = "livenessParams", EmitDefaultValue = false)] + public LivenessParams LivenessParams { get; set; } /// /// This parameter is used to enable Document luminescence check in UV light /// /// This parameter is used to enable Document luminescence check in UV light - [JsonPropertyName("checkUVLuminiscence")] - public bool? CheckUVLuminiscence { get { return this.CheckUVLuminiscenceOption; } set { this.CheckUVLuminiscenceOption = new(value); } } - - /// - /// Used to track the state of CheckIRB900 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckIRB900Option { get; private set; } + [DataMember(Name = "checkUVLuminiscence", EmitDefaultValue = true)] + public bool CheckUVLuminiscence { get; set; } /// /// This parameter is used to enable B900 ink MRZ contrast check in IR light /// /// This parameter is used to enable B900 ink MRZ contrast check in IR light - [JsonPropertyName("checkIRB900")] - public bool? CheckIRB900 { get { return this.CheckIRB900Option; } set { this.CheckIRB900Option = new(value); } } - - /// - /// Used to track the state of CheckImagePatterns - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckImagePatternsOption { get; private set; } + [DataMember(Name = "checkIRB900", EmitDefaultValue = true)] + public bool CheckIRB900 { get; set; } /// /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) /// /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) - [JsonPropertyName("checkImagePatterns")] - public bool? CheckImagePatterns { get { return this.CheckImagePatternsOption; } set { this.CheckImagePatternsOption = new(value); } } - - /// - /// Used to track the state of CheckFibers - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckFibersOption { get; private set; } + [DataMember(Name = "checkImagePatterns", EmitDefaultValue = true)] + public bool CheckImagePatterns { get; set; } /// /// This parameter is used to enable Fibers detection /// /// This parameter is used to enable Fibers detection - [JsonPropertyName("checkFibers")] - public bool? CheckFibers { get { return this.CheckFibersOption; } set { this.CheckFibersOption = new(value); } } - - /// - /// Used to track the state of CheckExtMRZ - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckExtMRZOption { get; private set; } + [DataMember(Name = "checkFibers", EmitDefaultValue = true)] + public bool CheckFibers { get; set; } /// /// This parameter is used to enable Extended MRZ Check /// /// This parameter is used to enable Extended MRZ Check - [JsonPropertyName("checkExtMRZ")] - public bool? CheckExtMRZ { get { return this.CheckExtMRZOption; } set { this.CheckExtMRZOption = new(value); } } - - /// - /// Used to track the state of CheckExtOCR - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckExtOCROption { get; private set; } + [DataMember(Name = "checkExtMRZ", EmitDefaultValue = true)] + public bool CheckExtMRZ { get; set; } /// /// This parameter is used to enable Extended OCR Check /// /// This parameter is used to enable Extended OCR Check - [JsonPropertyName("checkExtOCR")] - public bool? CheckExtOCR { get { return this.CheckExtOCROption; } set { this.CheckExtOCROption = new(value); } } - - /// - /// Used to track the state of CheckAxial - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckAxialOption { get; private set; } + [DataMember(Name = "checkExtOCR", EmitDefaultValue = true)] + public bool CheckExtOCR { get; set; } /// /// This parameter is used to enable laminate integrity check in axial light /// /// This parameter is used to enable laminate integrity check in axial light - [JsonPropertyName("checkAxial")] - public bool? CheckAxial { get { return this.CheckAxialOption; } set { this.CheckAxialOption = new(value); } } - - /// - /// Used to track the state of CheckBarcodeFormat - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckBarcodeFormatOption { get; private set; } + [DataMember(Name = "checkAxial", EmitDefaultValue = true)] + public bool CheckAxial { get; set; } /// /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) /// /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) - [JsonPropertyName("checkBarcodeFormat")] - public bool? CheckBarcodeFormat { get { return this.CheckBarcodeFormatOption; } set { this.CheckBarcodeFormatOption = new(value); } } - - /// - /// Used to track the state of CheckIRVisibility - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckIRVisibilityOption { get; private set; } + [DataMember(Name = "checkBarcodeFormat", EmitDefaultValue = true)] + public bool CheckBarcodeFormat { get; set; } /// /// This parameter is used to enable Document elements visibility check in IR light /// /// This parameter is used to enable Document elements visibility check in IR light - [JsonPropertyName("checkIRVisibility")] - public bool? CheckIRVisibility { get { return this.CheckIRVisibilityOption; } set { this.CheckIRVisibilityOption = new(value); } } - - /// - /// Used to track the state of CheckIPI - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckIPIOption { get; private set; } + [DataMember(Name = "checkIRVisibility", EmitDefaultValue = true)] + public bool CheckIRVisibility { get; set; } /// /// This parameter is used to enable Invisible Personal Information (IPI) check /// /// This parameter is used to enable Invisible Personal Information (IPI) check - [JsonPropertyName("checkIPI")] - public bool? CheckIPI { get { return this.CheckIPIOption; } set { this.CheckIPIOption = new(value); } } - - /// - /// Used to track the state of CheckPhotoEmbedding - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckPhotoEmbeddingOption { get; private set; } + [DataMember(Name = "checkIPI", EmitDefaultValue = true)] + public bool CheckIPI { get; set; } /// /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) /// /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) - [JsonPropertyName("checkPhotoEmbedding")] - public bool? CheckPhotoEmbedding { get { return this.CheckPhotoEmbeddingOption; } set { this.CheckPhotoEmbeddingOption = new(value); } } - - /// - /// Used to track the state of CheckPhotoComparison - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckPhotoComparisonOption { get; private set; } + [DataMember(Name = "checkPhotoEmbedding", EmitDefaultValue = true)] + public bool CheckPhotoEmbedding { get; set; } /// /// This parameter is used to enable Portrait comparison check /// /// This parameter is used to enable Portrait comparison check - [JsonPropertyName("checkPhotoComparison")] - public bool? CheckPhotoComparison { get { return this.CheckPhotoComparisonOption; } set { this.CheckPhotoComparisonOption = new(value); } } - - /// - /// Used to track the state of CheckLetterScreen - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckLetterScreenOption { get; private set; } + [DataMember(Name = "checkPhotoComparison", EmitDefaultValue = true)] + public bool CheckPhotoComparison { get; set; } /// /// This parameter is used to enable LetterScreen check /// /// This parameter is used to enable LetterScreen check - [JsonPropertyName("checkLetterScreen")] - public bool? CheckLetterScreen { get { return this.CheckLetterScreenOption; } set { this.CheckLetterScreenOption = new(value); } } - - /// - /// Used to track the state of CheckSecurityText - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckSecurityTextOption { get; private set; } + [DataMember(Name = "checkLetterScreen", EmitDefaultValue = true)] + public bool CheckLetterScreen { get; set; } /// /// This parameter is used to enable Security text check /// /// This parameter is used to enable Security text check - [JsonPropertyName("checkSecurityText")] - public bool? CheckSecurityText { get { return this.CheckSecurityTextOption; } set { this.CheckSecurityTextOption = new(value); } } + [DataMember(Name = "checkSecurityText", EmitDefaultValue = true)] + public bool CheckSecurityText { get; set; } /// /// Returns the string presentation of the object @@ -324,6 +210,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -335,257 +230,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class AuthParamsJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AuthParams Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option checkLiveness = default; - Option livenessParams = default; - Option checkUVLuminiscence = default; - Option checkIRB900 = default; - Option checkImagePatterns = default; - Option checkFibers = default; - Option checkExtMRZ = default; - Option checkExtOCR = default; - Option checkAxial = default; - Option checkBarcodeFormat = default; - Option checkIRVisibility = default; - Option checkIPI = default; - Option checkPhotoEmbedding = default; - Option checkPhotoComparison = default; - Option checkLetterScreen = default; - Option checkSecurityText = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "checkLiveness": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkLiveness = new Option(utf8JsonReader.GetBoolean()); - break; - case "livenessParams": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - livenessParams = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "checkUVLuminiscence": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkUVLuminiscence = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkIRB900": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkIRB900 = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkImagePatterns": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkImagePatterns = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkFibers": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkFibers = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkExtMRZ": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkExtMRZ = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkExtOCR": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkExtOCR = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkAxial": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkAxial = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkBarcodeFormat": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkBarcodeFormat = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkIRVisibility": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkIRVisibility = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkIPI": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkIPI = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkPhotoEmbedding": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkPhotoEmbedding = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkPhotoComparison": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkPhotoComparison = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkLetterScreen": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkLetterScreen = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkSecurityText": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkSecurityText = new Option(utf8JsonReader.GetBoolean()); - break; - default: - break; - } - } - } - - if (checkLiveness.IsSet && checkLiveness.Value == null) - throw new ArgumentNullException(nameof(checkLiveness), "Property is not nullable for class AuthParams."); - - if (livenessParams.IsSet && livenessParams.Value == null) - throw new ArgumentNullException(nameof(livenessParams), "Property is not nullable for class AuthParams."); - - if (checkUVLuminiscence.IsSet && checkUVLuminiscence.Value == null) - throw new ArgumentNullException(nameof(checkUVLuminiscence), "Property is not nullable for class AuthParams."); - - if (checkIRB900.IsSet && checkIRB900.Value == null) - throw new ArgumentNullException(nameof(checkIRB900), "Property is not nullable for class AuthParams."); - - if (checkImagePatterns.IsSet && checkImagePatterns.Value == null) - throw new ArgumentNullException(nameof(checkImagePatterns), "Property is not nullable for class AuthParams."); - - if (checkFibers.IsSet && checkFibers.Value == null) - throw new ArgumentNullException(nameof(checkFibers), "Property is not nullable for class AuthParams."); - - if (checkExtMRZ.IsSet && checkExtMRZ.Value == null) - throw new ArgumentNullException(nameof(checkExtMRZ), "Property is not nullable for class AuthParams."); - - if (checkExtOCR.IsSet && checkExtOCR.Value == null) - throw new ArgumentNullException(nameof(checkExtOCR), "Property is not nullable for class AuthParams."); - - if (checkAxial.IsSet && checkAxial.Value == null) - throw new ArgumentNullException(nameof(checkAxial), "Property is not nullable for class AuthParams."); - - if (checkBarcodeFormat.IsSet && checkBarcodeFormat.Value == null) - throw new ArgumentNullException(nameof(checkBarcodeFormat), "Property is not nullable for class AuthParams."); - - if (checkIRVisibility.IsSet && checkIRVisibility.Value == null) - throw new ArgumentNullException(nameof(checkIRVisibility), "Property is not nullable for class AuthParams."); - - if (checkIPI.IsSet && checkIPI.Value == null) - throw new ArgumentNullException(nameof(checkIPI), "Property is not nullable for class AuthParams."); - - if (checkPhotoEmbedding.IsSet && checkPhotoEmbedding.Value == null) - throw new ArgumentNullException(nameof(checkPhotoEmbedding), "Property is not nullable for class AuthParams."); - - if (checkPhotoComparison.IsSet && checkPhotoComparison.Value == null) - throw new ArgumentNullException(nameof(checkPhotoComparison), "Property is not nullable for class AuthParams."); - - if (checkLetterScreen.IsSet && checkLetterScreen.Value == null) - throw new ArgumentNullException(nameof(checkLetterScreen), "Property is not nullable for class AuthParams."); - - if (checkSecurityText.IsSet && checkSecurityText.Value == null) - throw new ArgumentNullException(nameof(checkSecurityText), "Property is not nullable for class AuthParams."); - - return new AuthParams(checkLiveness, livenessParams, checkUVLuminiscence, checkIRB900, checkImagePatterns, checkFibers, checkExtMRZ, checkExtOCR, checkAxial, checkBarcodeFormat, checkIRVisibility, checkIPI, checkPhotoEmbedding, checkPhotoComparison, checkLetterScreen, checkSecurityText); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthParams authParams, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, authParams, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AuthParams authParams, JsonSerializerOptions jsonSerializerOptions) - { - if (authParams.LivenessParamsOption.IsSet && authParams.LivenessParams == null) - throw new ArgumentNullException(nameof(authParams.LivenessParams), "Property is required for class AuthParams."); - - if (authParams.CheckLivenessOption.IsSet) - writer.WriteBoolean("checkLiveness", authParams.CheckLivenessOption.Value!.Value); - - if (authParams.LivenessParamsOption.IsSet) - { - writer.WritePropertyName("livenessParams"); - JsonSerializer.Serialize(writer, authParams.LivenessParams, jsonSerializerOptions); - } - if (authParams.CheckUVLuminiscenceOption.IsSet) - writer.WriteBoolean("checkUVLuminiscence", authParams.CheckUVLuminiscenceOption.Value!.Value); - - if (authParams.CheckIRB900Option.IsSet) - writer.WriteBoolean("checkIRB900", authParams.CheckIRB900Option.Value!.Value); - - if (authParams.CheckImagePatternsOption.IsSet) - writer.WriteBoolean("checkImagePatterns", authParams.CheckImagePatternsOption.Value!.Value); - - if (authParams.CheckFibersOption.IsSet) - writer.WriteBoolean("checkFibers", authParams.CheckFibersOption.Value!.Value); - - if (authParams.CheckExtMRZOption.IsSet) - writer.WriteBoolean("checkExtMRZ", authParams.CheckExtMRZOption.Value!.Value); - - if (authParams.CheckExtOCROption.IsSet) - writer.WriteBoolean("checkExtOCR", authParams.CheckExtOCROption.Value!.Value); - - if (authParams.CheckAxialOption.IsSet) - writer.WriteBoolean("checkAxial", authParams.CheckAxialOption.Value!.Value); - - if (authParams.CheckBarcodeFormatOption.IsSet) - writer.WriteBoolean("checkBarcodeFormat", authParams.CheckBarcodeFormatOption.Value!.Value); - - if (authParams.CheckIRVisibilityOption.IsSet) - writer.WriteBoolean("checkIRVisibility", authParams.CheckIRVisibilityOption.Value!.Value); - - if (authParams.CheckIPIOption.IsSet) - writer.WriteBoolean("checkIPI", authParams.CheckIPIOption.Value!.Value); - - if (authParams.CheckPhotoEmbeddingOption.IsSet) - writer.WriteBoolean("checkPhotoEmbedding", authParams.CheckPhotoEmbeddingOption.Value!.Value); - - if (authParams.CheckPhotoComparisonOption.IsSet) - writer.WriteBoolean("checkPhotoComparison", authParams.CheckPhotoComparisonOption.Value!.Value); - - if (authParams.CheckLetterScreenOption.IsSet) - writer.WriteBoolean("checkLetterScreen", authParams.CheckLetterScreenOption.Value!.Value); - - if (authParams.CheckSecurityTextOption.IsSet) - writer.WriteBoolean("checkSecurityText", authParams.CheckSecurityTextOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs index 51d5c72..f26cbd5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckList.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,47 +14,57 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthenticityCheckList /// + [DataContract(Name = "AuthenticityCheckList")] public partial class AuthenticityCheckList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Count of items in List - /// Authenticity Check - [JsonConstructor] - public AuthenticityCheckList(int count, List list) + [JsonConstructorAttribute] + protected AuthenticityCheckList() { } + /// + /// Initializes a new instance of the class. + /// + /// Count of items in List (required). + /// Authenticity Check (required). + public AuthenticityCheckList(int count = default(int), List list = default(List)) { - Count = count; - List = list; - OnCreated(); + this.Count = count; + // to ensure "list" is required (not null) + if (list == null) + { + throw new ArgumentNullException("list is a required property for AuthenticityCheckList and cannot be null"); + } + this.List = list; } - partial void OnCreated(); - /// /// Count of items in List /// /// Count of items in List - [JsonPropertyName("Count")] + [DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)] public int Count { get; set; } /// /// Authenticity Check /// /// Authenticity Check - [JsonPropertyName("List")] + [DataMember(Name = "List", IsRequired = true, EmitDefaultValue = true)] public List List { get; set; } /// @@ -73,6 +81,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -84,106 +101,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class AuthenticityCheckListJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AuthenticityCheckList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option count = default; - Option?> list = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetInt32()); - break; - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!count.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckList.", nameof(count)); - - if (!list.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckList.", nameof(list)); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class AuthenticityCheckList."); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class AuthenticityCheckList."); - - return new AuthenticityCheckList(count.Value!.Value!, list.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityCheckList authenticityCheckList, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, authenticityCheckList, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckList authenticityCheckList, JsonSerializerOptions jsonSerializerOptions) - { - if (authenticityCheckList.List == null) - throw new ArgumentNullException(nameof(authenticityCheckList.List), "Property is required for class AuthenticityCheckList."); - - writer.WriteNumber("Count", authenticityCheckList.Count); - - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, authenticityCheckList.List, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs index f1613ef..6a0f54a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckListItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthenticityCheckListItem /// + [DataContract(Name = "AuthenticityCheckListItem")] public partial class AuthenticityCheckListItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// authenticityCheckList - [JsonConstructor] - public AuthenticityCheckListItem(AuthenticityCheckList authenticityCheckList) + [JsonConstructorAttribute] + protected AuthenticityCheckListItem() { } + /// + /// Initializes a new instance of the class. + /// + /// authenticityCheckList (required). + public AuthenticityCheckListItem(AuthenticityCheckList authenticityCheckList = default(AuthenticityCheckList)) { - AuthenticityCheckList = authenticityCheckList; - OnCreated(); + // to ensure "authenticityCheckList" is required (not null) + if (authenticityCheckList == null) + { + throw new ArgumentNullException("authenticityCheckList is a required property for AuthenticityCheckListItem and cannot be null"); + } + this.AuthenticityCheckList = authenticityCheckList; } - partial void OnCreated(); - /// /// Gets or Sets AuthenticityCheckList /// - [JsonPropertyName("AuthenticityCheckList")] + [DataMember(Name = "AuthenticityCheckList", IsRequired = true, EmitDefaultValue = true)] public AuthenticityCheckList AuthenticityCheckList { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class AuthenticityCheckListItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AuthenticityCheckListItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option authenticityCheckList = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "AuthenticityCheckList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - authenticityCheckList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!authenticityCheckList.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckListItem.", nameof(authenticityCheckList)); - - if (authenticityCheckList.IsSet && authenticityCheckList.Value == null) - throw new ArgumentNullException(nameof(authenticityCheckList), "Property is not nullable for class AuthenticityCheckListItem."); - - return new AuthenticityCheckListItem(authenticityCheckList.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityCheckListItem authenticityCheckListItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, authenticityCheckListItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckListItem authenticityCheckListItem, JsonSerializerOptions jsonSerializerOptions) - { - if (authenticityCheckListItem.AuthenticityCheckList == null) - throw new ArgumentNullException(nameof(authenticityCheckListItem.AuthenticityCheckList), "Property is required for class AuthenticityCheckListItem."); - - writer.WritePropertyName("AuthenticityCheckList"); - JsonSerializer.Serialize(writer, authenticityCheckListItem.AuthenticityCheckList, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs index 95abfa4..98a82fc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,70 +14,73 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthenticityCheckResult /// + [DataContract(Name = "AuthenticityCheckResult")] public partial class AuthenticityCheckResult : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// type - /// result - /// list - /// Count of items in List - [JsonConstructor] - public AuthenticityCheckResult(AuthenticityResultType type, CheckResult result, List list, Option count = default) - { - Type = type; - Result = result; - List = list; - CountOption = count; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Type /// - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public AuthenticityResultType Type { get; set; } /// /// Gets or Sets Result /// - [JsonPropertyName("Result")] + [DataMember(Name = "Result", IsRequired = true, EmitDefaultValue = true)] public CheckResult Result { get; set; } - /// - /// Gets or Sets List + /// Initializes a new instance of the class. /// - [JsonPropertyName("List")] - public List List { get; set; } - + [JsonConstructorAttribute] + protected AuthenticityCheckResult() { } /// - /// Used to track the state of Count + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountOption { get; private set; } + /// type (required). + /// result (required). + /// Count of items in List. + /// list (required). + public AuthenticityCheckResult(AuthenticityResultType type = default(AuthenticityResultType), CheckResult result = default(CheckResult), int count = default(int), List list = default(List)) + { + this.Type = type; + this.Result = result; + // to ensure "list" is required (not null) + if (list == null) + { + throw new ArgumentNullException("list is a required property for AuthenticityCheckResult and cannot be null"); + } + this.List = list; + this.Count = count; + } /// /// Count of items in List /// /// Count of items in List - [JsonPropertyName("Count")] - public int? Count { get { return this.CountOption; } set { this.CountOption = new(value); } } + [DataMember(Name = "Count", EmitDefaultValue = false)] + public int Count { get; set; } + + /// + /// Gets or Sets List + /// + [DataMember(Name = "List", IsRequired = true, EmitDefaultValue = true)] + public List List { get; set; } /// /// Returns the string presentation of the object @@ -91,12 +92,21 @@ public override string ToString() sb.Append("class AuthenticityCheckResult {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Result: ").Append(Result).Append("\n"); - sb.Append(" List: ").Append(List).Append("\n"); sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" List: ").Append(List).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -108,133 +118,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class AuthenticityCheckResultJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AuthenticityCheckResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option result = default; - Option?> list = default; - Option count = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - string? typeRawValue = utf8JsonReader.GetString(); - if (typeRawValue != null) - type = new Option(AuthenticityResultTypeValueConverter.FromStringOrDefault(typeRawValue)); - break; - case "Result": - string? resultRawValue = utf8JsonReader.GetString(); - if (resultRawValue != null) - result = new Option(CheckResultValueConverter.FromStringOrDefault(resultRawValue)); - break; - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckResult.", nameof(type)); - - if (!result.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckResult.", nameof(result)); - - if (!list.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckResult.", nameof(list)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class AuthenticityCheckResult."); - - if (result.IsSet && result.Value == null) - throw new ArgumentNullException(nameof(result), "Property is not nullable for class AuthenticityCheckResult."); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class AuthenticityCheckResult."); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class AuthenticityCheckResult."); - - return new AuthenticityCheckResult(type.Value!.Value!, result.Value!.Value!, list.Value!, count); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityCheckResult authenticityCheckResult, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, authenticityCheckResult, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResult authenticityCheckResult, JsonSerializerOptions jsonSerializerOptions) - { - if (authenticityCheckResult.List == null) - throw new ArgumentNullException(nameof(authenticityCheckResult.List), "Property is required for class AuthenticityCheckResult."); - - var typeRawValue = AuthenticityResultTypeValueConverter.ToJsonValue(authenticityCheckResult.Type); - writer.WriteNumber("Type", typeRawValue); - - var resultRawValue = CheckResultValueConverter.ToJsonValue(authenticityCheckResult.Result); - writer.WriteNumber("Result", resultRawValue); - - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, authenticityCheckResult.List, jsonSerializerOptions); - if (authenticityCheckResult.CountOption.IsSet) - writer.WriteNumber("Count", authenticityCheckResult.CountOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs index d8c86d5..1bd7284 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,83 +14,92 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Common fields for all authenticity result objects /// + [DataContract(Name = "AuthenticityCheckResultItem")] + [JsonConverter(typeof(JsonSubtypes), "Type")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "1")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "1024")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "1048576")] + [JsonSubtypes.KnownSubType(typeof(PhotoIdentResult), "128")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "131072")] + [JsonSubtypes.KnownSubType(typeof(FiberResult), "16")] + [JsonSubtypes.KnownSubType(typeof(FiberResult), "16384")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "2")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "2048")] + [JsonSubtypes.KnownSubType(typeof(PhotoIdentResult), "256")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "262144")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "32")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "32768")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "4")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "4096")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "512")] + [JsonSubtypes.KnownSubType(typeof(IdentResult), "524288")] + [JsonSubtypes.KnownSubType(typeof(OCRSecurityTextResult), "64")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "65536")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "8")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "8192")] + [JsonSubtypes.KnownSubType(typeof(SecurityFeatureResult), "8388608")] public partial class AuthenticityCheckResultItem : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// elementResult - /// elementDiagnose - /// percentValue - [JsonConstructor] - public AuthenticityCheckResultItem(Option elementResult = default, Option elementDiagnose = default, Option percentValue = default) - { - Type = 0; - ElementResultOption = elementResult; - ElementDiagnoseOption = elementDiagnose; - PercentValueOption = percentValue; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Used to track the state of ElementResult - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ElementResultOption { get; private set; } /// /// Gets or Sets ElementResult /// - [JsonPropertyName("ElementResult")] - public CheckResult? ElementResult { get { return this.ElementResultOption; } set { this.ElementResultOption = new(value); } } + [DataMember(Name = "ElementResult", EmitDefaultValue = false)] + public CheckResult? ElementResult { get; set; } /// - /// Used to track the state of ElementDiagnose + /// Gets or Sets ElementDiagnose /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ElementDiagnoseOption { get; private set; } - + [DataMember(Name = "ElementDiagnose", EmitDefaultValue = false)] + public CheckDiagnose? ElementDiagnose { get; set; } /// - /// Gets or Sets ElementDiagnose + /// Initializes a new instance of the class. /// - [JsonPropertyName("ElementDiagnose")] - public CheckDiagnose? ElementDiagnose { get { return this.ElementDiagnoseOption; } set { this.ElementDiagnoseOption = new(value); } } - + [JsonConstructorAttribute] + protected AuthenticityCheckResultItem() { } /// - /// The discriminator + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public int Type { get; } + /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// elementResult. + /// elementDiagnose. + /// percentValue. + public AuthenticityCheckResultItem(int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) + { + this.Type = type; + this.ElementResult = elementResult; + this.ElementDiagnose = elementDiagnose; + this.PercentValue = percentValue; + } /// - /// Used to track the state of PercentValue + /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PercentValueOption { get; private set; } + /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] + public int Type { get; set; } /// /// Gets or Sets PercentValue /// - [JsonPropertyName("PercentValue")] - public int? PercentValue { get { return this.PercentValueOption; } set { this.PercentValueOption = new(value); } } + [DataMember(Name = "PercentValue", EmitDefaultValue = false)] + public int PercentValue { get; set; } /// /// Returns the string presentation of the object @@ -102,6 +109,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AuthenticityCheckResultItem {\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" ElementResult: ").Append(ElementResult).Append("\n"); sb.Append(" ElementDiagnose: ").Append(ElementDiagnose).Append("\n"); sb.Append(" PercentValue: ").Append(PercentValue).Append("\n"); @@ -109,6 +117,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -130,199 +147,4 @@ protected IEnumerable BaseValidate(ValidationContext validatio } } - /// - /// A Json converter for type - /// - public class AuthenticityCheckResultItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AuthenticityCheckResultItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option elementResult = default; - Option elementDiagnose = default; - Option percentValue = default; - - string? discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "Type"); - - if (discriminator != null && discriminator.Equals("1")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("1024")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("1048576")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("128")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("131072")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("16")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("16384")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("2")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("2048")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("256")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("262144")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("32")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("32768")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("4")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("4096")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("512")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("524288")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("64")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("65536")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("8")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("8192")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("8388608")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - case "ElementResult": - string? elementResultRawValue = utf8JsonReader.GetString(); - if (elementResultRawValue != null) - elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); - break; - case "ElementDiagnose": - string? elementDiagnoseRawValue = utf8JsonReader.GetString(); - if (elementDiagnoseRawValue != null) - elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); - break; - case "PercentValue": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - percentValue = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckResultItem.", nameof(type)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class AuthenticityCheckResultItem."); - - if (elementResult.IsSet && elementResult.Value == null) - throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class AuthenticityCheckResultItem."); - - if (elementDiagnose.IsSet && elementDiagnose.Value == null) - throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class AuthenticityCheckResultItem."); - - if (percentValue.IsSet && percentValue.Value == null) - throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class AuthenticityCheckResultItem."); - - return new AuthenticityCheckResultItem(elementResult, elementDiagnose, percentValue); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityCheckResultItem authenticityCheckResultItem, JsonSerializerOptions jsonSerializerOptions) - { - if (authenticityCheckResultItem is FiberResult fiberResult){ - JsonSerializer.Serialize(writer, fiberResult, jsonSerializerOptions); - return; - } - - if (authenticityCheckResultItem is IdentResult identResult){ - JsonSerializer.Serialize(writer, identResult, jsonSerializerOptions); - return; - } - - if (authenticityCheckResultItem is OCRSecurityTextResult oCRSecurityTextResult){ - JsonSerializer.Serialize(writer, oCRSecurityTextResult, jsonSerializerOptions); - return; - } - - if (authenticityCheckResultItem is PhotoIdentResult photoIdentResult){ - JsonSerializer.Serialize(writer, photoIdentResult, jsonSerializerOptions); - return; - } - - if (authenticityCheckResultItem is SecurityFeatureResult securityFeatureResult){ - JsonSerializer.Serialize(writer, securityFeatureResult, jsonSerializerOptions); - return; - } - - writer.WriteStartObject(); - - WriteProperties(writer, authenticityCheckResultItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResultItem authenticityCheckResultItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("Type", authenticityCheckResultItem.Type); - - if (authenticityCheckResultItem.ElementResultOption.IsSet) - { - var elementResultRawValue = CheckResultValueConverter.ToJsonValue(authenticityCheckResultItem.ElementResult!.Value); - writer.WriteNumber("ElementResult", elementResultRawValue); - } - if (authenticityCheckResultItem.ElementDiagnoseOption.IsSet) - { - var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(authenticityCheckResultItem.ElementDiagnose!.Value); - writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); - } - if (authenticityCheckResultItem.PercentValueOption.IsSet) - writer.WriteNumber("PercentValue", authenticityCheckResultItem.PercentValueOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs index f679247..069475b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultListInner.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,96 +14,177 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using System.Reflection; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthenticityCheckResultListInner /// - public partial class AuthenticityCheckResultListInner : IValidatableObject + [JsonConverter(typeof(AuthenticityCheckResultListInnerJsonConverter))] + [DataContract(Name = "AuthenticityCheckResult_List_inner")] + public partial class AuthenticityCheckResultListInner : AbstractOpenAPISchema, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public AuthenticityCheckResultListInner(SecurityFeatureResult securityFeatureResult) + /// An instance of SecurityFeatureResult. + public AuthenticityCheckResultListInner(SecurityFeatureResult actualInstance) { - SecurityFeatureResult = securityFeatureResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public AuthenticityCheckResultListInner(IdentResult identResult) + /// An instance of IdentResult. + public AuthenticityCheckResultListInner(IdentResult actualInstance) { - IdentResult = identResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public AuthenticityCheckResultListInner(FiberResult fiberResult) + /// An instance of FiberResult. + public AuthenticityCheckResultListInner(FiberResult actualInstance) { - FiberResult = fiberResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public AuthenticityCheckResultListInner(OCRSecurityTextResult oCRSecurityTextResult) + /// An instance of OCRSecurityTextResult. + public AuthenticityCheckResultListInner(OCRSecurityTextResult actualInstance) { - OCRSecurityTextResult = oCRSecurityTextResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public AuthenticityCheckResultListInner(PhotoIdentResult photoIdentResult) + /// An instance of PhotoIdentResult. + public AuthenticityCheckResultListInner(PhotoIdentResult actualInstance) { - PhotoIdentResult = photoIdentResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } - partial void OnCreated(); + + private Object _actualInstance; /// - /// Gets or Sets SecurityFeatureResult + /// Gets or Sets ActualInstance /// - public SecurityFeatureResult? SecurityFeatureResult { get; set; } + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(FiberResult) || value is FiberResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(IdentResult) || value is IdentResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(OCRSecurityTextResult) || value is OCRSecurityTextResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(PhotoIdentResult) || value is PhotoIdentResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(SecurityFeatureResult) || value is SecurityFeatureResult) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: FiberResult, IdentResult, OCRSecurityTextResult, PhotoIdentResult, SecurityFeatureResult"); + } + } + } /// - /// Gets or Sets IdentResult + /// Get the actual instance of `SecurityFeatureResult`. If the actual instance is not `SecurityFeatureResult`, + /// the InvalidClassException will be thrown /// - public IdentResult? IdentResult { get; set; } + /// An instance of SecurityFeatureResult + public SecurityFeatureResult GetSecurityFeatureResult() + { + return (SecurityFeatureResult)this.ActualInstance; + } /// - /// Gets or Sets FiberResult + /// Get the actual instance of `IdentResult`. If the actual instance is not `IdentResult`, + /// the InvalidClassException will be thrown /// - public FiberResult? FiberResult { get; set; } + /// An instance of IdentResult + public IdentResult GetIdentResult() + { + return (IdentResult)this.ActualInstance; + } + + /// + /// Get the actual instance of `FiberResult`. If the actual instance is not `FiberResult`, + /// the InvalidClassException will be thrown + /// + /// An instance of FiberResult + public FiberResult GetFiberResult() + { + return (FiberResult)this.ActualInstance; + } /// - /// Gets or Sets OCRSecurityTextResult + /// Get the actual instance of `OCRSecurityTextResult`. If the actual instance is not `OCRSecurityTextResult`, + /// the InvalidClassException will be thrown /// - public OCRSecurityTextResult? OCRSecurityTextResult { get; set; } + /// An instance of OCRSecurityTextResult + public OCRSecurityTextResult GetOCRSecurityTextResult() + { + return (OCRSecurityTextResult)this.ActualInstance; + } /// - /// Gets or Sets PhotoIdentResult + /// Get the actual instance of `PhotoIdentResult`. If the actual instance is not `PhotoIdentResult`, + /// the InvalidClassException will be thrown /// - public PhotoIdentResult? PhotoIdentResult { get; set; } + /// An instance of PhotoIdentResult + public PhotoIdentResult GetPhotoIdentResult() + { + return (PhotoIdentResult)this.ActualInstance; + } /// /// Returns the string presentation of the object @@ -113,388 +192,209 @@ public AuthenticityCheckResultListInner(PhotoIdentResult photoIdentResult) /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class AuthenticityCheckResultListInner {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// - /// To validate all properties of the instance + /// Returns the JSON string presentation of the object /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// JSON string presentation of the object + public override string ToJson() { - return this.BaseValidate(validationContext); + return JsonConvert.SerializeObject(this.ActualInstance, AuthenticityCheckResultListInner.SerializerSettings); } /// - /// To validate all properties of the instance + /// Converts the JSON string into an instance of AuthenticityCheckResultListInner /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - - /// - /// A Json converter for type - /// - public class AuthenticityCheckResultListInnerJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override AuthenticityCheckResultListInner Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string + /// An instance of AuthenticityCheckResultListInner + public static AuthenticityCheckResultListInner FromJson(string jsonString) { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; + AuthenticityCheckResultListInner newAuthenticityCheckResultListInner = null; - SecurityFeatureResult? securityFeatureResult = null; - IdentResult? identResult = null; - FiberResult? fiberResult = null; - OCRSecurityTextResult? oCRSecurityTextResult = null; - PhotoIdentResult? photoIdentResult = null; - - Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; - while (utf8JsonReaderDiscriminator.Read()) + if (string.IsNullOrEmpty(jsonString)) { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; + return newAuthenticityCheckResultListInner; + } + int match = 0; + List matchedTypes = new List(); - if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(FiberResult).GetProperty("AdditionalProperties") == null) { - string? localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); - utf8JsonReaderDiscriminator.Read(); - if (localVarJsonPropertyName?.Equals("Type") ?? false) - { - string? discriminator = utf8JsonReaderDiscriminator.GetString(); - if (discriminator?.Equals("1") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("1024") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("1048576") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("128") ?? false) - { - Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; - photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("131072") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("16") ?? false) - { - Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; - fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); - } - if (discriminator?.Equals("16384") ?? false) - { - Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; - fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); - } - if (discriminator?.Equals("2") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("2048") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("256") ?? false) - { - Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; - photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("262144") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("32") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("32768") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("4") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("4096") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("512") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("524288") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("64") ?? false) - { - Utf8JsonReader utf8JsonReaderOCRSecurityTextResult = utf8JsonReader; - oCRSecurityTextResult = JsonSerializer.Deserialize(ref utf8JsonReaderOCRSecurityTextResult, jsonSerializerOptions); - } - if (discriminator?.Equals("65536") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("8") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("8192") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("8388608") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - if (discriminator?.Equals("FiberResult") ?? false) - { - Utf8JsonReader utf8JsonReaderFiberResult = utf8JsonReader; - fiberResult = JsonSerializer.Deserialize(ref utf8JsonReaderFiberResult, jsonSerializerOptions); - } - if (discriminator?.Equals("IdentResult") ?? false) - { - Utf8JsonReader utf8JsonReaderIdentResult = utf8JsonReader; - identResult = JsonSerializer.Deserialize(ref utf8JsonReaderIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("OCRSecurityTextResult") ?? false) - { - Utf8JsonReader utf8JsonReaderOCRSecurityTextResult = utf8JsonReader; - oCRSecurityTextResult = JsonSerializer.Deserialize(ref utf8JsonReaderOCRSecurityTextResult, jsonSerializerOptions); - } - if (discriminator?.Equals("PhotoIdentResult") ?? false) - { - Utf8JsonReader utf8JsonReaderPhotoIdentResult = utf8JsonReader; - photoIdentResult = JsonSerializer.Deserialize(ref utf8JsonReaderPhotoIdentResult, jsonSerializerOptions); - } - if (discriminator?.Equals("SecurityFeatureResult") ?? false) - { - Utf8JsonReader utf8JsonReaderSecurityFeatureResult = utf8JsonReader; - securityFeatureResult = JsonSerializer.Deserialize(ref utf8JsonReaderSecurityFeatureResult, jsonSerializerOptions); - } - } + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.SerializerSettings)); } + else + { + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("FiberResult"); + match++; } - - while (utf8JsonReader.Read()) + catch (Exception exception) { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into FiberResult: {1}", jsonString, exception.ToString())); + } - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(IdentResult).GetProperty("AdditionalProperties") == null) + { + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.SerializerSettings)); + } + else { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.AdditionalPropertiesSerializerSettings)); } + matchedTypes.Add("IdentResult"); + match++; } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class AuthenticityCheckResultListInner.", nameof(type)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class AuthenticityCheckResultListInner."); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (photoIdentResult != null) - return new AuthenticityCheckResultListInner(photoIdentResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (fiberResult != null) - return new AuthenticityCheckResultListInner(fiberResult); - - if (fiberResult != null) - return new AuthenticityCheckResultListInner(fiberResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (photoIdentResult != null) - return new AuthenticityCheckResultListInner(photoIdentResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (oCRSecurityTextResult != null) - return new AuthenticityCheckResultListInner(oCRSecurityTextResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - if (fiberResult != null) - return new AuthenticityCheckResultListInner(fiberResult); - - if (identResult != null) - return new AuthenticityCheckResultListInner(identResult); - - if (oCRSecurityTextResult != null) - return new AuthenticityCheckResultListInner(oCRSecurityTextResult); - - if (photoIdentResult != null) - return new AuthenticityCheckResultListInner(photoIdentResult); - - if (securityFeatureResult != null) - return new AuthenticityCheckResultListInner(securityFeatureResult); - - throw new JsonException(); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - if (authenticityCheckResultListInner.SecurityFeatureResult != null) + catch (Exception exception) { - SecurityFeatureResultJsonConverter securityFeatureResultJsonConverter = (SecurityFeatureResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.SecurityFeatureResult.GetType())); - securityFeatureResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.SecurityFeatureResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into IdentResult: {1}", jsonString, exception.ToString())); } - if (authenticityCheckResultListInner.IdentResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(OCRSecurityTextResult).GetProperty("AdditionalProperties") == null) + { + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.SerializerSettings)); + } + else + { + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("OCRSecurityTextResult"); + match++; + } + catch (Exception exception) { - IdentResultJsonConverter identResultJsonConverter = (IdentResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.IdentResult.GetType())); - identResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.IdentResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into OCRSecurityTextResult: {1}", jsonString, exception.ToString())); } - if (authenticityCheckResultListInner.FiberResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(PhotoIdentResult).GetProperty("AdditionalProperties") == null) + { + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.SerializerSettings)); + } + else + { + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("PhotoIdentResult"); + match++; + } + catch (Exception exception) { - FiberResultJsonConverter fiberResultJsonConverter = (FiberResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.FiberResult.GetType())); - fiberResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.FiberResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into PhotoIdentResult: {1}", jsonString, exception.ToString())); } - if (authenticityCheckResultListInner.OCRSecurityTextResult != null) + try { - OCRSecurityTextResultJsonConverter oCRSecurityTextResultJsonConverter = (OCRSecurityTextResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.OCRSecurityTextResult.GetType())); - oCRSecurityTextResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.OCRSecurityTextResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(SecurityFeatureResult).GetProperty("AdditionalProperties") == null) + { + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.SerializerSettings)); + } + else + { + newAuthenticityCheckResultListInner = new AuthenticityCheckResultListInner(JsonConvert.DeserializeObject(jsonString, AuthenticityCheckResultListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("SecurityFeatureResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into SecurityFeatureResult: {1}", jsonString, exception.ToString())); } - if (authenticityCheckResultListInner.PhotoIdentResult != null) + if (match == 0) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); + } + else if (match > 1) { - PhotoIdentResultJsonConverter photoIdentResultJsonConverter = (PhotoIdentResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(authenticityCheckResultListInner.PhotoIdentResult.GetType())); - photoIdentResultJsonConverter.WriteProperties(writer, authenticityCheckResultListInner.PhotoIdentResult, jsonSerializerOptions); + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); } - WriteProperties(writer, authenticityCheckResultListInner, jsonSerializerOptions); - writer.WriteEndObject(); + // deserialization is considered successful at this point if no exception has been thrown. + return newAuthenticityCheckResultListInner; + } + + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + + /// + /// Custom JSON converter for AuthenticityCheckResultListInner + /// + public class AuthenticityCheckResultListInnerJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(AuthenticityCheckResultListInner).GetMethod("ToJson").Invoke(value, null))); } /// - /// Serializes the properties of + /// To convert a JSON string into an object /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AuthenticityCheckResultListInner authenticityCheckResultListInner, JsonSerializerOptions jsonSerializerOptions) + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { + switch(reader.TokenType) + { + case JsonToken.StartObject: + return AuthenticityCheckResultListInner.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return AuthenticityCheckResultListInner.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; + } + } + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs index b9f5787..f8ccfe2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// AuthenticityResult /// + [DataContract(Name = "AuthenticityResult")] public partial class AuthenticityResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// authenticityCheckList - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public AuthenticityResult(AuthenticityCheckList authenticityCheckList, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected AuthenticityResult() { } + /// + /// Initializes a new instance of the class. + /// + /// authenticityCheckList (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public AuthenticityResult(AuthenticityCheckList authenticityCheckList = default(AuthenticityCheckList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - AuthenticityCheckList = authenticityCheckList; - OnCreated(); + // to ensure "authenticityCheckList" is required (not null) + if (authenticityCheckList == null) + { + throw new ArgumentNullException("authenticityCheckList is a required property for AuthenticityResult and cannot be null"); + } + this.AuthenticityCheckList = authenticityCheckList; } - partial void OnCreated(); - /// /// Gets or Sets AuthenticityCheckList /// - [JsonPropertyName("AuthenticityCheckList")] + [DataMember(Name = "AuthenticityCheckList", IsRequired = true, EmitDefaultValue = true)] public AuthenticityCheckList AuthenticityCheckList { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class AuthenticityResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" AuthenticityCheckList: ").Append(AuthenticityCheckList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class AuthenticityResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override AuthenticityResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option authenticityCheckList = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "AuthenticityCheckList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - authenticityCheckList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!authenticityCheckList.IsSet) - throw new ArgumentException("Property is required for class AuthenticityResult.", nameof(authenticityCheckList)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class AuthenticityResult.", nameof(resultType)); - - if (authenticityCheckList.IsSet && authenticityCheckList.Value == null) - throw new ArgumentNullException(nameof(authenticityCheckList), "Property is not nullable for class AuthenticityResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class AuthenticityResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class AuthenticityResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class AuthenticityResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class AuthenticityResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class AuthenticityResult."); - - return new AuthenticityResult(authenticityCheckList.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityResult authenticityResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, authenticityResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, AuthenticityResult authenticityResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (authenticityResult.AuthenticityCheckList == null) - throw new ArgumentNullException(nameof(authenticityResult.AuthenticityCheckList), "Property is required for class AuthenticityResult."); - - writer.WritePropertyName("AuthenticityCheckList"); - JsonSerializer.Serialize(writer, authenticityResult.AuthenticityCheckList, jsonSerializerOptions); - if (authenticityResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", authenticityResult.BufLengthOption.Value!.Value); - - if (authenticityResult.LightOption.IsSet) - writer.WriteNumber("light", authenticityResult.LightOption.Value!.Value); - - if (authenticityResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", authenticityResult.ListIdxOption.Value!.Value); - - if (authenticityResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", authenticityResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", authenticityResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs index d0420be..6fe4111 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResultType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -167,279 +168,4 @@ public enum AuthenticityResultType: long STATUS_ONLY = 2147483648 } - /// - /// Converts to and from the JSON value - /// - public static class AuthenticityResultTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static AuthenticityResultType FromString(string value) - { - if (value.Equals((0).ToString())) - return AuthenticityResultType.NONE; - - if (value.Equals((1).ToString())) - return AuthenticityResultType.UV_LUMINESCENCE; - - if (value.Equals((2).ToString())) - return AuthenticityResultType.IR_B900; - - if (value.Equals((4).ToString())) - return AuthenticityResultType.IMAGE_PATTERN; - - if (value.Equals((8).ToString())) - return AuthenticityResultType.AXIAL_PROTECTION; - - if (value.Equals((16).ToString())) - return AuthenticityResultType.UV_FIBERS; - - if (value.Equals((32).ToString())) - return AuthenticityResultType.IR_VISIBILITY; - - if (value.Equals((64).ToString())) - return AuthenticityResultType.OCR_SECURITY_TEXT; - - if (value.Equals((128).ToString())) - return AuthenticityResultType.IPI; - - if (value.Equals((256).ToString())) - return AuthenticityResultType.IR_PHOTO; - - if (value.Equals((512).ToString())) - return AuthenticityResultType.PHOTO_EMBED_TYPE; - - if (value.Equals((1024).ToString())) - return AuthenticityResultType.OVI; - - if (value.Equals((2048).ToString())) - return AuthenticityResultType.IR_LUMINESCENCE; - - if (value.Equals((4096).ToString())) - return AuthenticityResultType.HOLOGRAMS; - - if (value.Equals((8192).ToString())) - return AuthenticityResultType.PHOTO_AREA; - - if (value.Equals((16384).ToString())) - return AuthenticityResultType.UV_BACKGROUND; - - if (value.Equals((32768).ToString())) - return AuthenticityResultType.PORTRAIT_COMPARISON; - - if (value.Equals((65536).ToString())) - return AuthenticityResultType.BARCODE_FORMAT_CHECK; - - if (value.Equals((131072).ToString())) - return AuthenticityResultType.KINEGRAM; - - if (value.Equals((262144).ToString())) - return AuthenticityResultType.LETTER_SCREEN; - - if (value.Equals((524288).ToString())) - return AuthenticityResultType.HOLOGRAM_DETECTION; - - if (value.Equals((1048576).ToString())) - return AuthenticityResultType.FINGERPRINT_COMPARISON; - - if (value.Equals((2097152).ToString())) - return AuthenticityResultType.LIVENESS; - - if (value.Equals((4194304).ToString())) - return AuthenticityResultType.EXTENDED_OCR_CHECK; - - if (value.Equals((8388608).ToString())) - return AuthenticityResultType.EXTENDED_MRZ_CHECK; - - if (value.Equals((16777216).ToString())) - return AuthenticityResultType.ENCRYPTED_IPI; - - if (value.Equals((2147483648).ToString())) - return AuthenticityResultType.STATUS_ONLY; - - throw new NotImplementedException($"Could not convert value to type AuthenticityResultType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static AuthenticityResultType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return AuthenticityResultType.NONE; - - if (value.Equals((1).ToString())) - return AuthenticityResultType.UV_LUMINESCENCE; - - if (value.Equals((2).ToString())) - return AuthenticityResultType.IR_B900; - - if (value.Equals((4).ToString())) - return AuthenticityResultType.IMAGE_PATTERN; - - if (value.Equals((8).ToString())) - return AuthenticityResultType.AXIAL_PROTECTION; - - if (value.Equals((16).ToString())) - return AuthenticityResultType.UV_FIBERS; - - if (value.Equals((32).ToString())) - return AuthenticityResultType.IR_VISIBILITY; - - if (value.Equals((64).ToString())) - return AuthenticityResultType.OCR_SECURITY_TEXT; - - if (value.Equals((128).ToString())) - return AuthenticityResultType.IPI; - - if (value.Equals((256).ToString())) - return AuthenticityResultType.IR_PHOTO; - - if (value.Equals((512).ToString())) - return AuthenticityResultType.PHOTO_EMBED_TYPE; - - if (value.Equals((1024).ToString())) - return AuthenticityResultType.OVI; - - if (value.Equals((2048).ToString())) - return AuthenticityResultType.IR_LUMINESCENCE; - - if (value.Equals((4096).ToString())) - return AuthenticityResultType.HOLOGRAMS; - - if (value.Equals((8192).ToString())) - return AuthenticityResultType.PHOTO_AREA; - - if (value.Equals((16384).ToString())) - return AuthenticityResultType.UV_BACKGROUND; - - if (value.Equals((32768).ToString())) - return AuthenticityResultType.PORTRAIT_COMPARISON; - - if (value.Equals((65536).ToString())) - return AuthenticityResultType.BARCODE_FORMAT_CHECK; - - if (value.Equals((131072).ToString())) - return AuthenticityResultType.KINEGRAM; - - if (value.Equals((262144).ToString())) - return AuthenticityResultType.LETTER_SCREEN; - - if (value.Equals((524288).ToString())) - return AuthenticityResultType.HOLOGRAM_DETECTION; - - if (value.Equals((1048576).ToString())) - return AuthenticityResultType.FINGERPRINT_COMPARISON; - - if (value.Equals((2097152).ToString())) - return AuthenticityResultType.LIVENESS; - - if (value.Equals((4194304).ToString())) - return AuthenticityResultType.EXTENDED_OCR_CHECK; - - if (value.Equals((8388608).ToString())) - return AuthenticityResultType.EXTENDED_MRZ_CHECK; - - if (value.Equals((16777216).ToString())) - return AuthenticityResultType.ENCRYPTED_IPI; - - if (value.Equals((2147483648).ToString())) - return AuthenticityResultType.STATUS_ONLY; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static long ToJsonValue(AuthenticityResultType value) - { - return (long) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class AuthenticityResultTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override AuthenticityResultType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - AuthenticityResultType? result = rawValue == null - ? null - : AuthenticityResultTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the AuthenticityResultType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityResultType authenticityResultType, JsonSerializerOptions options) - { - writer.WriteStringValue(authenticityResultType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class AuthenticityResultTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a AuthenticityResultType from the Json object - /// - /// - /// - /// - /// - public override AuthenticityResultType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - AuthenticityResultType? result = rawValue == null - ? null - : AuthenticityResultTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, AuthenticityResultType? authenticityResultType, JsonSerializerOptions options) - { - writer.WriteStringValue(authenticityResultType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs b/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs index abfb0d3..92e950e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BarCodeModuleType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -56,147 +57,4 @@ public enum BarCodeModuleType ALL = 4 } - /// - /// Converts to and from the JSON value - /// - public static class BarCodeModuleTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static BarCodeModuleType FromString(string value) - { - if (value.Equals((0).ToString())) - return BarCodeModuleType.TEXT; - - if (value.Equals((1).ToString())) - return BarCodeModuleType.BYTE; - - if (value.Equals((2).ToString())) - return BarCodeModuleType.NUM; - - if (value.Equals((3).ToString())) - return BarCodeModuleType.SHIFT; - - if (value.Equals((4).ToString())) - return BarCodeModuleType.ALL; - - throw new NotImplementedException($"Could not convert value to type BarCodeModuleType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static BarCodeModuleType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return BarCodeModuleType.TEXT; - - if (value.Equals((1).ToString())) - return BarCodeModuleType.BYTE; - - if (value.Equals((2).ToString())) - return BarCodeModuleType.NUM; - - if (value.Equals((3).ToString())) - return BarCodeModuleType.SHIFT; - - if (value.Equals((4).ToString())) - return BarCodeModuleType.ALL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(BarCodeModuleType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class BarCodeModuleTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override BarCodeModuleType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - BarCodeModuleType? result = rawValue == null - ? null - : BarCodeModuleTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the BarCodeModuleType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, BarCodeModuleType barCodeModuleType, JsonSerializerOptions options) - { - writer.WriteStringValue(barCodeModuleType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class BarCodeModuleTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a BarCodeModuleType from the Json object - /// - /// - /// - /// - /// - public override BarCodeModuleType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - BarCodeModuleType? result = rawValue == null - ? null - : BarCodeModuleTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, BarCodeModuleType? barCodeModuleType, JsonSerializerOptions options) - { - writer.WriteStringValue(barCodeModuleType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs b/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs index cfd3eae..8d533b9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BarcodeType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -137,243 +138,4 @@ public enum BarcodeType END = 20 } - /// - /// Converts to and from the JSON value - /// - public static class BarcodeTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static BarcodeType FromString(string value) - { - if (value.Equals((0).ToString())) - return BarcodeType.UNKNOWN; - - if (value.Equals((1).ToString())) - return BarcodeType.CODE128; - - if (value.Equals((2).ToString())) - return BarcodeType.CODE39; - - if (value.Equals((3).ToString())) - return BarcodeType.EAN8; - - if (value.Equals((4).ToString())) - return BarcodeType.ITF; - - if (value.Equals((5).ToString())) - return BarcodeType.PDF417; - - if (value.Equals((6).ToString())) - return BarcodeType.STF; - - if (value.Equals((7).ToString())) - return BarcodeType.MTF; - - if (value.Equals((8).ToString())) - return BarcodeType.IATA; - - if (value.Equals((9).ToString())) - return BarcodeType.CODABAR; - - if (value.Equals((10).ToString())) - return BarcodeType.UPCA; - - if (value.Equals((11).ToString())) - return BarcodeType.CODE93; - - if (value.Equals((12).ToString())) - return BarcodeType.UPCE; - - if (value.Equals((13).ToString())) - return BarcodeType.EAN13; - - if (value.Equals((14).ToString())) - return BarcodeType.QRCODE; - - if (value.Equals((15).ToString())) - return BarcodeType.AZTEC; - - if (value.Equals((16).ToString())) - return BarcodeType.DATAMATRIX; - - if (value.Equals((17).ToString())) - return BarcodeType.ALL_1D; - - if (value.Equals((18).ToString())) - return BarcodeType.CODE11; - - if (value.Equals((19).ToString())) - return BarcodeType.JABCODE; - - if (value.Equals((20).ToString())) - return BarcodeType.END; - - throw new NotImplementedException($"Could not convert value to type BarcodeType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static BarcodeType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return BarcodeType.UNKNOWN; - - if (value.Equals((1).ToString())) - return BarcodeType.CODE128; - - if (value.Equals((2).ToString())) - return BarcodeType.CODE39; - - if (value.Equals((3).ToString())) - return BarcodeType.EAN8; - - if (value.Equals((4).ToString())) - return BarcodeType.ITF; - - if (value.Equals((5).ToString())) - return BarcodeType.PDF417; - - if (value.Equals((6).ToString())) - return BarcodeType.STF; - - if (value.Equals((7).ToString())) - return BarcodeType.MTF; - - if (value.Equals((8).ToString())) - return BarcodeType.IATA; - - if (value.Equals((9).ToString())) - return BarcodeType.CODABAR; - - if (value.Equals((10).ToString())) - return BarcodeType.UPCA; - - if (value.Equals((11).ToString())) - return BarcodeType.CODE93; - - if (value.Equals((12).ToString())) - return BarcodeType.UPCE; - - if (value.Equals((13).ToString())) - return BarcodeType.EAN13; - - if (value.Equals((14).ToString())) - return BarcodeType.QRCODE; - - if (value.Equals((15).ToString())) - return BarcodeType.AZTEC; - - if (value.Equals((16).ToString())) - return BarcodeType.DATAMATRIX; - - if (value.Equals((17).ToString())) - return BarcodeType.ALL_1D; - - if (value.Equals((18).ToString())) - return BarcodeType.CODE11; - - if (value.Equals((19).ToString())) - return BarcodeType.JABCODE; - - if (value.Equals((20).ToString())) - return BarcodeType.END; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(BarcodeType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class BarcodeTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override BarcodeType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - BarcodeType? result = rawValue == null - ? null - : BarcodeTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the BarcodeType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, BarcodeType barcodeType, JsonSerializerOptions options) - { - writer.WriteStringValue(barcodeType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class BarcodeTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a BarcodeType from the Json object - /// - /// - /// - /// - /// - public override BarcodeType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - BarcodeType? result = rawValue == null - ? null - : BarcodeTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, BarcodeType? barcodeType, JsonSerializerOptions options) - { - writer.WriteStringValue(barcodeType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs b/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs index 067ffb0..bc5c487 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BcPDF417INFO.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,77 +14,82 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// BcPDF417INFO /// + [DataContract(Name = "bcPDF417INFO")] public partial class BcPDF417INFO : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// angle - /// bcColumn - /// bcErrorLevel - /// bcRow - /// minX - /// minY - [JsonConstructor] - public BcPDF417INFO(float angle, int bcColumn, int bcErrorLevel, int bcRow, float minX, float minY) + [JsonConstructorAttribute] + protected BcPDF417INFO() { } + /// + /// Initializes a new instance of the class. + /// + /// angle (required). + /// bcColumn (required). + /// bcErrorLevel (required). + /// bcRow (required). + /// minX (required). + /// minY (required). + public BcPDF417INFO(float angle = default(float), int bcColumn = default(int), int bcErrorLevel = default(int), int bcRow = default(int), float minX = default(float), float minY = default(float)) { - Angle = angle; - BcColumn = bcColumn; - BcErrorLevel = bcErrorLevel; - BcRow = bcRow; - MinX = minX; - MinY = minY; - OnCreated(); + this.Angle = angle; + this.BcColumn = bcColumn; + this.BcErrorLevel = bcErrorLevel; + this.BcRow = bcRow; + this.MinX = minX; + this.MinY = minY; } - partial void OnCreated(); - /// /// Gets or Sets Angle /// - [JsonPropertyName("Angle")] + [DataMember(Name = "Angle", IsRequired = true, EmitDefaultValue = true)] public float Angle { get; set; } /// /// Gets or Sets BcColumn /// - [JsonPropertyName("bcColumn")] + [DataMember(Name = "bcColumn", IsRequired = true, EmitDefaultValue = true)] public int BcColumn { get; set; } /// /// Gets or Sets BcErrorLevel /// - [JsonPropertyName("bcErrorLevel")] + [DataMember(Name = "bcErrorLevel", IsRequired = true, EmitDefaultValue = true)] public int BcErrorLevel { get; set; } /// /// Gets or Sets BcRow /// - [JsonPropertyName("bcRow")] + [DataMember(Name = "bcRow", IsRequired = true, EmitDefaultValue = true)] public int BcRow { get; set; } /// /// Gets or Sets MinX /// - [JsonPropertyName("minX")] + [DataMember(Name = "minX", IsRequired = true, EmitDefaultValue = true)] public float MinX { get; set; } /// /// Gets or Sets MinY /// - [JsonPropertyName("minY")] + [DataMember(Name = "minY", IsRequired = true, EmitDefaultValue = true)] public float MinY { get; set; } /// @@ -107,6 +110,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -118,154 +130,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class BcPDF417INFOJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override BcPDF417INFO Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option angle = default; - Option bcColumn = default; - Option bcErrorLevel = default; - Option bcRow = default; - Option minX = default; - Option minY = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Angle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - angle = new Option((float)utf8JsonReader.GetDouble()); - break; - case "bcColumn": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcColumn = new Option(utf8JsonReader.GetInt32()); - break; - case "bcErrorLevel": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcErrorLevel = new Option(utf8JsonReader.GetInt32()); - break; - case "bcRow": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcRow = new Option(utf8JsonReader.GetInt32()); - break; - case "minX": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - minX = new Option((float)utf8JsonReader.GetDouble()); - break; - case "minY": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - minY = new Option((float)utf8JsonReader.GetDouble()); - break; - default: - break; - } - } - } - - if (!angle.IsSet) - throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(angle)); - - if (!bcColumn.IsSet) - throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(bcColumn)); - - if (!bcErrorLevel.IsSet) - throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(bcErrorLevel)); - - if (!bcRow.IsSet) - throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(bcRow)); - - if (!minX.IsSet) - throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(minX)); - - if (!minY.IsSet) - throw new ArgumentException("Property is required for class BcPDF417INFO.", nameof(minY)); - - if (angle.IsSet && angle.Value == null) - throw new ArgumentNullException(nameof(angle), "Property is not nullable for class BcPDF417INFO."); - - if (bcColumn.IsSet && bcColumn.Value == null) - throw new ArgumentNullException(nameof(bcColumn), "Property is not nullable for class BcPDF417INFO."); - - if (bcErrorLevel.IsSet && bcErrorLevel.Value == null) - throw new ArgumentNullException(nameof(bcErrorLevel), "Property is not nullable for class BcPDF417INFO."); - - if (bcRow.IsSet && bcRow.Value == null) - throw new ArgumentNullException(nameof(bcRow), "Property is not nullable for class BcPDF417INFO."); - - if (minX.IsSet && minX.Value == null) - throw new ArgumentNullException(nameof(minX), "Property is not nullable for class BcPDF417INFO."); - - if (minY.IsSet && minY.Value == null) - throw new ArgumentNullException(nameof(minY), "Property is not nullable for class BcPDF417INFO."); - - return new BcPDF417INFO(angle.Value!.Value!, bcColumn.Value!.Value!, bcErrorLevel.Value!.Value!, bcRow.Value!.Value!, minX.Value!.Value!, minY.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, BcPDF417INFO bcPDF417INFO, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, bcPDF417INFO, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, BcPDF417INFO bcPDF417INFO, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("Angle", bcPDF417INFO.Angle); - - writer.WriteNumber("bcColumn", bcPDF417INFO.BcColumn); - - writer.WriteNumber("bcErrorLevel", bcPDF417INFO.BcErrorLevel); - - writer.WriteNumber("bcRow", bcPDF417INFO.BcRow); - - writer.WriteNumber("minX", bcPDF417INFO.MinX); - - writer.WriteNumber("minY", bcPDF417INFO.MinY); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs b/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs index d006a10..b9bf278 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BcROIDETECT.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,61 +14,66 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// BcROIDETECT /// + [DataContract(Name = "bcROI_DETECT")] public partial class BcROIDETECT : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// bottom - /// left - /// right - /// top - [JsonConstructor] - public BcROIDETECT(int bottom, int left, int right, int top) + [JsonConstructorAttribute] + protected BcROIDETECT() { } + /// + /// Initializes a new instance of the class. + /// + /// bottom (required). + /// left (required). + /// right (required). + /// top (required). + public BcROIDETECT(int bottom = default(int), int left = default(int), int right = default(int), int top = default(int)) { - Bottom = bottom; - Left = left; - Right = right; - Top = top; - OnCreated(); + this.Bottom = bottom; + this.Left = left; + this.Right = right; + this.Top = top; } - partial void OnCreated(); - /// /// Gets or Sets Bottom /// - [JsonPropertyName("bottom")] + [DataMember(Name = "bottom", IsRequired = true, EmitDefaultValue = true)] public int Bottom { get; set; } /// /// Gets or Sets Left /// - [JsonPropertyName("left")] + [DataMember(Name = "left", IsRequired = true, EmitDefaultValue = true)] public int Left { get; set; } /// /// Gets or Sets Right /// - [JsonPropertyName("right")] + [DataMember(Name = "right", IsRequired = true, EmitDefaultValue = true)] public int Right { get; set; } /// /// Gets or Sets Top /// - [JsonPropertyName("top")] + [DataMember(Name = "top", IsRequired = true, EmitDefaultValue = true)] public int Top { get; set; } /// @@ -89,6 +92,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -100,128 +112,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class BcROIDETECTJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override BcROIDETECT Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option bottom = default; - Option left = default; - Option right = default; - Option top = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "bottom": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bottom = new Option(utf8JsonReader.GetInt32()); - break; - case "left": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - left = new Option(utf8JsonReader.GetInt32()); - break; - case "right": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - right = new Option(utf8JsonReader.GetInt32()); - break; - case "top": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - top = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!bottom.IsSet) - throw new ArgumentException("Property is required for class BcROIDETECT.", nameof(bottom)); - - if (!left.IsSet) - throw new ArgumentException("Property is required for class BcROIDETECT.", nameof(left)); - - if (!right.IsSet) - throw new ArgumentException("Property is required for class BcROIDETECT.", nameof(right)); - - if (!top.IsSet) - throw new ArgumentException("Property is required for class BcROIDETECT.", nameof(top)); - - if (bottom.IsSet && bottom.Value == null) - throw new ArgumentNullException(nameof(bottom), "Property is not nullable for class BcROIDETECT."); - - if (left.IsSet && left.Value == null) - throw new ArgumentNullException(nameof(left), "Property is not nullable for class BcROIDETECT."); - - if (right.IsSet && right.Value == null) - throw new ArgumentNullException(nameof(right), "Property is not nullable for class BcROIDETECT."); - - if (top.IsSet && top.Value == null) - throw new ArgumentNullException(nameof(top), "Property is not nullable for class BcROIDETECT."); - - return new BcROIDETECT(bottom.Value!.Value!, left.Value!.Value!, right.Value!.Value!, top.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, BcROIDETECT bcROIDETECT, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, bcROIDETECT, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, BcROIDETECT bcROIDETECT, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("bottom", bcROIDETECT.Bottom); - - writer.WriteNumber("left", bcROIDETECT.Left); - - writer.WriteNumber("right", bcROIDETECT.Right); - - writer.WriteNumber("top", bcROIDETECT.Top); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs index 7809099..b8c3bf9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,991 +14,543 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used for storing the results of one bar-code module reading. /// + [DataContract(Name = "BinaryData")] public partial class BinaryData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// rFIDAuthenticationInfo - /// rFIDMIFAREDataValidity - /// rFIDMIFAREData - /// rFIDEFCOM - /// rFIDDG1 - /// rFIDDG2 - /// rFIDDG3 - /// rFIDDG4 - /// rFIDDG5 - /// rFIDDG6 - /// rFIDDG7 - /// rFIDDG8 - /// rFIDDG9 - /// rFIDDG10 - /// rFIDDG11 - /// rFIDDG12 - /// rFIDDG13 - /// rFIDDG14 - /// rFIDDG15 - /// rFIDDG16 - /// rFIDEFSOD - /// eIDDG1 - /// eIDDG2 - /// eIDDG3 - /// eIDDG4 - /// eIDDG5 - /// eIDDG6 - /// eIDDG7 - /// eIDDG8 - /// eIDDG9 - /// eIDDG10 - /// eIDDG11 - /// eIDDG12 - /// eIDDG13 - /// eIDDG14 - /// eIDDG15 - /// eIDDG16 - /// eIDDG17 - /// eIDDG18 - /// eIDDG19 - /// eIDDG20 - /// eIDDG21 - /// eDLCOM - /// eDLSOD - /// eDLDG1 - /// eDLDG2 - /// eDLDG3 - /// eDLDG4 - /// eDLDG5 - /// eDLDG6 - /// eDLDG7 - /// eDLDG8 - /// eDLDG9 - /// eDLDG10 - /// eDLDG11 - /// eDLDG12 - /// eDLDG13 - /// eDLDG14 - /// visibleDigitalSeal - /// visibleDigitalSealNC - /// digitalSignature - /// rFIDSessionData - /// rFIDSessionDataStatus - /// Indexes of groups that aren't read - [JsonConstructor] - public BinaryData(Option?> rFIDAuthenticationInfo = default, Option?> rFIDMIFAREDataValidity = default, Option?> rFIDMIFAREData = default, Option?> rFIDEFCOM = default, Option rFIDDG1 = default, Option?> rFIDDG2 = default, Option?> rFIDDG3 = default, Option?> rFIDDG4 = default, Option?> rFIDDG5 = default, Option?> rFIDDG6 = default, Option?> rFIDDG7 = default, Option?> rFIDDG8 = default, Option?> rFIDDG9 = default, Option?> rFIDDG10 = default, Option?> rFIDDG11 = default, Option?> rFIDDG12 = default, Option?> rFIDDG13 = default, Option?> rFIDDG14 = default, Option?> rFIDDG15 = default, Option?> rFIDDG16 = default, Option?> rFIDEFSOD = default, Option?> eIDDG1 = default, Option?> eIDDG2 = default, Option?> eIDDG3 = default, Option?> eIDDG4 = default, Option?> eIDDG5 = default, Option?> eIDDG6 = default, Option?> eIDDG7 = default, Option?> eIDDG8 = default, Option?> eIDDG9 = default, Option?> eIDDG10 = default, Option?> eIDDG11 = default, Option?> eIDDG12 = default, Option?> eIDDG13 = default, Option?> eIDDG14 = default, Option?> eIDDG15 = default, Option?> eIDDG16 = default, Option?> eIDDG17 = default, Option?> eIDDG18 = default, Option?> eIDDG19 = default, Option?> eIDDG20 = default, Option?> eIDDG21 = default, Option?> eDLCOM = default, Option?> eDLSOD = default, Option?> eDLDG1 = default, Option?> eDLDG2 = default, Option?> eDLDG3 = default, Option?> eDLDG4 = default, Option?> eDLDG5 = default, Option?> eDLDG6 = default, Option?> eDLDG7 = default, Option?> eDLDG8 = default, Option?> eDLDG9 = default, Option?> eDLDG10 = default, Option?> eDLDG11 = default, Option?> eDLDG12 = default, Option?> eDLDG13 = default, Option?> eDLDG14 = default, Option?> visibleDigitalSeal = default, Option?> visibleDigitalSealNC = default, Option?> digitalSignature = default, Option rFIDSessionData = default, Option rFIDSessionDataStatus = default, Option?> rFIDEPasspDirectory = default) + /// rFIDAuthenticationInfo. + /// rFIDMIFAREDataValidity. + /// rFIDMIFAREData. + /// rFIDEFCOM. + /// rFIDDG1. + /// rFIDDG2. + /// rFIDDG3. + /// rFIDDG4. + /// rFIDDG5. + /// rFIDDG6. + /// rFIDDG7. + /// rFIDDG8. + /// rFIDDG9. + /// rFIDDG10. + /// rFIDDG11. + /// rFIDDG12. + /// rFIDDG13. + /// rFIDDG14. + /// rFIDDG15. + /// rFIDDG16. + /// rFIDEFSOD. + /// eIDDG1. + /// eIDDG2. + /// eIDDG3. + /// eIDDG4. + /// eIDDG5. + /// eIDDG6. + /// eIDDG7. + /// eIDDG8. + /// eIDDG9. + /// eIDDG10. + /// eIDDG11. + /// eIDDG12. + /// eIDDG13. + /// eIDDG14. + /// eIDDG15. + /// eIDDG16. + /// eIDDG17. + /// eIDDG18. + /// eIDDG19. + /// eIDDG20. + /// eIDDG21. + /// eDLCOM. + /// eDLSOD. + /// eDLDG1. + /// eDLDG2. + /// eDLDG3. + /// eDLDG4. + /// eDLDG5. + /// eDLDG6. + /// eDLDG7. + /// eDLDG8. + /// eDLDG9. + /// eDLDG10. + /// eDLDG11. + /// eDLDG12. + /// eDLDG13. + /// eDLDG14. + /// visibleDigitalSeal. + /// visibleDigitalSealNC. + /// digitalSignature. + /// rFIDSessionData. + /// rFIDSessionDataStatus. + /// Indexes of groups that aren't read. + public BinaryData(Dictionary rFIDAuthenticationInfo = default(Dictionary), Dictionary rFIDMIFAREDataValidity = default(Dictionary), Dictionary rFIDMIFAREData = default(Dictionary), Dictionary rFIDEFCOM = default(Dictionary), RfidDG1 rFIDDG1 = default(RfidDG1), Dictionary rFIDDG2 = default(Dictionary), Dictionary rFIDDG3 = default(Dictionary), Dictionary rFIDDG4 = default(Dictionary), Dictionary rFIDDG5 = default(Dictionary), Dictionary rFIDDG6 = default(Dictionary), Dictionary rFIDDG7 = default(Dictionary), Dictionary rFIDDG8 = default(Dictionary), Dictionary rFIDDG9 = default(Dictionary), Dictionary rFIDDG10 = default(Dictionary), Dictionary rFIDDG11 = default(Dictionary), Dictionary rFIDDG12 = default(Dictionary), Dictionary rFIDDG13 = default(Dictionary), Dictionary rFIDDG14 = default(Dictionary), Dictionary rFIDDG15 = default(Dictionary), Dictionary rFIDDG16 = default(Dictionary), Dictionary rFIDEFSOD = default(Dictionary), Dictionary eIDDG1 = default(Dictionary), Dictionary eIDDG2 = default(Dictionary), Dictionary eIDDG3 = default(Dictionary), Dictionary eIDDG4 = default(Dictionary), Dictionary eIDDG5 = default(Dictionary), Dictionary eIDDG6 = default(Dictionary), Dictionary eIDDG7 = default(Dictionary), Dictionary eIDDG8 = default(Dictionary), Dictionary eIDDG9 = default(Dictionary), Dictionary eIDDG10 = default(Dictionary), Dictionary eIDDG11 = default(Dictionary), Dictionary eIDDG12 = default(Dictionary), Dictionary eIDDG13 = default(Dictionary), Dictionary eIDDG14 = default(Dictionary), Dictionary eIDDG15 = default(Dictionary), Dictionary eIDDG16 = default(Dictionary), Dictionary eIDDG17 = default(Dictionary), Dictionary eIDDG18 = default(Dictionary), Dictionary eIDDG19 = default(Dictionary), Dictionary eIDDG20 = default(Dictionary), Dictionary eIDDG21 = default(Dictionary), Dictionary eDLCOM = default(Dictionary), Dictionary eDLSOD = default(Dictionary), Dictionary eDLDG1 = default(Dictionary), Dictionary eDLDG2 = default(Dictionary), Dictionary eDLDG3 = default(Dictionary), Dictionary eDLDG4 = default(Dictionary), Dictionary eDLDG5 = default(Dictionary), Dictionary eDLDG6 = default(Dictionary), Dictionary eDLDG7 = default(Dictionary), Dictionary eDLDG8 = default(Dictionary), Dictionary eDLDG9 = default(Dictionary), Dictionary eDLDG10 = default(Dictionary), Dictionary eDLDG11 = default(Dictionary), Dictionary eDLDG12 = default(Dictionary), Dictionary eDLDG13 = default(Dictionary), Dictionary eDLDG14 = default(Dictionary), Dictionary visibleDigitalSeal = default(Dictionary), Dictionary visibleDigitalSealNC = default(Dictionary), Dictionary digitalSignature = default(Dictionary), RfidSessionData rFIDSessionData = default(RfidSessionData), DetailsRFID rFIDSessionDataStatus = default(DetailsRFID), List rFIDEPasspDirectory = default(List)) { - RFIDAuthenticationInfoOption = rFIDAuthenticationInfo; - RFIDMIFAREDataValidityOption = rFIDMIFAREDataValidity; - RFIDMIFAREDataOption = rFIDMIFAREData; - RFID_EF_COMOption = rFIDEFCOM; - RFIDDG1Option = rFIDDG1; - RFIDDG2Option = rFIDDG2; - RFIDDG3Option = rFIDDG3; - RFIDDG4Option = rFIDDG4; - RFIDDG5Option = rFIDDG5; - RFIDDG6Option = rFIDDG6; - RFIDDG7Option = rFIDDG7; - RFIDDG8Option = rFIDDG8; - RFIDDG9Option = rFIDDG9; - RFIDDG10Option = rFIDDG10; - RFIDDG11Option = rFIDDG11; - RFIDDG12Option = rFIDDG12; - RFIDDG13Option = rFIDDG13; - RFIDDG14Option = rFIDDG14; - RFIDDG15Option = rFIDDG15; - RFIDDG16Option = rFIDDG16; - RFID_EF_SODOption = rFIDEFSOD; - EIDDG1Option = eIDDG1; - EIDDG2Option = eIDDG2; - EIDDG3Option = eIDDG3; - EIDDG4Option = eIDDG4; - EIDDG5Option = eIDDG5; - EIDDG6Option = eIDDG6; - EIDDG7Option = eIDDG7; - EIDDG8Option = eIDDG8; - EIDDG9Option = eIDDG9; - EIDDG10Option = eIDDG10; - EIDDG11Option = eIDDG11; - EIDDG12Option = eIDDG12; - EIDDG13Option = eIDDG13; - EIDDG14Option = eIDDG14; - EIDDG15Option = eIDDG15; - EIDDG16Option = eIDDG16; - EIDDG17Option = eIDDG17; - EIDDG18Option = eIDDG18; - EIDDG19Option = eIDDG19; - EIDDG20Option = eIDDG20; - EIDDG21Option = eIDDG21; - EDLCOMOption = eDLCOM; - EDLSODOption = eDLSOD; - EDLDG1Option = eDLDG1; - EDLDG2Option = eDLDG2; - EDLDG3Option = eDLDG3; - EDLDG4Option = eDLDG4; - EDLDG5Option = eDLDG5; - EDLDG6Option = eDLDG6; - EDLDG7Option = eDLDG7; - EDLDG8Option = eDLDG8; - EDLDG9Option = eDLDG9; - EDLDG10Option = eDLDG10; - EDLDG11Option = eDLDG11; - EDLDG12Option = eDLDG12; - EDLDG13Option = eDLDG13; - EDLDG14Option = eDLDG14; - VisibleDigitalSealOption = visibleDigitalSeal; - VisibleDigitalSealNCOption = visibleDigitalSealNC; - DigitalSignatureOption = digitalSignature; - RFIDSessionDataOption = rFIDSessionData; - RFIDSessionDataStatusOption = rFIDSessionDataStatus; - RFIDEPasspDirectoryOption = rFIDEPasspDirectory; - OnCreated(); + this.RFIDAuthenticationInfo = rFIDAuthenticationInfo; + this.RFIDMIFAREDataValidity = rFIDMIFAREDataValidity; + this.RFIDMIFAREData = rFIDMIFAREData; + this.RFID_EF_COM = rFIDEFCOM; + this.RFIDDG1 = rFIDDG1; + this.RFIDDG2 = rFIDDG2; + this.RFIDDG3 = rFIDDG3; + this.RFIDDG4 = rFIDDG4; + this.RFIDDG5 = rFIDDG5; + this.RFIDDG6 = rFIDDG6; + this.RFIDDG7 = rFIDDG7; + this.RFIDDG8 = rFIDDG8; + this.RFIDDG9 = rFIDDG9; + this.RFIDDG10 = rFIDDG10; + this.RFIDDG11 = rFIDDG11; + this.RFIDDG12 = rFIDDG12; + this.RFIDDG13 = rFIDDG13; + this.RFIDDG14 = rFIDDG14; + this.RFIDDG15 = rFIDDG15; + this.RFIDDG16 = rFIDDG16; + this.RFID_EF_SOD = rFIDEFSOD; + this.EIDDG1 = eIDDG1; + this.EIDDG2 = eIDDG2; + this.EIDDG3 = eIDDG3; + this.EIDDG4 = eIDDG4; + this.EIDDG5 = eIDDG5; + this.EIDDG6 = eIDDG6; + this.EIDDG7 = eIDDG7; + this.EIDDG8 = eIDDG8; + this.EIDDG9 = eIDDG9; + this.EIDDG10 = eIDDG10; + this.EIDDG11 = eIDDG11; + this.EIDDG12 = eIDDG12; + this.EIDDG13 = eIDDG13; + this.EIDDG14 = eIDDG14; + this.EIDDG15 = eIDDG15; + this.EIDDG16 = eIDDG16; + this.EIDDG17 = eIDDG17; + this.EIDDG18 = eIDDG18; + this.EIDDG19 = eIDDG19; + this.EIDDG20 = eIDDG20; + this.EIDDG21 = eIDDG21; + this.EDLCOM = eDLCOM; + this.EDLSOD = eDLSOD; + this.EDLDG1 = eDLDG1; + this.EDLDG2 = eDLDG2; + this.EDLDG3 = eDLDG3; + this.EDLDG4 = eDLDG4; + this.EDLDG5 = eDLDG5; + this.EDLDG6 = eDLDG6; + this.EDLDG7 = eDLDG7; + this.EDLDG8 = eDLDG8; + this.EDLDG9 = eDLDG9; + this.EDLDG10 = eDLDG10; + this.EDLDG11 = eDLDG11; + this.EDLDG12 = eDLDG12; + this.EDLDG13 = eDLDG13; + this.EDLDG14 = eDLDG14; + this.VisibleDigitalSeal = visibleDigitalSeal; + this.VisibleDigitalSealNC = visibleDigitalSealNC; + this.DigitalSignature = digitalSignature; + this.RFIDSessionData = rFIDSessionData; + this.RFIDSessionDataStatus = rFIDSessionDataStatus; + this.RFIDEPasspDirectory = rFIDEPasspDirectory; } - partial void OnCreated(); - - /// - /// Used to track the state of RFIDAuthenticationInfo - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDAuthenticationInfoOption { get; private set; } - /// /// Gets or Sets RFIDAuthenticationInfo /// - [JsonPropertyName("RFID_Authentication_Info")] - public Dictionary? RFIDAuthenticationInfo { get { return this.RFIDAuthenticationInfoOption; } set { this.RFIDAuthenticationInfoOption = new(value); } } - - /// - /// Used to track the state of RFIDMIFAREDataValidity - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDMIFAREDataValidityOption { get; private set; } + [DataMember(Name = "RFID_Authentication_Info", EmitDefaultValue = false)] + public Dictionary RFIDAuthenticationInfo { get; set; } /// /// Gets or Sets RFIDMIFAREDataValidity /// - [JsonPropertyName("RFID_MIFARE_Data_Validity")] - public Dictionary? RFIDMIFAREDataValidity { get { return this.RFIDMIFAREDataValidityOption; } set { this.RFIDMIFAREDataValidityOption = new(value); } } - - /// - /// Used to track the state of RFIDMIFAREData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDMIFAREDataOption { get; private set; } + [DataMember(Name = "RFID_MIFARE_Data_Validity", EmitDefaultValue = false)] + public Dictionary RFIDMIFAREDataValidity { get; set; } /// /// Gets or Sets RFIDMIFAREData /// - [JsonPropertyName("RFID_MIFARE_Data")] - public Dictionary? RFIDMIFAREData { get { return this.RFIDMIFAREDataOption; } set { this.RFIDMIFAREDataOption = new(value); } } - - /// - /// Used to track the state of RFID_EF_COM - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFID_EF_COMOption { get; private set; } + [DataMember(Name = "RFID_MIFARE_Data", EmitDefaultValue = false)] + public Dictionary RFIDMIFAREData { get; set; } /// /// Gets or Sets RFID_EF_COM /// - [JsonPropertyName("RFID_EF_COM")] - public Dictionary? RFID_EF_COM { get { return this.RFID_EF_COMOption; } set { this.RFID_EF_COMOption = new(value); } } - - /// - /// Used to track the state of RFIDDG1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RFIDDG1Option { get; private set; } + [DataMember(Name = "RFID_EF_COM", EmitDefaultValue = false)] + public Dictionary RFID_EF_COM { get; set; } /// /// Gets or Sets RFIDDG1 /// - [JsonPropertyName("RFID_DG1")] - public RfidDG1? RFIDDG1 { get { return this.RFIDDG1Option; } set { this.RFIDDG1Option = new(value); } } - - /// - /// Used to track the state of RFIDDG2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG2Option { get; private set; } + [DataMember(Name = "RFID_DG1", EmitDefaultValue = false)] + public RfidDG1 RFIDDG1 { get; set; } /// /// Gets or Sets RFIDDG2 /// - [JsonPropertyName("RFID_DG2")] - public Dictionary? RFIDDG2 { get { return this.RFIDDG2Option; } set { this.RFIDDG2Option = new(value); } } - - /// - /// Used to track the state of RFIDDG3 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG3Option { get; private set; } + [DataMember(Name = "RFID_DG2", EmitDefaultValue = false)] + public Dictionary RFIDDG2 { get; set; } /// /// Gets or Sets RFIDDG3 /// - [JsonPropertyName("RFID_DG3")] - public Dictionary? RFIDDG3 { get { return this.RFIDDG3Option; } set { this.RFIDDG3Option = new(value); } } - - /// - /// Used to track the state of RFIDDG4 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG4Option { get; private set; } + [DataMember(Name = "RFID_DG3", EmitDefaultValue = false)] + public Dictionary RFIDDG3 { get; set; } /// /// Gets or Sets RFIDDG4 /// - [JsonPropertyName("RFID_DG4")] - public Dictionary? RFIDDG4 { get { return this.RFIDDG4Option; } set { this.RFIDDG4Option = new(value); } } - - /// - /// Used to track the state of RFIDDG5 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG5Option { get; private set; } + [DataMember(Name = "RFID_DG4", EmitDefaultValue = false)] + public Dictionary RFIDDG4 { get; set; } /// /// Gets or Sets RFIDDG5 /// - [JsonPropertyName("RFID_DG5")] - public Dictionary? RFIDDG5 { get { return this.RFIDDG5Option; } set { this.RFIDDG5Option = new(value); } } - - /// - /// Used to track the state of RFIDDG6 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG6Option { get; private set; } + [DataMember(Name = "RFID_DG5", EmitDefaultValue = false)] + public Dictionary RFIDDG5 { get; set; } /// /// Gets or Sets RFIDDG6 /// - [JsonPropertyName("RFID_DG6")] - public Dictionary? RFIDDG6 { get { return this.RFIDDG6Option; } set { this.RFIDDG6Option = new(value); } } - - /// - /// Used to track the state of RFIDDG7 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG7Option { get; private set; } + [DataMember(Name = "RFID_DG6", EmitDefaultValue = false)] + public Dictionary RFIDDG6 { get; set; } /// /// Gets or Sets RFIDDG7 /// - [JsonPropertyName("RFID_DG7")] - public Dictionary? RFIDDG7 { get { return this.RFIDDG7Option; } set { this.RFIDDG7Option = new(value); } } - - /// - /// Used to track the state of RFIDDG8 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG8Option { get; private set; } + [DataMember(Name = "RFID_DG7", EmitDefaultValue = false)] + public Dictionary RFIDDG7 { get; set; } /// /// Gets or Sets RFIDDG8 /// - [JsonPropertyName("RFID_DG8")] - public Dictionary? RFIDDG8 { get { return this.RFIDDG8Option; } set { this.RFIDDG8Option = new(value); } } - - /// - /// Used to track the state of RFIDDG9 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG9Option { get; private set; } + [DataMember(Name = "RFID_DG8", EmitDefaultValue = false)] + public Dictionary RFIDDG8 { get; set; } /// /// Gets or Sets RFIDDG9 /// - [JsonPropertyName("RFID_DG9")] - public Dictionary? RFIDDG9 { get { return this.RFIDDG9Option; } set { this.RFIDDG9Option = new(value); } } - - /// - /// Used to track the state of RFIDDG10 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG10Option { get; private set; } + [DataMember(Name = "RFID_DG9", EmitDefaultValue = false)] + public Dictionary RFIDDG9 { get; set; } /// /// Gets or Sets RFIDDG10 /// - [JsonPropertyName("RFID_DG10")] - public Dictionary? RFIDDG10 { get { return this.RFIDDG10Option; } set { this.RFIDDG10Option = new(value); } } - - /// - /// Used to track the state of RFIDDG11 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG11Option { get; private set; } + [DataMember(Name = "RFID_DG10", EmitDefaultValue = false)] + public Dictionary RFIDDG10 { get; set; } /// /// Gets or Sets RFIDDG11 /// - [JsonPropertyName("RFID_DG11")] - public Dictionary? RFIDDG11 { get { return this.RFIDDG11Option; } set { this.RFIDDG11Option = new(value); } } - - /// - /// Used to track the state of RFIDDG12 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG12Option { get; private set; } + [DataMember(Name = "RFID_DG11", EmitDefaultValue = false)] + public Dictionary RFIDDG11 { get; set; } /// /// Gets or Sets RFIDDG12 /// - [JsonPropertyName("RFID_DG12")] - public Dictionary? RFIDDG12 { get { return this.RFIDDG12Option; } set { this.RFIDDG12Option = new(value); } } - - /// - /// Used to track the state of RFIDDG13 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG13Option { get; private set; } + [DataMember(Name = "RFID_DG12", EmitDefaultValue = false)] + public Dictionary RFIDDG12 { get; set; } /// /// Gets or Sets RFIDDG13 /// - [JsonPropertyName("RFID_DG13")] - public Dictionary? RFIDDG13 { get { return this.RFIDDG13Option; } set { this.RFIDDG13Option = new(value); } } - - /// - /// Used to track the state of RFIDDG14 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG14Option { get; private set; } + [DataMember(Name = "RFID_DG13", EmitDefaultValue = false)] + public Dictionary RFIDDG13 { get; set; } /// /// Gets or Sets RFIDDG14 /// - [JsonPropertyName("RFID_DG14")] - public Dictionary? RFIDDG14 { get { return this.RFIDDG14Option; } set { this.RFIDDG14Option = new(value); } } - - /// - /// Used to track the state of RFIDDG15 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG15Option { get; private set; } + [DataMember(Name = "RFID_DG14", EmitDefaultValue = false)] + public Dictionary RFIDDG14 { get; set; } /// /// Gets or Sets RFIDDG15 /// - [JsonPropertyName("RFID_DG15")] - public Dictionary? RFIDDG15 { get { return this.RFIDDG15Option; } set { this.RFIDDG15Option = new(value); } } - - /// - /// Used to track the state of RFIDDG16 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDDG16Option { get; private set; } + [DataMember(Name = "RFID_DG15", EmitDefaultValue = false)] + public Dictionary RFIDDG15 { get; set; } /// /// Gets or Sets RFIDDG16 /// - [JsonPropertyName("RFID_DG16")] - public Dictionary? RFIDDG16 { get { return this.RFIDDG16Option; } set { this.RFIDDG16Option = new(value); } } - - /// - /// Used to track the state of RFID_EF_SOD - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFID_EF_SODOption { get; private set; } + [DataMember(Name = "RFID_DG16", EmitDefaultValue = false)] + public Dictionary RFIDDG16 { get; set; } /// /// Gets or Sets RFID_EF_SOD /// - [JsonPropertyName("RFID_EF_SOD")] - public Dictionary? RFID_EF_SOD { get { return this.RFID_EF_SODOption; } set { this.RFID_EF_SODOption = new(value); } } - - /// - /// Used to track the state of EIDDG1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG1Option { get; private set; } + [DataMember(Name = "RFID_EF_SOD", EmitDefaultValue = false)] + public Dictionary RFID_EF_SOD { get; set; } /// /// Gets or Sets EIDDG1 /// - [JsonPropertyName("eID_DG1")] - public Dictionary? EIDDG1 { get { return this.EIDDG1Option; } set { this.EIDDG1Option = new(value); } } - - /// - /// Used to track the state of EIDDG2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG2Option { get; private set; } + [DataMember(Name = "eID_DG1", EmitDefaultValue = false)] + public Dictionary EIDDG1 { get; set; } /// /// Gets or Sets EIDDG2 /// - [JsonPropertyName("eID_DG2")] - public Dictionary? EIDDG2 { get { return this.EIDDG2Option; } set { this.EIDDG2Option = new(value); } } - - /// - /// Used to track the state of EIDDG3 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG3Option { get; private set; } + [DataMember(Name = "eID_DG2", EmitDefaultValue = false)] + public Dictionary EIDDG2 { get; set; } /// /// Gets or Sets EIDDG3 /// - [JsonPropertyName("eID_DG3")] - public Dictionary? EIDDG3 { get { return this.EIDDG3Option; } set { this.EIDDG3Option = new(value); } } - - /// - /// Used to track the state of EIDDG4 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG4Option { get; private set; } + [DataMember(Name = "eID_DG3", EmitDefaultValue = false)] + public Dictionary EIDDG3 { get; set; } /// /// Gets or Sets EIDDG4 /// - [JsonPropertyName("eID_DG4")] - public Dictionary? EIDDG4 { get { return this.EIDDG4Option; } set { this.EIDDG4Option = new(value); } } - - /// - /// Used to track the state of EIDDG5 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG5Option { get; private set; } + [DataMember(Name = "eID_DG4", EmitDefaultValue = false)] + public Dictionary EIDDG4 { get; set; } /// /// Gets or Sets EIDDG5 /// - [JsonPropertyName("eID_DG5")] - public Dictionary? EIDDG5 { get { return this.EIDDG5Option; } set { this.EIDDG5Option = new(value); } } - - /// - /// Used to track the state of EIDDG6 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG6Option { get; private set; } + [DataMember(Name = "eID_DG5", EmitDefaultValue = false)] + public Dictionary EIDDG5 { get; set; } /// /// Gets or Sets EIDDG6 /// - [JsonPropertyName("eID_DG6")] - public Dictionary? EIDDG6 { get { return this.EIDDG6Option; } set { this.EIDDG6Option = new(value); } } - - /// - /// Used to track the state of EIDDG7 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG7Option { get; private set; } + [DataMember(Name = "eID_DG6", EmitDefaultValue = false)] + public Dictionary EIDDG6 { get; set; } /// /// Gets or Sets EIDDG7 /// - [JsonPropertyName("eID_DG7")] - public Dictionary? EIDDG7 { get { return this.EIDDG7Option; } set { this.EIDDG7Option = new(value); } } - - /// - /// Used to track the state of EIDDG8 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG8Option { get; private set; } + [DataMember(Name = "eID_DG7", EmitDefaultValue = false)] + public Dictionary EIDDG7 { get; set; } /// /// Gets or Sets EIDDG8 /// - [JsonPropertyName("eID_DG8")] - public Dictionary? EIDDG8 { get { return this.EIDDG8Option; } set { this.EIDDG8Option = new(value); } } - - /// - /// Used to track the state of EIDDG9 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG9Option { get; private set; } + [DataMember(Name = "eID_DG8", EmitDefaultValue = false)] + public Dictionary EIDDG8 { get; set; } /// /// Gets or Sets EIDDG9 /// - [JsonPropertyName("eID_DG9")] - public Dictionary? EIDDG9 { get { return this.EIDDG9Option; } set { this.EIDDG9Option = new(value); } } - - /// - /// Used to track the state of EIDDG10 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG10Option { get; private set; } + [DataMember(Name = "eID_DG9", EmitDefaultValue = false)] + public Dictionary EIDDG9 { get; set; } /// /// Gets or Sets EIDDG10 /// - [JsonPropertyName("eID_DG10")] - public Dictionary? EIDDG10 { get { return this.EIDDG10Option; } set { this.EIDDG10Option = new(value); } } - - /// - /// Used to track the state of EIDDG11 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG11Option { get; private set; } + [DataMember(Name = "eID_DG10", EmitDefaultValue = false)] + public Dictionary EIDDG10 { get; set; } /// /// Gets or Sets EIDDG11 /// - [JsonPropertyName("eID_DG11")] - public Dictionary? EIDDG11 { get { return this.EIDDG11Option; } set { this.EIDDG11Option = new(value); } } - - /// - /// Used to track the state of EIDDG12 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG12Option { get; private set; } + [DataMember(Name = "eID_DG11", EmitDefaultValue = false)] + public Dictionary EIDDG11 { get; set; } /// /// Gets or Sets EIDDG12 /// - [JsonPropertyName("eID_DG12")] - public Dictionary? EIDDG12 { get { return this.EIDDG12Option; } set { this.EIDDG12Option = new(value); } } - - /// - /// Used to track the state of EIDDG13 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG13Option { get; private set; } + [DataMember(Name = "eID_DG12", EmitDefaultValue = false)] + public Dictionary EIDDG12 { get; set; } /// /// Gets or Sets EIDDG13 /// - [JsonPropertyName("eID_DG13")] - public Dictionary? EIDDG13 { get { return this.EIDDG13Option; } set { this.EIDDG13Option = new(value); } } - - /// - /// Used to track the state of EIDDG14 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG14Option { get; private set; } + [DataMember(Name = "eID_DG13", EmitDefaultValue = false)] + public Dictionary EIDDG13 { get; set; } /// /// Gets or Sets EIDDG14 /// - [JsonPropertyName("eID_DG14")] - public Dictionary? EIDDG14 { get { return this.EIDDG14Option; } set { this.EIDDG14Option = new(value); } } - - /// - /// Used to track the state of EIDDG15 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG15Option { get; private set; } + [DataMember(Name = "eID_DG14", EmitDefaultValue = false)] + public Dictionary EIDDG14 { get; set; } /// /// Gets or Sets EIDDG15 /// - [JsonPropertyName("eID_DG15")] - public Dictionary? EIDDG15 { get { return this.EIDDG15Option; } set { this.EIDDG15Option = new(value); } } - - /// - /// Used to track the state of EIDDG16 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG16Option { get; private set; } + [DataMember(Name = "eID_DG15", EmitDefaultValue = false)] + public Dictionary EIDDG15 { get; set; } /// /// Gets or Sets EIDDG16 /// - [JsonPropertyName("eID_DG16")] - public Dictionary? EIDDG16 { get { return this.EIDDG16Option; } set { this.EIDDG16Option = new(value); } } - - /// - /// Used to track the state of EIDDG17 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG17Option { get; private set; } + [DataMember(Name = "eID_DG16", EmitDefaultValue = false)] + public Dictionary EIDDG16 { get; set; } /// /// Gets or Sets EIDDG17 /// - [JsonPropertyName("eID_DG17")] - public Dictionary? EIDDG17 { get { return this.EIDDG17Option; } set { this.EIDDG17Option = new(value); } } - - /// - /// Used to track the state of EIDDG18 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG18Option { get; private set; } + [DataMember(Name = "eID_DG17", EmitDefaultValue = false)] + public Dictionary EIDDG17 { get; set; } /// /// Gets or Sets EIDDG18 /// - [JsonPropertyName("eID_DG18")] - public Dictionary? EIDDG18 { get { return this.EIDDG18Option; } set { this.EIDDG18Option = new(value); } } - - /// - /// Used to track the state of EIDDG19 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG19Option { get; private set; } + [DataMember(Name = "eID_DG18", EmitDefaultValue = false)] + public Dictionary EIDDG18 { get; set; } /// /// Gets or Sets EIDDG19 /// - [JsonPropertyName("eID_DG19")] - public Dictionary? EIDDG19 { get { return this.EIDDG19Option; } set { this.EIDDG19Option = new(value); } } - - /// - /// Used to track the state of EIDDG20 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG20Option { get; private set; } + [DataMember(Name = "eID_DG19", EmitDefaultValue = false)] + public Dictionary EIDDG19 { get; set; } /// /// Gets or Sets EIDDG20 /// - [JsonPropertyName("eID_DG20")] - public Dictionary? EIDDG20 { get { return this.EIDDG20Option; } set { this.EIDDG20Option = new(value); } } - - /// - /// Used to track the state of EIDDG21 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EIDDG21Option { get; private set; } + [DataMember(Name = "eID_DG20", EmitDefaultValue = false)] + public Dictionary EIDDG20 { get; set; } /// /// Gets or Sets EIDDG21 /// - [JsonPropertyName("eID_DG21")] - public Dictionary? EIDDG21 { get { return this.EIDDG21Option; } set { this.EIDDG21Option = new(value); } } - - /// - /// Used to track the state of EDLCOM - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLCOMOption { get; private set; } + [DataMember(Name = "eID_DG21", EmitDefaultValue = false)] + public Dictionary EIDDG21 { get; set; } /// /// Gets or Sets EDLCOM /// - [JsonPropertyName("eDL_COM")] - public Dictionary? EDLCOM { get { return this.EDLCOMOption; } set { this.EDLCOMOption = new(value); } } - - /// - /// Used to track the state of EDLSOD - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLSODOption { get; private set; } + [DataMember(Name = "eDL_COM", EmitDefaultValue = false)] + public Dictionary EDLCOM { get; set; } /// /// Gets or Sets EDLSOD /// - [JsonPropertyName("eDL_SOD")] - public Dictionary? EDLSOD { get { return this.EDLSODOption; } set { this.EDLSODOption = new(value); } } - - /// - /// Used to track the state of EDLDG1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG1Option { get; private set; } + [DataMember(Name = "eDL_SOD", EmitDefaultValue = false)] + public Dictionary EDLSOD { get; set; } /// /// Gets or Sets EDLDG1 /// - [JsonPropertyName("eDL_DG1")] - public Dictionary? EDLDG1 { get { return this.EDLDG1Option; } set { this.EDLDG1Option = new(value); } } - - /// - /// Used to track the state of EDLDG2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG2Option { get; private set; } + [DataMember(Name = "eDL_DG1", EmitDefaultValue = false)] + public Dictionary EDLDG1 { get; set; } /// /// Gets or Sets EDLDG2 /// - [JsonPropertyName("eDL_DG2")] - public Dictionary? EDLDG2 { get { return this.EDLDG2Option; } set { this.EDLDG2Option = new(value); } } - - /// - /// Used to track the state of EDLDG3 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG3Option { get; private set; } + [DataMember(Name = "eDL_DG2", EmitDefaultValue = false)] + public Dictionary EDLDG2 { get; set; } /// /// Gets or Sets EDLDG3 /// - [JsonPropertyName("eDL_DG3")] - public Dictionary? EDLDG3 { get { return this.EDLDG3Option; } set { this.EDLDG3Option = new(value); } } - - /// - /// Used to track the state of EDLDG4 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG4Option { get; private set; } + [DataMember(Name = "eDL_DG3", EmitDefaultValue = false)] + public Dictionary EDLDG3 { get; set; } /// /// Gets or Sets EDLDG4 /// - [JsonPropertyName("eDL_DG4")] - public Dictionary? EDLDG4 { get { return this.EDLDG4Option; } set { this.EDLDG4Option = new(value); } } - - /// - /// Used to track the state of EDLDG5 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG5Option { get; private set; } + [DataMember(Name = "eDL_DG4", EmitDefaultValue = false)] + public Dictionary EDLDG4 { get; set; } /// /// Gets or Sets EDLDG5 /// - [JsonPropertyName("eDL_DG5")] - public Dictionary? EDLDG5 { get { return this.EDLDG5Option; } set { this.EDLDG5Option = new(value); } } - - /// - /// Used to track the state of EDLDG6 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG6Option { get; private set; } + [DataMember(Name = "eDL_DG5", EmitDefaultValue = false)] + public Dictionary EDLDG5 { get; set; } /// /// Gets or Sets EDLDG6 /// - [JsonPropertyName("eDL_DG6")] - public Dictionary? EDLDG6 { get { return this.EDLDG6Option; } set { this.EDLDG6Option = new(value); } } - - /// - /// Used to track the state of EDLDG7 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG7Option { get; private set; } + [DataMember(Name = "eDL_DG6", EmitDefaultValue = false)] + public Dictionary EDLDG6 { get; set; } /// /// Gets or Sets EDLDG7 /// - [JsonPropertyName("eDL_DG7")] - public Dictionary? EDLDG7 { get { return this.EDLDG7Option; } set { this.EDLDG7Option = new(value); } } - - /// - /// Used to track the state of EDLDG8 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG8Option { get; private set; } + [DataMember(Name = "eDL_DG7", EmitDefaultValue = false)] + public Dictionary EDLDG7 { get; set; } /// /// Gets or Sets EDLDG8 /// - [JsonPropertyName("eDL_DG8")] - public Dictionary? EDLDG8 { get { return this.EDLDG8Option; } set { this.EDLDG8Option = new(value); } } - - /// - /// Used to track the state of EDLDG9 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG9Option { get; private set; } + [DataMember(Name = "eDL_DG8", EmitDefaultValue = false)] + public Dictionary EDLDG8 { get; set; } /// /// Gets or Sets EDLDG9 /// - [JsonPropertyName("eDL_DG9")] - public Dictionary? EDLDG9 { get { return this.EDLDG9Option; } set { this.EDLDG9Option = new(value); } } - - /// - /// Used to track the state of EDLDG10 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG10Option { get; private set; } + [DataMember(Name = "eDL_DG9", EmitDefaultValue = false)] + public Dictionary EDLDG9 { get; set; } /// /// Gets or Sets EDLDG10 /// - [JsonPropertyName("eDL_DG10")] - public Dictionary? EDLDG10 { get { return this.EDLDG10Option; } set { this.EDLDG10Option = new(value); } } - - /// - /// Used to track the state of EDLDG11 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG11Option { get; private set; } + [DataMember(Name = "eDL_DG10", EmitDefaultValue = false)] + public Dictionary EDLDG10 { get; set; } /// /// Gets or Sets EDLDG11 /// - [JsonPropertyName("eDL_DG11")] - public Dictionary? EDLDG11 { get { return this.EDLDG11Option; } set { this.EDLDG11Option = new(value); } } - - /// - /// Used to track the state of EDLDG12 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG12Option { get; private set; } + [DataMember(Name = "eDL_DG11", EmitDefaultValue = false)] + public Dictionary EDLDG11 { get; set; } /// /// Gets or Sets EDLDG12 /// - [JsonPropertyName("eDL_DG12")] - public Dictionary? EDLDG12 { get { return this.EDLDG12Option; } set { this.EDLDG12Option = new(value); } } - - /// - /// Used to track the state of EDLDG13 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG13Option { get; private set; } + [DataMember(Name = "eDL_DG12", EmitDefaultValue = false)] + public Dictionary EDLDG12 { get; set; } /// /// Gets or Sets EDLDG13 /// - [JsonPropertyName("eDL_DG13")] - public Dictionary? EDLDG13 { get { return this.EDLDG13Option; } set { this.EDLDG13Option = new(value); } } - - /// - /// Used to track the state of EDLDG14 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> EDLDG14Option { get; private set; } + [DataMember(Name = "eDL_DG13", EmitDefaultValue = false)] + public Dictionary EDLDG13 { get; set; } /// /// Gets or Sets EDLDG14 /// - [JsonPropertyName("eDL_DG14")] - public Dictionary? EDLDG14 { get { return this.EDLDG14Option; } set { this.EDLDG14Option = new(value); } } - - /// - /// Used to track the state of VisibleDigitalSeal - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> VisibleDigitalSealOption { get; private set; } + [DataMember(Name = "eDL_DG14", EmitDefaultValue = false)] + public Dictionary EDLDG14 { get; set; } /// /// Gets or Sets VisibleDigitalSeal /// - [JsonPropertyName("Visible_Digital_Seal")] - public Dictionary? VisibleDigitalSeal { get { return this.VisibleDigitalSealOption; } set { this.VisibleDigitalSealOption = new(value); } } - - /// - /// Used to track the state of VisibleDigitalSealNC - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> VisibleDigitalSealNCOption { get; private set; } + [DataMember(Name = "Visible_Digital_Seal", EmitDefaultValue = false)] + public Dictionary VisibleDigitalSeal { get; set; } /// /// Gets or Sets VisibleDigitalSealNC /// - [JsonPropertyName("Visible_Digital_Seal_NC")] - public Dictionary? VisibleDigitalSealNC { get { return this.VisibleDigitalSealNCOption; } set { this.VisibleDigitalSealNCOption = new(value); } } - - /// - /// Used to track the state of DigitalSignature - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> DigitalSignatureOption { get; private set; } + [DataMember(Name = "Visible_Digital_Seal_NC", EmitDefaultValue = false)] + public Dictionary VisibleDigitalSealNC { get; set; } /// /// Gets or Sets DigitalSignature /// - [JsonPropertyName("Digital_Signature")] - public Dictionary? DigitalSignature { get { return this.DigitalSignatureOption; } set { this.DigitalSignatureOption = new(value); } } - - /// - /// Used to track the state of RFIDSessionData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RFIDSessionDataOption { get; private set; } + [DataMember(Name = "Digital_Signature", EmitDefaultValue = false)] + public Dictionary DigitalSignature { get; set; } /// /// Gets or Sets RFIDSessionData /// - [JsonPropertyName("RFID_Session_Data")] - public RfidSessionData? RFIDSessionData { get { return this.RFIDSessionDataOption; } set { this.RFIDSessionDataOption = new(value); } } - - /// - /// Used to track the state of RFIDSessionDataStatus - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RFIDSessionDataStatusOption { get; private set; } + [DataMember(Name = "RFID_Session_Data", EmitDefaultValue = false)] + public RfidSessionData RFIDSessionData { get; set; } /// /// Gets or Sets RFIDSessionDataStatus /// - [JsonPropertyName("RFID_Session_Data_Status")] - public DetailsRFID? RFIDSessionDataStatus { get { return this.RFIDSessionDataStatusOption; } set { this.RFIDSessionDataStatusOption = new(value); } } - - /// - /// Used to track the state of RFIDEPasspDirectory - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFIDEPasspDirectoryOption { get; private set; } + [DataMember(Name = "RFID_Session_Data_Status", EmitDefaultValue = false)] + public DetailsRFID RFIDSessionDataStatus { get; set; } /// /// Indexes of groups that aren't read /// /// Indexes of groups that aren't read - [JsonPropertyName("RFID_ePassp_Directory")] - public List? RFIDEPasspDirectory { get { return this.RFIDEPasspDirectoryOption; } set { this.RFIDEPasspDirectoryOption = new(value); } } + [DataMember(Name = "RFID_ePassp_Directory", EmitDefaultValue = false)] + public List RFIDEPasspDirectory { get; set; } /// /// Returns the string presentation of the object @@ -1078,6 +628,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -1089,1101 +648,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class BinaryDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override BinaryData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> rFIDAuthenticationInfo = default; - Option?> rFIDMIFAREDataValidity = default; - Option?> rFIDMIFAREData = default; - Option?> rFIDEFCOM = default; - Option rFIDDG1 = default; - Option?> rFIDDG2 = default; - Option?> rFIDDG3 = default; - Option?> rFIDDG4 = default; - Option?> rFIDDG5 = default; - Option?> rFIDDG6 = default; - Option?> rFIDDG7 = default; - Option?> rFIDDG8 = default; - Option?> rFIDDG9 = default; - Option?> rFIDDG10 = default; - Option?> rFIDDG11 = default; - Option?> rFIDDG12 = default; - Option?> rFIDDG13 = default; - Option?> rFIDDG14 = default; - Option?> rFIDDG15 = default; - Option?> rFIDDG16 = default; - Option?> rFIDEFSOD = default; - Option?> eIDDG1 = default; - Option?> eIDDG2 = default; - Option?> eIDDG3 = default; - Option?> eIDDG4 = default; - Option?> eIDDG5 = default; - Option?> eIDDG6 = default; - Option?> eIDDG7 = default; - Option?> eIDDG8 = default; - Option?> eIDDG9 = default; - Option?> eIDDG10 = default; - Option?> eIDDG11 = default; - Option?> eIDDG12 = default; - Option?> eIDDG13 = default; - Option?> eIDDG14 = default; - Option?> eIDDG15 = default; - Option?> eIDDG16 = default; - Option?> eIDDG17 = default; - Option?> eIDDG18 = default; - Option?> eIDDG19 = default; - Option?> eIDDG20 = default; - Option?> eIDDG21 = default; - Option?> eDLCOM = default; - Option?> eDLSOD = default; - Option?> eDLDG1 = default; - Option?> eDLDG2 = default; - Option?> eDLDG3 = default; - Option?> eDLDG4 = default; - Option?> eDLDG5 = default; - Option?> eDLDG6 = default; - Option?> eDLDG7 = default; - Option?> eDLDG8 = default; - Option?> eDLDG9 = default; - Option?> eDLDG10 = default; - Option?> eDLDG11 = default; - Option?> eDLDG12 = default; - Option?> eDLDG13 = default; - Option?> eDLDG14 = default; - Option?> visibleDigitalSeal = default; - Option?> visibleDigitalSealNC = default; - Option?> digitalSignature = default; - Option rFIDSessionData = default; - Option rFIDSessionDataStatus = default; - Option?> rFIDEPasspDirectory = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RFID_Authentication_Info": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDAuthenticationInfo = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_MIFARE_Data_Validity": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDMIFAREDataValidity = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_MIFARE_Data": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDMIFAREData = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_EF_COM": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDEFCOM = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG1 = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG2 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG3": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG3 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG4": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG4 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG5": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG5 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG6": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG6 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG7": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG7 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG8": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG8 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG9": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG9 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG10": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG10 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG11": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG11 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG12": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG12 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG13": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG13 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG14": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG14 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG15": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG15 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_DG16": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDDG16 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_EF_SOD": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDEFSOD = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG1 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG2 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG3": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG3 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG4": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG4 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG5": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG5 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG6": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG6 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG7": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG7 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG8": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG8 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG9": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG9 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG10": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG10 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG11": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG11 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG12": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG12 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG13": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG13 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG14": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG14 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG15": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG15 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG16": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG16 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG17": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG17 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG18": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG18 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG19": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG19 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG20": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG20 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eID_DG21": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eIDDG21 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_COM": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLCOM = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_SOD": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLSOD = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG1 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG2 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG3": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG3 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG4": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG4 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG5": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG5 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG6": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG6 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG7": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG7 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG8": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG8 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG9": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG9 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG10": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG10 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG11": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG11 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG12": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG12 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG13": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG13 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "eDL_DG14": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDLDG14 = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Visible_Digital_Seal": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - visibleDigitalSeal = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Visible_Digital_Seal_NC": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - visibleDigitalSealNC = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Digital_Signature": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - digitalSignature = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_Session_Data": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDSessionData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_Session_Data_Status": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDSessionDataStatus = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_ePassp_Directory": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDEPasspDirectory = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (rFIDAuthenticationInfo.IsSet && rFIDAuthenticationInfo.Value == null) - throw new ArgumentNullException(nameof(rFIDAuthenticationInfo), "Property is not nullable for class BinaryData."); - - if (rFIDMIFAREDataValidity.IsSet && rFIDMIFAREDataValidity.Value == null) - throw new ArgumentNullException(nameof(rFIDMIFAREDataValidity), "Property is not nullable for class BinaryData."); - - if (rFIDMIFAREData.IsSet && rFIDMIFAREData.Value == null) - throw new ArgumentNullException(nameof(rFIDMIFAREData), "Property is not nullable for class BinaryData."); - - if (rFIDEFCOM.IsSet && rFIDEFCOM.Value == null) - throw new ArgumentNullException(nameof(rFIDEFCOM), "Property is not nullable for class BinaryData."); - - if (rFIDDG1.IsSet && rFIDDG1.Value == null) - throw new ArgumentNullException(nameof(rFIDDG1), "Property is not nullable for class BinaryData."); - - if (rFIDDG2.IsSet && rFIDDG2.Value == null) - throw new ArgumentNullException(nameof(rFIDDG2), "Property is not nullable for class BinaryData."); - - if (rFIDDG3.IsSet && rFIDDG3.Value == null) - throw new ArgumentNullException(nameof(rFIDDG3), "Property is not nullable for class BinaryData."); - - if (rFIDDG4.IsSet && rFIDDG4.Value == null) - throw new ArgumentNullException(nameof(rFIDDG4), "Property is not nullable for class BinaryData."); - - if (rFIDDG5.IsSet && rFIDDG5.Value == null) - throw new ArgumentNullException(nameof(rFIDDG5), "Property is not nullable for class BinaryData."); - - if (rFIDDG6.IsSet && rFIDDG6.Value == null) - throw new ArgumentNullException(nameof(rFIDDG6), "Property is not nullable for class BinaryData."); - - if (rFIDDG7.IsSet && rFIDDG7.Value == null) - throw new ArgumentNullException(nameof(rFIDDG7), "Property is not nullable for class BinaryData."); - - if (rFIDDG8.IsSet && rFIDDG8.Value == null) - throw new ArgumentNullException(nameof(rFIDDG8), "Property is not nullable for class BinaryData."); - - if (rFIDDG9.IsSet && rFIDDG9.Value == null) - throw new ArgumentNullException(nameof(rFIDDG9), "Property is not nullable for class BinaryData."); - - if (rFIDDG10.IsSet && rFIDDG10.Value == null) - throw new ArgumentNullException(nameof(rFIDDG10), "Property is not nullable for class BinaryData."); - - if (rFIDDG11.IsSet && rFIDDG11.Value == null) - throw new ArgumentNullException(nameof(rFIDDG11), "Property is not nullable for class BinaryData."); - - if (rFIDDG12.IsSet && rFIDDG12.Value == null) - throw new ArgumentNullException(nameof(rFIDDG12), "Property is not nullable for class BinaryData."); - - if (rFIDDG13.IsSet && rFIDDG13.Value == null) - throw new ArgumentNullException(nameof(rFIDDG13), "Property is not nullable for class BinaryData."); - - if (rFIDDG14.IsSet && rFIDDG14.Value == null) - throw new ArgumentNullException(nameof(rFIDDG14), "Property is not nullable for class BinaryData."); - - if (rFIDDG15.IsSet && rFIDDG15.Value == null) - throw new ArgumentNullException(nameof(rFIDDG15), "Property is not nullable for class BinaryData."); - - if (rFIDDG16.IsSet && rFIDDG16.Value == null) - throw new ArgumentNullException(nameof(rFIDDG16), "Property is not nullable for class BinaryData."); - - if (rFIDEFSOD.IsSet && rFIDEFSOD.Value == null) - throw new ArgumentNullException(nameof(rFIDEFSOD), "Property is not nullable for class BinaryData."); - - if (eIDDG1.IsSet && eIDDG1.Value == null) - throw new ArgumentNullException(nameof(eIDDG1), "Property is not nullable for class BinaryData."); - - if (eIDDG2.IsSet && eIDDG2.Value == null) - throw new ArgumentNullException(nameof(eIDDG2), "Property is not nullable for class BinaryData."); - - if (eIDDG3.IsSet && eIDDG3.Value == null) - throw new ArgumentNullException(nameof(eIDDG3), "Property is not nullable for class BinaryData."); - - if (eIDDG4.IsSet && eIDDG4.Value == null) - throw new ArgumentNullException(nameof(eIDDG4), "Property is not nullable for class BinaryData."); - - if (eIDDG5.IsSet && eIDDG5.Value == null) - throw new ArgumentNullException(nameof(eIDDG5), "Property is not nullable for class BinaryData."); - - if (eIDDG6.IsSet && eIDDG6.Value == null) - throw new ArgumentNullException(nameof(eIDDG6), "Property is not nullable for class BinaryData."); - - if (eIDDG7.IsSet && eIDDG7.Value == null) - throw new ArgumentNullException(nameof(eIDDG7), "Property is not nullable for class BinaryData."); - - if (eIDDG8.IsSet && eIDDG8.Value == null) - throw new ArgumentNullException(nameof(eIDDG8), "Property is not nullable for class BinaryData."); - - if (eIDDG9.IsSet && eIDDG9.Value == null) - throw new ArgumentNullException(nameof(eIDDG9), "Property is not nullable for class BinaryData."); - - if (eIDDG10.IsSet && eIDDG10.Value == null) - throw new ArgumentNullException(nameof(eIDDG10), "Property is not nullable for class BinaryData."); - - if (eIDDG11.IsSet && eIDDG11.Value == null) - throw new ArgumentNullException(nameof(eIDDG11), "Property is not nullable for class BinaryData."); - - if (eIDDG12.IsSet && eIDDG12.Value == null) - throw new ArgumentNullException(nameof(eIDDG12), "Property is not nullable for class BinaryData."); - - if (eIDDG13.IsSet && eIDDG13.Value == null) - throw new ArgumentNullException(nameof(eIDDG13), "Property is not nullable for class BinaryData."); - - if (eIDDG14.IsSet && eIDDG14.Value == null) - throw new ArgumentNullException(nameof(eIDDG14), "Property is not nullable for class BinaryData."); - - if (eIDDG15.IsSet && eIDDG15.Value == null) - throw new ArgumentNullException(nameof(eIDDG15), "Property is not nullable for class BinaryData."); - - if (eIDDG16.IsSet && eIDDG16.Value == null) - throw new ArgumentNullException(nameof(eIDDG16), "Property is not nullable for class BinaryData."); - - if (eIDDG17.IsSet && eIDDG17.Value == null) - throw new ArgumentNullException(nameof(eIDDG17), "Property is not nullable for class BinaryData."); - - if (eIDDG18.IsSet && eIDDG18.Value == null) - throw new ArgumentNullException(nameof(eIDDG18), "Property is not nullable for class BinaryData."); - - if (eIDDG19.IsSet && eIDDG19.Value == null) - throw new ArgumentNullException(nameof(eIDDG19), "Property is not nullable for class BinaryData."); - - if (eIDDG20.IsSet && eIDDG20.Value == null) - throw new ArgumentNullException(nameof(eIDDG20), "Property is not nullable for class BinaryData."); - - if (eIDDG21.IsSet && eIDDG21.Value == null) - throw new ArgumentNullException(nameof(eIDDG21), "Property is not nullable for class BinaryData."); - - if (eDLCOM.IsSet && eDLCOM.Value == null) - throw new ArgumentNullException(nameof(eDLCOM), "Property is not nullable for class BinaryData."); - - if (eDLSOD.IsSet && eDLSOD.Value == null) - throw new ArgumentNullException(nameof(eDLSOD), "Property is not nullable for class BinaryData."); - - if (eDLDG1.IsSet && eDLDG1.Value == null) - throw new ArgumentNullException(nameof(eDLDG1), "Property is not nullable for class BinaryData."); - - if (eDLDG2.IsSet && eDLDG2.Value == null) - throw new ArgumentNullException(nameof(eDLDG2), "Property is not nullable for class BinaryData."); - - if (eDLDG3.IsSet && eDLDG3.Value == null) - throw new ArgumentNullException(nameof(eDLDG3), "Property is not nullable for class BinaryData."); - - if (eDLDG4.IsSet && eDLDG4.Value == null) - throw new ArgumentNullException(nameof(eDLDG4), "Property is not nullable for class BinaryData."); - - if (eDLDG5.IsSet && eDLDG5.Value == null) - throw new ArgumentNullException(nameof(eDLDG5), "Property is not nullable for class BinaryData."); - - if (eDLDG6.IsSet && eDLDG6.Value == null) - throw new ArgumentNullException(nameof(eDLDG6), "Property is not nullable for class BinaryData."); - - if (eDLDG7.IsSet && eDLDG7.Value == null) - throw new ArgumentNullException(nameof(eDLDG7), "Property is not nullable for class BinaryData."); - - if (eDLDG8.IsSet && eDLDG8.Value == null) - throw new ArgumentNullException(nameof(eDLDG8), "Property is not nullable for class BinaryData."); - - if (eDLDG9.IsSet && eDLDG9.Value == null) - throw new ArgumentNullException(nameof(eDLDG9), "Property is not nullable for class BinaryData."); - - if (eDLDG10.IsSet && eDLDG10.Value == null) - throw new ArgumentNullException(nameof(eDLDG10), "Property is not nullable for class BinaryData."); - - if (eDLDG11.IsSet && eDLDG11.Value == null) - throw new ArgumentNullException(nameof(eDLDG11), "Property is not nullable for class BinaryData."); - - if (eDLDG12.IsSet && eDLDG12.Value == null) - throw new ArgumentNullException(nameof(eDLDG12), "Property is not nullable for class BinaryData."); - - if (eDLDG13.IsSet && eDLDG13.Value == null) - throw new ArgumentNullException(nameof(eDLDG13), "Property is not nullable for class BinaryData."); - - if (eDLDG14.IsSet && eDLDG14.Value == null) - throw new ArgumentNullException(nameof(eDLDG14), "Property is not nullable for class BinaryData."); - - if (visibleDigitalSeal.IsSet && visibleDigitalSeal.Value == null) - throw new ArgumentNullException(nameof(visibleDigitalSeal), "Property is not nullable for class BinaryData."); - - if (visibleDigitalSealNC.IsSet && visibleDigitalSealNC.Value == null) - throw new ArgumentNullException(nameof(visibleDigitalSealNC), "Property is not nullable for class BinaryData."); - - if (digitalSignature.IsSet && digitalSignature.Value == null) - throw new ArgumentNullException(nameof(digitalSignature), "Property is not nullable for class BinaryData."); - - if (rFIDSessionData.IsSet && rFIDSessionData.Value == null) - throw new ArgumentNullException(nameof(rFIDSessionData), "Property is not nullable for class BinaryData."); - - if (rFIDSessionDataStatus.IsSet && rFIDSessionDataStatus.Value == null) - throw new ArgumentNullException(nameof(rFIDSessionDataStatus), "Property is not nullable for class BinaryData."); - - if (rFIDEPasspDirectory.IsSet && rFIDEPasspDirectory.Value == null) - throw new ArgumentNullException(nameof(rFIDEPasspDirectory), "Property is not nullable for class BinaryData."); - - return new BinaryData(rFIDAuthenticationInfo, rFIDMIFAREDataValidity, rFIDMIFAREData, rFIDEFCOM, rFIDDG1, rFIDDG2, rFIDDG3, rFIDDG4, rFIDDG5, rFIDDG6, rFIDDG7, rFIDDG8, rFIDDG9, rFIDDG10, rFIDDG11, rFIDDG12, rFIDDG13, rFIDDG14, rFIDDG15, rFIDDG16, rFIDEFSOD, eIDDG1, eIDDG2, eIDDG3, eIDDG4, eIDDG5, eIDDG6, eIDDG7, eIDDG8, eIDDG9, eIDDG10, eIDDG11, eIDDG12, eIDDG13, eIDDG14, eIDDG15, eIDDG16, eIDDG17, eIDDG18, eIDDG19, eIDDG20, eIDDG21, eDLCOM, eDLSOD, eDLDG1, eDLDG2, eDLDG3, eDLDG4, eDLDG5, eDLDG6, eDLDG7, eDLDG8, eDLDG9, eDLDG10, eDLDG11, eDLDG12, eDLDG13, eDLDG14, visibleDigitalSeal, visibleDigitalSealNC, digitalSignature, rFIDSessionData, rFIDSessionDataStatus, rFIDEPasspDirectory); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, BinaryData binaryData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, binaryData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, BinaryData binaryData, JsonSerializerOptions jsonSerializerOptions) - { - if (binaryData.RFIDAuthenticationInfoOption.IsSet && binaryData.RFIDAuthenticationInfo == null) - throw new ArgumentNullException(nameof(binaryData.RFIDAuthenticationInfo), "Property is required for class BinaryData."); - - if (binaryData.RFIDMIFAREDataValidityOption.IsSet && binaryData.RFIDMIFAREDataValidity == null) - throw new ArgumentNullException(nameof(binaryData.RFIDMIFAREDataValidity), "Property is required for class BinaryData."); - - if (binaryData.RFIDMIFAREDataOption.IsSet && binaryData.RFIDMIFAREData == null) - throw new ArgumentNullException(nameof(binaryData.RFIDMIFAREData), "Property is required for class BinaryData."); - - if (binaryData.RFID_EF_COMOption.IsSet && binaryData.RFID_EF_COM == null) - throw new ArgumentNullException(nameof(binaryData.RFID_EF_COM), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG1Option.IsSet && binaryData.RFIDDG1 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG1), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG2Option.IsSet && binaryData.RFIDDG2 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG2), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG3Option.IsSet && binaryData.RFIDDG3 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG3), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG4Option.IsSet && binaryData.RFIDDG4 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG4), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG5Option.IsSet && binaryData.RFIDDG5 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG5), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG6Option.IsSet && binaryData.RFIDDG6 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG6), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG7Option.IsSet && binaryData.RFIDDG7 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG7), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG8Option.IsSet && binaryData.RFIDDG8 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG8), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG9Option.IsSet && binaryData.RFIDDG9 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG9), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG10Option.IsSet && binaryData.RFIDDG10 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG10), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG11Option.IsSet && binaryData.RFIDDG11 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG11), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG12Option.IsSet && binaryData.RFIDDG12 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG12), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG13Option.IsSet && binaryData.RFIDDG13 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG13), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG14Option.IsSet && binaryData.RFIDDG14 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG14), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG15Option.IsSet && binaryData.RFIDDG15 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG15), "Property is required for class BinaryData."); - - if (binaryData.RFIDDG16Option.IsSet && binaryData.RFIDDG16 == null) - throw new ArgumentNullException(nameof(binaryData.RFIDDG16), "Property is required for class BinaryData."); - - if (binaryData.RFID_EF_SODOption.IsSet && binaryData.RFID_EF_SOD == null) - throw new ArgumentNullException(nameof(binaryData.RFID_EF_SOD), "Property is required for class BinaryData."); - - if (binaryData.EIDDG1Option.IsSet && binaryData.EIDDG1 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG1), "Property is required for class BinaryData."); - - if (binaryData.EIDDG2Option.IsSet && binaryData.EIDDG2 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG2), "Property is required for class BinaryData."); - - if (binaryData.EIDDG3Option.IsSet && binaryData.EIDDG3 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG3), "Property is required for class BinaryData."); - - if (binaryData.EIDDG4Option.IsSet && binaryData.EIDDG4 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG4), "Property is required for class BinaryData."); - - if (binaryData.EIDDG5Option.IsSet && binaryData.EIDDG5 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG5), "Property is required for class BinaryData."); - - if (binaryData.EIDDG6Option.IsSet && binaryData.EIDDG6 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG6), "Property is required for class BinaryData."); - - if (binaryData.EIDDG7Option.IsSet && binaryData.EIDDG7 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG7), "Property is required for class BinaryData."); - - if (binaryData.EIDDG8Option.IsSet && binaryData.EIDDG8 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG8), "Property is required for class BinaryData."); - - if (binaryData.EIDDG9Option.IsSet && binaryData.EIDDG9 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG9), "Property is required for class BinaryData."); - - if (binaryData.EIDDG10Option.IsSet && binaryData.EIDDG10 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG10), "Property is required for class BinaryData."); - - if (binaryData.EIDDG11Option.IsSet && binaryData.EIDDG11 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG11), "Property is required for class BinaryData."); - - if (binaryData.EIDDG12Option.IsSet && binaryData.EIDDG12 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG12), "Property is required for class BinaryData."); - - if (binaryData.EIDDG13Option.IsSet && binaryData.EIDDG13 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG13), "Property is required for class BinaryData."); - - if (binaryData.EIDDG14Option.IsSet && binaryData.EIDDG14 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG14), "Property is required for class BinaryData."); - - if (binaryData.EIDDG15Option.IsSet && binaryData.EIDDG15 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG15), "Property is required for class BinaryData."); - - if (binaryData.EIDDG16Option.IsSet && binaryData.EIDDG16 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG16), "Property is required for class BinaryData."); - - if (binaryData.EIDDG17Option.IsSet && binaryData.EIDDG17 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG17), "Property is required for class BinaryData."); - - if (binaryData.EIDDG18Option.IsSet && binaryData.EIDDG18 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG18), "Property is required for class BinaryData."); - - if (binaryData.EIDDG19Option.IsSet && binaryData.EIDDG19 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG19), "Property is required for class BinaryData."); - - if (binaryData.EIDDG20Option.IsSet && binaryData.EIDDG20 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG20), "Property is required for class BinaryData."); - - if (binaryData.EIDDG21Option.IsSet && binaryData.EIDDG21 == null) - throw new ArgumentNullException(nameof(binaryData.EIDDG21), "Property is required for class BinaryData."); - - if (binaryData.EDLCOMOption.IsSet && binaryData.EDLCOM == null) - throw new ArgumentNullException(nameof(binaryData.EDLCOM), "Property is required for class BinaryData."); - - if (binaryData.EDLSODOption.IsSet && binaryData.EDLSOD == null) - throw new ArgumentNullException(nameof(binaryData.EDLSOD), "Property is required for class BinaryData."); - - if (binaryData.EDLDG1Option.IsSet && binaryData.EDLDG1 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG1), "Property is required for class BinaryData."); - - if (binaryData.EDLDG2Option.IsSet && binaryData.EDLDG2 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG2), "Property is required for class BinaryData."); - - if (binaryData.EDLDG3Option.IsSet && binaryData.EDLDG3 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG3), "Property is required for class BinaryData."); - - if (binaryData.EDLDG4Option.IsSet && binaryData.EDLDG4 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG4), "Property is required for class BinaryData."); - - if (binaryData.EDLDG5Option.IsSet && binaryData.EDLDG5 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG5), "Property is required for class BinaryData."); - - if (binaryData.EDLDG6Option.IsSet && binaryData.EDLDG6 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG6), "Property is required for class BinaryData."); - - if (binaryData.EDLDG7Option.IsSet && binaryData.EDLDG7 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG7), "Property is required for class BinaryData."); - - if (binaryData.EDLDG8Option.IsSet && binaryData.EDLDG8 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG8), "Property is required for class BinaryData."); - - if (binaryData.EDLDG9Option.IsSet && binaryData.EDLDG9 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG9), "Property is required for class BinaryData."); - - if (binaryData.EDLDG10Option.IsSet && binaryData.EDLDG10 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG10), "Property is required for class BinaryData."); - - if (binaryData.EDLDG11Option.IsSet && binaryData.EDLDG11 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG11), "Property is required for class BinaryData."); - - if (binaryData.EDLDG12Option.IsSet && binaryData.EDLDG12 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG12), "Property is required for class BinaryData."); - - if (binaryData.EDLDG13Option.IsSet && binaryData.EDLDG13 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG13), "Property is required for class BinaryData."); - - if (binaryData.EDLDG14Option.IsSet && binaryData.EDLDG14 == null) - throw new ArgumentNullException(nameof(binaryData.EDLDG14), "Property is required for class BinaryData."); - - if (binaryData.VisibleDigitalSealOption.IsSet && binaryData.VisibleDigitalSeal == null) - throw new ArgumentNullException(nameof(binaryData.VisibleDigitalSeal), "Property is required for class BinaryData."); - - if (binaryData.VisibleDigitalSealNCOption.IsSet && binaryData.VisibleDigitalSealNC == null) - throw new ArgumentNullException(nameof(binaryData.VisibleDigitalSealNC), "Property is required for class BinaryData."); - - if (binaryData.DigitalSignatureOption.IsSet && binaryData.DigitalSignature == null) - throw new ArgumentNullException(nameof(binaryData.DigitalSignature), "Property is required for class BinaryData."); - - if (binaryData.RFIDSessionDataOption.IsSet && binaryData.RFIDSessionData == null) - throw new ArgumentNullException(nameof(binaryData.RFIDSessionData), "Property is required for class BinaryData."); - - if (binaryData.RFIDSessionDataStatusOption.IsSet && binaryData.RFIDSessionDataStatus == null) - throw new ArgumentNullException(nameof(binaryData.RFIDSessionDataStatus), "Property is required for class BinaryData."); - - if (binaryData.RFIDEPasspDirectoryOption.IsSet && binaryData.RFIDEPasspDirectory == null) - throw new ArgumentNullException(nameof(binaryData.RFIDEPasspDirectory), "Property is required for class BinaryData."); - - if (binaryData.RFIDAuthenticationInfoOption.IsSet) - { - writer.WritePropertyName("RFID_Authentication_Info"); - JsonSerializer.Serialize(writer, binaryData.RFIDAuthenticationInfo, jsonSerializerOptions); - } - if (binaryData.RFIDMIFAREDataValidityOption.IsSet) - { - writer.WritePropertyName("RFID_MIFARE_Data_Validity"); - JsonSerializer.Serialize(writer, binaryData.RFIDMIFAREDataValidity, jsonSerializerOptions); - } - if (binaryData.RFIDMIFAREDataOption.IsSet) - { - writer.WritePropertyName("RFID_MIFARE_Data"); - JsonSerializer.Serialize(writer, binaryData.RFIDMIFAREData, jsonSerializerOptions); - } - if (binaryData.RFID_EF_COMOption.IsSet) - { - writer.WritePropertyName("RFID_EF_COM"); - JsonSerializer.Serialize(writer, binaryData.RFID_EF_COM, jsonSerializerOptions); - } - if (binaryData.RFIDDG1Option.IsSet) - { - writer.WritePropertyName("RFID_DG1"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG1, jsonSerializerOptions); - } - if (binaryData.RFIDDG2Option.IsSet) - { - writer.WritePropertyName("RFID_DG2"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG2, jsonSerializerOptions); - } - if (binaryData.RFIDDG3Option.IsSet) - { - writer.WritePropertyName("RFID_DG3"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG3, jsonSerializerOptions); - } - if (binaryData.RFIDDG4Option.IsSet) - { - writer.WritePropertyName("RFID_DG4"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG4, jsonSerializerOptions); - } - if (binaryData.RFIDDG5Option.IsSet) - { - writer.WritePropertyName("RFID_DG5"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG5, jsonSerializerOptions); - } - if (binaryData.RFIDDG6Option.IsSet) - { - writer.WritePropertyName("RFID_DG6"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG6, jsonSerializerOptions); - } - if (binaryData.RFIDDG7Option.IsSet) - { - writer.WritePropertyName("RFID_DG7"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG7, jsonSerializerOptions); - } - if (binaryData.RFIDDG8Option.IsSet) - { - writer.WritePropertyName("RFID_DG8"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG8, jsonSerializerOptions); - } - if (binaryData.RFIDDG9Option.IsSet) - { - writer.WritePropertyName("RFID_DG9"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG9, jsonSerializerOptions); - } - if (binaryData.RFIDDG10Option.IsSet) - { - writer.WritePropertyName("RFID_DG10"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG10, jsonSerializerOptions); - } - if (binaryData.RFIDDG11Option.IsSet) - { - writer.WritePropertyName("RFID_DG11"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG11, jsonSerializerOptions); - } - if (binaryData.RFIDDG12Option.IsSet) - { - writer.WritePropertyName("RFID_DG12"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG12, jsonSerializerOptions); - } - if (binaryData.RFIDDG13Option.IsSet) - { - writer.WritePropertyName("RFID_DG13"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG13, jsonSerializerOptions); - } - if (binaryData.RFIDDG14Option.IsSet) - { - writer.WritePropertyName("RFID_DG14"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG14, jsonSerializerOptions); - } - if (binaryData.RFIDDG15Option.IsSet) - { - writer.WritePropertyName("RFID_DG15"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG15, jsonSerializerOptions); - } - if (binaryData.RFIDDG16Option.IsSet) - { - writer.WritePropertyName("RFID_DG16"); - JsonSerializer.Serialize(writer, binaryData.RFIDDG16, jsonSerializerOptions); - } - if (binaryData.RFID_EF_SODOption.IsSet) - { - writer.WritePropertyName("RFID_EF_SOD"); - JsonSerializer.Serialize(writer, binaryData.RFID_EF_SOD, jsonSerializerOptions); - } - if (binaryData.EIDDG1Option.IsSet) - { - writer.WritePropertyName("eID_DG1"); - JsonSerializer.Serialize(writer, binaryData.EIDDG1, jsonSerializerOptions); - } - if (binaryData.EIDDG2Option.IsSet) - { - writer.WritePropertyName("eID_DG2"); - JsonSerializer.Serialize(writer, binaryData.EIDDG2, jsonSerializerOptions); - } - if (binaryData.EIDDG3Option.IsSet) - { - writer.WritePropertyName("eID_DG3"); - JsonSerializer.Serialize(writer, binaryData.EIDDG3, jsonSerializerOptions); - } - if (binaryData.EIDDG4Option.IsSet) - { - writer.WritePropertyName("eID_DG4"); - JsonSerializer.Serialize(writer, binaryData.EIDDG4, jsonSerializerOptions); - } - if (binaryData.EIDDG5Option.IsSet) - { - writer.WritePropertyName("eID_DG5"); - JsonSerializer.Serialize(writer, binaryData.EIDDG5, jsonSerializerOptions); - } - if (binaryData.EIDDG6Option.IsSet) - { - writer.WritePropertyName("eID_DG6"); - JsonSerializer.Serialize(writer, binaryData.EIDDG6, jsonSerializerOptions); - } - if (binaryData.EIDDG7Option.IsSet) - { - writer.WritePropertyName("eID_DG7"); - JsonSerializer.Serialize(writer, binaryData.EIDDG7, jsonSerializerOptions); - } - if (binaryData.EIDDG8Option.IsSet) - { - writer.WritePropertyName("eID_DG8"); - JsonSerializer.Serialize(writer, binaryData.EIDDG8, jsonSerializerOptions); - } - if (binaryData.EIDDG9Option.IsSet) - { - writer.WritePropertyName("eID_DG9"); - JsonSerializer.Serialize(writer, binaryData.EIDDG9, jsonSerializerOptions); - } - if (binaryData.EIDDG10Option.IsSet) - { - writer.WritePropertyName("eID_DG10"); - JsonSerializer.Serialize(writer, binaryData.EIDDG10, jsonSerializerOptions); - } - if (binaryData.EIDDG11Option.IsSet) - { - writer.WritePropertyName("eID_DG11"); - JsonSerializer.Serialize(writer, binaryData.EIDDG11, jsonSerializerOptions); - } - if (binaryData.EIDDG12Option.IsSet) - { - writer.WritePropertyName("eID_DG12"); - JsonSerializer.Serialize(writer, binaryData.EIDDG12, jsonSerializerOptions); - } - if (binaryData.EIDDG13Option.IsSet) - { - writer.WritePropertyName("eID_DG13"); - JsonSerializer.Serialize(writer, binaryData.EIDDG13, jsonSerializerOptions); - } - if (binaryData.EIDDG14Option.IsSet) - { - writer.WritePropertyName("eID_DG14"); - JsonSerializer.Serialize(writer, binaryData.EIDDG14, jsonSerializerOptions); - } - if (binaryData.EIDDG15Option.IsSet) - { - writer.WritePropertyName("eID_DG15"); - JsonSerializer.Serialize(writer, binaryData.EIDDG15, jsonSerializerOptions); - } - if (binaryData.EIDDG16Option.IsSet) - { - writer.WritePropertyName("eID_DG16"); - JsonSerializer.Serialize(writer, binaryData.EIDDG16, jsonSerializerOptions); - } - if (binaryData.EIDDG17Option.IsSet) - { - writer.WritePropertyName("eID_DG17"); - JsonSerializer.Serialize(writer, binaryData.EIDDG17, jsonSerializerOptions); - } - if (binaryData.EIDDG18Option.IsSet) - { - writer.WritePropertyName("eID_DG18"); - JsonSerializer.Serialize(writer, binaryData.EIDDG18, jsonSerializerOptions); - } - if (binaryData.EIDDG19Option.IsSet) - { - writer.WritePropertyName("eID_DG19"); - JsonSerializer.Serialize(writer, binaryData.EIDDG19, jsonSerializerOptions); - } - if (binaryData.EIDDG20Option.IsSet) - { - writer.WritePropertyName("eID_DG20"); - JsonSerializer.Serialize(writer, binaryData.EIDDG20, jsonSerializerOptions); - } - if (binaryData.EIDDG21Option.IsSet) - { - writer.WritePropertyName("eID_DG21"); - JsonSerializer.Serialize(writer, binaryData.EIDDG21, jsonSerializerOptions); - } - if (binaryData.EDLCOMOption.IsSet) - { - writer.WritePropertyName("eDL_COM"); - JsonSerializer.Serialize(writer, binaryData.EDLCOM, jsonSerializerOptions); - } - if (binaryData.EDLSODOption.IsSet) - { - writer.WritePropertyName("eDL_SOD"); - JsonSerializer.Serialize(writer, binaryData.EDLSOD, jsonSerializerOptions); - } - if (binaryData.EDLDG1Option.IsSet) - { - writer.WritePropertyName("eDL_DG1"); - JsonSerializer.Serialize(writer, binaryData.EDLDG1, jsonSerializerOptions); - } - if (binaryData.EDLDG2Option.IsSet) - { - writer.WritePropertyName("eDL_DG2"); - JsonSerializer.Serialize(writer, binaryData.EDLDG2, jsonSerializerOptions); - } - if (binaryData.EDLDG3Option.IsSet) - { - writer.WritePropertyName("eDL_DG3"); - JsonSerializer.Serialize(writer, binaryData.EDLDG3, jsonSerializerOptions); - } - if (binaryData.EDLDG4Option.IsSet) - { - writer.WritePropertyName("eDL_DG4"); - JsonSerializer.Serialize(writer, binaryData.EDLDG4, jsonSerializerOptions); - } - if (binaryData.EDLDG5Option.IsSet) - { - writer.WritePropertyName("eDL_DG5"); - JsonSerializer.Serialize(writer, binaryData.EDLDG5, jsonSerializerOptions); - } - if (binaryData.EDLDG6Option.IsSet) - { - writer.WritePropertyName("eDL_DG6"); - JsonSerializer.Serialize(writer, binaryData.EDLDG6, jsonSerializerOptions); - } - if (binaryData.EDLDG7Option.IsSet) - { - writer.WritePropertyName("eDL_DG7"); - JsonSerializer.Serialize(writer, binaryData.EDLDG7, jsonSerializerOptions); - } - if (binaryData.EDLDG8Option.IsSet) - { - writer.WritePropertyName("eDL_DG8"); - JsonSerializer.Serialize(writer, binaryData.EDLDG8, jsonSerializerOptions); - } - if (binaryData.EDLDG9Option.IsSet) - { - writer.WritePropertyName("eDL_DG9"); - JsonSerializer.Serialize(writer, binaryData.EDLDG9, jsonSerializerOptions); - } - if (binaryData.EDLDG10Option.IsSet) - { - writer.WritePropertyName("eDL_DG10"); - JsonSerializer.Serialize(writer, binaryData.EDLDG10, jsonSerializerOptions); - } - if (binaryData.EDLDG11Option.IsSet) - { - writer.WritePropertyName("eDL_DG11"); - JsonSerializer.Serialize(writer, binaryData.EDLDG11, jsonSerializerOptions); - } - if (binaryData.EDLDG12Option.IsSet) - { - writer.WritePropertyName("eDL_DG12"); - JsonSerializer.Serialize(writer, binaryData.EDLDG12, jsonSerializerOptions); - } - if (binaryData.EDLDG13Option.IsSet) - { - writer.WritePropertyName("eDL_DG13"); - JsonSerializer.Serialize(writer, binaryData.EDLDG13, jsonSerializerOptions); - } - if (binaryData.EDLDG14Option.IsSet) - { - writer.WritePropertyName("eDL_DG14"); - JsonSerializer.Serialize(writer, binaryData.EDLDG14, jsonSerializerOptions); - } - if (binaryData.VisibleDigitalSealOption.IsSet) - { - writer.WritePropertyName("Visible_Digital_Seal"); - JsonSerializer.Serialize(writer, binaryData.VisibleDigitalSeal, jsonSerializerOptions); - } - if (binaryData.VisibleDigitalSealNCOption.IsSet) - { - writer.WritePropertyName("Visible_Digital_Seal_NC"); - JsonSerializer.Serialize(writer, binaryData.VisibleDigitalSealNC, jsonSerializerOptions); - } - if (binaryData.DigitalSignatureOption.IsSet) - { - writer.WritePropertyName("Digital_Signature"); - JsonSerializer.Serialize(writer, binaryData.DigitalSignature, jsonSerializerOptions); - } - if (binaryData.RFIDSessionDataOption.IsSet) - { - writer.WritePropertyName("RFID_Session_Data"); - JsonSerializer.Serialize(writer, binaryData.RFIDSessionData, jsonSerializerOptions); - } - if (binaryData.RFIDSessionDataStatusOption.IsSet) - { - writer.WritePropertyName("RFID_Session_Data_Status"); - JsonSerializer.Serialize(writer, binaryData.RFIDSessionDataStatus, jsonSerializerOptions); - } - if (binaryData.RFIDEPasspDirectoryOption.IsSet) - { - writer.WritePropertyName("RFID_ePassp_Directory"); - JsonSerializer.Serialize(writer, binaryData.RFIDEPasspDirectory, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs b/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs index 32e38dd..5a5dfe3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ByteArrayItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,38 +14,48 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ByteArrayItem /// + [DataContract(Name = "ByteArrayItem")] public partial class ByteArrayItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Byte array in base64 - [JsonConstructor] - public ByteArrayItem(string byteArray) + [JsonConstructorAttribute] + protected ByteArrayItem() { } + /// + /// Initializes a new instance of the class. + /// + /// Byte array in base64 (required). + public ByteArrayItem(string byteArray = default(string)) { - ByteArray = byteArray; - OnCreated(); + // to ensure "byteArray" is required (not null) + if (byteArray == null) + { + throw new ArgumentNullException("byteArray is a required property for ByteArrayItem and cannot be null"); + } + this.ByteArray = byteArray; } - partial void OnCreated(); - /// /// Byte array in base64 /// /// Byte array in base64 - [JsonPropertyName("ByteArray")] + [DataMember(Name = "ByteArray", IsRequired = true, EmitDefaultValue = true)] public string ByteArray { get; set; } /// @@ -63,6 +71,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -74,91 +91,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ByteArrayItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ByteArrayItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option byteArray = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ByteArray": - byteArray = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!byteArray.IsSet) - throw new ArgumentException("Property is required for class ByteArrayItem.", nameof(byteArray)); - - if (byteArray.IsSet && byteArray.Value == null) - throw new ArgumentNullException(nameof(byteArray), "Property is not nullable for class ByteArrayItem."); - - return new ByteArrayItem(byteArray.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ByteArrayItem byteArrayItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, byteArrayItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ByteArrayItem byteArrayItem, JsonSerializerOptions jsonSerializerOptions) - { - if (byteArrayItem.ByteArray == null) - throw new ArgumentNullException(nameof(byteArrayItem.ByteArray), "Property is required for class ByteArrayItem."); - - writer.WriteString("ByteArray", byteArrayItem.ByteArray); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs index cc750da..5dc1ee7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,42 +14,54 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ByteArrayResult /// + [DataContract(Name = "ByteArrayResult")] public partial class ByteArrayResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Byte array in base64 - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public ByteArrayResult(string byteArray, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected ByteArrayResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Byte array in base64 (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public ByteArrayResult(string byteArray = default(string), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - ByteArray = byteArray; - OnCreated(); + // to ensure "byteArray" is required (not null) + if (byteArray == null) + { + throw new ArgumentNullException("byteArray is a required property for ByteArrayResult and cannot be null"); + } + this.ByteArray = byteArray; } - partial void OnCreated(); - /// /// Byte array in base64 /// /// Byte array in base64 - [JsonPropertyName("ByteArray")] + [DataMember(Name = "ByteArray", IsRequired = true, EmitDefaultValue = true)] public string ByteArray { get; set; } /// @@ -62,155 +72,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ByteArrayResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" ByteArray: ").Append(ByteArray).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class ByteArrayResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override ByteArrayResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option byteArray = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ByteArray": - byteArray = new Option(utf8JsonReader.GetString()!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!byteArray.IsSet) - throw new ArgumentException("Property is required for class ByteArrayResult.", nameof(byteArray)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class ByteArrayResult.", nameof(resultType)); - - if (byteArray.IsSet && byteArray.Value == null) - throw new ArgumentNullException(nameof(byteArray), "Property is not nullable for class ByteArrayResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ByteArrayResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class ByteArrayResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ByteArrayResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ByteArrayResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ByteArrayResult."); - - return new ByteArrayResult(byteArray.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ByteArrayResult byteArrayResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, byteArrayResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ByteArrayResult byteArrayResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (byteArrayResult.ByteArray == null) - throw new ArgumentNullException(nameof(byteArrayResult.ByteArray), "Property is required for class ByteArrayResult."); - - writer.WriteString("ByteArray", byteArrayResult.ByteArray); - - if (byteArrayResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", byteArrayResult.BufLengthOption.Value!.Value); - - if (byteArrayResult.LightOption.IsSet) - writer.WriteNumber("light", byteArrayResult.LightOption.Value!.Value); - - if (byteArrayResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", byteArrayResult.ListIdxOption.Value!.Value); - - if (byteArrayResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", byteArrayResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", byteArrayResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs index 2784871..885670b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,38 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// CandidatesListItem /// + [DataContract(Name = "CandidatesListItem")] public partial class CandidatesListItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// candidatesList - [JsonConstructor] - public CandidatesListItem(Option candidatesList = default) + /// candidatesList. + public CandidatesListItem(DocumentTypesCandidatesList candidatesList = default(DocumentTypesCandidatesList)) { - CandidatesListOption = candidatesList; - OnCreated(); + this.CandidatesList = candidatesList; } - partial void OnCreated(); - - /// - /// Used to track the state of CandidatesList - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CandidatesListOption { get; private set; } - /// /// Gets or Sets CandidatesList /// - [JsonPropertyName("CandidatesList")] - public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new(value); } } + [DataMember(Name = "CandidatesList", EmitDefaultValue = false)] + public DocumentTypesCandidatesList CandidatesList { get; set; } /// /// Returns the string presentation of the object @@ -69,6 +60,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -80,93 +80,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class CandidatesListItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override CandidatesListItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option candidatesList = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "CandidatesList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - candidatesList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (candidatesList.IsSet && candidatesList.Value == null) - throw new ArgumentNullException(nameof(candidatesList), "Property is not nullable for class CandidatesListItem."); - - return new CandidatesListItem(candidatesList); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, CandidatesListItem candidatesListItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, candidatesListItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, CandidatesListItem candidatesListItem, JsonSerializerOptions jsonSerializerOptions) - { - if (candidatesListItem.CandidatesListOption.IsSet && candidatesListItem.CandidatesList == null) - throw new ArgumentNullException(nameof(candidatesListItem.CandidatesList), "Property is required for class CandidatesListItem."); - - if (candidatesListItem.CandidatesListOption.IsSet) - { - writer.WritePropertyName("CandidatesList"); - JsonSerializer.Serialize(writer, candidatesListItem.CandidatesList, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs b/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs index 4c34053..55e2fdf 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CertificateData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,60 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// CertificateData /// + [DataContract(Name = "CertificateData")] public partial class CertificateData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// data - /// length - [JsonConstructor] - public CertificateData(string data, string length) + [JsonConstructorAttribute] + protected CertificateData() { } + /// + /// Initializes a new instance of the class. + /// + /// data (required). + /// length (required). + public CertificateData(string data = default(string), string length = default(string)) { - Data = data; - Length = length; - OnCreated(); + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for CertificateData and cannot be null"); + } + this.Data = data; + // to ensure "length" is required (not null) + if (length == null) + { + throw new ArgumentNullException("length is a required property for CertificateData and cannot be null"); + } + this.Length = length; } - partial void OnCreated(); - /// /// Gets or Sets Data /// - [JsonPropertyName("Data")] + [DataMember(Name = "Data", IsRequired = true, EmitDefaultValue = true)] public string Data { get; set; } /// /// Gets or Sets Length /// - [JsonPropertyName("Length")] + [DataMember(Name = "Length", IsRequired = true, EmitDefaultValue = true)] public string Length { get; set; } /// @@ -71,6 +84,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -82,106 +104,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class CertificateDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override CertificateData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option data = default; - Option length = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Data": - data = new Option(utf8JsonReader.GetString()!); - break; - case "Length": - length = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!data.IsSet) - throw new ArgumentException("Property is required for class CertificateData.", nameof(data)); - - if (!length.IsSet) - throw new ArgumentException("Property is required for class CertificateData.", nameof(length)); - - if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class CertificateData."); - - if (length.IsSet && length.Value == null) - throw new ArgumentNullException(nameof(length), "Property is not nullable for class CertificateData."); - - return new CertificateData(data.Value!, length.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, CertificateData certificateData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, certificateData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, CertificateData certificateData, JsonSerializerOptions jsonSerializerOptions) - { - if (certificateData.Data == null) - throw new ArgumentNullException(nameof(certificateData.Data), "Property is required for class CertificateData."); - - if (certificateData.Length == null) - throw new ArgumentNullException(nameof(certificateData.Length), "Property is required for class CertificateData."); - - writer.WriteString("Data", certificateData.Data); - - writer.WriteString("Length", certificateData.Length); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs b/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs index 441a770..90e83d7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CheckDiagnose.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -657,867 +658,4 @@ public enum CheckDiagnose CHD_INCORRECT_OBJECT_COLOR = 250 } - /// - /// Converts to and from the JSON value - /// - public static class CheckDiagnoseValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static CheckDiagnose FromString(string value) - { - if (value.Equals((0).ToString())) - return CheckDiagnose.UNKNOWN; - - if (value.Equals((1).ToString())) - return CheckDiagnose.PASS; - - if (value.Equals((2).ToString())) - return CheckDiagnose.INVALID_INPUT_DATA; - - if (value.Equals((3).ToString())) - return CheckDiagnose.INTERNAL_ERROR; - - if (value.Equals((4).ToString())) - return CheckDiagnose.EXCEPTION_IN_MODULE; - - if (value.Equals((5).ToString())) - return CheckDiagnose.UNCERTAIN_VERIFICATION; - - if (value.Equals((7).ToString())) - return CheckDiagnose.NECESSARY_IMAGE_NOT_FOUND; - - if (value.Equals((8).ToString())) - return CheckDiagnose.PHOTO_SIDES_NOT_FOUND; - - if (value.Equals((10).ToString())) - return CheckDiagnose.INVALID_CHECKSUM; - - if (value.Equals((11).ToString())) - return CheckDiagnose.SYNTAX_ERROR; - - if (value.Equals((12).ToString())) - return CheckDiagnose.LOGIC_ERROR; - - if (value.Equals((13).ToString())) - return CheckDiagnose.SOURCES_COMPARISON_ERROR; - - if (value.Equals((14).ToString())) - return CheckDiagnose.FIELDS_COMPARISON_LOGIC_ERROR; - - if (value.Equals((15).ToString())) - return CheckDiagnose.INVALID_FIELD_FORMAT; - - if (value.Equals((20).ToString())) - return CheckDiagnose.TRUE_LUMINESCENCE_ERROR; - - if (value.Equals((21).ToString())) - return CheckDiagnose.FALSE_LUMINESCENCE_ERROR; - - if (value.Equals((22).ToString())) - return CheckDiagnose.FIXED_PATTERN_ERROR; - - if (value.Equals((23).ToString())) - return CheckDiagnose.LOW_CONTRAST_IN_IR_LIGHT; - - if (value.Equals((24).ToString())) - return CheckDiagnose.INCORRECT_BACKGROUND_LIGHT; - - if (value.Equals((25).ToString())) - return CheckDiagnose.BACKGROUND_COMPARISON_ERROR; - - if (value.Equals((26).ToString())) - return CheckDiagnose.INCORRECT_TEXT_COLOR; - - if (value.Equals((27).ToString())) - return CheckDiagnose.PHOTO_FALSE_LUMINESCENCE; - - if (value.Equals((28).ToString())) - return CheckDiagnose.TOO_MUCH_SHIFT; - - if (value.Equals((29).ToString())) - return CheckDiagnose.CONTACT_CHIP_TYPE_MISMATCH; - - if (value.Equals((30).ToString())) - return CheckDiagnose.FIBERS_NOT_FOUND; - - if (value.Equals((31).ToString())) - return CheckDiagnose.TOO_MANY_OBJECTS; - - if (value.Equals((33).ToString())) - return CheckDiagnose.SPECKS_IN_UV; - - if (value.Equals((34).ToString())) - return CheckDiagnose.TOO_LOW_RESOLUTION; - - if (value.Equals((40).ToString())) - return CheckDiagnose.INVISIBLE_ELEMENT_PRESENT; - - if (value.Equals((41).ToString())) - return CheckDiagnose.VISIBLE_ELEMENT_ABSENT; - - if (value.Equals((42).ToString())) - return CheckDiagnose.ELEMENT_SHOULD_BE_COLORED; - - if (value.Equals((43).ToString())) - return CheckDiagnose.ELEMENT_SHOULD_BE_GRAYSCALE; - - if (value.Equals((44).ToString())) - return CheckDiagnose.PHOTO_WHITE_IR_DONT_MATCH; - - if (value.Equals((50).ToString())) - return CheckDiagnose.UV_DULL_PAPER_MRZ; - - if (value.Equals((51).ToString())) - return CheckDiagnose.FALSE_LUMINESCENCE_IN_MRZ; - - if (value.Equals((52).ToString())) - return CheckDiagnose.UV_DULL_PAPER_PHOTO; - - if (value.Equals((53).ToString())) - return CheckDiagnose.UV_DULL_PAPER_BLANK; - - if (value.Equals((54).ToString())) - return CheckDiagnose.UV_DULL_PAPER_ERROR; - - if (value.Equals((55).ToString())) - return CheckDiagnose.FALSE_LUMINESCENCE_IN_BLANK; - - if (value.Equals((60).ToString())) - return CheckDiagnose.BAD_AREA_IN_AXIAL; - - if (value.Equals((65).ToString())) - return CheckDiagnose.FALSE_IPI_PARAMETERS; - - if (value.Equals((66).ToString())) - return CheckDiagnose.ENCRYPTED_IPI_NOT_FOUND; - - if (value.Equals((67).ToString())) - return CheckDiagnose.ENCRYPTED_IPI_DATA_DONT_MATCH; - - if (value.Equals((80).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_HIGHLIGHT_IR; - - if (value.Equals((81).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_GLARES_IN_PHOTO_AREA; - - if (value.Equals((82).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_PHOTO_REPLACED; - - if (value.Equals((83).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_LANDMARKS_CHECK_ERROR; - - if (value.Equals((84).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR; - - if (value.Equals((85).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR; - - if (value.Equals((86).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION; - - if (value.Equals((90).ToString())) - return CheckDiagnose.OVI_IR_INVISIBLE; - - if (value.Equals((91).ToString())) - return CheckDiagnose.OVI_INSUFFICIENT_AREA; - - if (value.Equals((92).ToString())) - return CheckDiagnose.OVI_COLOR_INVARIABLE; - - if (value.Equals((93).ToString())) - return CheckDiagnose.OVI_BAD_COLOR_FRONT; - - if (value.Equals((94).ToString())) - return CheckDiagnose.OVI_BAD_COLOR_SIDE; - - if (value.Equals((95).ToString())) - return CheckDiagnose.OVI_WIDE_COLOR_SPREAD; - - if (value.Equals((96).ToString())) - return CheckDiagnose.OVI_BAD_COLOR_PERCENT; - - if (value.Equals((100).ToString())) - return CheckDiagnose.HOLOGRAM_ELEMENT_ABSENT; - - if (value.Equals((101).ToString())) - return CheckDiagnose.HOLOGRAM_SIDE_TOP_IMAGES_ABSENT; - - if (value.Equals((102).ToString())) - return CheckDiagnose.HOLOGRAM_ELEMENT_PRESENT; - - if (value.Equals((103).ToString())) - return CheckDiagnose.HOLOGRAM_FRAMES_IS_ABSENT; - - if (value.Equals((104).ToString())) - return CheckDiagnose.HOLOGRAM_HOLO_FIELD_IS_ABSENT; - - if (value.Equals((110).ToString())) - return CheckDiagnose.PHOTO_PATTERN_INTERRUPTED; - - if (value.Equals((111).ToString())) - return CheckDiagnose.PHOTO_PATTERN_SHIFTED; - - if (value.Equals((112).ToString())) - return CheckDiagnose.PHOTO_PATTERN_DIFFERENT_COLORS; - - if (value.Equals((113).ToString())) - return CheckDiagnose.PHOTO_PATTERN_IR_VISIBLE; - - if (value.Equals((114).ToString())) - return CheckDiagnose.PHOTO_PATTERN_NOT_INTERSECT; - - if (value.Equals((115).ToString())) - return CheckDiagnose.PHOTO_SIZE_IS_WRONG; - - if (value.Equals((116).ToString())) - return CheckDiagnose.PHOTO_PATTERN_INVALID_COLOR; - - if (value.Equals((117).ToString())) - return CheckDiagnose.PHOTO_PATTERN_SHIFTED_VERT; - - if (value.Equals((118).ToString())) - return CheckDiagnose.PHOTO_PATTERN_PATTERN_NOT_FOUND; - - if (value.Equals((119).ToString())) - return CheckDiagnose.PHOTO_PATTERN_DIFFERENT_LINES_THICKNESS; - - if (value.Equals((120).ToString())) - return CheckDiagnose.PHOTO_IS_NOT_RECTANGLE; - - if (value.Equals((121).ToString())) - return CheckDiagnose.PHOTO_CORNERS_IS_WRONG; - - if (value.Equals((122).ToString())) - return CheckDiagnose.DOCUMENT_IS_CANCELLING; - - if (value.Equals((130).ToString())) - return CheckDiagnose.TEXT_COLOR_SHOULD_BE_BLUE; - - if (value.Equals((131).ToString())) - return CheckDiagnose.TEXT_COLOR_SHOULD_BE_GREEN; - - if (value.Equals((132).ToString())) - return CheckDiagnose.TEXT_COLOR_SHOULD_BE_RED; - - if (value.Equals((133).ToString())) - return CheckDiagnose.TEXT_SHOULD_BE_BLACK; - - if (value.Equals((140).ToString())) - return CheckDiagnose.BARCODE_WAS_READ_WITH_ERRORS; - - if (value.Equals((141).ToString())) - return CheckDiagnose.BARCODE_DATA_FORMAT_ERROR; - - if (value.Equals((142).ToString())) - return CheckDiagnose.BARCODE_SIZE_PARAMS_ERROR; - - if (value.Equals((143).ToString())) - return CheckDiagnose.NOT_ALL_BARCODES_READ; - - if (value.Equals((144).ToString())) - return CheckDiagnose.GLARES_IN_BARCODE_AREA; - - if (value.Equals((145).ToString())) - return CheckDiagnose.NO_CERTIFICATE_FOR_DIGITAL_SIGNATURE_CHECK; - - if (value.Equals((150).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_PORTRAITS_DIFFER; - - if (value.Equals((151).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NO_SERVICE_REPLY; - - if (value.Equals((152).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_SERVICE_ERROR; - - if (value.Equals((153).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NOT_ENOUGH_IMAGES; - - if (value.Equals((154).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NO_LIVE_PHOTO; - - if (value.Equals((155).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NO_SERVICE_LICENSE; - - if (value.Equals((156).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NO_PORTRAIT_DETECTED; - - if (value.Equals((160).ToString())) - return CheckDiagnose.MOBILE_IMAGES_UNSUITABLE_LIGHT_CONDITIONS; - - if (value.Equals((161).ToString())) - return CheckDiagnose.MOBILE_IMAGES_WHITE_UV_NO_DIFFERENCE; - - if (value.Equals((170).ToString())) - return CheckDiagnose.FINGERPRINTS_COMPARISON_MISMATCH; - - if (value.Equals((180).ToString())) - return CheckDiagnose.HOLO_PHOTO_FACE_NOT_DETECTED; - - if (value.Equals((181).ToString())) - return CheckDiagnose.HOLO_PHOTO_FACE_COMPARISON_FAILED; - - if (value.Equals((182).ToString())) - return CheckDiagnose.HOLO_PHOTO_GLARE_IN_CENTER_ABSENT; - - if (value.Equals((183).ToString())) - return CheckDiagnose.HOLO_PHOTO_HOLO_ELEMENT_SHAPE_ERROR; - - if (value.Equals((184).ToString())) - return CheckDiagnose.HOLO_PHOTO_ALGORITHMS_STEPS_ERROR; - - if (value.Equals((185).ToString())) - return CheckDiagnose.HOLO_PHOTO_HOLO_AREAS_NOT_LOADED; - - if (value.Equals((186).ToString())) - return CheckDiagnose.HOLO_PHOTO_FINISHED_BY_TIMEOUT; - - if (value.Equals((187).ToString())) - return CheckDiagnose.HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME; - - if (value.Equals((190).ToString())) - return CheckDiagnose.LIVENESS_DEPTH_CHECK_FAILED; - - if (value.Equals((200).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_SYMBOL_POSITION; - - if (value.Equals((201).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_BACKGROUND; - - if (value.Equals((202).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_MRZ_WIDTH; - - if (value.Equals((203).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_MRZ_HEIGHT; - - if (value.Equals((204).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_LINE_POSITION; - - if (value.Equals((205).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_FONT_TYPE; - - if (value.Equals((220).ToString())) - return CheckDiagnose.OCR_QUALITY_TEXT_POSITION; - - if (value.Equals((221).ToString())) - return CheckDiagnose.OCR_QUALITY_INVALID_FONT; - - if (value.Equals((222).ToString())) - return CheckDiagnose.OCR_QUALITY_INVALID_BACKGROUND; - - if (value.Equals((230).ToString())) - return CheckDiagnose.LASINK_INVALID_LINES_FREQUENCY; - - if (value.Equals((238).ToString())) - return CheckDiagnose.DOC_LIVENESS_DOCUMENT_NOT_LIVE; - - if (value.Equals((239).ToString())) - return CheckDiagnose.DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED; - - if (value.Equals((240).ToString())) - return CheckDiagnose.DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED; - - if (value.Equals((241).ToString())) - return CheckDiagnose.DOC_LIVENESS_INVALID_BARCODE_BACKGROUND; - - if (value.Equals((243).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_BASE32_ERROR; - - if (value.Equals((244).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_ZIPPED_ERROR; - - if (value.Equals((245).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_MESSAGE_ZONE_EMPTY; - - if (value.Equals((246).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_SIGNATURE_MUST_BE_PRESENT; - - if (value.Equals((247).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_SIGNATURE_MUST_NOT_BE_PRESENT; - - if (value.Equals((248).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT; - - if (value.Equals((250).ToString())) - return CheckDiagnose.CHD_INCORRECT_OBJECT_COLOR; - - throw new NotImplementedException($"Could not convert value to type CheckDiagnose: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static CheckDiagnose? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return CheckDiagnose.UNKNOWN; - - if (value.Equals((1).ToString())) - return CheckDiagnose.PASS; - - if (value.Equals((2).ToString())) - return CheckDiagnose.INVALID_INPUT_DATA; - - if (value.Equals((3).ToString())) - return CheckDiagnose.INTERNAL_ERROR; - - if (value.Equals((4).ToString())) - return CheckDiagnose.EXCEPTION_IN_MODULE; - - if (value.Equals((5).ToString())) - return CheckDiagnose.UNCERTAIN_VERIFICATION; - - if (value.Equals((7).ToString())) - return CheckDiagnose.NECESSARY_IMAGE_NOT_FOUND; - - if (value.Equals((8).ToString())) - return CheckDiagnose.PHOTO_SIDES_NOT_FOUND; - - if (value.Equals((10).ToString())) - return CheckDiagnose.INVALID_CHECKSUM; - - if (value.Equals((11).ToString())) - return CheckDiagnose.SYNTAX_ERROR; - - if (value.Equals((12).ToString())) - return CheckDiagnose.LOGIC_ERROR; - - if (value.Equals((13).ToString())) - return CheckDiagnose.SOURCES_COMPARISON_ERROR; - - if (value.Equals((14).ToString())) - return CheckDiagnose.FIELDS_COMPARISON_LOGIC_ERROR; - - if (value.Equals((15).ToString())) - return CheckDiagnose.INVALID_FIELD_FORMAT; - - if (value.Equals((20).ToString())) - return CheckDiagnose.TRUE_LUMINESCENCE_ERROR; - - if (value.Equals((21).ToString())) - return CheckDiagnose.FALSE_LUMINESCENCE_ERROR; - - if (value.Equals((22).ToString())) - return CheckDiagnose.FIXED_PATTERN_ERROR; - - if (value.Equals((23).ToString())) - return CheckDiagnose.LOW_CONTRAST_IN_IR_LIGHT; - - if (value.Equals((24).ToString())) - return CheckDiagnose.INCORRECT_BACKGROUND_LIGHT; - - if (value.Equals((25).ToString())) - return CheckDiagnose.BACKGROUND_COMPARISON_ERROR; - - if (value.Equals((26).ToString())) - return CheckDiagnose.INCORRECT_TEXT_COLOR; - - if (value.Equals((27).ToString())) - return CheckDiagnose.PHOTO_FALSE_LUMINESCENCE; - - if (value.Equals((28).ToString())) - return CheckDiagnose.TOO_MUCH_SHIFT; - - if (value.Equals((29).ToString())) - return CheckDiagnose.CONTACT_CHIP_TYPE_MISMATCH; - - if (value.Equals((30).ToString())) - return CheckDiagnose.FIBERS_NOT_FOUND; - - if (value.Equals((31).ToString())) - return CheckDiagnose.TOO_MANY_OBJECTS; - - if (value.Equals((33).ToString())) - return CheckDiagnose.SPECKS_IN_UV; - - if (value.Equals((34).ToString())) - return CheckDiagnose.TOO_LOW_RESOLUTION; - - if (value.Equals((40).ToString())) - return CheckDiagnose.INVISIBLE_ELEMENT_PRESENT; - - if (value.Equals((41).ToString())) - return CheckDiagnose.VISIBLE_ELEMENT_ABSENT; - - if (value.Equals((42).ToString())) - return CheckDiagnose.ELEMENT_SHOULD_BE_COLORED; - - if (value.Equals((43).ToString())) - return CheckDiagnose.ELEMENT_SHOULD_BE_GRAYSCALE; - - if (value.Equals((44).ToString())) - return CheckDiagnose.PHOTO_WHITE_IR_DONT_MATCH; - - if (value.Equals((50).ToString())) - return CheckDiagnose.UV_DULL_PAPER_MRZ; - - if (value.Equals((51).ToString())) - return CheckDiagnose.FALSE_LUMINESCENCE_IN_MRZ; - - if (value.Equals((52).ToString())) - return CheckDiagnose.UV_DULL_PAPER_PHOTO; - - if (value.Equals((53).ToString())) - return CheckDiagnose.UV_DULL_PAPER_BLANK; - - if (value.Equals((54).ToString())) - return CheckDiagnose.UV_DULL_PAPER_ERROR; - - if (value.Equals((55).ToString())) - return CheckDiagnose.FALSE_LUMINESCENCE_IN_BLANK; - - if (value.Equals((60).ToString())) - return CheckDiagnose.BAD_AREA_IN_AXIAL; - - if (value.Equals((65).ToString())) - return CheckDiagnose.FALSE_IPI_PARAMETERS; - - if (value.Equals((66).ToString())) - return CheckDiagnose.ENCRYPTED_IPI_NOT_FOUND; - - if (value.Equals((67).ToString())) - return CheckDiagnose.ENCRYPTED_IPI_DATA_DONT_MATCH; - - if (value.Equals((80).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_HIGHLIGHT_IR; - - if (value.Equals((81).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_GLARES_IN_PHOTO_AREA; - - if (value.Equals((82).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_PHOTO_REPLACED; - - if (value.Equals((83).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_LANDMARKS_CHECK_ERROR; - - if (value.Equals((84).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR; - - if (value.Equals((85).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR; - - if (value.Equals((86).ToString())) - return CheckDiagnose.FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION; - - if (value.Equals((90).ToString())) - return CheckDiagnose.OVI_IR_INVISIBLE; - - if (value.Equals((91).ToString())) - return CheckDiagnose.OVI_INSUFFICIENT_AREA; - - if (value.Equals((92).ToString())) - return CheckDiagnose.OVI_COLOR_INVARIABLE; - - if (value.Equals((93).ToString())) - return CheckDiagnose.OVI_BAD_COLOR_FRONT; - - if (value.Equals((94).ToString())) - return CheckDiagnose.OVI_BAD_COLOR_SIDE; - - if (value.Equals((95).ToString())) - return CheckDiagnose.OVI_WIDE_COLOR_SPREAD; - - if (value.Equals((96).ToString())) - return CheckDiagnose.OVI_BAD_COLOR_PERCENT; - - if (value.Equals((100).ToString())) - return CheckDiagnose.HOLOGRAM_ELEMENT_ABSENT; - - if (value.Equals((101).ToString())) - return CheckDiagnose.HOLOGRAM_SIDE_TOP_IMAGES_ABSENT; - - if (value.Equals((102).ToString())) - return CheckDiagnose.HOLOGRAM_ELEMENT_PRESENT; - - if (value.Equals((103).ToString())) - return CheckDiagnose.HOLOGRAM_FRAMES_IS_ABSENT; - - if (value.Equals((104).ToString())) - return CheckDiagnose.HOLOGRAM_HOLO_FIELD_IS_ABSENT; - - if (value.Equals((110).ToString())) - return CheckDiagnose.PHOTO_PATTERN_INTERRUPTED; - - if (value.Equals((111).ToString())) - return CheckDiagnose.PHOTO_PATTERN_SHIFTED; - - if (value.Equals((112).ToString())) - return CheckDiagnose.PHOTO_PATTERN_DIFFERENT_COLORS; - - if (value.Equals((113).ToString())) - return CheckDiagnose.PHOTO_PATTERN_IR_VISIBLE; - - if (value.Equals((114).ToString())) - return CheckDiagnose.PHOTO_PATTERN_NOT_INTERSECT; - - if (value.Equals((115).ToString())) - return CheckDiagnose.PHOTO_SIZE_IS_WRONG; - - if (value.Equals((116).ToString())) - return CheckDiagnose.PHOTO_PATTERN_INVALID_COLOR; - - if (value.Equals((117).ToString())) - return CheckDiagnose.PHOTO_PATTERN_SHIFTED_VERT; - - if (value.Equals((118).ToString())) - return CheckDiagnose.PHOTO_PATTERN_PATTERN_NOT_FOUND; - - if (value.Equals((119).ToString())) - return CheckDiagnose.PHOTO_PATTERN_DIFFERENT_LINES_THICKNESS; - - if (value.Equals((120).ToString())) - return CheckDiagnose.PHOTO_IS_NOT_RECTANGLE; - - if (value.Equals((121).ToString())) - return CheckDiagnose.PHOTO_CORNERS_IS_WRONG; - - if (value.Equals((122).ToString())) - return CheckDiagnose.DOCUMENT_IS_CANCELLING; - - if (value.Equals((130).ToString())) - return CheckDiagnose.TEXT_COLOR_SHOULD_BE_BLUE; - - if (value.Equals((131).ToString())) - return CheckDiagnose.TEXT_COLOR_SHOULD_BE_GREEN; - - if (value.Equals((132).ToString())) - return CheckDiagnose.TEXT_COLOR_SHOULD_BE_RED; - - if (value.Equals((133).ToString())) - return CheckDiagnose.TEXT_SHOULD_BE_BLACK; - - if (value.Equals((140).ToString())) - return CheckDiagnose.BARCODE_WAS_READ_WITH_ERRORS; - - if (value.Equals((141).ToString())) - return CheckDiagnose.BARCODE_DATA_FORMAT_ERROR; - - if (value.Equals((142).ToString())) - return CheckDiagnose.BARCODE_SIZE_PARAMS_ERROR; - - if (value.Equals((143).ToString())) - return CheckDiagnose.NOT_ALL_BARCODES_READ; - - if (value.Equals((144).ToString())) - return CheckDiagnose.GLARES_IN_BARCODE_AREA; - - if (value.Equals((145).ToString())) - return CheckDiagnose.NO_CERTIFICATE_FOR_DIGITAL_SIGNATURE_CHECK; - - if (value.Equals((150).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_PORTRAITS_DIFFER; - - if (value.Equals((151).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NO_SERVICE_REPLY; - - if (value.Equals((152).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_SERVICE_ERROR; - - if (value.Equals((153).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NOT_ENOUGH_IMAGES; - - if (value.Equals((154).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NO_LIVE_PHOTO; - - if (value.Equals((155).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NO_SERVICE_LICENSE; - - if (value.Equals((156).ToString())) - return CheckDiagnose.PORTRAIT_COMPARISON_NO_PORTRAIT_DETECTED; - - if (value.Equals((160).ToString())) - return CheckDiagnose.MOBILE_IMAGES_UNSUITABLE_LIGHT_CONDITIONS; - - if (value.Equals((161).ToString())) - return CheckDiagnose.MOBILE_IMAGES_WHITE_UV_NO_DIFFERENCE; - - if (value.Equals((170).ToString())) - return CheckDiagnose.FINGERPRINTS_COMPARISON_MISMATCH; - - if (value.Equals((180).ToString())) - return CheckDiagnose.HOLO_PHOTO_FACE_NOT_DETECTED; - - if (value.Equals((181).ToString())) - return CheckDiagnose.HOLO_PHOTO_FACE_COMPARISON_FAILED; - - if (value.Equals((182).ToString())) - return CheckDiagnose.HOLO_PHOTO_GLARE_IN_CENTER_ABSENT; - - if (value.Equals((183).ToString())) - return CheckDiagnose.HOLO_PHOTO_HOLO_ELEMENT_SHAPE_ERROR; - - if (value.Equals((184).ToString())) - return CheckDiagnose.HOLO_PHOTO_ALGORITHMS_STEPS_ERROR; - - if (value.Equals((185).ToString())) - return CheckDiagnose.HOLO_PHOTO_HOLO_AREAS_NOT_LOADED; - - if (value.Equals((186).ToString())) - return CheckDiagnose.HOLO_PHOTO_FINISHED_BY_TIMEOUT; - - if (value.Equals((187).ToString())) - return CheckDiagnose.HOLO_PHOTO_DOCUMENT_OUTSIDE_FRAME; - - if (value.Equals((190).ToString())) - return CheckDiagnose.LIVENESS_DEPTH_CHECK_FAILED; - - if (value.Equals((200).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_SYMBOL_POSITION; - - if (value.Equals((201).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_BACKGROUND; - - if (value.Equals((202).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_MRZ_WIDTH; - - if (value.Equals((203).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_MRZ_HEIGHT; - - if (value.Equals((204).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_LINE_POSITION; - - if (value.Equals((205).ToString())) - return CheckDiagnose.MRZ_QUALITY_WRONG_FONT_TYPE; - - if (value.Equals((220).ToString())) - return CheckDiagnose.OCR_QUALITY_TEXT_POSITION; - - if (value.Equals((221).ToString())) - return CheckDiagnose.OCR_QUALITY_INVALID_FONT; - - if (value.Equals((222).ToString())) - return CheckDiagnose.OCR_QUALITY_INVALID_BACKGROUND; - - if (value.Equals((230).ToString())) - return CheckDiagnose.LASINK_INVALID_LINES_FREQUENCY; - - if (value.Equals((238).ToString())) - return CheckDiagnose.DOC_LIVENESS_DOCUMENT_NOT_LIVE; - - if (value.Equals((239).ToString())) - return CheckDiagnose.DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED; - - if (value.Equals((240).ToString())) - return CheckDiagnose.DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED; - - if (value.Equals((241).ToString())) - return CheckDiagnose.DOC_LIVENESS_INVALID_BARCODE_BACKGROUND; - - if (value.Equals((243).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_BASE32_ERROR; - - if (value.Equals((244).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_ZIPPED_ERROR; - - if (value.Equals((245).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_MESSAGE_ZONE_EMPTY; - - if (value.Equals((246).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_SIGNATURE_MUST_BE_PRESENT; - - if (value.Equals((247).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_SIGNATURE_MUST_NOT_BE_PRESENT; - - if (value.Equals((248).ToString())) - return CheckDiagnose.CHD_ICAO_IDB_CERTIFICATE_MUST_NOT_BE_PRESENT; - - if (value.Equals((250).ToString())) - return CheckDiagnose.CHD_INCORRECT_OBJECT_COLOR; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(CheckDiagnose value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class CheckDiagnoseJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override CheckDiagnose Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - CheckDiagnose? result = rawValue == null - ? null - : CheckDiagnoseValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the CheckDiagnose to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, CheckDiagnose checkDiagnose, JsonSerializerOptions options) - { - writer.WriteStringValue(checkDiagnose.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class CheckDiagnoseNullableJsonConverter : JsonConverter - { - /// - /// Returns a CheckDiagnose from the Json object - /// - /// - /// - /// - /// - public override CheckDiagnose? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - CheckDiagnose? result = rawValue == null - ? null - : CheckDiagnoseValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, CheckDiagnose? checkDiagnose, JsonSerializerOptions options) - { - writer.WriteStringValue(checkDiagnose?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs index b1c91c2..897c987 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CheckResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -47,135 +48,4 @@ public enum CheckResult WAS_NOT_DONE = 2 } - /// - /// Converts to and from the JSON value - /// - public static class CheckResultValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static CheckResult FromString(string value) - { - if (value.Equals((0).ToString())) - return CheckResult.ERROR; - - if (value.Equals((1).ToString())) - return CheckResult.OK; - - if (value.Equals((2).ToString())) - return CheckResult.WAS_NOT_DONE; - - throw new NotImplementedException($"Could not convert value to type CheckResult: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static CheckResult? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return CheckResult.ERROR; - - if (value.Equals((1).ToString())) - return CheckResult.OK; - - if (value.Equals((2).ToString())) - return CheckResult.WAS_NOT_DONE; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(CheckResult value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class CheckResultJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override CheckResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - CheckResult? result = rawValue == null - ? null - : CheckResultValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the CheckResult to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, CheckResult checkResult, JsonSerializerOptions options) - { - writer.WriteStringValue(checkResult.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class CheckResultNullableJsonConverter : JsonConverter - { - /// - /// Returns a CheckResult from the Json object - /// - /// - /// - /// - /// - public override CheckResult? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - CheckResult? result = rawValue == null - ? null - : CheckResultValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, CheckResult? checkResult, JsonSerializerOptions options) - { - writer.WriteStringValue(checkResult?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs index e541296..409e8e0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,143 +14,153 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains information about one document type candidate /// + [DataContract(Name = "ChosenDocumentType")] public partial class ChosenDocumentType : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// Document name - /// Unique document type template identifier (Regula's internal numeric code) - /// A measure of the likelihood of correct recognition in the analysis of this type of document - /// true if the document of the given type is rotated by 180 degrees - /// rFIDPresence - /// fDSIDList - /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document - /// Set of authentication options provided for this type of document (combination of Authenticity enum) - /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme - /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity - /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme - /// rotationAngle - [JsonConstructor] - public ChosenDocumentType(string documentName, int iD, decimal p, int rotated180, RfidLocation rFIDPresence, FDSIDList fDSIDList, int necessaryLights, int checkAuthenticity, int uVExp, int authenticityNecessaryLights, decimal oVIExp, Option rotationAngle = default) - { - DocumentName = documentName; - ID = iD; - P = p; - Rotated180 = rotated180; - RFIDPresence = rFIDPresence; - FDSIDList = fDSIDList; - NecessaryLights = necessaryLights; - CheckAuthenticity = checkAuthenticity; - UVExp = uVExp; - AuthenticityNecessaryLights = authenticityNecessaryLights; - OVIExp = oVIExp; - RotationAngleOption = rotationAngle; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets RFIDPresence /// - [JsonPropertyName("RFID_Presence")] + [DataMember(Name = "RFID_Presence", IsRequired = true, EmitDefaultValue = true)] public RfidLocation RFIDPresence { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ChosenDocumentType() { } + /// + /// Initializes a new instance of the class. + /// + /// Document name (required). + /// Unique document type template identifier (Regula's internal numeric code) (required). + /// A measure of the likelihood of correct recognition in the analysis of this type of document (required). + /// true if the document of the given type is rotated by 180 degrees (required). + /// rFIDPresence (required). + /// fDSIDList (required). + /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document (required). + /// Set of authentication options provided for this type of document (combination of Authenticity enum) (required). + /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme (required). + /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity (required). + /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme (required). + /// rotationAngle. + public ChosenDocumentType(string documentName = default(string), int iD = default(int), decimal p = default(decimal), int rotated180 = default(int), RfidLocation rFIDPresence = default(RfidLocation), FDSIDList fDSIDList = default(FDSIDList), int necessaryLights = default(int), int checkAuthenticity = default(int), int uVExp = default(int), int authenticityNecessaryLights = default(int), decimal oVIExp = default(decimal), int rotationAngle = default(int)) + { + // to ensure "documentName" is required (not null) + if (documentName == null) + { + throw new ArgumentNullException("documentName is a required property for ChosenDocumentType and cannot be null"); + } + this.DocumentName = documentName; + this.ID = iD; + this.P = p; + this.Rotated180 = rotated180; + this.RFIDPresence = rFIDPresence; + // to ensure "fDSIDList" is required (not null) + if (fDSIDList == null) + { + throw new ArgumentNullException("fDSIDList is a required property for ChosenDocumentType and cannot be null"); + } + this.FDSIDList = fDSIDList; + this.NecessaryLights = necessaryLights; + this.CheckAuthenticity = checkAuthenticity; + this.UVExp = uVExp; + this.AuthenticityNecessaryLights = authenticityNecessaryLights; + this.OVIExp = oVIExp; + this.RotationAngle = rotationAngle; + } /// /// Document name /// /// Document name - [JsonPropertyName("DocumentName")] + [DataMember(Name = "DocumentName", IsRequired = true, EmitDefaultValue = true)] public string DocumentName { get; set; } /// /// Unique document type template identifier (Regula's internal numeric code) /// /// Unique document type template identifier (Regula's internal numeric code) - [JsonPropertyName("ID")] + [DataMember(Name = "ID", IsRequired = true, EmitDefaultValue = true)] public int ID { get; set; } /// /// A measure of the likelihood of correct recognition in the analysis of this type of document /// /// A measure of the likelihood of correct recognition in the analysis of this type of document - /* 0.9913095831871032 */ - [JsonPropertyName("P")] + /* + 0.9913095831871032 + */ + [DataMember(Name = "P", IsRequired = true, EmitDefaultValue = true)] public decimal P { get; set; } /// /// true if the document of the given type is rotated by 180 degrees /// /// true if the document of the given type is rotated by 180 degrees - [JsonPropertyName("Rotated180")] + [DataMember(Name = "Rotated180", IsRequired = true, EmitDefaultValue = true)] public int Rotated180 { get; set; } /// /// Gets or Sets FDSIDList /// - [JsonPropertyName("FDSIDList")] + [DataMember(Name = "FDSIDList", IsRequired = true, EmitDefaultValue = true)] public FDSIDList FDSIDList { get; set; } /// /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document /// /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document - [JsonPropertyName("NecessaryLights")] + [DataMember(Name = "NecessaryLights", IsRequired = true, EmitDefaultValue = true)] public int NecessaryLights { get; set; } /// /// Set of authentication options provided for this type of document (combination of Authenticity enum) /// /// Set of authentication options provided for this type of document (combination of Authenticity enum) - [JsonPropertyName("CheckAuthenticity")] + [DataMember(Name = "CheckAuthenticity", IsRequired = true, EmitDefaultValue = true)] public int CheckAuthenticity { get; set; } /// /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme /// /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme - [JsonPropertyName("UVExp")] + [DataMember(Name = "UVExp", IsRequired = true, EmitDefaultValue = true)] public int UVExp { get; set; } /// /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity /// /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity - [JsonPropertyName("AuthenticityNecessaryLights")] + [DataMember(Name = "AuthenticityNecessaryLights", IsRequired = true, EmitDefaultValue = true)] public int AuthenticityNecessaryLights { get; set; } /// /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme /// /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme - [JsonPropertyName("OVIExp")] + [DataMember(Name = "OVIExp", IsRequired = true, EmitDefaultValue = true)] public decimal OVIExp { get; set; } - /// - /// Used to track the state of RotationAngle - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RotationAngleOption { get; private set; } - /// /// Gets or Sets RotationAngle /// - [JsonPropertyName("RotationAngle")] - public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new(value); } } + [DataMember(Name = "RotationAngle", EmitDefaultValue = false)] + public int RotationAngle { get; set; } /// /// Returns the string presentation of the object @@ -178,6 +186,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -201,237 +218,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ChosenDocumentTypeJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ChosenDocumentType Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option documentName = default; - Option iD = default; - Option p = default; - Option rotated180 = default; - Option rFIDPresence = default; - Option fDSIDList = default; - Option necessaryLights = default; - Option checkAuthenticity = default; - Option uVExp = default; - Option authenticityNecessaryLights = default; - Option oVIExp = default; - Option rotationAngle = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocumentName": - documentName = new Option(utf8JsonReader.GetString()!); - break; - case "ID": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - iD = new Option(utf8JsonReader.GetInt32()); - break; - case "P": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - p = new Option(utf8JsonReader.GetDecimal()); - break; - case "Rotated180": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rotated180 = new Option(utf8JsonReader.GetInt32()); - break; - case "RFID_Presence": - string? rFIDPresenceRawValue = utf8JsonReader.GetString(); - if (rFIDPresenceRawValue != null) - rFIDPresence = new Option(RfidLocationValueConverter.FromStringOrDefault(rFIDPresenceRawValue)); - break; - case "FDSIDList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fDSIDList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "NecessaryLights": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - necessaryLights = new Option(utf8JsonReader.GetInt32()); - break; - case "CheckAuthenticity": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkAuthenticity = new Option(utf8JsonReader.GetInt32()); - break; - case "UVExp": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - uVExp = new Option(utf8JsonReader.GetInt32()); - break; - case "AuthenticityNecessaryLights": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - authenticityNecessaryLights = new Option(utf8JsonReader.GetInt32()); - break; - case "OVIExp": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - oVIExp = new Option(utf8JsonReader.GetDecimal()); - break; - case "RotationAngle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rotationAngle = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!documentName.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(documentName)); - - if (!iD.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(iD)); - - if (!p.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(p)); - - if (!rotated180.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(rotated180)); - - if (!rFIDPresence.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(rFIDPresence)); - - if (!fDSIDList.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(fDSIDList)); - - if (!necessaryLights.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(necessaryLights)); - - if (!checkAuthenticity.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(checkAuthenticity)); - - if (!uVExp.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(uVExp)); - - if (!authenticityNecessaryLights.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(authenticityNecessaryLights)); - - if (!oVIExp.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentType.", nameof(oVIExp)); - - if (documentName.IsSet && documentName.Value == null) - throw new ArgumentNullException(nameof(documentName), "Property is not nullable for class ChosenDocumentType."); - - if (iD.IsSet && iD.Value == null) - throw new ArgumentNullException(nameof(iD), "Property is not nullable for class ChosenDocumentType."); - - if (p.IsSet && p.Value == null) - throw new ArgumentNullException(nameof(p), "Property is not nullable for class ChosenDocumentType."); - - if (rotated180.IsSet && rotated180.Value == null) - throw new ArgumentNullException(nameof(rotated180), "Property is not nullable for class ChosenDocumentType."); - - if (rFIDPresence.IsSet && rFIDPresence.Value == null) - throw new ArgumentNullException(nameof(rFIDPresence), "Property is not nullable for class ChosenDocumentType."); - - if (fDSIDList.IsSet && fDSIDList.Value == null) - throw new ArgumentNullException(nameof(fDSIDList), "Property is not nullable for class ChosenDocumentType."); - - if (necessaryLights.IsSet && necessaryLights.Value == null) - throw new ArgumentNullException(nameof(necessaryLights), "Property is not nullable for class ChosenDocumentType."); - - if (checkAuthenticity.IsSet && checkAuthenticity.Value == null) - throw new ArgumentNullException(nameof(checkAuthenticity), "Property is not nullable for class ChosenDocumentType."); - - if (uVExp.IsSet && uVExp.Value == null) - throw new ArgumentNullException(nameof(uVExp), "Property is not nullable for class ChosenDocumentType."); - - if (authenticityNecessaryLights.IsSet && authenticityNecessaryLights.Value == null) - throw new ArgumentNullException(nameof(authenticityNecessaryLights), "Property is not nullable for class ChosenDocumentType."); - - if (oVIExp.IsSet && oVIExp.Value == null) - throw new ArgumentNullException(nameof(oVIExp), "Property is not nullable for class ChosenDocumentType."); - - if (rotationAngle.IsSet && rotationAngle.Value == null) - throw new ArgumentNullException(nameof(rotationAngle), "Property is not nullable for class ChosenDocumentType."); - - return new ChosenDocumentType(documentName.Value!, iD.Value!.Value!, p.Value!.Value!, rotated180.Value!.Value!, rFIDPresence.Value!.Value!, fDSIDList.Value!, necessaryLights.Value!.Value!, checkAuthenticity.Value!.Value!, uVExp.Value!.Value!, authenticityNecessaryLights.Value!.Value!, oVIExp.Value!.Value!, rotationAngle); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ChosenDocumentType chosenDocumentType, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, chosenDocumentType, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ChosenDocumentType chosenDocumentType, JsonSerializerOptions jsonSerializerOptions) - { - if (chosenDocumentType.DocumentName == null) - throw new ArgumentNullException(nameof(chosenDocumentType.DocumentName), "Property is required for class ChosenDocumentType."); - - if (chosenDocumentType.FDSIDList == null) - throw new ArgumentNullException(nameof(chosenDocumentType.FDSIDList), "Property is required for class ChosenDocumentType."); - - writer.WriteString("DocumentName", chosenDocumentType.DocumentName); - - writer.WriteNumber("ID", chosenDocumentType.ID); - - writer.WriteNumber("P", chosenDocumentType.P); - - writer.WriteNumber("Rotated180", chosenDocumentType.Rotated180); - - var rFIDPresenceRawValue = RfidLocationValueConverter.ToJsonValue(chosenDocumentType.RFIDPresence); - writer.WriteNumber("RFID_Presence", rFIDPresenceRawValue); - - writer.WritePropertyName("FDSIDList"); - JsonSerializer.Serialize(writer, chosenDocumentType.FDSIDList, jsonSerializerOptions); - writer.WriteNumber("NecessaryLights", chosenDocumentType.NecessaryLights); - - writer.WriteNumber("CheckAuthenticity", chosenDocumentType.CheckAuthenticity); - - writer.WriteNumber("UVExp", chosenDocumentType.UVExp); - - writer.WriteNumber("AuthenticityNecessaryLights", chosenDocumentType.AuthenticityNecessaryLights); - - writer.WriteNumber("OVIExp", chosenDocumentType.OVIExp); - - if (chosenDocumentType.RotationAngleOption.IsSet) - writer.WriteNumber("RotationAngle", chosenDocumentType.RotationAngleOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs index 0fa4833..b8a3322 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,58 +14,69 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains information about the type of document that was determined based on the analysis of the provided image /// + [DataContract(Name = "ChosenDocumentTypeResult")] public partial class ChosenDocumentTypeResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// oneCandidate - /// bufLength - /// light - /// listIdx - /// pageIdx - /// xMLBuffer - [JsonConstructor] - public ChosenDocumentTypeResult(OneCandidate oneCandidate, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default, Option xMLBuffer = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected ChosenDocumentTypeResult() { } + /// + /// Initializes a new instance of the class. + /// + /// oneCandidate (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public ChosenDocumentTypeResult(OneCandidate oneCandidate = default(OneCandidate), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - OneCandidate = oneCandidate; - XMLBufferOption = xMLBuffer; - OnCreated(); + // to ensure "oneCandidate" is required (not null) + if (oneCandidate == null) + { + throw new ArgumentNullException("oneCandidate is a required property for ChosenDocumentTypeResult and cannot be null"); + } + this.OneCandidate = oneCandidate; } - partial void OnCreated(); - /// /// Gets or Sets OneCandidate /// - [JsonPropertyName("OneCandidate")] + [DataMember(Name = "OneCandidate", IsRequired = true, EmitDefaultValue = true)] public OneCandidate OneCandidate { get; set; } /// - /// Used to track the state of XMLBuffer + /// Gets or Sets XMLBuffer /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option XMLBufferOption { get; } + [DataMember(Name = "XML_buffer", EmitDefaultValue = false)] + public string XMLBuffer { get; private set; } /// - /// Gets or Sets XMLBuffer + /// Returns false as XMLBuffer should not be serialized given that it's read-only. /// - [JsonPropertyName("XML_buffer")] - public string? XMLBuffer { get { return this.XMLBufferOption; } } - + /// false (boolean) + public bool ShouldSerializeXMLBuffer() + { + return false; + } /// /// Returns the string presentation of the object /// @@ -76,170 +85,45 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ChosenDocumentTypeResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" OneCandidate: ").Append(OneCandidate).Append("\n"); sb.Append(" XMLBuffer: ").Append(XMLBuffer).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class ChosenDocumentTypeResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override ChosenDocumentTypeResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option oneCandidate = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - Option xMLBuffer = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "OneCandidate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - oneCandidate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - case "XML_buffer": - xMLBuffer = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!oneCandidate.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentTypeResult.", nameof(oneCandidate)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class ChosenDocumentTypeResult.", nameof(resultType)); - - if (oneCandidate.IsSet && oneCandidate.Value == null) - throw new ArgumentNullException(nameof(oneCandidate), "Property is not nullable for class ChosenDocumentTypeResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ChosenDocumentTypeResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class ChosenDocumentTypeResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ChosenDocumentTypeResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ChosenDocumentTypeResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ChosenDocumentTypeResult."); - - if (xMLBuffer.IsSet && xMLBuffer.Value == null) - throw new ArgumentNullException(nameof(xMLBuffer), "Property is not nullable for class ChosenDocumentTypeResult."); - - return new ChosenDocumentTypeResult(oneCandidate.Value!, bufLength, light, listIdx, pageIdx, xMLBuffer); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ChosenDocumentTypeResult chosenDocumentTypeResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, chosenDocumentTypeResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ChosenDocumentTypeResult chosenDocumentTypeResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (chosenDocumentTypeResult.OneCandidate == null) - throw new ArgumentNullException(nameof(chosenDocumentTypeResult.OneCandidate), "Property is required for class ChosenDocumentTypeResult."); - - if (chosenDocumentTypeResult.XMLBufferOption.IsSet && chosenDocumentTypeResult.XMLBuffer == null) - throw new ArgumentNullException(nameof(chosenDocumentTypeResult.XMLBuffer), "Property is required for class ChosenDocumentTypeResult."); - - writer.WritePropertyName("OneCandidate"); - JsonSerializer.Serialize(writer, chosenDocumentTypeResult.OneCandidate, jsonSerializerOptions); - if (chosenDocumentTypeResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", chosenDocumentTypeResult.BufLengthOption.Value!.Value); - - if (chosenDocumentTypeResult.LightOption.IsSet) - writer.WriteNumber("light", chosenDocumentTypeResult.LightOption.Value!.Value); - - if (chosenDocumentTypeResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", chosenDocumentTypeResult.ListIdxOption.Value!.Value); - - if (chosenDocumentTypeResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", chosenDocumentTypeResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", chosenDocumentTypeResult.ResultType); - - if (chosenDocumentTypeResult.XMLBufferOption.IsSet) - writer.WriteString("XML_buffer", chosenDocumentTypeResult.XMLBuffer); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs index 45add25..514ead6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,54 +14,57 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// List with various objects, containing processing results /// + [DataContract(Name = "ContainerList")] public partial class ContainerList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// list - /// Length of list (Count for items) - [JsonConstructor] - public ContainerList(List list, Option count = default) - { - List = list; - CountOption = count; - OnCreated(); - } - - partial void OnCreated(); - + [JsonConstructorAttribute] + protected ContainerList() { } /// - /// Gets or Sets List + /// Initializes a new instance of the class. /// - [JsonPropertyName("List")] - public List List { get; set; } + /// Length of list (Count for items). + /// list (required). + public ContainerList(int count = default(int), List list = default(List)) + { + // to ensure "list" is required (not null) + if (list == null) + { + throw new ArgumentNullException("list is a required property for ContainerList and cannot be null"); + } + this.List = list; + this.Count = count; + } /// - /// Used to track the state of Count + /// Length of list (Count for items) /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CountOption { get; private set; } + /// Length of list (Count for items) + [DataMember(Name = "Count", EmitDefaultValue = false)] + public int Count { get; set; } /// - /// Length of list (Count for items) + /// Gets or Sets List /// - /// Length of list (Count for items) - [JsonPropertyName("Count")] - public int? Count { get { return this.CountOption; } set { this.CountOption = new(value); } } + [DataMember(Name = "List", IsRequired = true, EmitDefaultValue = true)] + public List List { get; set; } /// /// Returns the string presentation of the object @@ -73,12 +74,21 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ContainerList {\n"); - sb.Append(" List: ").Append(List).Append("\n"); sb.Append(" Count: ").Append(Count).Append("\n"); + sb.Append(" List: ").Append(List).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -90,103 +100,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ContainerListJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ContainerList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> list = default; - Option count = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!list.IsSet) - throw new ArgumentException("Property is required for class ContainerList.", nameof(list)); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class ContainerList."); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class ContainerList."); - - return new ContainerList(list.Value!, count); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ContainerList containerList, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, containerList, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ContainerList containerList, JsonSerializerOptions jsonSerializerOptions) - { - if (containerList.List == null) - throw new ArgumentNullException(nameof(containerList.List), "Property is required for class ContainerList."); - - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, containerList.List, jsonSerializerOptions); - if (containerList.CountOption.IsSet) - writer.WriteNumber("Count", containerList.CountOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs index 3e8cdc8..6c59af3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerListListInner.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,366 +14,645 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; +using System.Reflection; namespace Regula.DocumentReader.WebClient.Model { /// /// ContainerListListInner /// - public partial class ContainerListListInner : IValidatableObject + [JsonConverter(typeof(ContainerListListInnerJsonConverter))] + [DataContract(Name = "ContainerList_List_inner")] + public partial class ContainerListListInner : AbstractOpenAPISchema, IValidatableObject { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(StatusResult statusResult) + /// An instance of StatusResult. + public ContainerListListInner(StatusResult actualInstance) { - StatusResult = statusResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(TextResult textResult) + /// An instance of TextResult. + public ContainerListListInner(TextResult actualInstance) { - TextResult = textResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(DocumentImageResult documentImageResult) + /// An instance of DocumentImageResult. + public ContainerListListInner(DocumentImageResult actualInstance) { - DocumentImageResult = documentImageResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(ImagesResult imagesResult) + /// An instance of ImagesResult. + public ContainerListListInner(ImagesResult actualInstance) { - ImagesResult = imagesResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(ChosenDocumentTypeResult chosenDocumentTypeResult) + /// An instance of ChosenDocumentTypeResult. + public ContainerListListInner(ChosenDocumentTypeResult actualInstance) { - ChosenDocumentTypeResult = chosenDocumentTypeResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(DocumentTypesCandidatesResult documentTypesCandidatesResult) + /// An instance of DocumentTypesCandidatesResult. + public ContainerListListInner(DocumentTypesCandidatesResult actualInstance) { - DocumentTypesCandidatesResult = documentTypesCandidatesResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(TextDataResult textDataResult) + /// An instance of TextDataResult. + public ContainerListListInner(TextDataResult actualInstance) { - TextDataResult = textDataResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(GraphicsResult graphicsResult) + /// An instance of GraphicsResult. + public ContainerListListInner(GraphicsResult actualInstance) { - GraphicsResult = graphicsResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(LexicalAnalysisResult lexicalAnalysisResult) + /// An instance of LexicalAnalysisResult. + public ContainerListListInner(LexicalAnalysisResult actualInstance) { - LexicalAnalysisResult = lexicalAnalysisResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(AuthenticityResult authenticityResult) + /// An instance of AuthenticityResult. + public ContainerListListInner(AuthenticityResult actualInstance) { - AuthenticityResult = authenticityResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(ImageQualityResult imageQualityResult) + /// An instance of ImageQualityResult. + public ContainerListListInner(ImageQualityResult actualInstance) { - ImageQualityResult = imageQualityResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(DocumentPositionResult documentPositionResult) + /// An instance of DocumentPositionResult. + public ContainerListListInner(DocumentPositionResult actualInstance) { - DocumentPositionResult = documentPositionResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(DocBarCodeInfo docBarCodeInfo) + /// An instance of DocBarCodeInfo. + public ContainerListListInner(DocBarCodeInfo actualInstance) { - DocBarCodeInfo = docBarCodeInfo; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(LicenseResult licenseResult) + /// An instance of LicenseResult. + public ContainerListListInner(LicenseResult actualInstance) { - LicenseResult = licenseResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(EncryptedRCLResult encryptedRCLResult) + /// An instance of EncryptedRCLResult. + public ContainerListListInner(EncryptedRCLResult actualInstance) { - EncryptedRCLResult = encryptedRCLResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(DocumentBinaryInfoResult documentBinaryInfoResult) + /// An instance of DocumentBinaryInfoResult. + public ContainerListListInner(DocumentBinaryInfoResult actualInstance) { - DocumentBinaryInfoResult = documentBinaryInfoResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(ByteArrayResult byteArrayResult) + /// An instance of ByteArrayResult. + public ContainerListListInner(ByteArrayResult actualInstance) { - ByteArrayResult = byteArrayResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(FaceDetectionResult faceDetectionResult) + /// An instance of FaceDetectionResult. + public ContainerListListInner(FaceDetectionResult actualInstance) { - FaceDetectionResult = faceDetectionResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(MRZDetectorResult mRZDetectorResult) + /// An instance of MRZDetectorResult. + public ContainerListListInner(MRZDetectorResult actualInstance) { - MRZDetectorResult = mRZDetectorResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(MRZPositionResult mRZPositionResult) + /// An instance of MRZPositionResult. + public ContainerListListInner(MRZPositionResult actualInstance) { - MRZPositionResult = mRZPositionResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(MRZTestQualityResult mRZTestQualityResult) + /// An instance of MRZTestQualityResult. + public ContainerListListInner(MRZTestQualityResult actualInstance) { - MRZTestQualityResult = mRZTestQualityResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(RFIDGraphicsInfoResult rFIDGraphicsInfoResult) + /// An instance of RFIDGraphicsInfoResult. + public ContainerListListInner(RFIDGraphicsInfoResult actualInstance) { - RFIDGraphicsInfoResult = rFIDGraphicsInfoResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with the class /// - /// - public ContainerListListInner(RFIDTextDataResult rFIDTextDataResult) + /// An instance of RFIDTextDataResult. + public ContainerListListInner(RFIDTextDataResult actualInstance) { - RFIDTextDataResult = rFIDTextDataResult; - OnCreated(); + this.IsNullable = false; + this.SchemaType= "oneOf"; + this.ActualInstance = actualInstance ?? throw new ArgumentException("Invalid instance found. Must not be null."); } - partial void OnCreated(); + + private Object _actualInstance; /// - /// Gets or Sets StatusResult + /// Gets or Sets ActualInstance /// - public StatusResult? StatusResult { get; set; } + public override Object ActualInstance + { + get + { + return _actualInstance; + } + set + { + if (value.GetType() == typeof(AuthenticityResult) || value is AuthenticityResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ByteArrayResult) || value is ByteArrayResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ChosenDocumentTypeResult) || value is ChosenDocumentTypeResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DocBarCodeInfo) || value is DocBarCodeInfo) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DocumentBinaryInfoResult) || value is DocumentBinaryInfoResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DocumentImageResult) || value is DocumentImageResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DocumentPositionResult) || value is DocumentPositionResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(DocumentTypesCandidatesResult) || value is DocumentTypesCandidatesResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(EncryptedRCLResult) || value is EncryptedRCLResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(FaceDetectionResult) || value is FaceDetectionResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(GraphicsResult) || value is GraphicsResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ImageQualityResult) || value is ImageQualityResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(ImagesResult) || value is ImagesResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(LexicalAnalysisResult) || value is LexicalAnalysisResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(LicenseResult) || value is LicenseResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(MRZDetectorResult) || value is MRZDetectorResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(MRZPositionResult) || value is MRZPositionResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(MRZTestQualityResult) || value is MRZTestQualityResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RFIDGraphicsInfoResult) || value is RFIDGraphicsInfoResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(RFIDTextDataResult) || value is RFIDTextDataResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(StatusResult) || value is StatusResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(TextDataResult) || value is TextDataResult) + { + this._actualInstance = value; + } + else if (value.GetType() == typeof(TextResult) || value is TextResult) + { + this._actualInstance = value; + } + else + { + throw new ArgumentException("Invalid instance found. Must be the following types: AuthenticityResult, ByteArrayResult, ChosenDocumentTypeResult, DocBarCodeInfo, DocumentBinaryInfoResult, DocumentImageResult, DocumentPositionResult, DocumentTypesCandidatesResult, EncryptedRCLResult, FaceDetectionResult, GraphicsResult, ImageQualityResult, ImagesResult, LexicalAnalysisResult, LicenseResult, MRZDetectorResult, MRZPositionResult, MRZTestQualityResult, RFIDGraphicsInfoResult, RFIDTextDataResult, StatusResult, TextDataResult, TextResult"); + } + } + } /// - /// Gets or Sets TextResult + /// Get the actual instance of `StatusResult`. If the actual instance is not `StatusResult`, + /// the InvalidClassException will be thrown /// - public TextResult? TextResult { get; set; } + /// An instance of StatusResult + public StatusResult GetStatusResult() + { + return (StatusResult)this.ActualInstance; + } /// - /// Gets or Sets DocumentImageResult + /// Get the actual instance of `TextResult`. If the actual instance is not `TextResult`, + /// the InvalidClassException will be thrown /// - public DocumentImageResult? DocumentImageResult { get; set; } + /// An instance of TextResult + public TextResult GetTextResult() + { + return (TextResult)this.ActualInstance; + } /// - /// Gets or Sets ImagesResult + /// Get the actual instance of `DocumentImageResult`. If the actual instance is not `DocumentImageResult`, + /// the InvalidClassException will be thrown /// - public ImagesResult? ImagesResult { get; set; } + /// An instance of DocumentImageResult + public DocumentImageResult GetDocumentImageResult() + { + return (DocumentImageResult)this.ActualInstance; + } /// - /// Gets or Sets ChosenDocumentTypeResult + /// Get the actual instance of `ImagesResult`. If the actual instance is not `ImagesResult`, + /// the InvalidClassException will be thrown /// - public ChosenDocumentTypeResult? ChosenDocumentTypeResult { get; set; } + /// An instance of ImagesResult + public ImagesResult GetImagesResult() + { + return (ImagesResult)this.ActualInstance; + } /// - /// Gets or Sets DocumentTypesCandidatesResult + /// Get the actual instance of `ChosenDocumentTypeResult`. If the actual instance is not `ChosenDocumentTypeResult`, + /// the InvalidClassException will be thrown /// - public DocumentTypesCandidatesResult? DocumentTypesCandidatesResult { get; set; } + /// An instance of ChosenDocumentTypeResult + public ChosenDocumentTypeResult GetChosenDocumentTypeResult() + { + return (ChosenDocumentTypeResult)this.ActualInstance; + } /// - /// Gets or Sets TextDataResult + /// Get the actual instance of `DocumentTypesCandidatesResult`. If the actual instance is not `DocumentTypesCandidatesResult`, + /// the InvalidClassException will be thrown /// - public TextDataResult? TextDataResult { get; set; } + /// An instance of DocumentTypesCandidatesResult + public DocumentTypesCandidatesResult GetDocumentTypesCandidatesResult() + { + return (DocumentTypesCandidatesResult)this.ActualInstance; + } /// - /// Gets or Sets GraphicsResult + /// Get the actual instance of `TextDataResult`. If the actual instance is not `TextDataResult`, + /// the InvalidClassException will be thrown /// - public GraphicsResult? GraphicsResult { get; set; } + /// An instance of TextDataResult + public TextDataResult GetTextDataResult() + { + return (TextDataResult)this.ActualInstance; + } /// - /// Gets or Sets LexicalAnalysisResult + /// Get the actual instance of `GraphicsResult`. If the actual instance is not `GraphicsResult`, + /// the InvalidClassException will be thrown /// - public LexicalAnalysisResult? LexicalAnalysisResult { get; set; } + /// An instance of GraphicsResult + public GraphicsResult GetGraphicsResult() + { + return (GraphicsResult)this.ActualInstance; + } /// - /// Gets or Sets AuthenticityResult + /// Get the actual instance of `LexicalAnalysisResult`. If the actual instance is not `LexicalAnalysisResult`, + /// the InvalidClassException will be thrown /// - public AuthenticityResult? AuthenticityResult { get; set; } + /// An instance of LexicalAnalysisResult + public LexicalAnalysisResult GetLexicalAnalysisResult() + { + return (LexicalAnalysisResult)this.ActualInstance; + } /// - /// Gets or Sets ImageQualityResult + /// Get the actual instance of `AuthenticityResult`. If the actual instance is not `AuthenticityResult`, + /// the InvalidClassException will be thrown /// - public ImageQualityResult? ImageQualityResult { get; set; } + /// An instance of AuthenticityResult + public AuthenticityResult GetAuthenticityResult() + { + return (AuthenticityResult)this.ActualInstance; + } /// - /// Gets or Sets DocumentPositionResult + /// Get the actual instance of `ImageQualityResult`. If the actual instance is not `ImageQualityResult`, + /// the InvalidClassException will be thrown /// - public DocumentPositionResult? DocumentPositionResult { get; set; } + /// An instance of ImageQualityResult + public ImageQualityResult GetImageQualityResult() + { + return (ImageQualityResult)this.ActualInstance; + } /// - /// Gets or Sets DocBarCodeInfo + /// Get the actual instance of `DocumentPositionResult`. If the actual instance is not `DocumentPositionResult`, + /// the InvalidClassException will be thrown /// - public DocBarCodeInfo? DocBarCodeInfo { get; set; } + /// An instance of DocumentPositionResult + public DocumentPositionResult GetDocumentPositionResult() + { + return (DocumentPositionResult)this.ActualInstance; + } /// - /// Gets or Sets LicenseResult + /// Get the actual instance of `DocBarCodeInfo`. If the actual instance is not `DocBarCodeInfo`, + /// the InvalidClassException will be thrown /// - public LicenseResult? LicenseResult { get; set; } + /// An instance of DocBarCodeInfo + public DocBarCodeInfo GetDocBarCodeInfo() + { + return (DocBarCodeInfo)this.ActualInstance; + } /// - /// Gets or Sets EncryptedRCLResult + /// Get the actual instance of `LicenseResult`. If the actual instance is not `LicenseResult`, + /// the InvalidClassException will be thrown /// - public EncryptedRCLResult? EncryptedRCLResult { get; set; } + /// An instance of LicenseResult + public LicenseResult GetLicenseResult() + { + return (LicenseResult)this.ActualInstance; + } /// - /// Gets or Sets DocumentBinaryInfoResult + /// Get the actual instance of `EncryptedRCLResult`. If the actual instance is not `EncryptedRCLResult`, + /// the InvalidClassException will be thrown /// - public DocumentBinaryInfoResult? DocumentBinaryInfoResult { get; set; } + /// An instance of EncryptedRCLResult + public EncryptedRCLResult GetEncryptedRCLResult() + { + return (EncryptedRCLResult)this.ActualInstance; + } /// - /// Gets or Sets ByteArrayResult + /// Get the actual instance of `DocumentBinaryInfoResult`. If the actual instance is not `DocumentBinaryInfoResult`, + /// the InvalidClassException will be thrown /// - public ByteArrayResult? ByteArrayResult { get; set; } + /// An instance of DocumentBinaryInfoResult + public DocumentBinaryInfoResult GetDocumentBinaryInfoResult() + { + return (DocumentBinaryInfoResult)this.ActualInstance; + } /// - /// Gets or Sets FaceDetectionResult + /// Get the actual instance of `ByteArrayResult`. If the actual instance is not `ByteArrayResult`, + /// the InvalidClassException will be thrown /// - public FaceDetectionResult? FaceDetectionResult { get; set; } + /// An instance of ByteArrayResult + public ByteArrayResult GetByteArrayResult() + { + return (ByteArrayResult)this.ActualInstance; + } /// - /// Gets or Sets MRZDetectorResult + /// Get the actual instance of `FaceDetectionResult`. If the actual instance is not `FaceDetectionResult`, + /// the InvalidClassException will be thrown /// - public MRZDetectorResult? MRZDetectorResult { get; set; } + /// An instance of FaceDetectionResult + public FaceDetectionResult GetFaceDetectionResult() + { + return (FaceDetectionResult)this.ActualInstance; + } /// - /// Gets or Sets MRZPositionResult + /// Get the actual instance of `MRZDetectorResult`. If the actual instance is not `MRZDetectorResult`, + /// the InvalidClassException will be thrown /// - public MRZPositionResult? MRZPositionResult { get; set; } + /// An instance of MRZDetectorResult + public MRZDetectorResult GetMRZDetectorResult() + { + return (MRZDetectorResult)this.ActualInstance; + } /// - /// Gets or Sets MRZTestQualityResult + /// Get the actual instance of `MRZPositionResult`. If the actual instance is not `MRZPositionResult`, + /// the InvalidClassException will be thrown /// - public MRZTestQualityResult? MRZTestQualityResult { get; set; } + /// An instance of MRZPositionResult + public MRZPositionResult GetMRZPositionResult() + { + return (MRZPositionResult)this.ActualInstance; + } + + /// + /// Get the actual instance of `MRZTestQualityResult`. If the actual instance is not `MRZTestQualityResult`, + /// the InvalidClassException will be thrown + /// + /// An instance of MRZTestQualityResult + public MRZTestQualityResult GetMRZTestQualityResult() + { + return (MRZTestQualityResult)this.ActualInstance; + } /// - /// Gets or Sets RFIDGraphicsInfoResult + /// Get the actual instance of `RFIDGraphicsInfoResult`. If the actual instance is not `RFIDGraphicsInfoResult`, + /// the InvalidClassException will be thrown /// - public RFIDGraphicsInfoResult? RFIDGraphicsInfoResult { get; set; } + /// An instance of RFIDGraphicsInfoResult + public RFIDGraphicsInfoResult GetRFIDGraphicsInfoResult() + { + return (RFIDGraphicsInfoResult)this.ActualInstance; + } /// - /// Gets or Sets RFIDTextDataResult + /// Get the actual instance of `RFIDTextDataResult`. If the actual instance is not `RFIDTextDataResult`, + /// the InvalidClassException will be thrown /// - public RFIDTextDataResult? RFIDTextDataResult { get; set; } + /// An instance of RFIDTextDataResult + public RFIDTextDataResult GetRFIDTextDataResult() + { + return (RFIDTextDataResult)this.ActualInstance; + } /// /// Returns the string presentation of the object @@ -383,770 +660,569 @@ public ContainerListListInner(RFIDTextDataResult rFIDTextDataResult) /// String presentation of the object public override string ToString() { - StringBuilder sb = new StringBuilder(); + var sb = new StringBuilder(); sb.Append("class ContainerListListInner {\n"); + sb.Append(" ActualInstance: ").Append(this.ActualInstance).Append("\n"); sb.Append("}\n"); return sb.ToString(); } /// - /// To validate all properties of the instance + /// Returns the JSON string presentation of the object /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + /// JSON string presentation of the object + public override string ToJson() { - return this.BaseValidate(validationContext); + return JsonConvert.SerializeObject(this.ActualInstance, ContainerListListInner.SerializerSettings); } /// - /// To validate all properties of the instance + /// Converts the JSON string into an instance of ContainerListListInner /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) + /// JSON string + /// An instance of ContainerListListInner + public static ContainerListListInner FromJson(string jsonString) { - yield break; - } - } + ContainerListListInner newContainerListListInner = null; - /// - /// A Json converter for type - /// - public class ContainerListListInnerJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ContainerListListInner Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option resultType = default; - - StatusResult? statusResult = null; - TextResult? textResult = null; - DocumentImageResult? documentImageResult = null; - ImagesResult? imagesResult = null; - ChosenDocumentTypeResult? chosenDocumentTypeResult = null; - DocumentTypesCandidatesResult? documentTypesCandidatesResult = null; - TextDataResult? textDataResult = null; - GraphicsResult? graphicsResult = null; - LexicalAnalysisResult? lexicalAnalysisResult = null; - AuthenticityResult? authenticityResult = null; - ImageQualityResult? imageQualityResult = null; - DocumentPositionResult? documentPositionResult = null; - DocBarCodeInfo? docBarCodeInfo = null; - LicenseResult? licenseResult = null; - EncryptedRCLResult? encryptedRCLResult = null; - DocumentBinaryInfoResult? documentBinaryInfoResult = null; - ByteArrayResult? byteArrayResult = null; - FaceDetectionResult? faceDetectionResult = null; - MRZDetectorResult? mRZDetectorResult = null; - MRZPositionResult? mRZPositionResult = null; - MRZTestQualityResult? mRZTestQualityResult = null; - RFIDGraphicsInfoResult? rFIDGraphicsInfoResult = null; - RFIDTextDataResult? rFIDTextDataResult = null; - - Utf8JsonReader utf8JsonReaderDiscriminator = utf8JsonReader; - while (utf8JsonReaderDiscriminator.Read()) + if (string.IsNullOrEmpty(jsonString)) { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReaderDiscriminator.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth) - break; - - if (utf8JsonReaderDiscriminator.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReaderDiscriminator.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReaderDiscriminator.GetString(); - utf8JsonReaderDiscriminator.Read(); - if (localVarJsonPropertyName?.Equals("result_type") ?? false) - { - string? discriminator = utf8JsonReaderDiscriminator.GetString(); - if (discriminator?.Equals("1") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; - documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); - } - if (discriminator?.Equals("101") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; - documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("102") ?? false) - { - Utf8JsonReader utf8JsonReaderRFIDTextDataResult = utf8JsonReader; - rFIDTextDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("103") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("104") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; - documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("105") ?? false) - { - Utf8JsonReader utf8JsonReaderRFIDGraphicsInfoResult = utf8JsonReader; - rFIDGraphicsInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDGraphicsInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("109") ?? false) - { - Utf8JsonReader utf8JsonReaderByteArrayResult = utf8JsonReader; - byteArrayResult = JsonSerializer.Deserialize(ref utf8JsonReaderByteArrayResult, jsonSerializerOptions); - } - if (discriminator?.Equals("15") ?? false) - { - Utf8JsonReader utf8JsonReaderLexicalAnalysisResult = utf8JsonReader; - lexicalAnalysisResult = JsonSerializer.Deserialize(ref utf8JsonReaderLexicalAnalysisResult, jsonSerializerOptions); - } - if (discriminator?.Equals("16") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; - documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); - } - if (discriminator?.Equals("17") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("18") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("19") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("20") ?? false) - { - Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; - authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("26") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("3") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("30") ?? false) - { - Utf8JsonReader utf8JsonReaderImageQualityResult = utf8JsonReader; - imageQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderImageQualityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("32") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("33") ?? false) - { - Utf8JsonReader utf8JsonReaderStatusResult = utf8JsonReader; - statusResult = JsonSerializer.Deserialize(ref utf8JsonReaderStatusResult, jsonSerializerOptions); - } - if (discriminator?.Equals("34") ?? false) - { - Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; - authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("35") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("36") ?? false) - { - Utf8JsonReader utf8JsonReaderTextResult = utf8JsonReader; - textResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextResult, jsonSerializerOptions); - } - if (discriminator?.Equals("37") ?? false) - { - Utf8JsonReader utf8JsonReaderImagesResult = utf8JsonReader; - imagesResult = JsonSerializer.Deserialize(ref utf8JsonReaderImagesResult, jsonSerializerOptions); - } - if (discriminator?.Equals("38") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("39") ?? false) - { - Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; - authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("49") ?? false) - { - Utf8JsonReader utf8JsonReaderEncryptedRCLResult = utf8JsonReader; - encryptedRCLResult = JsonSerializer.Deserialize(ref utf8JsonReaderEncryptedRCLResult, jsonSerializerOptions); - } - if (discriminator?.Equals("5") ?? false) - { - Utf8JsonReader utf8JsonReaderDocBarCodeInfo = utf8JsonReader; - docBarCodeInfo = JsonSerializer.Deserialize(ref utf8JsonReaderDocBarCodeInfo, jsonSerializerOptions); - } - if (discriminator?.Equals("50") ?? false) - { - Utf8JsonReader utf8JsonReaderLicenseResult = utf8JsonReader; - licenseResult = JsonSerializer.Deserialize(ref utf8JsonReaderLicenseResult, jsonSerializerOptions); - } - if (discriminator?.Equals("6") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("61") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZPositionResult = utf8JsonReader; - mRZPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("62") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; - documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("7") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZTestQualityResult = utf8JsonReader; - mRZTestQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZTestQualityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("8") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentTypesCandidatesResult = utf8JsonReader; - documentTypesCandidatesResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentTypesCandidatesResult, jsonSerializerOptions); - } - if (discriminator?.Equals("85") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; - documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("87") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZDetectorResult = utf8JsonReader; - mRZDetectorResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZDetectorResult, jsonSerializerOptions); - } - if (discriminator?.Equals("9") ?? false) - { - Utf8JsonReader utf8JsonReaderChosenDocumentTypeResult = utf8JsonReader; - chosenDocumentTypeResult = JsonSerializer.Deserialize(ref utf8JsonReaderChosenDocumentTypeResult, jsonSerializerOptions); - } - if (discriminator?.Equals("97") ?? false) - { - Utf8JsonReader utf8JsonReaderFaceDetectionResult = utf8JsonReader; - faceDetectionResult = JsonSerializer.Deserialize(ref utf8JsonReaderFaceDetectionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("AuthenticityResult") ?? false) - { - Utf8JsonReader utf8JsonReaderAuthenticityResult = utf8JsonReader; - authenticityResult = JsonSerializer.Deserialize(ref utf8JsonReaderAuthenticityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("ByteArrayResult") ?? false) - { - Utf8JsonReader utf8JsonReaderByteArrayResult = utf8JsonReader; - byteArrayResult = JsonSerializer.Deserialize(ref utf8JsonReaderByteArrayResult, jsonSerializerOptions); - } - if (discriminator?.Equals("ChosenDocumentTypeResult") ?? false) - { - Utf8JsonReader utf8JsonReaderChosenDocumentTypeResult = utf8JsonReader; - chosenDocumentTypeResult = JsonSerializer.Deserialize(ref utf8JsonReaderChosenDocumentTypeResult, jsonSerializerOptions); - } - if (discriminator?.Equals("DocBarCodeInfo") ?? false) - { - Utf8JsonReader utf8JsonReaderDocBarCodeInfo = utf8JsonReader; - docBarCodeInfo = JsonSerializer.Deserialize(ref utf8JsonReaderDocBarCodeInfo, jsonSerializerOptions); - } - if (discriminator?.Equals("DocumentBinaryInfoResult") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentBinaryInfoResult = utf8JsonReader; - documentBinaryInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentBinaryInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("DocumentImageResult") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentImageResult = utf8JsonReader; - documentImageResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentImageResult, jsonSerializerOptions); - } - if (discriminator?.Equals("DocumentPositionResult") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentPositionResult = utf8JsonReader; - documentPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("DocumentTypesCandidatesResult") ?? false) - { - Utf8JsonReader utf8JsonReaderDocumentTypesCandidatesResult = utf8JsonReader; - documentTypesCandidatesResult = JsonSerializer.Deserialize(ref utf8JsonReaderDocumentTypesCandidatesResult, jsonSerializerOptions); - } - if (discriminator?.Equals("EncryptedRCLResult") ?? false) - { - Utf8JsonReader utf8JsonReaderEncryptedRCLResult = utf8JsonReader; - encryptedRCLResult = JsonSerializer.Deserialize(ref utf8JsonReaderEncryptedRCLResult, jsonSerializerOptions); - } - if (discriminator?.Equals("FaceDetectionResult") ?? false) - { - Utf8JsonReader utf8JsonReaderFaceDetectionResult = utf8JsonReader; - faceDetectionResult = JsonSerializer.Deserialize(ref utf8JsonReaderFaceDetectionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("GraphicsResult") ?? false) - { - Utf8JsonReader utf8JsonReaderGraphicsResult = utf8JsonReader; - graphicsResult = JsonSerializer.Deserialize(ref utf8JsonReaderGraphicsResult, jsonSerializerOptions); - } - if (discriminator?.Equals("ImageQualityResult") ?? false) - { - Utf8JsonReader utf8JsonReaderImageQualityResult = utf8JsonReader; - imageQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderImageQualityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("ImagesResult") ?? false) - { - Utf8JsonReader utf8JsonReaderImagesResult = utf8JsonReader; - imagesResult = JsonSerializer.Deserialize(ref utf8JsonReaderImagesResult, jsonSerializerOptions); - } - if (discriminator?.Equals("LexicalAnalysisResult") ?? false) - { - Utf8JsonReader utf8JsonReaderLexicalAnalysisResult = utf8JsonReader; - lexicalAnalysisResult = JsonSerializer.Deserialize(ref utf8JsonReaderLexicalAnalysisResult, jsonSerializerOptions); - } - if (discriminator?.Equals("LicenseResult") ?? false) - { - Utf8JsonReader utf8JsonReaderLicenseResult = utf8JsonReader; - licenseResult = JsonSerializer.Deserialize(ref utf8JsonReaderLicenseResult, jsonSerializerOptions); - } - if (discriminator?.Equals("MRZDetectorResult") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZDetectorResult = utf8JsonReader; - mRZDetectorResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZDetectorResult, jsonSerializerOptions); - } - if (discriminator?.Equals("MRZPositionResult") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZPositionResult = utf8JsonReader; - mRZPositionResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZPositionResult, jsonSerializerOptions); - } - if (discriminator?.Equals("MRZTestQualityResult") ?? false) - { - Utf8JsonReader utf8JsonReaderMRZTestQualityResult = utf8JsonReader; - mRZTestQualityResult = JsonSerializer.Deserialize(ref utf8JsonReaderMRZTestQualityResult, jsonSerializerOptions); - } - if (discriminator?.Equals("RFIDGraphicsInfoResult") ?? false) - { - Utf8JsonReader utf8JsonReaderRFIDGraphicsInfoResult = utf8JsonReader; - rFIDGraphicsInfoResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDGraphicsInfoResult, jsonSerializerOptions); - } - if (discriminator?.Equals("RFIDTextDataResult") ?? false) - { - Utf8JsonReader utf8JsonReaderRFIDTextDataResult = utf8JsonReader; - rFIDTextDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderRFIDTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("StatusResult") ?? false) - { - Utf8JsonReader utf8JsonReaderStatusResult = utf8JsonReader; - statusResult = JsonSerializer.Deserialize(ref utf8JsonReaderStatusResult, jsonSerializerOptions); - } - if (discriminator?.Equals("TextDataResult") ?? false) - { - Utf8JsonReader utf8JsonReaderTextDataResult = utf8JsonReader; - textDataResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextDataResult, jsonSerializerOptions); - } - if (discriminator?.Equals("TextResult") ?? false) - { - Utf8JsonReader utf8JsonReaderTextResult = utf8JsonReader; - textResult = JsonSerializer.Deserialize(ref utf8JsonReaderTextResult, jsonSerializerOptions); - } - } - } + return newContainerListListInner; } + int match = 0; + List matchedTypes = new List(); - while (utf8JsonReader.Read()) + try { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(AuthenticityResult).GetProperty("AdditionalProperties") == null) { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); } + matchedTypes.Add("AuthenticityResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into AuthenticityResult: {1}", jsonString, exception.ToString())); } - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class ContainerListListInner.", nameof(resultType)); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ContainerListListInner."); - - if (documentImageResult != null) - return new ContainerListListInner(documentImageResult); - - if (documentBinaryInfoResult != null) - return new ContainerListListInner(documentBinaryInfoResult); - - if (rFIDTextDataResult != null) - return new ContainerListListInner(rFIDTextDataResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (documentBinaryInfoResult != null) - return new ContainerListListInner(documentBinaryInfoResult); - - if (rFIDGraphicsInfoResult != null) - return new ContainerListListInner(rFIDGraphicsInfoResult); - - if (byteArrayResult != null) - return new ContainerListListInner(byteArrayResult); - - if (lexicalAnalysisResult != null) - return new ContainerListListInner(lexicalAnalysisResult); - - if (documentImageResult != null) - return new ContainerListListInner(documentImageResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (authenticityResult != null) - return new ContainerListListInner(authenticityResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (imageQualityResult != null) - return new ContainerListListInner(imageQualityResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (statusResult != null) - return new ContainerListListInner(statusResult); - - if (authenticityResult != null) - return new ContainerListListInner(authenticityResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (textResult != null) - return new ContainerListListInner(textResult); - - if (imagesResult != null) - return new ContainerListListInner(imagesResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (authenticityResult != null) - return new ContainerListListInner(authenticityResult); - - if (encryptedRCLResult != null) - return new ContainerListListInner(encryptedRCLResult); - - if (docBarCodeInfo != null) - return new ContainerListListInner(docBarCodeInfo); - - if (licenseResult != null) - return new ContainerListListInner(licenseResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (mRZPositionResult != null) - return new ContainerListListInner(mRZPositionResult); - - if (documentPositionResult != null) - return new ContainerListListInner(documentPositionResult); - - if (mRZTestQualityResult != null) - return new ContainerListListInner(mRZTestQualityResult); - - if (documentTypesCandidatesResult != null) - return new ContainerListListInner(documentTypesCandidatesResult); - - if (documentPositionResult != null) - return new ContainerListListInner(documentPositionResult); - - if (mRZDetectorResult != null) - return new ContainerListListInner(mRZDetectorResult); - - if (chosenDocumentTypeResult != null) - return new ContainerListListInner(chosenDocumentTypeResult); - - if (faceDetectionResult != null) - return new ContainerListListInner(faceDetectionResult); - - if (authenticityResult != null) - return new ContainerListListInner(authenticityResult); - - if (byteArrayResult != null) - return new ContainerListListInner(byteArrayResult); - - if (chosenDocumentTypeResult != null) - return new ContainerListListInner(chosenDocumentTypeResult); - - if (docBarCodeInfo != null) - return new ContainerListListInner(docBarCodeInfo); - - if (documentBinaryInfoResult != null) - return new ContainerListListInner(documentBinaryInfoResult); - - if (documentImageResult != null) - return new ContainerListListInner(documentImageResult); - - if (documentPositionResult != null) - return new ContainerListListInner(documentPositionResult); - - if (documentTypesCandidatesResult != null) - return new ContainerListListInner(documentTypesCandidatesResult); - - if (encryptedRCLResult != null) - return new ContainerListListInner(encryptedRCLResult); - - if (faceDetectionResult != null) - return new ContainerListListInner(faceDetectionResult); - - if (graphicsResult != null) - return new ContainerListListInner(graphicsResult); - - if (imageQualityResult != null) - return new ContainerListListInner(imageQualityResult); - - if (imagesResult != null) - return new ContainerListListInner(imagesResult); - - if (lexicalAnalysisResult != null) - return new ContainerListListInner(lexicalAnalysisResult); - - if (licenseResult != null) - return new ContainerListListInner(licenseResult); - - if (mRZDetectorResult != null) - return new ContainerListListInner(mRZDetectorResult); - - if (mRZPositionResult != null) - return new ContainerListListInner(mRZPositionResult); - - if (mRZTestQualityResult != null) - return new ContainerListListInner(mRZTestQualityResult); - - if (rFIDGraphicsInfoResult != null) - return new ContainerListListInner(rFIDGraphicsInfoResult); - - if (rFIDTextDataResult != null) - return new ContainerListListInner(rFIDTextDataResult); - - if (statusResult != null) - return new ContainerListListInner(statusResult); - - if (textDataResult != null) - return new ContainerListListInner(textDataResult); - - if (textResult != null) - return new ContainerListListInner(textResult); - - throw new JsonException(); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - if (containerListListInner.StatusResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(ByteArrayResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("ByteArrayResult"); + match++; + } + catch (Exception exception) { - StatusResultJsonConverter statusResultJsonConverter = (StatusResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.StatusResult.GetType())); - statusResultJsonConverter.WriteProperties(writer, containerListListInner.StatusResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ByteArrayResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.TextResult != null) + try { - TextResultJsonConverter textResultJsonConverter = (TextResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.TextResult.GetType())); - textResultJsonConverter.WriteProperties(writer, containerListListInner.TextResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(ChosenDocumentTypeResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("ChosenDocumentTypeResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ChosenDocumentTypeResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.DocumentImageResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(DocBarCodeInfo).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("DocBarCodeInfo"); + match++; + } + catch (Exception exception) { - DocumentImageResultJsonConverter documentImageResultJsonConverter = (DocumentImageResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentImageResult.GetType())); - documentImageResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentImageResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DocBarCodeInfo: {1}", jsonString, exception.ToString())); } - if (containerListListInner.ImagesResult != null) + try { - ImagesResultJsonConverter imagesResultJsonConverter = (ImagesResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ImagesResult.GetType())); - imagesResultJsonConverter.WriteProperties(writer, containerListListInner.ImagesResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(DocumentBinaryInfoResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("DocumentBinaryInfoResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DocumentBinaryInfoResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.ChosenDocumentTypeResult != null) + try { - ChosenDocumentTypeResultJsonConverter chosenDocumentTypeResultJsonConverter = (ChosenDocumentTypeResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ChosenDocumentTypeResult.GetType())); - chosenDocumentTypeResultJsonConverter.WriteProperties(writer, containerListListInner.ChosenDocumentTypeResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(DocumentImageResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("DocumentImageResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DocumentImageResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.DocumentTypesCandidatesResult != null) + try { - DocumentTypesCandidatesResultJsonConverter documentTypesCandidatesResultJsonConverter = (DocumentTypesCandidatesResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentTypesCandidatesResult.GetType())); - documentTypesCandidatesResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentTypesCandidatesResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(DocumentPositionResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("DocumentPositionResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DocumentPositionResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.TextDataResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(DocumentTypesCandidatesResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("DocumentTypesCandidatesResult"); + match++; + } + catch (Exception exception) { - TextDataResultJsonConverter textDataResultJsonConverter = (TextDataResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.TextDataResult.GetType())); - textDataResultJsonConverter.WriteProperties(writer, containerListListInner.TextDataResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into DocumentTypesCandidatesResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.GraphicsResult != null) + try { - GraphicsResultJsonConverter graphicsResultJsonConverter = (GraphicsResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.GraphicsResult.GetType())); - graphicsResultJsonConverter.WriteProperties(writer, containerListListInner.GraphicsResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(EncryptedRCLResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("EncryptedRCLResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into EncryptedRCLResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.LexicalAnalysisResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(FaceDetectionResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("FaceDetectionResult"); + match++; + } + catch (Exception exception) { - LexicalAnalysisResultJsonConverter lexicalAnalysisResultJsonConverter = (LexicalAnalysisResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.LexicalAnalysisResult.GetType())); - lexicalAnalysisResultJsonConverter.WriteProperties(writer, containerListListInner.LexicalAnalysisResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into FaceDetectionResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.AuthenticityResult != null) + try { - AuthenticityResultJsonConverter authenticityResultJsonConverter = (AuthenticityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.AuthenticityResult.GetType())); - authenticityResultJsonConverter.WriteProperties(writer, containerListListInner.AuthenticityResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(GraphicsResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("GraphicsResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into GraphicsResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.ImageQualityResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(ImageQualityResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("ImageQualityResult"); + match++; + } + catch (Exception exception) { - ImageQualityResultJsonConverter imageQualityResultJsonConverter = (ImageQualityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ImageQualityResult.GetType())); - imageQualityResultJsonConverter.WriteProperties(writer, containerListListInner.ImageQualityResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ImageQualityResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.DocumentPositionResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(ImagesResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("ImagesResult"); + match++; + } + catch (Exception exception) { - DocumentPositionResultJsonConverter documentPositionResultJsonConverter = (DocumentPositionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentPositionResult.GetType())); - documentPositionResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentPositionResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into ImagesResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.DocBarCodeInfo != null) + try { - DocBarCodeInfoJsonConverter docBarCodeInfoJsonConverter = (DocBarCodeInfoJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocBarCodeInfo.GetType())); - docBarCodeInfoJsonConverter.WriteProperties(writer, containerListListInner.DocBarCodeInfo, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(LexicalAnalysisResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("LexicalAnalysisResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into LexicalAnalysisResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.LicenseResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(LicenseResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("LicenseResult"); + match++; + } + catch (Exception exception) { - LicenseResultJsonConverter licenseResultJsonConverter = (LicenseResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.LicenseResult.GetType())); - licenseResultJsonConverter.WriteProperties(writer, containerListListInner.LicenseResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into LicenseResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.EncryptedRCLResult != null) + try { - EncryptedRCLResultJsonConverter encryptedRCLResultJsonConverter = (EncryptedRCLResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.EncryptedRCLResult.GetType())); - encryptedRCLResultJsonConverter.WriteProperties(writer, containerListListInner.EncryptedRCLResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(MRZDetectorResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("MRZDetectorResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into MRZDetectorResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.DocumentBinaryInfoResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(MRZPositionResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("MRZPositionResult"); + match++; + } + catch (Exception exception) { - DocumentBinaryInfoResultJsonConverter documentBinaryInfoResultJsonConverter = (DocumentBinaryInfoResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.DocumentBinaryInfoResult.GetType())); - documentBinaryInfoResultJsonConverter.WriteProperties(writer, containerListListInner.DocumentBinaryInfoResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into MRZPositionResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.ByteArrayResult != null) + try { - ByteArrayResultJsonConverter byteArrayResultJsonConverter = (ByteArrayResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.ByteArrayResult.GetType())); - byteArrayResultJsonConverter.WriteProperties(writer, containerListListInner.ByteArrayResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(MRZTestQualityResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("MRZTestQualityResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into MRZTestQualityResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.FaceDetectionResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RFIDGraphicsInfoResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RFIDGraphicsInfoResult"); + match++; + } + catch (Exception exception) { - FaceDetectionResultJsonConverter faceDetectionResultJsonConverter = (FaceDetectionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.FaceDetectionResult.GetType())); - faceDetectionResultJsonConverter.WriteProperties(writer, containerListListInner.FaceDetectionResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RFIDGraphicsInfoResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.MRZDetectorResult != null) + try { - MRZDetectorResultJsonConverter mRZDetectorResultJsonConverter = (MRZDetectorResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZDetectorResult.GetType())); - mRZDetectorResultJsonConverter.WriteProperties(writer, containerListListInner.MRZDetectorResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(RFIDTextDataResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("RFIDTextDataResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into RFIDTextDataResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.MRZPositionResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(StatusResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("StatusResult"); + match++; + } + catch (Exception exception) { - MRZPositionResultJsonConverter mRZPositionResultJsonConverter = (MRZPositionResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZPositionResult.GetType())); - mRZPositionResultJsonConverter.WriteProperties(writer, containerListListInner.MRZPositionResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into StatusResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.MRZTestQualityResult != null) + try { - MRZTestQualityResultJsonConverter mRZTestQualityResultJsonConverter = (MRZTestQualityResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.MRZTestQualityResult.GetType())); - mRZTestQualityResultJsonConverter.WriteProperties(writer, containerListListInner.MRZTestQualityResult, jsonSerializerOptions); + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(TextDataResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("TextDataResult"); + match++; + } + catch (Exception exception) + { + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into TextDataResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.RFIDGraphicsInfoResult != null) + try + { + // if it does not contains "AdditionalProperties", use SerializerSettings to deserialize + if (typeof(TextResult).GetProperty("AdditionalProperties") == null) + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.SerializerSettings)); + } + else + { + newContainerListListInner = new ContainerListListInner(JsonConvert.DeserializeObject(jsonString, ContainerListListInner.AdditionalPropertiesSerializerSettings)); + } + matchedTypes.Add("TextResult"); + match++; + } + catch (Exception exception) { - RFIDGraphicsInfoResultJsonConverter rFIDGraphicsInfoResultJsonConverter = (RFIDGraphicsInfoResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.RFIDGraphicsInfoResult.GetType())); - rFIDGraphicsInfoResultJsonConverter.WriteProperties(writer, containerListListInner.RFIDGraphicsInfoResult, jsonSerializerOptions); + // deserialization failed, try the next one + System.Diagnostics.Debug.WriteLine(string.Format("Failed to deserialize `{0}` into TextResult: {1}", jsonString, exception.ToString())); } - if (containerListListInner.RFIDTextDataResult != null) + if (match == 0) { - RFIDTextDataResultJsonConverter rFIDTextDataResultJsonConverter = (RFIDTextDataResultJsonConverter) jsonSerializerOptions.Converters.First(c => c.CanConvert(containerListListInner.RFIDTextDataResult.GetType())); - rFIDTextDataResultJsonConverter.WriteProperties(writer, containerListListInner.RFIDTextDataResult, jsonSerializerOptions); + throw new InvalidDataException("The JSON string `" + jsonString + "` cannot be deserialized into any schema defined."); } + else if (match > 1) + { + throw new InvalidDataException("The JSON string `" + jsonString + "` incorrectly matches more than one schema (should be exactly one match): " + String.Join(",", matchedTypes)); + } + + // deserialization is considered successful at this point if no exception has been thrown. + return newContainerListListInner; + } + + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } - WriteProperties(writer, containerListListInner, jsonSerializerOptions); - writer.WriteEndObject(); + /// + /// Custom JSON converter for ContainerListListInner + /// + public class ContainerListListInnerJsonConverter : JsonConverter + { + /// + /// To write the JSON string + /// + /// JSON writer + /// Object to be converted into a JSON string + /// JSON Serializer + public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) + { + writer.WriteRawValue((string)(typeof(ContainerListListInner).GetMethod("ToJson").Invoke(value, null))); } /// - /// Serializes the properties of + /// To convert a JSON string into an object /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ContainerListListInner containerListListInner, JsonSerializerOptions jsonSerializerOptions) + /// JSON reader + /// Object type + /// Existing value + /// JSON Serializer + /// The object converted from the JSON string + public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer) { + switch(reader.TokenType) + { + case JsonToken.StartObject: + return ContainerListListInner.FromJson(JObject.Load(reader).ToString(Formatting.None)); + case JsonToken.StartArray: + return ContainerListListInner.FromJson(JArray.Load(reader).ToString(Formatting.None)); + default: + return null; + } + } + /// + /// Check if the object can be converted + /// + /// Object type + /// True if the object can be converted + public override bool CanConvert(Type objectType) + { + return false; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/Critical.cs b/src/Regula.DocumentReader.WebClient/Model/Critical.cs index 2aa8380..a05699d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Critical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Critical.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -42,129 +43,4 @@ public enum Critical CRITICAL = 1 } - /// - /// Converts to and from the JSON value - /// - public static class CriticalValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static Critical FromString(string value) - { - if (value.Equals((0).ToString())) - return Critical.NOT_CRITICAL; - - if (value.Equals((1).ToString())) - return Critical.CRITICAL; - - throw new NotImplementedException($"Could not convert value to type Critical: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static Critical? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return Critical.NOT_CRITICAL; - - if (value.Equals((1).ToString())) - return Critical.CRITICAL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(Critical value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class CriticalJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override Critical Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Critical? result = rawValue == null - ? null - : CriticalValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the Critical to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Critical critical, JsonSerializerOptions options) - { - writer.WriteStringValue(critical.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class CriticalNullableJsonConverter : JsonConverter - { - /// - /// Returns a Critical from the Json object - /// - /// - /// - /// - /// - public override Critical? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Critical? result = rawValue == null - ? null - : CriticalValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Critical? critical, JsonSerializerOptions options) - { - writer.WriteStringValue(critical?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs b/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs index a7c9635..a306bf9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CrossSourceValueComparison.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,54 +14,59 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// CrossSourceValueComparison /// + [DataContract(Name = "CrossSourceValueComparison")] public partial class CrossSourceValueComparison : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// sourceLeft - /// sourceRight - /// status - [JsonConstructor] - public CrossSourceValueComparison(Source sourceLeft, Source sourceRight, CheckResult status) - { - SourceLeft = sourceLeft; - SourceRight = sourceRight; - Status = status; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets SourceLeft /// - [JsonPropertyName("sourceLeft")] + [DataMember(Name = "sourceLeft", IsRequired = true, EmitDefaultValue = true)] public Source SourceLeft { get; set; } /// /// Gets or Sets SourceRight /// - [JsonPropertyName("sourceRight")] + [DataMember(Name = "sourceRight", IsRequired = true, EmitDefaultValue = true)] public Source SourceRight { get; set; } /// /// Gets or Sets Status /// - [JsonPropertyName("status")] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] public CheckResult Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected CrossSourceValueComparison() { } + /// + /// Initializes a new instance of the class. + /// + /// sourceLeft (required). + /// sourceRight (required). + /// status (required). + public CrossSourceValueComparison(Source sourceLeft = default(Source), Source sourceRight = default(Source), CheckResult status = default(CheckResult)) + { + this.SourceLeft = sourceLeft; + this.SourceRight = sourceRight; + this.Status = status; + } /// /// Returns the string presentation of the object @@ -80,6 +83,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -91,121 +103,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class CrossSourceValueComparisonJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override CrossSourceValueComparison Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option sourceLeft = default; - Option sourceRight = default; - Option status = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "sourceLeft": - string? sourceLeftRawValue = utf8JsonReader.GetString(); - if (sourceLeftRawValue != null) - sourceLeft = new Option(SourceValueConverter.FromStringOrDefault(sourceLeftRawValue)); - break; - case "sourceRight": - string? sourceRightRawValue = utf8JsonReader.GetString(); - if (sourceRightRawValue != null) - sourceRight = new Option(SourceValueConverter.FromStringOrDefault(sourceRightRawValue)); - break; - case "status": - string? statusRawValue = utf8JsonReader.GetString(); - if (statusRawValue != null) - status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); - break; - default: - break; - } - } - } - - if (!sourceLeft.IsSet) - throw new ArgumentException("Property is required for class CrossSourceValueComparison.", nameof(sourceLeft)); - - if (!sourceRight.IsSet) - throw new ArgumentException("Property is required for class CrossSourceValueComparison.", nameof(sourceRight)); - - if (!status.IsSet) - throw new ArgumentException("Property is required for class CrossSourceValueComparison.", nameof(status)); - - if (sourceLeft.IsSet && sourceLeft.Value == null) - throw new ArgumentNullException(nameof(sourceLeft), "Property is not nullable for class CrossSourceValueComparison."); - - if (sourceRight.IsSet && sourceRight.Value == null) - throw new ArgumentNullException(nameof(sourceRight), "Property is not nullable for class CrossSourceValueComparison."); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class CrossSourceValueComparison."); - - return new CrossSourceValueComparison(sourceLeft.Value!.Value!, sourceRight.Value!.Value!, status.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, CrossSourceValueComparison crossSourceValueComparison, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, crossSourceValueComparison, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, CrossSourceValueComparison crossSourceValueComparison, JsonSerializerOptions jsonSerializerOptions) - { - var sourceLeftRawValue = SourceValueConverter.ToJsonValue(crossSourceValueComparison.SourceLeft); - writer.WriteString("sourceLeft", sourceLeftRawValue); - - var sourceRightRawValue = SourceValueConverter.ToJsonValue(crossSourceValueComparison.SourceRight); - writer.WriteString("sourceRight", sourceRightRawValue); - - var statusRawValue = CheckResultValueConverter.ToJsonValue(crossSourceValueComparison.Status); - writer.WriteNumber("status", statusRawValue); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs index cca0e3d..ae18954 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,84 +14,80 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DataModule /// + [DataContract(Name = "DataModule")] public partial class DataModule : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// mData - /// mLength - /// mType - /// mReserved1 - /// mReserver2 - [JsonConstructor] - public DataModule(string mData, int mLength, BarCodeModuleType mType, Option mReserved1 = default, Option mReserver2 = default) - { - MData = mData; - MLength = mLength; - MType = mType; - MReserved1Option = mReserved1; - MReserver2Option = mReserver2; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets MType /// - [JsonPropertyName("mType")] + [DataMember(Name = "mType", IsRequired = true, EmitDefaultValue = true)] public BarCodeModuleType MType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DataModule() { } + /// + /// Initializes a new instance of the class. + /// + /// mData (required). + /// mLength (required). + /// mReserved1. + /// mReserver2. + /// mType (required). + public DataModule(string mData = default(string), int mLength = default(int), int mReserved1 = default(int), int mReserver2 = default(int), BarCodeModuleType mType = default(BarCodeModuleType)) + { + // to ensure "mData" is required (not null) + if (mData == null) + { + throw new ArgumentNullException("mData is a required property for DataModule and cannot be null"); + } + this.MData = mData; + this.MLength = mLength; + this.MType = mType; + this.MReserved1 = mReserved1; + this.MReserver2 = mReserver2; + } /// /// Gets or Sets MData /// - [JsonPropertyName("mData")] + [DataMember(Name = "mData", IsRequired = true, EmitDefaultValue = true)] public string MData { get; set; } /// /// Gets or Sets MLength /// - [JsonPropertyName("mLength")] + [DataMember(Name = "mLength", IsRequired = true, EmitDefaultValue = true)] public int MLength { get; set; } - /// - /// Used to track the state of MReserved1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option MReserved1Option { get; private set; } - /// /// Gets or Sets MReserved1 /// - [JsonPropertyName("mReserved1")] - public int? MReserved1 { get { return this.MReserved1Option; } set { this.MReserved1Option = new(value); } } - - /// - /// Used to track the state of MReserver2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option MReserver2Option { get; private set; } + [DataMember(Name = "mReserved1", EmitDefaultValue = false)] + public int MReserved1 { get; set; } /// /// Gets or Sets MReserver2 /// - [JsonPropertyName("mReserver2")] - public int? MReserver2 { get { return this.MReserver2Option; } set { this.MReserver2Option = new(value); } } + [DataMember(Name = "mReserver2", EmitDefaultValue = false)] + public int MReserver2 { get; set; } /// /// Returns the string presentation of the object @@ -105,13 +99,22 @@ public override string ToString() sb.Append("class DataModule {\n"); sb.Append(" MData: ").Append(MData).Append("\n"); sb.Append(" MLength: ").Append(MLength).Append("\n"); - sb.Append(" MType: ").Append(MType).Append("\n"); sb.Append(" MReserved1: ").Append(MReserved1).Append("\n"); sb.Append(" MReserver2: ").Append(MReserver2).Append("\n"); + sb.Append(" MType: ").Append(MType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -123,141 +126,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DataModuleJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DataModule Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option mData = default; - Option mLength = default; - Option mType = default; - Option mReserved1 = default; - Option mReserver2 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "mData": - mData = new Option(utf8JsonReader.GetString()!); - break; - case "mLength": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mLength = new Option(utf8JsonReader.GetInt32()); - break; - case "mType": - string? mTypeRawValue = utf8JsonReader.GetString(); - if (mTypeRawValue != null) - mType = new Option(BarCodeModuleTypeValueConverter.FromStringOrDefault(mTypeRawValue)); - break; - case "mReserved1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mReserved1 = new Option(utf8JsonReader.GetInt32()); - break; - case "mReserver2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mReserver2 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!mData.IsSet) - throw new ArgumentException("Property is required for class DataModule.", nameof(mData)); - - if (!mLength.IsSet) - throw new ArgumentException("Property is required for class DataModule.", nameof(mLength)); - - if (!mType.IsSet) - throw new ArgumentException("Property is required for class DataModule.", nameof(mType)); - - if (mData.IsSet && mData.Value == null) - throw new ArgumentNullException(nameof(mData), "Property is not nullable for class DataModule."); - - if (mLength.IsSet && mLength.Value == null) - throw new ArgumentNullException(nameof(mLength), "Property is not nullable for class DataModule."); - - if (mType.IsSet && mType.Value == null) - throw new ArgumentNullException(nameof(mType), "Property is not nullable for class DataModule."); - - if (mReserved1.IsSet && mReserved1.Value == null) - throw new ArgumentNullException(nameof(mReserved1), "Property is not nullable for class DataModule."); - - if (mReserver2.IsSet && mReserver2.Value == null) - throw new ArgumentNullException(nameof(mReserver2), "Property is not nullable for class DataModule."); - - return new DataModule(mData.Value!, mLength.Value!.Value!, mType.Value!.Value!, mReserved1, mReserver2); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DataModule dataModule, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, dataModule, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DataModule dataModule, JsonSerializerOptions jsonSerializerOptions) - { - if (dataModule.MData == null) - throw new ArgumentNullException(nameof(dataModule.MData), "Property is required for class DataModule."); - - writer.WriteString("mData", dataModule.MData); - - writer.WriteNumber("mLength", dataModule.MLength); - - var mTypeRawValue = BarCodeModuleTypeValueConverter.ToJsonValue(dataModule.MType); - writer.WriteNumber("mType", mTypeRawValue); - - if (dataModule.MReserved1Option.IsSet) - writer.WriteNumber("mReserved1", dataModule.MReserved1Option.Value!.Value); - - if (dataModule.MReserver2Option.IsSet) - writer.WriteNumber("mReserver2", dataModule.MReserver2Option.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs index 6febc8a..a839854 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,110 +14,108 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Details on performed optical checks /// + [DataContract(Name = "detailsOptical")] public partial class DetailsOptical : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// overallStatus - /// docType - /// expiry - /// imageQA - /// mrz - /// Number of processed pages in the document - /// security - /// text - /// vds - [JsonConstructor] - public DetailsOptical(CheckResult overallStatus, CheckResult docType, CheckResult expiry, CheckResult imageQA, CheckResult mrz, int pagesCount, CheckResult security, CheckResult text, Option vds = default) - { - OverallStatus = overallStatus; - DocType = docType; - Expiry = expiry; - ImageQA = imageQA; - Mrz = mrz; - PagesCount = pagesCount; - Security = security; - Text = text; - VdsOption = vds; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets OverallStatus /// - [JsonPropertyName("overallStatus")] + [DataMember(Name = "overallStatus", IsRequired = true, EmitDefaultValue = true)] public CheckResult OverallStatus { get; set; } /// /// Gets or Sets DocType /// - [JsonPropertyName("docType")] + [DataMember(Name = "docType", IsRequired = true, EmitDefaultValue = true)] public CheckResult DocType { get; set; } /// /// Gets or Sets Expiry /// - [JsonPropertyName("expiry")] + [DataMember(Name = "expiry", IsRequired = true, EmitDefaultValue = true)] public CheckResult Expiry { get; set; } /// /// Gets or Sets ImageQA /// - [JsonPropertyName("imageQA")] + [DataMember(Name = "imageQA", IsRequired = true, EmitDefaultValue = true)] public CheckResult ImageQA { get; set; } /// /// Gets or Sets Mrz /// - [JsonPropertyName("mrz")] + [DataMember(Name = "mrz", IsRequired = true, EmitDefaultValue = true)] public CheckResult Mrz { get; set; } /// /// Gets or Sets Security /// - [JsonPropertyName("security")] + [DataMember(Name = "security", IsRequired = true, EmitDefaultValue = true)] public CheckResult Security { get; set; } /// /// Gets or Sets Text /// - [JsonPropertyName("text")] + [DataMember(Name = "text", IsRequired = true, EmitDefaultValue = true)] public CheckResult Text { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DetailsOptical() { } + /// + /// Initializes a new instance of the class. + /// + /// overallStatus (required). + /// docType (required). + /// expiry (required). + /// imageQA (required). + /// mrz (required). + /// Number of processed pages in the document (required). + /// security (required). + /// text (required). + /// vds. + public DetailsOptical(CheckResult overallStatus = default(CheckResult), CheckResult docType = default(CheckResult), CheckResult expiry = default(CheckResult), CheckResult imageQA = default(CheckResult), CheckResult mrz = default(CheckResult), int pagesCount = default(int), CheckResult security = default(CheckResult), CheckResult text = default(CheckResult), int vds = default(int)) + { + this.OverallStatus = overallStatus; + this.DocType = docType; + this.Expiry = expiry; + this.ImageQA = imageQA; + this.Mrz = mrz; + this.PagesCount = pagesCount; + this.Security = security; + this.Text = text; + this.Vds = vds; + } /// /// Number of processed pages in the document /// /// Number of processed pages in the document - [JsonPropertyName("pagesCount")] + [DataMember(Name = "pagesCount", IsRequired = true, EmitDefaultValue = true)] public int PagesCount { get; set; } - /// - /// Used to track the state of Vds - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option VdsOption { get; private set; } - /// /// Gets or Sets Vds /// - [JsonPropertyName("vds")] - public int? Vds { get { return this.VdsOption; } set { this.VdsOption = new(value); } } + [DataMember(Name = "vds", EmitDefaultValue = false)] + public int Vds { get; set; } /// /// Returns the string presentation of the object @@ -142,6 +138,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -153,205 +158,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DetailsOpticalJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DetailsOptical Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option overallStatus = default; - Option docType = default; - Option expiry = default; - Option imageQA = default; - Option mrz = default; - Option pagesCount = default; - Option security = default; - Option text = default; - Option vds = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "overallStatus": - string? overallStatusRawValue = utf8JsonReader.GetString(); - if (overallStatusRawValue != null) - overallStatus = new Option(CheckResultValueConverter.FromStringOrDefault(overallStatusRawValue)); - break; - case "docType": - string? docTypeRawValue = utf8JsonReader.GetString(); - if (docTypeRawValue != null) - docType = new Option(CheckResultValueConverter.FromStringOrDefault(docTypeRawValue)); - break; - case "expiry": - string? expiryRawValue = utf8JsonReader.GetString(); - if (expiryRawValue != null) - expiry = new Option(CheckResultValueConverter.FromStringOrDefault(expiryRawValue)); - break; - case "imageQA": - string? imageQARawValue = utf8JsonReader.GetString(); - if (imageQARawValue != null) - imageQA = new Option(CheckResultValueConverter.FromStringOrDefault(imageQARawValue)); - break; - case "mrz": - string? mrzRawValue = utf8JsonReader.GetString(); - if (mrzRawValue != null) - mrz = new Option(CheckResultValueConverter.FromStringOrDefault(mrzRawValue)); - break; - case "pagesCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pagesCount = new Option(utf8JsonReader.GetInt32()); - break; - case "security": - string? securityRawValue = utf8JsonReader.GetString(); - if (securityRawValue != null) - security = new Option(CheckResultValueConverter.FromStringOrDefault(securityRawValue)); - break; - case "text": - string? textRawValue = utf8JsonReader.GetString(); - if (textRawValue != null) - text = new Option(CheckResultValueConverter.FromStringOrDefault(textRawValue)); - break; - case "vds": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - vds = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!overallStatus.IsSet) - throw new ArgumentException("Property is required for class DetailsOptical.", nameof(overallStatus)); - - if (!docType.IsSet) - throw new ArgumentException("Property is required for class DetailsOptical.", nameof(docType)); - - if (!expiry.IsSet) - throw new ArgumentException("Property is required for class DetailsOptical.", nameof(expiry)); - - if (!imageQA.IsSet) - throw new ArgumentException("Property is required for class DetailsOptical.", nameof(imageQA)); - - if (!mrz.IsSet) - throw new ArgumentException("Property is required for class DetailsOptical.", nameof(mrz)); - - if (!pagesCount.IsSet) - throw new ArgumentException("Property is required for class DetailsOptical.", nameof(pagesCount)); - - if (!security.IsSet) - throw new ArgumentException("Property is required for class DetailsOptical.", nameof(security)); - - if (!text.IsSet) - throw new ArgumentException("Property is required for class DetailsOptical.", nameof(text)); - - if (overallStatus.IsSet && overallStatus.Value == null) - throw new ArgumentNullException(nameof(overallStatus), "Property is not nullable for class DetailsOptical."); - - if (docType.IsSet && docType.Value == null) - throw new ArgumentNullException(nameof(docType), "Property is not nullable for class DetailsOptical."); - - if (expiry.IsSet && expiry.Value == null) - throw new ArgumentNullException(nameof(expiry), "Property is not nullable for class DetailsOptical."); - - if (imageQA.IsSet && imageQA.Value == null) - throw new ArgumentNullException(nameof(imageQA), "Property is not nullable for class DetailsOptical."); - - if (mrz.IsSet && mrz.Value == null) - throw new ArgumentNullException(nameof(mrz), "Property is not nullable for class DetailsOptical."); - - if (pagesCount.IsSet && pagesCount.Value == null) - throw new ArgumentNullException(nameof(pagesCount), "Property is not nullable for class DetailsOptical."); - - if (security.IsSet && security.Value == null) - throw new ArgumentNullException(nameof(security), "Property is not nullable for class DetailsOptical."); - - if (text.IsSet && text.Value == null) - throw new ArgumentNullException(nameof(text), "Property is not nullable for class DetailsOptical."); - - if (vds.IsSet && vds.Value == null) - throw new ArgumentNullException(nameof(vds), "Property is not nullable for class DetailsOptical."); - - return new DetailsOptical(overallStatus.Value!.Value!, docType.Value!.Value!, expiry.Value!.Value!, imageQA.Value!.Value!, mrz.Value!.Value!, pagesCount.Value!.Value!, security.Value!.Value!, text.Value!.Value!, vds); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DetailsOptical detailsOptical, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, detailsOptical, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DetailsOptical detailsOptical, JsonSerializerOptions jsonSerializerOptions) - { - var overallStatusRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.OverallStatus); - writer.WriteNumber("overallStatus", overallStatusRawValue); - - var docTypeRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.DocType); - writer.WriteNumber("docType", docTypeRawValue); - - var expiryRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.Expiry); - writer.WriteNumber("expiry", expiryRawValue); - - var imageQARawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.ImageQA); - writer.WriteNumber("imageQA", imageQARawValue); - - var mrzRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.Mrz); - writer.WriteNumber("mrz", mrzRawValue); - - writer.WriteNumber("pagesCount", detailsOptical.PagesCount); - - var securityRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.Security); - writer.WriteNumber("security", securityRawValue); - - var textRawValue = CheckResultValueConverter.ToJsonValue(detailsOptical.Text); - writer.WriteNumber("text", textRawValue); - - if (detailsOptical.VdsOption.IsSet) - writer.WriteNumber("vds", detailsOptical.VdsOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs index 3318145..ead7ad9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,86 +14,91 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Details on performed RFID checks /// + [DataContract(Name = "detailsRFID")] public partial class DetailsRFID : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// overallStatus - /// aA - /// bAC - /// cA - /// pA - /// pACE - /// tA - [JsonConstructor] - public DetailsRFID(CheckResult overallStatus, CheckResult aA, CheckResult bAC, CheckResult cA, CheckResult pA, CheckResult pACE, CheckResult tA) - { - OverallStatus = overallStatus; - AA = aA; - BAC = bAC; - CA = cA; - PA = pA; - PACE = pACE; - TA = tA; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets OverallStatus /// - [JsonPropertyName("overallStatus")] + [DataMember(Name = "overallStatus", IsRequired = true, EmitDefaultValue = true)] public CheckResult OverallStatus { get; set; } /// /// Gets or Sets AA /// - [JsonPropertyName("AA")] + [DataMember(Name = "AA", IsRequired = true, EmitDefaultValue = true)] public CheckResult AA { get; set; } /// /// Gets or Sets BAC /// - [JsonPropertyName("BAC")] + [DataMember(Name = "BAC", IsRequired = true, EmitDefaultValue = true)] public CheckResult BAC { get; set; } /// /// Gets or Sets CA /// - [JsonPropertyName("CA")] + [DataMember(Name = "CA", IsRequired = true, EmitDefaultValue = true)] public CheckResult CA { get; set; } /// /// Gets or Sets PA /// - [JsonPropertyName("PA")] + [DataMember(Name = "PA", IsRequired = true, EmitDefaultValue = true)] public CheckResult PA { get; set; } /// /// Gets or Sets PACE /// - [JsonPropertyName("PACE")] + [DataMember(Name = "PACE", IsRequired = true, EmitDefaultValue = true)] public CheckResult PACE { get; set; } /// /// Gets or Sets TA /// - [JsonPropertyName("TA")] + [DataMember(Name = "TA", IsRequired = true, EmitDefaultValue = true)] public CheckResult TA { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DetailsRFID() { } + /// + /// Initializes a new instance of the class. + /// + /// overallStatus (required). + /// aA (required). + /// bAC (required). + /// cA (required). + /// pA (required). + /// pACE (required). + /// tA (required). + public DetailsRFID(CheckResult overallStatus = default(CheckResult), CheckResult aA = default(CheckResult), CheckResult bAC = default(CheckResult), CheckResult cA = default(CheckResult), CheckResult pA = default(CheckResult), CheckResult pACE = default(CheckResult), CheckResult tA = default(CheckResult)) + { + this.OverallStatus = overallStatus; + this.AA = aA; + this.BAC = bAC; + this.CA = cA; + this.PA = pA; + this.PACE = pACE; + this.TA = tA; + } /// /// Returns the string presentation of the object @@ -116,6 +119,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -127,181 +139,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DetailsRFIDJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DetailsRFID Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option overallStatus = default; - Option aA = default; - Option bAC = default; - Option cA = default; - Option pA = default; - Option pACE = default; - Option tA = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "overallStatus": - string? overallStatusRawValue = utf8JsonReader.GetString(); - if (overallStatusRawValue != null) - overallStatus = new Option(CheckResultValueConverter.FromStringOrDefault(overallStatusRawValue)); - break; - case "AA": - string? aARawValue = utf8JsonReader.GetString(); - if (aARawValue != null) - aA = new Option(CheckResultValueConverter.FromStringOrDefault(aARawValue)); - break; - case "BAC": - string? bACRawValue = utf8JsonReader.GetString(); - if (bACRawValue != null) - bAC = new Option(CheckResultValueConverter.FromStringOrDefault(bACRawValue)); - break; - case "CA": - string? cARawValue = utf8JsonReader.GetString(); - if (cARawValue != null) - cA = new Option(CheckResultValueConverter.FromStringOrDefault(cARawValue)); - break; - case "PA": - string? pARawValue = utf8JsonReader.GetString(); - if (pARawValue != null) - pA = new Option(CheckResultValueConverter.FromStringOrDefault(pARawValue)); - break; - case "PACE": - string? pACERawValue = utf8JsonReader.GetString(); - if (pACERawValue != null) - pACE = new Option(CheckResultValueConverter.FromStringOrDefault(pACERawValue)); - break; - case "TA": - string? tARawValue = utf8JsonReader.GetString(); - if (tARawValue != null) - tA = new Option(CheckResultValueConverter.FromStringOrDefault(tARawValue)); - break; - default: - break; - } - } - } - - if (!overallStatus.IsSet) - throw new ArgumentException("Property is required for class DetailsRFID.", nameof(overallStatus)); - - if (!aA.IsSet) - throw new ArgumentException("Property is required for class DetailsRFID.", nameof(aA)); - - if (!bAC.IsSet) - throw new ArgumentException("Property is required for class DetailsRFID.", nameof(bAC)); - - if (!cA.IsSet) - throw new ArgumentException("Property is required for class DetailsRFID.", nameof(cA)); - - if (!pA.IsSet) - throw new ArgumentException("Property is required for class DetailsRFID.", nameof(pA)); - - if (!pACE.IsSet) - throw new ArgumentException("Property is required for class DetailsRFID.", nameof(pACE)); - - if (!tA.IsSet) - throw new ArgumentException("Property is required for class DetailsRFID.", nameof(tA)); - - if (overallStatus.IsSet && overallStatus.Value == null) - throw new ArgumentNullException(nameof(overallStatus), "Property is not nullable for class DetailsRFID."); - - if (aA.IsSet && aA.Value == null) - throw new ArgumentNullException(nameof(aA), "Property is not nullable for class DetailsRFID."); - - if (bAC.IsSet && bAC.Value == null) - throw new ArgumentNullException(nameof(bAC), "Property is not nullable for class DetailsRFID."); - - if (cA.IsSet && cA.Value == null) - throw new ArgumentNullException(nameof(cA), "Property is not nullable for class DetailsRFID."); - - if (pA.IsSet && pA.Value == null) - throw new ArgumentNullException(nameof(pA), "Property is not nullable for class DetailsRFID."); - - if (pACE.IsSet && pACE.Value == null) - throw new ArgumentNullException(nameof(pACE), "Property is not nullable for class DetailsRFID."); - - if (tA.IsSet && tA.Value == null) - throw new ArgumentNullException(nameof(tA), "Property is not nullable for class DetailsRFID."); - - return new DetailsRFID(overallStatus.Value!.Value!, aA.Value!.Value!, bAC.Value!.Value!, cA.Value!.Value!, pA.Value!.Value!, pACE.Value!.Value!, tA.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DetailsRFID detailsRFID, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, detailsRFID, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DetailsRFID detailsRFID, JsonSerializerOptions jsonSerializerOptions) - { - var overallStatusRawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.OverallStatus); - writer.WriteNumber("overallStatus", overallStatusRawValue); - - var aARawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.AA); - writer.WriteNumber("AA", aARawValue); - - var bACRawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.BAC); - writer.WriteNumber("BAC", bACRawValue); - - var cARawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.CA); - writer.WriteNumber("CA", cARawValue); - - var pARawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.PA); - writer.WriteNumber("PA", pARawValue); - - var pACERawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.PACE); - writer.WriteNumber("PACE", pACERawValue); - - var tARawValue = CheckResultValueConverter.ToJsonValue(detailsRFID.TA); - writer.WriteNumber("TA", tARawValue); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs index 69a4273..2497b1b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,120 +14,78 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DeviceInfo /// + [DataContract(Name = "DeviceInfo")] public partial class DeviceInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// appName - /// varVersion - /// licenseId - /// licenseSerial - /// validUntil - /// serverTime - [JsonConstructor] - public DeviceInfo(Option appName = default, Option varVersion = default, Option licenseId = default, Option licenseSerial = default, Option validUntil = default, Option serverTime = default) + /// appName. + /// varVersion. + /// licenseId. + /// licenseSerial. + /// validUntil. + /// serverTime. + public DeviceInfo(string appName = default(string), string varVersion = default(string), string licenseId = default(string), string licenseSerial = default(string), DateTime validUntil = default(DateTime), DateTime serverTime = default(DateTime)) { - AppNameOption = appName; - VarVersionOption = varVersion; - LicenseIdOption = licenseId; - LicenseSerialOption = licenseSerial; - ValidUntilOption = validUntil; - ServerTimeOption = serverTime; - OnCreated(); + this.AppName = appName; + this.VarVersion = varVersion; + this.LicenseId = licenseId; + this.LicenseSerial = licenseSerial; + this.ValidUntil = validUntil; + this.ServerTime = serverTime; } - partial void OnCreated(); - - /// - /// Used to track the state of AppName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AppNameOption { get; private set; } - /// /// Gets or Sets AppName /// - [JsonPropertyName("app-name")] - public string? AppName { get { return this.AppNameOption; } set { this.AppNameOption = new(value); } } - - /// - /// Used to track the state of VarVersion - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option VarVersionOption { get; private set; } + [DataMember(Name = "app-name", EmitDefaultValue = false)] + public string AppName { get; set; } /// /// Gets or Sets VarVersion /// - [JsonPropertyName("version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } - - /// - /// Used to track the state of LicenseId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LicenseIdOption { get; private set; } + [DataMember(Name = "version", EmitDefaultValue = false)] + public string VarVersion { get; set; } /// /// Gets or Sets LicenseId /// - [JsonPropertyName("license-id")] - public string? LicenseId { get { return this.LicenseIdOption; } set { this.LicenseIdOption = new(value); } } - - /// - /// Used to track the state of LicenseSerial - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LicenseSerialOption { get; private set; } + [DataMember(Name = "license-id", EmitDefaultValue = false)] + public string LicenseId { get; set; } /// /// Gets or Sets LicenseSerial /// - [JsonPropertyName("license-serial")] - public string? LicenseSerial { get { return this.LicenseSerialOption; } set { this.LicenseSerialOption = new(value); } } - - /// - /// Used to track the state of ValidUntil - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ValidUntilOption { get; private set; } + [DataMember(Name = "license-serial", EmitDefaultValue = false)] + public string LicenseSerial { get; set; } /// /// Gets or Sets ValidUntil /// - [JsonPropertyName("valid-until")] - public DateTime? ValidUntil { get { return this.ValidUntilOption; } set { this.ValidUntilOption = new(value); } } - - /// - /// Used to track the state of ServerTime - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ServerTimeOption { get; private set; } + [DataMember(Name = "valid-until", EmitDefaultValue = false)] + public DateTime ValidUntil { get; set; } /// /// Gets or Sets ServerTime /// - [JsonPropertyName("server-time")] - public DateTime? ServerTime { get { return this.ServerTimeOption; } set { this.ServerTimeOption = new(value); } } + [DataMember(Name = "server-time", EmitDefaultValue = false)] + public DateTime ServerTime { get; set; } /// /// Returns the string presentation of the object @@ -149,6 +105,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -160,160 +125,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DeviceInfoJsonConverter : JsonConverter - { - /// - /// The format to use to serialize ValidUntil - /// - public static string ValidUntilFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// The format to use to serialize ServerTime - /// - public static string ServerTimeFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DeviceInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option appName = default; - Option varVersion = default; - Option licenseId = default; - Option licenseSerial = default; - Option validUntil = default; - Option serverTime = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "app-name": - appName = new Option(utf8JsonReader.GetString()!); - break; - case "version": - varVersion = new Option(utf8JsonReader.GetString()!); - break; - case "license-id": - licenseId = new Option(utf8JsonReader.GetString()!); - break; - case "license-serial": - licenseSerial = new Option(utf8JsonReader.GetString()!); - break; - case "valid-until": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - validUntil = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "server-time": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - serverTime = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - default: - break; - } - } - } - - if (appName.IsSet && appName.Value == null) - throw new ArgumentNullException(nameof(appName), "Property is not nullable for class DeviceInfo."); - - if (varVersion.IsSet && varVersion.Value == null) - throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class DeviceInfo."); - - if (licenseId.IsSet && licenseId.Value == null) - throw new ArgumentNullException(nameof(licenseId), "Property is not nullable for class DeviceInfo."); - - if (licenseSerial.IsSet && licenseSerial.Value == null) - throw new ArgumentNullException(nameof(licenseSerial), "Property is not nullable for class DeviceInfo."); - - if (validUntil.IsSet && validUntil.Value == null) - throw new ArgumentNullException(nameof(validUntil), "Property is not nullable for class DeviceInfo."); - - if (serverTime.IsSet && serverTime.Value == null) - throw new ArgumentNullException(nameof(serverTime), "Property is not nullable for class DeviceInfo."); - - return new DeviceInfo(appName, varVersion, licenseId, licenseSerial, validUntil, serverTime); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DeviceInfo deviceInfo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, deviceInfo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DeviceInfo deviceInfo, JsonSerializerOptions jsonSerializerOptions) - { - if (deviceInfo.AppNameOption.IsSet && deviceInfo.AppName == null) - throw new ArgumentNullException(nameof(deviceInfo.AppName), "Property is required for class DeviceInfo."); - - if (deviceInfo.VarVersionOption.IsSet && deviceInfo.VarVersion == null) - throw new ArgumentNullException(nameof(deviceInfo.VarVersion), "Property is required for class DeviceInfo."); - - if (deviceInfo.LicenseIdOption.IsSet && deviceInfo.LicenseId == null) - throw new ArgumentNullException(nameof(deviceInfo.LicenseId), "Property is required for class DeviceInfo."); - - if (deviceInfo.LicenseSerialOption.IsSet && deviceInfo.LicenseSerial == null) - throw new ArgumentNullException(nameof(deviceInfo.LicenseSerial), "Property is required for class DeviceInfo."); - - if (deviceInfo.AppNameOption.IsSet) - writer.WriteString("app-name", deviceInfo.AppName); - - if (deviceInfo.VarVersionOption.IsSet) - writer.WriteString("version", deviceInfo.VarVersion); - - if (deviceInfo.LicenseIdOption.IsSet) - writer.WriteString("license-id", deviceInfo.LicenseId); - - if (deviceInfo.LicenseSerialOption.IsSet) - writer.WriteString("license-serial", deviceInfo.LicenseSerial); - - if (deviceInfo.ValidUntilOption.IsSet) - writer.WriteString("valid-until", deviceInfo.ValidUntilOption.Value!.Value.ToString(ValidUntilFormat)); - - if (deviceInfo.ServerTimeOption.IsSet) - writer.WriteString("server-time", deviceInfo.ServerTimeOption.Value!.Value.ToString(ServerTimeFormat)); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs index 854409c..c12053d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Raw data from BarCodes /// + [DataContract(Name = "DocBarCodeInfo")] public partial class DocBarCodeInfo : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// varDocBarCodeInfo - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public DocBarCodeInfo(DocBarCodeInfoFieldsList varDocBarCodeInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected DocBarCodeInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// varDocBarCodeInfo (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public DocBarCodeInfo(DocBarCodeInfoFieldsList varDocBarCodeInfo = default(DocBarCodeInfoFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - VarDocBarCodeInfo = varDocBarCodeInfo; - OnCreated(); + // to ensure "varDocBarCodeInfo" is required (not null) + if (varDocBarCodeInfo == null) + { + throw new ArgumentNullException("varDocBarCodeInfo is a required property for DocBarCodeInfo and cannot be null"); + } + this.VarDocBarCodeInfo = varDocBarCodeInfo; } - partial void OnCreated(); - /// /// Gets or Sets VarDocBarCodeInfo /// - [JsonPropertyName("DocBarCodeInfo")] + [DataMember(Name = "DocBarCodeInfo", IsRequired = true, EmitDefaultValue = true)] public DocBarCodeInfoFieldsList VarDocBarCodeInfo { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DocBarCodeInfo {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" VarDocBarCodeInfo: ").Append(VarDocBarCodeInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class DocBarCodeInfoJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override DocBarCodeInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option varDocBarCodeInfo = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocBarCodeInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - varDocBarCodeInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!varDocBarCodeInfo.IsSet) - throw new ArgumentException("Property is required for class DocBarCodeInfo.", nameof(varDocBarCodeInfo)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class DocBarCodeInfo.", nameof(resultType)); - - if (varDocBarCodeInfo.IsSet && varDocBarCodeInfo.Value == null) - throw new ArgumentNullException(nameof(varDocBarCodeInfo), "Property is not nullable for class DocBarCodeInfo."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocBarCodeInfo."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocBarCodeInfo."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocBarCodeInfo."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocBarCodeInfo."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocBarCodeInfo."); - - return new DocBarCodeInfo(varDocBarCodeInfo.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocBarCodeInfo docBarCodeInfo, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, docBarCodeInfo, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocBarCodeInfo docBarCodeInfo, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (docBarCodeInfo.VarDocBarCodeInfo == null) - throw new ArgumentNullException(nameof(docBarCodeInfo.VarDocBarCodeInfo), "Property is required for class DocBarCodeInfo."); - - writer.WritePropertyName("DocBarCodeInfo"); - JsonSerializer.Serialize(writer, docBarCodeInfo.VarDocBarCodeInfo, jsonSerializerOptions); - if (docBarCodeInfo.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", docBarCodeInfo.BufLengthOption.Value!.Value); - - if (docBarCodeInfo.LightOption.IsSet) - writer.WriteNumber("light", docBarCodeInfo.LightOption.Value!.Value); - - if (docBarCodeInfo.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", docBarCodeInfo.ListIdxOption.Value!.Value); - - if (docBarCodeInfo.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", docBarCodeInfo.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", docBarCodeInfo.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs index 910e307..ae0be5e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoFieldsList.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,47 +14,57 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocBarCodeInfoFieldsList /// + [DataContract(Name = "DocBarCodeInfoFieldsList")] public partial class DocBarCodeInfoFieldsList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Count of array fields - /// Data from barcode - [JsonConstructor] - public DocBarCodeInfoFieldsList(int nFields, List pArrayFields) + [JsonConstructorAttribute] + protected DocBarCodeInfoFieldsList() { } + /// + /// Initializes a new instance of the class. + /// + /// Count of array fields (required). + /// Data from barcode (required). + public DocBarCodeInfoFieldsList(int nFields = default(int), List pArrayFields = default(List)) { - NFields = nFields; - PArrayFields = pArrayFields; - OnCreated(); + this.NFields = nFields; + // to ensure "pArrayFields" is required (not null) + if (pArrayFields == null) + { + throw new ArgumentNullException("pArrayFields is a required property for DocBarCodeInfoFieldsList and cannot be null"); + } + this.PArrayFields = pArrayFields; } - partial void OnCreated(); - /// /// Count of array fields /// /// Count of array fields - [JsonPropertyName("nFields")] + [DataMember(Name = "nFields", IsRequired = true, EmitDefaultValue = true)] public int NFields { get; set; } /// /// Data from barcode /// /// Data from barcode - [JsonPropertyName("pArrayFields")] + [DataMember(Name = "pArrayFields", IsRequired = true, EmitDefaultValue = true)] public List PArrayFields { get; set; } /// @@ -73,6 +81,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -84,106 +101,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocBarCodeInfoFieldsListJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocBarCodeInfoFieldsList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option nFields = default; - Option?> pArrayFields = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "nFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - nFields = new Option(utf8JsonReader.GetInt32()); - break; - case "pArrayFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pArrayFields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!nFields.IsSet) - throw new ArgumentException("Property is required for class DocBarCodeInfoFieldsList.", nameof(nFields)); - - if (!pArrayFields.IsSet) - throw new ArgumentException("Property is required for class DocBarCodeInfoFieldsList.", nameof(pArrayFields)); - - if (nFields.IsSet && nFields.Value == null) - throw new ArgumentNullException(nameof(nFields), "Property is not nullable for class DocBarCodeInfoFieldsList."); - - if (pArrayFields.IsSet && pArrayFields.Value == null) - throw new ArgumentNullException(nameof(pArrayFields), "Property is not nullable for class DocBarCodeInfoFieldsList."); - - return new DocBarCodeInfoFieldsList(nFields.Value!.Value!, pArrayFields.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocBarCodeInfoFieldsList docBarCodeInfoFieldsList, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, docBarCodeInfoFieldsList, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocBarCodeInfoFieldsList docBarCodeInfoFieldsList, JsonSerializerOptions jsonSerializerOptions) - { - if (docBarCodeInfoFieldsList.PArrayFields == null) - throw new ArgumentNullException(nameof(docBarCodeInfoFieldsList.PArrayFields), "Property is required for class DocBarCodeInfoFieldsList."); - - writer.WriteNumber("nFields", docBarCodeInfoFieldsList.NFields); - - writer.WritePropertyName("pArrayFields"); - JsonSerializer.Serialize(writer, docBarCodeInfoFieldsList.PArrayFields, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs index f6af96e..318f993 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfoItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocBarCodeInfoItem /// + [DataContract(Name = "DocBarCodeInfoItem")] public partial class DocBarCodeInfoItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// docBarCodeInfo - [JsonConstructor] - public DocBarCodeInfoItem(DocBarCodeInfoFieldsList docBarCodeInfo) + [JsonConstructorAttribute] + protected DocBarCodeInfoItem() { } + /// + /// Initializes a new instance of the class. + /// + /// docBarCodeInfo (required). + public DocBarCodeInfoItem(DocBarCodeInfoFieldsList docBarCodeInfo = default(DocBarCodeInfoFieldsList)) { - DocBarCodeInfo = docBarCodeInfo; - OnCreated(); + // to ensure "docBarCodeInfo" is required (not null) + if (docBarCodeInfo == null) + { + throw new ArgumentNullException("docBarCodeInfo is a required property for DocBarCodeInfoItem and cannot be null"); + } + this.DocBarCodeInfo = docBarCodeInfo; } - partial void OnCreated(); - /// /// Gets or Sets DocBarCodeInfo /// - [JsonPropertyName("DocBarCodeInfo")] + [DataMember(Name = "DocBarCodeInfo", IsRequired = true, EmitDefaultValue = true)] public DocBarCodeInfoFieldsList DocBarCodeInfo { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocBarCodeInfoItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocBarCodeInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docBarCodeInfo = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocBarCodeInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docBarCodeInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!docBarCodeInfo.IsSet) - throw new ArgumentException("Property is required for class DocBarCodeInfoItem.", nameof(docBarCodeInfo)); - - if (docBarCodeInfo.IsSet && docBarCodeInfo.Value == null) - throw new ArgumentNullException(nameof(docBarCodeInfo), "Property is not nullable for class DocBarCodeInfoItem."); - - return new DocBarCodeInfoItem(docBarCodeInfo.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocBarCodeInfoItem docBarCodeInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, docBarCodeInfoItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocBarCodeInfoItem docBarCodeInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - if (docBarCodeInfoItem.DocBarCodeInfo == null) - throw new ArgumentNullException(nameof(docBarCodeInfoItem.DocBarCodeInfo), "Property is required for class DocBarCodeInfoItem."); - - writer.WritePropertyName("DocBarCodeInfo"); - JsonSerializer.Serialize(writer, docBarCodeInfoItem.DocBarCodeInfo, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs index 819dc7e..1ae6878 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocGraphicsInfoItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocGraphicsInfoItem /// + [DataContract(Name = "DocGraphicsInfoItem")] public partial class DocGraphicsInfoItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// docGraphicsInfo - [JsonConstructor] - public DocGraphicsInfoItem(GraphicFieldsList docGraphicsInfo) + [JsonConstructorAttribute] + protected DocGraphicsInfoItem() { } + /// + /// Initializes a new instance of the class. + /// + /// docGraphicsInfo (required). + public DocGraphicsInfoItem(GraphicFieldsList docGraphicsInfo = default(GraphicFieldsList)) { - DocGraphicsInfo = docGraphicsInfo; - OnCreated(); + // to ensure "docGraphicsInfo" is required (not null) + if (docGraphicsInfo == null) + { + throw new ArgumentNullException("docGraphicsInfo is a required property for DocGraphicsInfoItem and cannot be null"); + } + this.DocGraphicsInfo = docGraphicsInfo; } - partial void OnCreated(); - /// /// Gets or Sets DocGraphicsInfo /// - [JsonPropertyName("DocGraphicsInfo")] + [DataMember(Name = "DocGraphicsInfo", IsRequired = true, EmitDefaultValue = true)] public GraphicFieldsList DocGraphicsInfo { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocGraphicsInfoItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocGraphicsInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docGraphicsInfo = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocGraphicsInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docGraphicsInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!docGraphicsInfo.IsSet) - throw new ArgumentException("Property is required for class DocGraphicsInfoItem.", nameof(docGraphicsInfo)); - - if (docGraphicsInfo.IsSet && docGraphicsInfo.Value == null) - throw new ArgumentNullException(nameof(docGraphicsInfo), "Property is not nullable for class DocGraphicsInfoItem."); - - return new DocGraphicsInfoItem(docGraphicsInfo.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocGraphicsInfoItem docGraphicsInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, docGraphicsInfoItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocGraphicsInfoItem docGraphicsInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - if (docGraphicsInfoItem.DocGraphicsInfo == null) - throw new ArgumentNullException(nameof(docGraphicsInfoItem.DocGraphicsInfo), "Property is required for class DocGraphicsInfoItem."); - - writer.WritePropertyName("DocGraphicsInfo"); - JsonSerializer.Serialize(writer, docGraphicsInfoItem.DocGraphicsInfo, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs index b7d8c23..f4c6b4b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedField.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,50 +14,60 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocVisualExtendedField /// + [DataContract(Name = "DocVisualExtendedField")] public partial class DocVisualExtendedField : VisualExtendedFieldItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// fieldType - /// wFieldType - /// Field symbolic name (null-terminated string) - /// Number of StringsResult array elements - /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. - /// Buf_Text text string length - /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' - /// fieldRect - /// fieldMask - /// validity - /// inComparison - /// wLCID - /// reserved2 - /// reserved3 - [JsonConstructor] - public DocVisualExtendedField(int fieldType, TextFieldType wFieldType, string fieldName, decimal stringsCount, List stringsResult, decimal bufLength, string bufText, RectangleCoordinates fieldRect, Option fieldMask = default, Option validity = default, Option inComparison = default, Option wLCID = default, Option reserved2 = default, Option reserved3 = default) : base(fieldType, wFieldType, fieldName, stringsCount, stringsResult, bufLength, bufText, fieldMask, validity, inComparison, wLCID, reserved2, reserved3) + [JsonConstructorAttribute] + protected DocVisualExtendedField() { } + /// + /// Initializes a new instance of the class. + /// + /// fieldRect (required). + /// fieldType (required). + /// wFieldType (required). + /// Field symbolic name (null-terminated string) (required). + /// Number of StringsResult array elements (required). + /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. (required). + /// Buf_Text text string length (required). + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' (required). + /// fieldMask. + /// validity. + /// inComparison. + /// wLCID. + /// reserved2. + /// reserved3. + public DocVisualExtendedField(RectangleCoordinates fieldRect = default(RectangleCoordinates), int fieldType = default(int), TextFieldType wFieldType = default(TextFieldType), string fieldName = default(string), decimal stringsCount = default(decimal), List stringsResult = default(List), decimal bufLength = default(decimal), string bufText = default(string), string fieldMask = default(string), int validity = default(int), int inComparison = default(int), int wLCID = default(int), int reserved2 = default(int), int reserved3 = default(int)) : base(fieldType, wFieldType, fieldName, stringsCount, stringsResult, bufLength, bufText, fieldMask, validity, inComparison, wLCID, reserved2, reserved3) { - FieldRect = fieldRect; - OnCreated(); + // to ensure "fieldRect" is required (not null) + if (fieldRect == null) + { + throw new ArgumentNullException("fieldRect is a required property for DocVisualExtendedField and cannot be null"); + } + this.FieldRect = fieldRect; } - partial void OnCreated(); - /// /// Gets or Sets FieldRect /// - [JsonPropertyName("FieldRect")] + [DataMember(Name = "FieldRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates FieldRect { get; set; } /// @@ -70,267 +78,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DocVisualExtendedField {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class DocVisualExtendedFieldJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override DocVisualExtendedField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldType = default; - Option wFieldType = default; - Option fieldName = default; - Option stringsCount = default; - Option?> stringsResult = default; - Option bufLength = default; - Option bufText = default; - Option fieldRect = default; - Option fieldMask = default; - Option validity = default; - Option inComparison = default; - Option wLCID = default; - Option reserved2 = default; - Option reserved3 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldType = new Option(utf8JsonReader.GetInt32()); - break; - case "wFieldType": - string? wFieldTypeRawValue = utf8JsonReader.GetString(); - if (wFieldTypeRawValue != null) - wFieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(wFieldTypeRawValue)); - break; - case "FieldName": - fieldName = new Option(utf8JsonReader.GetString()!); - break; - case "StringsCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringsCount = new Option(utf8JsonReader.GetDecimal()); - break; - case "StringsResult": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringsResult = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Buf_Length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetDecimal()); - break; - case "Buf_Text": - bufText = new Option(utf8JsonReader.GetString()!); - break; - case "FieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "FieldMask": - fieldMask = new Option(utf8JsonReader.GetString()!); - break; - case "Validity": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - validity = new Option(utf8JsonReader.GetInt32()); - break; - case "InComparison": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - inComparison = new Option(utf8JsonReader.GetInt32()); - break; - case "wLCID": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - wLCID = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved3": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved3 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(fieldType)); - - if (!wFieldType.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(wFieldType)); - - if (!fieldName.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(fieldName)); - - if (!stringsCount.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(stringsCount)); - - if (!stringsResult.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(stringsResult)); - - if (!bufLength.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(bufLength)); - - if (!bufText.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(bufText)); - - if (!fieldRect.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedField.", nameof(fieldRect)); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class DocVisualExtendedField."); - - if (wFieldType.IsSet && wFieldType.Value == null) - throw new ArgumentNullException(nameof(wFieldType), "Property is not nullable for class DocVisualExtendedField."); - - if (fieldName.IsSet && fieldName.Value == null) - throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class DocVisualExtendedField."); - - if (stringsCount.IsSet && stringsCount.Value == null) - throw new ArgumentNullException(nameof(stringsCount), "Property is not nullable for class DocVisualExtendedField."); - - if (stringsResult.IsSet && stringsResult.Value == null) - throw new ArgumentNullException(nameof(stringsResult), "Property is not nullable for class DocVisualExtendedField."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocVisualExtendedField."); - - if (bufText.IsSet && bufText.Value == null) - throw new ArgumentNullException(nameof(bufText), "Property is not nullable for class DocVisualExtendedField."); - - if (fieldRect.IsSet && fieldRect.Value == null) - throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class DocVisualExtendedField."); - - if (fieldMask.IsSet && fieldMask.Value == null) - throw new ArgumentNullException(nameof(fieldMask), "Property is not nullable for class DocVisualExtendedField."); - - if (validity.IsSet && validity.Value == null) - throw new ArgumentNullException(nameof(validity), "Property is not nullable for class DocVisualExtendedField."); - - if (inComparison.IsSet && inComparison.Value == null) - throw new ArgumentNullException(nameof(inComparison), "Property is not nullable for class DocVisualExtendedField."); - - if (wLCID.IsSet && wLCID.Value == null) - throw new ArgumentNullException(nameof(wLCID), "Property is not nullable for class DocVisualExtendedField."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class DocVisualExtendedField."); - - if (reserved3.IsSet && reserved3.Value == null) - throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class DocVisualExtendedField."); - - return new DocVisualExtendedField(fieldType.Value!.Value!, wFieldType.Value!.Value!, fieldName.Value!, stringsCount.Value!.Value!, stringsResult.Value!, bufLength.Value!.Value!, bufText.Value!, fieldRect.Value!, fieldMask, validity, inComparison, wLCID, reserved2, reserved3); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocVisualExtendedField docVisualExtendedField, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, docVisualExtendedField, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocVisualExtendedField docVisualExtendedField, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (docVisualExtendedField.FieldName == null) - throw new ArgumentNullException(nameof(docVisualExtendedField.FieldName), "Property is required for class DocVisualExtendedField."); - - if (docVisualExtendedField.StringsResult == null) - throw new ArgumentNullException(nameof(docVisualExtendedField.StringsResult), "Property is required for class DocVisualExtendedField."); - - if (docVisualExtendedField.BufText == null) - throw new ArgumentNullException(nameof(docVisualExtendedField.BufText), "Property is required for class DocVisualExtendedField."); - - if (docVisualExtendedField.FieldRect == null) - throw new ArgumentNullException(nameof(docVisualExtendedField.FieldRect), "Property is required for class DocVisualExtendedField."); - - if (docVisualExtendedField.FieldMaskOption.IsSet && docVisualExtendedField.FieldMask == null) - throw new ArgumentNullException(nameof(docVisualExtendedField.FieldMask), "Property is required for class DocVisualExtendedField."); - - writer.WriteNumber("FieldType", docVisualExtendedField.FieldType); - - var wFieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(docVisualExtendedField.WFieldType); - writer.WriteNumber("wFieldType", wFieldTypeRawValue); - - writer.WriteString("FieldName", docVisualExtendedField.FieldName); - - writer.WriteNumber("StringsCount", docVisualExtendedField.StringsCount); - - writer.WritePropertyName("StringsResult"); - JsonSerializer.Serialize(writer, docVisualExtendedField.StringsResult, jsonSerializerOptions); - writer.WriteNumber("Buf_Length", docVisualExtendedField.BufLength); - - writer.WriteString("Buf_Text", docVisualExtendedField.BufText); - - writer.WritePropertyName("FieldRect"); - JsonSerializer.Serialize(writer, docVisualExtendedField.FieldRect, jsonSerializerOptions); - if (docVisualExtendedField.FieldMaskOption.IsSet) - writer.WriteString("FieldMask", docVisualExtendedField.FieldMask); - - if (docVisualExtendedField.ValidityOption.IsSet) - writer.WriteNumber("Validity", docVisualExtendedField.ValidityOption.Value!.Value); - - if (docVisualExtendedField.InComparisonOption.IsSet) - writer.WriteNumber("InComparison", docVisualExtendedField.InComparisonOption.Value!.Value); - - if (docVisualExtendedField.WLCIDOption.IsSet) - writer.WriteNumber("wLCID", docVisualExtendedField.WLCIDOption.Value!.Value); - - if (docVisualExtendedField.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", docVisualExtendedField.Reserved2Option.Value!.Value); - - if (docVisualExtendedField.Reserved3Option.IsSet) - writer.WriteNumber("Reserved3", docVisualExtendedField.Reserved3Option.Value!.Value); + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs index e676e06..75af5ec 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedFieldItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocVisualExtendedFieldItem /// + [DataContract(Name = "DocVisualExtendedFieldItem")] public partial class DocVisualExtendedFieldItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// fieldRect - [JsonConstructor] - public DocVisualExtendedFieldItem(RectangleCoordinates fieldRect) + [JsonConstructorAttribute] + protected DocVisualExtendedFieldItem() { } + /// + /// Initializes a new instance of the class. + /// + /// fieldRect (required). + public DocVisualExtendedFieldItem(RectangleCoordinates fieldRect = default(RectangleCoordinates)) { - FieldRect = fieldRect; - OnCreated(); + // to ensure "fieldRect" is required (not null) + if (fieldRect == null) + { + throw new ArgumentNullException("fieldRect is a required property for DocVisualExtendedFieldItem and cannot be null"); + } + this.FieldRect = fieldRect; } - partial void OnCreated(); - /// /// Gets or Sets FieldRect /// - [JsonPropertyName("FieldRect")] + [DataMember(Name = "FieldRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates FieldRect { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocVisualExtendedFieldItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocVisualExtendedFieldItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldRect = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!fieldRect.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedFieldItem.", nameof(fieldRect)); - - if (fieldRect.IsSet && fieldRect.Value == null) - throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class DocVisualExtendedFieldItem."); - - return new DocVisualExtendedFieldItem(fieldRect.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocVisualExtendedFieldItem docVisualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, docVisualExtendedFieldItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocVisualExtendedFieldItem docVisualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) - { - if (docVisualExtendedFieldItem.FieldRect == null) - throw new ArgumentNullException(nameof(docVisualExtendedFieldItem.FieldRect), "Property is required for class DocVisualExtendedFieldItem."); - - writer.WritePropertyName("FieldRect"); - JsonSerializer.Serialize(writer, docVisualExtendedFieldItem.FieldRect, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs index 953cb3e..102ff06 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,46 +14,56 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Container for extracted text fields. Fields are identified by type and language /// + [DataContract(Name = "DocVisualExtendedInfo")] public partial class DocVisualExtendedInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Number of pArrayFields array elements - /// pArrayFields - [JsonConstructor] - public DocVisualExtendedInfo(decimal nFields, List pArrayFields) + [JsonConstructorAttribute] + protected DocVisualExtendedInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// Number of pArrayFields array elements (required). + /// pArrayFields (required). + public DocVisualExtendedInfo(decimal nFields = default(decimal), List pArrayFields = default(List)) { - NFields = nFields; - PArrayFields = pArrayFields; - OnCreated(); + this.NFields = nFields; + // to ensure "pArrayFields" is required (not null) + if (pArrayFields == null) + { + throw new ArgumentNullException("pArrayFields is a required property for DocVisualExtendedInfo and cannot be null"); + } + this.PArrayFields = pArrayFields; } - partial void OnCreated(); - /// /// Number of pArrayFields array elements /// /// Number of pArrayFields array elements - [JsonPropertyName("nFields")] + [DataMember(Name = "nFields", IsRequired = true, EmitDefaultValue = true)] public decimal NFields { get; set; } /// /// Gets or Sets PArrayFields /// - [JsonPropertyName("pArrayFields")] + [DataMember(Name = "pArrayFields", IsRequired = true, EmitDefaultValue = true)] public List PArrayFields { get; set; } /// @@ -72,6 +80,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -83,106 +100,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocVisualExtendedInfoJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocVisualExtendedInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option nFields = default; - Option?> pArrayFields = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "nFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - nFields = new Option(utf8JsonReader.GetDecimal()); - break; - case "pArrayFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pArrayFields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!nFields.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedInfo.", nameof(nFields)); - - if (!pArrayFields.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedInfo.", nameof(pArrayFields)); - - if (nFields.IsSet && nFields.Value == null) - throw new ArgumentNullException(nameof(nFields), "Property is not nullable for class DocVisualExtendedInfo."); - - if (pArrayFields.IsSet && pArrayFields.Value == null) - throw new ArgumentNullException(nameof(pArrayFields), "Property is not nullable for class DocVisualExtendedInfo."); - - return new DocVisualExtendedInfo(nFields.Value!.Value!, pArrayFields.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocVisualExtendedInfo docVisualExtendedInfo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, docVisualExtendedInfo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocVisualExtendedInfo docVisualExtendedInfo, JsonSerializerOptions jsonSerializerOptions) - { - if (docVisualExtendedInfo.PArrayFields == null) - throw new ArgumentNullException(nameof(docVisualExtendedInfo.PArrayFields), "Property is required for class DocVisualExtendedInfo."); - - writer.WriteNumber("nFields", docVisualExtendedInfo.NFields); - - writer.WritePropertyName("pArrayFields"); - JsonSerializer.Serialize(writer, docVisualExtendedInfo.PArrayFields, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs index 9f10efa..c6176f9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocVisualExtendedInfoItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocVisualExtendedInfoItem /// + [DataContract(Name = "DocVisualExtendedInfoItem")] public partial class DocVisualExtendedInfoItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// docVisualExtendedInfo - [JsonConstructor] - public DocVisualExtendedInfoItem(DocVisualExtendedInfo docVisualExtendedInfo) + [JsonConstructorAttribute] + protected DocVisualExtendedInfoItem() { } + /// + /// Initializes a new instance of the class. + /// + /// docVisualExtendedInfo (required). + public DocVisualExtendedInfoItem(DocVisualExtendedInfo docVisualExtendedInfo = default(DocVisualExtendedInfo)) { - DocVisualExtendedInfo = docVisualExtendedInfo; - OnCreated(); + // to ensure "docVisualExtendedInfo" is required (not null) + if (docVisualExtendedInfo == null) + { + throw new ArgumentNullException("docVisualExtendedInfo is a required property for DocVisualExtendedInfoItem and cannot be null"); + } + this.DocVisualExtendedInfo = docVisualExtendedInfo; } - partial void OnCreated(); - /// /// Gets or Sets DocVisualExtendedInfo /// - [JsonPropertyName("DocVisualExtendedInfo")] + [DataMember(Name = "DocVisualExtendedInfo", IsRequired = true, EmitDefaultValue = true)] public DocVisualExtendedInfo DocVisualExtendedInfo { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocVisualExtendedInfoItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocVisualExtendedInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docVisualExtendedInfo = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocVisualExtendedInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docVisualExtendedInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!docVisualExtendedInfo.IsSet) - throw new ArgumentException("Property is required for class DocVisualExtendedInfoItem.", nameof(docVisualExtendedInfo)); - - if (docVisualExtendedInfo.IsSet && docVisualExtendedInfo.Value == null) - throw new ArgumentNullException(nameof(docVisualExtendedInfo), "Property is not nullable for class DocVisualExtendedInfoItem."); - - return new DocVisualExtendedInfoItem(docVisualExtendedInfo.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocVisualExtendedInfoItem docVisualExtendedInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, docVisualExtendedInfoItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocVisualExtendedInfoItem docVisualExtendedInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - if (docVisualExtendedInfoItem.DocVisualExtendedInfo == null) - throw new ArgumentNullException(nameof(docVisualExtendedInfoItem.DocVisualExtendedInfo), "Property is required for class DocVisualExtendedInfoItem."); - - writer.WritePropertyName("DocVisualExtendedInfo"); - JsonSerializer.Serialize(writer, docVisualExtendedInfoItem.DocVisualExtendedInfo, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs index 18851df..63e347c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to store the data reading results from the RFID-chip in a form of a list of the logically separated data groups. /// + [DataContract(Name = "DocumentBinaryInfoResult")] public partial class DocumentBinaryInfoResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// tDocBinaryInfo - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public DocumentBinaryInfoResult(TDocBinaryInfo tDocBinaryInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected DocumentBinaryInfoResult() { } + /// + /// Initializes a new instance of the class. + /// + /// tDocBinaryInfo (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public DocumentBinaryInfoResult(TDocBinaryInfo tDocBinaryInfo = default(TDocBinaryInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - TDocBinaryInfo = tDocBinaryInfo; - OnCreated(); + // to ensure "tDocBinaryInfo" is required (not null) + if (tDocBinaryInfo == null) + { + throw new ArgumentNullException("tDocBinaryInfo is a required property for DocumentBinaryInfoResult and cannot be null"); + } + this.TDocBinaryInfo = tDocBinaryInfo; } - partial void OnCreated(); - /// /// Gets or Sets TDocBinaryInfo /// - [JsonPropertyName("TDocBinaryInfo")] + [DataMember(Name = "TDocBinaryInfo", IsRequired = true, EmitDefaultValue = true)] public TDocBinaryInfo TDocBinaryInfo { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DocumentBinaryInfoResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" TDocBinaryInfo: ").Append(TDocBinaryInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class DocumentBinaryInfoResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override DocumentBinaryInfoResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option tDocBinaryInfo = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "TDocBinaryInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - tDocBinaryInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!tDocBinaryInfo.IsSet) - throw new ArgumentException("Property is required for class DocumentBinaryInfoResult.", nameof(tDocBinaryInfo)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class DocumentBinaryInfoResult.", nameof(resultType)); - - if (tDocBinaryInfo.IsSet && tDocBinaryInfo.Value == null) - throw new ArgumentNullException(nameof(tDocBinaryInfo), "Property is not nullable for class DocumentBinaryInfoResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocumentBinaryInfoResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocumentBinaryInfoResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocumentBinaryInfoResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocumentBinaryInfoResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocumentBinaryInfoResult."); - - return new DocumentBinaryInfoResult(tDocBinaryInfo.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentBinaryInfoResult documentBinaryInfoResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, documentBinaryInfoResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentBinaryInfoResult documentBinaryInfoResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (documentBinaryInfoResult.TDocBinaryInfo == null) - throw new ArgumentNullException(nameof(documentBinaryInfoResult.TDocBinaryInfo), "Property is required for class DocumentBinaryInfoResult."); - - writer.WritePropertyName("TDocBinaryInfo"); - JsonSerializer.Serialize(writer, documentBinaryInfoResult.TDocBinaryInfo, jsonSerializerOptions); - if (documentBinaryInfoResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", documentBinaryInfoResult.BufLengthOption.Value!.Value); - - if (documentBinaryInfoResult.LightOption.IsSet) - writer.WriteNumber("light", documentBinaryInfoResult.LightOption.Value!.Value); - - if (documentBinaryInfoResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", documentBinaryInfoResult.ListIdxOption.Value!.Value); - - if (documentBinaryInfoResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", documentBinaryInfoResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", documentBinaryInfoResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs index c6dada2..5ef4631 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentFormat.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -102,201 +103,4 @@ public enum DocumentFormat FLEXIBLE = 1002 } - /// - /// Converts to and from the JSON value - /// - public static class DocumentFormatValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static DocumentFormat FromString(string value) - { - if (value.Equals((-1).ToString())) - return DocumentFormat.UNKNOWN; - - if (value.Equals((0).ToString())) - return DocumentFormat.ID1; - - if (value.Equals((1).ToString())) - return DocumentFormat.ID2; - - if (value.Equals((2).ToString())) - return DocumentFormat.ID3; - - if (value.Equals((3).ToString())) - return DocumentFormat.NON; - - if (value.Equals((4).ToString())) - return DocumentFormat.A4; - - if (value.Equals((5).ToString())) - return DocumentFormat.ID3_X2; - - if (value.Equals((10).ToString())) - return DocumentFormat.ID1_90; - - if (value.Equals((11).ToString())) - return DocumentFormat.ID1_180; - - if (value.Equals((12).ToString())) - return DocumentFormat.ID1_270; - - if (value.Equals((13).ToString())) - return DocumentFormat.ID2_180; - - if (value.Equals((14).ToString())) - return DocumentFormat.ID3_180; - - if (value.Equals((1000).ToString())) - return DocumentFormat.CUSTOM; - - if (value.Equals((1002).ToString())) - return DocumentFormat.FLEXIBLE; - - throw new NotImplementedException($"Could not convert value to type DocumentFormat: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static DocumentFormat? FromStringOrDefault(string value) - { - if (value.Equals((-1).ToString())) - return DocumentFormat.UNKNOWN; - - if (value.Equals((0).ToString())) - return DocumentFormat.ID1; - - if (value.Equals((1).ToString())) - return DocumentFormat.ID2; - - if (value.Equals((2).ToString())) - return DocumentFormat.ID3; - - if (value.Equals((3).ToString())) - return DocumentFormat.NON; - - if (value.Equals((4).ToString())) - return DocumentFormat.A4; - - if (value.Equals((5).ToString())) - return DocumentFormat.ID3_X2; - - if (value.Equals((10).ToString())) - return DocumentFormat.ID1_90; - - if (value.Equals((11).ToString())) - return DocumentFormat.ID1_180; - - if (value.Equals((12).ToString())) - return DocumentFormat.ID1_270; - - if (value.Equals((13).ToString())) - return DocumentFormat.ID2_180; - - if (value.Equals((14).ToString())) - return DocumentFormat.ID3_180; - - if (value.Equals((1000).ToString())) - return DocumentFormat.CUSTOM; - - if (value.Equals((1002).ToString())) - return DocumentFormat.FLEXIBLE; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(DocumentFormat value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class DocumentFormatJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override DocumentFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - DocumentFormat? result = rawValue == null - ? null - : DocumentFormatValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DocumentFormat to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentFormat documentFormat, JsonSerializerOptions options) - { - writer.WriteStringValue(documentFormat.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class DocumentFormatNullableJsonConverter : JsonConverter - { - /// - /// Returns a DocumentFormat from the Json object - /// - /// - /// - /// - /// - public override DocumentFormat? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - DocumentFormat? result = rawValue == null - ? null - : DocumentFormatValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentFormat? documentFormat, JsonSerializerOptions options) - { - writer.WriteStringValue(documentFormat?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs index 823a232..2c5c800 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,56 +14,61 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentImage /// + [DataContract(Name = "DocumentImage")] public partial class DocumentImage : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Base64 encoded image - /// Image format - [JsonConstructor] - public DocumentImage(string image, Option format = default) + [JsonConstructorAttribute] + protected DocumentImage() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded image (required). + /// Image format. + public DocumentImage(string image = default(string), string format = default(string)) { - Image = image; - FormatOption = format; - OnCreated(); + // to ensure "image" is required (not null) + if (image == null) + { + throw new ArgumentNullException("image is a required property for DocumentImage and cannot be null"); + } + this.Image = image; + this.Format = format; } - partial void OnCreated(); - /// /// Base64 encoded image /// /// Base64 encoded image - /* Base64 encoded image */ - [JsonPropertyName("image")] + /* + Base64 encoded image + */ + [DataMember(Name = "image", IsRequired = true, EmitDefaultValue = true)] public string Image { get; set; } - /// - /// Used to track the state of Format - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FormatOption { get; private set; } - /// /// Image format /// /// Image format - [JsonPropertyName("format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } + [DataMember(Name = "format", EmitDefaultValue = false)] + public string Format { get; set; } /// /// Returns the string presentation of the object @@ -81,6 +84,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -92,104 +104,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocumentImageJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocumentImage Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option image = default; - Option format = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "image": - image = new Option(utf8JsonReader.GetString()!); - break; - case "format": - format = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!image.IsSet) - throw new ArgumentException("Property is required for class DocumentImage.", nameof(image)); - - if (image.IsSet && image.Value == null) - throw new ArgumentNullException(nameof(image), "Property is not nullable for class DocumentImage."); - - if (format.IsSet && format.Value == null) - throw new ArgumentNullException(nameof(format), "Property is not nullable for class DocumentImage."); - - return new DocumentImage(image.Value!, format); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentImage documentImage, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, documentImage, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentImage documentImage, JsonSerializerOptions jsonSerializerOptions) - { - if (documentImage.Image == null) - throw new ArgumentNullException(nameof(documentImage.Image), "Property is required for class DocumentImage."); - - if (documentImage.FormatOption.IsSet && documentImage.Format == null) - throw new ArgumentNullException(nameof(documentImage.Format), "Property is required for class DocumentImage."); - - writer.WriteString("image", documentImage.Image); - - if (documentImage.FormatOption.IsSet) - writer.WriteString("format", documentImage.Format); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs index 472394e..a9f8224 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains document image. /// + [DataContract(Name = "DocumentImageResult")] public partial class DocumentImageResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// rawImageContainer - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public DocumentImageResult(ImageData rawImageContainer, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected DocumentImageResult() { } + /// + /// Initializes a new instance of the class. + /// + /// rawImageContainer (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public DocumentImageResult(ImageData rawImageContainer = default(ImageData), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - RawImageContainer = rawImageContainer; - OnCreated(); + // to ensure "rawImageContainer" is required (not null) + if (rawImageContainer == null) + { + throw new ArgumentNullException("rawImageContainer is a required property for DocumentImageResult and cannot be null"); + } + this.RawImageContainer = rawImageContainer; } - partial void OnCreated(); - /// /// Gets or Sets RawImageContainer /// - [JsonPropertyName("RawImageContainer")] + [DataMember(Name = "RawImageContainer", IsRequired = true, EmitDefaultValue = true)] public ImageData RawImageContainer { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DocumentImageResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" RawImageContainer: ").Append(RawImageContainer).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class DocumentImageResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override DocumentImageResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option rawImageContainer = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RawImageContainer": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rawImageContainer = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!rawImageContainer.IsSet) - throw new ArgumentException("Property is required for class DocumentImageResult.", nameof(rawImageContainer)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class DocumentImageResult.", nameof(resultType)); - - if (rawImageContainer.IsSet && rawImageContainer.Value == null) - throw new ArgumentNullException(nameof(rawImageContainer), "Property is not nullable for class DocumentImageResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocumentImageResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocumentImageResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocumentImageResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocumentImageResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocumentImageResult."); - - return new DocumentImageResult(rawImageContainer.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentImageResult documentImageResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, documentImageResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentImageResult documentImageResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (documentImageResult.RawImageContainer == null) - throw new ArgumentNullException(nameof(documentImageResult.RawImageContainer), "Property is required for class DocumentImageResult."); - - writer.WritePropertyName("RawImageContainer"); - JsonSerializer.Serialize(writer, documentImageResult.RawImageContainer, jsonSerializerOptions); - if (documentImageResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", documentImageResult.BufLengthOption.Value!.Value); - - if (documentImageResult.LightOption.IsSet) - writer.WriteNumber("light", documentImageResult.LightOption.Value!.Value); - - if (documentImageResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", documentImageResult.ListIdxOption.Value!.Value); - - if (documentImageResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", documentImageResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", documentImageResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs index 0e948a7..4d62a02 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,188 +14,183 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentPosition /// + [DataContract(Name = "DocumentPosition")] public partial class DocumentPosition : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// docFormat - /// Document rotation angle - /// Document width - /// Document height - /// center - /// leftBottom - /// leftTop - /// rightBottom - /// rightTop - /// dpi - /// inverse - /// objArea - /// objIntAngleDev - /// perspectiveTr - /// resultStatus - [JsonConstructor] - public DocumentPosition(DocumentFormat docFormat, decimal angle, int width, int height, Point center, Point leftBottom, Point leftTop, Point rightBottom, Point rightTop, int dpi, Option inverse = default, Option objArea = default, Option objIntAngleDev = default, Option perspectiveTr = default, Option resultStatus = default) - { - DocFormat = docFormat; - Angle = angle; - Width = width; - Height = height; - Center = center; - LeftBottom = leftBottom; - LeftTop = leftTop; - RightBottom = rightBottom; - RightTop = rightTop; - Dpi = dpi; - InverseOption = inverse; - ObjAreaOption = objArea; - ObjIntAngleDevOption = objIntAngleDev; - PerspectiveTrOption = perspectiveTr; - ResultStatusOption = resultStatus; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets DocFormat /// - [JsonPropertyName("docFormat")] + [DataMember(Name = "docFormat", IsRequired = true, EmitDefaultValue = true)] public DocumentFormat DocFormat { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DocumentPosition() { } + /// + /// Initializes a new instance of the class. + /// + /// docFormat (required). + /// Document rotation angle (required). + /// Document width (required). + /// Document height (required). + /// center (required). + /// leftBottom (required). + /// leftTop (required). + /// rightBottom (required). + /// rightTop (required). + /// dpi (required). + /// inverse. + /// objArea. + /// objIntAngleDev. + /// perspectiveTr. + /// resultStatus. + public DocumentPosition(DocumentFormat docFormat = default(DocumentFormat), decimal angle = default(decimal), int width = default(int), int height = default(int), Point center = default(Point), Point leftBottom = default(Point), Point leftTop = default(Point), Point rightBottom = default(Point), Point rightTop = default(Point), int dpi = default(int), int inverse = default(int), int objArea = default(int), int objIntAngleDev = default(int), int perspectiveTr = default(int), int resultStatus = default(int)) + { + this.DocFormat = docFormat; + this.Angle = angle; + this.Width = width; + this.Height = height; + // to ensure "center" is required (not null) + if (center == null) + { + throw new ArgumentNullException("center is a required property for DocumentPosition and cannot be null"); + } + this.Center = center; + // to ensure "leftBottom" is required (not null) + if (leftBottom == null) + { + throw new ArgumentNullException("leftBottom is a required property for DocumentPosition and cannot be null"); + } + this.LeftBottom = leftBottom; + // to ensure "leftTop" is required (not null) + if (leftTop == null) + { + throw new ArgumentNullException("leftTop is a required property for DocumentPosition and cannot be null"); + } + this.LeftTop = leftTop; + // to ensure "rightBottom" is required (not null) + if (rightBottom == null) + { + throw new ArgumentNullException("rightBottom is a required property for DocumentPosition and cannot be null"); + } + this.RightBottom = rightBottom; + // to ensure "rightTop" is required (not null) + if (rightTop == null) + { + throw new ArgumentNullException("rightTop is a required property for DocumentPosition and cannot be null"); + } + this.RightTop = rightTop; + this.Dpi = dpi; + this.Inverse = inverse; + this.ObjArea = objArea; + this.ObjIntAngleDev = objIntAngleDev; + this.PerspectiveTr = perspectiveTr; + this.ResultStatus = resultStatus; + } /// /// Document rotation angle /// /// Document rotation angle - [JsonPropertyName("Angle")] + [DataMember(Name = "Angle", IsRequired = true, EmitDefaultValue = true)] public decimal Angle { get; set; } /// /// Document width /// /// Document width - [JsonPropertyName("Width")] + [DataMember(Name = "Width", IsRequired = true, EmitDefaultValue = true)] public int Width { get; set; } /// /// Document height /// /// Document height - [JsonPropertyName("Height")] + [DataMember(Name = "Height", IsRequired = true, EmitDefaultValue = true)] public int Height { get; set; } /// /// Gets or Sets Center /// - [JsonPropertyName("Center")] + [DataMember(Name = "Center", IsRequired = true, EmitDefaultValue = true)] public Point Center { get; set; } /// /// Gets or Sets LeftBottom /// - [JsonPropertyName("LeftBottom")] + [DataMember(Name = "LeftBottom", IsRequired = true, EmitDefaultValue = true)] public Point LeftBottom { get; set; } /// /// Gets or Sets LeftTop /// - [JsonPropertyName("LeftTop")] + [DataMember(Name = "LeftTop", IsRequired = true, EmitDefaultValue = true)] public Point LeftTop { get; set; } /// /// Gets or Sets RightBottom /// - [JsonPropertyName("RightBottom")] + [DataMember(Name = "RightBottom", IsRequired = true, EmitDefaultValue = true)] public Point RightBottom { get; set; } /// /// Gets or Sets RightTop /// - [JsonPropertyName("RightTop")] + [DataMember(Name = "RightTop", IsRequired = true, EmitDefaultValue = true)] public Point RightTop { get; set; } /// /// Gets or Sets Dpi /// - [JsonPropertyName("Dpi")] + [DataMember(Name = "Dpi", IsRequired = true, EmitDefaultValue = true)] public int Dpi { get; set; } - /// - /// Used to track the state of Inverse - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option InverseOption { get; private set; } - /// /// Gets or Sets Inverse /// - [JsonPropertyName("Inverse")] - public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new(value); } } - - /// - /// Used to track the state of ObjArea - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ObjAreaOption { get; private set; } + [DataMember(Name = "Inverse", EmitDefaultValue = false)] + public int Inverse { get; set; } /// /// Gets or Sets ObjArea /// - [JsonPropertyName("ObjArea")] - public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new(value); } } - - /// - /// Used to track the state of ObjIntAngleDev - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ObjIntAngleDevOption { get; private set; } + [DataMember(Name = "ObjArea", EmitDefaultValue = false)] + public int ObjArea { get; set; } /// /// Gets or Sets ObjIntAngleDev /// - [JsonPropertyName("ObjIntAngleDev")] - public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new(value); } } - - /// - /// Used to track the state of PerspectiveTr - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PerspectiveTrOption { get; private set; } + [DataMember(Name = "ObjIntAngleDev", EmitDefaultValue = false)] + public int ObjIntAngleDev { get; set; } /// /// Gets or Sets PerspectiveTr /// - [JsonPropertyName("PerspectiveTr")] - public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new(value); } } - - /// - /// Used to track the state of ResultStatus - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ResultStatusOption { get; private set; } + [DataMember(Name = "PerspectiveTr", EmitDefaultValue = false)] + public int PerspectiveTr { get; set; } /// /// Gets or Sets ResultStatus /// - [JsonPropertyName("ResultStatus")] - public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new(value); } } + [DataMember(Name = "ResultStatus", EmitDefaultValue = false)] + public int ResultStatus { get; set; } /// /// Returns the string presentation of the object @@ -226,6 +219,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -237,278 +239,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocumentPositionJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocumentPosition Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docFormat = default; - Option angle = default; - Option width = default; - Option height = default; - Option center = default; - Option leftBottom = default; - Option leftTop = default; - Option rightBottom = default; - Option rightTop = default; - Option dpi = default; - Option inverse = default; - Option objArea = default; - Option objIntAngleDev = default; - Option perspectiveTr = default; - Option resultStatus = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "docFormat": - string? docFormatRawValue = utf8JsonReader.GetString(); - if (docFormatRawValue != null) - docFormat = new Option(DocumentFormatValueConverter.FromStringOrDefault(docFormatRawValue)); - break; - case "Angle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - angle = new Option(utf8JsonReader.GetDecimal()); - break; - case "Width": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - width = new Option(utf8JsonReader.GetInt32()); - break; - case "Height": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - height = new Option(utf8JsonReader.GetInt32()); - break; - case "Center": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - center = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "LeftBottom": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - leftBottom = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "LeftTop": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - leftTop = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RightBottom": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rightBottom = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RightTop": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rightTop = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Dpi": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - dpi = new Option(utf8JsonReader.GetInt32()); - break; - case "Inverse": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - inverse = new Option(utf8JsonReader.GetInt32()); - break; - case "ObjArea": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - objArea = new Option(utf8JsonReader.GetInt32()); - break; - case "ObjIntAngleDev": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - objIntAngleDev = new Option(utf8JsonReader.GetInt32()); - break; - case "PerspectiveTr": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - perspectiveTr = new Option(utf8JsonReader.GetInt32()); - break; - case "ResultStatus": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultStatus = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!docFormat.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(docFormat)); - - if (!angle.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(angle)); - - if (!width.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(width)); - - if (!height.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(height)); - - if (!center.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(center)); - - if (!leftBottom.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(leftBottom)); - - if (!leftTop.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(leftTop)); - - if (!rightBottom.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(rightBottom)); - - if (!rightTop.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(rightTop)); - - if (!dpi.IsSet) - throw new ArgumentException("Property is required for class DocumentPosition.", nameof(dpi)); - - if (docFormat.IsSet && docFormat.Value == null) - throw new ArgumentNullException(nameof(docFormat), "Property is not nullable for class DocumentPosition."); - - if (angle.IsSet && angle.Value == null) - throw new ArgumentNullException(nameof(angle), "Property is not nullable for class DocumentPosition."); - - if (width.IsSet && width.Value == null) - throw new ArgumentNullException(nameof(width), "Property is not nullable for class DocumentPosition."); - - if (height.IsSet && height.Value == null) - throw new ArgumentNullException(nameof(height), "Property is not nullable for class DocumentPosition."); - - if (center.IsSet && center.Value == null) - throw new ArgumentNullException(nameof(center), "Property is not nullable for class DocumentPosition."); - - if (leftBottom.IsSet && leftBottom.Value == null) - throw new ArgumentNullException(nameof(leftBottom), "Property is not nullable for class DocumentPosition."); - - if (leftTop.IsSet && leftTop.Value == null) - throw new ArgumentNullException(nameof(leftTop), "Property is not nullable for class DocumentPosition."); - - if (rightBottom.IsSet && rightBottom.Value == null) - throw new ArgumentNullException(nameof(rightBottom), "Property is not nullable for class DocumentPosition."); - - if (rightTop.IsSet && rightTop.Value == null) - throw new ArgumentNullException(nameof(rightTop), "Property is not nullable for class DocumentPosition."); - - if (dpi.IsSet && dpi.Value == null) - throw new ArgumentNullException(nameof(dpi), "Property is not nullable for class DocumentPosition."); - - if (inverse.IsSet && inverse.Value == null) - throw new ArgumentNullException(nameof(inverse), "Property is not nullable for class DocumentPosition."); - - if (objArea.IsSet && objArea.Value == null) - throw new ArgumentNullException(nameof(objArea), "Property is not nullable for class DocumentPosition."); - - if (objIntAngleDev.IsSet && objIntAngleDev.Value == null) - throw new ArgumentNullException(nameof(objIntAngleDev), "Property is not nullable for class DocumentPosition."); - - if (perspectiveTr.IsSet && perspectiveTr.Value == null) - throw new ArgumentNullException(nameof(perspectiveTr), "Property is not nullable for class DocumentPosition."); - - if (resultStatus.IsSet && resultStatus.Value == null) - throw new ArgumentNullException(nameof(resultStatus), "Property is not nullable for class DocumentPosition."); - - return new DocumentPosition(docFormat.Value!.Value!, angle.Value!.Value!, width.Value!.Value!, height.Value!.Value!, center.Value!, leftBottom.Value!, leftTop.Value!, rightBottom.Value!, rightTop.Value!, dpi.Value!.Value!, inverse, objArea, objIntAngleDev, perspectiveTr, resultStatus); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentPosition documentPosition, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, documentPosition, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentPosition documentPosition, JsonSerializerOptions jsonSerializerOptions) - { - if (documentPosition.Center == null) - throw new ArgumentNullException(nameof(documentPosition.Center), "Property is required for class DocumentPosition."); - - if (documentPosition.LeftBottom == null) - throw new ArgumentNullException(nameof(documentPosition.LeftBottom), "Property is required for class DocumentPosition."); - - if (documentPosition.LeftTop == null) - throw new ArgumentNullException(nameof(documentPosition.LeftTop), "Property is required for class DocumentPosition."); - - if (documentPosition.RightBottom == null) - throw new ArgumentNullException(nameof(documentPosition.RightBottom), "Property is required for class DocumentPosition."); - - if (documentPosition.RightTop == null) - throw new ArgumentNullException(nameof(documentPosition.RightTop), "Property is required for class DocumentPosition."); - - var docFormatRawValue = DocumentFormatValueConverter.ToJsonValue(documentPosition.DocFormat); - writer.WriteNumber("docFormat", docFormatRawValue); - - writer.WriteNumber("Angle", documentPosition.Angle); - - writer.WriteNumber("Width", documentPosition.Width); - - writer.WriteNumber("Height", documentPosition.Height); - - writer.WritePropertyName("Center"); - JsonSerializer.Serialize(writer, documentPosition.Center, jsonSerializerOptions); - writer.WritePropertyName("LeftBottom"); - JsonSerializer.Serialize(writer, documentPosition.LeftBottom, jsonSerializerOptions); - writer.WritePropertyName("LeftTop"); - JsonSerializer.Serialize(writer, documentPosition.LeftTop, jsonSerializerOptions); - writer.WritePropertyName("RightBottom"); - JsonSerializer.Serialize(writer, documentPosition.RightBottom, jsonSerializerOptions); - writer.WritePropertyName("RightTop"); - JsonSerializer.Serialize(writer, documentPosition.RightTop, jsonSerializerOptions); - writer.WriteNumber("Dpi", documentPosition.Dpi); - - if (documentPosition.InverseOption.IsSet) - writer.WriteNumber("Inverse", documentPosition.InverseOption.Value!.Value); - - if (documentPosition.ObjAreaOption.IsSet) - writer.WriteNumber("ObjArea", documentPosition.ObjAreaOption.Value!.Value); - - if (documentPosition.ObjIntAngleDevOption.IsSet) - writer.WriteNumber("ObjIntAngleDev", documentPosition.ObjIntAngleDevOption.Value!.Value); - - if (documentPosition.PerspectiveTrOption.IsSet) - writer.WriteNumber("PerspectiveTr", documentPosition.PerspectiveTrOption.Value!.Value); - - if (documentPosition.ResultStatusOption.IsSet) - writer.WriteNumber("ResultStatus", documentPosition.ResultStatusOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs index bb7b7ff..f9898fd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentPositionItem /// + [DataContract(Name = "DocumentPositionItem")] public partial class DocumentPositionItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// documentPosition - [JsonConstructor] - public DocumentPositionItem(DocumentPosition documentPosition) + [JsonConstructorAttribute] + protected DocumentPositionItem() { } + /// + /// Initializes a new instance of the class. + /// + /// documentPosition (required). + public DocumentPositionItem(DocumentPosition documentPosition = default(DocumentPosition)) { - DocumentPosition = documentPosition; - OnCreated(); + // to ensure "documentPosition" is required (not null) + if (documentPosition == null) + { + throw new ArgumentNullException("documentPosition is a required property for DocumentPositionItem and cannot be null"); + } + this.DocumentPosition = documentPosition; } - partial void OnCreated(); - /// /// Gets or Sets DocumentPosition /// - [JsonPropertyName("DocumentPosition")] + [DataMember(Name = "DocumentPosition", IsRequired = true, EmitDefaultValue = true)] public DocumentPosition DocumentPosition { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocumentPositionItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocumentPositionItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option documentPosition = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocumentPosition": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - documentPosition = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!documentPosition.IsSet) - throw new ArgumentException("Property is required for class DocumentPositionItem.", nameof(documentPosition)); - - if (documentPosition.IsSet && documentPosition.Value == null) - throw new ArgumentNullException(nameof(documentPosition), "Property is not nullable for class DocumentPositionItem."); - - return new DocumentPositionItem(documentPosition.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentPositionItem documentPositionItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, documentPositionItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentPositionItem documentPositionItem, JsonSerializerOptions jsonSerializerOptions) - { - if (documentPositionItem.DocumentPosition == null) - throw new ArgumentNullException(nameof(documentPositionItem.DocumentPosition), "Property is required for class DocumentPositionItem."); - - writer.WritePropertyName("DocumentPosition"); - JsonSerializer.Serialize(writer, documentPositionItem.DocumentPosition, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs index 3df2c24..fc6c770 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains information about document position on the input image, its center, angle, etc /// + [DataContract(Name = "DocumentPositionResult")] public partial class DocumentPositionResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// documentPosition - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public DocumentPositionResult(DocumentPosition documentPosition, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected DocumentPositionResult() { } + /// + /// Initializes a new instance of the class. + /// + /// documentPosition (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public DocumentPositionResult(DocumentPosition documentPosition = default(DocumentPosition), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - DocumentPosition = documentPosition; - OnCreated(); + // to ensure "documentPosition" is required (not null) + if (documentPosition == null) + { + throw new ArgumentNullException("documentPosition is a required property for DocumentPositionResult and cannot be null"); + } + this.DocumentPosition = documentPosition; } - partial void OnCreated(); - /// /// Gets or Sets DocumentPosition /// - [JsonPropertyName("DocumentPosition")] + [DataMember(Name = "DocumentPosition", IsRequired = true, EmitDefaultValue = true)] public DocumentPosition DocumentPosition { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DocumentPositionResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" DocumentPosition: ").Append(DocumentPosition).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class DocumentPositionResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override DocumentPositionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option documentPosition = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocumentPosition": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - documentPosition = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!documentPosition.IsSet) - throw new ArgumentException("Property is required for class DocumentPositionResult.", nameof(documentPosition)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class DocumentPositionResult.", nameof(resultType)); - - if (documentPosition.IsSet && documentPosition.Value == null) - throw new ArgumentNullException(nameof(documentPosition), "Property is not nullable for class DocumentPositionResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocumentPositionResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocumentPositionResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocumentPositionResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocumentPositionResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocumentPositionResult."); - - return new DocumentPositionResult(documentPosition.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentPositionResult documentPositionResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, documentPositionResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentPositionResult documentPositionResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (documentPositionResult.DocumentPosition == null) - throw new ArgumentNullException(nameof(documentPositionResult.DocumentPosition), "Property is required for class DocumentPositionResult."); - - writer.WritePropertyName("DocumentPosition"); - JsonSerializer.Serialize(writer, documentPositionResult.DocumentPosition, jsonSerializerOptions); - if (documentPositionResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", documentPositionResult.BufLengthOption.Value!.Value); - - if (documentPositionResult.LightOption.IsSet) - writer.WriteNumber("light", documentPositionResult.LightOption.Value!.Value); - - if (documentPositionResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", documentPositionResult.ListIdxOption.Value!.Value); - - if (documentPositionResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", documentPositionResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", documentPositionResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs index fe5b52f..3a3369f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -1182,1497 +1183,4 @@ public enum DocumentType PASSENGER_LOCATOR_FORM = 242 } - /// - /// Converts to and from the JSON value - /// - public static class DocumentTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static DocumentType FromString(string value) - { - if (value.Equals((0).ToString())) - return DocumentType.NOT_DEFINED; - - if (value.Equals((11).ToString())) - return DocumentType.PASSPORT; - - if (value.Equals((12).ToString())) - return DocumentType.IDENTITY_CARD; - - if (value.Equals((13).ToString())) - return DocumentType.DIPLOMATIC_PASSPORT; - - if (value.Equals((14).ToString())) - return DocumentType.SERVICE_PASSPORT; - - if (value.Equals((15).ToString())) - return DocumentType.SEAMANS_IDENTITY_DOCUMENT; - - if (value.Equals((16).ToString())) - return DocumentType.IDENTITY_CARD_FOR_RESIDENCE; - - if (value.Equals((17).ToString())) - return DocumentType.TRAVEL_DOCUMENT; - - if (value.Equals((20).ToString())) - return DocumentType.NATIONAL_IDENTITY_CARD; - - if (value.Equals((21).ToString())) - return DocumentType.SOCIAL_IDENTITY_CARD; - - if (value.Equals((22).ToString())) - return DocumentType.ALIENS_IDENTITY_CARD; - - if (value.Equals((23).ToString())) - return DocumentType.PRIVILEGED_IDENTITY_CARD; - - if (value.Equals((24).ToString())) - return DocumentType.RESIDENCE_PERMIT_IDENTITY_CARD; - - if (value.Equals((25).ToString())) - return DocumentType.ORIGIN_CARD; - - if (value.Equals((26).ToString())) - return DocumentType.EMERGENCY_PASSPORT; - - if (value.Equals((27).ToString())) - return DocumentType.ALIENS_PASSPORT; - - if (value.Equals((28).ToString())) - return DocumentType.ALTERNATIVE_IDENTITY_CARD; - - if (value.Equals((29).ToString())) - return DocumentType.VISA_ID2; - - if (value.Equals((30).ToString())) - return DocumentType.VISA_ID3; - - if (value.Equals((32).ToString())) - return DocumentType.AUTHORIZATION_CARD; - - if (value.Equals((33).ToString())) - return DocumentType.BEGINNER_PERMIT; - - if (value.Equals((34).ToString())) - return DocumentType.BORDER_CROSSING_CARD; - - if (value.Equals((35).ToString())) - return DocumentType.CHAUFFEUR_LICENSE; - - if (value.Equals((36).ToString())) - return DocumentType.CHAUFFEUR_LICENSE_UNDER_18; - - if (value.Equals((37).ToString())) - return DocumentType.CHAUFFEUR_LICENSE_UNDER_21; - - if (value.Equals((38).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE; - - if (value.Equals((39).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_INSTRUCTIONAL_PERMIT; - - if (value.Equals((40).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((41).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((42).ToString())) - return DocumentType.COMMERCIAL_INSTRUCTION_PERMIT; - - if (value.Equals((43).ToString())) - return DocumentType.COMMERCIAL_NEW_PERMIT; - - if (value.Equals((44).ToString())) - return DocumentType.CONCEALED_CARRY_LICENSE; - - if (value.Equals((45).ToString())) - return DocumentType.CONCEALED_FIREARM_PERMIT; - - if (value.Equals((46).ToString())) - return DocumentType.CONDITIONAL_DRIVING_LICENSE; - - if (value.Equals((47).ToString())) - return DocumentType.DEPARTMENT_OF_VETERANS_AFFAIRS_IDENTITY_CARD; - - if (value.Equals((48).ToString())) - return DocumentType.DIPLOMATIC_DRIVING_LICENSE; - - if (value.Equals((49).ToString())) - return DocumentType.DRIVING_LICENSE; - - if (value.Equals((50).ToString())) - return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT; - - if (value.Equals((51).ToString())) - return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_18; - - if (value.Equals((52).ToString())) - return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_21; - - if (value.Equals((53).ToString())) - return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT; - - if (value.Equals((54).ToString())) - return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_18; - - if (value.Equals((55).ToString())) - return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_21; - - if (value.Equals((56).ToString())) - return DocumentType.DRIVING_LICENSE_NOVICE; - - if (value.Equals((57).ToString())) - return DocumentType.DRIVING_LICENSE_NOVICE_UNDER_18; - - if (value.Equals((58).ToString())) - return DocumentType.DRIVING_LICENSE_NOVICE_UNDER_21; - - if (value.Equals((59).ToString())) - return DocumentType.DRIVING_LICENSE_REGISTERED_OFFENDER; - - if (value.Equals((60).ToString())) - return DocumentType.DRIVING_LICENSE_RESTRICTED_UNDER_18; - - if (value.Equals((61).ToString())) - return DocumentType.DRIVING_LICENSE_RESTRICTED_UNDER_21; - - if (value.Equals((62).ToString())) - return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR; - - if (value.Equals((63).ToString())) - return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_18; - - if (value.Equals((64).ToString())) - return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_21; - - if (value.Equals((65).ToString())) - return DocumentType.DRIVING_LICENSE_UNDER_18; - - if (value.Equals((66).ToString())) - return DocumentType.DRIVING_LICENSE_UNDER_21; - - if (value.Equals((67).ToString())) - return DocumentType.EMPLOYMENT_DRIVING_PERMIT; - - if (value.Equals((68).ToString())) - return DocumentType.ENHANCED_CHAUFFEUR_LICENSE; - - if (value.Equals((69).ToString())) - return DocumentType.ENHANCED_CHAUFFEUR_LICENSE_UNDER_18; - - if (value.Equals((70).ToString())) - return DocumentType.ENHANCED_CHAUFFEUR_LICENSE_UNDER_21; - - if (value.Equals((71).ToString())) - return DocumentType.ENHANCED_COMMERCIAL_DRIVING_LICENSE; - - if (value.Equals((72).ToString())) - return DocumentType.ENHANCED_DRIVING_LICENSE; - - if (value.Equals((73).ToString())) - return DocumentType.ENHANCED_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((74).ToString())) - return DocumentType.ENHANCED_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((75).ToString())) - return DocumentType.ENHANCED_IDENTITY_CARD; - - if (value.Equals((76).ToString())) - return DocumentType.ENHANCED_IDENTITY_CARD_UNDER_18; - - if (value.Equals((77).ToString())) - return DocumentType.ENHANCED_IDENTITY_CARD_UNDER_21; - - if (value.Equals((78).ToString())) - return DocumentType.ENHANCED_OPERATORS_LICENSE; - - if (value.Equals((79).ToString())) - return DocumentType.FIREARMS_PERMIT; - - if (value.Equals((80).ToString())) - return DocumentType.FULL_PROVISIONAL_LICENSE; - - if (value.Equals((81).ToString())) - return DocumentType.FULL_PROVISIONAL_LICENSE_UNDER_18; - - if (value.Equals((82).ToString())) - return DocumentType.FULL_PROVISIONAL_LICENSE_UNDER_21; - - if (value.Equals((83).ToString())) - return DocumentType.GENEVA_CONVENTIONS_IDENTITY_CARD; - - if (value.Equals((84).ToString())) - return DocumentType.GRADUATED_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((85).ToString())) - return DocumentType.GRADUATED_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((86).ToString())) - return DocumentType.GRADUATED_INSTRUCTION_PERMIT_UNDER_18; - - if (value.Equals((87).ToString())) - return DocumentType.GRADUATED_INSTRUCTION_PERMIT_UNDER_21; - - if (value.Equals((88).ToString())) - return DocumentType.GRADUATED_LICENSE_UNDER_18; - - if (value.Equals((89).ToString())) - return DocumentType.GRADUATED_LICENSE_UNDER_21; - - if (value.Equals((90).ToString())) - return DocumentType.HANDGUN_CARRY_PERMIT; - - if (value.Equals((91).ToString())) - return DocumentType.IDENTITY_AND_PRIVILEGE_CARD; - - if (value.Equals((92).ToString())) - return DocumentType.IDENTITY_CARD_MOBILITY_IMPAIRED; - - if (value.Equals((93).ToString())) - return DocumentType.IDENTITY_CARD_REGISTERED_OFFENDER; - - if (value.Equals((94).ToString())) - return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR; - - if (value.Equals((95).ToString())) - return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_18; - - if (value.Equals((96).ToString())) - return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_21; - - if (value.Equals((97).ToString())) - return DocumentType.IDENTITY_CARD_UNDER_18; - - if (value.Equals((98).ToString())) - return DocumentType.IDENTITY_CARD_UNDER_21; - - if (value.Equals((99).ToString())) - return DocumentType.OTHER; - - if (value.Equals((100).ToString())) - return DocumentType.IGNITION_INTERLOCK_PERMIT; - - if (value.Equals((101).ToString())) - return DocumentType.IMMIGRANT_VISA; - - if (value.Equals((102).ToString())) - return DocumentType.INSTRUCTION_PERMIT; - - if (value.Equals((103).ToString())) - return DocumentType.INSTRUCTION_PERMIT_UNDER_18; - - if (value.Equals((104).ToString())) - return DocumentType.INSTRUCTION_PERMIT_UNDER_21; - - if (value.Equals((105).ToString())) - return DocumentType.INTERIM_DRIVING_LICENSE; - - if (value.Equals((106).ToString())) - return DocumentType.INTERIM_IDENTITY_CARD; - - if (value.Equals((107).ToString())) - return DocumentType.INTERMEDIATE_DRIVING_LICENSE; - - if (value.Equals((108).ToString())) - return DocumentType.INTERMEDIATE_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((109).ToString())) - return DocumentType.INTERMEDIATE_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((110).ToString())) - return DocumentType.JUNIOR_DRIVING_LICENSE; - - if (value.Equals((111).ToString())) - return DocumentType.LEARNER_INSTRUCTIONAL_PERMIT; - - if (value.Equals((112).ToString())) - return DocumentType.LEARNER_LICENSE; - - if (value.Equals((113).ToString())) - return DocumentType.LEARNER_LICENSE_UNDER_18; - - if (value.Equals((114).ToString())) - return DocumentType.LEARNER_LICENSE_UNDER_21; - - if (value.Equals((115).ToString())) - return DocumentType.LEARNER_PERMIT; - - if (value.Equals((116).ToString())) - return DocumentType.LEARNER_PERMIT_UNDER_18; - - if (value.Equals((117).ToString())) - return DocumentType.LEARNER_PERMIT_UNDER_21; - - if (value.Equals((118).ToString())) - return DocumentType.LIMITED_LICENSE; - - if (value.Equals((119).ToString())) - return DocumentType.LIMITED_PERMIT; - - if (value.Equals((120).ToString())) - return DocumentType.LIMITED_TERM_DRIVING_LICENSE; - - if (value.Equals((121).ToString())) - return DocumentType.LIMITED_TERM_IDENTITY_CARD; - - if (value.Equals((122).ToString())) - return DocumentType.LIQUOR_IDENTITY_CARD; - - if (value.Equals((123).ToString())) - return DocumentType.NEW_PERMIT; - - if (value.Equals((124).ToString())) - return DocumentType.NEW_PERMIT_UNDER_18; - - if (value.Equals((125).ToString())) - return DocumentType.NEW_PERMIT_UNDER_21; - - if (value.Equals((126).ToString())) - return DocumentType.NON_US_CITIZEN_DRIVING_LICENSE; - - if (value.Equals((127).ToString())) - return DocumentType.OCCUPATIONAL_DRIVING_LICENSE; - - if (value.Equals((128).ToString())) - return DocumentType.ONEIDA_TRIBE_OF_INDIANS_IDENTITY_CARD; - - if (value.Equals((129).ToString())) - return DocumentType.OPERATOR_LICENSE; - - if (value.Equals((130).ToString())) - return DocumentType.OPERATOR_LICENSE_UNDER_18; - - if (value.Equals((131).ToString())) - return DocumentType.OPERATOR_LICENSE_UNDER_21; - - if (value.Equals((132).ToString())) - return DocumentType.PERMANENT_DRIVING_LICENSE; - - if (value.Equals((133).ToString())) - return DocumentType.PERMIT_TO_REENTER; - - if (value.Equals((134).ToString())) - return DocumentType.PROBATIONARY_AUTO_LICENSE; - - if (value.Equals((135).ToString())) - return DocumentType.PROBATIONARY_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((136).ToString())) - return DocumentType.PROBATIONARY_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((137).ToString())) - return DocumentType.PROBATIONARY_VEHICLE_SALES_PERSON_LICENSE; - - if (value.Equals((138).ToString())) - return DocumentType.PROVISIONAL_DRIVING_LICENSE; - - if (value.Equals((139).ToString())) - return DocumentType.PROVISIONAL_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((140).ToString())) - return DocumentType.PROVISIONAL_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((141).ToString())) - return DocumentType.PROVISIONAL_LICENSE; - - if (value.Equals((142).ToString())) - return DocumentType.PROVISIONAL_LICENSE_UNDER_18; - - if (value.Equals((143).ToString())) - return DocumentType.PROVISIONAL_LICENSE_UNDER_21; - - if (value.Equals((144).ToString())) - return DocumentType.PUBLIC_PASSENGER_CHAUFFEUR_LICENSE; - - if (value.Equals((145).ToString())) - return DocumentType.RACING_AND_GAMING_COMISSION_CARD; - - if (value.Equals((146).ToString())) - return DocumentType.REFUGEE_TRAVEL_DOCUMENT; - - if (value.Equals((147).ToString())) - return DocumentType.RENEWAL_PERMIT; - - if (value.Equals((148).ToString())) - return DocumentType.RESTRICTED_COMMERCIAL_DRIVER_LICENSE; - - if (value.Equals((149).ToString())) - return DocumentType.RESTRICTED_DRIVER_LICENSE; - - if (value.Equals((150).ToString())) - return DocumentType.RESTRICTED_PERMIT; - - if (value.Equals((151).ToString())) - return DocumentType.SEASONAL_PERMIT; - - if (value.Equals((152).ToString())) - return DocumentType.SEASONAL_RESIDENT_IDENTITY_CARD; - - if (value.Equals((153).ToString())) - return DocumentType.SEASONAL_CITIZEN_IDENTITY_CARD; - - if (value.Equals((154).ToString())) - return DocumentType.SEX_OFFENDER; - - if (value.Equals((155).ToString())) - return DocumentType.SOCIAL_SECURITY_CARD; - - if (value.Equals((156).ToString())) - return DocumentType.TEMPORARY_DRIVING_LICENSE; - - if (value.Equals((157).ToString())) - return DocumentType.TEMPORARY_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((158).ToString())) - return DocumentType.TEMPORARY_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((159).ToString())) - return DocumentType.TEMPORARY_IDENTITY_CARD; - - if (value.Equals((160).ToString())) - return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD; - - if (value.Equals((161).ToString())) - return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_18; - - if (value.Equals((162).ToString())) - return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_21; - - if (value.Equals((163).ToString())) - return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE; - - if (value.Equals((164).ToString())) - return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((165).ToString())) - return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((166).ToString())) - return DocumentType.UNIFORMED_SERVICES_IDENTITY_CARD; - - if (value.Equals((167).ToString())) - return DocumentType.VEHICLE_SALES_PERSON_LICENSE; - - if (value.Equals((168).ToString())) - return DocumentType.WORKER_IDENTIFICATION_CREDENTIAL; - - if (value.Equals((169).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE; - - if (value.Equals((170).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_18; - - if (value.Equals((171).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_21; - - if (value.Equals((172).ToString())) - return DocumentType.PASSPORT_CARD; - - if (value.Equals((173).ToString())) - return DocumentType.PASSPORT_RESIDENT_CARD; - - if (value.Equals((174).ToString())) - return DocumentType.PERSONAL_IDENTIFICATION_VERIFICATION; - - if (value.Equals((175).ToString())) - return DocumentType.TEMPORARY_OPERATOR_LICENSE; - - if (value.Equals((176).ToString())) - return DocumentType.DRIVING_LICENSE_UNDER_19; - - if (value.Equals((177).ToString())) - return DocumentType.IDENTITY_CARD_UNDER_19; - - if (value.Equals((178).ToString())) - return DocumentType.VISA; - - if (value.Equals((179).ToString())) - return DocumentType.TEMPORARY_PASSPORT; - - if (value.Equals((180).ToString())) - return DocumentType.VOTING_CARD; - - if (value.Equals((181).ToString())) - return DocumentType.HEALTH_CARD; - - if (value.Equals((182).ToString())) - return DocumentType.CERTIFICATE_OF_CITIZENSHIP; - - if (value.Equals((183).ToString())) - return DocumentType.ADDRESS_CARD; - - if (value.Equals((184).ToString())) - return DocumentType.AIRPORT_IMMIGRATION_CARD; - - if (value.Equals((185).ToString())) - return DocumentType.ALIEN_REGISTRATION_CARD; - - if (value.Equals((186).ToString())) - return DocumentType.APEH_CARD; - - if (value.Equals((187).ToString())) - return DocumentType.COUPON_TO_DRIVING_LICENSE; - - if (value.Equals((188).ToString())) - return DocumentType.CREW_MEMBER_CERTIFICATE; - - if (value.Equals((189).ToString())) - return DocumentType.DOCUMENT_FOR_RETURN; - - if (value.Equals((190).ToString())) - return DocumentType.E_CARD; - - if (value.Equals((191).ToString())) - return DocumentType.EMPLOYMENT_CARD; - - if (value.Equals((192).ToString())) - return DocumentType.HKSAR_IMMIGRATION_FORM; - - if (value.Equals((193).ToString())) - return DocumentType.IMMIGRANT_CARD; - - if (value.Equals((194).ToString())) - return DocumentType.LABOUR_CARD; - - if (value.Equals((195).ToString())) - return DocumentType.LAISSEZ_PASSER; - - if (value.Equals((196).ToString())) - return DocumentType.LAWYER_IDENTITY_CERTIFICATE; - - if (value.Equals((197).ToString())) - return DocumentType.LICENSE_CARD; - - if (value.Equals((198).ToString())) - return DocumentType.PASSPORT_STATELESS; - - if (value.Equals((199).ToString())) - return DocumentType.PASSPORT_CHILD; - - if (value.Equals((200).ToString())) - return DocumentType.PASSPORT_CONSULAR; - - if (value.Equals((201).ToString())) - return DocumentType.PASSPORT_DIPLOMATIC_SERVICE; - - if (value.Equals((202).ToString())) - return DocumentType.PASSPORT_OFFICIAL; - - if (value.Equals((203).ToString())) - return DocumentType.PASSPORT_PROVISIONAL; - - if (value.Equals((204).ToString())) - return DocumentType.PASSPORT_SPECIAL; - - if (value.Equals((205).ToString())) - return DocumentType.PERMISSION_TO_THE_LOCAL_BORDER_TRAFFIC; - - if (value.Equals((206).ToString())) - return DocumentType.REGISTRATION_CERTIFICATE; - - if (value.Equals((207).ToString())) - return DocumentType.SEDESOL_CARD; - - if (value.Equals((208).ToString())) - return DocumentType.SOCIAL_CARD; - - if (value.Equals((209).ToString())) - return DocumentType.TB_CARD; - - if (value.Equals((210).ToString())) - return DocumentType.VEHICLE_PASSPORT; - - if (value.Equals((211).ToString())) - return DocumentType.W_DOCUMENT; - - if (value.Equals((212).ToString())) - return DocumentType.DIPLOMATIC_IDENTITY_CARD; - - if (value.Equals((213).ToString())) - return DocumentType.CONSULAR_IDENTITY_CARD; - - if (value.Equals((214).ToString())) - return DocumentType.INCOME_TAX_CARD; - - if (value.Equals((215).ToString())) - return DocumentType.RESIDENCE_PERMIT; - - if (value.Equals((216).ToString())) - return DocumentType.DOCUMENT_OF_IDENTITY; - - if (value.Equals((217).ToString())) - return DocumentType.BORDER_CROSSING_PERMIT; - - if (value.Equals((218).ToString())) - return DocumentType.PASSPORT_LIMITED_VALIDITY; - - if (value.Equals((219).ToString())) - return DocumentType.SIM_CARD; - - if (value.Equals((220).ToString())) - return DocumentType.TAX_CARD; - - if (value.Equals((221).ToString())) - return DocumentType.COMPANY_CARD; - - if (value.Equals((222).ToString())) - return DocumentType.DOMESTIC_PASSPORT; - - if (value.Equals((223).ToString())) - return DocumentType.IDENTITY_CERTIFICATE; - - if (value.Equals((224).ToString())) - return DocumentType.RESIDENT_ID_CARD; - - if (value.Equals((225).ToString())) - return DocumentType.ARMED_FORCES_IDENTITY_CARD; - - if (value.Equals((226).ToString())) - return DocumentType.PROFESSIONAL_CARD; - - if (value.Equals((227).ToString())) - return DocumentType.REGISTRATION_STAMP; - - if (value.Equals((228).ToString())) - return DocumentType.DRIVER_CARD; - - if (value.Equals((229).ToString())) - return DocumentType.DRIVER_TRAINING_CERTIFICATE; - - if (value.Equals((230).ToString())) - return DocumentType.QUALIFICATION_DRIVING_LICENSE; - - if (value.Equals((231).ToString())) - return DocumentType.MEMBERSHIP_CARD; - - if (value.Equals((232).ToString())) - return DocumentType.PUBLIC_VEHICLE_DRIVER_AUTHORITY_CARD; - - if (value.Equals((233).ToString())) - return DocumentType.MARINE_LICENSE; - - if (value.Equals((234).ToString())) - return DocumentType.TEMPORARY_LEARNER_LICENSE; - - if (value.Equals((235).ToString())) - return DocumentType.TEMPORARY_COMMERCIAL_DRIVING_LICENSE; - - if (value.Equals((236).ToString())) - return DocumentType.INTERIM_INSTRUCTIONAL_PERMIT; - - if (value.Equals((237).ToString())) - return DocumentType.CERTIFICATE_OF_COMPETENCY; - - if (value.Equals((238).ToString())) - return DocumentType.CERTIFICATE_OF_PROFICIENCY; - - if (value.Equals((239).ToString())) - return DocumentType.TRADE_LICENSE; - - if (value.Equals((240).ToString())) - return DocumentType.PASSPORT_PAGE; - - if (value.Equals((241).ToString())) - return DocumentType.INVOICE; - - if (value.Equals((242).ToString())) - return DocumentType.PASSENGER_LOCATOR_FORM; - - throw new NotImplementedException($"Could not convert value to type DocumentType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static DocumentType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return DocumentType.NOT_DEFINED; - - if (value.Equals((11).ToString())) - return DocumentType.PASSPORT; - - if (value.Equals((12).ToString())) - return DocumentType.IDENTITY_CARD; - - if (value.Equals((13).ToString())) - return DocumentType.DIPLOMATIC_PASSPORT; - - if (value.Equals((14).ToString())) - return DocumentType.SERVICE_PASSPORT; - - if (value.Equals((15).ToString())) - return DocumentType.SEAMANS_IDENTITY_DOCUMENT; - - if (value.Equals((16).ToString())) - return DocumentType.IDENTITY_CARD_FOR_RESIDENCE; - - if (value.Equals((17).ToString())) - return DocumentType.TRAVEL_DOCUMENT; - - if (value.Equals((20).ToString())) - return DocumentType.NATIONAL_IDENTITY_CARD; - - if (value.Equals((21).ToString())) - return DocumentType.SOCIAL_IDENTITY_CARD; - - if (value.Equals((22).ToString())) - return DocumentType.ALIENS_IDENTITY_CARD; - - if (value.Equals((23).ToString())) - return DocumentType.PRIVILEGED_IDENTITY_CARD; - - if (value.Equals((24).ToString())) - return DocumentType.RESIDENCE_PERMIT_IDENTITY_CARD; - - if (value.Equals((25).ToString())) - return DocumentType.ORIGIN_CARD; - - if (value.Equals((26).ToString())) - return DocumentType.EMERGENCY_PASSPORT; - - if (value.Equals((27).ToString())) - return DocumentType.ALIENS_PASSPORT; - - if (value.Equals((28).ToString())) - return DocumentType.ALTERNATIVE_IDENTITY_CARD; - - if (value.Equals((29).ToString())) - return DocumentType.VISA_ID2; - - if (value.Equals((30).ToString())) - return DocumentType.VISA_ID3; - - if (value.Equals((32).ToString())) - return DocumentType.AUTHORIZATION_CARD; - - if (value.Equals((33).ToString())) - return DocumentType.BEGINNER_PERMIT; - - if (value.Equals((34).ToString())) - return DocumentType.BORDER_CROSSING_CARD; - - if (value.Equals((35).ToString())) - return DocumentType.CHAUFFEUR_LICENSE; - - if (value.Equals((36).ToString())) - return DocumentType.CHAUFFEUR_LICENSE_UNDER_18; - - if (value.Equals((37).ToString())) - return DocumentType.CHAUFFEUR_LICENSE_UNDER_21; - - if (value.Equals((38).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE; - - if (value.Equals((39).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_INSTRUCTIONAL_PERMIT; - - if (value.Equals((40).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((41).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((42).ToString())) - return DocumentType.COMMERCIAL_INSTRUCTION_PERMIT; - - if (value.Equals((43).ToString())) - return DocumentType.COMMERCIAL_NEW_PERMIT; - - if (value.Equals((44).ToString())) - return DocumentType.CONCEALED_CARRY_LICENSE; - - if (value.Equals((45).ToString())) - return DocumentType.CONCEALED_FIREARM_PERMIT; - - if (value.Equals((46).ToString())) - return DocumentType.CONDITIONAL_DRIVING_LICENSE; - - if (value.Equals((47).ToString())) - return DocumentType.DEPARTMENT_OF_VETERANS_AFFAIRS_IDENTITY_CARD; - - if (value.Equals((48).ToString())) - return DocumentType.DIPLOMATIC_DRIVING_LICENSE; - - if (value.Equals((49).ToString())) - return DocumentType.DRIVING_LICENSE; - - if (value.Equals((50).ToString())) - return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT; - - if (value.Equals((51).ToString())) - return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_18; - - if (value.Equals((52).ToString())) - return DocumentType.DRIVING_LICENSE_INSTRUCTIONAL_PERMIT_UNDER_21; - - if (value.Equals((53).ToString())) - return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT; - - if (value.Equals((54).ToString())) - return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_18; - - if (value.Equals((55).ToString())) - return DocumentType.DRIVING_LICENSE_LEARNERS_PERMIT_UNDER_21; - - if (value.Equals((56).ToString())) - return DocumentType.DRIVING_LICENSE_NOVICE; - - if (value.Equals((57).ToString())) - return DocumentType.DRIVING_LICENSE_NOVICE_UNDER_18; - - if (value.Equals((58).ToString())) - return DocumentType.DRIVING_LICENSE_NOVICE_UNDER_21; - - if (value.Equals((59).ToString())) - return DocumentType.DRIVING_LICENSE_REGISTERED_OFFENDER; - - if (value.Equals((60).ToString())) - return DocumentType.DRIVING_LICENSE_RESTRICTED_UNDER_18; - - if (value.Equals((61).ToString())) - return DocumentType.DRIVING_LICENSE_RESTRICTED_UNDER_21; - - if (value.Equals((62).ToString())) - return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR; - - if (value.Equals((63).ToString())) - return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_18; - - if (value.Equals((64).ToString())) - return DocumentType.DRIVING_LICENSE_TEMPORARY_VISITOR_UNDER_21; - - if (value.Equals((65).ToString())) - return DocumentType.DRIVING_LICENSE_UNDER_18; - - if (value.Equals((66).ToString())) - return DocumentType.DRIVING_LICENSE_UNDER_21; - - if (value.Equals((67).ToString())) - return DocumentType.EMPLOYMENT_DRIVING_PERMIT; - - if (value.Equals((68).ToString())) - return DocumentType.ENHANCED_CHAUFFEUR_LICENSE; - - if (value.Equals((69).ToString())) - return DocumentType.ENHANCED_CHAUFFEUR_LICENSE_UNDER_18; - - if (value.Equals((70).ToString())) - return DocumentType.ENHANCED_CHAUFFEUR_LICENSE_UNDER_21; - - if (value.Equals((71).ToString())) - return DocumentType.ENHANCED_COMMERCIAL_DRIVING_LICENSE; - - if (value.Equals((72).ToString())) - return DocumentType.ENHANCED_DRIVING_LICENSE; - - if (value.Equals((73).ToString())) - return DocumentType.ENHANCED_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((74).ToString())) - return DocumentType.ENHANCED_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((75).ToString())) - return DocumentType.ENHANCED_IDENTITY_CARD; - - if (value.Equals((76).ToString())) - return DocumentType.ENHANCED_IDENTITY_CARD_UNDER_18; - - if (value.Equals((77).ToString())) - return DocumentType.ENHANCED_IDENTITY_CARD_UNDER_21; - - if (value.Equals((78).ToString())) - return DocumentType.ENHANCED_OPERATORS_LICENSE; - - if (value.Equals((79).ToString())) - return DocumentType.FIREARMS_PERMIT; - - if (value.Equals((80).ToString())) - return DocumentType.FULL_PROVISIONAL_LICENSE; - - if (value.Equals((81).ToString())) - return DocumentType.FULL_PROVISIONAL_LICENSE_UNDER_18; - - if (value.Equals((82).ToString())) - return DocumentType.FULL_PROVISIONAL_LICENSE_UNDER_21; - - if (value.Equals((83).ToString())) - return DocumentType.GENEVA_CONVENTIONS_IDENTITY_CARD; - - if (value.Equals((84).ToString())) - return DocumentType.GRADUATED_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((85).ToString())) - return DocumentType.GRADUATED_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((86).ToString())) - return DocumentType.GRADUATED_INSTRUCTION_PERMIT_UNDER_18; - - if (value.Equals((87).ToString())) - return DocumentType.GRADUATED_INSTRUCTION_PERMIT_UNDER_21; - - if (value.Equals((88).ToString())) - return DocumentType.GRADUATED_LICENSE_UNDER_18; - - if (value.Equals((89).ToString())) - return DocumentType.GRADUATED_LICENSE_UNDER_21; - - if (value.Equals((90).ToString())) - return DocumentType.HANDGUN_CARRY_PERMIT; - - if (value.Equals((91).ToString())) - return DocumentType.IDENTITY_AND_PRIVILEGE_CARD; - - if (value.Equals((92).ToString())) - return DocumentType.IDENTITY_CARD_MOBILITY_IMPAIRED; - - if (value.Equals((93).ToString())) - return DocumentType.IDENTITY_CARD_REGISTERED_OFFENDER; - - if (value.Equals((94).ToString())) - return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR; - - if (value.Equals((95).ToString())) - return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_18; - - if (value.Equals((96).ToString())) - return DocumentType.IDENTITY_CARD_TEMPORARY_VISITOR_UNDER_21; - - if (value.Equals((97).ToString())) - return DocumentType.IDENTITY_CARD_UNDER_18; - - if (value.Equals((98).ToString())) - return DocumentType.IDENTITY_CARD_UNDER_21; - - if (value.Equals((99).ToString())) - return DocumentType.OTHER; - - if (value.Equals((100).ToString())) - return DocumentType.IGNITION_INTERLOCK_PERMIT; - - if (value.Equals((101).ToString())) - return DocumentType.IMMIGRANT_VISA; - - if (value.Equals((102).ToString())) - return DocumentType.INSTRUCTION_PERMIT; - - if (value.Equals((103).ToString())) - return DocumentType.INSTRUCTION_PERMIT_UNDER_18; - - if (value.Equals((104).ToString())) - return DocumentType.INSTRUCTION_PERMIT_UNDER_21; - - if (value.Equals((105).ToString())) - return DocumentType.INTERIM_DRIVING_LICENSE; - - if (value.Equals((106).ToString())) - return DocumentType.INTERIM_IDENTITY_CARD; - - if (value.Equals((107).ToString())) - return DocumentType.INTERMEDIATE_DRIVING_LICENSE; - - if (value.Equals((108).ToString())) - return DocumentType.INTERMEDIATE_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((109).ToString())) - return DocumentType.INTERMEDIATE_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((110).ToString())) - return DocumentType.JUNIOR_DRIVING_LICENSE; - - if (value.Equals((111).ToString())) - return DocumentType.LEARNER_INSTRUCTIONAL_PERMIT; - - if (value.Equals((112).ToString())) - return DocumentType.LEARNER_LICENSE; - - if (value.Equals((113).ToString())) - return DocumentType.LEARNER_LICENSE_UNDER_18; - - if (value.Equals((114).ToString())) - return DocumentType.LEARNER_LICENSE_UNDER_21; - - if (value.Equals((115).ToString())) - return DocumentType.LEARNER_PERMIT; - - if (value.Equals((116).ToString())) - return DocumentType.LEARNER_PERMIT_UNDER_18; - - if (value.Equals((117).ToString())) - return DocumentType.LEARNER_PERMIT_UNDER_21; - - if (value.Equals((118).ToString())) - return DocumentType.LIMITED_LICENSE; - - if (value.Equals((119).ToString())) - return DocumentType.LIMITED_PERMIT; - - if (value.Equals((120).ToString())) - return DocumentType.LIMITED_TERM_DRIVING_LICENSE; - - if (value.Equals((121).ToString())) - return DocumentType.LIMITED_TERM_IDENTITY_CARD; - - if (value.Equals((122).ToString())) - return DocumentType.LIQUOR_IDENTITY_CARD; - - if (value.Equals((123).ToString())) - return DocumentType.NEW_PERMIT; - - if (value.Equals((124).ToString())) - return DocumentType.NEW_PERMIT_UNDER_18; - - if (value.Equals((125).ToString())) - return DocumentType.NEW_PERMIT_UNDER_21; - - if (value.Equals((126).ToString())) - return DocumentType.NON_US_CITIZEN_DRIVING_LICENSE; - - if (value.Equals((127).ToString())) - return DocumentType.OCCUPATIONAL_DRIVING_LICENSE; - - if (value.Equals((128).ToString())) - return DocumentType.ONEIDA_TRIBE_OF_INDIANS_IDENTITY_CARD; - - if (value.Equals((129).ToString())) - return DocumentType.OPERATOR_LICENSE; - - if (value.Equals((130).ToString())) - return DocumentType.OPERATOR_LICENSE_UNDER_18; - - if (value.Equals((131).ToString())) - return DocumentType.OPERATOR_LICENSE_UNDER_21; - - if (value.Equals((132).ToString())) - return DocumentType.PERMANENT_DRIVING_LICENSE; - - if (value.Equals((133).ToString())) - return DocumentType.PERMIT_TO_REENTER; - - if (value.Equals((134).ToString())) - return DocumentType.PROBATIONARY_AUTO_LICENSE; - - if (value.Equals((135).ToString())) - return DocumentType.PROBATIONARY_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((136).ToString())) - return DocumentType.PROBATIONARY_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((137).ToString())) - return DocumentType.PROBATIONARY_VEHICLE_SALES_PERSON_LICENSE; - - if (value.Equals((138).ToString())) - return DocumentType.PROVISIONAL_DRIVING_LICENSE; - - if (value.Equals((139).ToString())) - return DocumentType.PROVISIONAL_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((140).ToString())) - return DocumentType.PROVISIONAL_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((141).ToString())) - return DocumentType.PROVISIONAL_LICENSE; - - if (value.Equals((142).ToString())) - return DocumentType.PROVISIONAL_LICENSE_UNDER_18; - - if (value.Equals((143).ToString())) - return DocumentType.PROVISIONAL_LICENSE_UNDER_21; - - if (value.Equals((144).ToString())) - return DocumentType.PUBLIC_PASSENGER_CHAUFFEUR_LICENSE; - - if (value.Equals((145).ToString())) - return DocumentType.RACING_AND_GAMING_COMISSION_CARD; - - if (value.Equals((146).ToString())) - return DocumentType.REFUGEE_TRAVEL_DOCUMENT; - - if (value.Equals((147).ToString())) - return DocumentType.RENEWAL_PERMIT; - - if (value.Equals((148).ToString())) - return DocumentType.RESTRICTED_COMMERCIAL_DRIVER_LICENSE; - - if (value.Equals((149).ToString())) - return DocumentType.RESTRICTED_DRIVER_LICENSE; - - if (value.Equals((150).ToString())) - return DocumentType.RESTRICTED_PERMIT; - - if (value.Equals((151).ToString())) - return DocumentType.SEASONAL_PERMIT; - - if (value.Equals((152).ToString())) - return DocumentType.SEASONAL_RESIDENT_IDENTITY_CARD; - - if (value.Equals((153).ToString())) - return DocumentType.SEASONAL_CITIZEN_IDENTITY_CARD; - - if (value.Equals((154).ToString())) - return DocumentType.SEX_OFFENDER; - - if (value.Equals((155).ToString())) - return DocumentType.SOCIAL_SECURITY_CARD; - - if (value.Equals((156).ToString())) - return DocumentType.TEMPORARY_DRIVING_LICENSE; - - if (value.Equals((157).ToString())) - return DocumentType.TEMPORARY_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((158).ToString())) - return DocumentType.TEMPORARY_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((159).ToString())) - return DocumentType.TEMPORARY_IDENTITY_CARD; - - if (value.Equals((160).ToString())) - return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD; - - if (value.Equals((161).ToString())) - return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_18; - - if (value.Equals((162).ToString())) - return DocumentType.TEMPORARY_INSTRUCTION_PERMIT_IDENTITY_CARD_UNDER_21; - - if (value.Equals((163).ToString())) - return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE; - - if (value.Equals((164).ToString())) - return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_18; - - if (value.Equals((165).ToString())) - return DocumentType.TEMPORARY_VISITOR_DRIVING_LICENSE_UNDER_21; - - if (value.Equals((166).ToString())) - return DocumentType.UNIFORMED_SERVICES_IDENTITY_CARD; - - if (value.Equals((167).ToString())) - return DocumentType.VEHICLE_SALES_PERSON_LICENSE; - - if (value.Equals((168).ToString())) - return DocumentType.WORKER_IDENTIFICATION_CREDENTIAL; - - if (value.Equals((169).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE; - - if (value.Equals((170).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_18; - - if (value.Equals((171).ToString())) - return DocumentType.COMMERCIAL_DRIVING_LICENSE_NOVICE_UNDER_21; - - if (value.Equals((172).ToString())) - return DocumentType.PASSPORT_CARD; - - if (value.Equals((173).ToString())) - return DocumentType.PASSPORT_RESIDENT_CARD; - - if (value.Equals((174).ToString())) - return DocumentType.PERSONAL_IDENTIFICATION_VERIFICATION; - - if (value.Equals((175).ToString())) - return DocumentType.TEMPORARY_OPERATOR_LICENSE; - - if (value.Equals((176).ToString())) - return DocumentType.DRIVING_LICENSE_UNDER_19; - - if (value.Equals((177).ToString())) - return DocumentType.IDENTITY_CARD_UNDER_19; - - if (value.Equals((178).ToString())) - return DocumentType.VISA; - - if (value.Equals((179).ToString())) - return DocumentType.TEMPORARY_PASSPORT; - - if (value.Equals((180).ToString())) - return DocumentType.VOTING_CARD; - - if (value.Equals((181).ToString())) - return DocumentType.HEALTH_CARD; - - if (value.Equals((182).ToString())) - return DocumentType.CERTIFICATE_OF_CITIZENSHIP; - - if (value.Equals((183).ToString())) - return DocumentType.ADDRESS_CARD; - - if (value.Equals((184).ToString())) - return DocumentType.AIRPORT_IMMIGRATION_CARD; - - if (value.Equals((185).ToString())) - return DocumentType.ALIEN_REGISTRATION_CARD; - - if (value.Equals((186).ToString())) - return DocumentType.APEH_CARD; - - if (value.Equals((187).ToString())) - return DocumentType.COUPON_TO_DRIVING_LICENSE; - - if (value.Equals((188).ToString())) - return DocumentType.CREW_MEMBER_CERTIFICATE; - - if (value.Equals((189).ToString())) - return DocumentType.DOCUMENT_FOR_RETURN; - - if (value.Equals((190).ToString())) - return DocumentType.E_CARD; - - if (value.Equals((191).ToString())) - return DocumentType.EMPLOYMENT_CARD; - - if (value.Equals((192).ToString())) - return DocumentType.HKSAR_IMMIGRATION_FORM; - - if (value.Equals((193).ToString())) - return DocumentType.IMMIGRANT_CARD; - - if (value.Equals((194).ToString())) - return DocumentType.LABOUR_CARD; - - if (value.Equals((195).ToString())) - return DocumentType.LAISSEZ_PASSER; - - if (value.Equals((196).ToString())) - return DocumentType.LAWYER_IDENTITY_CERTIFICATE; - - if (value.Equals((197).ToString())) - return DocumentType.LICENSE_CARD; - - if (value.Equals((198).ToString())) - return DocumentType.PASSPORT_STATELESS; - - if (value.Equals((199).ToString())) - return DocumentType.PASSPORT_CHILD; - - if (value.Equals((200).ToString())) - return DocumentType.PASSPORT_CONSULAR; - - if (value.Equals((201).ToString())) - return DocumentType.PASSPORT_DIPLOMATIC_SERVICE; - - if (value.Equals((202).ToString())) - return DocumentType.PASSPORT_OFFICIAL; - - if (value.Equals((203).ToString())) - return DocumentType.PASSPORT_PROVISIONAL; - - if (value.Equals((204).ToString())) - return DocumentType.PASSPORT_SPECIAL; - - if (value.Equals((205).ToString())) - return DocumentType.PERMISSION_TO_THE_LOCAL_BORDER_TRAFFIC; - - if (value.Equals((206).ToString())) - return DocumentType.REGISTRATION_CERTIFICATE; - - if (value.Equals((207).ToString())) - return DocumentType.SEDESOL_CARD; - - if (value.Equals((208).ToString())) - return DocumentType.SOCIAL_CARD; - - if (value.Equals((209).ToString())) - return DocumentType.TB_CARD; - - if (value.Equals((210).ToString())) - return DocumentType.VEHICLE_PASSPORT; - - if (value.Equals((211).ToString())) - return DocumentType.W_DOCUMENT; - - if (value.Equals((212).ToString())) - return DocumentType.DIPLOMATIC_IDENTITY_CARD; - - if (value.Equals((213).ToString())) - return DocumentType.CONSULAR_IDENTITY_CARD; - - if (value.Equals((214).ToString())) - return DocumentType.INCOME_TAX_CARD; - - if (value.Equals((215).ToString())) - return DocumentType.RESIDENCE_PERMIT; - - if (value.Equals((216).ToString())) - return DocumentType.DOCUMENT_OF_IDENTITY; - - if (value.Equals((217).ToString())) - return DocumentType.BORDER_CROSSING_PERMIT; - - if (value.Equals((218).ToString())) - return DocumentType.PASSPORT_LIMITED_VALIDITY; - - if (value.Equals((219).ToString())) - return DocumentType.SIM_CARD; - - if (value.Equals((220).ToString())) - return DocumentType.TAX_CARD; - - if (value.Equals((221).ToString())) - return DocumentType.COMPANY_CARD; - - if (value.Equals((222).ToString())) - return DocumentType.DOMESTIC_PASSPORT; - - if (value.Equals((223).ToString())) - return DocumentType.IDENTITY_CERTIFICATE; - - if (value.Equals((224).ToString())) - return DocumentType.RESIDENT_ID_CARD; - - if (value.Equals((225).ToString())) - return DocumentType.ARMED_FORCES_IDENTITY_CARD; - - if (value.Equals((226).ToString())) - return DocumentType.PROFESSIONAL_CARD; - - if (value.Equals((227).ToString())) - return DocumentType.REGISTRATION_STAMP; - - if (value.Equals((228).ToString())) - return DocumentType.DRIVER_CARD; - - if (value.Equals((229).ToString())) - return DocumentType.DRIVER_TRAINING_CERTIFICATE; - - if (value.Equals((230).ToString())) - return DocumentType.QUALIFICATION_DRIVING_LICENSE; - - if (value.Equals((231).ToString())) - return DocumentType.MEMBERSHIP_CARD; - - if (value.Equals((232).ToString())) - return DocumentType.PUBLIC_VEHICLE_DRIVER_AUTHORITY_CARD; - - if (value.Equals((233).ToString())) - return DocumentType.MARINE_LICENSE; - - if (value.Equals((234).ToString())) - return DocumentType.TEMPORARY_LEARNER_LICENSE; - - if (value.Equals((235).ToString())) - return DocumentType.TEMPORARY_COMMERCIAL_DRIVING_LICENSE; - - if (value.Equals((236).ToString())) - return DocumentType.INTERIM_INSTRUCTIONAL_PERMIT; - - if (value.Equals((237).ToString())) - return DocumentType.CERTIFICATE_OF_COMPETENCY; - - if (value.Equals((238).ToString())) - return DocumentType.CERTIFICATE_OF_PROFICIENCY; - - if (value.Equals((239).ToString())) - return DocumentType.TRADE_LICENSE; - - if (value.Equals((240).ToString())) - return DocumentType.PASSPORT_PAGE; - - if (value.Equals((241).ToString())) - return DocumentType.INVOICE; - - if (value.Equals((242).ToString())) - return DocumentType.PASSENGER_LOCATOR_FORM; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(DocumentType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class DocumentTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override DocumentType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - DocumentType? result = rawValue == null - ? null - : DocumentTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DocumentType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentType documentType, JsonSerializerOptions options) - { - writer.WriteStringValue(documentType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class DocumentTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a DocumentType from the Json object - /// - /// - /// - /// - /// - public override DocumentType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - DocumentType? result = rawValue == null - ? null - : DocumentTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentType? documentType, JsonSerializerOptions options) - { - writer.WriteStringValue(documentType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs index ccb734d..fba21e6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypeRecognitionResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -46,135 +47,4 @@ public enum DocumentTypeRecognitionResult NEED_MORE_IMAGES = 29 } - /// - /// Converts to and from the JSON value - /// - public static class DocumentTypeRecognitionResultValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static DocumentTypeRecognitionResult FromString(string value) - { - if (value.Equals((0).ToString())) - return DocumentTypeRecognitionResult.OK; - - if (value.Equals((15).ToString())) - return DocumentTypeRecognitionResult.UNKNOWN; - - if (value.Equals((29).ToString())) - return DocumentTypeRecognitionResult.NEED_MORE_IMAGES; - - throw new NotImplementedException($"Could not convert value to type DocumentTypeRecognitionResult: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static DocumentTypeRecognitionResult? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return DocumentTypeRecognitionResult.OK; - - if (value.Equals((15).ToString())) - return DocumentTypeRecognitionResult.UNKNOWN; - - if (value.Equals((29).ToString())) - return DocumentTypeRecognitionResult.NEED_MORE_IMAGES; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(DocumentTypeRecognitionResult value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class DocumentTypeRecognitionResultJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override DocumentTypeRecognitionResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - DocumentTypeRecognitionResult? result = rawValue == null - ? null - : DocumentTypeRecognitionResultValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DocumentTypeRecognitionResult to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentTypeRecognitionResult documentTypeRecognitionResult, JsonSerializerOptions options) - { - writer.WriteStringValue(documentTypeRecognitionResult.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class DocumentTypeRecognitionResultNullableJsonConverter : JsonConverter - { - /// - /// Returns a DocumentTypeRecognitionResult from the Json object - /// - /// - /// - /// - /// - public override DocumentTypeRecognitionResult? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - DocumentTypeRecognitionResult? result = rawValue == null - ? null - : DocumentTypeRecognitionResultValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentTypeRecognitionResult? documentTypeRecognitionResult, JsonSerializerOptions options) - { - writer.WriteStringValue(documentTypeRecognitionResult?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs index c5238ff..5b4109f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,60 +14,46 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentTypesCandidates /// + [DataContract(Name = "DocumentTypesCandidates")] public partial class DocumentTypesCandidates : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// recResult - /// candidates - [JsonConstructor] - public DocumentTypesCandidates(Option recResult = default, Option?> candidates = default) - { - RecResultOption = recResult; - CandidatesOption = candidates; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Used to track the state of RecResult - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RecResultOption { get; private set; } /// /// Gets or Sets RecResult /// - [JsonPropertyName("RecResult")] - public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new(value); } } - + [DataMember(Name = "RecResult", EmitDefaultValue = false)] + public DocumentTypeRecognitionResult? RecResult { get; set; } /// - /// Used to track the state of Candidates + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> CandidatesOption { get; private set; } + /// recResult. + /// candidates. + public DocumentTypesCandidates(DocumentTypeRecognitionResult? recResult = default(DocumentTypeRecognitionResult?), List candidates = default(List)) + { + this.RecResult = recResult; + this.Candidates = candidates; + } /// /// Gets or Sets Candidates /// - [JsonPropertyName("Candidates")] - public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new(value); } } + [DataMember(Name = "Candidates", EmitDefaultValue = false)] + public List Candidates { get; set; } /// /// Returns the string presentation of the object @@ -85,6 +69,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -96,107 +89,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocumentTypesCandidatesJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocumentTypesCandidates Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option recResult = default; - Option?> candidates = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RecResult": - string? recResultRawValue = utf8JsonReader.GetString(); - if (recResultRawValue != null) - recResult = new Option(DocumentTypeRecognitionResultValueConverter.FromStringOrDefault(recResultRawValue)); - break; - case "Candidates": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - candidates = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (recResult.IsSet && recResult.Value == null) - throw new ArgumentNullException(nameof(recResult), "Property is not nullable for class DocumentTypesCandidates."); - - if (candidates.IsSet && candidates.Value == null) - throw new ArgumentNullException(nameof(candidates), "Property is not nullable for class DocumentTypesCandidates."); - - return new DocumentTypesCandidates(recResult, candidates); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentTypesCandidates documentTypesCandidates, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, documentTypesCandidates, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentTypesCandidates documentTypesCandidates, JsonSerializerOptions jsonSerializerOptions) - { - if (documentTypesCandidates.CandidatesOption.IsSet && documentTypesCandidates.Candidates == null) - throw new ArgumentNullException(nameof(documentTypesCandidates.Candidates), "Property is required for class DocumentTypesCandidates."); - - if (documentTypesCandidates.RecResultOption.IsSet) - { - var recResultRawValue = DocumentTypeRecognitionResultValueConverter.ToJsonValue(documentTypesCandidates.RecResult!.Value); - writer.WriteNumber("RecResult", recResultRawValue); - } - if (documentTypesCandidates.CandidatesOption.IsSet) - { - writer.WritePropertyName("Candidates"); - JsonSerializer.Serialize(writer, documentTypesCandidates.Candidates, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs index dbc5edd..7631127 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,60 +14,46 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentTypesCandidatesList /// + [DataContract(Name = "DocumentTypesCandidatesList")] public partial class DocumentTypesCandidatesList : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// recResult - /// candidates - [JsonConstructor] - public DocumentTypesCandidatesList(Option recResult = default, Option?> candidates = default) - { - RecResultOption = recResult; - CandidatesOption = candidates; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Used to track the state of RecResult - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RecResultOption { get; private set; } /// /// Gets or Sets RecResult /// - [JsonPropertyName("RecResult")] - public DocumentTypeRecognitionResult? RecResult { get { return this.RecResultOption; } set { this.RecResultOption = new(value); } } - + [DataMember(Name = "RecResult", EmitDefaultValue = false)] + public DocumentTypeRecognitionResult? RecResult { get; set; } /// - /// Used to track the state of Candidates + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> CandidatesOption { get; private set; } + /// recResult. + /// candidates. + public DocumentTypesCandidatesList(DocumentTypeRecognitionResult? recResult = default(DocumentTypeRecognitionResult?), List candidates = default(List)) + { + this.RecResult = recResult; + this.Candidates = candidates; + } /// /// Gets or Sets Candidates /// - [JsonPropertyName("Candidates")] - public List? Candidates { get { return this.CandidatesOption; } set { this.CandidatesOption = new(value); } } + [DataMember(Name = "Candidates", EmitDefaultValue = false)] + public List Candidates { get; set; } /// /// Returns the string presentation of the object @@ -85,6 +69,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -96,107 +89,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocumentTypesCandidatesListJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocumentTypesCandidatesList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option recResult = default; - Option?> candidates = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RecResult": - string? recResultRawValue = utf8JsonReader.GetString(); - if (recResultRawValue != null) - recResult = new Option(DocumentTypeRecognitionResultValueConverter.FromStringOrDefault(recResultRawValue)); - break; - case "Candidates": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - candidates = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (recResult.IsSet && recResult.Value == null) - throw new ArgumentNullException(nameof(recResult), "Property is not nullable for class DocumentTypesCandidatesList."); - - if (candidates.IsSet && candidates.Value == null) - throw new ArgumentNullException(nameof(candidates), "Property is not nullable for class DocumentTypesCandidatesList."); - - return new DocumentTypesCandidatesList(recResult, candidates); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentTypesCandidatesList documentTypesCandidatesList, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, documentTypesCandidatesList, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentTypesCandidatesList documentTypesCandidatesList, JsonSerializerOptions jsonSerializerOptions) - { - if (documentTypesCandidatesList.CandidatesOption.IsSet && documentTypesCandidatesList.Candidates == null) - throw new ArgumentNullException(nameof(documentTypesCandidatesList.Candidates), "Property is required for class DocumentTypesCandidatesList."); - - if (documentTypesCandidatesList.RecResultOption.IsSet) - { - var recResultRawValue = DocumentTypeRecognitionResultValueConverter.ToJsonValue(documentTypesCandidatesList.RecResult!.Value); - writer.WriteNumber("RecResult", recResultRawValue); - } - if (documentTypesCandidatesList.CandidatesOption.IsSet) - { - writer.WritePropertyName("Candidates"); - JsonSerializer.Serialize(writer, documentTypesCandidatesList.Candidates, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs index 9412cca..6497f44 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,49 +14,49 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// DocumentTypesCandidatesResult /// + [DataContract(Name = "DocumentTypesCandidatesResult")] public partial class DocumentTypesCandidatesResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// bufLength - /// light - /// listIdx - /// pageIdx - /// candidatesList - [JsonConstructor] - public DocumentTypesCandidatesResult(Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default, Option candidatesList = default) : base(bufLength, light, listIdx, pageIdx) - { - CandidatesListOption = candidatesList; - OnCreated(); - } - - partial void OnCreated(); - + [JsonConstructorAttribute] + protected DocumentTypesCandidatesResult() { } /// - /// Used to track the state of CandidatesList + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CandidatesListOption { get; private set; } + /// candidatesList. + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public DocumentTypesCandidatesResult(DocumentTypesCandidatesList candidatesList = default(DocumentTypesCandidatesList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + { + this.CandidatesList = candidatesList; + } /// /// Gets or Sets CandidatesList /// - [JsonPropertyName("CandidatesList")] - public DocumentTypesCandidatesList? CandidatesList { get { return this.CandidatesListOption; } set { this.CandidatesListOption = new(value); } } + [DataMember(Name = "CandidatesList", EmitDefaultValue = false)] + public DocumentTypesCandidatesList CandidatesList { get; set; } /// /// Returns the string presentation of the object @@ -68,157 +66,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class DocumentTypesCandidatesResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" CandidatesList: ").Append(CandidatesList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class DocumentTypesCandidatesResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override DocumentTypesCandidatesResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - Option candidatesList = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - case "CandidatesList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - candidatesList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class DocumentTypesCandidatesResult.", nameof(resultType)); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class DocumentTypesCandidatesResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class DocumentTypesCandidatesResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class DocumentTypesCandidatesResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class DocumentTypesCandidatesResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class DocumentTypesCandidatesResult."); - - if (candidatesList.IsSet && candidatesList.Value == null) - throw new ArgumentNullException(nameof(candidatesList), "Property is not nullable for class DocumentTypesCandidatesResult."); - - return new DocumentTypesCandidatesResult(bufLength, light, listIdx, pageIdx, candidatesList); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentTypesCandidatesResult documentTypesCandidatesResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, documentTypesCandidatesResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentTypesCandidatesResult documentTypesCandidatesResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (documentTypesCandidatesResult.CandidatesListOption.IsSet && documentTypesCandidatesResult.CandidatesList == null) - throw new ArgumentNullException(nameof(documentTypesCandidatesResult.CandidatesList), "Property is required for class DocumentTypesCandidatesResult."); - - if (documentTypesCandidatesResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", documentTypesCandidatesResult.BufLengthOption.Value!.Value); - - if (documentTypesCandidatesResult.LightOption.IsSet) - writer.WriteNumber("light", documentTypesCandidatesResult.LightOption.Value!.Value); - - if (documentTypesCandidatesResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", documentTypesCandidatesResult.ListIdxOption.Value!.Value); - - if (documentTypesCandidatesResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", documentTypesCandidatesResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", documentTypesCandidatesResult.ResultType); - - if (documentTypesCandidatesResult.CandidatesListOption.IsSet) + foreach (var x in base.BaseValidate(validationContext)) { - writer.WritePropertyName("CandidatesList"); - JsonSerializer.Serialize(writer, documentTypesCandidatesResult.CandidatesList, jsonSerializerOptions); + yield return x; } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs index a0bbcf4..66658aa 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,94 +14,66 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Document database information /// + [DataContract(Name = "DocumentsDatabase")] public partial class DocumentsDatabase : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Document database description - /// Date the document database was created - /// Document database identifier - /// Document database version - [JsonConstructor] - public DocumentsDatabase(Option description = default, Option exportDate = default, Option iD = default, Option varVersion = default) + /// Document database description. + /// Date the document database was created. + /// Document database identifier. + /// Document database version. + public DocumentsDatabase(string description = default(string), string exportDate = default(string), string iD = default(string), string varVersion = default(string)) { - DescriptionOption = description; - ExportDateOption = exportDate; - IDOption = iD; - VarVersionOption = varVersion; - OnCreated(); + this.Description = description; + this.ExportDate = exportDate; + this.ID = iD; + this.VarVersion = varVersion; } - partial void OnCreated(); - - /// - /// Used to track the state of Description - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DescriptionOption { get; private set; } - /// /// Document database description /// /// Document database description - [JsonPropertyName("Description")] - public string? Description { get { return this.DescriptionOption; } set { this.DescriptionOption = new(value); } } - - /// - /// Used to track the state of ExportDate - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ExportDateOption { get; private set; } + [DataMember(Name = "Description", EmitDefaultValue = false)] + public string Description { get; set; } /// /// Date the document database was created /// /// Date the document database was created - [JsonPropertyName("ExportDate")] - public string? ExportDate { get { return this.ExportDateOption; } set { this.ExportDateOption = new(value); } } - - /// - /// Used to track the state of ID - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option IDOption { get; private set; } + [DataMember(Name = "ExportDate", EmitDefaultValue = false)] + public string ExportDate { get; set; } /// /// Document database identifier /// /// Document database identifier - [JsonPropertyName("ID")] - public string? ID { get { return this.IDOption; } set { this.IDOption = new(value); } } - - /// - /// Used to track the state of VarVersion - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option VarVersionOption { get; private set; } + [DataMember(Name = "ID", EmitDefaultValue = false)] + public string ID { get; set; } /// /// Document database version /// /// Document database version - [JsonPropertyName("Version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } + [DataMember(Name = "Version", EmitDefaultValue = false)] + public string VarVersion { get; set; } /// /// Returns the string presentation of the object @@ -121,6 +91,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -132,128 +111,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class DocumentsDatabaseJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override DocumentsDatabase Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option description = default; - Option exportDate = default; - Option iD = default; - Option varVersion = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Description": - description = new Option(utf8JsonReader.GetString()!); - break; - case "ExportDate": - exportDate = new Option(utf8JsonReader.GetString()!); - break; - case "ID": - iD = new Option(utf8JsonReader.GetString()!); - break; - case "Version": - varVersion = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (description.IsSet && description.Value == null) - throw new ArgumentNullException(nameof(description), "Property is not nullable for class DocumentsDatabase."); - - if (exportDate.IsSet && exportDate.Value == null) - throw new ArgumentNullException(nameof(exportDate), "Property is not nullable for class DocumentsDatabase."); - - if (iD.IsSet && iD.Value == null) - throw new ArgumentNullException(nameof(iD), "Property is not nullable for class DocumentsDatabase."); - - if (varVersion.IsSet && varVersion.Value == null) - throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class DocumentsDatabase."); - - return new DocumentsDatabase(description, exportDate, iD, varVersion); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, DocumentsDatabase documentsDatabase, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, documentsDatabase, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, DocumentsDatabase documentsDatabase, JsonSerializerOptions jsonSerializerOptions) - { - if (documentsDatabase.DescriptionOption.IsSet && documentsDatabase.Description == null) - throw new ArgumentNullException(nameof(documentsDatabase.Description), "Property is required for class DocumentsDatabase."); - - if (documentsDatabase.ExportDateOption.IsSet && documentsDatabase.ExportDate == null) - throw new ArgumentNullException(nameof(documentsDatabase.ExportDate), "Property is required for class DocumentsDatabase."); - - if (documentsDatabase.IDOption.IsSet && documentsDatabase.ID == null) - throw new ArgumentNullException(nameof(documentsDatabase.ID), "Property is required for class DocumentsDatabase."); - - if (documentsDatabase.VarVersionOption.IsSet && documentsDatabase.VarVersion == null) - throw new ArgumentNullException(nameof(documentsDatabase.VarVersion), "Property is required for class DocumentsDatabase."); - - if (documentsDatabase.DescriptionOption.IsSet) - writer.WriteString("Description", documentsDatabase.Description); - - if (documentsDatabase.ExportDateOption.IsSet) - writer.WriteString("ExportDate", documentsDatabase.ExportDate); - - if (documentsDatabase.IDOption.IsSet) - writer.WriteString("ID", documentsDatabase.ID); - - if (documentsDatabase.VarVersionOption.IsSet) - writer.WriteString("Version", documentsDatabase.VarVersion); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index 10dec06..0cf7fa2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,39 +14,51 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// EncryptedRCLItem /// + [DataContract(Name = "EncryptedRCLItem")] public partial class EncryptedRCLItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Base64 encoded data - [JsonConstructor] - public EncryptedRCLItem(byte[] encryptedRCL) + [JsonConstructorAttribute] + protected EncryptedRCLItem() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded data (required). + public EncryptedRCLItem(byte[] encryptedRCL = default(byte[])) { - EncryptedRCL = encryptedRCL; - OnCreated(); + // to ensure "encryptedRCL" is required (not null) + if (encryptedRCL == null) + { + throw new ArgumentNullException("encryptedRCL is a required property for EncryptedRCLItem and cannot be null"); + } + this.EncryptedRCL = encryptedRCL; } - partial void OnCreated(); - /// /// Base64 encoded data /// /// Base64 encoded data - /* [B@4f262bf7 */ - [JsonPropertyName("EncryptedRCL")] + /* + [B@4949a73a + */ + [DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)] public byte[] EncryptedRCL { get; set; } /// @@ -64,6 +74,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -75,93 +94,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class EncryptedRCLItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override EncryptedRCLItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option encryptedRCL = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "EncryptedRCL": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - encryptedRCL = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!encryptedRCL.IsSet) - throw new ArgumentException("Property is required for class EncryptedRCLItem.", nameof(encryptedRCL)); - - if (encryptedRCL.IsSet && encryptedRCL.Value == null) - throw new ArgumentNullException(nameof(encryptedRCL), "Property is not nullable for class EncryptedRCLItem."); - - return new EncryptedRCLItem(encryptedRCL.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, EncryptedRCLItem encryptedRCLItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, encryptedRCLItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, EncryptedRCLItem encryptedRCLItem, JsonSerializerOptions jsonSerializerOptions) - { - if (encryptedRCLItem.EncryptedRCL == null) - throw new ArgumentNullException(nameof(encryptedRCLItem.EncryptedRCL), "Property is required for class EncryptedRCLItem."); - - writer.WritePropertyName("EncryptedRCL"); - JsonSerializer.Serialize(writer, encryptedRCLItem.EncryptedRCL, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs index c67732d..0f5fa4a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,43 +14,57 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains encrypted result container list /// + [DataContract(Name = "EncryptedRCLResult")] public partial class EncryptedRCLResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Base64 encoded data - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public EncryptedRCLResult(byte[] encryptedRCL, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected EncryptedRCLResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded data (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public EncryptedRCLResult(byte[] encryptedRCL = default(byte[]), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - EncryptedRCL = encryptedRCL; - OnCreated(); + // to ensure "encryptedRCL" is required (not null) + if (encryptedRCL == null) + { + throw new ArgumentNullException("encryptedRCL is a required property for EncryptedRCLResult and cannot be null"); + } + this.EncryptedRCL = encryptedRCL; } - partial void OnCreated(); - /// /// Base64 encoded data /// /// Base64 encoded data - /* [B@4f262bf7 */ - [JsonPropertyName("EncryptedRCL")] + /* + [B@4949a73a + */ + [DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)] public byte[] EncryptedRCL { get; set; } /// @@ -63,156 +75,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class EncryptedRCLResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" EncryptedRCL: ").Append(EncryptedRCL).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class EncryptedRCLResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override EncryptedRCLResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option encryptedRCL = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "EncryptedRCL": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - encryptedRCL = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!encryptedRCL.IsSet) - throw new ArgumentException("Property is required for class EncryptedRCLResult.", nameof(encryptedRCL)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class EncryptedRCLResult.", nameof(resultType)); - - if (encryptedRCL.IsSet && encryptedRCL.Value == null) - throw new ArgumentNullException(nameof(encryptedRCL), "Property is not nullable for class EncryptedRCLResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class EncryptedRCLResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class EncryptedRCLResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class EncryptedRCLResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class EncryptedRCLResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class EncryptedRCLResult."); - - return new EncryptedRCLResult(encryptedRCL.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, EncryptedRCLResult encryptedRCLResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, encryptedRCLResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, EncryptedRCLResult encryptedRCLResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (encryptedRCLResult.EncryptedRCL == null) - throw new ArgumentNullException(nameof(encryptedRCLResult.EncryptedRCL), "Property is required for class EncryptedRCLResult."); - - writer.WritePropertyName("EncryptedRCL"); - JsonSerializer.Serialize(writer, encryptedRCLResult.EncryptedRCL, jsonSerializerOptions); - if (encryptedRCLResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", encryptedRCLResult.BufLengthOption.Value!.Value); - - if (encryptedRCLResult.LightOption.IsSet) - writer.WriteNumber("light", encryptedRCLResult.LightOption.Value!.Value); - - if (encryptedRCLResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", encryptedRCLResult.ListIdxOption.Value!.Value); - - if (encryptedRCLResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", encryptedRCLResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", encryptedRCLResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs index 05baa71..5652ec5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,90 +14,62 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ErrorCoordinates /// + [DataContract(Name = "ErrorCoordinates")] public partial class ErrorCoordinates : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// left - /// top - /// right - /// bottom - [JsonConstructor] - public ErrorCoordinates(Option left = default, Option top = default, Option right = default, Option bottom = default) + /// left. + /// top. + /// right. + /// bottom. + public ErrorCoordinates(decimal left = default(decimal), decimal top = default(decimal), decimal right = default(decimal), decimal bottom = default(decimal)) { - LeftOption = left; - TopOption = top; - RightOption = right; - BottomOption = bottom; - OnCreated(); + this.Left = left; + this.Top = top; + this.Right = right; + this.Bottom = bottom; } - partial void OnCreated(); - - /// - /// Used to track the state of Left - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LeftOption { get; private set; } - /// /// Gets or Sets Left /// - [JsonPropertyName("Left")] - public decimal? Left { get { return this.LeftOption; } set { this.LeftOption = new(value); } } - - /// - /// Used to track the state of Top - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TopOption { get; private set; } + [DataMember(Name = "Left", EmitDefaultValue = false)] + public decimal Left { get; set; } /// /// Gets or Sets Top /// - [JsonPropertyName("Top")] - public decimal? Top { get { return this.TopOption; } set { this.TopOption = new(value); } } - - /// - /// Used to track the state of Right - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RightOption { get; private set; } + [DataMember(Name = "Top", EmitDefaultValue = false)] + public decimal Top { get; set; } /// /// Gets or Sets Right /// - [JsonPropertyName("Right")] - public decimal? Right { get { return this.RightOption; } set { this.RightOption = new(value); } } - - /// - /// Used to track the state of Bottom - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BottomOption { get; private set; } + [DataMember(Name = "Right", EmitDefaultValue = false)] + public decimal Right { get; set; } /// /// Gets or Sets Bottom /// - [JsonPropertyName("Bottom")] - public decimal? Bottom { get { return this.BottomOption; } set { this.BottomOption = new(value); } } + [DataMember(Name = "Bottom", EmitDefaultValue = false)] + public decimal Bottom { get; set; } /// /// Returns the string presentation of the object @@ -117,6 +87,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -128,120 +107,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ErrorCoordinatesJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ErrorCoordinates Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option left = default; - Option top = default; - Option right = default; - Option bottom = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Left": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - left = new Option(utf8JsonReader.GetDecimal()); - break; - case "Top": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - top = new Option(utf8JsonReader.GetDecimal()); - break; - case "Right": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - right = new Option(utf8JsonReader.GetDecimal()); - break; - case "Bottom": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bottom = new Option(utf8JsonReader.GetDecimal()); - break; - default: - break; - } - } - } - - if (left.IsSet && left.Value == null) - throw new ArgumentNullException(nameof(left), "Property is not nullable for class ErrorCoordinates."); - - if (top.IsSet && top.Value == null) - throw new ArgumentNullException(nameof(top), "Property is not nullable for class ErrorCoordinates."); - - if (right.IsSet && right.Value == null) - throw new ArgumentNullException(nameof(right), "Property is not nullable for class ErrorCoordinates."); - - if (bottom.IsSet && bottom.Value == null) - throw new ArgumentNullException(nameof(bottom), "Property is not nullable for class ErrorCoordinates."); - - return new ErrorCoordinates(left, top, right, bottom); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ErrorCoordinates errorCoordinates, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, errorCoordinates, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ErrorCoordinates errorCoordinates, JsonSerializerOptions jsonSerializerOptions) - { - if (errorCoordinates.LeftOption.IsSet) - writer.WriteNumber("Left", errorCoordinates.LeftOption.Value!.Value); - - if (errorCoordinates.TopOption.IsSet) - writer.WriteNumber("Top", errorCoordinates.TopOption.Value!.Value); - - if (errorCoordinates.RightOption.IsSet) - writer.WriteNumber("Right", errorCoordinates.RightOption.Value!.Value); - - if (errorCoordinates.BottomOption.IsSet) - writer.WriteNumber("Bottom", errorCoordinates.BottomOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/AuthenticityResult.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/AuthenticityResult.cs index 6b2c9b8..4dbca9d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/AuthenticityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/AuthenticityResult.cs @@ -1,7 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Linq; +using System.Collections.Generic; namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity { diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/Autheticity.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/Autheticity.cs index 6b563a5..dd67275 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/Autheticity.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/Autheticity.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Linq; namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity { diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/FiberChecks.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/FiberChecks.cs index e048305..501a8f7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/FiberChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/FiberChecks.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity +namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity { public class FiberChecks : AuthenticityResult { diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/IdentChecks.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/IdentChecks.cs index cdaab73..ef71321 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/IdentChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/IdentChecks.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Linq; namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity { diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/ImageIdentChecks.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/ImageIdentChecks.cs index d672ddc..3c8679c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/ImageIdentChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/ImageIdentChecks.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity +namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity { public class ImageIdentChecks : AuthenticityResult { diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/OCRSecurityTextChecks.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/OCRSecurityTextChecks.cs index 850692d..3874cbf 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/OCRSecurityTextChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/OCRSecurityTextChecks.cs @@ -1,8 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Text; - -namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity +namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity { public class OCRSecurityTextChecks : AuthenticityResult { diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/SecurityFeatureChecks.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/SecurityFeatureChecks.cs index 8700c0b..bd4a8a1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/SecurityFeatureChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/SecurityFeatureChecks.cs @@ -1,6 +1,4 @@ -using System; -using System.Collections.Generic; -using System.Linq; +using System.Linq; namespace Regula.DocumentReader.WebClient.Model.Ext.Autheticity { diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/ImageDataExt.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/ImageDataExt.cs index 8e5e464..7ebcccb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/ImageDataExt.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/ImageDataExt.cs @@ -5,8 +5,10 @@ namespace Regula.DocumentReader.WebClient.Model.Ext public class ImageDataExt : ImageData { public ImageDataExt(byte[] imageData) - : base(Convert.ToBase64String(imageData)) { + string base64Image = Convert.ToBase64String(imageData); + + Image = base64Image; } } } \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs index bdcedf4..35ce135 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs @@ -1,15 +1,9 @@ -using System; using System.Collections.Generic; namespace Regula.DocumentReader.WebClient.Model.Ext { public class RecognitionParams : ProcessParams { - public RecognitionParams(Scenario scenario) - : base(scenario) - { - } - public RecognitionParams WithCustomParams(Dictionary customParams){ CustomParams = customParams; return this; diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs index 91e81f7..73ffb3e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs @@ -3,22 +3,22 @@ using System.IO; using System.Text; using ICSharpCode.SharpZipLib.Zip.Compression.Streams; -using Regula.DocumentReader.WebClient.Api; +using Regula.DocumentReader.WebClient.Client; namespace Regula.DocumentReader.WebClient.Model.Ext { public class RecognitionResponse { - private readonly IApiProcessApiResponse _apiResponse; + private readonly ApiResponse _apiResponse; - public RecognitionResponse(IApiProcessApiResponse apiResponse) + public RecognitionResponse(ApiResponse apiResponse) { _apiResponse = apiResponse; } - public ProcessResponse OriginalResponse => this._apiResponse.Ok(); + public ProcessResponse OriginalResponse => this._apiResponse.Data; - // public string Json => this._apiResponse.RawResponse; + public string Json => this._apiResponse.RawContent; public AuthenticityResult PortraitComparison() { diff --git a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs index e7648d8..4349cae 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,157 +14,161 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Extended document type info and Regula's 'Information Reference Systems' links /// + [DataContract(Name = "FDSIDList")] public partial class FDSIDList : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// ICAO code of the issuing country - /// Number of elements in the List - /// Document identifiers in 'Information Reference Systems' - /// dType - /// dFormat - /// Flag indicating the presence of MRZ on the document - /// Year of publication of the document - /// Issuing country name - /// Whether the document is deprecated - /// Document description - /// Issuing state code - /// Issuing state name - [JsonConstructor] - public FDSIDList(string iCAOCode, decimal count, List list, DocumentType dType, DocumentFormat dFormat, bool dMRZ, string dYear, string dCountryName, bool isDeprecated, Option dDescription = default, Option dStateCode = default, Option dStateName = default) - { - ICAOCode = iCAOCode; - Count = count; - List = list; - DType = dType; - DFormat = dFormat; - DMRZ = dMRZ; - DYear = dYear; - DCountryName = dCountryName; - IsDeprecated = isDeprecated; - DDescriptionOption = dDescription; - DStateCodeOption = dStateCode; - DStateNameOption = dStateName; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets DType /// - [JsonPropertyName("dType")] + [DataMember(Name = "dType", IsRequired = true, EmitDefaultValue = true)] public DocumentType DType { get; set; } /// /// Gets or Sets DFormat /// - [JsonPropertyName("dFormat")] + [DataMember(Name = "dFormat", IsRequired = true, EmitDefaultValue = true)] public DocumentFormat DFormat { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FDSIDList() { } + /// + /// Initializes a new instance of the class. + /// + /// ICAO code of the issuing country (required). + /// Number of elements in the List (required). + /// Document identifiers in 'Information Reference Systems' (required). + /// dType (required). + /// dFormat (required). + /// Flag indicating the presence of MRZ on the document (required). + /// Document description. + /// Year of publication of the document (required). + /// Issuing country name (required). + /// Issuing state code. + /// Issuing state name. + /// Whether the document is deprecated (required). + public FDSIDList(string iCAOCode = default(string), decimal count = default(decimal), List list = default(List), DocumentType dType = default(DocumentType), DocumentFormat dFormat = default(DocumentFormat), bool dMRZ = default(bool), string dDescription = default(string), string dYear = default(string), string dCountryName = default(string), string dStateCode = default(string), string dStateName = default(string), bool isDeprecated = default(bool)) + { + // to ensure "iCAOCode" is required (not null) + if (iCAOCode == null) + { + throw new ArgumentNullException("iCAOCode is a required property for FDSIDList and cannot be null"); + } + this.ICAOCode = iCAOCode; + this.Count = count; + // to ensure "list" is required (not null) + if (list == null) + { + throw new ArgumentNullException("list is a required property for FDSIDList and cannot be null"); + } + this.List = list; + this.DType = dType; + this.DFormat = dFormat; + this.DMRZ = dMRZ; + // to ensure "dYear" is required (not null) + if (dYear == null) + { + throw new ArgumentNullException("dYear is a required property for FDSIDList and cannot be null"); + } + this.DYear = dYear; + // to ensure "dCountryName" is required (not null) + if (dCountryName == null) + { + throw new ArgumentNullException("dCountryName is a required property for FDSIDList and cannot be null"); + } + this.DCountryName = dCountryName; + this.IsDeprecated = isDeprecated; + this.DDescription = dDescription; + this.DStateCode = dStateCode; + this.DStateName = dStateName; + } /// /// ICAO code of the issuing country /// /// ICAO code of the issuing country - [JsonPropertyName("ICAOCode")] + [DataMember(Name = "ICAOCode", IsRequired = true, EmitDefaultValue = true)] public string ICAOCode { get; set; } /// /// Number of elements in the List /// /// Number of elements in the List - [JsonPropertyName("Count")] + [DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)] public decimal Count { get; set; } /// /// Document identifiers in 'Information Reference Systems' /// /// Document identifiers in 'Information Reference Systems' - [JsonPropertyName("List")] + [DataMember(Name = "List", IsRequired = true, EmitDefaultValue = true)] public List List { get; set; } /// /// Flag indicating the presence of MRZ on the document /// /// Flag indicating the presence of MRZ on the document - [JsonPropertyName("dMRZ")] + [DataMember(Name = "dMRZ", IsRequired = true, EmitDefaultValue = true)] public bool DMRZ { get; set; } + /// + /// Document description + /// + /// Document description + [DataMember(Name = "dDescription", EmitDefaultValue = false)] + public string DDescription { get; set; } + /// /// Year of publication of the document /// /// Year of publication of the document - [JsonPropertyName("dYear")] + [DataMember(Name = "dYear", IsRequired = true, EmitDefaultValue = true)] public string DYear { get; set; } /// /// Issuing country name /// /// Issuing country name - [JsonPropertyName("dCountryName")] + [DataMember(Name = "dCountryName", IsRequired = true, EmitDefaultValue = true)] public string DCountryName { get; set; } - /// - /// Whether the document is deprecated - /// - /// Whether the document is deprecated - [JsonPropertyName("isDeprecated")] - public bool IsDeprecated { get; set; } - - /// - /// Used to track the state of DDescription - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DDescriptionOption { get; private set; } - - /// - /// Document description - /// - /// Document description - [JsonPropertyName("dDescription")] - public string? DDescription { get { return this.DDescriptionOption; } set { this.DDescriptionOption = new(value); } } - - /// - /// Used to track the state of DStateCode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DStateCodeOption { get; private set; } - /// /// Issuing state code /// /// Issuing state code - [JsonPropertyName("dStateCode")] - public string? DStateCode { get { return this.DStateCodeOption; } set { this.DStateCodeOption = new(value); } } + [DataMember(Name = "dStateCode", EmitDefaultValue = false)] + public string DStateCode { get; set; } /// - /// Used to track the state of DStateName + /// Issuing state name /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DStateNameOption { get; private set; } + /// Issuing state name + [DataMember(Name = "dStateName", EmitDefaultValue = false)] + public string DStateName { get; set; } /// - /// Issuing state name + /// Whether the document is deprecated /// - /// Issuing state name - [JsonPropertyName("dStateName")] - public string? DStateName { get { return this.DStateNameOption; } set { this.DStateNameOption = new(value); } } + /// Whether the document is deprecated + [DataMember(Name = "isDeprecated", IsRequired = true, EmitDefaultValue = true)] + public bool IsDeprecated { get; set; } /// /// Returns the string presentation of the object @@ -182,16 +184,25 @@ public override string ToString() sb.Append(" DType: ").Append(DType).Append("\n"); sb.Append(" DFormat: ").Append(DFormat).Append("\n"); sb.Append(" DMRZ: ").Append(DMRZ).Append("\n"); + sb.Append(" DDescription: ").Append(DDescription).Append("\n"); sb.Append(" DYear: ").Append(DYear).Append("\n"); sb.Append(" DCountryName: ").Append(DCountryName).Append("\n"); - sb.Append(" IsDeprecated: ").Append(IsDeprecated).Append("\n"); - sb.Append(" DDescription: ").Append(DDescription).Append("\n"); sb.Append(" DStateCode: ").Append(DStateCode).Append("\n"); sb.Append(" DStateName: ").Append(DStateName).Append("\n"); + sb.Append(" IsDeprecated: ").Append(IsDeprecated).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -215,245 +226,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FDSIDListJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FDSIDList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option iCAOCode = default; - Option count = default; - Option?> list = default; - Option dType = default; - Option dFormat = default; - Option dMRZ = default; - Option dYear = default; - Option dCountryName = default; - Option isDeprecated = default; - Option dDescription = default; - Option dStateCode = default; - Option dStateName = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ICAOCode": - iCAOCode = new Option(utf8JsonReader.GetString()!); - break; - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetDecimal()); - break; - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "dType": - string? dTypeRawValue = utf8JsonReader.GetString(); - if (dTypeRawValue != null) - dType = new Option(DocumentTypeValueConverter.FromStringOrDefault(dTypeRawValue)); - break; - case "dFormat": - string? dFormatRawValue = utf8JsonReader.GetString(); - if (dFormatRawValue != null) - dFormat = new Option(DocumentFormatValueConverter.FromStringOrDefault(dFormatRawValue)); - break; - case "dMRZ": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - dMRZ = new Option(utf8JsonReader.GetBoolean()); - break; - case "dYear": - dYear = new Option(utf8JsonReader.GetString()!); - break; - case "dCountryName": - dCountryName = new Option(utf8JsonReader.GetString()!); - break; - case "isDeprecated": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - isDeprecated = new Option(utf8JsonReader.GetBoolean()); - break; - case "dDescription": - dDescription = new Option(utf8JsonReader.GetString()!); - break; - case "dStateCode": - dStateCode = new Option(utf8JsonReader.GetString()!); - break; - case "dStateName": - dStateName = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!iCAOCode.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(iCAOCode)); - - if (!count.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(count)); - - if (!list.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(list)); - - if (!dType.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(dType)); - - if (!dFormat.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(dFormat)); - - if (!dMRZ.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(dMRZ)); - - if (!dYear.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(dYear)); - - if (!dCountryName.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(dCountryName)); - - if (!isDeprecated.IsSet) - throw new ArgumentException("Property is required for class FDSIDList.", nameof(isDeprecated)); - - if (iCAOCode.IsSet && iCAOCode.Value == null) - throw new ArgumentNullException(nameof(iCAOCode), "Property is not nullable for class FDSIDList."); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class FDSIDList."); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class FDSIDList."); - - if (dType.IsSet && dType.Value == null) - throw new ArgumentNullException(nameof(dType), "Property is not nullable for class FDSIDList."); - - if (dFormat.IsSet && dFormat.Value == null) - throw new ArgumentNullException(nameof(dFormat), "Property is not nullable for class FDSIDList."); - - if (dMRZ.IsSet && dMRZ.Value == null) - throw new ArgumentNullException(nameof(dMRZ), "Property is not nullable for class FDSIDList."); - - if (dYear.IsSet && dYear.Value == null) - throw new ArgumentNullException(nameof(dYear), "Property is not nullable for class FDSIDList."); - - if (dCountryName.IsSet && dCountryName.Value == null) - throw new ArgumentNullException(nameof(dCountryName), "Property is not nullable for class FDSIDList."); - - if (isDeprecated.IsSet && isDeprecated.Value == null) - throw new ArgumentNullException(nameof(isDeprecated), "Property is not nullable for class FDSIDList."); - - if (dDescription.IsSet && dDescription.Value == null) - throw new ArgumentNullException(nameof(dDescription), "Property is not nullable for class FDSIDList."); - - if (dStateCode.IsSet && dStateCode.Value == null) - throw new ArgumentNullException(nameof(dStateCode), "Property is not nullable for class FDSIDList."); - - if (dStateName.IsSet && dStateName.Value == null) - throw new ArgumentNullException(nameof(dStateName), "Property is not nullable for class FDSIDList."); - - return new FDSIDList(iCAOCode.Value!, count.Value!.Value!, list.Value!, dType.Value!.Value!, dFormat.Value!.Value!, dMRZ.Value!.Value!, dYear.Value!, dCountryName.Value!, isDeprecated.Value!.Value!, dDescription, dStateCode, dStateName); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FDSIDList fDSIDList, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, fDSIDList, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FDSIDList fDSIDList, JsonSerializerOptions jsonSerializerOptions) - { - if (fDSIDList.ICAOCode == null) - throw new ArgumentNullException(nameof(fDSIDList.ICAOCode), "Property is required for class FDSIDList."); - - if (fDSIDList.List == null) - throw new ArgumentNullException(nameof(fDSIDList.List), "Property is required for class FDSIDList."); - - if (fDSIDList.DYear == null) - throw new ArgumentNullException(nameof(fDSIDList.DYear), "Property is required for class FDSIDList."); - - if (fDSIDList.DCountryName == null) - throw new ArgumentNullException(nameof(fDSIDList.DCountryName), "Property is required for class FDSIDList."); - - if (fDSIDList.DDescriptionOption.IsSet && fDSIDList.DDescription == null) - throw new ArgumentNullException(nameof(fDSIDList.DDescription), "Property is required for class FDSIDList."); - - if (fDSIDList.DStateCodeOption.IsSet && fDSIDList.DStateCode == null) - throw new ArgumentNullException(nameof(fDSIDList.DStateCode), "Property is required for class FDSIDList."); - - if (fDSIDList.DStateNameOption.IsSet && fDSIDList.DStateName == null) - throw new ArgumentNullException(nameof(fDSIDList.DStateName), "Property is required for class FDSIDList."); - - writer.WriteString("ICAOCode", fDSIDList.ICAOCode); - - writer.WriteNumber("Count", fDSIDList.Count); - - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, fDSIDList.List, jsonSerializerOptions); - var dTypeRawValue = DocumentTypeValueConverter.ToJsonValue(fDSIDList.DType); - writer.WriteNumber("dType", dTypeRawValue); - - var dFormatRawValue = DocumentFormatValueConverter.ToJsonValue(fDSIDList.DFormat); - writer.WriteNumber("dFormat", dFormatRawValue); - - writer.WriteBoolean("dMRZ", fDSIDList.DMRZ); - - writer.WriteString("dYear", fDSIDList.DYear); - - writer.WriteString("dCountryName", fDSIDList.DCountryName); - - writer.WriteBoolean("isDeprecated", fDSIDList.IsDeprecated); - - if (fDSIDList.DDescriptionOption.IsSet) - writer.WriteString("dDescription", fDSIDList.DDescription); - - if (fDSIDList.DStateCodeOption.IsSet) - writer.WriteString("dStateCode", fDSIDList.DStateCode); - - if (fDSIDList.DStateNameOption.IsSet) - writer.WriteString("dStateName", fDSIDList.DStateName); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs index 26b7ce2..1737289 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,198 +14,146 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FaceApi /// + [DataContract(Name = "FaceApi")] public partial class FaceApi : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// The URL of the Regula Face Web service to be used. - /// The processing mode: \"match\" or \"match+search\". - /// search - /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. - /// The Regula Face Web service requests timeout, ms. - /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. - /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. - /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. - /// The age threshold for the portrait comparison. Default: 13. - /// Estimated duration of validity for a child's passport, years. Default: 5. - [JsonConstructor] - public FaceApi(Option url = default, Option mode = default, Option search = default, Option threshold = default, Option serviceTimeout = default, Option proxy = default, Option proxyUserpwd = default, Option proxyType = default, Option childAgeThreshold = default, Option childDocValidityYears = default) + /// The URL of the Regula Face Web service to be used.. + /// The processing mode: \"match\" or \"match+search\".. + /// search. + /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not.. + /// The Regula Face Web service requests timeout, ms.. + /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>.. + /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>.. + /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>.. + /// The age threshold for the portrait comparison. Default: 13.. + /// Estimated duration of validity for a child's passport, years. Default: 5.. + public FaceApi(string url = default(string), string mode = default(string), FaceApiSearch search = default(FaceApiSearch), int threshold = default(int), int serviceTimeout = default(int), string proxy = default(string), string proxyUserpwd = default(string), int proxyType = default(int), int childAgeThreshold = default(int), int childDocValidityYears = default(int)) { - UrlOption = url; - ModeOption = mode; - SearchOption = search; - ThresholdOption = threshold; - ServiceTimeoutOption = serviceTimeout; - ProxyOption = proxy; - ProxyUserpwdOption = proxyUserpwd; - ProxyTypeOption = proxyType; - ChildAgeThresholdOption = childAgeThreshold; - ChildDocValidityYearsOption = childDocValidityYears; - OnCreated(); + this.Url = url; + this.Mode = mode; + this.Search = search; + this.Threshold = threshold; + this.ServiceTimeout = serviceTimeout; + this.Proxy = proxy; + this.ProxyUserpwd = proxyUserpwd; + this.ProxyType = proxyType; + this.ChildAgeThreshold = childAgeThreshold; + this.ChildDocValidityYears = childDocValidityYears; } - partial void OnCreated(); - - /// - /// Used to track the state of Url - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UrlOption { get; private set; } - /// /// The URL of the Regula Face Web service to be used. /// /// The URL of the Regula Face Web service to be used. - /* https://faceapi.regulaforensics.com */ - [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } - - /// - /// Used to track the state of Mode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ModeOption { get; private set; } + /* + https://faceapi.regulaforensics.com + */ + [DataMember(Name = "url", EmitDefaultValue = false)] + public string Url { get; set; } /// /// The processing mode: \"match\" or \"match+search\". /// /// The processing mode: \"match\" or \"match+search\". - /* match */ - [JsonPropertyName("mode")] - public string? Mode { get { return this.ModeOption; } set { this.ModeOption = new(value); } } - - /// - /// Used to track the state of Search - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SearchOption { get; private set; } + /* + match + */ + [DataMember(Name = "mode", EmitDefaultValue = false)] + public string Mode { get; set; } /// /// Gets or Sets Search /// - [JsonPropertyName("search")] - public FaceApiSearch? Search { get { return this.SearchOption; } set { this.SearchOption = new(value); } } - - /// - /// Used to track the state of Threshold - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ThresholdOption { get; private set; } + [DataMember(Name = "search", EmitDefaultValue = false)] + public FaceApiSearch Search { get; set; } /// /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. /// /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. - /* 75 */ - [JsonPropertyName("threshold")] - public int? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new(value); } } - - /// - /// Used to track the state of ServiceTimeout - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ServiceTimeoutOption { get; private set; } + /* + 75 + */ + [DataMember(Name = "threshold", EmitDefaultValue = false)] + public int Threshold { get; set; } /// /// The Regula Face Web service requests timeout, ms. /// /// The Regula Face Web service requests timeout, ms. - /* 3000 */ - [JsonPropertyName("serviceTimeout")] - public int? ServiceTimeout { get { return this.ServiceTimeoutOption; } set { this.ServiceTimeoutOption = new(value); } } - - /// - /// Used to track the state of Proxy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProxyOption { get; private set; } + /* + 3000 + */ + [DataMember(Name = "serviceTimeout", EmitDefaultValue = false)] + public int ServiceTimeout { get; set; } /// /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. /// /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. - /* http://localhost:8080 */ - [JsonPropertyName("proxy")] - public string? Proxy { get { return this.ProxyOption; } set { this.ProxyOption = new(value); } } - - /// - /// Used to track the state of ProxyUserpwd - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProxyUserpwdOption { get; private set; } + /* + http://localhost:8080 + */ + [DataMember(Name = "proxy", EmitDefaultValue = false)] + public string Proxy { get; set; } /// /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. /// /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. - /* user:pass */ - [JsonPropertyName("proxy_userpwd")] - public string? ProxyUserpwd { get { return this.ProxyUserpwdOption; } set { this.ProxyUserpwdOption = new(value); } } - - /// - /// Used to track the state of ProxyType - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProxyTypeOption { get; private set; } + /* + user:pass + */ + [DataMember(Name = "proxy_userpwd", EmitDefaultValue = false)] + public string ProxyUserpwd { get; set; } /// /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. /// /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. - /* 0 */ - [JsonPropertyName("proxy_type")] - public int? ProxyType { get { return this.ProxyTypeOption; } set { this.ProxyTypeOption = new(value); } } - - /// - /// Used to track the state of ChildAgeThreshold - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ChildAgeThresholdOption { get; private set; } + /* + 0 + */ + [DataMember(Name = "proxy_type", EmitDefaultValue = false)] + public int ProxyType { get; set; } /// /// The age threshold for the portrait comparison. Default: 13. /// /// The age threshold for the portrait comparison. Default: 13. - /* 13 */ - [JsonPropertyName("childAgeThreshold")] - public int? ChildAgeThreshold { get { return this.ChildAgeThresholdOption; } set { this.ChildAgeThresholdOption = new(value); } } - - /// - /// Used to track the state of ChildDocValidityYears - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ChildDocValidityYearsOption { get; private set; } + /* + 13 + */ + [DataMember(Name = "childAgeThreshold", EmitDefaultValue = false)] + public int ChildAgeThreshold { get; set; } /// /// Estimated duration of validity for a child's passport, years. Default: 5. /// /// Estimated duration of validity for a child's passport, years. Default: 5. - /* 5 */ - [JsonPropertyName("childDocValidityYears")] - public int? ChildDocValidityYears { get { return this.ChildDocValidityYearsOption; } set { this.ChildDocValidityYearsOption = new(value); } } + /* + 5 + */ + [DataMember(Name = "childDocValidityYears", EmitDefaultValue = false)] + public int ChildDocValidityYears { get; set; } /// /// Returns the string presentation of the object @@ -231,6 +177,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -242,199 +197,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FaceApiJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FaceApi Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option url = default; - Option mode = default; - Option search = default; - Option threshold = default; - Option serviceTimeout = default; - Option proxy = default; - Option proxyUserpwd = default; - Option proxyType = default; - Option childAgeThreshold = default; - Option childDocValidityYears = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "url": - url = new Option(utf8JsonReader.GetString()!); - break; - case "mode": - mode = new Option(utf8JsonReader.GetString()!); - break; - case "search": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - search = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "threshold": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - threshold = new Option(utf8JsonReader.GetInt32()); - break; - case "serviceTimeout": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - serviceTimeout = new Option(utf8JsonReader.GetInt32()); - break; - case "proxy": - proxy = new Option(utf8JsonReader.GetString()!); - break; - case "proxy_userpwd": - proxyUserpwd = new Option(utf8JsonReader.GetString()!); - break; - case "proxy_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - proxyType = new Option(utf8JsonReader.GetInt32()); - break; - case "childAgeThreshold": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - childAgeThreshold = new Option(utf8JsonReader.GetInt32()); - break; - case "childDocValidityYears": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - childDocValidityYears = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (url.IsSet && url.Value == null) - throw new ArgumentNullException(nameof(url), "Property is not nullable for class FaceApi."); - - if (mode.IsSet && mode.Value == null) - throw new ArgumentNullException(nameof(mode), "Property is not nullable for class FaceApi."); - - if (search.IsSet && search.Value == null) - throw new ArgumentNullException(nameof(search), "Property is not nullable for class FaceApi."); - - if (threshold.IsSet && threshold.Value == null) - throw new ArgumentNullException(nameof(threshold), "Property is not nullable for class FaceApi."); - - if (serviceTimeout.IsSet && serviceTimeout.Value == null) - throw new ArgumentNullException(nameof(serviceTimeout), "Property is not nullable for class FaceApi."); - - if (proxy.IsSet && proxy.Value == null) - throw new ArgumentNullException(nameof(proxy), "Property is not nullable for class FaceApi."); - - if (proxyUserpwd.IsSet && proxyUserpwd.Value == null) - throw new ArgumentNullException(nameof(proxyUserpwd), "Property is not nullable for class FaceApi."); - - if (proxyType.IsSet && proxyType.Value == null) - throw new ArgumentNullException(nameof(proxyType), "Property is not nullable for class FaceApi."); - - if (childAgeThreshold.IsSet && childAgeThreshold.Value == null) - throw new ArgumentNullException(nameof(childAgeThreshold), "Property is not nullable for class FaceApi."); - - if (childDocValidityYears.IsSet && childDocValidityYears.Value == null) - throw new ArgumentNullException(nameof(childDocValidityYears), "Property is not nullable for class FaceApi."); - - return new FaceApi(url, mode, search, threshold, serviceTimeout, proxy, proxyUserpwd, proxyType, childAgeThreshold, childDocValidityYears); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FaceApi faceApi, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, faceApi, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FaceApi faceApi, JsonSerializerOptions jsonSerializerOptions) - { - if (faceApi.UrlOption.IsSet && faceApi.Url == null) - throw new ArgumentNullException(nameof(faceApi.Url), "Property is required for class FaceApi."); - - if (faceApi.ModeOption.IsSet && faceApi.Mode == null) - throw new ArgumentNullException(nameof(faceApi.Mode), "Property is required for class FaceApi."); - - if (faceApi.SearchOption.IsSet && faceApi.Search == null) - throw new ArgumentNullException(nameof(faceApi.Search), "Property is required for class FaceApi."); - - if (faceApi.ProxyOption.IsSet && faceApi.Proxy == null) - throw new ArgumentNullException(nameof(faceApi.Proxy), "Property is required for class FaceApi."); - - if (faceApi.ProxyUserpwdOption.IsSet && faceApi.ProxyUserpwd == null) - throw new ArgumentNullException(nameof(faceApi.ProxyUserpwd), "Property is required for class FaceApi."); - - if (faceApi.UrlOption.IsSet) - writer.WriteString("url", faceApi.Url); - - if (faceApi.ModeOption.IsSet) - writer.WriteString("mode", faceApi.Mode); - - if (faceApi.SearchOption.IsSet) - { - writer.WritePropertyName("search"); - JsonSerializer.Serialize(writer, faceApi.Search, jsonSerializerOptions); - } - if (faceApi.ThresholdOption.IsSet) - writer.WriteNumber("threshold", faceApi.ThresholdOption.Value!.Value); - - if (faceApi.ServiceTimeoutOption.IsSet) - writer.WriteNumber("serviceTimeout", faceApi.ServiceTimeoutOption.Value!.Value); - - if (faceApi.ProxyOption.IsSet) - writer.WriteString("proxy", faceApi.Proxy); - - if (faceApi.ProxyUserpwdOption.IsSet) - writer.WriteString("proxy_userpwd", faceApi.ProxyUserpwd); - - if (faceApi.ProxyTypeOption.IsSet) - writer.WriteNumber("proxy_type", faceApi.ProxyTypeOption.Value!.Value); - - if (faceApi.ChildAgeThresholdOption.IsSet) - writer.WriteNumber("childAgeThreshold", faceApi.ChildAgeThresholdOption.Value!.Value); - - if (faceApi.ChildDocValidityYearsOption.IsSet) - writer.WriteNumber("childDocValidityYears", faceApi.ChildDocValidityYearsOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs index 549e4a0..69c050e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,78 +14,57 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// A search filter that can be applied if the \"match+search\" mode is enabled. May include limit, threshold, group_ids. If the group_ids are specified, the search is performed only in these groups. Find more information in the <a href=\"https://dev.regulaforensics.com/FaceSDK-web-openapi/#tag/search/operation/search\" target=\"_blank\">OpenAPI documentation</a>. /// + [DataContract(Name = "FaceApi_search")] public partial class FaceApiSearch : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// The maximum number of results to be returned. - /// The similarity threshold. - /// The groups where to conduct the search. - [JsonConstructor] - public FaceApiSearch(Option limit = default, Option threshold = default, Option?> groupIds = default) + /// The maximum number of results to be returned.. + /// The similarity threshold.. + /// The groups where to conduct the search.. + public FaceApiSearch(int limit = default(int), float threshold = default(float), List groupIds = default(List)) { - LimitOption = limit; - ThresholdOption = threshold; - GroupIdsOption = groupIds; - OnCreated(); + this.Limit = limit; + this.Threshold = threshold; + this.GroupIds = groupIds; } - partial void OnCreated(); - - /// - /// Used to track the state of Limit - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LimitOption { get; private set; } - /// /// The maximum number of results to be returned. /// /// The maximum number of results to be returned. - [JsonPropertyName("limit")] - public int? Limit { get { return this.LimitOption; } set { this.LimitOption = new(value); } } - - /// - /// Used to track the state of Threshold - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ThresholdOption { get; private set; } + [DataMember(Name = "limit", EmitDefaultValue = false)] + public int Limit { get; set; } /// /// The similarity threshold. /// /// The similarity threshold. - [JsonPropertyName("threshold")] - public float? Threshold { get { return this.ThresholdOption; } set { this.ThresholdOption = new(value); } } - - /// - /// Used to track the state of GroupIds - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> GroupIdsOption { get; private set; } + [DataMember(Name = "threshold", EmitDefaultValue = false)] + public float Threshold { get; set; } /// /// The groups where to conduct the search. /// /// The groups where to conduct the search. - [JsonPropertyName("group_ids")] - public List? GroupIds { get { return this.GroupIdsOption; } set { this.GroupIdsOption = new(value); } } + [DataMember(Name = "group_ids", EmitDefaultValue = false)] + public List GroupIds { get; set; } /// /// Returns the string presentation of the object @@ -104,6 +81,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -115,115 +101,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FaceApiSearchJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FaceApiSearch Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option limit = default; - Option threshold = default; - Option?> groupIds = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "limit": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - limit = new Option(utf8JsonReader.GetInt32()); - break; - case "threshold": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - threshold = new Option((float)utf8JsonReader.GetDouble()); - break; - case "group_ids": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - groupIds = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (limit.IsSet && limit.Value == null) - throw new ArgumentNullException(nameof(limit), "Property is not nullable for class FaceApiSearch."); - - if (threshold.IsSet && threshold.Value == null) - throw new ArgumentNullException(nameof(threshold), "Property is not nullable for class FaceApiSearch."); - - if (groupIds.IsSet && groupIds.Value == null) - throw new ArgumentNullException(nameof(groupIds), "Property is not nullable for class FaceApiSearch."); - - return new FaceApiSearch(limit, threshold, groupIds); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FaceApiSearch faceApiSearch, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, faceApiSearch, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FaceApiSearch faceApiSearch, JsonSerializerOptions jsonSerializerOptions) - { - if (faceApiSearch.GroupIdsOption.IsSet && faceApiSearch.GroupIds == null) - throw new ArgumentNullException(nameof(faceApiSearch.GroupIds), "Property is required for class FaceApiSearch."); - - if (faceApiSearch.LimitOption.IsSet) - writer.WriteNumber("limit", faceApiSearch.LimitOption.Value!.Value); - - if (faceApiSearch.ThresholdOption.IsSet) - writer.WriteNumber("threshold", faceApiSearch.ThresholdOption.Value!.Value); - - if (faceApiSearch.GroupIdsOption.IsSet) - { - writer.WritePropertyName("group_ids"); - JsonSerializer.Serialize(writer, faceApiSearch.GroupIds, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs index 4849918..b935368 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,84 +14,80 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FaceDetection /// + [DataContract(Name = "FaceDetection")] public partial class FaceDetection : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// count - /// countFalseDetection - /// res - /// reserved1 - /// reserved2 - [JsonConstructor] - public FaceDetection(int count, int countFalseDetection, List res, Option reserved1 = default, Option reserved2 = default) + [JsonConstructorAttribute] + protected FaceDetection() { } + /// + /// Initializes a new instance of the class. + /// + /// count (required). + /// countFalseDetection (required). + /// res (required). + /// reserved1. + /// reserved2. + public FaceDetection(int count = default(int), int countFalseDetection = default(int), List res = default(List), int reserved1 = default(int), int reserved2 = default(int)) { - Count = count; - CountFalseDetection = countFalseDetection; - Res = res; - Reserved1Option = reserved1; - Reserved2Option = reserved2; - OnCreated(); + this.Count = count; + this.CountFalseDetection = countFalseDetection; + // to ensure "res" is required (not null) + if (res == null) + { + throw new ArgumentNullException("res is a required property for FaceDetection and cannot be null"); + } + this.Res = res; + this.Reserved1 = reserved1; + this.Reserved2 = reserved2; } - partial void OnCreated(); - /// /// Gets or Sets Count /// - [JsonPropertyName("Count")] + [DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)] public int Count { get; set; } /// /// Gets or Sets CountFalseDetection /// - [JsonPropertyName("CountFalseDetection")] + [DataMember(Name = "CountFalseDetection", IsRequired = true, EmitDefaultValue = true)] public int CountFalseDetection { get; set; } /// /// Gets or Sets Res /// - [JsonPropertyName("Res")] + [DataMember(Name = "Res", IsRequired = true, EmitDefaultValue = true)] public List Res { get; set; } - /// - /// Used to track the state of Reserved1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved1Option { get; private set; } - /// /// Gets or Sets Reserved1 /// - [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } - - /// - /// Used to track the state of Reserved2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved2Option { get; private set; } + [DataMember(Name = "Reserved1", EmitDefaultValue = false)] + public int Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// - [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + [DataMember(Name = "Reserved2", EmitDefaultValue = false)] + public int Reserved2 { get; set; } /// /// Returns the string presentation of the object @@ -112,6 +106,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -123,140 +126,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FaceDetectionJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FaceDetection Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option count = default; - Option countFalseDetection = default; - Option?> res = default; - Option reserved1 = default; - Option reserved2 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetInt32()); - break; - case "CountFalseDetection": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - countFalseDetection = new Option(utf8JsonReader.GetInt32()); - break; - case "Res": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - res = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Reserved1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved1 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!count.IsSet) - throw new ArgumentException("Property is required for class FaceDetection.", nameof(count)); - - if (!countFalseDetection.IsSet) - throw new ArgumentException("Property is required for class FaceDetection.", nameof(countFalseDetection)); - - if (!res.IsSet) - throw new ArgumentException("Property is required for class FaceDetection.", nameof(res)); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class FaceDetection."); - - if (countFalseDetection.IsSet && countFalseDetection.Value == null) - throw new ArgumentNullException(nameof(countFalseDetection), "Property is not nullable for class FaceDetection."); - - if (res.IsSet && res.Value == null) - throw new ArgumentNullException(nameof(res), "Property is not nullable for class FaceDetection."); - - if (reserved1.IsSet && reserved1.Value == null) - throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class FaceDetection."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class FaceDetection."); - - return new FaceDetection(count.Value!.Value!, countFalseDetection.Value!.Value!, res.Value!, reserved1, reserved2); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FaceDetection faceDetection, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, faceDetection, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FaceDetection faceDetection, JsonSerializerOptions jsonSerializerOptions) - { - if (faceDetection.Res == null) - throw new ArgumentNullException(nameof(faceDetection.Res), "Property is required for class FaceDetection."); - - writer.WriteNumber("Count", faceDetection.Count); - - writer.WriteNumber("CountFalseDetection", faceDetection.CountFalseDetection); - - writer.WritePropertyName("Res"); - JsonSerializer.Serialize(writer, faceDetection.Res, jsonSerializerOptions); - if (faceDetection.Reserved1Option.IsSet) - writer.WriteNumber("Reserved1", faceDetection.Reserved1Option.Value!.Value); - - if (faceDetection.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", faceDetection.Reserved2Option.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs index 24c1026..ae8ff5b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FaceDetectionItem /// + [DataContract(Name = "FaceDetectionItem")] public partial class FaceDetectionItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// faceDetection - [JsonConstructor] - public FaceDetectionItem(FaceDetection faceDetection) + [JsonConstructorAttribute] + protected FaceDetectionItem() { } + /// + /// Initializes a new instance of the class. + /// + /// faceDetection (required). + public FaceDetectionItem(FaceDetection faceDetection = default(FaceDetection)) { - FaceDetection = faceDetection; - OnCreated(); + // to ensure "faceDetection" is required (not null) + if (faceDetection == null) + { + throw new ArgumentNullException("faceDetection is a required property for FaceDetectionItem and cannot be null"); + } + this.FaceDetection = faceDetection; } - partial void OnCreated(); - /// /// Gets or Sets FaceDetection /// - [JsonPropertyName("FaceDetection")] + [DataMember(Name = "FaceDetection", IsRequired = true, EmitDefaultValue = true)] public FaceDetection FaceDetection { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FaceDetectionItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FaceDetectionItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option faceDetection = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FaceDetection": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - faceDetection = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!faceDetection.IsSet) - throw new ArgumentException("Property is required for class FaceDetectionItem.", nameof(faceDetection)); - - if (faceDetection.IsSet && faceDetection.Value == null) - throw new ArgumentNullException(nameof(faceDetection), "Property is not nullable for class FaceDetectionItem."); - - return new FaceDetectionItem(faceDetection.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FaceDetectionItem faceDetectionItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, faceDetectionItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FaceDetectionItem faceDetectionItem, JsonSerializerOptions jsonSerializerOptions) - { - if (faceDetectionItem.FaceDetection == null) - throw new ArgumentNullException(nameof(faceDetectionItem.FaceDetection), "Property is required for class FaceDetectionItem."); - - writer.WritePropertyName("FaceDetection"); - JsonSerializer.Serialize(writer, faceDetectionItem.FaceDetection, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs index c2c23f8..1be11f7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FaceDetectionResult /// + [DataContract(Name = "FaceDetectionResult")] public partial class FaceDetectionResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// faceDetection - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public FaceDetectionResult(FaceDetection faceDetection, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected FaceDetectionResult() { } + /// + /// Initializes a new instance of the class. + /// + /// faceDetection (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public FaceDetectionResult(FaceDetection faceDetection = default(FaceDetection), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - FaceDetection = faceDetection; - OnCreated(); + // to ensure "faceDetection" is required (not null) + if (faceDetection == null) + { + throw new ArgumentNullException("faceDetection is a required property for FaceDetectionResult and cannot be null"); + } + this.FaceDetection = faceDetection; } - partial void OnCreated(); - /// /// Gets or Sets FaceDetection /// - [JsonPropertyName("FaceDetection")] + [DataMember(Name = "FaceDetection", IsRequired = true, EmitDefaultValue = true)] public FaceDetection FaceDetection { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FaceDetectionResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" FaceDetection: ").Append(FaceDetection).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class FaceDetectionResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override FaceDetectionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option faceDetection = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FaceDetection": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - faceDetection = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!faceDetection.IsSet) - throw new ArgumentException("Property is required for class FaceDetectionResult.", nameof(faceDetection)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class FaceDetectionResult.", nameof(resultType)); - - if (faceDetection.IsSet && faceDetection.Value == null) - throw new ArgumentNullException(nameof(faceDetection), "Property is not nullable for class FaceDetectionResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class FaceDetectionResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class FaceDetectionResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class FaceDetectionResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class FaceDetectionResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class FaceDetectionResult."); - - return new FaceDetectionResult(faceDetection.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FaceDetectionResult faceDetectionResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, faceDetectionResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FaceDetectionResult faceDetectionResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (faceDetectionResult.FaceDetection == null) - throw new ArgumentNullException(nameof(faceDetectionResult.FaceDetection), "Property is required for class FaceDetectionResult."); - - writer.WritePropertyName("FaceDetection"); - JsonSerializer.Serialize(writer, faceDetectionResult.FaceDetection, jsonSerializerOptions); - if (faceDetectionResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", faceDetectionResult.BufLengthOption.Value!.Value); - - if (faceDetectionResult.LightOption.IsSet) - writer.WriteNumber("light", faceDetectionResult.LightOption.Value!.Value); - - if (faceDetectionResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", faceDetectionResult.ListIdxOption.Value!.Value); - - if (faceDetectionResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", faceDetectionResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", faceDetectionResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs b/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs index 34a1f61..9ef1cda 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,93 +14,113 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FaceItem /// + [DataContract(Name = "FaceItem")] public partial class FaceItem : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// coincidenceToPhotoArea - /// faceRect - /// fieldRect - /// graphFieldNumber - /// landmarks - /// lightType - /// orientation - /// probability - [JsonConstructor] - public FaceItem(int coincidenceToPhotoArea, RectangleCoordinates faceRect, RectangleCoordinates fieldRect, int graphFieldNumber, List landmarks, Light lightType, int orientation, int probability) - { - CoincidenceToPhotoArea = coincidenceToPhotoArea; - FaceRect = faceRect; - FieldRect = fieldRect; - GraphFieldNumber = graphFieldNumber; - Landmarks = landmarks; - LightType = lightType; - Orientation = orientation; - Probability = probability; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets LightType /// - [JsonPropertyName("LightType")] + [DataMember(Name = "LightType", IsRequired = true, EmitDefaultValue = true)] public Light LightType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected FaceItem() { } + /// + /// Initializes a new instance of the class. + /// + /// coincidenceToPhotoArea (required). + /// faceRect (required). + /// fieldRect (required). + /// graphFieldNumber (required). + /// landmarks (required). + /// lightType (required). + /// orientation (required). + /// probability (required). + public FaceItem(int coincidenceToPhotoArea = default(int), RectangleCoordinates faceRect = default(RectangleCoordinates), RectangleCoordinates fieldRect = default(RectangleCoordinates), int graphFieldNumber = default(int), List landmarks = default(List), Light lightType = default(Light), int orientation = default(int), int probability = default(int)) + { + this.CoincidenceToPhotoArea = coincidenceToPhotoArea; + // to ensure "faceRect" is required (not null) + if (faceRect == null) + { + throw new ArgumentNullException("faceRect is a required property for FaceItem and cannot be null"); + } + this.FaceRect = faceRect; + // to ensure "fieldRect" is required (not null) + if (fieldRect == null) + { + throw new ArgumentNullException("fieldRect is a required property for FaceItem and cannot be null"); + } + this.FieldRect = fieldRect; + this.GraphFieldNumber = graphFieldNumber; + // to ensure "landmarks" is required (not null) + if (landmarks == null) + { + throw new ArgumentNullException("landmarks is a required property for FaceItem and cannot be null"); + } + this.Landmarks = landmarks; + this.LightType = lightType; + this.Orientation = orientation; + this.Probability = probability; + } /// /// Gets or Sets CoincidenceToPhotoArea /// - [JsonPropertyName("CoincidenceToPhotoArea")] + [DataMember(Name = "CoincidenceToPhotoArea", IsRequired = true, EmitDefaultValue = true)] public int CoincidenceToPhotoArea { get; set; } /// /// Gets or Sets FaceRect /// - [JsonPropertyName("FaceRect")] + [DataMember(Name = "FaceRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates FaceRect { get; set; } /// /// Gets or Sets FieldRect /// - [JsonPropertyName("FieldRect")] + [DataMember(Name = "FieldRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates FieldRect { get; set; } /// /// Gets or Sets GraphFieldNumber /// - [JsonPropertyName("GraphFieldNumber")] + [DataMember(Name = "GraphFieldNumber", IsRequired = true, EmitDefaultValue = true)] public int GraphFieldNumber { get; set; } /// /// Gets or Sets Landmarks /// - [JsonPropertyName("Landmarks")] + [DataMember(Name = "Landmarks", IsRequired = true, EmitDefaultValue = true)] public List Landmarks { get; set; } /// /// Gets or Sets Orientation /// - [JsonPropertyName("Orientation")] + [DataMember(Name = "Orientation", IsRequired = true, EmitDefaultValue = true)] public int Orientation { get; set; } /// /// Gets or Sets Probability /// - [JsonPropertyName("Probability")] + [DataMember(Name = "Probability", IsRequired = true, EmitDefaultValue = true)] public int Probability { get; set; } /// @@ -125,6 +143,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -136,191 +163,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FaceItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FaceItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option coincidenceToPhotoArea = default; - Option faceRect = default; - Option fieldRect = default; - Option graphFieldNumber = default; - Option?> landmarks = default; - Option lightType = default; - Option orientation = default; - Option probability = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "CoincidenceToPhotoArea": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - coincidenceToPhotoArea = new Option(utf8JsonReader.GetInt32()); - break; - case "FaceRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - faceRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "FieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "GraphFieldNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - graphFieldNumber = new Option(utf8JsonReader.GetInt32()); - break; - case "Landmarks": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - landmarks = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "LightType": - string? lightTypeRawValue = utf8JsonReader.GetString(); - if (lightTypeRawValue != null) - lightType = new Option(LightValueConverter.FromStringOrDefault(lightTypeRawValue)); - break; - case "Orientation": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - orientation = new Option(utf8JsonReader.GetInt32()); - break; - case "Probability": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - probability = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!coincidenceToPhotoArea.IsSet) - throw new ArgumentException("Property is required for class FaceItem.", nameof(coincidenceToPhotoArea)); - - if (!faceRect.IsSet) - throw new ArgumentException("Property is required for class FaceItem.", nameof(faceRect)); - - if (!fieldRect.IsSet) - throw new ArgumentException("Property is required for class FaceItem.", nameof(fieldRect)); - - if (!graphFieldNumber.IsSet) - throw new ArgumentException("Property is required for class FaceItem.", nameof(graphFieldNumber)); - - if (!landmarks.IsSet) - throw new ArgumentException("Property is required for class FaceItem.", nameof(landmarks)); - - if (!lightType.IsSet) - throw new ArgumentException("Property is required for class FaceItem.", nameof(lightType)); - - if (!orientation.IsSet) - throw new ArgumentException("Property is required for class FaceItem.", nameof(orientation)); - - if (!probability.IsSet) - throw new ArgumentException("Property is required for class FaceItem.", nameof(probability)); - - if (coincidenceToPhotoArea.IsSet && coincidenceToPhotoArea.Value == null) - throw new ArgumentNullException(nameof(coincidenceToPhotoArea), "Property is not nullable for class FaceItem."); - - if (faceRect.IsSet && faceRect.Value == null) - throw new ArgumentNullException(nameof(faceRect), "Property is not nullable for class FaceItem."); - - if (fieldRect.IsSet && fieldRect.Value == null) - throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class FaceItem."); - - if (graphFieldNumber.IsSet && graphFieldNumber.Value == null) - throw new ArgumentNullException(nameof(graphFieldNumber), "Property is not nullable for class FaceItem."); - - if (landmarks.IsSet && landmarks.Value == null) - throw new ArgumentNullException(nameof(landmarks), "Property is not nullable for class FaceItem."); - - if (lightType.IsSet && lightType.Value == null) - throw new ArgumentNullException(nameof(lightType), "Property is not nullable for class FaceItem."); - - if (orientation.IsSet && orientation.Value == null) - throw new ArgumentNullException(nameof(orientation), "Property is not nullable for class FaceItem."); - - if (probability.IsSet && probability.Value == null) - throw new ArgumentNullException(nameof(probability), "Property is not nullable for class FaceItem."); - - return new FaceItem(coincidenceToPhotoArea.Value!.Value!, faceRect.Value!, fieldRect.Value!, graphFieldNumber.Value!.Value!, landmarks.Value!, lightType.Value!.Value!, orientation.Value!.Value!, probability.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FaceItem faceItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, faceItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FaceItem faceItem, JsonSerializerOptions jsonSerializerOptions) - { - if (faceItem.FaceRect == null) - throw new ArgumentNullException(nameof(faceItem.FaceRect), "Property is required for class FaceItem."); - - if (faceItem.FieldRect == null) - throw new ArgumentNullException(nameof(faceItem.FieldRect), "Property is required for class FaceItem."); - - if (faceItem.Landmarks == null) - throw new ArgumentNullException(nameof(faceItem.Landmarks), "Property is required for class FaceItem."); - - writer.WriteNumber("CoincidenceToPhotoArea", faceItem.CoincidenceToPhotoArea); - - writer.WritePropertyName("FaceRect"); - JsonSerializer.Serialize(writer, faceItem.FaceRect, jsonSerializerOptions); - writer.WritePropertyName("FieldRect"); - JsonSerializer.Serialize(writer, faceItem.FieldRect, jsonSerializerOptions); - writer.WriteNumber("GraphFieldNumber", faceItem.GraphFieldNumber); - - writer.WritePropertyName("Landmarks"); - JsonSerializer.Serialize(writer, faceItem.Landmarks, jsonSerializerOptions); - var lightTypeRawValue = LightValueConverter.ToJsonValue(faceItem.LightType); - writer.WriteNumber("LightType", lightTypeRawValue); - - writer.WriteNumber("Orientation", faceItem.Orientation); - - writer.WriteNumber("Probability", faceItem.Probability); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs index 6724d03..5704843 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,126 +14,144 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FiberItem /// + [DataContract(Name = "FiberItem")] public partial class FiberItem : IValidatableObject { + /// - /// Initializes a new instance of the class. + /// Gets or Sets LightValue /// - /// For UV_Fibers authenticity result type - /// Expected fibers number. For UV_Fibers authentication result type - /// Coordinates of located areas for defined fibers type - /// Fibers width value for located areas (in pixels) - /// Fibers length value for located areas (in pixels) - /// Fibers value for areas (in pixels) - /// Fibers color value - /// lightValue - /// For UV_Background authentication result type - [JsonConstructor] - public FiberItem(int rectCount, int expectedCount, List rectArray, List width, List length, List area, List colorValues, Option lightValue = default, Option lightDisp = default) - { - RectCount = rectCount; - ExpectedCount = expectedCount; - RectArray = rectArray; - Width = width; - Length = length; - Area = area; - ColorValues = colorValues; - LightValueOption = lightValue; - LightDispOption = lightDisp; - OnCreated(); - } - - partial void OnCreated(); - + [DataMember(Name = "LightValue", EmitDefaultValue = false)] + public Light? LightValue { get; set; } /// - /// Used to track the state of LightValue + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LightValueOption { get; private set; } - + [JsonConstructorAttribute] + protected FiberItem() { } /// - /// Gets or Sets LightValue + /// Initializes a new instance of the class. /// - [JsonPropertyName("LightValue")] - public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new(value); } } + /// For UV_Fibers authenticity result type (required). + /// Expected fibers number. For UV_Fibers authentication result type (required). + /// lightValue. + /// For UV_Background authentication result type. + /// Coordinates of located areas for defined fibers type (required). + /// Fibers width value for located areas (in pixels) (required). + /// Fibers length value for located areas (in pixels) (required). + /// Fibers value for areas (in pixels) (required). + /// Fibers color value (required). + public FiberItem(int rectCount = default(int), int expectedCount = default(int), Light? lightValue = default(Light?), int lightDisp = default(int), List rectArray = default(List), List width = default(List), List length = default(List), List area = default(List), List colorValues = default(List)) + { + this.RectCount = rectCount; + this.ExpectedCount = expectedCount; + // to ensure "rectArray" is required (not null) + if (rectArray == null) + { + throw new ArgumentNullException("rectArray is a required property for FiberItem and cannot be null"); + } + this.RectArray = rectArray; + // to ensure "width" is required (not null) + if (width == null) + { + throw new ArgumentNullException("width is a required property for FiberItem and cannot be null"); + } + this.Width = width; + // to ensure "length" is required (not null) + if (length == null) + { + throw new ArgumentNullException("length is a required property for FiberItem and cannot be null"); + } + this.Length = length; + // to ensure "area" is required (not null) + if (area == null) + { + throw new ArgumentNullException("area is a required property for FiberItem and cannot be null"); + } + this.Area = area; + // to ensure "colorValues" is required (not null) + if (colorValues == null) + { + throw new ArgumentNullException("colorValues is a required property for FiberItem and cannot be null"); + } + this.ColorValues = colorValues; + this.LightValue = lightValue; + this.LightDisp = lightDisp; + } /// /// For UV_Fibers authenticity result type /// /// For UV_Fibers authenticity result type - [JsonPropertyName("RectCount")] + [DataMember(Name = "RectCount", IsRequired = true, EmitDefaultValue = true)] public int RectCount { get; set; } /// /// Expected fibers number. For UV_Fibers authentication result type /// /// Expected fibers number. For UV_Fibers authentication result type - [JsonPropertyName("ExpectedCount")] + [DataMember(Name = "ExpectedCount", IsRequired = true, EmitDefaultValue = true)] public int ExpectedCount { get; set; } + /// + /// For UV_Background authentication result type + /// + /// For UV_Background authentication result type + [DataMember(Name = "LightDisp", EmitDefaultValue = false)] + public int LightDisp { get; set; } + /// /// Coordinates of located areas for defined fibers type /// /// Coordinates of located areas for defined fibers type - [JsonPropertyName("RectArray")] + [DataMember(Name = "RectArray", IsRequired = true, EmitDefaultValue = true)] public List RectArray { get; set; } /// /// Fibers width value for located areas (in pixels) /// /// Fibers width value for located areas (in pixels) - [JsonPropertyName("Width")] + [DataMember(Name = "Width", IsRequired = true, EmitDefaultValue = true)] public List Width { get; set; } /// /// Fibers length value for located areas (in pixels) /// /// Fibers length value for located areas (in pixels) - [JsonPropertyName("Length")] + [DataMember(Name = "Length", IsRequired = true, EmitDefaultValue = true)] public List Length { get; set; } /// /// Fibers value for areas (in pixels) /// /// Fibers value for areas (in pixels) - [JsonPropertyName("Area")] + [DataMember(Name = "Area", IsRequired = true, EmitDefaultValue = true)] public List Area { get; set; } /// /// Fibers color value /// /// Fibers color value - /* ["BLUE","GREEN","RED"] */ - [JsonPropertyName("ColorValues")] + /* + ["BLUE","GREEN","RED"] + */ + [DataMember(Name = "ColorValues", IsRequired = true, EmitDefaultValue = true)] public List ColorValues { get; set; } - /// - /// Used to track the state of LightDisp - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LightDispOption { get; private set; } - - /// - /// For UV_Background authentication result type - /// - /// For UV_Background authentication result type - [JsonPropertyName("LightDisp")] - public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new(value); } } - /// /// Returns the string presentation of the object /// @@ -146,17 +162,26 @@ public override string ToString() sb.Append("class FiberItem {\n"); sb.Append(" RectCount: ").Append(RectCount).Append("\n"); sb.Append(" ExpectedCount: ").Append(ExpectedCount).Append("\n"); + sb.Append(" LightValue: ").Append(LightValue).Append("\n"); + sb.Append(" LightDisp: ").Append(LightDisp).Append("\n"); sb.Append(" RectArray: ").Append(RectArray).Append("\n"); sb.Append(" Width: ").Append(Width).Append("\n"); sb.Append(" Length: ").Append(Length).Append("\n"); sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" ColorValues: ").Append(ColorValues).Append("\n"); - sb.Append(" LightValue: ").Append(LightValue).Append("\n"); - sb.Append(" LightDisp: ").Append(LightDisp).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -168,207 +193,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FiberItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FiberItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option rectCount = default; - Option expectedCount = default; - Option?> rectArray = default; - Option?> width = default; - Option?> length = default; - Option?> area = default; - Option?> colorValues = default; - Option lightValue = default; - Option lightDisp = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RectCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rectCount = new Option(utf8JsonReader.GetInt32()); - break; - case "ExpectedCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - expectedCount = new Option(utf8JsonReader.GetInt32()); - break; - case "RectArray": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rectArray = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Width": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - width = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - length = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Area": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - area = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "ColorValues": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - colorValues = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "LightValue": - string? lightValueRawValue = utf8JsonReader.GetString(); - if (lightValueRawValue != null) - lightValue = new Option(LightValueConverter.FromStringOrDefault(lightValueRawValue)); - break; - case "LightDisp": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - lightDisp = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!rectCount.IsSet) - throw new ArgumentException("Property is required for class FiberItem.", nameof(rectCount)); - - if (!expectedCount.IsSet) - throw new ArgumentException("Property is required for class FiberItem.", nameof(expectedCount)); - - if (!rectArray.IsSet) - throw new ArgumentException("Property is required for class FiberItem.", nameof(rectArray)); - - if (!width.IsSet) - throw new ArgumentException("Property is required for class FiberItem.", nameof(width)); - - if (!length.IsSet) - throw new ArgumentException("Property is required for class FiberItem.", nameof(length)); - - if (!area.IsSet) - throw new ArgumentException("Property is required for class FiberItem.", nameof(area)); - - if (!colorValues.IsSet) - throw new ArgumentException("Property is required for class FiberItem.", nameof(colorValues)); - - if (rectCount.IsSet && rectCount.Value == null) - throw new ArgumentNullException(nameof(rectCount), "Property is not nullable for class FiberItem."); - - if (expectedCount.IsSet && expectedCount.Value == null) - throw new ArgumentNullException(nameof(expectedCount), "Property is not nullable for class FiberItem."); - - if (rectArray.IsSet && rectArray.Value == null) - throw new ArgumentNullException(nameof(rectArray), "Property is not nullable for class FiberItem."); - - if (width.IsSet && width.Value == null) - throw new ArgumentNullException(nameof(width), "Property is not nullable for class FiberItem."); - - if (length.IsSet && length.Value == null) - throw new ArgumentNullException(nameof(length), "Property is not nullable for class FiberItem."); - - if (area.IsSet && area.Value == null) - throw new ArgumentNullException(nameof(area), "Property is not nullable for class FiberItem."); - - if (colorValues.IsSet && colorValues.Value == null) - throw new ArgumentNullException(nameof(colorValues), "Property is not nullable for class FiberItem."); - - if (lightValue.IsSet && lightValue.Value == null) - throw new ArgumentNullException(nameof(lightValue), "Property is not nullable for class FiberItem."); - - if (lightDisp.IsSet && lightDisp.Value == null) - throw new ArgumentNullException(nameof(lightDisp), "Property is not nullable for class FiberItem."); - - return new FiberItem(rectCount.Value!.Value!, expectedCount.Value!.Value!, rectArray.Value!, width.Value!, length.Value!, area.Value!, colorValues.Value!, lightValue, lightDisp); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FiberItem fiberItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, fiberItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FiberItem fiberItem, JsonSerializerOptions jsonSerializerOptions) - { - if (fiberItem.RectArray == null) - throw new ArgumentNullException(nameof(fiberItem.RectArray), "Property is required for class FiberItem."); - - if (fiberItem.Width == null) - throw new ArgumentNullException(nameof(fiberItem.Width), "Property is required for class FiberItem."); - - if (fiberItem.Length == null) - throw new ArgumentNullException(nameof(fiberItem.Length), "Property is required for class FiberItem."); - - if (fiberItem.Area == null) - throw new ArgumentNullException(nameof(fiberItem.Area), "Property is required for class FiberItem."); - - if (fiberItem.ColorValues == null) - throw new ArgumentNullException(nameof(fiberItem.ColorValues), "Property is required for class FiberItem."); - - writer.WriteNumber("RectCount", fiberItem.RectCount); - - writer.WriteNumber("ExpectedCount", fiberItem.ExpectedCount); - - writer.WritePropertyName("RectArray"); - JsonSerializer.Serialize(writer, fiberItem.RectArray, jsonSerializerOptions); - writer.WritePropertyName("Width"); - JsonSerializer.Serialize(writer, fiberItem.Width, jsonSerializerOptions); - writer.WritePropertyName("Length"); - JsonSerializer.Serialize(writer, fiberItem.Length, jsonSerializerOptions); - writer.WritePropertyName("Area"); - JsonSerializer.Serialize(writer, fiberItem.Area, jsonSerializerOptions); - writer.WritePropertyName("ColorValues"); - JsonSerializer.Serialize(writer, fiberItem.ColorValues, jsonSerializerOptions); - if (fiberItem.LightValueOption.IsSet) - { - var lightValueRawValue = LightValueConverter.ToJsonValue(fiberItem.LightValue!.Value); - writer.WriteNumber("LightValue", lightValueRawValue); - } - if (fiberItem.LightDispOption.IsSet) - writer.WriteNumber("LightDisp", fiberItem.LightDispOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs index 20458d8..037a229 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,129 +14,149 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FiberResult /// + [DataContract(Name = "FiberResult")] public partial class FiberResult : AuthenticityCheckResultItem, IValidatableObject { + /// - /// Initializes a new instance of the class. + /// Gets or Sets LightValue /// - /// For UV_Fibers authenticity result type - /// Expected fibers number. For UV_Fibers authentication result type - /// Coordinates of located areas for defined fibers type - /// Fibers width value for located areas (in pixels) - /// Fibers length value for located areas (in pixels) - /// Fibers value for areas (in pixels) - /// Fibers color value - /// elementResult - /// elementDiagnose - /// percentValue - /// lightValue - /// For UV_Background authentication result type - [JsonConstructor] - public FiberResult(int rectCount, int expectedCount, List rectArray, List width, List length, List area, List colorValues, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option lightValue = default, Option lightDisp = default) : base(elementResult, elementDiagnose, percentValue) - { - RectCount = rectCount; - ExpectedCount = expectedCount; - RectArray = rectArray; - Width = width; - Length = length; - Area = area; - ColorValues = colorValues; - LightValueOption = lightValue; - LightDispOption = lightDisp; - OnCreated(); - } - - partial void OnCreated(); - + [DataMember(Name = "LightValue", EmitDefaultValue = false)] + public Light? LightValue { get; set; } /// - /// Used to track the state of LightValue + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LightValueOption { get; private set; } - + [JsonConstructorAttribute] + protected FiberResult() { } /// - /// Gets or Sets LightValue + /// Initializes a new instance of the class. /// - [JsonPropertyName("LightValue")] - public Light? LightValue { get { return this.LightValueOption; } set { this.LightValueOption = new(value); } } + /// For UV_Fibers authenticity result type (required). + /// Expected fibers number. For UV_Fibers authentication result type (required). + /// lightValue. + /// For UV_Background authentication result type. + /// Coordinates of located areas for defined fibers type (required). + /// Fibers width value for located areas (in pixels) (required). + /// Fibers length value for located areas (in pixels) (required). + /// Fibers value for areas (in pixels) (required). + /// Fibers color value (required). + /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// elementResult. + /// elementDiagnose. + /// percentValue. + public FiberResult(int rectCount = default(int), int expectedCount = default(int), Light? lightValue = default(Light?), int lightDisp = default(int), List rectArray = default(List), List width = default(List), List length = default(List), List area = default(List), List colorValues = default(List), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + { + this.RectCount = rectCount; + this.ExpectedCount = expectedCount; + // to ensure "rectArray" is required (not null) + if (rectArray == null) + { + throw new ArgumentNullException("rectArray is a required property for FiberResult and cannot be null"); + } + this.RectArray = rectArray; + // to ensure "width" is required (not null) + if (width == null) + { + throw new ArgumentNullException("width is a required property for FiberResult and cannot be null"); + } + this.Width = width; + // to ensure "length" is required (not null) + if (length == null) + { + throw new ArgumentNullException("length is a required property for FiberResult and cannot be null"); + } + this.Length = length; + // to ensure "area" is required (not null) + if (area == null) + { + throw new ArgumentNullException("area is a required property for FiberResult and cannot be null"); + } + this.Area = area; + // to ensure "colorValues" is required (not null) + if (colorValues == null) + { + throw new ArgumentNullException("colorValues is a required property for FiberResult and cannot be null"); + } + this.ColorValues = colorValues; + this.LightValue = lightValue; + this.LightDisp = lightDisp; + } /// /// For UV_Fibers authenticity result type /// /// For UV_Fibers authenticity result type - [JsonPropertyName("RectCount")] + [DataMember(Name = "RectCount", IsRequired = true, EmitDefaultValue = true)] public int RectCount { get; set; } /// /// Expected fibers number. For UV_Fibers authentication result type /// /// Expected fibers number. For UV_Fibers authentication result type - [JsonPropertyName("ExpectedCount")] + [DataMember(Name = "ExpectedCount", IsRequired = true, EmitDefaultValue = true)] public int ExpectedCount { get; set; } + /// + /// For UV_Background authentication result type + /// + /// For UV_Background authentication result type + [DataMember(Name = "LightDisp", EmitDefaultValue = false)] + public int LightDisp { get; set; } + /// /// Coordinates of located areas for defined fibers type /// /// Coordinates of located areas for defined fibers type - [JsonPropertyName("RectArray")] + [DataMember(Name = "RectArray", IsRequired = true, EmitDefaultValue = true)] public List RectArray { get; set; } /// /// Fibers width value for located areas (in pixels) /// /// Fibers width value for located areas (in pixels) - [JsonPropertyName("Width")] + [DataMember(Name = "Width", IsRequired = true, EmitDefaultValue = true)] public List Width { get; set; } /// /// Fibers length value for located areas (in pixels) /// /// Fibers length value for located areas (in pixels) - [JsonPropertyName("Length")] + [DataMember(Name = "Length", IsRequired = true, EmitDefaultValue = true)] public List Length { get; set; } /// /// Fibers value for areas (in pixels) /// /// Fibers value for areas (in pixels) - [JsonPropertyName("Area")] + [DataMember(Name = "Area", IsRequired = true, EmitDefaultValue = true)] public List Area { get; set; } /// /// Fibers color value /// /// Fibers color value - /* [BLUE, GREEN, RED] */ - [JsonPropertyName("ColorValues")] + /* + [BLUE, GREEN, RED] + */ + [DataMember(Name = "ColorValues", IsRequired = true, EmitDefaultValue = true)] public List ColorValues { get; set; } - /// - /// Used to track the state of LightDisp - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LightDispOption { get; private set; } - - /// - /// For UV_Background authentication result type - /// - /// For UV_Background authentication result type - [JsonPropertyName("LightDisp")] - public int? LightDisp { get { return this.LightDispOption; } set { this.LightDispOption = new(value); } } - /// /// Returns the string presentation of the object /// @@ -147,274 +165,52 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class FiberResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" RectCount: ").Append(RectCount).Append("\n"); sb.Append(" ExpectedCount: ").Append(ExpectedCount).Append("\n"); + sb.Append(" LightValue: ").Append(LightValue).Append("\n"); + sb.Append(" LightDisp: ").Append(LightDisp).Append("\n"); sb.Append(" RectArray: ").Append(RectArray).Append("\n"); sb.Append(" Width: ").Append(Width).Append("\n"); sb.Append(" Length: ").Append(Length).Append("\n"); sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" ColorValues: ").Append(ColorValues).Append("\n"); - sb.Append(" LightValue: ").Append(LightValue).Append("\n"); - sb.Append(" LightDisp: ").Append(LightDisp).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class FiberResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override FiberResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option rectCount = default; - Option expectedCount = default; - Option?> rectArray = default; - Option?> width = default; - Option?> length = default; - Option?> area = default; - Option?> colorValues = default; - Option type = default; - Option elementResult = default; - Option elementDiagnose = default; - Option percentValue = default; - Option lightValue = default; - Option lightDisp = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RectCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rectCount = new Option(utf8JsonReader.GetInt32()); - break; - case "ExpectedCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - expectedCount = new Option(utf8JsonReader.GetInt32()); - break; - case "RectArray": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rectArray = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Width": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - width = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - length = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Area": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - area = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "ColorValues": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - colorValues = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - case "ElementResult": - string? elementResultRawValue = utf8JsonReader.GetString(); - if (elementResultRawValue != null) - elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); - break; - case "ElementDiagnose": - string? elementDiagnoseRawValue = utf8JsonReader.GetString(); - if (elementDiagnoseRawValue != null) - elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); - break; - case "PercentValue": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - percentValue = new Option(utf8JsonReader.GetInt32()); - break; - case "LightValue": - string? lightValueRawValue = utf8JsonReader.GetString(); - if (lightValueRawValue != null) - lightValue = new Option(LightValueConverter.FromStringOrDefault(lightValueRawValue)); - break; - case "LightDisp": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - lightDisp = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!rectCount.IsSet) - throw new ArgumentException("Property is required for class FiberResult.", nameof(rectCount)); - - if (!expectedCount.IsSet) - throw new ArgumentException("Property is required for class FiberResult.", nameof(expectedCount)); - - if (!rectArray.IsSet) - throw new ArgumentException("Property is required for class FiberResult.", nameof(rectArray)); - - if (!width.IsSet) - throw new ArgumentException("Property is required for class FiberResult.", nameof(width)); - - if (!length.IsSet) - throw new ArgumentException("Property is required for class FiberResult.", nameof(length)); - - if (!area.IsSet) - throw new ArgumentException("Property is required for class FiberResult.", nameof(area)); - - if (!colorValues.IsSet) - throw new ArgumentException("Property is required for class FiberResult.", nameof(colorValues)); - - if (!type.IsSet) - throw new ArgumentException("Property is required for class FiberResult.", nameof(type)); - - if (rectCount.IsSet && rectCount.Value == null) - throw new ArgumentNullException(nameof(rectCount), "Property is not nullable for class FiberResult."); - - if (expectedCount.IsSet && expectedCount.Value == null) - throw new ArgumentNullException(nameof(expectedCount), "Property is not nullable for class FiberResult."); - - if (rectArray.IsSet && rectArray.Value == null) - throw new ArgumentNullException(nameof(rectArray), "Property is not nullable for class FiberResult."); - - if (width.IsSet && width.Value == null) - throw new ArgumentNullException(nameof(width), "Property is not nullable for class FiberResult."); - - if (length.IsSet && length.Value == null) - throw new ArgumentNullException(nameof(length), "Property is not nullable for class FiberResult."); - - if (area.IsSet && area.Value == null) - throw new ArgumentNullException(nameof(area), "Property is not nullable for class FiberResult."); - - if (colorValues.IsSet && colorValues.Value == null) - throw new ArgumentNullException(nameof(colorValues), "Property is not nullable for class FiberResult."); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class FiberResult."); - - if (elementResult.IsSet && elementResult.Value == null) - throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class FiberResult."); - - if (elementDiagnose.IsSet && elementDiagnose.Value == null) - throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class FiberResult."); - - if (percentValue.IsSet && percentValue.Value == null) - throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class FiberResult."); - - if (lightValue.IsSet && lightValue.Value == null) - throw new ArgumentNullException(nameof(lightValue), "Property is not nullable for class FiberResult."); - - if (lightDisp.IsSet && lightDisp.Value == null) - throw new ArgumentNullException(nameof(lightDisp), "Property is not nullable for class FiberResult."); - - return new FiberResult(rectCount.Value!.Value!, expectedCount.Value!.Value!, rectArray.Value!, width.Value!, length.Value!, area.Value!, colorValues.Value!, elementResult, elementDiagnose, percentValue, lightValue, lightDisp); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FiberResult fiberResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, fiberResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FiberResult fiberResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (fiberResult.RectArray == null) - throw new ArgumentNullException(nameof(fiberResult.RectArray), "Property is required for class FiberResult."); - - if (fiberResult.Width == null) - throw new ArgumentNullException(nameof(fiberResult.Width), "Property is required for class FiberResult."); - - if (fiberResult.Length == null) - throw new ArgumentNullException(nameof(fiberResult.Length), "Property is required for class FiberResult."); - - if (fiberResult.Area == null) - throw new ArgumentNullException(nameof(fiberResult.Area), "Property is required for class FiberResult."); - - if (fiberResult.ColorValues == null) - throw new ArgumentNullException(nameof(fiberResult.ColorValues), "Property is required for class FiberResult."); - - writer.WriteNumber("RectCount", fiberResult.RectCount); - - writer.WriteNumber("ExpectedCount", fiberResult.ExpectedCount); - - writer.WritePropertyName("RectArray"); - JsonSerializer.Serialize(writer, fiberResult.RectArray, jsonSerializerOptions); - writer.WritePropertyName("Width"); - JsonSerializer.Serialize(writer, fiberResult.Width, jsonSerializerOptions); - writer.WritePropertyName("Length"); - JsonSerializer.Serialize(writer, fiberResult.Length, jsonSerializerOptions); - writer.WritePropertyName("Area"); - JsonSerializer.Serialize(writer, fiberResult.Area, jsonSerializerOptions); - writer.WritePropertyName("ColorValues"); - JsonSerializer.Serialize(writer, fiberResult.ColorValues, jsonSerializerOptions); - writer.WriteNumber("Type", fiberResult.Type); - - if (fiberResult.ElementResultOption.IsSet) + foreach (var x in base.BaseValidate(validationContext)) { - var elementResultRawValue = CheckResultValueConverter.ToJsonValue(fiberResult.ElementResult!.Value); - writer.WriteNumber("ElementResult", elementResultRawValue); + yield return x; } - if (fiberResult.ElementDiagnoseOption.IsSet) - { - var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(fiberResult.ElementDiagnose!.Value); - writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); - } - if (fiberResult.PercentValueOption.IsSet) - writer.WriteNumber("PercentValue", fiberResult.PercentValueOption.Value!.Value); - - if (fiberResult.LightValueOption.IsSet) - { - var lightValueRawValue = LightValueConverter.ToJsonValue(fiberResult.LightValue!.Value); - writer.WriteNumber("LightValue", lightValueRawValue); - } - if (fiberResult.LightDispOption.IsSet) - writer.WriteNumber("LightDisp", fiberResult.LightDispOption.Value!.Value); + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs index 7d09f9b..67c38ec 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FieldItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,77 +14,82 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FieldItem /// + [DataContract(Name = "FieldItem")] public partial class FieldItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// fieldLength - /// fieldPos - /// fieldType - /// tESTRESULT - /// validCheckSum - /// reserved - [JsonConstructor] - public FieldItem(int fieldLength, int fieldPos, int fieldType, int tESTRESULT, int validCheckSum, int reserved) + [JsonConstructorAttribute] + protected FieldItem() { } + /// + /// Initializes a new instance of the class. + /// + /// fieldLength (required). + /// fieldPos (required). + /// fieldType (required). + /// tESTRESULT (required). + /// validCheckSum (required). + /// reserved (required). + public FieldItem(int fieldLength = default(int), int fieldPos = default(int), int fieldType = default(int), int tESTRESULT = default(int), int validCheckSum = default(int), int reserved = default(int)) { - FieldLength = fieldLength; - FieldPos = fieldPos; - FieldType = fieldType; - TEST_RESULT = tESTRESULT; - ValidCheckSum = validCheckSum; - Reserved = reserved; - OnCreated(); + this.FieldLength = fieldLength; + this.FieldPos = fieldPos; + this.FieldType = fieldType; + this.TEST_RESULT = tESTRESULT; + this.ValidCheckSum = validCheckSum; + this.Reserved = reserved; } - partial void OnCreated(); - /// /// Gets or Sets FieldLength /// - [JsonPropertyName("FieldLength")] + [DataMember(Name = "FieldLength", IsRequired = true, EmitDefaultValue = true)] public int FieldLength { get; set; } /// /// Gets or Sets FieldPos /// - [JsonPropertyName("FieldPos")] + [DataMember(Name = "FieldPos", IsRequired = true, EmitDefaultValue = true)] public int FieldPos { get; set; } /// /// Gets or Sets FieldType /// - [JsonPropertyName("FieldType")] + [DataMember(Name = "FieldType", IsRequired = true, EmitDefaultValue = true)] public int FieldType { get; set; } /// /// Gets or Sets TEST_RESULT /// - [JsonPropertyName("TEST_RESULT")] + [DataMember(Name = "TEST_RESULT", IsRequired = true, EmitDefaultValue = true)] public int TEST_RESULT { get; set; } /// /// Gets or Sets ValidCheckSum /// - [JsonPropertyName("ValidCheckSum")] + [DataMember(Name = "ValidCheckSum", IsRequired = true, EmitDefaultValue = true)] public int ValidCheckSum { get; set; } /// /// Gets or Sets Reserved /// - [JsonPropertyName("reserved")] + [DataMember(Name = "reserved", IsRequired = true, EmitDefaultValue = true)] public int Reserved { get; set; } /// @@ -107,6 +110,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -118,154 +130,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FieldItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FieldItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldLength = default; - Option fieldPos = default; - Option fieldType = default; - Option tESTRESULT = default; - Option validCheckSum = default; - Option reserved = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FieldLength": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldLength = new Option(utf8JsonReader.GetInt32()); - break; - case "FieldPos": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldPos = new Option(utf8JsonReader.GetInt32()); - break; - case "FieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldType = new Option(utf8JsonReader.GetInt32()); - break; - case "TEST_RESULT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - tESTRESULT = new Option(utf8JsonReader.GetInt32()); - break; - case "ValidCheckSum": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - validCheckSum = new Option(utf8JsonReader.GetInt32()); - break; - case "reserved": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!fieldLength.IsSet) - throw new ArgumentException("Property is required for class FieldItem.", nameof(fieldLength)); - - if (!fieldPos.IsSet) - throw new ArgumentException("Property is required for class FieldItem.", nameof(fieldPos)); - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class FieldItem.", nameof(fieldType)); - - if (!tESTRESULT.IsSet) - throw new ArgumentException("Property is required for class FieldItem.", nameof(tESTRESULT)); - - if (!validCheckSum.IsSet) - throw new ArgumentException("Property is required for class FieldItem.", nameof(validCheckSum)); - - if (!reserved.IsSet) - throw new ArgumentException("Property is required for class FieldItem.", nameof(reserved)); - - if (fieldLength.IsSet && fieldLength.Value == null) - throw new ArgumentNullException(nameof(fieldLength), "Property is not nullable for class FieldItem."); - - if (fieldPos.IsSet && fieldPos.Value == null) - throw new ArgumentNullException(nameof(fieldPos), "Property is not nullable for class FieldItem."); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class FieldItem."); - - if (tESTRESULT.IsSet && tESTRESULT.Value == null) - throw new ArgumentNullException(nameof(tESTRESULT), "Property is not nullable for class FieldItem."); - - if (validCheckSum.IsSet && validCheckSum.Value == null) - throw new ArgumentNullException(nameof(validCheckSum), "Property is not nullable for class FieldItem."); - - if (reserved.IsSet && reserved.Value == null) - throw new ArgumentNullException(nameof(reserved), "Property is not nullable for class FieldItem."); - - return new FieldItem(fieldLength.Value!.Value!, fieldPos.Value!.Value!, fieldType.Value!.Value!, tESTRESULT.Value!.Value!, validCheckSum.Value!.Value!, reserved.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FieldItem fieldItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, fieldItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FieldItem fieldItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("FieldLength", fieldItem.FieldLength); - - writer.WriteNumber("FieldPos", fieldItem.FieldPos); - - writer.WriteNumber("FieldType", fieldItem.FieldType); - - writer.WriteNumber("TEST_RESULT", fieldItem.TEST_RESULT); - - writer.WriteNumber("ValidCheckSum", fieldItem.ValidCheckSum); - - writer.WriteNumber("reserved", fieldItem.Reserved); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FileImage.cs b/src/Regula.DocumentReader.WebClient/Model/FileImage.cs index a10b893..7e160a5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FileImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FileImage.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,55 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// FileImage /// + [DataContract(Name = "FileImage")] public partial class FileImage : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// data - /// length - [JsonConstructor] - public FileImage(string data, int length) + [JsonConstructorAttribute] + protected FileImage() { } + /// + /// Initializes a new instance of the class. + /// + /// data (required). + /// length (required). + public FileImage(string data = default(string), int length = default(int)) { - Data = data; - Length = length; - OnCreated(); + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for FileImage and cannot be null"); + } + this.Data = data; + this.Length = length; } - partial void OnCreated(); - /// /// Gets or Sets Data /// - [JsonPropertyName("Data")] + [DataMember(Name = "Data", IsRequired = true, EmitDefaultValue = true)] public string Data { get; set; } /// /// Gets or Sets Length /// - [JsonPropertyName("Length")] + [DataMember(Name = "Length", IsRequired = true, EmitDefaultValue = true)] public int Length { get; set; } /// @@ -71,6 +79,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -82,104 +99,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class FileImageJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override FileImage Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option data = default; - Option length = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Data": - data = new Option(utf8JsonReader.GetString()!); - break; - case "Length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - length = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!data.IsSet) - throw new ArgumentException("Property is required for class FileImage.", nameof(data)); - - if (!length.IsSet) - throw new ArgumentException("Property is required for class FileImage.", nameof(length)); - - if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class FileImage."); - - if (length.IsSet && length.Value == null) - throw new ArgumentNullException(nameof(length), "Property is not nullable for class FileImage."); - - return new FileImage(data.Value!, length.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, FileImage fileImage, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, fileImage, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, FileImage fileImage, JsonSerializerOptions jsonSerializerOptions) - { - if (fileImage.Data == null) - throw new ArgumentNullException(nameof(fileImage.Data), "Property is required for class FileImage."); - - writer.WriteString("Data", fileImage.Data); - - writer.WriteNumber("Length", fileImage.Length); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs index 44604b2..148c61a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,78 +14,57 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// GetTransactionsByTagResponse /// + [DataContract(Name = "GetTransactionsByTagResponse")] public partial class GetTransactionsByTagResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Transaction id - /// Transaction status - /// Last time updated - [JsonConstructor] - public GetTransactionsByTagResponse(Option id = default, Option state = default, Option updatedAt = default) + /// Transaction id. + /// Transaction status. + /// Last time updated. + public GetTransactionsByTagResponse(Guid id = default(Guid), int state = default(int), DateTime updatedAt = default(DateTime)) { - IdOption = id; - StateOption = state; - UpdatedAtOption = updatedAt; - OnCreated(); + this.Id = id; + this.State = state; + this.UpdatedAt = updatedAt; } - partial void OnCreated(); - - /// - /// Used to track the state of Id - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option IdOption { get; private set; } - /// /// Transaction id /// /// Transaction id - [JsonPropertyName("id")] - public Guid? Id { get { return this.IdOption; } set { this.IdOption = new(value); } } - - /// - /// Used to track the state of State - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option StateOption { get; private set; } + [DataMember(Name = "id", EmitDefaultValue = false)] + public Guid Id { get; set; } /// /// Transaction status /// /// Transaction status - [JsonPropertyName("state")] - public int? State { get { return this.StateOption; } set { this.StateOption = new(value); } } - - /// - /// Used to track the state of UpdatedAt - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UpdatedAtOption { get; private set; } + [DataMember(Name = "state", EmitDefaultValue = false)] + public int State { get; set; } /// /// Last time updated /// /// Last time updated - [JsonPropertyName("updatedAt")] - public DateTime? UpdatedAt { get { return this.UpdatedAtOption; } set { this.UpdatedAtOption = new(value); } } + [DataMember(Name = "updatedAt", EmitDefaultValue = false)] + public DateTime UpdatedAt { get; set; } /// /// Returns the string presentation of the object @@ -104,6 +81,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -115,114 +101,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class GetTransactionsByTagResponseJsonConverter : JsonConverter - { - /// - /// The format to use to serialize UpdatedAt - /// - public static string UpdatedAtFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override GetTransactionsByTagResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option id = default; - Option state = default; - Option updatedAt = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "id": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - id = new Option(utf8JsonReader.GetGuid()); - break; - case "state": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - state = new Option(utf8JsonReader.GetInt32()); - break; - case "updatedAt": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - updatedAt = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - default: - break; - } - } - } - - if (id.IsSet && id.Value == null) - throw new ArgumentNullException(nameof(id), "Property is not nullable for class GetTransactionsByTagResponse."); - - if (state.IsSet && state.Value == null) - throw new ArgumentNullException(nameof(state), "Property is not nullable for class GetTransactionsByTagResponse."); - - if (updatedAt.IsSet && updatedAt.Value == null) - throw new ArgumentNullException(nameof(updatedAt), "Property is not nullable for class GetTransactionsByTagResponse."); - - return new GetTransactionsByTagResponse(id, state, updatedAt); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, GetTransactionsByTagResponse getTransactionsByTagResponse, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, getTransactionsByTagResponse, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, GetTransactionsByTagResponse getTransactionsByTagResponse, JsonSerializerOptions jsonSerializerOptions) - { - if (getTransactionsByTagResponse.IdOption.IsSet) - writer.WriteString("id", getTransactionsByTagResponse.IdOption.Value!.Value); - - if (getTransactionsByTagResponse.StateOption.IsSet) - writer.WriteNumber("state", getTransactionsByTagResponse.StateOption.Value!.Value); - - if (getTransactionsByTagResponse.UpdatedAtOption.IsSet) - writer.WriteString("updatedAt", getTransactionsByTagResponse.UpdatedAtOption.Value!.Value.ToString(UpdatedAtFormat)); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphData.cs b/src/Regula.DocumentReader.WebClient/Model/GraphData.cs index dfb96c5..61102b7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,85 +14,95 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// GraphData /// + [DataContract(Name = "GraphData")] public partial class GraphData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// fieldType - /// fileImage - /// graphicsType - /// originDG - /// originDGTag - /// originEntryView - /// originTagEntry - [JsonConstructor] - public GraphData(int fieldType, FileImage fileImage, int graphicsType, int originDG, int originDGTag, int originEntryView, int originTagEntry) + [JsonConstructorAttribute] + protected GraphData() { } + /// + /// Initializes a new instance of the class. + /// + /// fieldType (required). + /// fileImage (required). + /// graphicsType (required). + /// originDG (required). + /// originDGTag (required). + /// originEntryView (required). + /// originTagEntry (required). + public GraphData(int fieldType = default(int), FileImage fileImage = default(FileImage), int graphicsType = default(int), int originDG = default(int), int originDGTag = default(int), int originEntryView = default(int), int originTagEntry = default(int)) { - FieldType = fieldType; - FileImage = fileImage; - GraphicsType = graphicsType; - OriginDG = originDG; - OriginDGTag = originDGTag; - OriginEntryView = originEntryView; - OriginTagEntry = originTagEntry; - OnCreated(); + this.FieldType = fieldType; + // to ensure "fileImage" is required (not null) + if (fileImage == null) + { + throw new ArgumentNullException("fileImage is a required property for GraphData and cannot be null"); + } + this.FileImage = fileImage; + this.GraphicsType = graphicsType; + this.OriginDG = originDG; + this.OriginDGTag = originDGTag; + this.OriginEntryView = originEntryView; + this.OriginTagEntry = originTagEntry; } - partial void OnCreated(); - /// /// Gets or Sets FieldType /// - [JsonPropertyName("FieldType")] + [DataMember(Name = "FieldType", IsRequired = true, EmitDefaultValue = true)] public int FieldType { get; set; } /// /// Gets or Sets FileImage /// - [JsonPropertyName("File_Image")] + [DataMember(Name = "File_Image", IsRequired = true, EmitDefaultValue = true)] public FileImage FileImage { get; set; } /// /// Gets or Sets GraphicsType /// - [JsonPropertyName("GraphicsType")] + [DataMember(Name = "GraphicsType", IsRequired = true, EmitDefaultValue = true)] public int GraphicsType { get; set; } /// /// Gets or Sets OriginDG /// - [JsonPropertyName("OriginDG")] + [DataMember(Name = "OriginDG", IsRequired = true, EmitDefaultValue = true)] public int OriginDG { get; set; } /// /// Gets or Sets OriginDGTag /// - [JsonPropertyName("OriginDGTag")] + [DataMember(Name = "OriginDGTag", IsRequired = true, EmitDefaultValue = true)] public int OriginDGTag { get; set; } /// /// Gets or Sets OriginEntryView /// - [JsonPropertyName("OriginEntryView")] + [DataMember(Name = "OriginEntryView", IsRequired = true, EmitDefaultValue = true)] public int OriginEntryView { get; set; } /// /// Gets or Sets OriginTagEntry /// - [JsonPropertyName("OriginTagEntry")] + [DataMember(Name = "OriginTagEntry", IsRequired = true, EmitDefaultValue = true)] public int OriginTagEntry { get; set; } /// @@ -116,6 +124,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -127,170 +144,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class GraphDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override GraphData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldType = default; - Option fileImage = default; - Option graphicsType = default; - Option originDG = default; - Option originDGTag = default; - Option originEntryView = default; - Option originTagEntry = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldType = new Option(utf8JsonReader.GetInt32()); - break; - case "File_Image": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fileImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "GraphicsType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - graphicsType = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginDG": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originDG = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginDGTag": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originDGTag = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginEntryView": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originEntryView = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginTagEntry": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originTagEntry = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class GraphData.", nameof(fieldType)); - - if (!fileImage.IsSet) - throw new ArgumentException("Property is required for class GraphData.", nameof(fileImage)); - - if (!graphicsType.IsSet) - throw new ArgumentException("Property is required for class GraphData.", nameof(graphicsType)); - - if (!originDG.IsSet) - throw new ArgumentException("Property is required for class GraphData.", nameof(originDG)); - - if (!originDGTag.IsSet) - throw new ArgumentException("Property is required for class GraphData.", nameof(originDGTag)); - - if (!originEntryView.IsSet) - throw new ArgumentException("Property is required for class GraphData.", nameof(originEntryView)); - - if (!originTagEntry.IsSet) - throw new ArgumentException("Property is required for class GraphData.", nameof(originTagEntry)); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class GraphData."); - - if (fileImage.IsSet && fileImage.Value == null) - throw new ArgumentNullException(nameof(fileImage), "Property is not nullable for class GraphData."); - - if (graphicsType.IsSet && graphicsType.Value == null) - throw new ArgumentNullException(nameof(graphicsType), "Property is not nullable for class GraphData."); - - if (originDG.IsSet && originDG.Value == null) - throw new ArgumentNullException(nameof(originDG), "Property is not nullable for class GraphData."); - - if (originDGTag.IsSet && originDGTag.Value == null) - throw new ArgumentNullException(nameof(originDGTag), "Property is not nullable for class GraphData."); - - if (originEntryView.IsSet && originEntryView.Value == null) - throw new ArgumentNullException(nameof(originEntryView), "Property is not nullable for class GraphData."); - - if (originTagEntry.IsSet && originTagEntry.Value == null) - throw new ArgumentNullException(nameof(originTagEntry), "Property is not nullable for class GraphData."); - - return new GraphData(fieldType.Value!.Value!, fileImage.Value!, graphicsType.Value!.Value!, originDG.Value!.Value!, originDGTag.Value!.Value!, originEntryView.Value!.Value!, originTagEntry.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, GraphData graphData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, graphData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, GraphData graphData, JsonSerializerOptions jsonSerializerOptions) - { - if (graphData.FileImage == null) - throw new ArgumentNullException(nameof(graphData.FileImage), "Property is required for class GraphData."); - - writer.WriteNumber("FieldType", graphData.FieldType); - - writer.WritePropertyName("File_Image"); - JsonSerializer.Serialize(writer, graphData.FileImage, jsonSerializerOptions); - writer.WriteNumber("GraphicsType", graphData.GraphicsType); - - writer.WriteNumber("OriginDG", graphData.OriginDG); - - writer.WriteNumber("OriginDGTag", graphData.OriginDGTag); - - writer.WriteNumber("OriginEntryView", graphData.OriginEntryView); - - writer.WriteNumber("OriginTagEntry", graphData.OriginTagEntry); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs index 4c27811..381678a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicField.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,62 +14,82 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Information about one graphic field - abstract class /// + [DataContract(Name = "GraphicField")] public partial class GraphicField : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// fieldRect - /// fieldType - /// Graphic field symbolic name - /// image - [JsonConstructor] - public GraphicField(RectangleCoordinates fieldRect, GraphicFieldType fieldType, string fieldName, ImageData image) - { - FieldRect = fieldRect; - FieldType = fieldType; - FieldName = fieldName; - Image = image; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets FieldType /// - [JsonPropertyName("FieldType")] + [DataMember(Name = "FieldType", IsRequired = true, EmitDefaultValue = true)] public GraphicFieldType FieldType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected GraphicField() { } + /// + /// Initializes a new instance of the class. + /// + /// fieldRect (required). + /// fieldType (required). + /// Graphic field symbolic name (required). + /// image (required). + public GraphicField(RectangleCoordinates fieldRect = default(RectangleCoordinates), GraphicFieldType fieldType = default(GraphicFieldType), string fieldName = default(string), ImageData image = default(ImageData)) + { + // to ensure "fieldRect" is required (not null) + if (fieldRect == null) + { + throw new ArgumentNullException("fieldRect is a required property for GraphicField and cannot be null"); + } + this.FieldRect = fieldRect; + this.FieldType = fieldType; + // to ensure "fieldName" is required (not null) + if (fieldName == null) + { + throw new ArgumentNullException("fieldName is a required property for GraphicField and cannot be null"); + } + this.FieldName = fieldName; + // to ensure "image" is required (not null) + if (image == null) + { + throw new ArgumentNullException("image is a required property for GraphicField and cannot be null"); + } + this.Image = image; + } /// /// Gets or Sets FieldRect /// - [JsonPropertyName("FieldRect")] + [DataMember(Name = "FieldRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates FieldRect { get; set; } /// /// Graphic field symbolic name /// /// Graphic field symbolic name - [JsonPropertyName("FieldName")] + [DataMember(Name = "FieldName", IsRequired = true, EmitDefaultValue = true)] public string FieldName { get; set; } /// /// Gets or Sets Image /// - [JsonPropertyName("image")] + [DataMember(Name = "image", IsRequired = true, EmitDefaultValue = true)] public ImageData Image { get; set; } /// @@ -90,6 +108,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -101,139 +128,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class GraphicFieldJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override GraphicField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldRect = default; - Option fieldType = default; - Option fieldName = default; - Option image = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "FieldType": - string? fieldTypeRawValue = utf8JsonReader.GetString(); - if (fieldTypeRawValue != null) - fieldType = new Option(GraphicFieldTypeValueConverter.FromStringOrDefault(fieldTypeRawValue)); - break; - case "FieldName": - fieldName = new Option(utf8JsonReader.GetString()!); - break; - case "image": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!fieldRect.IsSet) - throw new ArgumentException("Property is required for class GraphicField.", nameof(fieldRect)); - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class GraphicField.", nameof(fieldType)); - - if (!fieldName.IsSet) - throw new ArgumentException("Property is required for class GraphicField.", nameof(fieldName)); - - if (!image.IsSet) - throw new ArgumentException("Property is required for class GraphicField.", nameof(image)); - - if (fieldRect.IsSet && fieldRect.Value == null) - throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class GraphicField."); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class GraphicField."); - - if (fieldName.IsSet && fieldName.Value == null) - throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class GraphicField."); - - if (image.IsSet && image.Value == null) - throw new ArgumentNullException(nameof(image), "Property is not nullable for class GraphicField."); - - return new GraphicField(fieldRect.Value!, fieldType.Value!.Value!, fieldName.Value!, image.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, GraphicField graphicField, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, graphicField, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, GraphicField graphicField, JsonSerializerOptions jsonSerializerOptions) - { - if (graphicField.FieldRect == null) - throw new ArgumentNullException(nameof(graphicField.FieldRect), "Property is required for class GraphicField."); - - if (graphicField.FieldName == null) - throw new ArgumentNullException(nameof(graphicField.FieldName), "Property is required for class GraphicField."); - - if (graphicField.Image == null) - throw new ArgumentNullException(nameof(graphicField.Image), "Property is required for class GraphicField."); - - writer.WritePropertyName("FieldRect"); - JsonSerializer.Serialize(writer, graphicField.FieldRect, jsonSerializerOptions); - var fieldTypeRawValue = GraphicFieldTypeValueConverter.ToJsonValue(graphicField.FieldType); - writer.WriteNumber("FieldType", fieldTypeRawValue); - - writer.WriteString("FieldName", graphicField.FieldName); - - writer.WritePropertyName("image"); - JsonSerializer.Serialize(writer, graphicField.Image, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs index 84ace81..c59e9e6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -166,279 +167,4 @@ public enum GraphicFieldType FINGER_TWO_THUMBS = 315 } - /// - /// Converts to and from the JSON value - /// - public static class GraphicFieldTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static GraphicFieldType FromString(string value) - { - if (value.Equals((201).ToString())) - return GraphicFieldType.PORTRAIT; - - if (value.Equals((202).ToString())) - return GraphicFieldType.FINGERPRINT; - - if (value.Equals((203).ToString())) - return GraphicFieldType.EYE; - - if (value.Equals((204).ToString())) - return GraphicFieldType.SIGNATURE; - - if (value.Equals((205).ToString())) - return GraphicFieldType.BAR_CODE; - - if (value.Equals((206).ToString())) - return GraphicFieldType.PROOF_OF_CITIZENSHIP; - - if (value.Equals((207).ToString())) - return GraphicFieldType.DOCUMENT_FRONT; - - if (value.Equals((208).ToString())) - return GraphicFieldType.DOCUMENT_REAR; - - if (value.Equals((209).ToString())) - return GraphicFieldType.COLOR_DYNAMIC; - - if (value.Equals((210).ToString())) - return GraphicFieldType.GHOST_PORTRAIT; - - if (value.Equals((211).ToString())) - return GraphicFieldType.STAMP; - - if (value.Equals((212).ToString())) - return GraphicFieldType.PORTRAIT_OF_CHILD; - - if (value.Equals((213).ToString())) - return GraphicFieldType.CONTACT_CHIP; - - if (value.Equals((250).ToString())) - return GraphicFieldType.OTHER; - - if (value.Equals((300).ToString())) - return GraphicFieldType.FINGER_LEFT_THUMB; - - if (value.Equals((301).ToString())) - return GraphicFieldType.FINGER_LEFT_INDEX; - - if (value.Equals((302).ToString())) - return GraphicFieldType.FINGER_LEFT_MIDDLE; - - if (value.Equals((303).ToString())) - return GraphicFieldType.FINGER_LEFT_RING; - - if (value.Equals((304).ToString())) - return GraphicFieldType.FINGER_LEFT_LITTLE; - - if (value.Equals((305).ToString())) - return GraphicFieldType.FINGER_RIGHT_THUMB; - - if (value.Equals((306).ToString())) - return GraphicFieldType.FINGER_RIGHT_INDEX; - - if (value.Equals((307).ToString())) - return GraphicFieldType.FINGER_RIGHT_MIDDLE; - - if (value.Equals((308).ToString())) - return GraphicFieldType.FINGER_RIGHT_RING; - - if (value.Equals((309).ToString())) - return GraphicFieldType.FINGER_RIGHT_LITTLE; - - if (value.Equals((313).ToString())) - return GraphicFieldType.FINGER_RIGHT_FOUR_FINGERS; - - if (value.Equals((314).ToString())) - return GraphicFieldType.FINGER_LEFT_FOUR_FINGERS; - - if (value.Equals((315).ToString())) - return GraphicFieldType.FINGER_TWO_THUMBS; - - throw new NotImplementedException($"Could not convert value to type GraphicFieldType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static GraphicFieldType? FromStringOrDefault(string value) - { - if (value.Equals((201).ToString())) - return GraphicFieldType.PORTRAIT; - - if (value.Equals((202).ToString())) - return GraphicFieldType.FINGERPRINT; - - if (value.Equals((203).ToString())) - return GraphicFieldType.EYE; - - if (value.Equals((204).ToString())) - return GraphicFieldType.SIGNATURE; - - if (value.Equals((205).ToString())) - return GraphicFieldType.BAR_CODE; - - if (value.Equals((206).ToString())) - return GraphicFieldType.PROOF_OF_CITIZENSHIP; - - if (value.Equals((207).ToString())) - return GraphicFieldType.DOCUMENT_FRONT; - - if (value.Equals((208).ToString())) - return GraphicFieldType.DOCUMENT_REAR; - - if (value.Equals((209).ToString())) - return GraphicFieldType.COLOR_DYNAMIC; - - if (value.Equals((210).ToString())) - return GraphicFieldType.GHOST_PORTRAIT; - - if (value.Equals((211).ToString())) - return GraphicFieldType.STAMP; - - if (value.Equals((212).ToString())) - return GraphicFieldType.PORTRAIT_OF_CHILD; - - if (value.Equals((213).ToString())) - return GraphicFieldType.CONTACT_CHIP; - - if (value.Equals((250).ToString())) - return GraphicFieldType.OTHER; - - if (value.Equals((300).ToString())) - return GraphicFieldType.FINGER_LEFT_THUMB; - - if (value.Equals((301).ToString())) - return GraphicFieldType.FINGER_LEFT_INDEX; - - if (value.Equals((302).ToString())) - return GraphicFieldType.FINGER_LEFT_MIDDLE; - - if (value.Equals((303).ToString())) - return GraphicFieldType.FINGER_LEFT_RING; - - if (value.Equals((304).ToString())) - return GraphicFieldType.FINGER_LEFT_LITTLE; - - if (value.Equals((305).ToString())) - return GraphicFieldType.FINGER_RIGHT_THUMB; - - if (value.Equals((306).ToString())) - return GraphicFieldType.FINGER_RIGHT_INDEX; - - if (value.Equals((307).ToString())) - return GraphicFieldType.FINGER_RIGHT_MIDDLE; - - if (value.Equals((308).ToString())) - return GraphicFieldType.FINGER_RIGHT_RING; - - if (value.Equals((309).ToString())) - return GraphicFieldType.FINGER_RIGHT_LITTLE; - - if (value.Equals((313).ToString())) - return GraphicFieldType.FINGER_RIGHT_FOUR_FINGERS; - - if (value.Equals((314).ToString())) - return GraphicFieldType.FINGER_LEFT_FOUR_FINGERS; - - if (value.Equals((315).ToString())) - return GraphicFieldType.FINGER_TWO_THUMBS; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(GraphicFieldType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class GraphicFieldTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override GraphicFieldType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - GraphicFieldType? result = rawValue == null - ? null - : GraphicFieldTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the GraphicFieldType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, GraphicFieldType graphicFieldType, JsonSerializerOptions options) - { - writer.WriteStringValue(graphicFieldType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class GraphicFieldTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a GraphicFieldType from the Json object - /// - /// - /// - /// - /// - public override GraphicFieldType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - GraphicFieldType? result = rawValue == null - ? null - : GraphicFieldTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, GraphicFieldType? graphicFieldType, JsonSerializerOptions options) - { - writer.WriteStringValue(graphicFieldType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs index d9d3328..fdbaa8e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicFieldsList.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,46 +14,56 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// GraphicFieldsList /// + [DataContract(Name = "GraphicFieldsList")] public partial class GraphicFieldsList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// pArrayFields - /// Number of pArrayFields array elements - [JsonConstructor] - public GraphicFieldsList(List pArrayFields, decimal nFields) + [JsonConstructorAttribute] + protected GraphicFieldsList() { } + /// + /// Initializes a new instance of the class. + /// + /// pArrayFields (required). + /// Number of pArrayFields array elements (required). + public GraphicFieldsList(List pArrayFields = default(List), decimal nFields = default(decimal)) { - PArrayFields = pArrayFields; - NFields = nFields; - OnCreated(); + // to ensure "pArrayFields" is required (not null) + if (pArrayFields == null) + { + throw new ArgumentNullException("pArrayFields is a required property for GraphicFieldsList and cannot be null"); + } + this.PArrayFields = pArrayFields; + this.NFields = nFields; } - partial void OnCreated(); - /// /// Gets or Sets PArrayFields /// - [JsonPropertyName("pArrayFields")] + [DataMember(Name = "pArrayFields", IsRequired = true, EmitDefaultValue = true)] public List PArrayFields { get; set; } /// /// Number of pArrayFields array elements /// /// Number of pArrayFields array elements - [JsonPropertyName("nFields")] + [DataMember(Name = "nFields", IsRequired = true, EmitDefaultValue = true)] public decimal NFields { get; set; } /// @@ -72,6 +80,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -83,105 +100,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class GraphicFieldsListJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override GraphicFieldsList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> pArrayFields = default; - Option nFields = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "pArrayFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pArrayFields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "nFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - nFields = new Option(utf8JsonReader.GetDecimal()); - break; - default: - break; - } - } - } - - if (!pArrayFields.IsSet) - throw new ArgumentException("Property is required for class GraphicFieldsList.", nameof(pArrayFields)); - - if (!nFields.IsSet) - throw new ArgumentException("Property is required for class GraphicFieldsList.", nameof(nFields)); - - if (pArrayFields.IsSet && pArrayFields.Value == null) - throw new ArgumentNullException(nameof(pArrayFields), "Property is not nullable for class GraphicFieldsList."); - - if (nFields.IsSet && nFields.Value == null) - throw new ArgumentNullException(nameof(nFields), "Property is not nullable for class GraphicFieldsList."); - - return new GraphicFieldsList(pArrayFields.Value!, nFields.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, GraphicFieldsList graphicFieldsList, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, graphicFieldsList, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, GraphicFieldsList graphicFieldsList, JsonSerializerOptions jsonSerializerOptions) - { - if (graphicFieldsList.PArrayFields == null) - throw new ArgumentNullException(nameof(graphicFieldsList.PArrayFields), "Property is required for class GraphicFieldsList."); - - writer.WritePropertyName("pArrayFields"); - JsonSerializer.Serialize(writer, graphicFieldsList.PArrayFields, jsonSerializerOptions); - writer.WriteNumber("nFields", graphicFieldsList.NFields); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs index 74cfbec..788801a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Graphic fields extracted from one of the document sources. Returns separate results for each provided page. /// + [DataContract(Name = "GraphicsResult")] public partial class GraphicsResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// docGraphicsInfo - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public GraphicsResult(GraphicFieldsList docGraphicsInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected GraphicsResult() { } + /// + /// Initializes a new instance of the class. + /// + /// docGraphicsInfo (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public GraphicsResult(GraphicFieldsList docGraphicsInfo = default(GraphicFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - DocGraphicsInfo = docGraphicsInfo; - OnCreated(); + // to ensure "docGraphicsInfo" is required (not null) + if (docGraphicsInfo == null) + { + throw new ArgumentNullException("docGraphicsInfo is a required property for GraphicsResult and cannot be null"); + } + this.DocGraphicsInfo = docGraphicsInfo; } - partial void OnCreated(); - /// /// Gets or Sets DocGraphicsInfo /// - [JsonPropertyName("DocGraphicsInfo")] + [DataMember(Name = "DocGraphicsInfo", IsRequired = true, EmitDefaultValue = true)] public GraphicFieldsList DocGraphicsInfo { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class GraphicsResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" DocGraphicsInfo: ").Append(DocGraphicsInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class GraphicsResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override GraphicsResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docGraphicsInfo = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocGraphicsInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docGraphicsInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!docGraphicsInfo.IsSet) - throw new ArgumentException("Property is required for class GraphicsResult.", nameof(docGraphicsInfo)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class GraphicsResult.", nameof(resultType)); - - if (docGraphicsInfo.IsSet && docGraphicsInfo.Value == null) - throw new ArgumentNullException(nameof(docGraphicsInfo), "Property is not nullable for class GraphicsResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class GraphicsResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class GraphicsResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class GraphicsResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class GraphicsResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class GraphicsResult."); - - return new GraphicsResult(docGraphicsInfo.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, GraphicsResult graphicsResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, graphicsResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, GraphicsResult graphicsResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (graphicsResult.DocGraphicsInfo == null) - throw new ArgumentNullException(nameof(graphicsResult.DocGraphicsInfo), "Property is required for class GraphicsResult."); - - writer.WritePropertyName("DocGraphicsInfo"); - JsonSerializer.Serialize(writer, graphicsResult.DocGraphicsInfo, jsonSerializerOptions); - if (graphicsResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", graphicsResult.BufLengthOption.Value!.Value); - - if (graphicsResult.LightOption.IsSet) - writer.WriteNumber("light", graphicsResult.LightOption.Value!.Value); - - if (graphicsResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", graphicsResult.ListIdxOption.Value!.Value); - - if (graphicsResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", graphicsResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", graphicsResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs index 1c5a830..52f25a5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,123 +14,149 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Healthcheck /// + [DataContract(Name = "Healthcheck")] public partial class Healthcheck : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Application name. - /// Unique license identifier. - /// License type. - /// License serial number. - /// License validity date. - /// List of supported scenarios. - /// Product version. - /// metadata - /// documentsDatabase - [JsonConstructor] - public Healthcheck(string app, string? licenseId = default, string? licenseType = default, string? licenseSerial = default, DateTime? licenseValidUntil = default, List? scenarios = default, string? varVersion = default, Option?> metadata = default, Option documentsDatabase = default) + [JsonConstructorAttribute] + protected Healthcheck() { } + /// + /// Initializes a new instance of the class. + /// + /// Application name. (required). + /// Unique license identifier. (required). + /// License type. (required). + /// License serial number. (required). + /// License validity date. (required). + /// List of supported scenarios. (required). + /// Product version. (required). + /// metadata. + /// documentsDatabase. + public Healthcheck(string app = default(string), string licenseId = default(string), string licenseType = default(string), string licenseSerial = default(string), DateTime? licenseValidUntil = default(DateTime?), List scenarios = default(List), string varVersion = default(string), Dictionary metadata = default(Dictionary), HealthcheckDocumentsDatabase documentsDatabase = default(HealthcheckDocumentsDatabase)) { - App = app; - LicenseId = licenseId; - LicenseType = licenseType; - LicenseSerial = licenseSerial; - LicenseValidUntil = licenseValidUntil; - Scenarios = scenarios; - VarVersion = varVersion; - MetadataOption = metadata; - DocumentsDatabaseOption = documentsDatabase; - OnCreated(); + // to ensure "app" is required (not null) + if (app == null) + { + throw new ArgumentNullException("app is a required property for Healthcheck and cannot be null"); + } + this.App = app; + // to ensure "licenseId" is required (not null) + if (licenseId == null) + { + throw new ArgumentNullException("licenseId is a required property for Healthcheck and cannot be null"); + } + this.LicenseId = licenseId; + // to ensure "licenseType" is required (not null) + if (licenseType == null) + { + throw new ArgumentNullException("licenseType is a required property for Healthcheck and cannot be null"); + } + this.LicenseType = licenseType; + // to ensure "licenseSerial" is required (not null) + if (licenseSerial == null) + { + throw new ArgumentNullException("licenseSerial is a required property for Healthcheck and cannot be null"); + } + this.LicenseSerial = licenseSerial; + // to ensure "licenseValidUntil" is required (not null) + if (licenseValidUntil == null) + { + throw new ArgumentNullException("licenseValidUntil is a required property for Healthcheck and cannot be null"); + } + this.LicenseValidUntil = licenseValidUntil; + // to ensure "scenarios" is required (not null) + if (scenarios == null) + { + throw new ArgumentNullException("scenarios is a required property for Healthcheck and cannot be null"); + } + this.Scenarios = scenarios; + // to ensure "varVersion" is required (not null) + if (varVersion == null) + { + throw new ArgumentNullException("varVersion is a required property for Healthcheck and cannot be null"); + } + this.VarVersion = varVersion; + this.Metadata = metadata; + this.DocumentsDatabase = documentsDatabase; } - partial void OnCreated(); - /// /// Application name. /// /// Application name. - [JsonPropertyName("app")] + [DataMember(Name = "app", IsRequired = true, EmitDefaultValue = true)] public string App { get; set; } /// /// Unique license identifier. /// /// Unique license identifier. - [JsonPropertyName("licenseId")] - public string? LicenseId { get; set; } + [DataMember(Name = "licenseId", IsRequired = true, EmitDefaultValue = true)] + public string LicenseId { get; set; } /// /// License type. /// /// License type. - [JsonPropertyName("licenseType")] - public string? LicenseType { get; set; } + [DataMember(Name = "licenseType", IsRequired = true, EmitDefaultValue = true)] + public string LicenseType { get; set; } /// /// License serial number. /// /// License serial number. - [JsonPropertyName("licenseSerial")] - public string? LicenseSerial { get; set; } + [DataMember(Name = "licenseSerial", IsRequired = true, EmitDefaultValue = true)] + public string LicenseSerial { get; set; } /// /// License validity date. /// /// License validity date. - [JsonPropertyName("licenseValidUntil")] + [DataMember(Name = "licenseValidUntil", IsRequired = true, EmitDefaultValue = true)] public DateTime? LicenseValidUntil { get; set; } /// /// List of supported scenarios. /// /// List of supported scenarios. - [JsonPropertyName("scenarios")] - public List? Scenarios { get; set; } + [DataMember(Name = "scenarios", IsRequired = true, EmitDefaultValue = true)] + public List Scenarios { get; set; } /// /// Product version. /// /// Product version. - [JsonPropertyName("version")] - public string? VarVersion { get; set; } - - /// - /// Used to track the state of Metadata - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> MetadataOption { get; private set; } + [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] + public string VarVersion { get; set; } /// /// Gets or Sets Metadata /// - [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } - - /// - /// Used to track the state of DocumentsDatabase - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DocumentsDatabaseOption { get; private set; } + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public Dictionary Metadata { get; set; } /// /// Gets or Sets DocumentsDatabase /// - [JsonPropertyName("documentsDatabase")] - public HealthcheckDocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new(value); } } + [DataMember(Name = "documentsDatabase", EmitDefaultValue = false)] + public HealthcheckDocumentsDatabase DocumentsDatabase { get; set; } /// /// Returns the string presentation of the object @@ -155,6 +179,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -166,205 +199,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class HealthcheckJsonConverter : JsonConverter - { - /// - /// The format to use to serialize LicenseValidUntil - /// - public static string LicenseValidUntilFormat { get; set; } = "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fffffffK"; - - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override Healthcheck Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option app = default; - Option licenseId = default; - Option licenseType = default; - Option licenseSerial = default; - Option licenseValidUntil = default; - Option?> scenarios = default; - Option varVersion = default; - Option?> metadata = default; - Option documentsDatabase = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "app": - app = new Option(utf8JsonReader.GetString()!); - break; - case "licenseId": - licenseId = new Option(utf8JsonReader.GetString()); - break; - case "licenseType": - licenseType = new Option(utf8JsonReader.GetString()); - break; - case "licenseSerial": - licenseSerial = new Option(utf8JsonReader.GetString()); - break; - case "licenseValidUntil": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - licenseValidUntil = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "scenarios": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - scenarios = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "version": - varVersion = new Option(utf8JsonReader.GetString()); - break; - case "metadata": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "documentsDatabase": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - documentsDatabase = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!app.IsSet) - throw new ArgumentException("Property is required for class Healthcheck.", nameof(app)); - - if (!licenseId.IsSet) - throw new ArgumentException("Property is required for class Healthcheck.", nameof(licenseId)); - - if (!licenseType.IsSet) - throw new ArgumentException("Property is required for class Healthcheck.", nameof(licenseType)); - - if (!licenseSerial.IsSet) - throw new ArgumentException("Property is required for class Healthcheck.", nameof(licenseSerial)); - - if (!licenseValidUntil.IsSet) - throw new ArgumentException("Property is required for class Healthcheck.", nameof(licenseValidUntil)); - - if (!scenarios.IsSet) - throw new ArgumentException("Property is required for class Healthcheck.", nameof(scenarios)); - - if (!varVersion.IsSet) - throw new ArgumentException("Property is required for class Healthcheck.", nameof(varVersion)); - - if (app.IsSet && app.Value == null) - throw new ArgumentNullException(nameof(app), "Property is not nullable for class Healthcheck."); - - if (metadata.IsSet && metadata.Value == null) - throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class Healthcheck."); - - if (documentsDatabase.IsSet && documentsDatabase.Value == null) - throw new ArgumentNullException(nameof(documentsDatabase), "Property is not nullable for class Healthcheck."); - - return new Healthcheck(app.Value!, licenseId.Value!, licenseType.Value!, licenseSerial.Value!, licenseValidUntil.Value!, scenarios.Value!, varVersion.Value!, metadata, documentsDatabase); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Healthcheck healthcheck, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, healthcheck, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, Healthcheck healthcheck, JsonSerializerOptions jsonSerializerOptions) - { - if (healthcheck.App == null) - throw new ArgumentNullException(nameof(healthcheck.App), "Property is required for class Healthcheck."); - - if (healthcheck.MetadataOption.IsSet && healthcheck.Metadata == null) - throw new ArgumentNullException(nameof(healthcheck.Metadata), "Property is required for class Healthcheck."); - - if (healthcheck.DocumentsDatabaseOption.IsSet && healthcheck.DocumentsDatabase == null) - throw new ArgumentNullException(nameof(healthcheck.DocumentsDatabase), "Property is required for class Healthcheck."); - - writer.WriteString("app", healthcheck.App); - - if (healthcheck.LicenseId != null) - writer.WriteString("licenseId", healthcheck.LicenseId); - else - writer.WriteNull("licenseId"); - - if (healthcheck.LicenseType != null) - writer.WriteString("licenseType", healthcheck.LicenseType); - else - writer.WriteNull("licenseType"); - - if (healthcheck.LicenseSerial != null) - writer.WriteString("licenseSerial", healthcheck.LicenseSerial); - else - writer.WriteNull("licenseSerial"); - - if (healthcheck.LicenseValidUntil != null) - writer.WriteString("licenseValidUntil", healthcheck.LicenseValidUntil.Value.ToString(LicenseValidUntilFormat)); - else - writer.WriteNull("licenseValidUntil"); - - if (healthcheck.Scenarios != null) - { - writer.WritePropertyName("scenarios"); - JsonSerializer.Serialize(writer, healthcheck.Scenarios, jsonSerializerOptions); - } - else - writer.WriteNull("scenarios"); - if (healthcheck.VarVersion != null) - writer.WriteString("version", healthcheck.VarVersion); - else - writer.WriteNull("version"); - - if (healthcheck.MetadataOption.IsSet) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, healthcheck.Metadata, jsonSerializerOptions); - } - if (healthcheck.DocumentsDatabaseOption.IsSet) - { - writer.WritePropertyName("documentsDatabase"); - JsonSerializer.Serialize(writer, healthcheck.DocumentsDatabase, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs index 2a022ef..015c055 100644 --- a/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/HealthcheckDocumentsDatabase.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,66 +14,91 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Database information. /// + [DataContract(Name = "Healthcheck_documentsDatabase")] public partial class HealthcheckDocumentsDatabase : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Database identifier. - /// Database version. - /// Date of database creation. - /// Description of the database contents, such as the list of supported countries and documents. - [JsonConstructor] - public HealthcheckDocumentsDatabase(string? id = default, string? varVersion = default, string? exportDate = default, string? description = default) + [JsonConstructorAttribute] + protected HealthcheckDocumentsDatabase() { } + /// + /// Initializes a new instance of the class. + /// + /// Database identifier. (required). + /// Database version. (required). + /// Date of database creation. (required). + /// Description of the database contents, such as the list of supported countries and documents. (required). + public HealthcheckDocumentsDatabase(string id = default(string), string varVersion = default(string), string exportDate = default(string), string description = default(string)) { - Id = id; - VarVersion = varVersion; - ExportDate = exportDate; - Description = description; - OnCreated(); + // to ensure "id" is required (not null) + if (id == null) + { + throw new ArgumentNullException("id is a required property for HealthcheckDocumentsDatabase and cannot be null"); + } + this.Id = id; + // to ensure "varVersion" is required (not null) + if (varVersion == null) + { + throw new ArgumentNullException("varVersion is a required property for HealthcheckDocumentsDatabase and cannot be null"); + } + this.VarVersion = varVersion; + // to ensure "exportDate" is required (not null) + if (exportDate == null) + { + throw new ArgumentNullException("exportDate is a required property for HealthcheckDocumentsDatabase and cannot be null"); + } + this.ExportDate = exportDate; + // to ensure "description" is required (not null) + if (description == null) + { + throw new ArgumentNullException("description is a required property for HealthcheckDocumentsDatabase and cannot be null"); + } + this.Description = description; } - partial void OnCreated(); - /// /// Database identifier. /// /// Database identifier. - [JsonPropertyName("id")] - public string? Id { get; set; } + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public string Id { get; set; } /// /// Database version. /// /// Database version. - [JsonPropertyName("version")] - public string? VarVersion { get; set; } + [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] + public string VarVersion { get; set; } /// /// Date of database creation. /// /// Date of database creation. - [JsonPropertyName("exportDate")] - public string? ExportDate { get; set; } + [DataMember(Name = "exportDate", IsRequired = true, EmitDefaultValue = true)] + public string ExportDate { get; set; } /// /// Description of the database contents, such as the list of supported countries and documents. /// /// Description of the database contents, such as the list of supported countries and documents. - [JsonPropertyName("description")] - public string? Description { get; set; } + [DataMember(Name = "description", IsRequired = true, EmitDefaultValue = true)] + public string Description { get; set; } /// /// Returns the string presentation of the object @@ -93,6 +116,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -104,124 +136,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class HealthcheckDocumentsDatabaseJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override HealthcheckDocumentsDatabase Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option id = default; - Option varVersion = default; - Option exportDate = default; - Option description = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "id": - id = new Option(utf8JsonReader.GetString()); - break; - case "version": - varVersion = new Option(utf8JsonReader.GetString()); - break; - case "exportDate": - exportDate = new Option(utf8JsonReader.GetString()); - break; - case "description": - description = new Option(utf8JsonReader.GetString()); - break; - default: - break; - } - } - } - - if (!id.IsSet) - throw new ArgumentException("Property is required for class HealthcheckDocumentsDatabase.", nameof(id)); - - if (!varVersion.IsSet) - throw new ArgumentException("Property is required for class HealthcheckDocumentsDatabase.", nameof(varVersion)); - - if (!exportDate.IsSet) - throw new ArgumentException("Property is required for class HealthcheckDocumentsDatabase.", nameof(exportDate)); - - if (!description.IsSet) - throw new ArgumentException("Property is required for class HealthcheckDocumentsDatabase.", nameof(description)); - - return new HealthcheckDocumentsDatabase(id.Value!, varVersion.Value!, exportDate.Value!, description.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, HealthcheckDocumentsDatabase healthcheckDocumentsDatabase, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, healthcheckDocumentsDatabase, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, HealthcheckDocumentsDatabase healthcheckDocumentsDatabase, JsonSerializerOptions jsonSerializerOptions) - { - if (healthcheckDocumentsDatabase.Id != null) - writer.WriteString("id", healthcheckDocumentsDatabase.Id); - else - writer.WriteNull("id"); - - if (healthcheckDocumentsDatabase.VarVersion != null) - writer.WriteString("version", healthcheckDocumentsDatabase.VarVersion); - else - writer.WriteNull("version"); - - if (healthcheckDocumentsDatabase.ExportDate != null) - writer.WriteString("exportDate", healthcheckDocumentsDatabase.ExportDate); - else - writer.WriteNull("exportDate"); - - if (healthcheckDocumentsDatabase.Description != null) - writer.WriteString("description", healthcheckDocumentsDatabase.Description); - else - writer.WriteNull("description"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs index b96d4a9..4fa8c47 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,92 +14,93 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// IdentItem /// + [DataContract(Name = "IdentItem")] public partial class IdentItem : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// elementType - /// lightIndex - /// image - /// etalonImage - /// area - /// areaList - [JsonConstructor] - public IdentItem(SecurityFeatureType elementType, Light lightIndex, ImageData image, ImageData etalonImage, Option area = default, Option areaList = default) - { - ElementType = elementType; - LightIndex = lightIndex; - Image = image; - EtalonImage = etalonImage; - AreaOption = area; - AreaListOption = areaList; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets ElementType /// - [JsonPropertyName("ElementType")] + [DataMember(Name = "ElementType", IsRequired = true, EmitDefaultValue = true)] public SecurityFeatureType ElementType { get; set; } /// /// Gets or Sets LightIndex /// - [JsonPropertyName("LightIndex")] + [DataMember(Name = "LightIndex", IsRequired = true, EmitDefaultValue = true)] public Light LightIndex { get; set; } - /// - /// Gets or Sets Image + /// Initializes a new instance of the class. /// - [JsonPropertyName("Image")] - public ImageData Image { get; set; } - + [JsonConstructorAttribute] + protected IdentItem() { } /// - /// Gets or Sets EtalonImage + /// Initializes a new instance of the class. /// - [JsonPropertyName("EtalonImage")] - public ImageData EtalonImage { get; set; } + /// elementType (required). + /// lightIndex (required). + /// area. + /// image (required). + /// etalonImage (required). + /// areaList. + public IdentItem(SecurityFeatureType elementType = default(SecurityFeatureType), Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData image = default(ImageData), ImageData etalonImage = default(ImageData), AreaContainer areaList = default(AreaContainer)) + { + this.ElementType = elementType; + this.LightIndex = lightIndex; + // to ensure "image" is required (not null) + if (image == null) + { + throw new ArgumentNullException("image is a required property for IdentItem and cannot be null"); + } + this.Image = image; + // to ensure "etalonImage" is required (not null) + if (etalonImage == null) + { + throw new ArgumentNullException("etalonImage is a required property for IdentItem and cannot be null"); + } + this.EtalonImage = etalonImage; + this.Area = area; + this.AreaList = areaList; + } /// - /// Used to track the state of Area + /// Gets or Sets Area /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AreaOption { get; private set; } + [DataMember(Name = "Area", EmitDefaultValue = false)] + public RectangleCoordinates Area { get; set; } /// - /// Gets or Sets Area + /// Gets or Sets Image /// - [JsonPropertyName("Area")] - public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new(value); } } + [DataMember(Name = "Image", IsRequired = true, EmitDefaultValue = true)] + public ImageData Image { get; set; } /// - /// Used to track the state of AreaList + /// Gets or Sets EtalonImage /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AreaListOption { get; private set; } + [DataMember(Name = "EtalonImage", IsRequired = true, EmitDefaultValue = true)] + public ImageData EtalonImage { get; set; } /// /// Gets or Sets AreaList /// - [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + [DataMember(Name = "AreaList", EmitDefaultValue = false)] + public AreaContainer AreaList { get; set; } /// /// Returns the string presentation of the object @@ -113,14 +112,23 @@ public override string ToString() sb.Append("class IdentItem {\n"); sb.Append(" ElementType: ").Append(ElementType).Append("\n"); sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); + sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" Image: ").Append(Image).Append("\n"); sb.Append(" EtalonImage: ").Append(EtalonImage).Append("\n"); - sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" AreaList: ").Append(AreaList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -132,171 +140,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class IdentItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override IdentItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option elementType = default; - Option lightIndex = default; - Option image = default; - Option etalonImage = default; - Option area = default; - Option areaList = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ElementType": - string? elementTypeRawValue = utf8JsonReader.GetString(); - if (elementTypeRawValue != null) - elementType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(elementTypeRawValue)); - break; - case "LightIndex": - string? lightIndexRawValue = utf8JsonReader.GetString(); - if (lightIndexRawValue != null) - lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); - break; - case "Image": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "EtalonImage": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Area": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - area = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "AreaList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - areaList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!elementType.IsSet) - throw new ArgumentException("Property is required for class IdentItem.", nameof(elementType)); - - if (!lightIndex.IsSet) - throw new ArgumentException("Property is required for class IdentItem.", nameof(lightIndex)); - - if (!image.IsSet) - throw new ArgumentException("Property is required for class IdentItem.", nameof(image)); - - if (!etalonImage.IsSet) - throw new ArgumentException("Property is required for class IdentItem.", nameof(etalonImage)); - - if (elementType.IsSet && elementType.Value == null) - throw new ArgumentNullException(nameof(elementType), "Property is not nullable for class IdentItem."); - - if (lightIndex.IsSet && lightIndex.Value == null) - throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class IdentItem."); - - if (image.IsSet && image.Value == null) - throw new ArgumentNullException(nameof(image), "Property is not nullable for class IdentItem."); - - if (etalonImage.IsSet && etalonImage.Value == null) - throw new ArgumentNullException(nameof(etalonImage), "Property is not nullable for class IdentItem."); - - if (area.IsSet && area.Value == null) - throw new ArgumentNullException(nameof(area), "Property is not nullable for class IdentItem."); - - if (areaList.IsSet && areaList.Value == null) - throw new ArgumentNullException(nameof(areaList), "Property is not nullable for class IdentItem."); - - return new IdentItem(elementType.Value!.Value!, lightIndex.Value!.Value!, image.Value!, etalonImage.Value!, area, areaList); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, IdentItem identItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, identItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, IdentItem identItem, JsonSerializerOptions jsonSerializerOptions) - { - if (identItem.Image == null) - throw new ArgumentNullException(nameof(identItem.Image), "Property is required for class IdentItem."); - - if (identItem.EtalonImage == null) - throw new ArgumentNullException(nameof(identItem.EtalonImage), "Property is required for class IdentItem."); - - if (identItem.AreaOption.IsSet && identItem.Area == null) - throw new ArgumentNullException(nameof(identItem.Area), "Property is required for class IdentItem."); - - if (identItem.AreaListOption.IsSet && identItem.AreaList == null) - throw new ArgumentNullException(nameof(identItem.AreaList), "Property is required for class IdentItem."); - - var elementTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(identItem.ElementType); - writer.WriteNumber("ElementType", elementTypeRawValue); - - var lightIndexRawValue = LightValueConverter.ToJsonValue(identItem.LightIndex); - writer.WriteNumber("LightIndex", lightIndexRawValue); - - writer.WritePropertyName("Image"); - JsonSerializer.Serialize(writer, identItem.Image, jsonSerializerOptions); - writer.WritePropertyName("EtalonImage"); - JsonSerializer.Serialize(writer, identItem.EtalonImage, jsonSerializerOptions); - if (identItem.AreaOption.IsSet) - { - writer.WritePropertyName("Area"); - JsonSerializer.Serialize(writer, identItem.Area, jsonSerializerOptions); - } - if (identItem.AreaListOption.IsSet) - { - writer.WritePropertyName("AreaList"); - JsonSerializer.Serialize(writer, identItem.AreaList, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs index 4e481ed..d83fa76 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,95 +14,98 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// IdentResult /// + [DataContract(Name = "IdentResult")] public partial class IdentResult : AuthenticityCheckResultItem, IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// elementType - /// lightIndex - /// image - /// etalonImage - /// elementResult - /// elementDiagnose - /// percentValue - /// area - /// areaList - [JsonConstructor] - public IdentResult(SecurityFeatureType elementType, Light lightIndex, ImageData image, ImageData etalonImage, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option area = default, Option areaList = default) : base(elementResult, elementDiagnose, percentValue) - { - ElementType = elementType; - LightIndex = lightIndex; - Image = image; - EtalonImage = etalonImage; - AreaOption = area; - AreaListOption = areaList; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets ElementType /// - [JsonPropertyName("ElementType")] + [DataMember(Name = "ElementType", IsRequired = true, EmitDefaultValue = true)] public SecurityFeatureType ElementType { get; set; } /// /// Gets or Sets LightIndex /// - [JsonPropertyName("LightIndex")] + [DataMember(Name = "LightIndex", IsRequired = true, EmitDefaultValue = true)] public Light LightIndex { get; set; } - /// - /// Gets or Sets Image + /// Initializes a new instance of the class. /// - [JsonPropertyName("Image")] - public ImageData Image { get; set; } - + [JsonConstructorAttribute] + protected IdentResult() { } /// - /// Gets or Sets EtalonImage + /// Initializes a new instance of the class. /// - [JsonPropertyName("EtalonImage")] - public ImageData EtalonImage { get; set; } + /// elementType (required). + /// lightIndex (required). + /// area. + /// image (required). + /// etalonImage (required). + /// areaList. + /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// elementResult. + /// elementDiagnose. + /// percentValue. + public IdentResult(SecurityFeatureType elementType = default(SecurityFeatureType), Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData image = default(ImageData), ImageData etalonImage = default(ImageData), AreaContainer areaList = default(AreaContainer), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + { + this.ElementType = elementType; + this.LightIndex = lightIndex; + // to ensure "image" is required (not null) + if (image == null) + { + throw new ArgumentNullException("image is a required property for IdentResult and cannot be null"); + } + this.Image = image; + // to ensure "etalonImage" is required (not null) + if (etalonImage == null) + { + throw new ArgumentNullException("etalonImage is a required property for IdentResult and cannot be null"); + } + this.EtalonImage = etalonImage; + this.Area = area; + this.AreaList = areaList; + } /// - /// Used to track the state of Area + /// Gets or Sets Area /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AreaOption { get; private set; } + [DataMember(Name = "Area", EmitDefaultValue = false)] + public RectangleCoordinates Area { get; set; } /// - /// Gets or Sets Area + /// Gets or Sets Image /// - [JsonPropertyName("Area")] - public RectangleCoordinates? Area { get { return this.AreaOption; } set { this.AreaOption = new(value); } } + [DataMember(Name = "Image", IsRequired = true, EmitDefaultValue = true)] + public ImageData Image { get; set; } /// - /// Used to track the state of AreaList + /// Gets or Sets EtalonImage /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AreaListOption { get; private set; } + [DataMember(Name = "EtalonImage", IsRequired = true, EmitDefaultValue = true)] + public ImageData EtalonImage { get; set; } /// /// Gets or Sets AreaList /// - [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + [DataMember(Name = "AreaList", EmitDefaultValue = false)] + public AreaContainer AreaList { get; set; } /// /// Returns the string presentation of the object @@ -114,235 +115,49 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class IdentResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" ElementType: ").Append(ElementType).Append("\n"); sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); + sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" Image: ").Append(Image).Append("\n"); sb.Append(" EtalonImage: ").Append(EtalonImage).Append("\n"); - sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" AreaList: ").Append(AreaList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class IdentResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override IdentResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option elementType = default; - Option lightIndex = default; - Option image = default; - Option etalonImage = default; - Option type = default; - Option elementResult = default; - Option elementDiagnose = default; - Option percentValue = default; - Option area = default; - Option areaList = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ElementType": - string? elementTypeRawValue = utf8JsonReader.GetString(); - if (elementTypeRawValue != null) - elementType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(elementTypeRawValue)); - break; - case "LightIndex": - string? lightIndexRawValue = utf8JsonReader.GetString(); - if (lightIndexRawValue != null) - lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); - break; - case "Image": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "EtalonImage": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - case "ElementResult": - string? elementResultRawValue = utf8JsonReader.GetString(); - if (elementResultRawValue != null) - elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); - break; - case "ElementDiagnose": - string? elementDiagnoseRawValue = utf8JsonReader.GetString(); - if (elementDiagnoseRawValue != null) - elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); - break; - case "PercentValue": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - percentValue = new Option(utf8JsonReader.GetInt32()); - break; - case "Area": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - area = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "AreaList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - areaList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!elementType.IsSet) - throw new ArgumentException("Property is required for class IdentResult.", nameof(elementType)); - - if (!lightIndex.IsSet) - throw new ArgumentException("Property is required for class IdentResult.", nameof(lightIndex)); - - if (!image.IsSet) - throw new ArgumentException("Property is required for class IdentResult.", nameof(image)); - - if (!etalonImage.IsSet) - throw new ArgumentException("Property is required for class IdentResult.", nameof(etalonImage)); - - if (!type.IsSet) - throw new ArgumentException("Property is required for class IdentResult.", nameof(type)); - - if (elementType.IsSet && elementType.Value == null) - throw new ArgumentNullException(nameof(elementType), "Property is not nullable for class IdentResult."); - - if (lightIndex.IsSet && lightIndex.Value == null) - throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class IdentResult."); - - if (image.IsSet && image.Value == null) - throw new ArgumentNullException(nameof(image), "Property is not nullable for class IdentResult."); - - if (etalonImage.IsSet && etalonImage.Value == null) - throw new ArgumentNullException(nameof(etalonImage), "Property is not nullable for class IdentResult."); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class IdentResult."); - - if (elementResult.IsSet && elementResult.Value == null) - throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class IdentResult."); - - if (elementDiagnose.IsSet && elementDiagnose.Value == null) - throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class IdentResult."); - - if (percentValue.IsSet && percentValue.Value == null) - throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class IdentResult."); - - if (area.IsSet && area.Value == null) - throw new ArgumentNullException(nameof(area), "Property is not nullable for class IdentResult."); - - if (areaList.IsSet && areaList.Value == null) - throw new ArgumentNullException(nameof(areaList), "Property is not nullable for class IdentResult."); - - return new IdentResult(elementType.Value!.Value!, lightIndex.Value!.Value!, image.Value!, etalonImage.Value!, elementResult, elementDiagnose, percentValue, area, areaList); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, IdentResult identResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, identResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, IdentResult identResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (identResult.Image == null) - throw new ArgumentNullException(nameof(identResult.Image), "Property is required for class IdentResult."); - - if (identResult.EtalonImage == null) - throw new ArgumentNullException(nameof(identResult.EtalonImage), "Property is required for class IdentResult."); - - if (identResult.AreaOption.IsSet && identResult.Area == null) - throw new ArgumentNullException(nameof(identResult.Area), "Property is required for class IdentResult."); - - if (identResult.AreaListOption.IsSet && identResult.AreaList == null) - throw new ArgumentNullException(nameof(identResult.AreaList), "Property is required for class IdentResult."); - - var elementTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(identResult.ElementType); - writer.WriteNumber("ElementType", elementTypeRawValue); - - var lightIndexRawValue = LightValueConverter.ToJsonValue(identResult.LightIndex); - writer.WriteNumber("LightIndex", lightIndexRawValue); - - writer.WritePropertyName("Image"); - JsonSerializer.Serialize(writer, identResult.Image, jsonSerializerOptions); - writer.WritePropertyName("EtalonImage"); - JsonSerializer.Serialize(writer, identResult.EtalonImage, jsonSerializerOptions); - writer.WriteNumber("Type", identResult.Type); - - if (identResult.ElementResultOption.IsSet) - { - var elementResultRawValue = CheckResultValueConverter.ToJsonValue(identResult.ElementResult!.Value); - writer.WriteNumber("ElementResult", elementResultRawValue); - } - if (identResult.ElementDiagnoseOption.IsSet) + foreach (var x in base.BaseValidate(validationContext)) { - var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(identResult.ElementDiagnose!.Value); - writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); - } - if (identResult.PercentValueOption.IsSet) - writer.WriteNumber("PercentValue", identResult.PercentValueOption.Value!.Value); - - if (identResult.AreaOption.IsSet) - { - writer.WritePropertyName("Area"); - JsonSerializer.Serialize(writer, identResult.Area, jsonSerializerOptions); - } - if (identResult.AreaListOption.IsSet) - { - writer.WritePropertyName("AreaList"); - JsonSerializer.Serialize(writer, identResult.AreaList, jsonSerializerOptions); + yield return x; } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs index 905a2af..7d409b9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,56 +14,61 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageData /// + [DataContract(Name = "ImageData")] public partial class ImageData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Base64 encoded image - /// Image format - [JsonConstructor] - public ImageData(string image, Option format = default) + [JsonConstructorAttribute] + protected ImageData() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded image (required). + /// Image format. + public ImageData(string image = default(string), string format = default(string)) { - Image = image; - FormatOption = format; - OnCreated(); + // to ensure "image" is required (not null) + if (image == null) + { + throw new ArgumentNullException("image is a required property for ImageData and cannot be null"); + } + this.Image = image; + this.Format = format; } - partial void OnCreated(); - /// /// Base64 encoded image /// /// Base64 encoded image - /* Base64 encoded image */ - [JsonPropertyName("image")] + /* + Base64 encoded image + */ + [DataMember(Name = "image", IsRequired = true, EmitDefaultValue = true)] public string Image { get; set; } - /// - /// Used to track the state of Format - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FormatOption { get; private set; } - /// /// Image format /// /// Image format - [JsonPropertyName("format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } + [DataMember(Name = "format", EmitDefaultValue = false)] + public string Format { get; set; } /// /// Returns the string presentation of the object @@ -81,6 +84,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -92,104 +104,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImageDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImageData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option image = default; - Option format = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "image": - image = new Option(utf8JsonReader.GetString()!); - break; - case "format": - format = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!image.IsSet) - throw new ArgumentException("Property is required for class ImageData.", nameof(image)); - - if (image.IsSet && image.Value == null) - throw new ArgumentNullException(nameof(image), "Property is not nullable for class ImageData."); - - if (format.IsSet && format.Value == null) - throw new ArgumentNullException(nameof(format), "Property is not nullable for class ImageData."); - - return new ImageData(image.Value!, format); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageData imageData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imageData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImageData imageData, JsonSerializerOptions jsonSerializerOptions) - { - if (imageData.Image == null) - throw new ArgumentNullException(nameof(imageData.Image), "Property is required for class ImageData."); - - if (imageData.FormatOption.IsSet && imageData.Format == null) - throw new ArgumentNullException(nameof(imageData.Format), "Property is required for class ImageData."); - - writer.WriteString("image", imageData.Image); - - if (imageData.FormatOption.IsSet) - writer.WriteString("format", imageData.Format); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs index 63af573..b511822 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,174 +14,111 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQA /// + [DataContract(Name = "ImageQA")] public partial class ImageQA : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Set the threshold for an actual document brightness below which the check fails - /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. - /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. - /// This option enables focus check while performing image quality validation. - /// This option enables glares check while performing image quality validation. - /// This option enables colorness check while performing image quality validation. - /// This option enables screen capture (moire patterns) check while performing image quality validation. - /// This parameter specifies the necessary margin. Default 0. - /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. - [JsonConstructor] - public ImageQA(Option brightnessThreshold = default, Option dpiThreshold = default, Option angleThreshold = default, Option focusCheck = default, Option glaresCheck = default, Option colornessCheck = default, Option moireCheck = default, Option documentPositionIndent = default, Option?> expectedPass = default) + /// Set the threshold for an actual document brightness below which the check fails. + /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail.. + /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail.. + /// This option enables focus check while performing image quality validation.. + /// This option enables glares check while performing image quality validation.. + /// This option enables colorness check while performing image quality validation.. + /// This option enables screen capture (moire patterns) check while performing image quality validation.. + /// This parameter specifies the necessary margin. Default 0.. + /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process.. + public ImageQA(double brightnessThreshold = default(double), int dpiThreshold = default(int), int angleThreshold = default(int), bool focusCheck = default(bool), bool glaresCheck = default(bool), bool colornessCheck = default(bool), bool moireCheck = default(bool), int documentPositionIndent = default(int), List expectedPass = default(List)) { - BrightnessThresholdOption = brightnessThreshold; - DpiThresholdOption = dpiThreshold; - AngleThresholdOption = angleThreshold; - FocusCheckOption = focusCheck; - GlaresCheckOption = glaresCheck; - ColornessCheckOption = colornessCheck; - MoireCheckOption = moireCheck; - DocumentPositionIndentOption = documentPositionIndent; - ExpectedPassOption = expectedPass; - OnCreated(); + this.BrightnessThreshold = brightnessThreshold; + this.DpiThreshold = dpiThreshold; + this.AngleThreshold = angleThreshold; + this.FocusCheck = focusCheck; + this.GlaresCheck = glaresCheck; + this.ColornessCheck = colornessCheck; + this.MoireCheck = moireCheck; + this.DocumentPositionIndent = documentPositionIndent; + this.ExpectedPass = expectedPass; } - partial void OnCreated(); - - /// - /// Used to track the state of BrightnessThreshold - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BrightnessThresholdOption { get; private set; } - /// /// Set the threshold for an actual document brightness below which the check fails /// /// Set the threshold for an actual document brightness below which the check fails - [JsonPropertyName("brightnessThreshold")] - public double? BrightnessThreshold { get { return this.BrightnessThresholdOption; } set { this.BrightnessThresholdOption = new(value); } } - - /// - /// Used to track the state of DpiThreshold - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DpiThresholdOption { get; private set; } + [DataMember(Name = "brightnessThreshold", EmitDefaultValue = false)] + public double BrightnessThreshold { get; set; } /// /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. /// /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. - [JsonPropertyName("dpiThreshold")] - public int? DpiThreshold { get { return this.DpiThresholdOption; } set { this.DpiThresholdOption = new(value); } } - - /// - /// Used to track the state of AngleThreshold - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AngleThresholdOption { get; private set; } + [DataMember(Name = "dpiThreshold", EmitDefaultValue = false)] + public int DpiThreshold { get; set; } /// /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. /// /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. - [JsonPropertyName("angleThreshold")] - public int? AngleThreshold { get { return this.AngleThresholdOption; } set { this.AngleThresholdOption = new(value); } } - - /// - /// Used to track the state of FocusCheck - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FocusCheckOption { get; private set; } + [DataMember(Name = "angleThreshold", EmitDefaultValue = false)] + public int AngleThreshold { get; set; } /// /// This option enables focus check while performing image quality validation. /// /// This option enables focus check while performing image quality validation. - [JsonPropertyName("focusCheck")] - public bool? FocusCheck { get { return this.FocusCheckOption; } set { this.FocusCheckOption = new(value); } } - - /// - /// Used to track the state of GlaresCheck - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option GlaresCheckOption { get; private set; } + [DataMember(Name = "focusCheck", EmitDefaultValue = true)] + public bool FocusCheck { get; set; } /// /// This option enables glares check while performing image quality validation. /// /// This option enables glares check while performing image quality validation. - [JsonPropertyName("glaresCheck")] - public bool? GlaresCheck { get { return this.GlaresCheckOption; } set { this.GlaresCheckOption = new(value); } } - - /// - /// Used to track the state of ColornessCheck - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ColornessCheckOption { get; private set; } + [DataMember(Name = "glaresCheck", EmitDefaultValue = true)] + public bool GlaresCheck { get; set; } /// /// This option enables colorness check while performing image quality validation. /// /// This option enables colorness check while performing image quality validation. - [JsonPropertyName("colornessCheck")] - public bool? ColornessCheck { get { return this.ColornessCheckOption; } set { this.ColornessCheckOption = new(value); } } - - /// - /// Used to track the state of MoireCheck - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option MoireCheckOption { get; private set; } + [DataMember(Name = "colornessCheck", EmitDefaultValue = true)] + public bool ColornessCheck { get; set; } /// /// This option enables screen capture (moire patterns) check while performing image quality validation. /// /// This option enables screen capture (moire patterns) check while performing image quality validation. - [JsonPropertyName("moireCheck")] - public bool? MoireCheck { get { return this.MoireCheckOption; } set { this.MoireCheckOption = new(value); } } - - /// - /// Used to track the state of DocumentPositionIndent - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DocumentPositionIndentOption { get; private set; } + [DataMember(Name = "moireCheck", EmitDefaultValue = true)] + public bool MoireCheck { get; set; } /// /// This parameter specifies the necessary margin. Default 0. /// /// This parameter specifies the necessary margin. Default 0. - [JsonPropertyName("documentPositionIndent")] - public int? DocumentPositionIndent { get { return this.DocumentPositionIndentOption; } set { this.DocumentPositionIndentOption = new(value); } } - - /// - /// Used to track the state of ExpectedPass - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ExpectedPassOption { get; private set; } + [DataMember(Name = "documentPositionIndent", EmitDefaultValue = false)] + public int DocumentPositionIndent { get; set; } /// /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. /// /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. - [JsonPropertyName("expectedPass")] - public List? ExpectedPass { get { return this.ExpectedPassOption; } set { this.ExpectedPassOption = new(value); } } + [DataMember(Name = "expectedPass", EmitDefaultValue = false)] + public List ExpectedPass { get; set; } /// /// Returns the string presentation of the object @@ -206,6 +141,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -217,181 +161,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImageQAJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImageQA Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option brightnessThreshold = default; - Option dpiThreshold = default; - Option angleThreshold = default; - Option focusCheck = default; - Option glaresCheck = default; - Option colornessCheck = default; - Option moireCheck = default; - Option documentPositionIndent = default; - Option?> expectedPass = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "brightnessThreshold": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - brightnessThreshold = new Option(utf8JsonReader.GetDouble()); - break; - case "dpiThreshold": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - dpiThreshold = new Option(utf8JsonReader.GetInt32()); - break; - case "angleThreshold": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - angleThreshold = new Option(utf8JsonReader.GetInt32()); - break; - case "focusCheck": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - focusCheck = new Option(utf8JsonReader.GetBoolean()); - break; - case "glaresCheck": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - glaresCheck = new Option(utf8JsonReader.GetBoolean()); - break; - case "colornessCheck": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - colornessCheck = new Option(utf8JsonReader.GetBoolean()); - break; - case "moireCheck": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - moireCheck = new Option(utf8JsonReader.GetBoolean()); - break; - case "documentPositionIndent": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - documentPositionIndent = new Option(utf8JsonReader.GetInt32()); - break; - case "expectedPass": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - expectedPass = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (brightnessThreshold.IsSet && brightnessThreshold.Value == null) - throw new ArgumentNullException(nameof(brightnessThreshold), "Property is not nullable for class ImageQA."); - - if (dpiThreshold.IsSet && dpiThreshold.Value == null) - throw new ArgumentNullException(nameof(dpiThreshold), "Property is not nullable for class ImageQA."); - - if (angleThreshold.IsSet && angleThreshold.Value == null) - throw new ArgumentNullException(nameof(angleThreshold), "Property is not nullable for class ImageQA."); - - if (focusCheck.IsSet && focusCheck.Value == null) - throw new ArgumentNullException(nameof(focusCheck), "Property is not nullable for class ImageQA."); - - if (glaresCheck.IsSet && glaresCheck.Value == null) - throw new ArgumentNullException(nameof(glaresCheck), "Property is not nullable for class ImageQA."); - - if (colornessCheck.IsSet && colornessCheck.Value == null) - throw new ArgumentNullException(nameof(colornessCheck), "Property is not nullable for class ImageQA."); - - if (moireCheck.IsSet && moireCheck.Value == null) - throw new ArgumentNullException(nameof(moireCheck), "Property is not nullable for class ImageQA."); - - if (documentPositionIndent.IsSet && documentPositionIndent.Value == null) - throw new ArgumentNullException(nameof(documentPositionIndent), "Property is not nullable for class ImageQA."); - - if (expectedPass.IsSet && expectedPass.Value == null) - throw new ArgumentNullException(nameof(expectedPass), "Property is not nullable for class ImageQA."); - - return new ImageQA(brightnessThreshold, dpiThreshold, angleThreshold, focusCheck, glaresCheck, colornessCheck, moireCheck, documentPositionIndent, expectedPass); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageQA imageQA, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imageQA, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImageQA imageQA, JsonSerializerOptions jsonSerializerOptions) - { - if (imageQA.ExpectedPassOption.IsSet && imageQA.ExpectedPass == null) - throw new ArgumentNullException(nameof(imageQA.ExpectedPass), "Property is required for class ImageQA."); - - if (imageQA.BrightnessThresholdOption.IsSet) - writer.WriteNumber("brightnessThreshold", imageQA.BrightnessThresholdOption.Value!.Value); - - if (imageQA.DpiThresholdOption.IsSet) - writer.WriteNumber("dpiThreshold", imageQA.DpiThresholdOption.Value!.Value); - - if (imageQA.AngleThresholdOption.IsSet) - writer.WriteNumber("angleThreshold", imageQA.AngleThresholdOption.Value!.Value); - - if (imageQA.FocusCheckOption.IsSet) - writer.WriteBoolean("focusCheck", imageQA.FocusCheckOption.Value!.Value); - - if (imageQA.GlaresCheckOption.IsSet) - writer.WriteBoolean("glaresCheck", imageQA.GlaresCheckOption.Value!.Value); - - if (imageQA.ColornessCheckOption.IsSet) - writer.WriteBoolean("colornessCheck", imageQA.ColornessCheckOption.Value!.Value); - - if (imageQA.MoireCheckOption.IsSet) - writer.WriteBoolean("moireCheck", imageQA.MoireCheckOption.Value!.Value); - - if (imageQA.DocumentPositionIndentOption.IsSet) - writer.WriteNumber("documentPositionIndent", imageQA.DocumentPositionIndentOption.Value!.Value); - - if (imageQA.ExpectedPassOption.IsSet) - { - writer.WritePropertyName("expectedPass"); - JsonSerializer.Serialize(writer, imageQA.ExpectedPass, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs index 0afc0eb..7c334d6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,97 +14,95 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQualityCheck /// + [DataContract(Name = "ImageQualityCheck")] public partial class ImageQualityCheck : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// type - /// result - /// featureType - /// Check mean value - /// Check deviation value - /// Check probability value - /// areas - [JsonConstructor] - public ImageQualityCheck(ImageQualityCheckType type, CheckResult result, SecurityFeatureType featureType, float mean, float stdDev, int probability, Option areas = default) - { - Type = type; - Result = result; - FeatureType = featureType; - Mean = mean; - StdDev = stdDev; - Probability = probability; - AreasOption = areas; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Type /// - [JsonPropertyName("type")] + [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] public ImageQualityCheckType Type { get; set; } /// /// Gets or Sets Result /// - [JsonPropertyName("result")] + [DataMember(Name = "result", IsRequired = true, EmitDefaultValue = true)] public CheckResult Result { get; set; } /// /// Gets or Sets FeatureType /// - [JsonPropertyName("featureType")] + [DataMember(Name = "featureType", IsRequired = true, EmitDefaultValue = true)] public SecurityFeatureType FeatureType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ImageQualityCheck() { } + /// + /// Initializes a new instance of the class. + /// + /// type (required). + /// result (required). + /// featureType (required). + /// areas. + /// Check mean value (required). + /// Check deviation value (required). + /// Check probability value (required). + public ImageQualityCheck(ImageQualityCheckType type = default(ImageQualityCheckType), CheckResult result = default(CheckResult), SecurityFeatureType featureType = default(SecurityFeatureType), AreaArray areas = default(AreaArray), float mean = default(float), float stdDev = default(float), int probability = default(int)) + { + this.Type = type; + this.Result = result; + this.FeatureType = featureType; + this.Mean = mean; + this.StdDev = stdDev; + this.Probability = probability; + this.Areas = areas; + } + + /// + /// Gets or Sets Areas + /// + [DataMember(Name = "areas", EmitDefaultValue = false)] + public AreaArray Areas { get; set; } /// /// Check mean value /// /// Check mean value - [JsonPropertyName("mean")] + [DataMember(Name = "mean", IsRequired = true, EmitDefaultValue = true)] public float Mean { get; set; } /// /// Check deviation value /// /// Check deviation value - [JsonPropertyName("std_dev")] + [DataMember(Name = "std_dev", IsRequired = true, EmitDefaultValue = true)] public float StdDev { get; set; } /// /// Check probability value /// /// Check probability value - [JsonPropertyName("probability")] + [DataMember(Name = "probability", IsRequired = true, EmitDefaultValue = true)] public int Probability { get; set; } - /// - /// Used to track the state of Areas - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AreasOption { get; private set; } - - /// - /// Gets or Sets Areas - /// - [JsonPropertyName("areas")] - public AreaArray? Areas { get { return this.AreasOption; } set { this.AreasOption = new(value); } } - /// /// Returns the string presentation of the object /// @@ -118,14 +114,23 @@ public override string ToString() sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Result: ").Append(Result).Append("\n"); sb.Append(" FeatureType: ").Append(FeatureType).Append("\n"); + sb.Append(" Areas: ").Append(Areas).Append("\n"); sb.Append(" Mean: ").Append(Mean).Append("\n"); sb.Append(" StdDev: ").Append(StdDev).Append("\n"); sb.Append(" Probability: ").Append(Probability).Append("\n"); - sb.Append(" Areas: ").Append(Areas).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -137,177 +142,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImageQualityCheckJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImageQualityCheck Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option result = default; - Option featureType = default; - Option mean = default; - Option stdDev = default; - Option probability = default; - Option areas = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "type": - string? typeRawValue = utf8JsonReader.GetString(); - if (typeRawValue != null) - type = new Option(ImageQualityCheckTypeValueConverter.FromStringOrDefault(typeRawValue)); - break; - case "result": - string? resultRawValue = utf8JsonReader.GetString(); - if (resultRawValue != null) - result = new Option(CheckResultValueConverter.FromStringOrDefault(resultRawValue)); - break; - case "featureType": - string? featureTypeRawValue = utf8JsonReader.GetString(); - if (featureTypeRawValue != null) - featureType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(featureTypeRawValue)); - break; - case "mean": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mean = new Option((float)utf8JsonReader.GetDouble()); - break; - case "std_dev": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stdDev = new Option((float)utf8JsonReader.GetDouble()); - break; - case "probability": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - probability = new Option(utf8JsonReader.GetInt32()); - break; - case "areas": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - areas = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(type)); - - if (!result.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(result)); - - if (!featureType.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(featureType)); - - if (!mean.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(mean)); - - if (!stdDev.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(stdDev)); - - if (!probability.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheck.", nameof(probability)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class ImageQualityCheck."); - - if (result.IsSet && result.Value == null) - throw new ArgumentNullException(nameof(result), "Property is not nullable for class ImageQualityCheck."); - - if (featureType.IsSet && featureType.Value == null) - throw new ArgumentNullException(nameof(featureType), "Property is not nullable for class ImageQualityCheck."); - - if (mean.IsSet && mean.Value == null) - throw new ArgumentNullException(nameof(mean), "Property is not nullable for class ImageQualityCheck."); - - if (stdDev.IsSet && stdDev.Value == null) - throw new ArgumentNullException(nameof(stdDev), "Property is not nullable for class ImageQualityCheck."); - - if (probability.IsSet && probability.Value == null) - throw new ArgumentNullException(nameof(probability), "Property is not nullable for class ImageQualityCheck."); - - if (areas.IsSet && areas.Value == null) - throw new ArgumentNullException(nameof(areas), "Property is not nullable for class ImageQualityCheck."); - - return new ImageQualityCheck(type.Value!.Value!, result.Value!.Value!, featureType.Value!.Value!, mean.Value!.Value!, stdDev.Value!.Value!, probability.Value!.Value!, areas); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageQualityCheck imageQualityCheck, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imageQualityCheck, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImageQualityCheck imageQualityCheck, JsonSerializerOptions jsonSerializerOptions) - { - if (imageQualityCheck.AreasOption.IsSet && imageQualityCheck.Areas == null) - throw new ArgumentNullException(nameof(imageQualityCheck.Areas), "Property is required for class ImageQualityCheck."); - - var typeRawValue = ImageQualityCheckTypeValueConverter.ToJsonValue(imageQualityCheck.Type); - writer.WriteNumber("type", typeRawValue); - - var resultRawValue = CheckResultValueConverter.ToJsonValue(imageQualityCheck.Result); - writer.WriteNumber("result", resultRawValue); - - var featureTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(imageQualityCheck.FeatureType); - writer.WriteNumber("featureType", featureTypeRawValue); - - writer.WriteNumber("mean", imageQualityCheck.Mean); - - writer.WriteNumber("std_dev", imageQualityCheck.StdDev); - - writer.WriteNumber("probability", imageQualityCheck.Probability); - - if (imageQualityCheck.AreasOption.IsSet) - { - writer.WritePropertyName("areas"); - JsonSerializer.Serialize(writer, imageQualityCheck.Areas, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs index 19e8245..9999956 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckList.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,54 +14,64 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQualityCheckList /// + [DataContract(Name = "ImageQualityCheckList")] public partial class ImageQualityCheckList : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// result - /// list - /// Number of List array elements - [JsonConstructor] - public ImageQualityCheckList(CheckResult result, List list, decimal count) - { - Result = result; - List = list; - Count = count; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Result /// - [JsonPropertyName("result")] + [DataMember(Name = "result", IsRequired = true, EmitDefaultValue = true)] public CheckResult Result { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ImageQualityCheckList() { } + /// + /// Initializes a new instance of the class. + /// + /// result (required). + /// list (required). + /// Number of List array elements (required). + public ImageQualityCheckList(CheckResult result = default(CheckResult), List list = default(List), decimal count = default(decimal)) + { + this.Result = result; + // to ensure "list" is required (not null) + if (list == null) + { + throw new ArgumentNullException("list is a required property for ImageQualityCheckList and cannot be null"); + } + this.List = list; + this.Count = count; + } /// /// Gets or Sets List /// - [JsonPropertyName("List")] + [DataMember(Name = "List", IsRequired = true, EmitDefaultValue = true)] public List List { get; set; } /// /// Number of List array elements /// /// Number of List array elements - [JsonPropertyName("Count")] + [DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)] public decimal Count { get; set; } /// @@ -81,6 +89,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -92,120 +109,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImageQualityCheckListJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImageQualityCheckList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option result = default; - Option?> list = default; - Option count = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "result": - string? resultRawValue = utf8JsonReader.GetString(); - if (resultRawValue != null) - result = new Option(CheckResultValueConverter.FromStringOrDefault(resultRawValue)); - break; - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetDecimal()); - break; - default: - break; - } - } - } - - if (!result.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheckList.", nameof(result)); - - if (!list.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheckList.", nameof(list)); - - if (!count.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheckList.", nameof(count)); - - if (result.IsSet && result.Value == null) - throw new ArgumentNullException(nameof(result), "Property is not nullable for class ImageQualityCheckList."); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class ImageQualityCheckList."); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class ImageQualityCheckList."); - - return new ImageQualityCheckList(result.Value!.Value!, list.Value!, count.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageQualityCheckList imageQualityCheckList, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imageQualityCheckList, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImageQualityCheckList imageQualityCheckList, JsonSerializerOptions jsonSerializerOptions) - { - if (imageQualityCheckList.List == null) - throw new ArgumentNullException(nameof(imageQualityCheckList.List), "Property is required for class ImageQualityCheckList."); - - var resultRawValue = CheckResultValueConverter.ToJsonValue(imageQualityCheckList.Result); - writer.WriteNumber("result", resultRawValue); - - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, imageQualityCheckList.List, jsonSerializerOptions); - writer.WriteNumber("Count", imageQualityCheckList.Count); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs index 70a6398..ed04a3c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckListItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQualityCheckListItem /// + [DataContract(Name = "ImageQualityCheckListItem")] public partial class ImageQualityCheckListItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// imageQualityCheckList - [JsonConstructor] - public ImageQualityCheckListItem(ImageQualityCheckList imageQualityCheckList) + [JsonConstructorAttribute] + protected ImageQualityCheckListItem() { } + /// + /// Initializes a new instance of the class. + /// + /// imageQualityCheckList (required). + public ImageQualityCheckListItem(ImageQualityCheckList imageQualityCheckList = default(ImageQualityCheckList)) { - ImageQualityCheckList = imageQualityCheckList; - OnCreated(); + // to ensure "imageQualityCheckList" is required (not null) + if (imageQualityCheckList == null) + { + throw new ArgumentNullException("imageQualityCheckList is a required property for ImageQualityCheckListItem and cannot be null"); + } + this.ImageQualityCheckList = imageQualityCheckList; } - partial void OnCreated(); - /// /// Gets or Sets ImageQualityCheckList /// - [JsonPropertyName("ImageQualityCheckList")] + [DataMember(Name = "ImageQualityCheckList", IsRequired = true, EmitDefaultValue = true)] public ImageQualityCheckList ImageQualityCheckList { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImageQualityCheckListItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImageQualityCheckListItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option imageQualityCheckList = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ImageQualityCheckList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - imageQualityCheckList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!imageQualityCheckList.IsSet) - throw new ArgumentException("Property is required for class ImageQualityCheckListItem.", nameof(imageQualityCheckList)); - - if (imageQualityCheckList.IsSet && imageQualityCheckList.Value == null) - throw new ArgumentNullException(nameof(imageQualityCheckList), "Property is not nullable for class ImageQualityCheckListItem."); - - return new ImageQualityCheckListItem(imageQualityCheckList.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageQualityCheckListItem imageQualityCheckListItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imageQualityCheckListItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImageQualityCheckListItem imageQualityCheckListItem, JsonSerializerOptions jsonSerializerOptions) - { - if (imageQualityCheckListItem.ImageQualityCheckList == null) - throw new ArgumentNullException(nameof(imageQualityCheckListItem.ImageQualityCheckList), "Property is required for class ImageQualityCheckListItem."); - - writer.WritePropertyName("ImageQualityCheckList"); - JsonSerializer.Serialize(writer, imageQualityCheckListItem.ImageQualityCheckList, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs index d77a699..a6c1ddb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheckType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -77,171 +78,4 @@ public enum ImageQualityCheckType Occlusion = 10 } - /// - /// Converts to and from the JSON value - /// - public static class ImageQualityCheckTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static ImageQualityCheckType FromString(string value) - { - if (value.Equals((0).ToString())) - return ImageQualityCheckType.ImageGlares; - - if (value.Equals((1).ToString())) - return ImageQualityCheckType.ImageFocus; - - if (value.Equals((2).ToString())) - return ImageQualityCheckType.ImageResolution; - - if (value.Equals((3).ToString())) - return ImageQualityCheckType.ImageColorness; - - if (value.Equals((4).ToString())) - return ImageQualityCheckType.Perspective; - - if (value.Equals((5).ToString())) - return ImageQualityCheckType.Bounds; - - if (value.Equals((7).ToString())) - return ImageQualityCheckType.Portrait; - - if (value.Equals((9).ToString())) - return ImageQualityCheckType.Brightness; - - if (value.Equals((10).ToString())) - return ImageQualityCheckType.Occlusion; - - throw new NotImplementedException($"Could not convert value to type ImageQualityCheckType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static ImageQualityCheckType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return ImageQualityCheckType.ImageGlares; - - if (value.Equals((1).ToString())) - return ImageQualityCheckType.ImageFocus; - - if (value.Equals((2).ToString())) - return ImageQualityCheckType.ImageResolution; - - if (value.Equals((3).ToString())) - return ImageQualityCheckType.ImageColorness; - - if (value.Equals((4).ToString())) - return ImageQualityCheckType.Perspective; - - if (value.Equals((5).ToString())) - return ImageQualityCheckType.Bounds; - - if (value.Equals((7).ToString())) - return ImageQualityCheckType.Portrait; - - if (value.Equals((9).ToString())) - return ImageQualityCheckType.Brightness; - - if (value.Equals((10).ToString())) - return ImageQualityCheckType.Occlusion; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(ImageQualityCheckType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class ImageQualityCheckTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override ImageQualityCheckType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - ImageQualityCheckType? result = rawValue == null - ? null - : ImageQualityCheckTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the ImageQualityCheckType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageQualityCheckType imageQualityCheckType, JsonSerializerOptions options) - { - writer.WriteStringValue(imageQualityCheckType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class ImageQualityCheckTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a ImageQualityCheckType from the Json object - /// - /// - /// - /// - /// - public override ImageQualityCheckType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - ImageQualityCheckType? result = rawValue == null - ? null - : ImageQualityCheckTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageQualityCheckType? imageQualityCheckType, JsonSerializerOptions options) - { - writer.WriteStringValue(imageQualityCheckType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs index 65bb1a3..66c6883 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageQualityResult /// + [DataContract(Name = "ImageQualityResult")] public partial class ImageQualityResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// imageQualityCheckList - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public ImageQualityResult(ImageQualityCheckList imageQualityCheckList, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected ImageQualityResult() { } + /// + /// Initializes a new instance of the class. + /// + /// imageQualityCheckList (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public ImageQualityResult(ImageQualityCheckList imageQualityCheckList = default(ImageQualityCheckList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - ImageQualityCheckList = imageQualityCheckList; - OnCreated(); + // to ensure "imageQualityCheckList" is required (not null) + if (imageQualityCheckList == null) + { + throw new ArgumentNullException("imageQualityCheckList is a required property for ImageQualityResult and cannot be null"); + } + this.ImageQualityCheckList = imageQualityCheckList; } - partial void OnCreated(); - /// /// Gets or Sets ImageQualityCheckList /// - [JsonPropertyName("ImageQualityCheckList")] + [DataMember(Name = "ImageQualityCheckList", IsRequired = true, EmitDefaultValue = true)] public ImageQualityCheckList ImageQualityCheckList { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ImageQualityResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" ImageQualityCheckList: ").Append(ImageQualityCheckList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class ImageQualityResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override ImageQualityResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option imageQualityCheckList = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ImageQualityCheckList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - imageQualityCheckList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!imageQualityCheckList.IsSet) - throw new ArgumentException("Property is required for class ImageQualityResult.", nameof(imageQualityCheckList)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class ImageQualityResult.", nameof(resultType)); - - if (imageQualityCheckList.IsSet && imageQualityCheckList.Value == null) - throw new ArgumentNullException(nameof(imageQualityCheckList), "Property is not nullable for class ImageQualityResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ImageQualityResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class ImageQualityResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ImageQualityResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ImageQualityResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ImageQualityResult."); - - return new ImageQualityResult(imageQualityCheckList.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageQualityResult imageQualityResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, imageQualityResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImageQualityResult imageQualityResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (imageQualityResult.ImageQualityCheckList == null) - throw new ArgumentNullException(nameof(imageQualityResult.ImageQualityCheckList), "Property is required for class ImageQualityResult."); - - writer.WritePropertyName("ImageQualityCheckList"); - JsonSerializer.Serialize(writer, imageQualityResult.ImageQualityCheckList, jsonSerializerOptions); - if (imageQualityResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", imageQualityResult.BufLengthOption.Value!.Value); - - if (imageQualityResult.LightOption.IsSet) - writer.WriteNumber("light", imageQualityResult.LightOption.Value!.Value); - - if (imageQualityResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", imageQualityResult.ListIdxOption.Value!.Value); - - if (imageQualityResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", imageQualityResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", imageQualityResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs index 1b45990..59b3ad2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,38 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImageTransactionData /// + [DataContract(Name = "ImageTransactionData")] public partial class ImageTransactionData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// image - [JsonConstructor] - public ImageTransactionData(Option image = default) + /// image. + public ImageTransactionData(ImagesFieldValue image = default(ImagesFieldValue)) { - ImageOption = image; - OnCreated(); + this.Image = image; } - partial void OnCreated(); - - /// - /// Used to track the state of Image - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ImageOption { get; private set; } - /// /// Gets or Sets Image /// - [JsonPropertyName("image")] - public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new(value); } } + [DataMember(Name = "image", EmitDefaultValue = false)] + public ImagesFieldValue Image { get; set; } /// /// Returns the string presentation of the object @@ -69,6 +60,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -80,93 +80,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImageTransactionDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImageTransactionData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option image = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "image": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (image.IsSet && image.Value == null) - throw new ArgumentNullException(nameof(image), "Property is not nullable for class ImageTransactionData."); - - return new ImageTransactionData(image); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImageTransactionData imageTransactionData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imageTransactionData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImageTransactionData imageTransactionData, JsonSerializerOptions jsonSerializerOptions) - { - if (imageTransactionData.ImageOption.IsSet && imageTransactionData.Image == null) - throw new ArgumentNullException(nameof(imageTransactionData.Image), "Property is required for class ImageTransactionData."); - - if (imageTransactionData.ImageOption.IsSet) - { - writer.WritePropertyName("image"); - JsonSerializer.Serialize(writer, imageTransactionData.Image, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Images.cs b/src/Regula.DocumentReader.WebClient/Model/Images.cs index cb16dfb..a55a2d2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Images.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Images.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,78 +14,79 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Images /// + [DataContract(Name = "Images")] public partial class Images : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// availableSourceList - /// fieldList - /// Fields count - /// Available sources count - [JsonConstructor] - public Images(List availableSourceList, List fieldList, Option fieldCount = default, Option availableSourceCount = default) - { - AvailableSourceList = availableSourceList; - FieldList = fieldList; - FieldCountOption = fieldCount; - AvailableSourceCountOption = availableSourceCount; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Gets or Sets AvailableSourceList - /// - [JsonPropertyName("availableSourceList")] - public List AvailableSourceList { get; set; } - + [JsonConstructorAttribute] + protected Images() { } /// - /// Gets or Sets FieldList + /// Initializes a new instance of the class. /// - [JsonPropertyName("fieldList")] - public List FieldList { get; set; } + /// Fields count. + /// Available sources count. + /// availableSourceList (required). + /// fieldList (required). + public Images(int fieldCount = default(int), int availableSourceCount = default(int), List availableSourceList = default(List), List fieldList = default(List)) + { + // to ensure "availableSourceList" is required (not null) + if (availableSourceList == null) + { + throw new ArgumentNullException("availableSourceList is a required property for Images and cannot be null"); + } + this.AvailableSourceList = availableSourceList; + // to ensure "fieldList" is required (not null) + if (fieldList == null) + { + throw new ArgumentNullException("fieldList is a required property for Images and cannot be null"); + } + this.FieldList = fieldList; + this.FieldCount = fieldCount; + this.AvailableSourceCount = availableSourceCount; + } /// - /// Used to track the state of FieldCount + /// Fields count /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldCountOption { get; private set; } + /// Fields count + [DataMember(Name = "fieldCount", EmitDefaultValue = false)] + public int FieldCount { get; set; } /// - /// Fields count + /// Available sources count /// - /// Fields count - [JsonPropertyName("fieldCount")] - public int? FieldCount { get { return this.FieldCountOption; } set { this.FieldCountOption = new(value); } } + /// Available sources count + [DataMember(Name = "availableSourceCount", EmitDefaultValue = false)] + public int AvailableSourceCount { get; set; } /// - /// Used to track the state of AvailableSourceCount + /// Gets or Sets AvailableSourceList /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AvailableSourceCountOption { get; private set; } + [DataMember(Name = "availableSourceList", IsRequired = true, EmitDefaultValue = true)] + public List AvailableSourceList { get; set; } /// - /// Available sources count + /// Gets or Sets FieldList /// - /// Available sources count - [JsonPropertyName("availableSourceCount")] - public int? AvailableSourceCount { get { return this.AvailableSourceCountOption; } set { this.AvailableSourceCountOption = new(value); } } + [DataMember(Name = "fieldList", IsRequired = true, EmitDefaultValue = true)] + public List FieldList { get; set; } /// /// Returns the string presentation of the object @@ -97,14 +96,23 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class Images {\n"); - sb.Append(" AvailableSourceList: ").Append(AvailableSourceList).Append("\n"); - sb.Append(" FieldList: ").Append(FieldList).Append("\n"); sb.Append(" FieldCount: ").Append(FieldCount).Append("\n"); sb.Append(" AvailableSourceCount: ").Append(AvailableSourceCount).Append("\n"); + sb.Append(" AvailableSourceList: ").Append(AvailableSourceList).Append("\n"); + sb.Append(" FieldList: ").Append(FieldList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -116,130 +124,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImagesJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override Images Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> availableSourceList = default; - Option?> fieldList = default; - Option fieldCount = default; - Option availableSourceCount = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "availableSourceList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - availableSourceList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "fieldList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "fieldCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldCount = new Option(utf8JsonReader.GetInt32()); - break; - case "availableSourceCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - availableSourceCount = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!availableSourceList.IsSet) - throw new ArgumentException("Property is required for class Images.", nameof(availableSourceList)); - - if (!fieldList.IsSet) - throw new ArgumentException("Property is required for class Images.", nameof(fieldList)); - - if (availableSourceList.IsSet && availableSourceList.Value == null) - throw new ArgumentNullException(nameof(availableSourceList), "Property is not nullable for class Images."); - - if (fieldList.IsSet && fieldList.Value == null) - throw new ArgumentNullException(nameof(fieldList), "Property is not nullable for class Images."); - - if (fieldCount.IsSet && fieldCount.Value == null) - throw new ArgumentNullException(nameof(fieldCount), "Property is not nullable for class Images."); - - if (availableSourceCount.IsSet && availableSourceCount.Value == null) - throw new ArgumentNullException(nameof(availableSourceCount), "Property is not nullable for class Images."); - - return new Images(availableSourceList.Value!, fieldList.Value!, fieldCount, availableSourceCount); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Images images, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, images, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, Images images, JsonSerializerOptions jsonSerializerOptions) - { - if (images.AvailableSourceList == null) - throw new ArgumentNullException(nameof(images.AvailableSourceList), "Property is required for class Images."); - - if (images.FieldList == null) - throw new ArgumentNullException(nameof(images.FieldList), "Property is required for class Images."); - - writer.WritePropertyName("availableSourceList"); - JsonSerializer.Serialize(writer, images.AvailableSourceList, jsonSerializerOptions); - writer.WritePropertyName("fieldList"); - JsonSerializer.Serialize(writer, images.FieldList, jsonSerializerOptions); - if (images.FieldCountOption.IsSet) - writer.WriteNumber("fieldCount", images.FieldCountOption.Value!.Value); - - if (images.AvailableSourceCountOption.IsSet) - writer.WriteNumber("availableSourceCount", images.AvailableSourceCountOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs index 32c907e..39e66d0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesAvailableSource.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,46 +14,51 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesAvailableSource /// + [DataContract(Name = "ImagesAvailableSource")] public partial class ImagesAvailableSource : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// source - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0) - [JsonConstructor] - public ImagesAvailableSource(Source source, int containerType = 0) - { - Source = source; - ContainerType = containerType; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Source /// - [JsonPropertyName("source")] + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)] public Source Source { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ImagesAvailableSource() { } + /// + /// Initializes a new instance of the class. + /// + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + /// source (required). + public ImagesAvailableSource(int containerType = 0, Source source = default(Source)) + { + this.ContainerType = containerType; + this.Source = source; + } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [JsonPropertyName("containerType")] + [DataMember(Name = "containerType", IsRequired = true, EmitDefaultValue = true)] public int ContainerType { get; set; } /// @@ -66,12 +69,21 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ImagesAvailableSource {\n"); - sb.Append(" Source: ").Append(Source).Append("\n"); sb.Append(" ContainerType: ").Append(ContainerType).Append("\n"); + sb.Append(" Source: ").Append(Source).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -83,104 +95,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImagesAvailableSourceJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImagesAvailableSource Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option source = default; - Option containerType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "source": - string? sourceRawValue = utf8JsonReader.GetString(); - if (sourceRawValue != null) - source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); - break; - case "containerType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - containerType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!source.IsSet) - throw new ArgumentException("Property is required for class ImagesAvailableSource.", nameof(source)); - - if (!containerType.IsSet) - throw new ArgumentException("Property is required for class ImagesAvailableSource.", nameof(containerType)); - - if (source.IsSet && source.Value == null) - throw new ArgumentNullException(nameof(source), "Property is not nullable for class ImagesAvailableSource."); - - if (containerType.IsSet && containerType.Value == null) - throw new ArgumentNullException(nameof(containerType), "Property is not nullable for class ImagesAvailableSource."); - - return new ImagesAvailableSource(source.Value!.Value!, containerType.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImagesAvailableSource imagesAvailableSource, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imagesAvailableSource, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImagesAvailableSource imagesAvailableSource, JsonSerializerOptions jsonSerializerOptions) - { - var sourceRawValue = SourceValueConverter.ToJsonValue(imagesAvailableSource.Source); - writer.WriteString("source", sourceRawValue); - - writer.WriteNumber("containerType", imagesAvailableSource.ContainerType); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs index be72291..f79587f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,71 +14,79 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesField /// + [DataContract(Name = "ImagesField")] public partial class ImagesField : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// Human readable field name. Do not bind to this name - use GraphicFieldType instead. - /// fieldType - /// valueList - /// Field value count - [JsonConstructor] - public ImagesField(string fieldName, GraphicFieldType fieldType, List valueList, Option valueCount = default) - { - FieldName = fieldName; - FieldType = fieldType; - ValueList = valueList; - ValueCountOption = valueCount; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets FieldType /// - [JsonPropertyName("fieldType")] + [DataMember(Name = "fieldType", IsRequired = true, EmitDefaultValue = true)] public GraphicFieldType FieldType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected ImagesField() { } + /// + /// Initializes a new instance of the class. + /// + /// Human readable field name. Do not bind to this name - use GraphicFieldType instead. (required). + /// fieldType (required). + /// valueList (required). + /// Field value count. + public ImagesField(string fieldName = default(string), GraphicFieldType fieldType = default(GraphicFieldType), List valueList = default(List), decimal valueCount = default(decimal)) + { + // to ensure "fieldName" is required (not null) + if (fieldName == null) + { + throw new ArgumentNullException("fieldName is a required property for ImagesField and cannot be null"); + } + this.FieldName = fieldName; + this.FieldType = fieldType; + // to ensure "valueList" is required (not null) + if (valueList == null) + { + throw new ArgumentNullException("valueList is a required property for ImagesField and cannot be null"); + } + this.ValueList = valueList; + this.ValueCount = valueCount; + } /// /// Human readable field name. Do not bind to this name - use GraphicFieldType instead. /// /// Human readable field name. Do not bind to this name - use GraphicFieldType instead. - [JsonPropertyName("fieldName")] + [DataMember(Name = "fieldName", IsRequired = true, EmitDefaultValue = true)] public string FieldName { get; set; } /// /// Gets or Sets ValueList /// - [JsonPropertyName("valueList")] + [DataMember(Name = "valueList", IsRequired = true, EmitDefaultValue = true)] public List ValueList { get; set; } - /// - /// Used to track the state of ValueCount - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ValueCountOption { get; private set; } - /// /// Field value count /// /// Field value count - [JsonPropertyName("valueCount")] - public decimal? ValueCount { get { return this.ValueCountOption; } set { this.ValueCountOption = new(value); } } + [DataMember(Name = "valueCount", EmitDefaultValue = false)] + public decimal ValueCount { get; set; } /// /// Returns the string presentation of the object @@ -98,6 +104,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -109,133 +124,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImagesFieldJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImagesField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldName = default; - Option fieldType = default; - Option?> valueList = default; - Option valueCount = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "fieldName": - fieldName = new Option(utf8JsonReader.GetString()!); - break; - case "fieldType": - string? fieldTypeRawValue = utf8JsonReader.GetString(); - if (fieldTypeRawValue != null) - fieldType = new Option(GraphicFieldTypeValueConverter.FromStringOrDefault(fieldTypeRawValue)); - break; - case "valueList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - valueList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "valueCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - valueCount = new Option(utf8JsonReader.GetDecimal()); - break; - default: - break; - } - } - } - - if (!fieldName.IsSet) - throw new ArgumentException("Property is required for class ImagesField.", nameof(fieldName)); - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class ImagesField.", nameof(fieldType)); - - if (!valueList.IsSet) - throw new ArgumentException("Property is required for class ImagesField.", nameof(valueList)); - - if (fieldName.IsSet && fieldName.Value == null) - throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class ImagesField."); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class ImagesField."); - - if (valueList.IsSet && valueList.Value == null) - throw new ArgumentNullException(nameof(valueList), "Property is not nullable for class ImagesField."); - - if (valueCount.IsSet && valueCount.Value == null) - throw new ArgumentNullException(nameof(valueCount), "Property is not nullable for class ImagesField."); - - return new ImagesField(fieldName.Value!, fieldType.Value!.Value!, valueList.Value!, valueCount); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImagesField imagesField, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imagesField, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImagesField imagesField, JsonSerializerOptions jsonSerializerOptions) - { - if (imagesField.FieldName == null) - throw new ArgumentNullException(nameof(imagesField.FieldName), "Property is required for class ImagesField."); - - if (imagesField.ValueList == null) - throw new ArgumentNullException(nameof(imagesField.ValueList), "Property is required for class ImagesField."); - - writer.WriteString("fieldName", imagesField.FieldName); - - var fieldTypeRawValue = GraphicFieldTypeValueConverter.ToJsonValue(imagesField.FieldType); - writer.WriteNumber("fieldType", fieldTypeRawValue); - - writer.WritePropertyName("valueList"); - JsonSerializer.Serialize(writer, imagesField.ValueList, jsonSerializerOptions); - if (imagesField.ValueCountOption.IsSet) - writer.WriteNumber("valueCount", imagesField.ValueCountOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs index 6172ef6..1b14be2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,144 +14,118 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesFieldValue /// + [DataContract(Name = "ImagesFieldValue")] public partial class ImagesFieldValue : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// source - /// Page index of the image from input list - /// lightIndex - /// Base64 encoded image - /// Base64 encoded image - /// Original page index - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0) - /// fieldRect - /// rfidOrigin - [JsonConstructor] - public ImagesFieldValue(Source source, int pageIndex, Light lightIndex, Option value = default, Option originalValue = default, Option originalPageIndex = default, int containerType = 0, Option fieldRect = default, Option rfidOrigin = default) - { - Source = source; - PageIndex = pageIndex; - LightIndex = lightIndex; - ValueOption = value; - OriginalValueOption = originalValue; - OriginalPageIndexOption = originalPageIndex; - ContainerType = containerType; - FieldRectOption = fieldRect; - RfidOriginOption = rfidOrigin; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Source /// - [JsonPropertyName("source")] + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)] public Source Source { get; set; } /// /// Gets or Sets LightIndex /// - [JsonPropertyName("lightIndex")] + [DataMember(Name = "lightIndex", IsRequired = true, EmitDefaultValue = true)] public Light LightIndex { get; set; } - /// - /// Page index of the image from input list + /// Initializes a new instance of the class. /// - /// Page index of the image from input list - [JsonPropertyName("pageIndex")] - public int PageIndex { get; set; } - + [JsonConstructorAttribute] + protected ImagesFieldValue() { } /// - /// Used to track the state of Value + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ValueOption { get; private set; } + /// source (required). + /// Base64 encoded image. + /// Base64 encoded image. + /// Original page index. + /// Page index of the image from input list (required). + /// lightIndex (required). + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + /// fieldRect. + /// rfidOrigin. + public ImagesFieldValue(Source source = default(Source), string value = default(string), string originalValue = default(string), int originalPageIndex = default(int), int pageIndex = default(int), Light lightIndex = default(Light), int containerType = 0, RectangleCoordinates fieldRect = default(RectangleCoordinates), RfidOrigin rfidOrigin = default(RfidOrigin)) + { + this.Source = source; + this.PageIndex = pageIndex; + this.LightIndex = lightIndex; + this.ContainerType = containerType; + this.Value = value; + this.OriginalValue = originalValue; + this.OriginalPageIndex = originalPageIndex; + this.FieldRect = fieldRect; + this.RfidOrigin = rfidOrigin; + } /// /// Base64 encoded image /// /// Base64 encoded image - /* Base64 encoded image */ - [JsonPropertyName("value")] - public string? Value { get { return this.ValueOption; } set { this.ValueOption = new(value); } } - - /// - /// Used to track the state of OriginalValue - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OriginalValueOption { get; private set; } + /* + Base64 encoded image + */ + [DataMember(Name = "value", EmitDefaultValue = false)] + public string Value { get; set; } /// /// Base64 encoded image /// /// Base64 encoded image - /* Base64 encoded image */ - [JsonPropertyName("originalValue")] - public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new(value); } } + /* + Base64 encoded image + */ + [DataMember(Name = "originalValue", EmitDefaultValue = false)] + public string OriginalValue { get; set; } /// - /// Used to track the state of OriginalPageIndex + /// Original page index /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OriginalPageIndexOption { get; private set; } + /// Original page index + [DataMember(Name = "originalPageIndex", EmitDefaultValue = false)] + public int OriginalPageIndex { get; set; } /// - /// Original page index + /// Page index of the image from input list /// - /// Original page index - [JsonPropertyName("originalPageIndex")] - public int? OriginalPageIndex { get { return this.OriginalPageIndexOption; } set { this.OriginalPageIndexOption = new(value); } } + /// Page index of the image from input list + [DataMember(Name = "pageIndex", IsRequired = true, EmitDefaultValue = true)] + public int PageIndex { get; set; } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [JsonPropertyName("containerType")] + [DataMember(Name = "containerType", IsRequired = true, EmitDefaultValue = true)] public int ContainerType { get; set; } - /// - /// Used to track the state of FieldRect - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldRectOption { get; private set; } - /// /// Gets or Sets FieldRect /// - [JsonPropertyName("fieldRect")] - public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new(value); } } - - /// - /// Used to track the state of RfidOrigin - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RfidOriginOption { get; private set; } + [DataMember(Name = "fieldRect", EmitDefaultValue = false)] + public RectangleCoordinates FieldRect { get; set; } /// /// Gets or Sets RfidOrigin /// - [JsonPropertyName("rfidOrigin")] - public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new(value); } } + [DataMember(Name = "rfidOrigin", EmitDefaultValue = false)] + public RfidOrigin RfidOrigin { get; set; } /// /// Returns the string presentation of the object @@ -164,11 +136,11 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ImagesFieldValue {\n"); sb.Append(" Source: ").Append(Source).Append("\n"); - sb.Append(" PageIndex: ").Append(PageIndex).Append("\n"); - sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); sb.Append(" OriginalValue: ").Append(OriginalValue).Append("\n"); sb.Append(" OriginalPageIndex: ").Append(OriginalPageIndex).Append("\n"); + sb.Append(" PageIndex: ").Append(PageIndex).Append("\n"); + sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); sb.Append(" ContainerType: ").Append(ContainerType).Append("\n"); sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); sb.Append(" RfidOrigin: ").Append(RfidOrigin).Append("\n"); @@ -176,6 +148,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -187,202 +168,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImagesFieldValueJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImagesFieldValue Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option source = default; - Option pageIndex = default; - Option lightIndex = default; - Option value = default; - Option originalValue = default; - Option originalPageIndex = default; - Option containerType = default; - Option fieldRect = default; - Option rfidOrigin = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "source": - string? sourceRawValue = utf8JsonReader.GetString(); - if (sourceRawValue != null) - source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); - break; - case "pageIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "lightIndex": - string? lightIndexRawValue = utf8JsonReader.GetString(); - if (lightIndexRawValue != null) - lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); - break; - case "value": - value = new Option(utf8JsonReader.GetString()!); - break; - case "originalValue": - originalValue = new Option(utf8JsonReader.GetString()!); - break; - case "originalPageIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originalPageIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "containerType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - containerType = new Option(utf8JsonReader.GetInt32()); - break; - case "fieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "rfidOrigin": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rfidOrigin = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!source.IsSet) - throw new ArgumentException("Property is required for class ImagesFieldValue.", nameof(source)); - - if (!pageIndex.IsSet) - throw new ArgumentException("Property is required for class ImagesFieldValue.", nameof(pageIndex)); - - if (!lightIndex.IsSet) - throw new ArgumentException("Property is required for class ImagesFieldValue.", nameof(lightIndex)); - - if (!containerType.IsSet) - throw new ArgumentException("Property is required for class ImagesFieldValue.", nameof(containerType)); - - if (source.IsSet && source.Value == null) - throw new ArgumentNullException(nameof(source), "Property is not nullable for class ImagesFieldValue."); - - if (pageIndex.IsSet && pageIndex.Value == null) - throw new ArgumentNullException(nameof(pageIndex), "Property is not nullable for class ImagesFieldValue."); - - if (lightIndex.IsSet && lightIndex.Value == null) - throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class ImagesFieldValue."); - - if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class ImagesFieldValue."); - - if (originalValue.IsSet && originalValue.Value == null) - throw new ArgumentNullException(nameof(originalValue), "Property is not nullable for class ImagesFieldValue."); - - if (originalPageIndex.IsSet && originalPageIndex.Value == null) - throw new ArgumentNullException(nameof(originalPageIndex), "Property is not nullable for class ImagesFieldValue."); - - if (containerType.IsSet && containerType.Value == null) - throw new ArgumentNullException(nameof(containerType), "Property is not nullable for class ImagesFieldValue."); - - if (fieldRect.IsSet && fieldRect.Value == null) - throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class ImagesFieldValue."); - - if (rfidOrigin.IsSet && rfidOrigin.Value == null) - throw new ArgumentNullException(nameof(rfidOrigin), "Property is not nullable for class ImagesFieldValue."); - - return new ImagesFieldValue(source.Value!.Value!, pageIndex.Value!.Value!, lightIndex.Value!.Value!, value, originalValue, originalPageIndex, containerType.Value!.Value!, fieldRect, rfidOrigin); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImagesFieldValue imagesFieldValue, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imagesFieldValue, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImagesFieldValue imagesFieldValue, JsonSerializerOptions jsonSerializerOptions) - { - if (imagesFieldValue.ValueOption.IsSet && imagesFieldValue.Value == null) - throw new ArgumentNullException(nameof(imagesFieldValue.Value), "Property is required for class ImagesFieldValue."); - - if (imagesFieldValue.OriginalValueOption.IsSet && imagesFieldValue.OriginalValue == null) - throw new ArgumentNullException(nameof(imagesFieldValue.OriginalValue), "Property is required for class ImagesFieldValue."); - - if (imagesFieldValue.FieldRectOption.IsSet && imagesFieldValue.FieldRect == null) - throw new ArgumentNullException(nameof(imagesFieldValue.FieldRect), "Property is required for class ImagesFieldValue."); - - if (imagesFieldValue.RfidOriginOption.IsSet && imagesFieldValue.RfidOrigin == null) - throw new ArgumentNullException(nameof(imagesFieldValue.RfidOrigin), "Property is required for class ImagesFieldValue."); - - var sourceRawValue = SourceValueConverter.ToJsonValue(imagesFieldValue.Source); - writer.WriteString("source", sourceRawValue); - - writer.WriteNumber("pageIndex", imagesFieldValue.PageIndex); - - var lightIndexRawValue = LightValueConverter.ToJsonValue(imagesFieldValue.LightIndex); - writer.WriteNumber("lightIndex", lightIndexRawValue); - - if (imagesFieldValue.ValueOption.IsSet) - writer.WriteString("value", imagesFieldValue.Value); - - if (imagesFieldValue.OriginalValueOption.IsSet) - writer.WriteString("originalValue", imagesFieldValue.OriginalValue); - - if (imagesFieldValue.OriginalPageIndexOption.IsSet) - writer.WriteNumber("originalPageIndex", imagesFieldValue.OriginalPageIndexOption.Value!.Value); - - writer.WriteNumber("containerType", imagesFieldValue.ContainerType); - - if (imagesFieldValue.FieldRectOption.IsSet) - { - writer.WritePropertyName("fieldRect"); - JsonSerializer.Serialize(writer, imagesFieldValue.FieldRect, jsonSerializerOptions); - } - if (imagesFieldValue.RfidOriginOption.IsSet) - { - writer.WritePropertyName("rfidOrigin"); - JsonSerializer.Serialize(writer, imagesFieldValue.RfidOrigin, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs index 42bf460..56af960 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesItem /// + [DataContract(Name = "ImagesItem")] public partial class ImagesItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// images - [JsonConstructor] - public ImagesItem(Images images) + [JsonConstructorAttribute] + protected ImagesItem() { } + /// + /// Initializes a new instance of the class. + /// + /// images (required). + public ImagesItem(Images images = default(Images)) { - Images = images; - OnCreated(); + // to ensure "images" is required (not null) + if (images == null) + { + throw new ArgumentNullException("images is a required property for ImagesItem and cannot be null"); + } + this.Images = images; } - partial void OnCreated(); - /// /// Gets or Sets Images /// - [JsonPropertyName("Images")] + [DataMember(Name = "Images", IsRequired = true, EmitDefaultValue = true)] public Images Images { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ImagesItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ImagesItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option images = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Images": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - images = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!images.IsSet) - throw new ArgumentException("Property is required for class ImagesItem.", nameof(images)); - - if (images.IsSet && images.Value == null) - throw new ArgumentNullException(nameof(images), "Property is not nullable for class ImagesItem."); - - return new ImagesItem(images.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImagesItem imagesItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, imagesItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImagesItem imagesItem, JsonSerializerOptions jsonSerializerOptions) - { - if (imagesItem.Images == null) - throw new ArgumentNullException(nameof(imagesItem.Images), "Property is required for class ImagesItem."); - - writer.WritePropertyName("Images"); - JsonSerializer.Serialize(writer, imagesItem.Images, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs index 2ff4425..082c791 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ImagesResult /// + [DataContract(Name = "ImagesResult")] public partial class ImagesResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// images - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public ImagesResult(Images images, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected ImagesResult() { } + /// + /// Initializes a new instance of the class. + /// + /// images (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public ImagesResult(Images images = default(Images), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - Images = images; - OnCreated(); + // to ensure "images" is required (not null) + if (images == null) + { + throw new ArgumentNullException("images is a required property for ImagesResult and cannot be null"); + } + this.Images = images; } - partial void OnCreated(); - /// /// Gets or Sets Images /// - [JsonPropertyName("Images")] + [DataMember(Name = "Images", IsRequired = true, EmitDefaultValue = true)] public Images Images { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ImagesResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Images: ").Append(Images).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class ImagesResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override ImagesResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option images = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Images": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - images = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!images.IsSet) - throw new ArgumentException("Property is required for class ImagesResult.", nameof(images)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class ImagesResult.", nameof(resultType)); - - if (images.IsSet && images.Value == null) - throw new ArgumentNullException(nameof(images), "Property is not nullable for class ImagesResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ImagesResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class ImagesResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ImagesResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ImagesResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ImagesResult."); - - return new ImagesResult(images.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ImagesResult imagesResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, imagesResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ImagesResult imagesResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (imagesResult.Images == null) - throw new ArgumentNullException(nameof(imagesResult.Images), "Property is required for class ImagesResult."); - - writer.WritePropertyName("Images"); - JsonSerializer.Serialize(writer, imagesResult.Images, jsonSerializerOptions); - if (imagesResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", imagesResult.BufLengthOption.Value!.Value); - - if (imagesResult.LightOption.IsSet) - writer.WriteNumber("light", imagesResult.LightOption.Value!.Value); - - if (imagesResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", imagesResult.ListIdxOption.Value!.Value); - - if (imagesResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", imagesResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", imagesResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/InData.cs b/src/Regula.DocumentReader.WebClient/Model/InData.cs index ea83ada..d49c009 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,60 +14,46 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// InData /// + [DataContract(Name = "InData")] public partial class InData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// video - /// images - [JsonConstructor] - public InData(Option video = default, Option?> images = default) + /// video. + /// images. + public InData(InDataVideo video = default(InDataVideo), List images = default(List)) { - VideoOption = video; - ImagesOption = images; - OnCreated(); + this.Video = video; + this.Images = images; } - partial void OnCreated(); - - /// - /// Used to track the state of Video - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option VideoOption { get; private set; } - /// /// Gets or Sets Video /// - [JsonPropertyName("video")] - public InDataVideo? Video { get { return this.VideoOption; } set { this.VideoOption = new(value); } } - - /// - /// Used to track the state of Images - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ImagesOption { get; private set; } + [DataMember(Name = "video", EmitDefaultValue = false)] + public InDataVideo Video { get; set; } /// /// Gets or Sets Images /// - [JsonPropertyName("images")] - public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new(value); } } + [DataMember(Name = "images", EmitDefaultValue = false)] + public List Images { get; set; } /// /// Returns the string presentation of the object @@ -85,6 +69,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -96,109 +89,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class InDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override InData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option video = default; - Option?> images = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "video": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - video = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "images": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - images = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (video.IsSet && video.Value == null) - throw new ArgumentNullException(nameof(video), "Property is not nullable for class InData."); - - if (images.IsSet && images.Value == null) - throw new ArgumentNullException(nameof(images), "Property is not nullable for class InData."); - - return new InData(video, images); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, InData inData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, inData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, InData inData, JsonSerializerOptions jsonSerializerOptions) - { - if (inData.VideoOption.IsSet && inData.Video == null) - throw new ArgumentNullException(nameof(inData.Video), "Property is required for class InData."); - - if (inData.ImagesOption.IsSet && inData.Images == null) - throw new ArgumentNullException(nameof(inData.Images), "Property is required for class InData."); - - if (inData.VideoOption.IsSet) - { - writer.WritePropertyName("video"); - JsonSerializer.Serialize(writer, inData.Video, jsonSerializerOptions); - } - if (inData.ImagesOption.IsSet) - { - writer.WritePropertyName("images"); - JsonSerializer.Serialize(writer, inData.Images, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs index 4a20702..92d8592 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,92 +14,64 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// InDataTransactionImagesFieldValue /// + [DataContract(Name = "InDataTransactionImagesFieldValue")] public partial class InDataTransactionImagesFieldValue : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// light - /// listIdx - /// Page index of the image from input list - /// Image url - [JsonConstructor] - public InDataTransactionImagesFieldValue(Option light = default, Option listIdx = default, Option pageIdx = default, Option url = default) - { - LightOption = light; - ListIdxOption = listIdx; - PageIdxOption = pageIdx; - UrlOption = url; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Used to track the state of Light - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LightOption { get; private set; } /// /// Gets or Sets Light /// - [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } - + [DataMember(Name = "light", EmitDefaultValue = false)] + public Light? Light { get; set; } /// - /// Used to track the state of ListIdx + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ListIdxOption { get; private set; } + /// light. + /// listIdx. + /// Page index of the image from input list. + /// Image url. + public InDataTransactionImagesFieldValue(Light? light = default(Light?), int listIdx = default(int), int pageIdx = default(int), string url = default(string)) + { + this.Light = light; + this.ListIdx = listIdx; + this.PageIdx = pageIdx; + this.Url = url; + } /// /// Gets or Sets ListIdx /// - [JsonPropertyName("listIdx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } - - /// - /// Used to track the state of PageIdx - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PageIdxOption { get; private set; } + [DataMember(Name = "listIdx", EmitDefaultValue = false)] + public int ListIdx { get; set; } /// /// Page index of the image from input list /// /// Page index of the image from input list - [JsonPropertyName("pageIdx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } - - /// - /// Used to track the state of Url - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UrlOption { get; private set; } + [DataMember(Name = "pageIdx", EmitDefaultValue = false)] + public int PageIdx { get; set; } /// /// Image url /// /// Image url - [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + [DataMember(Name = "url", EmitDefaultValue = false)] + public string Url { get; set; } /// /// Returns the string presentation of the object @@ -119,6 +89,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -130,125 +109,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class InDataTransactionImagesFieldValueJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override InDataTransactionImagesFieldValue Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option url = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "light": - string? lightRawValue = utf8JsonReader.GetString(); - if (lightRawValue != null) - light = new Option(LightValueConverter.FromStringOrDefault(lightRawValue)); - break; - case "listIdx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "pageIdx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "url": - url = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class InDataTransactionImagesFieldValue."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class InDataTransactionImagesFieldValue."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class InDataTransactionImagesFieldValue."); - - if (url.IsSet && url.Value == null) - throw new ArgumentNullException(nameof(url), "Property is not nullable for class InDataTransactionImagesFieldValue."); - - return new InDataTransactionImagesFieldValue(light, listIdx, pageIdx, url); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, InDataTransactionImagesFieldValue inDataTransactionImagesFieldValue, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, inDataTransactionImagesFieldValue, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, InDataTransactionImagesFieldValue inDataTransactionImagesFieldValue, JsonSerializerOptions jsonSerializerOptions) - { - if (inDataTransactionImagesFieldValue.UrlOption.IsSet && inDataTransactionImagesFieldValue.Url == null) - throw new ArgumentNullException(nameof(inDataTransactionImagesFieldValue.Url), "Property is required for class InDataTransactionImagesFieldValue."); - - if (inDataTransactionImagesFieldValue.LightOption.IsSet) - { - var lightRawValue = LightValueConverter.ToJsonValue(inDataTransactionImagesFieldValue.Light!.Value); - writer.WriteNumber("light", lightRawValue); - } - if (inDataTransactionImagesFieldValue.ListIdxOption.IsSet) - writer.WriteNumber("listIdx", inDataTransactionImagesFieldValue.ListIdxOption.Value!.Value); - - if (inDataTransactionImagesFieldValue.PageIdxOption.IsSet) - writer.WriteNumber("pageIdx", inDataTransactionImagesFieldValue.PageIdxOption.Value!.Value); - - if (inDataTransactionImagesFieldValue.UrlOption.IsSet) - writer.WriteString("url", inDataTransactionImagesFieldValue.Url); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs index c62df4e..084fa2c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,62 +14,48 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Video /// + [DataContract(Name = "InData_video")] public partial class InDataVideo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// A free-form object containing video's extended attributes. - /// Video url - [JsonConstructor] - public InDataVideo(Option?> metadata = default, Option url = default) + /// A free-form object containing video's extended attributes.. + /// Video url. + public InDataVideo(Dictionary metadata = default(Dictionary), string url = default(string)) { - MetadataOption = metadata; - UrlOption = url; - OnCreated(); + this.Metadata = metadata; + this.Url = url; } - partial void OnCreated(); - - /// - /// Used to track the state of Metadata - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> MetadataOption { get; private set; } - /// /// A free-form object containing video's extended attributes. /// /// A free-form object containing video's extended attributes. - [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } - - /// - /// Used to track the state of Url - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UrlOption { get; private set; } + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public Dictionary Metadata { get; set; } /// /// Video url /// /// Video url - [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + [DataMember(Name = "url", EmitDefaultValue = false)] + public string Url { get; set; } /// /// Returns the string presentation of the object @@ -87,6 +71,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -98,105 +91,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class InDataVideoJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override InDataVideo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> metadata = default; - Option url = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "metadata": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "url": - url = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (metadata.IsSet && metadata.Value == null) - throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class InDataVideo."); - - if (url.IsSet && url.Value == null) - throw new ArgumentNullException(nameof(url), "Property is not nullable for class InDataVideo."); - - return new InDataVideo(metadata, url); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, InDataVideo inDataVideo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, inDataVideo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, InDataVideo inDataVideo, JsonSerializerOptions jsonSerializerOptions) - { - if (inDataVideo.MetadataOption.IsSet && inDataVideo.Metadata == null) - throw new ArgumentNullException(nameof(inDataVideo.Metadata), "Property is required for class InDataVideo."); - - if (inDataVideo.UrlOption.IsSet && inDataVideo.Url == null) - throw new ArgumentNullException(nameof(inDataVideo.Url), "Property is required for class InDataVideo."); - - if (inDataVideo.MetadataOption.IsSet) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, inDataVideo.Metadata, jsonSerializerOptions); - } - if (inDataVideo.UrlOption.IsSet) - writer.WriteString("url", inDataVideo.Url); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs b/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs index 7327546..8670081 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InputBarcodeType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -29,400 +30,128 @@ namespace Regula.DocumentReader.WebClient.Model /// Enumeration contains the types of barcodes that can be processed /// /// Enumeration contains the types of barcodes that can be processed + [JsonConverter(typeof(StringEnumConverter))] public enum InputBarcodeType { /// /// Enum UNKNOWN for value: bct_unknown /// + [EnumMember(Value = "bct_unknown")] UNKNOWN = 1, /// /// Enum CODE128 for value: bct_Code128 /// + [EnumMember(Value = "bct_Code128")] CODE128 = 2, /// /// Enum CODE39 for value: bct_Code39 /// + [EnumMember(Value = "bct_Code39")] CODE39 = 3, /// /// Enum EAN8 for value: bct_EAN8 /// + [EnumMember(Value = "bct_EAN8")] EAN8 = 4, /// /// Enum ITF for value: bct_ITF /// + [EnumMember(Value = "bct_ITF")] ITF = 5, /// /// Enum PDF417 for value: bct_PDF417 /// + [EnumMember(Value = "bct_PDF417")] PDF417 = 6, /// /// Enum STF for value: bct_STF /// + [EnumMember(Value = "bct_STF")] STF = 7, /// /// Enum MTF for value: bct_MTF /// + [EnumMember(Value = "bct_MTF")] MTF = 8, /// /// Enum IATA for value: bct_IATA /// + [EnumMember(Value = "bct_IATA")] IATA = 9, /// /// Enum CODABAR for value: bct_CODABAR /// + [EnumMember(Value = "bct_CODABAR")] CODABAR = 10, /// /// Enum UPCA for value: bct_UPCA /// + [EnumMember(Value = "bct_UPCA")] UPCA = 11, /// /// Enum CODE93 for value: bct_CODE93 /// + [EnumMember(Value = "bct_CODE93")] CODE93 = 12, /// /// Enum UPCE for value: bct_UPCE /// + [EnumMember(Value = "bct_UPCE")] UPCE = 13, /// /// Enum EAN13 for value: bct_EAN13 /// + [EnumMember(Value = "bct_EAN13")] EAN13 = 14, /// /// Enum QRCODE for value: bct_QRCODE /// + [EnumMember(Value = "bct_QRCODE")] QRCODE = 15, /// /// Enum AZTEC for value: bct_AZTEC /// + [EnumMember(Value = "bct_AZTEC")] AZTEC = 16, /// /// Enum DATAMATRIX for value: bct_DATAMATRIX /// + [EnumMember(Value = "bct_DATAMATRIX")] DATAMATRIX = 17, /// /// Enum ALL_1D for value: bct_ALL_1D /// + [EnumMember(Value = "bct_ALL_1D")] ALL_1D = 18, /// /// Enum CODE11 for value: bct_Code11 /// + [EnumMember(Value = "bct_Code11")] CODE11 = 19, /// /// Enum JABCODE for value: bct_JABCODE /// + [EnumMember(Value = "bct_JABCODE")] JABCODE = 20 } - /// - /// Converts to and from the JSON value - /// - public static class InputBarcodeTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static InputBarcodeType FromString(string value) - { - if (value.Equals("bct_unknown")) - return InputBarcodeType.UNKNOWN; - - if (value.Equals("bct_Code128")) - return InputBarcodeType.CODE128; - - if (value.Equals("bct_Code39")) - return InputBarcodeType.CODE39; - - if (value.Equals("bct_EAN8")) - return InputBarcodeType.EAN8; - - if (value.Equals("bct_ITF")) - return InputBarcodeType.ITF; - - if (value.Equals("bct_PDF417")) - return InputBarcodeType.PDF417; - - if (value.Equals("bct_STF")) - return InputBarcodeType.STF; - - if (value.Equals("bct_MTF")) - return InputBarcodeType.MTF; - - if (value.Equals("bct_IATA")) - return InputBarcodeType.IATA; - - if (value.Equals("bct_CODABAR")) - return InputBarcodeType.CODABAR; - - if (value.Equals("bct_UPCA")) - return InputBarcodeType.UPCA; - - if (value.Equals("bct_CODE93")) - return InputBarcodeType.CODE93; - - if (value.Equals("bct_UPCE")) - return InputBarcodeType.UPCE; - - if (value.Equals("bct_EAN13")) - return InputBarcodeType.EAN13; - - if (value.Equals("bct_QRCODE")) - return InputBarcodeType.QRCODE; - - if (value.Equals("bct_AZTEC")) - return InputBarcodeType.AZTEC; - - if (value.Equals("bct_DATAMATRIX")) - return InputBarcodeType.DATAMATRIX; - - if (value.Equals("bct_ALL_1D")) - return InputBarcodeType.ALL_1D; - - if (value.Equals("bct_Code11")) - return InputBarcodeType.CODE11; - - if (value.Equals("bct_JABCODE")) - return InputBarcodeType.JABCODE; - - throw new NotImplementedException($"Could not convert value to type InputBarcodeType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static InputBarcodeType? FromStringOrDefault(string value) - { - if (value.Equals("bct_unknown")) - return InputBarcodeType.UNKNOWN; - - if (value.Equals("bct_Code128")) - return InputBarcodeType.CODE128; - - if (value.Equals("bct_Code39")) - return InputBarcodeType.CODE39; - - if (value.Equals("bct_EAN8")) - return InputBarcodeType.EAN8; - - if (value.Equals("bct_ITF")) - return InputBarcodeType.ITF; - - if (value.Equals("bct_PDF417")) - return InputBarcodeType.PDF417; - - if (value.Equals("bct_STF")) - return InputBarcodeType.STF; - - if (value.Equals("bct_MTF")) - return InputBarcodeType.MTF; - - if (value.Equals("bct_IATA")) - return InputBarcodeType.IATA; - - if (value.Equals("bct_CODABAR")) - return InputBarcodeType.CODABAR; - - if (value.Equals("bct_UPCA")) - return InputBarcodeType.UPCA; - - if (value.Equals("bct_CODE93")) - return InputBarcodeType.CODE93; - - if (value.Equals("bct_UPCE")) - return InputBarcodeType.UPCE; - - if (value.Equals("bct_EAN13")) - return InputBarcodeType.EAN13; - - if (value.Equals("bct_QRCODE")) - return InputBarcodeType.QRCODE; - - if (value.Equals("bct_AZTEC")) - return InputBarcodeType.AZTEC; - - if (value.Equals("bct_DATAMATRIX")) - return InputBarcodeType.DATAMATRIX; - - if (value.Equals("bct_ALL_1D")) - return InputBarcodeType.ALL_1D; - - if (value.Equals("bct_Code11")) - return InputBarcodeType.CODE11; - - if (value.Equals("bct_JABCODE")) - return InputBarcodeType.JABCODE; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static string ToJsonValue(InputBarcodeType value) - { - if (value == InputBarcodeType.UNKNOWN) - return "bct_unknown"; - - if (value == InputBarcodeType.CODE128) - return "bct_Code128"; - - if (value == InputBarcodeType.CODE39) - return "bct_Code39"; - - if (value == InputBarcodeType.EAN8) - return "bct_EAN8"; - - if (value == InputBarcodeType.ITF) - return "bct_ITF"; - - if (value == InputBarcodeType.PDF417) - return "bct_PDF417"; - - if (value == InputBarcodeType.STF) - return "bct_STF"; - - if (value == InputBarcodeType.MTF) - return "bct_MTF"; - - if (value == InputBarcodeType.IATA) - return "bct_IATA"; - - if (value == InputBarcodeType.CODABAR) - return "bct_CODABAR"; - - if (value == InputBarcodeType.UPCA) - return "bct_UPCA"; - - if (value == InputBarcodeType.CODE93) - return "bct_CODE93"; - - if (value == InputBarcodeType.UPCE) - return "bct_UPCE"; - - if (value == InputBarcodeType.EAN13) - return "bct_EAN13"; - - if (value == InputBarcodeType.QRCODE) - return "bct_QRCODE"; - - if (value == InputBarcodeType.AZTEC) - return "bct_AZTEC"; - - if (value == InputBarcodeType.DATAMATRIX) - return "bct_DATAMATRIX"; - - if (value == InputBarcodeType.ALL_1D) - return "bct_ALL_1D"; - - if (value == InputBarcodeType.CODE11) - return "bct_Code11"; - - if (value == InputBarcodeType.JABCODE) - return "bct_JABCODE"; - - throw new NotImplementedException($"Value could not be handled: '{value}'"); - } - } - - /// - /// A Json converter for type - /// - /// - public class InputBarcodeTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override InputBarcodeType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - InputBarcodeType? result = rawValue == null - ? null - : InputBarcodeTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the InputBarcodeType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, InputBarcodeType inputBarcodeType, JsonSerializerOptions options) - { - writer.WriteStringValue(inputBarcodeType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class InputBarcodeTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a InputBarcodeType from the Json object - /// - /// - /// - /// - /// - public override InputBarcodeType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - InputBarcodeType? result = rawValue == null - ? null - : InputBarcodeTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, InputBarcodeType? inputBarcodeType, JsonSerializerOptions options) - { - writer.WriteStringValue(inputBarcodeType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs b/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs index fbbbb5b..2213fe5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InputImageQualityChecks.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -29,246 +30,62 @@ namespace Regula.DocumentReader.WebClient.Model /// Input image quality checks for the document processing /// /// Input image quality checks for the document processing + [JsonConverter(typeof(StringEnumConverter))] public enum InputImageQualityChecks { /// /// Enum Glares for value: glaresCheck /// + [EnumMember(Value = "glaresCheck")] Glares = 1, /// /// Enum Focus for value: focusCheck /// + [EnumMember(Value = "focusCheck")] Focus = 2, /// /// Enum Resolution for value: dpiThreshold /// + [EnumMember(Value = "dpiThreshold")] Resolution = 3, /// /// Enum Colorness for value: colornessCheck /// + [EnumMember(Value = "colornessCheck")] Colorness = 4, /// /// Enum Perspective for value: perspectiveCheck /// + [EnumMember(Value = "perspectiveCheck")] Perspective = 5, /// /// Enum Bounds for value: documentPosition /// + [EnumMember(Value = "documentPosition")] Bounds = 6, /// /// Enum Portrait for value: portraitCheck /// + [EnumMember(Value = "portraitCheck")] Portrait = 7, /// /// Enum Brightness for value: brightnessCheck /// + [EnumMember(Value = "brightnessCheck")] Brightness = 8, /// /// Enum Occlusion for value: occlusionCheck /// + [EnumMember(Value = "occlusionCheck")] Occlusion = 9 } - /// - /// Converts to and from the JSON value - /// - public static class InputImageQualityChecksValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static InputImageQualityChecks FromString(string value) - { - if (value.Equals("glaresCheck")) - return InputImageQualityChecks.Glares; - - if (value.Equals("focusCheck")) - return InputImageQualityChecks.Focus; - - if (value.Equals("dpiThreshold")) - return InputImageQualityChecks.Resolution; - - if (value.Equals("colornessCheck")) - return InputImageQualityChecks.Colorness; - - if (value.Equals("perspectiveCheck")) - return InputImageQualityChecks.Perspective; - - if (value.Equals("documentPosition")) - return InputImageQualityChecks.Bounds; - - if (value.Equals("portraitCheck")) - return InputImageQualityChecks.Portrait; - - if (value.Equals("brightnessCheck")) - return InputImageQualityChecks.Brightness; - - if (value.Equals("occlusionCheck")) - return InputImageQualityChecks.Occlusion; - - throw new NotImplementedException($"Could not convert value to type InputImageQualityChecks: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static InputImageQualityChecks? FromStringOrDefault(string value) - { - if (value.Equals("glaresCheck")) - return InputImageQualityChecks.Glares; - - if (value.Equals("focusCheck")) - return InputImageQualityChecks.Focus; - - if (value.Equals("dpiThreshold")) - return InputImageQualityChecks.Resolution; - - if (value.Equals("colornessCheck")) - return InputImageQualityChecks.Colorness; - - if (value.Equals("perspectiveCheck")) - return InputImageQualityChecks.Perspective; - - if (value.Equals("documentPosition")) - return InputImageQualityChecks.Bounds; - - if (value.Equals("portraitCheck")) - return InputImageQualityChecks.Portrait; - - if (value.Equals("brightnessCheck")) - return InputImageQualityChecks.Brightness; - - if (value.Equals("occlusionCheck")) - return InputImageQualityChecks.Occlusion; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static string ToJsonValue(InputImageQualityChecks value) - { - if (value == InputImageQualityChecks.Glares) - return "glaresCheck"; - - if (value == InputImageQualityChecks.Focus) - return "focusCheck"; - - if (value == InputImageQualityChecks.Resolution) - return "dpiThreshold"; - - if (value == InputImageQualityChecks.Colorness) - return "colornessCheck"; - - if (value == InputImageQualityChecks.Perspective) - return "perspectiveCheck"; - - if (value == InputImageQualityChecks.Bounds) - return "documentPosition"; - - if (value == InputImageQualityChecks.Portrait) - return "portraitCheck"; - - if (value == InputImageQualityChecks.Brightness) - return "brightnessCheck"; - - if (value == InputImageQualityChecks.Occlusion) - return "occlusionCheck"; - - throw new NotImplementedException($"Value could not be handled: '{value}'"); - } - } - - /// - /// A Json converter for type - /// - /// - public class InputImageQualityChecksJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override InputImageQualityChecks Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - InputImageQualityChecks? result = rawValue == null - ? null - : InputImageQualityChecksValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the InputImageQualityChecks to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, InputImageQualityChecks inputImageQualityChecks, JsonSerializerOptions options) - { - writer.WriteStringValue(inputImageQualityChecks.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class InputImageQualityChecksNullableJsonConverter : JsonConverter - { - /// - /// Returns a InputImageQualityChecks from the Json object - /// - /// - /// - /// - /// - public override InputImageQualityChecks? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - InputImageQualityChecks? result = rawValue == null - ? null - : InputImageQualityChecksValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, InputImageQualityChecks? inputImageQualityChecks, JsonSerializerOptions options) - { - writer.WriteStringValue(inputImageQualityChecks?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LCID.cs b/src/Regula.DocumentReader.WebClient/Model/LCID.cs index ce91841..97f8206 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LCID.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LCID.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -862,1113 +863,4 @@ public enum LCID URDU_DETECTION = 10560 } - /// - /// Converts to and from the JSON value - /// - public static class LCIDValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static LCID FromString(string value) - { - if (value.Equals((0).ToString())) - return LCID.LATIN; - - if (value.Equals((1078).ToString())) - return LCID.AFRIKAANS; - - if (value.Equals((1052).ToString())) - return LCID.ALBANIAN; - - if (value.Equals((5121).ToString())) - return LCID.ARABIC_ALGERIA; - - if (value.Equals((15361).ToString())) - return LCID.ARABIC_BAHRAIN; - - if (value.Equals((3073).ToString())) - return LCID.ARABIC_EGYPT; - - if (value.Equals((2049).ToString())) - return LCID.ARABIC_IRAQ; - - if (value.Equals((11265).ToString())) - return LCID.ARABIC_JORDAN; - - if (value.Equals((13313).ToString())) - return LCID.ARABIC_KUWAIT; - - if (value.Equals((12289).ToString())) - return LCID.ARABIC_LEBANON; - - if (value.Equals((4097).ToString())) - return LCID.ARABIC_LIBYA; - - if (value.Equals((6145).ToString())) - return LCID.ARABIC_MOROCCO; - - if (value.Equals((8193).ToString())) - return LCID.ARABIC_OMAN; - - if (value.Equals((16385).ToString())) - return LCID.ARABIC_QATAR; - - if (value.Equals((1025).ToString())) - return LCID.ARABIC_SAUDI_ARABIA; - - if (value.Equals((10241).ToString())) - return LCID.ARABIC_SYRIA; - - if (value.Equals((7169).ToString())) - return LCID.ARABIC_TUNISIA; - - if (value.Equals((14337).ToString())) - return LCID.ARABIC_UAE; - - if (value.Equals((9217).ToString())) - return LCID.ARABIC_YEMEN; - - if (value.Equals((1067).ToString())) - return LCID.ARABIC_ARMENIAN; - - if (value.Equals((2092).ToString())) - return LCID.AZERI_CYRILIC; - - if (value.Equals((1068).ToString())) - return LCID.AZERI_LATIN; - - if (value.Equals((1069).ToString())) - return LCID.BASQUE; - - if (value.Equals((1059).ToString())) - return LCID.BELARUSIAN; - - if (value.Equals((1026).ToString())) - return LCID.BULGARIAN; - - if (value.Equals((1109).ToString())) - return LCID.BURMESE; - - if (value.Equals((1027).ToString())) - return LCID.CATALAN; - - if (value.Equals((3076).ToString())) - return LCID.CHINESE_HONGKONG_SAR; - - if (value.Equals((5124).ToString())) - return LCID.CHINESE_MACAO_SAR; - - if (value.Equals((2052).ToString())) - return LCID.CHINESE; - - if (value.Equals((4100).ToString())) - return LCID.CHINESE_SINGAPORE; - - if (value.Equals((1028).ToString())) - return LCID.CHINESE_TAIWAN; - - if (value.Equals((1050).ToString())) - return LCID.CROATIAN; - - if (value.Equals((1029).ToString())) - return LCID.CZECH; - - if (value.Equals((1030).ToString())) - return LCID.DANISH; - - if (value.Equals((1125).ToString())) - return LCID.DIVEHI; - - if (value.Equals((2067).ToString())) - return LCID.DUTCH_BELGIUM; - - if (value.Equals((1043).ToString())) - return LCID.DUTCH_NETHERLANDS; - - if (value.Equals((3081).ToString())) - return LCID.ENGLISH_AUSTRALIA; - - if (value.Equals((10249).ToString())) - return LCID.ENGLISH_BELIZE; - - if (value.Equals((4105).ToString())) - return LCID.ENGLISH_CANADA; - - if (value.Equals((9225).ToString())) - return LCID.ENGLISH_CARRIBEAN; - - if (value.Equals((6153).ToString())) - return LCID.ENGLISH_IRELAND; - - if (value.Equals((8201).ToString())) - return LCID.ENGLISH_JAMAICA; - - if (value.Equals((5129).ToString())) - return LCID.ENGLISH_NEW_ZEALAND; - - if (value.Equals((13321).ToString())) - return LCID.ENGLISH_PHILIPPINES; - - if (value.Equals((7177).ToString())) - return LCID.ENGLISH_SOUTH_AFRICA; - - if (value.Equals((11273).ToString())) - return LCID.ENGLISH_TRINIDAD; - - if (value.Equals((2057).ToString())) - return LCID.ENGLISH_UK; - - if (value.Equals((1033).ToString())) - return LCID.ENGLISH_US; - - if (value.Equals((12297).ToString())) - return LCID.ENGLISH_ZIMBABWE; - - if (value.Equals((1061).ToString())) - return LCID.ESTONIAN; - - if (value.Equals((1080).ToString())) - return LCID.FAEROESE; - - if (value.Equals((1065).ToString())) - return LCID.FARSI; - - if (value.Equals((1035).ToString())) - return LCID.FINNISH; - - if (value.Equals((2060).ToString())) - return LCID.FRENCH_BELGIUM; - - if (value.Equals((3084).ToString())) - return LCID.FRENCH_CANADA; - - if (value.Equals((1036).ToString())) - return LCID.FRENCH_FRANCE; - - if (value.Equals((5132).ToString())) - return LCID.FRENCH_LUXEMBOURG; - - if (value.Equals((6156).ToString())) - return LCID.FRENCH_MONACO; - - if (value.Equals((4108).ToString())) - return LCID.FRENCH_SWITZERLAND; - - if (value.Equals((1071).ToString())) - return LCID.FYRO_MACEDONIAN; - - if (value.Equals((1110).ToString())) - return LCID.GALICIAN; - - if (value.Equals((1079).ToString())) - return LCID.GEORGIAN; - - if (value.Equals((3079).ToString())) - return LCID.GERMAN_AUSTRIA; - - if (value.Equals((1031).ToString())) - return LCID.GERMAN_GERMANY; - - if (value.Equals((5127).ToString())) - return LCID.GERMAN_LIECHTENSTEIN; - - if (value.Equals((4103).ToString())) - return LCID.GERMAN_LUXEMBOURG; - - if (value.Equals((2055).ToString())) - return LCID.GERMAN_SWITZERLAND; - - if (value.Equals((1032).ToString())) - return LCID.GREEK; - - if (value.Equals((1095).ToString())) - return LCID.GUJARATI; - - if (value.Equals((1037).ToString())) - return LCID.HEBREW; - - if (value.Equals((1081).ToString())) - return LCID.HINDI_INDIA; - - if (value.Equals((1038).ToString())) - return LCID.HUNGARIAN; - - if (value.Equals((1039).ToString())) - return LCID.ICELANDIC; - - if (value.Equals((1057).ToString())) - return LCID.INDONESIAN; - - if (value.Equals((1040).ToString())) - return LCID.ITALIAN_ITALY; - - if (value.Equals((2064).ToString())) - return LCID.ITALIAN_SWITZERLAND; - - if (value.Equals((1041).ToString())) - return LCID.JAPANESE; - - if (value.Equals((1099).ToString())) - return LCID.KANNADA; - - if (value.Equals((1087).ToString())) - return LCID.KAZAKH; - - if (value.Equals((1107).ToString())) - return LCID.KHMER; - - if (value.Equals((1111).ToString())) - return LCID.KONKANI; - - if (value.Equals((1042).ToString())) - return LCID.KOREAN; - - if (value.Equals((1088).ToString())) - return LCID.KYRGYZ_CYRILICK; - - if (value.Equals((1062).ToString())) - return LCID.LATVIAN; - - if (value.Equals((1063).ToString())) - return LCID.LITHUANIAN; - - if (value.Equals((1086).ToString())) - return LCID.MALAY_MALAYSIA; - - if (value.Equals((2110).ToString())) - return LCID.MALAY_BRUNEI_DARUSSALAM; - - if (value.Equals((1082).ToString())) - return LCID.MALTESE; - - if (value.Equals((1102).ToString())) - return LCID.MARATHI; - - if (value.Equals((1104).ToString())) - return LCID.MONGOLIAN_CYRILIC; - - if (value.Equals((1044).ToString())) - return LCID.NORWEGIAN_BOKMAL; - - if (value.Equals((2068).ToString())) - return LCID.NORWEGIAN_NYORSK; - - if (value.Equals((1045).ToString())) - return LCID.POLISH; - - if (value.Equals((1046).ToString())) - return LCID.PORTUGUESE_BRAZIL; - - if (value.Equals((2070).ToString())) - return LCID.PORTUGUESE_PORTUGAL; - - if (value.Equals((1094).ToString())) - return LCID.PUNJABI; - - if (value.Equals((1047).ToString())) - return LCID.RHAETO_ROMANIC; - - if (value.Equals((1048).ToString())) - return LCID.ROMANIAN; - - if (value.Equals((1049).ToString())) - return LCID.RUSSIAN; - - if (value.Equals((1103).ToString())) - return LCID.SANSKRIT; - - if (value.Equals((3098).ToString())) - return LCID.SERBIAN_CYRILIC; - - if (value.Equals((2074).ToString())) - return LCID.SERBIAN_LATIN; - - if (value.Equals((1115).ToString())) - return LCID.SINHALA; - - if (value.Equals((1051).ToString())) - return LCID.SLOVAK; - - if (value.Equals((1060).ToString())) - return LCID.SLOVENIAN; - - if (value.Equals((11274).ToString())) - return LCID.SPANISH_ARGENTINA; - - if (value.Equals((16394).ToString())) - return LCID.SPANISH_BOLIVIA; - - if (value.Equals((13322).ToString())) - return LCID.SPANISH_CHILE; - - if (value.Equals((9226).ToString())) - return LCID.SPANICH_COLOMBIA; - - if (value.Equals((5130).ToString())) - return LCID.SPANISH_COSTA_RICA; - - if (value.Equals((7178).ToString())) - return LCID.SPANISH_DOMINICAN_REPUBLIC; - - if (value.Equals((12298).ToString())) - return LCID.SPANISH_ECUADOR; - - if (value.Equals((17418).ToString())) - return LCID.SPANISH_EL_SALVADOR; - - if (value.Equals((4106).ToString())) - return LCID.SPANISH_GUATEMALA; - - if (value.Equals((18442).ToString())) - return LCID.SPANISH_HONDURAS; - - if (value.Equals((2058).ToString())) - return LCID.SPANISH_MEXICO; - - if (value.Equals((19466).ToString())) - return LCID.SPANISH_NICARAGUA; - - if (value.Equals((6154).ToString())) - return LCID.SPANISH_PANAMA; - - if (value.Equals((15370).ToString())) - return LCID.SPANISH_PARAGUAY; - - if (value.Equals((10250).ToString())) - return LCID.SPANISH_PERU; - - if (value.Equals((20490).ToString())) - return LCID.SPANISH_PUERTO_RICO; - - if (value.Equals((1034).ToString())) - return LCID.SPANISH_TRADITIONAL_SORT; - - if (value.Equals((3082).ToString())) - return LCID.SPANISH_INTERNATIONAL_SORT; - - if (value.Equals((14346).ToString())) - return LCID.SPANISH_URUGUAY; - - if (value.Equals((8202).ToString())) - return LCID.SPANISH_VENEZUELA; - - if (value.Equals((1089).ToString())) - return LCID.SWAHILI; - - if (value.Equals((1053).ToString())) - return LCID.SWEDISH; - - if (value.Equals((2077).ToString())) - return LCID.SWEDISH_FINLAND; - - if (value.Equals((1114).ToString())) - return LCID.SYRIAC; - - if (value.Equals((1097).ToString())) - return LCID.TAMIL; - - if (value.Equals((1092).ToString())) - return LCID.TATAR; - - if (value.Equals((1098).ToString())) - return LCID.TELUGU; - - if (value.Equals((1054).ToString())) - return LCID.THAI_THAILAND; - - if (value.Equals((1055).ToString())) - return LCID.TURKISH; - - if (value.Equals((1064).ToString())) - return LCID.TAJIK_CYRILLIC; - - if (value.Equals((1090).ToString())) - return LCID.TURKMEN; - - if (value.Equals((1058).ToString())) - return LCID.UKRAINIAN; - - if (value.Equals((1056).ToString())) - return LCID.URDU; - - if (value.Equals((2115).ToString())) - return LCID.UZBEK_CYRILIC; - - if (value.Equals((1091).ToString())) - return LCID.UZBEK_LATIN; - - if (value.Equals((1066).ToString())) - return LCID.VIETNAMESE; - - if (value.Equals((50001).ToString())) - return LCID.CTC_SIMPLIFIED; - - if (value.Equals((50002).ToString())) - return LCID.CTC_TRADITIONAL; - - if (value.Equals((2117).ToString())) - return LCID.BENGALI_BANGLADESH; - - if (value.Equals((1093).ToString())) - return LCID.BENGALI_INDIA; - - if (value.Equals((1101).ToString())) - return LCID.ASSAMESE; - - if (value.Equals((1096).ToString())) - return LCID.ORIYA; - - if (value.Equals((1100).ToString())) - return LCID.MALAYALAM; - - if (value.Equals((1108).ToString())) - return LCID.LAO; - - if (value.Equals((1113).ToString())) - return LCID.SINDHI_INDIA; - - if (value.Equals((1118).ToString())) - return LCID.AMHARIC; - - if (value.Equals((1120).ToString())) - return LCID.KASHMIRI; - - if (value.Equals((1121).ToString())) - return LCID.NEPALI; - - if (value.Equals((1123).ToString())) - return LCID.PASHTO; - - if (value.Equals((2137).ToString())) - return LCID.SINDHI; - - if (value.Equals((4096).ToString())) - return LCID.ARABIC; - - if (value.Equals((10000).ToString())) - return LCID.BANK_CARD_NUMBER; - - if (value.Equals((10001).ToString())) - return LCID.BANK_CARD_EXPIRY_DATE; - - if (value.Equals((10002).ToString())) - return LCID.BANK_CARD_NAME; - - if (value.Equals((10003).ToString())) - return LCID.BANK_CARD; - - if (value.Equals((10004).ToString())) - return LCID.BANK_CARD_CVV2; - - if (value.Equals((10011).ToString())) - return LCID.ABKHAZIAN; - - if (value.Equals((10012).ToString())) - return LCID.KARAKALPAK; - - if (value.Equals((10560).ToString())) - return LCID.URDU_DETECTION; - - throw new NotImplementedException($"Could not convert value to type LCID: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static LCID? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return LCID.LATIN; - - if (value.Equals((1078).ToString())) - return LCID.AFRIKAANS; - - if (value.Equals((1052).ToString())) - return LCID.ALBANIAN; - - if (value.Equals((5121).ToString())) - return LCID.ARABIC_ALGERIA; - - if (value.Equals((15361).ToString())) - return LCID.ARABIC_BAHRAIN; - - if (value.Equals((3073).ToString())) - return LCID.ARABIC_EGYPT; - - if (value.Equals((2049).ToString())) - return LCID.ARABIC_IRAQ; - - if (value.Equals((11265).ToString())) - return LCID.ARABIC_JORDAN; - - if (value.Equals((13313).ToString())) - return LCID.ARABIC_KUWAIT; - - if (value.Equals((12289).ToString())) - return LCID.ARABIC_LEBANON; - - if (value.Equals((4097).ToString())) - return LCID.ARABIC_LIBYA; - - if (value.Equals((6145).ToString())) - return LCID.ARABIC_MOROCCO; - - if (value.Equals((8193).ToString())) - return LCID.ARABIC_OMAN; - - if (value.Equals((16385).ToString())) - return LCID.ARABIC_QATAR; - - if (value.Equals((1025).ToString())) - return LCID.ARABIC_SAUDI_ARABIA; - - if (value.Equals((10241).ToString())) - return LCID.ARABIC_SYRIA; - - if (value.Equals((7169).ToString())) - return LCID.ARABIC_TUNISIA; - - if (value.Equals((14337).ToString())) - return LCID.ARABIC_UAE; - - if (value.Equals((9217).ToString())) - return LCID.ARABIC_YEMEN; - - if (value.Equals((1067).ToString())) - return LCID.ARABIC_ARMENIAN; - - if (value.Equals((2092).ToString())) - return LCID.AZERI_CYRILIC; - - if (value.Equals((1068).ToString())) - return LCID.AZERI_LATIN; - - if (value.Equals((1069).ToString())) - return LCID.BASQUE; - - if (value.Equals((1059).ToString())) - return LCID.BELARUSIAN; - - if (value.Equals((1026).ToString())) - return LCID.BULGARIAN; - - if (value.Equals((1109).ToString())) - return LCID.BURMESE; - - if (value.Equals((1027).ToString())) - return LCID.CATALAN; - - if (value.Equals((3076).ToString())) - return LCID.CHINESE_HONGKONG_SAR; - - if (value.Equals((5124).ToString())) - return LCID.CHINESE_MACAO_SAR; - - if (value.Equals((2052).ToString())) - return LCID.CHINESE; - - if (value.Equals((4100).ToString())) - return LCID.CHINESE_SINGAPORE; - - if (value.Equals((1028).ToString())) - return LCID.CHINESE_TAIWAN; - - if (value.Equals((1050).ToString())) - return LCID.CROATIAN; - - if (value.Equals((1029).ToString())) - return LCID.CZECH; - - if (value.Equals((1030).ToString())) - return LCID.DANISH; - - if (value.Equals((1125).ToString())) - return LCID.DIVEHI; - - if (value.Equals((2067).ToString())) - return LCID.DUTCH_BELGIUM; - - if (value.Equals((1043).ToString())) - return LCID.DUTCH_NETHERLANDS; - - if (value.Equals((3081).ToString())) - return LCID.ENGLISH_AUSTRALIA; - - if (value.Equals((10249).ToString())) - return LCID.ENGLISH_BELIZE; - - if (value.Equals((4105).ToString())) - return LCID.ENGLISH_CANADA; - - if (value.Equals((9225).ToString())) - return LCID.ENGLISH_CARRIBEAN; - - if (value.Equals((6153).ToString())) - return LCID.ENGLISH_IRELAND; - - if (value.Equals((8201).ToString())) - return LCID.ENGLISH_JAMAICA; - - if (value.Equals((5129).ToString())) - return LCID.ENGLISH_NEW_ZEALAND; - - if (value.Equals((13321).ToString())) - return LCID.ENGLISH_PHILIPPINES; - - if (value.Equals((7177).ToString())) - return LCID.ENGLISH_SOUTH_AFRICA; - - if (value.Equals((11273).ToString())) - return LCID.ENGLISH_TRINIDAD; - - if (value.Equals((2057).ToString())) - return LCID.ENGLISH_UK; - - if (value.Equals((1033).ToString())) - return LCID.ENGLISH_US; - - if (value.Equals((12297).ToString())) - return LCID.ENGLISH_ZIMBABWE; - - if (value.Equals((1061).ToString())) - return LCID.ESTONIAN; - - if (value.Equals((1080).ToString())) - return LCID.FAEROESE; - - if (value.Equals((1065).ToString())) - return LCID.FARSI; - - if (value.Equals((1035).ToString())) - return LCID.FINNISH; - - if (value.Equals((2060).ToString())) - return LCID.FRENCH_BELGIUM; - - if (value.Equals((3084).ToString())) - return LCID.FRENCH_CANADA; - - if (value.Equals((1036).ToString())) - return LCID.FRENCH_FRANCE; - - if (value.Equals((5132).ToString())) - return LCID.FRENCH_LUXEMBOURG; - - if (value.Equals((6156).ToString())) - return LCID.FRENCH_MONACO; - - if (value.Equals((4108).ToString())) - return LCID.FRENCH_SWITZERLAND; - - if (value.Equals((1071).ToString())) - return LCID.FYRO_MACEDONIAN; - - if (value.Equals((1110).ToString())) - return LCID.GALICIAN; - - if (value.Equals((1079).ToString())) - return LCID.GEORGIAN; - - if (value.Equals((3079).ToString())) - return LCID.GERMAN_AUSTRIA; - - if (value.Equals((1031).ToString())) - return LCID.GERMAN_GERMANY; - - if (value.Equals((5127).ToString())) - return LCID.GERMAN_LIECHTENSTEIN; - - if (value.Equals((4103).ToString())) - return LCID.GERMAN_LUXEMBOURG; - - if (value.Equals((2055).ToString())) - return LCID.GERMAN_SWITZERLAND; - - if (value.Equals((1032).ToString())) - return LCID.GREEK; - - if (value.Equals((1095).ToString())) - return LCID.GUJARATI; - - if (value.Equals((1037).ToString())) - return LCID.HEBREW; - - if (value.Equals((1081).ToString())) - return LCID.HINDI_INDIA; - - if (value.Equals((1038).ToString())) - return LCID.HUNGARIAN; - - if (value.Equals((1039).ToString())) - return LCID.ICELANDIC; - - if (value.Equals((1057).ToString())) - return LCID.INDONESIAN; - - if (value.Equals((1040).ToString())) - return LCID.ITALIAN_ITALY; - - if (value.Equals((2064).ToString())) - return LCID.ITALIAN_SWITZERLAND; - - if (value.Equals((1041).ToString())) - return LCID.JAPANESE; - - if (value.Equals((1099).ToString())) - return LCID.KANNADA; - - if (value.Equals((1087).ToString())) - return LCID.KAZAKH; - - if (value.Equals((1107).ToString())) - return LCID.KHMER; - - if (value.Equals((1111).ToString())) - return LCID.KONKANI; - - if (value.Equals((1042).ToString())) - return LCID.KOREAN; - - if (value.Equals((1088).ToString())) - return LCID.KYRGYZ_CYRILICK; - - if (value.Equals((1062).ToString())) - return LCID.LATVIAN; - - if (value.Equals((1063).ToString())) - return LCID.LITHUANIAN; - - if (value.Equals((1086).ToString())) - return LCID.MALAY_MALAYSIA; - - if (value.Equals((2110).ToString())) - return LCID.MALAY_BRUNEI_DARUSSALAM; - - if (value.Equals((1082).ToString())) - return LCID.MALTESE; - - if (value.Equals((1102).ToString())) - return LCID.MARATHI; - - if (value.Equals((1104).ToString())) - return LCID.MONGOLIAN_CYRILIC; - - if (value.Equals((1044).ToString())) - return LCID.NORWEGIAN_BOKMAL; - - if (value.Equals((2068).ToString())) - return LCID.NORWEGIAN_NYORSK; - - if (value.Equals((1045).ToString())) - return LCID.POLISH; - - if (value.Equals((1046).ToString())) - return LCID.PORTUGUESE_BRAZIL; - - if (value.Equals((2070).ToString())) - return LCID.PORTUGUESE_PORTUGAL; - - if (value.Equals((1094).ToString())) - return LCID.PUNJABI; - - if (value.Equals((1047).ToString())) - return LCID.RHAETO_ROMANIC; - - if (value.Equals((1048).ToString())) - return LCID.ROMANIAN; - - if (value.Equals((1049).ToString())) - return LCID.RUSSIAN; - - if (value.Equals((1103).ToString())) - return LCID.SANSKRIT; - - if (value.Equals((3098).ToString())) - return LCID.SERBIAN_CYRILIC; - - if (value.Equals((2074).ToString())) - return LCID.SERBIAN_LATIN; - - if (value.Equals((1115).ToString())) - return LCID.SINHALA; - - if (value.Equals((1051).ToString())) - return LCID.SLOVAK; - - if (value.Equals((1060).ToString())) - return LCID.SLOVENIAN; - - if (value.Equals((11274).ToString())) - return LCID.SPANISH_ARGENTINA; - - if (value.Equals((16394).ToString())) - return LCID.SPANISH_BOLIVIA; - - if (value.Equals((13322).ToString())) - return LCID.SPANISH_CHILE; - - if (value.Equals((9226).ToString())) - return LCID.SPANICH_COLOMBIA; - - if (value.Equals((5130).ToString())) - return LCID.SPANISH_COSTA_RICA; - - if (value.Equals((7178).ToString())) - return LCID.SPANISH_DOMINICAN_REPUBLIC; - - if (value.Equals((12298).ToString())) - return LCID.SPANISH_ECUADOR; - - if (value.Equals((17418).ToString())) - return LCID.SPANISH_EL_SALVADOR; - - if (value.Equals((4106).ToString())) - return LCID.SPANISH_GUATEMALA; - - if (value.Equals((18442).ToString())) - return LCID.SPANISH_HONDURAS; - - if (value.Equals((2058).ToString())) - return LCID.SPANISH_MEXICO; - - if (value.Equals((19466).ToString())) - return LCID.SPANISH_NICARAGUA; - - if (value.Equals((6154).ToString())) - return LCID.SPANISH_PANAMA; - - if (value.Equals((15370).ToString())) - return LCID.SPANISH_PARAGUAY; - - if (value.Equals((10250).ToString())) - return LCID.SPANISH_PERU; - - if (value.Equals((20490).ToString())) - return LCID.SPANISH_PUERTO_RICO; - - if (value.Equals((1034).ToString())) - return LCID.SPANISH_TRADITIONAL_SORT; - - if (value.Equals((3082).ToString())) - return LCID.SPANISH_INTERNATIONAL_SORT; - - if (value.Equals((14346).ToString())) - return LCID.SPANISH_URUGUAY; - - if (value.Equals((8202).ToString())) - return LCID.SPANISH_VENEZUELA; - - if (value.Equals((1089).ToString())) - return LCID.SWAHILI; - - if (value.Equals((1053).ToString())) - return LCID.SWEDISH; - - if (value.Equals((2077).ToString())) - return LCID.SWEDISH_FINLAND; - - if (value.Equals((1114).ToString())) - return LCID.SYRIAC; - - if (value.Equals((1097).ToString())) - return LCID.TAMIL; - - if (value.Equals((1092).ToString())) - return LCID.TATAR; - - if (value.Equals((1098).ToString())) - return LCID.TELUGU; - - if (value.Equals((1054).ToString())) - return LCID.THAI_THAILAND; - - if (value.Equals((1055).ToString())) - return LCID.TURKISH; - - if (value.Equals((1064).ToString())) - return LCID.TAJIK_CYRILLIC; - - if (value.Equals((1090).ToString())) - return LCID.TURKMEN; - - if (value.Equals((1058).ToString())) - return LCID.UKRAINIAN; - - if (value.Equals((1056).ToString())) - return LCID.URDU; - - if (value.Equals((2115).ToString())) - return LCID.UZBEK_CYRILIC; - - if (value.Equals((1091).ToString())) - return LCID.UZBEK_LATIN; - - if (value.Equals((1066).ToString())) - return LCID.VIETNAMESE; - - if (value.Equals((50001).ToString())) - return LCID.CTC_SIMPLIFIED; - - if (value.Equals((50002).ToString())) - return LCID.CTC_TRADITIONAL; - - if (value.Equals((2117).ToString())) - return LCID.BENGALI_BANGLADESH; - - if (value.Equals((1093).ToString())) - return LCID.BENGALI_INDIA; - - if (value.Equals((1101).ToString())) - return LCID.ASSAMESE; - - if (value.Equals((1096).ToString())) - return LCID.ORIYA; - - if (value.Equals((1100).ToString())) - return LCID.MALAYALAM; - - if (value.Equals((1108).ToString())) - return LCID.LAO; - - if (value.Equals((1113).ToString())) - return LCID.SINDHI_INDIA; - - if (value.Equals((1118).ToString())) - return LCID.AMHARIC; - - if (value.Equals((1120).ToString())) - return LCID.KASHMIRI; - - if (value.Equals((1121).ToString())) - return LCID.NEPALI; - - if (value.Equals((1123).ToString())) - return LCID.PASHTO; - - if (value.Equals((2137).ToString())) - return LCID.SINDHI; - - if (value.Equals((4096).ToString())) - return LCID.ARABIC; - - if (value.Equals((10000).ToString())) - return LCID.BANK_CARD_NUMBER; - - if (value.Equals((10001).ToString())) - return LCID.BANK_CARD_EXPIRY_DATE; - - if (value.Equals((10002).ToString())) - return LCID.BANK_CARD_NAME; - - if (value.Equals((10003).ToString())) - return LCID.BANK_CARD; - - if (value.Equals((10004).ToString())) - return LCID.BANK_CARD_CVV2; - - if (value.Equals((10011).ToString())) - return LCID.ABKHAZIAN; - - if (value.Equals((10012).ToString())) - return LCID.KARAKALPAK; - - if (value.Equals((10560).ToString())) - return LCID.URDU_DETECTION; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(LCID value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class LCIDJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override LCID Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - LCID? result = rawValue == null - ? null - : LCIDValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the LCID to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, LCID lCID, JsonSerializerOptions options) - { - writer.WriteStringValue(lCID.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class LCIDNullableJsonConverter : JsonConverter - { - /// - /// Returns a LCID from the Json object - /// - /// - /// - /// - /// - public override LCID? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - LCID? result = rawValue == null - ? null - : LCIDValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, LCID? lCID, JsonSerializerOptions options) - { - writer.WriteStringValue(lCID?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs index a510f8e..4d9dc8f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Lexical data analysis allows you to compare the results of reading the text data of the MRZ, the document filling area, barcodes and data from the memory of the RFID chip for an additional assessment of the authenticity of the document. Single result for all pages. Consider using Result.TEXT type for more simplicity. /// + [DataContract(Name = "LexicalAnalysisResult")] public partial class LexicalAnalysisResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// listVerifiedFields - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public LexicalAnalysisResult(ListVerifiedFields listVerifiedFields, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected LexicalAnalysisResult() { } + /// + /// Initializes a new instance of the class. + /// + /// listVerifiedFields (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public LexicalAnalysisResult(ListVerifiedFields listVerifiedFields = default(ListVerifiedFields), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - ListVerifiedFields = listVerifiedFields; - OnCreated(); + // to ensure "listVerifiedFields" is required (not null) + if (listVerifiedFields == null) + { + throw new ArgumentNullException("listVerifiedFields is a required property for LexicalAnalysisResult and cannot be null"); + } + this.ListVerifiedFields = listVerifiedFields; } - partial void OnCreated(); - /// /// Gets or Sets ListVerifiedFields /// - [JsonPropertyName("ListVerifiedFields")] + [DataMember(Name = "ListVerifiedFields", IsRequired = true, EmitDefaultValue = true)] public ListVerifiedFields ListVerifiedFields { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LexicalAnalysisResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" ListVerifiedFields: ").Append(ListVerifiedFields).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class LexicalAnalysisResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override LexicalAnalysisResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option listVerifiedFields = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ListVerifiedFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listVerifiedFields = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!listVerifiedFields.IsSet) - throw new ArgumentException("Property is required for class LexicalAnalysisResult.", nameof(listVerifiedFields)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class LexicalAnalysisResult.", nameof(resultType)); - - if (listVerifiedFields.IsSet && listVerifiedFields.Value == null) - throw new ArgumentNullException(nameof(listVerifiedFields), "Property is not nullable for class LexicalAnalysisResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class LexicalAnalysisResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class LexicalAnalysisResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class LexicalAnalysisResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class LexicalAnalysisResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class LexicalAnalysisResult."); - - return new LexicalAnalysisResult(listVerifiedFields.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, LexicalAnalysisResult lexicalAnalysisResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, lexicalAnalysisResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, LexicalAnalysisResult lexicalAnalysisResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (lexicalAnalysisResult.ListVerifiedFields == null) - throw new ArgumentNullException(nameof(lexicalAnalysisResult.ListVerifiedFields), "Property is required for class LexicalAnalysisResult."); - - writer.WritePropertyName("ListVerifiedFields"); - JsonSerializer.Serialize(writer, lexicalAnalysisResult.ListVerifiedFields, jsonSerializerOptions); - if (lexicalAnalysisResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", lexicalAnalysisResult.BufLengthOption.Value!.Value); - - if (lexicalAnalysisResult.LightOption.IsSet) - writer.WriteNumber("light", lexicalAnalysisResult.LightOption.Value!.Value); - - if (lexicalAnalysisResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", lexicalAnalysisResult.ListIdxOption.Value!.Value); - - if (lexicalAnalysisResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", lexicalAnalysisResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", lexicalAnalysisResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs index 9694fed..cb03ab5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,39 +14,51 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// LicenseItem /// + [DataContract(Name = "LicenseItem")] public partial class LicenseItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Base64 encoded data - [JsonConstructor] - public LicenseItem(byte[] license) + [JsonConstructorAttribute] + protected LicenseItem() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded data (required). + public LicenseItem(byte[] license = default(byte[])) { - License = license; - OnCreated(); + // to ensure "license" is required (not null) + if (license == null) + { + throw new ArgumentNullException("license is a required property for LicenseItem and cannot be null"); + } + this.License = license; } - partial void OnCreated(); - /// /// Base64 encoded data /// /// Base64 encoded data - /* [B@32eb43ed */ - [JsonPropertyName("License")] + /* + [B@5f6febe8 + */ + [DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)] public byte[] License { get; set; } /// @@ -64,6 +74,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -75,93 +94,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class LicenseItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override LicenseItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option license = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "License": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - license = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!license.IsSet) - throw new ArgumentException("Property is required for class LicenseItem.", nameof(license)); - - if (license.IsSet && license.Value == null) - throw new ArgumentNullException(nameof(license), "Property is not nullable for class LicenseItem."); - - return new LicenseItem(license.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, LicenseItem licenseItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, licenseItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, LicenseItem licenseItem, JsonSerializerOptions jsonSerializerOptions) - { - if (licenseItem.License == null) - throw new ArgumentNullException(nameof(licenseItem.License), "Property is required for class LicenseItem."); - - writer.WritePropertyName("License"); - JsonSerializer.Serialize(writer, licenseItem.License, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs index f6f9bed..63b85d1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,43 +14,57 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains license /// + [DataContract(Name = "LicenseResult")] public partial class LicenseResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Base64 encoded data - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public LicenseResult(byte[] license, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected LicenseResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Base64 encoded data (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public LicenseResult(byte[] license = default(byte[]), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - License = license; - OnCreated(); + // to ensure "license" is required (not null) + if (license == null) + { + throw new ArgumentNullException("license is a required property for LicenseResult and cannot be null"); + } + this.License = license; } - partial void OnCreated(); - /// /// Base64 encoded data /// /// Base64 encoded data - /* [B@32eb43ed */ - [JsonPropertyName("License")] + /* + [B@5f6febe8 + */ + [DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)] public byte[] License { get; set; } /// @@ -63,156 +75,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class LicenseResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" License: ").Append(License).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class LicenseResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override LicenseResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option license = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "License": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - license = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!license.IsSet) - throw new ArgumentException("Property is required for class LicenseResult.", nameof(license)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class LicenseResult.", nameof(resultType)); - - if (license.IsSet && license.Value == null) - throw new ArgumentNullException(nameof(license), "Property is not nullable for class LicenseResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class LicenseResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class LicenseResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class LicenseResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class LicenseResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class LicenseResult."); - - return new LicenseResult(license.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, LicenseResult licenseResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, licenseResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, LicenseResult licenseResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (licenseResult.License == null) - throw new ArgumentNullException(nameof(licenseResult.License), "Property is required for class LicenseResult."); - - writer.WritePropertyName("License"); - JsonSerializer.Serialize(writer, licenseResult.License, jsonSerializerOptions); - if (licenseResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", licenseResult.BufLengthOption.Value!.Value); - - if (licenseResult.LightOption.IsSet) - writer.WriteNumber("light", licenseResult.LightOption.Value!.Value); - - if (licenseResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", licenseResult.ListIdxOption.Value!.Value); - - if (licenseResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", licenseResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", licenseResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/Light.cs b/src/Regula.DocumentReader.WebClient/Model/Light.cs index d200256..dfa0186 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Light.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Light.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -242,369 +243,4 @@ public enum Light: long WHITE_SPECIAL = 4194304 } - /// - /// Converts to and from the JSON value - /// - public static class LightValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static Light FromString(string value) - { - if (value.Equals((0).ToString())) - return Light.OFF; - - if (value.Equals((1).ToString())) - return Light.OVI; - - if (value.Equals((2).ToString())) - return Light.WHITE_TOP; - - if (value.Equals((4).ToString())) - return Light.WHITE_SIDE; - - if (value.Equals((8388608).ToString())) - return Light.WHITE_FRONT; - - if (value.Equals((6).ToString())) - return Light.WHITE; - - if (value.Equals((8).ToString())) - return Light.IR_TOP; - - if (value.Equals((16).ToString())) - return Light.IR_SIDE; - - if (value.Equals((16777216).ToString())) - return Light.IR_FRONT; - - if (value.Equals((24).ToString())) - return Light.IR; - - if (value.Equals((33554432).ToString())) - return Light.WHITE_GRAY; - - if (value.Equals((128).ToString())) - return Light.UV; - - if (value.Equals((67108864).ToString())) - return Light.OVD; - - if (value.Equals((134217728).ToString())) - return Light.VIDEODETECTION; - - if (value.Equals((268435456).ToString())) - return Light.IR_870_OBL; - - if (value.Equals((256).ToString())) - return Light.IR_LUMINESCENCE; - - if (value.Equals((1024).ToString())) - return Light.AXIAL_WHITE_LEFT; - - if (value.Equals((2048).ToString())) - return Light.AXIAL_WHITE_RIGHT; - - if (value.Equals((512).ToString())) - return Light.AXIAL_WHITE_FRONT; - - if (value.Equals((4096).ToString())) - return Light.IR_720; - - if (value.Equals((8192).ToString())) - return Light.IR_940; - - if (value.Equals((3072).ToString())) - return Light.AXIAL_WHITE_FULL; - - if (value.Equals((2147483648).ToString())) - return Light.RAW_DATA; - - if (value.Equals((2415919104).ToString())) - return Light.RAW_DATA_GRBG; - - if (value.Equals((2684354560).ToString())) - return Light.RAW_DATA_GBGR; - - if (value.Equals((2952790016).ToString())) - return Light.RAW_DATA_RGGB; - - if (value.Equals((3221225472).ToString())) - return Light.RAW_DATA_BGGR; - - if (value.Equals((32).ToString())) - return Light.TRANSMITTED; - - if (value.Equals((64).ToString())) - return Light.TRANSMITTED_IR; - - if (value.Equals((65536).ToString())) - return Light.ANTI_STOKES; - - if (value.Equals((16384).ToString())) - return Light.TRANSMITTED_IR940; - - if (value.Equals((262144).ToString())) - return Light.OVD_RIGHT; - - if (value.Equals((131072).ToString())) - return Light.OVD_LEFT; - - if (value.Equals((32768).ToString())) - return Light.IR_700; - - if (value.Equals((16777216).ToString())) - return Light.IR_870; - - if (value.Equals((67108864).ToString())) - return Light.HOLO; - - if (value.Equals((64).ToString())) - return Light.IR_BOTTOM; - - if (value.Equals((32).ToString())) - return Light.WHITE_BOTTOM; - - if (value.Equals((524288).ToString())) - return Light.UVC; - - if (value.Equals((1048576).ToString())) - return Light.UVB; - - if (value.Equals((2097152).ToString())) - return Light.WHITE_OBL; - - if (value.Equals((4194304).ToString())) - return Light.WHITE_SPECIAL; - - throw new NotImplementedException($"Could not convert value to type Light: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static Light? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return Light.OFF; - - if (value.Equals((1).ToString())) - return Light.OVI; - - if (value.Equals((2).ToString())) - return Light.WHITE_TOP; - - if (value.Equals((4).ToString())) - return Light.WHITE_SIDE; - - if (value.Equals((8388608).ToString())) - return Light.WHITE_FRONT; - - if (value.Equals((6).ToString())) - return Light.WHITE; - - if (value.Equals((8).ToString())) - return Light.IR_TOP; - - if (value.Equals((16).ToString())) - return Light.IR_SIDE; - - if (value.Equals((16777216).ToString())) - return Light.IR_FRONT; - - if (value.Equals((24).ToString())) - return Light.IR; - - if (value.Equals((33554432).ToString())) - return Light.WHITE_GRAY; - - if (value.Equals((128).ToString())) - return Light.UV; - - if (value.Equals((67108864).ToString())) - return Light.OVD; - - if (value.Equals((134217728).ToString())) - return Light.VIDEODETECTION; - - if (value.Equals((268435456).ToString())) - return Light.IR_870_OBL; - - if (value.Equals((256).ToString())) - return Light.IR_LUMINESCENCE; - - if (value.Equals((1024).ToString())) - return Light.AXIAL_WHITE_LEFT; - - if (value.Equals((2048).ToString())) - return Light.AXIAL_WHITE_RIGHT; - - if (value.Equals((512).ToString())) - return Light.AXIAL_WHITE_FRONT; - - if (value.Equals((4096).ToString())) - return Light.IR_720; - - if (value.Equals((8192).ToString())) - return Light.IR_940; - - if (value.Equals((3072).ToString())) - return Light.AXIAL_WHITE_FULL; - - if (value.Equals((2147483648).ToString())) - return Light.RAW_DATA; - - if (value.Equals((2415919104).ToString())) - return Light.RAW_DATA_GRBG; - - if (value.Equals((2684354560).ToString())) - return Light.RAW_DATA_GBGR; - - if (value.Equals((2952790016).ToString())) - return Light.RAW_DATA_RGGB; - - if (value.Equals((3221225472).ToString())) - return Light.RAW_DATA_BGGR; - - if (value.Equals((32).ToString())) - return Light.TRANSMITTED; - - if (value.Equals((64).ToString())) - return Light.TRANSMITTED_IR; - - if (value.Equals((65536).ToString())) - return Light.ANTI_STOKES; - - if (value.Equals((16384).ToString())) - return Light.TRANSMITTED_IR940; - - if (value.Equals((262144).ToString())) - return Light.OVD_RIGHT; - - if (value.Equals((131072).ToString())) - return Light.OVD_LEFT; - - if (value.Equals((32768).ToString())) - return Light.IR_700; - - if (value.Equals((16777216).ToString())) - return Light.IR_870; - - if (value.Equals((67108864).ToString())) - return Light.HOLO; - - if (value.Equals((64).ToString())) - return Light.IR_BOTTOM; - - if (value.Equals((32).ToString())) - return Light.WHITE_BOTTOM; - - if (value.Equals((524288).ToString())) - return Light.UVC; - - if (value.Equals((1048576).ToString())) - return Light.UVB; - - if (value.Equals((2097152).ToString())) - return Light.WHITE_OBL; - - if (value.Equals((4194304).ToString())) - return Light.WHITE_SPECIAL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static long ToJsonValue(Light value) - { - return (long) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class LightJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override Light Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Light? result = rawValue == null - ? null - : LightValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the Light to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Light light, JsonSerializerOptions options) - { - writer.WriteStringValue(light.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class LightNullableJsonConverter : JsonConverter - { - /// - /// Returns a Light from the Json object - /// - /// - /// - /// - /// - public override Light? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Light? result = rawValue == null - ? null - : LightValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Light? light, JsonSerializerOptions options) - { - writer.WriteStringValue(light?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs index 6442468..4bfd0e0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,60 +14,46 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ListTransactionsByTagResponse /// + [DataContract(Name = "ListTransactionsByTagResponse")] public partial class ListTransactionsByTagResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// items - /// metadata - [JsonConstructor] - public ListTransactionsByTagResponse(Option?> items = default, Option?> metadata = default) + /// items. + /// metadata. + public ListTransactionsByTagResponse(List items = default(List), Dictionary metadata = default(Dictionary)) { - ItemsOption = items; - MetadataOption = metadata; - OnCreated(); + this.Items = items; + this.Metadata = metadata; } - partial void OnCreated(); - - /// - /// Used to track the state of Items - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ItemsOption { get; private set; } - /// /// Gets or Sets Items /// - [JsonPropertyName("items")] - public List? Items { get { return this.ItemsOption; } set { this.ItemsOption = new(value); } } - - /// - /// Used to track the state of Metadata - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> MetadataOption { get; private set; } + [DataMember(Name = "items", EmitDefaultValue = false)] + public List Items { get; set; } /// /// Gets or Sets Metadata /// - [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public Dictionary Metadata { get; set; } /// /// Returns the string presentation of the object @@ -85,6 +69,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -96,109 +89,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ListTransactionsByTagResponseJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ListTransactionsByTagResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> items = default; - Option?> metadata = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "items": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - items = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "metadata": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (items.IsSet && items.Value == null) - throw new ArgumentNullException(nameof(items), "Property is not nullable for class ListTransactionsByTagResponse."); - - if (metadata.IsSet && metadata.Value == null) - throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class ListTransactionsByTagResponse."); - - return new ListTransactionsByTagResponse(items, metadata); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ListTransactionsByTagResponse listTransactionsByTagResponse, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, listTransactionsByTagResponse, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ListTransactionsByTagResponse listTransactionsByTagResponse, JsonSerializerOptions jsonSerializerOptions) - { - if (listTransactionsByTagResponse.ItemsOption.IsSet && listTransactionsByTagResponse.Items == null) - throw new ArgumentNullException(nameof(listTransactionsByTagResponse.Items), "Property is required for class ListTransactionsByTagResponse."); - - if (listTransactionsByTagResponse.MetadataOption.IsSet && listTransactionsByTagResponse.Metadata == null) - throw new ArgumentNullException(nameof(listTransactionsByTagResponse.Metadata), "Property is required for class ListTransactionsByTagResponse."); - - if (listTransactionsByTagResponse.ItemsOption.IsSet) - { - writer.WritePropertyName("items"); - JsonSerializer.Serialize(writer, listTransactionsByTagResponse.Items, jsonSerializerOptions); - } - if (listTransactionsByTagResponse.MetadataOption.IsSet) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, listTransactionsByTagResponse.Metadata, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs index 5534029..6458848 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,62 +14,65 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ListVerifiedFields /// + [DataContract(Name = "ListVerifiedFields")] public partial class ListVerifiedFields : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Number of pFieldMaps array elements - /// pFieldMaps - /// pDateFormat - [JsonConstructor] - public ListVerifiedFields(decimal count, List pFieldMaps, Option pDateFormat = default) + [JsonConstructorAttribute] + protected ListVerifiedFields() { } + /// + /// Initializes a new instance of the class. + /// + /// Number of pFieldMaps array elements (required). + /// pFieldMaps (required). + /// pDateFormat. + public ListVerifiedFields(decimal count = default(decimal), List pFieldMaps = default(List), string pDateFormat = default(string)) { - Count = count; - PFieldMaps = pFieldMaps; - PDateFormatOption = pDateFormat; - OnCreated(); + this.Count = count; + // to ensure "pFieldMaps" is required (not null) + if (pFieldMaps == null) + { + throw new ArgumentNullException("pFieldMaps is a required property for ListVerifiedFields and cannot be null"); + } + this.PFieldMaps = pFieldMaps; + this.PDateFormat = pDateFormat; } - partial void OnCreated(); - /// /// Number of pFieldMaps array elements /// /// Number of pFieldMaps array elements - [JsonPropertyName("Count")] + [DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)] public decimal Count { get; set; } /// /// Gets or Sets PFieldMaps /// - [JsonPropertyName("pFieldMaps")] + [DataMember(Name = "pFieldMaps", IsRequired = true, EmitDefaultValue = true)] public List PFieldMaps { get; set; } - /// - /// Used to track the state of PDateFormat - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PDateFormatOption { get; private set; } - /// /// Gets or Sets PDateFormat /// - [JsonPropertyName("pDateFormat")] - public string? PDateFormat { get { return this.PDateFormatOption; } set { this.PDateFormatOption = new(value); } } + [DataMember(Name = "pDateFormat", EmitDefaultValue = false)] + public string PDateFormat { get; set; } /// /// Returns the string presentation of the object @@ -88,6 +89,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -99,118 +109,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ListVerifiedFieldsJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ListVerifiedFields Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option count = default; - Option?> pFieldMaps = default; - Option pDateFormat = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetDecimal()); - break; - case "pFieldMaps": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pFieldMaps = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "pDateFormat": - pDateFormat = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!count.IsSet) - throw new ArgumentException("Property is required for class ListVerifiedFields.", nameof(count)); - - if (!pFieldMaps.IsSet) - throw new ArgumentException("Property is required for class ListVerifiedFields.", nameof(pFieldMaps)); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class ListVerifiedFields."); - - if (pFieldMaps.IsSet && pFieldMaps.Value == null) - throw new ArgumentNullException(nameof(pFieldMaps), "Property is not nullable for class ListVerifiedFields."); - - if (pDateFormat.IsSet && pDateFormat.Value == null) - throw new ArgumentNullException(nameof(pDateFormat), "Property is not nullable for class ListVerifiedFields."); - - return new ListVerifiedFields(count.Value!.Value!, pFieldMaps.Value!, pDateFormat); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ListVerifiedFields listVerifiedFields, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, listVerifiedFields, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ListVerifiedFields listVerifiedFields, JsonSerializerOptions jsonSerializerOptions) - { - if (listVerifiedFields.PFieldMaps == null) - throw new ArgumentNullException(nameof(listVerifiedFields.PFieldMaps), "Property is required for class ListVerifiedFields."); - - if (listVerifiedFields.PDateFormatOption.IsSet && listVerifiedFields.PDateFormat == null) - throw new ArgumentNullException(nameof(listVerifiedFields.PDateFormat), "Property is required for class ListVerifiedFields."); - - writer.WriteNumber("Count", listVerifiedFields.Count); - - writer.WritePropertyName("pFieldMaps"); - JsonSerializer.Serialize(writer, listVerifiedFields.PFieldMaps, jsonSerializerOptions); - if (listVerifiedFields.PDateFormatOption.IsSet) - writer.WriteString("pDateFormat", listVerifiedFields.PDateFormat); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs index 275d968..c43d41b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFieldsItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ListVerifiedFieldsItem /// + [DataContract(Name = "ListVerifiedFieldsItem")] public partial class ListVerifiedFieldsItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// listVerifiedFields - [JsonConstructor] - public ListVerifiedFieldsItem(ListVerifiedFields listVerifiedFields) + [JsonConstructorAttribute] + protected ListVerifiedFieldsItem() { } + /// + /// Initializes a new instance of the class. + /// + /// listVerifiedFields (required). + public ListVerifiedFieldsItem(ListVerifiedFields listVerifiedFields = default(ListVerifiedFields)) { - ListVerifiedFields = listVerifiedFields; - OnCreated(); + // to ensure "listVerifiedFields" is required (not null) + if (listVerifiedFields == null) + { + throw new ArgumentNullException("listVerifiedFields is a required property for ListVerifiedFieldsItem and cannot be null"); + } + this.ListVerifiedFields = listVerifiedFields; } - partial void OnCreated(); - /// /// Gets or Sets ListVerifiedFields /// - [JsonPropertyName("ListVerifiedFields")] + [DataMember(Name = "ListVerifiedFields", IsRequired = true, EmitDefaultValue = true)] public ListVerifiedFields ListVerifiedFields { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ListVerifiedFieldsItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ListVerifiedFieldsItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option listVerifiedFields = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ListVerifiedFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listVerifiedFields = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!listVerifiedFields.IsSet) - throw new ArgumentException("Property is required for class ListVerifiedFieldsItem.", nameof(listVerifiedFields)); - - if (listVerifiedFields.IsSet && listVerifiedFields.Value == null) - throw new ArgumentNullException(nameof(listVerifiedFields), "Property is not nullable for class ListVerifiedFieldsItem."); - - return new ListVerifiedFieldsItem(listVerifiedFields.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ListVerifiedFieldsItem listVerifiedFieldsItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, listVerifiedFieldsItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ListVerifiedFieldsItem listVerifiedFieldsItem, JsonSerializerOptions jsonSerializerOptions) - { - if (listVerifiedFieldsItem.ListVerifiedFields == null) - throw new ArgumentNullException(nameof(listVerifiedFieldsItem.ListVerifiedFields), "Property is required for class ListVerifiedFieldsItem."); - - writer.WritePropertyName("ListVerifiedFields"); - JsonSerializer.Serialize(writer, listVerifiedFieldsItem.ListVerifiedFields, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs index 0f76fe7..7697d21 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,126 +14,84 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// LivenessParams /// + [DataContract(Name = "LivenessParams")] public partial class LivenessParams : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// This parameter is used to enable OVI check - /// This parameter is used to enable MLI check - /// This parameter is used to enable Hologram detection - /// This parameter is used to enable Electronic device detection - /// This parameter is used to enable Black and white copy check - /// This parameter is used to enable Dynaprint check - [JsonConstructor] - public LivenessParams(Option checkOVI = default, Option checkMLI = default, Option checkHolo = default, Option checkED = default, Option checkBlackAndWhiteCopy = default, Option checkDynaprint = default) + /// This parameter is used to enable OVI check. + /// This parameter is used to enable MLI check. + /// This parameter is used to enable Hologram detection. + /// This parameter is used to enable Electronic device detection. + /// This parameter is used to enable Black and white copy check. + /// This parameter is used to enable Dynaprint check. + public LivenessParams(bool checkOVI = default(bool), bool checkMLI = default(bool), bool checkHolo = default(bool), bool checkED = default(bool), bool checkBlackAndWhiteCopy = default(bool), bool checkDynaprint = default(bool)) { - CheckOVIOption = checkOVI; - CheckMLIOption = checkMLI; - CheckHoloOption = checkHolo; - CheckEDOption = checkED; - CheckBlackAndWhiteCopyOption = checkBlackAndWhiteCopy; - CheckDynaprintOption = checkDynaprint; - OnCreated(); + this.CheckOVI = checkOVI; + this.CheckMLI = checkMLI; + this.CheckHolo = checkHolo; + this.CheckED = checkED; + this.CheckBlackAndWhiteCopy = checkBlackAndWhiteCopy; + this.CheckDynaprint = checkDynaprint; } - partial void OnCreated(); - - /// - /// Used to track the state of CheckOVI - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckOVIOption { get; private set; } - /// /// This parameter is used to enable OVI check /// /// This parameter is used to enable OVI check - [JsonPropertyName("checkOVI")] - public bool? CheckOVI { get { return this.CheckOVIOption; } set { this.CheckOVIOption = new(value); } } - - /// - /// Used to track the state of CheckMLI - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckMLIOption { get; private set; } + [DataMember(Name = "checkOVI", EmitDefaultValue = true)] + public bool CheckOVI { get; set; } /// /// This parameter is used to enable MLI check /// /// This parameter is used to enable MLI check - [JsonPropertyName("checkMLI")] - public bool? CheckMLI { get { return this.CheckMLIOption; } set { this.CheckMLIOption = new(value); } } - - /// - /// Used to track the state of CheckHolo - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckHoloOption { get; private set; } + [DataMember(Name = "checkMLI", EmitDefaultValue = true)] + public bool CheckMLI { get; set; } /// /// This parameter is used to enable Hologram detection /// /// This parameter is used to enable Hologram detection - [JsonPropertyName("checkHolo")] - public bool? CheckHolo { get { return this.CheckHoloOption; } set { this.CheckHoloOption = new(value); } } - - /// - /// Used to track the state of CheckED - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckEDOption { get; private set; } + [DataMember(Name = "checkHolo", EmitDefaultValue = true)] + public bool CheckHolo { get; set; } /// /// This parameter is used to enable Electronic device detection /// /// This parameter is used to enable Electronic device detection - [JsonPropertyName("checkED")] - public bool? CheckED { get { return this.CheckEDOption; } set { this.CheckEDOption = new(value); } } - - /// - /// Used to track the state of CheckBlackAndWhiteCopy - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckBlackAndWhiteCopyOption { get; private set; } + [DataMember(Name = "checkED", EmitDefaultValue = true)] + public bool CheckED { get; set; } /// /// This parameter is used to enable Black and white copy check /// /// This parameter is used to enable Black and white copy check - [JsonPropertyName("checkBlackAndWhiteCopy")] - public bool? CheckBlackAndWhiteCopy { get { return this.CheckBlackAndWhiteCopyOption; } set { this.CheckBlackAndWhiteCopyOption = new(value); } } - - /// - /// Used to track the state of CheckDynaprint - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckDynaprintOption { get; private set; } + [DataMember(Name = "checkBlackAndWhiteCopy", EmitDefaultValue = true)] + public bool CheckBlackAndWhiteCopy { get; set; } /// /// This parameter is used to enable Dynaprint check /// /// This parameter is used to enable Dynaprint check - [JsonPropertyName("checkDynaprint")] - public bool? CheckDynaprint { get { return this.CheckDynaprintOption; } set { this.CheckDynaprintOption = new(value); } } + [DataMember(Name = "checkDynaprint", EmitDefaultValue = true)] + public bool CheckDynaprint { get; set; } /// /// Returns the string presentation of the object @@ -155,6 +111,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -166,142 +131,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class LivenessParamsJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override LivenessParams Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option checkOVI = default; - Option checkMLI = default; - Option checkHolo = default; - Option checkED = default; - Option checkBlackAndWhiteCopy = default; - Option checkDynaprint = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "checkOVI": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkOVI = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkMLI": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkMLI = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkHolo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkHolo = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkED": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkED = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkBlackAndWhiteCopy": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkBlackAndWhiteCopy = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkDynaprint": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkDynaprint = new Option(utf8JsonReader.GetBoolean()); - break; - default: - break; - } - } - } - - if (checkOVI.IsSet && checkOVI.Value == null) - throw new ArgumentNullException(nameof(checkOVI), "Property is not nullable for class LivenessParams."); - - if (checkMLI.IsSet && checkMLI.Value == null) - throw new ArgumentNullException(nameof(checkMLI), "Property is not nullable for class LivenessParams."); - - if (checkHolo.IsSet && checkHolo.Value == null) - throw new ArgumentNullException(nameof(checkHolo), "Property is not nullable for class LivenessParams."); - - if (checkED.IsSet && checkED.Value == null) - throw new ArgumentNullException(nameof(checkED), "Property is not nullable for class LivenessParams."); - - if (checkBlackAndWhiteCopy.IsSet && checkBlackAndWhiteCopy.Value == null) - throw new ArgumentNullException(nameof(checkBlackAndWhiteCopy), "Property is not nullable for class LivenessParams."); - - if (checkDynaprint.IsSet && checkDynaprint.Value == null) - throw new ArgumentNullException(nameof(checkDynaprint), "Property is not nullable for class LivenessParams."); - - return new LivenessParams(checkOVI, checkMLI, checkHolo, checkED, checkBlackAndWhiteCopy, checkDynaprint); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, LivenessParams livenessParams, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, livenessParams, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, LivenessParams livenessParams, JsonSerializerOptions jsonSerializerOptions) - { - if (livenessParams.CheckOVIOption.IsSet) - writer.WriteBoolean("checkOVI", livenessParams.CheckOVIOption.Value!.Value); - - if (livenessParams.CheckMLIOption.IsSet) - writer.WriteBoolean("checkMLI", livenessParams.CheckMLIOption.Value!.Value); - - if (livenessParams.CheckHoloOption.IsSet) - writer.WriteBoolean("checkHolo", livenessParams.CheckHoloOption.Value!.Value); - - if (livenessParams.CheckEDOption.IsSet) - writer.WriteBoolean("checkED", livenessParams.CheckEDOption.Value!.Value); - - if (livenessParams.CheckBlackAndWhiteCopyOption.IsSet) - writer.WriteBoolean("checkBlackAndWhiteCopy", livenessParams.CheckBlackAndWhiteCopyOption.Value!.Value); - - if (livenessParams.CheckDynaprintOption.IsSet) - writer.WriteBoolean("checkDynaprint", livenessParams.CheckDynaprintOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs b/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs index f7ccfe5..2574c70 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LogLevel.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,202 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Defines LogLevel /// + [JsonConverter(typeof(StringEnumConverter))] public enum LogLevel { /// /// Enum FATAL_ERROR for value: FatalError /// + [EnumMember(Value = "FatalError")] FATAL_ERROR = 1, /// /// Enum ERROR for value: Error /// + [EnumMember(Value = "Error")] ERROR = 2, /// /// Enum WARNING for value: Warning /// + [EnumMember(Value = "Warning")] WARNING = 3, /// /// Enum INFO for value: Info /// + [EnumMember(Value = "Info")] INFO = 4, /// /// Enum DEBUG for value: Debug /// + [EnumMember(Value = "Debug")] DEBUG = 5 } - /// - /// Converts to and from the JSON value - /// - public static class LogLevelValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static LogLevel FromString(string value) - { - if (value.Equals("FatalError")) - return LogLevel.FATAL_ERROR; - - if (value.Equals("Error")) - return LogLevel.ERROR; - - if (value.Equals("Warning")) - return LogLevel.WARNING; - - if (value.Equals("Info")) - return LogLevel.INFO; - - if (value.Equals("Debug")) - return LogLevel.DEBUG; - - throw new NotImplementedException($"Could not convert value to type LogLevel: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static LogLevel? FromStringOrDefault(string value) - { - if (value.Equals("FatalError")) - return LogLevel.FATAL_ERROR; - - if (value.Equals("Error")) - return LogLevel.ERROR; - - if (value.Equals("Warning")) - return LogLevel.WARNING; - - if (value.Equals("Info")) - return LogLevel.INFO; - - if (value.Equals("Debug")) - return LogLevel.DEBUG; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static string ToJsonValue(LogLevel value) - { - if (value == LogLevel.FATAL_ERROR) - return "FatalError"; - - if (value == LogLevel.ERROR) - return "Error"; - - if (value == LogLevel.WARNING) - return "Warning"; - - if (value == LogLevel.INFO) - return "Info"; - - if (value == LogLevel.DEBUG) - return "Debug"; - - throw new NotImplementedException($"Value could not be handled: '{value}'"); - } - } - - /// - /// A Json converter for type - /// - /// - public class LogLevelJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override LogLevel Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - LogLevel? result = rawValue == null - ? null - : LogLevelValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the LogLevel to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, LogLevel logLevel, JsonSerializerOptions options) - { - writer.WriteStringValue(logLevel.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class LogLevelNullableJsonConverter : JsonConverter - { - /// - /// Returns a LogLevel from the Json object - /// - /// - /// - /// - /// - public override LogLevel? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - LogLevel? result = rawValue == null - ? null - : LogLevelValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, LogLevel? logLevel, JsonSerializerOptions options) - { - writer.WriteStringValue(logLevel?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs index e8f784c..c42cb60 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// MRZDetectorResult /// + [DataContract(Name = "MRZDetectorResult")] public partial class MRZDetectorResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// resultMRZDetector - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public MRZDetectorResult(ResultMRZDetector resultMRZDetector, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected MRZDetectorResult() { } + /// + /// Initializes a new instance of the class. + /// + /// resultMRZDetector (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public MRZDetectorResult(ResultMRZDetector resultMRZDetector = default(ResultMRZDetector), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - ResultMRZDetector = resultMRZDetector; - OnCreated(); + // to ensure "resultMRZDetector" is required (not null) + if (resultMRZDetector == null) + { + throw new ArgumentNullException("resultMRZDetector is a required property for MRZDetectorResult and cannot be null"); + } + this.ResultMRZDetector = resultMRZDetector; } - partial void OnCreated(); - /// /// Gets or Sets ResultMRZDetector /// - [JsonPropertyName("ResultMRZDetector")] + [DataMember(Name = "ResultMRZDetector", IsRequired = true, EmitDefaultValue = true)] public ResultMRZDetector ResultMRZDetector { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MRZDetectorResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" ResultMRZDetector: ").Append(ResultMRZDetector).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class MRZDetectorResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override MRZDetectorResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option resultMRZDetector = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ResultMRZDetector": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultMRZDetector = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!resultMRZDetector.IsSet) - throw new ArgumentException("Property is required for class MRZDetectorResult.", nameof(resultMRZDetector)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class MRZDetectorResult.", nameof(resultType)); - - if (resultMRZDetector.IsSet && resultMRZDetector.Value == null) - throw new ArgumentNullException(nameof(resultMRZDetector), "Property is not nullable for class MRZDetectorResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class MRZDetectorResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class MRZDetectorResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class MRZDetectorResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class MRZDetectorResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class MRZDetectorResult."); - - return new MRZDetectorResult(resultMRZDetector.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MRZDetectorResult mRZDetectorResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, mRZDetectorResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MRZDetectorResult mRZDetectorResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (mRZDetectorResult.ResultMRZDetector == null) - throw new ArgumentNullException(nameof(mRZDetectorResult.ResultMRZDetector), "Property is required for class MRZDetectorResult."); - - writer.WritePropertyName("ResultMRZDetector"); - JsonSerializer.Serialize(writer, mRZDetectorResult.ResultMRZDetector, jsonSerializerOptions); - if (mRZDetectorResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", mRZDetectorResult.BufLengthOption.Value!.Value); - - if (mRZDetectorResult.LightOption.IsSet) - writer.WriteNumber("light", mRZDetectorResult.LightOption.Value!.Value); - - if (mRZDetectorResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", mRZDetectorResult.ListIdxOption.Value!.Value); - - if (mRZDetectorResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", mRZDetectorResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", mRZDetectorResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs b/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs index cf9f4c1..990f5db 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZFormat.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,216 +14,59 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Defines MRZFormat /// + [JsonConverter(typeof(StringEnumConverter))] public enum MRZFormat { /// /// Enum IDL for value: 1x30 /// + [EnumMember(Value = "1x30")] IDL = 1, /// /// Enum ID1 for value: 3x30 /// + [EnumMember(Value = "3x30")] ID1 = 2, /// /// Enum ID2 for value: 2x36 /// + [EnumMember(Value = "2x36")] ID2 = 3, /// /// Enum ID3 for value: 2x44 /// + [EnumMember(Value = "2x44")] ID3 = 4, /// /// Enum CAN for value: 1x6 /// + [EnumMember(Value = "1x6")] CAN = 5, /// /// Enum ID1_2_30 for value: 2x30 /// + [EnumMember(Value = "2x30")] ID1_2_30 = 6 } - /// - /// Converts to and from the JSON value - /// - public static class MRZFormatValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static MRZFormat FromString(string value) - { - if (value.Equals("1x30")) - return MRZFormat.IDL; - - if (value.Equals("3x30")) - return MRZFormat.ID1; - - if (value.Equals("2x36")) - return MRZFormat.ID2; - - if (value.Equals("2x44")) - return MRZFormat.ID3; - - if (value.Equals("1x6")) - return MRZFormat.CAN; - - if (value.Equals("2x30")) - return MRZFormat.ID1_2_30; - - throw new NotImplementedException($"Could not convert value to type MRZFormat: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static MRZFormat? FromStringOrDefault(string value) - { - if (value.Equals("1x30")) - return MRZFormat.IDL; - - if (value.Equals("3x30")) - return MRZFormat.ID1; - - if (value.Equals("2x36")) - return MRZFormat.ID2; - - if (value.Equals("2x44")) - return MRZFormat.ID3; - - if (value.Equals("1x6")) - return MRZFormat.CAN; - - if (value.Equals("2x30")) - return MRZFormat.ID1_2_30; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static string ToJsonValue(MRZFormat value) - { - if (value == MRZFormat.IDL) - return "1x30"; - - if (value == MRZFormat.ID1) - return "3x30"; - - if (value == MRZFormat.ID2) - return "2x36"; - - if (value == MRZFormat.ID3) - return "2x44"; - - if (value == MRZFormat.CAN) - return "1x6"; - - if (value == MRZFormat.ID1_2_30) - return "2x30"; - - throw new NotImplementedException($"Value could not be handled: '{value}'"); - } - } - - /// - /// A Json converter for type - /// - /// - public class MRZFormatJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override MRZFormat Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - MRZFormat? result = rawValue == null - ? null - : MRZFormatValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the MRZFormat to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MRZFormat mRZFormat, JsonSerializerOptions options) - { - writer.WriteStringValue(mRZFormat.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class MRZFormatNullableJsonConverter : JsonConverter - { - /// - /// Returns a MRZFormat from the Json object - /// - /// - /// - /// - /// - public override MRZFormat? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - MRZFormat? result = rawValue == null - ? null - : MRZFormatValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MRZFormat? mRZFormat, JsonSerializerOptions options) - { - writer.WriteStringValue(mRZFormat?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs index 8e14a48..867ded0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// MRZPositionResult /// + [DataContract(Name = "MRZPositionResult")] public partial class MRZPositionResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mrzPosition - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public MRZPositionResult(MrzPosition mrzPosition, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected MRZPositionResult() { } + /// + /// Initializes a new instance of the class. + /// + /// mrzPosition (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public MRZPositionResult(MrzPosition mrzPosition = default(MrzPosition), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - MrzPosition = mrzPosition; - OnCreated(); + // to ensure "mrzPosition" is required (not null) + if (mrzPosition == null) + { + throw new ArgumentNullException("mrzPosition is a required property for MRZPositionResult and cannot be null"); + } + this.MrzPosition = mrzPosition; } - partial void OnCreated(); - /// /// Gets or Sets MrzPosition /// - [JsonPropertyName("MrzPosition")] + [DataMember(Name = "MrzPosition", IsRequired = true, EmitDefaultValue = true)] public MrzPosition MrzPosition { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MRZPositionResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" MrzPosition: ").Append(MrzPosition).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class MRZPositionResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override MRZPositionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option mrzPosition = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "MrzPosition": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mrzPosition = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!mrzPosition.IsSet) - throw new ArgumentException("Property is required for class MRZPositionResult.", nameof(mrzPosition)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class MRZPositionResult.", nameof(resultType)); - - if (mrzPosition.IsSet && mrzPosition.Value == null) - throw new ArgumentNullException(nameof(mrzPosition), "Property is not nullable for class MRZPositionResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class MRZPositionResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class MRZPositionResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class MRZPositionResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class MRZPositionResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class MRZPositionResult."); - - return new MRZPositionResult(mrzPosition.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MRZPositionResult mRZPositionResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, mRZPositionResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MRZPositionResult mRZPositionResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (mRZPositionResult.MrzPosition == null) - throw new ArgumentNullException(nameof(mRZPositionResult.MrzPosition), "Property is required for class MRZPositionResult."); - - writer.WritePropertyName("MrzPosition"); - JsonSerializer.Serialize(writer, mRZPositionResult.MrzPosition, jsonSerializerOptions); - if (mRZPositionResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", mRZPositionResult.BufLengthOption.Value!.Value); - - if (mRZPositionResult.LightOption.IsSet) - writer.WriteNumber("light", mRZPositionResult.LightOption.Value!.Value); - - if (mRZPositionResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", mRZPositionResult.ListIdxOption.Value!.Value); - - if (mRZPositionResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", mRZPositionResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", mRZPositionResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs b/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs index 00ba465..2cdb8e1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZRowsItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,53 +14,63 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// MRZRowsItem /// + [DataContract(Name = "MRZRowsItem")] public partial class MRZRowsItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// length - /// maxLength - /// symbols - [JsonConstructor] - public MRZRowsItem(int length, int maxLength, List symbols) + [JsonConstructorAttribute] + protected MRZRowsItem() { } + /// + /// Initializes a new instance of the class. + /// + /// length (required). + /// maxLength (required). + /// symbols (required). + public MRZRowsItem(int length = default(int), int maxLength = default(int), List symbols = default(List)) { - Length = length; - MaxLength = maxLength; - Symbols = symbols; - OnCreated(); + this.Length = length; + this.MaxLength = maxLength; + // to ensure "symbols" is required (not null) + if (symbols == null) + { + throw new ArgumentNullException("symbols is a required property for MRZRowsItem and cannot be null"); + } + this.Symbols = symbols; } - partial void OnCreated(); - /// /// Gets or Sets Length /// - [JsonPropertyName("length")] + [DataMember(Name = "length", IsRequired = true, EmitDefaultValue = true)] public int Length { get; set; } /// /// Gets or Sets MaxLength /// - [JsonPropertyName("maxLength")] + [DataMember(Name = "maxLength", IsRequired = true, EmitDefaultValue = true)] public int MaxLength { get; set; } /// /// Gets or Sets Symbols /// - [JsonPropertyName("symbols")] + [DataMember(Name = "symbols", IsRequired = true, EmitDefaultValue = true)] public List Symbols { get; set; } /// @@ -80,6 +88,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -91,119 +108,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class MRZRowsItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MRZRowsItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option length = default; - Option maxLength = default; - Option?> symbols = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - length = new Option(utf8JsonReader.GetInt32()); - break; - case "maxLength": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - maxLength = new Option(utf8JsonReader.GetInt32()); - break; - case "symbols": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - symbols = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!length.IsSet) - throw new ArgumentException("Property is required for class MRZRowsItem.", nameof(length)); - - if (!maxLength.IsSet) - throw new ArgumentException("Property is required for class MRZRowsItem.", nameof(maxLength)); - - if (!symbols.IsSet) - throw new ArgumentException("Property is required for class MRZRowsItem.", nameof(symbols)); - - if (length.IsSet && length.Value == null) - throw new ArgumentNullException(nameof(length), "Property is not nullable for class MRZRowsItem."); - - if (maxLength.IsSet && maxLength.Value == null) - throw new ArgumentNullException(nameof(maxLength), "Property is not nullable for class MRZRowsItem."); - - if (symbols.IsSet && symbols.Value == null) - throw new ArgumentNullException(nameof(symbols), "Property is not nullable for class MRZRowsItem."); - - return new MRZRowsItem(length.Value!.Value!, maxLength.Value!.Value!, symbols.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MRZRowsItem mRZRowsItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mRZRowsItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MRZRowsItem mRZRowsItem, JsonSerializerOptions jsonSerializerOptions) - { - if (mRZRowsItem.Symbols == null) - throw new ArgumentNullException(nameof(mRZRowsItem.Symbols), "Property is required for class MRZRowsItem."); - - writer.WriteNumber("length", mRZRowsItem.Length); - - writer.WriteNumber("maxLength", mRZRowsItem.MaxLength); - - writer.WritePropertyName("symbols"); - JsonSerializer.Serialize(writer, mRZRowsItem.Symbols, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs index 1ed4da6..2ade6aa 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQuality.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,109 +14,119 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// MRZTestQuality /// + [DataContract(Name = "MRZTestQuality")] public partial class MRZTestQuality : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// cHECKSUMS - /// cONTRASTPRINT - /// dOCFORMAT - /// mRZFORMAT - /// pRINTPOSITION - /// sTAINMRZ - /// sYMBOLSPARAM - /// strCount - /// strings - /// tEXTUALFILLING - [JsonConstructor] - public MRZTestQuality(int cHECKSUMS, int cONTRASTPRINT, int dOCFORMAT, int mRZFORMAT, int pRINTPOSITION, int sTAINMRZ, int sYMBOLSPARAM, int strCount, List strings, int tEXTUALFILLING) + [JsonConstructorAttribute] + protected MRZTestQuality() { } + /// + /// Initializes a new instance of the class. + /// + /// cHECKSUMS (required). + /// cONTRASTPRINT (required). + /// dOCFORMAT (required). + /// mRZFORMAT (required). + /// pRINTPOSITION (required). + /// sTAINMRZ (required). + /// sYMBOLSPARAM (required). + /// strCount (required). + /// strings (required). + /// tEXTUALFILLING (required). + public MRZTestQuality(int cHECKSUMS = default(int), int cONTRASTPRINT = default(int), int dOCFORMAT = default(int), int mRZFORMAT = default(int), int pRINTPOSITION = default(int), int sTAINMRZ = default(int), int sYMBOLSPARAM = default(int), int strCount = default(int), List strings = default(List), int tEXTUALFILLING = default(int)) { - CHECK_SUMS = cHECKSUMS; - CONTRAST_PRINT = cONTRASTPRINT; - DOC_FORMAT = dOCFORMAT; - MRZ_FORMAT = mRZFORMAT; - PRINT_POSITION = pRINTPOSITION; - STAIN_MRZ = sTAINMRZ; - SYMBOLS_PARAM = sYMBOLSPARAM; - StrCount = strCount; - Strings = strings; - TEXTUAL_FILLING = tEXTUALFILLING; - OnCreated(); + this.CHECK_SUMS = cHECKSUMS; + this.CONTRAST_PRINT = cONTRASTPRINT; + this.DOC_FORMAT = dOCFORMAT; + this.MRZ_FORMAT = mRZFORMAT; + this.PRINT_POSITION = pRINTPOSITION; + this.STAIN_MRZ = sTAINMRZ; + this.SYMBOLS_PARAM = sYMBOLSPARAM; + this.StrCount = strCount; + // to ensure "strings" is required (not null) + if (strings == null) + { + throw new ArgumentNullException("strings is a required property for MRZTestQuality and cannot be null"); + } + this.Strings = strings; + this.TEXTUAL_FILLING = tEXTUALFILLING; } - partial void OnCreated(); - /// /// Gets or Sets CHECK_SUMS /// - [JsonPropertyName("CHECK_SUMS")] + [DataMember(Name = "CHECK_SUMS", IsRequired = true, EmitDefaultValue = true)] public int CHECK_SUMS { get; set; } /// /// Gets or Sets CONTRAST_PRINT /// - [JsonPropertyName("CONTRAST_PRINT")] + [DataMember(Name = "CONTRAST_PRINT", IsRequired = true, EmitDefaultValue = true)] public int CONTRAST_PRINT { get; set; } /// /// Gets or Sets DOC_FORMAT /// - [JsonPropertyName("DOC_FORMAT")] + [DataMember(Name = "DOC_FORMAT", IsRequired = true, EmitDefaultValue = true)] public int DOC_FORMAT { get; set; } /// /// Gets or Sets MRZ_FORMAT /// - [JsonPropertyName("MRZ_FORMAT")] + [DataMember(Name = "MRZ_FORMAT", IsRequired = true, EmitDefaultValue = true)] public int MRZ_FORMAT { get; set; } /// /// Gets or Sets PRINT_POSITION /// - [JsonPropertyName("PRINT_POSITION")] + [DataMember(Name = "PRINT_POSITION", IsRequired = true, EmitDefaultValue = true)] public int PRINT_POSITION { get; set; } /// /// Gets or Sets STAIN_MRZ /// - [JsonPropertyName("STAIN_MRZ")] + [DataMember(Name = "STAIN_MRZ", IsRequired = true, EmitDefaultValue = true)] public int STAIN_MRZ { get; set; } /// /// Gets or Sets SYMBOLS_PARAM /// - [JsonPropertyName("SYMBOLS_PARAM")] + [DataMember(Name = "SYMBOLS_PARAM", IsRequired = true, EmitDefaultValue = true)] public int SYMBOLS_PARAM { get; set; } /// /// Gets or Sets StrCount /// - [JsonPropertyName("StrCount")] + [DataMember(Name = "StrCount", IsRequired = true, EmitDefaultValue = true)] public int StrCount { get; set; } /// /// Gets or Sets Strings /// - [JsonPropertyName("Strings")] + [DataMember(Name = "Strings", IsRequired = true, EmitDefaultValue = true)] public List Strings { get; set; } /// /// Gets or Sets TEXTUAL_FILLING /// - [JsonPropertyName("TEXTUAL_FILLING")] + [DataMember(Name = "TEXTUAL_FILLING", IsRequired = true, EmitDefaultValue = true)] public int TEXTUAL_FILLING { get; set; } /// @@ -143,6 +151,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -154,209 +171,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class MRZTestQualityJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MRZTestQuality Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option cHECKSUMS = default; - Option cONTRASTPRINT = default; - Option dOCFORMAT = default; - Option mRZFORMAT = default; - Option pRINTPOSITION = default; - Option sTAINMRZ = default; - Option sYMBOLSPARAM = default; - Option strCount = default; - Option?> strings = default; - Option tEXTUALFILLING = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "CHECK_SUMS": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - cHECKSUMS = new Option(utf8JsonReader.GetInt32()); - break; - case "CONTRAST_PRINT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - cONTRASTPRINT = new Option(utf8JsonReader.GetInt32()); - break; - case "DOC_FORMAT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - dOCFORMAT = new Option(utf8JsonReader.GetInt32()); - break; - case "MRZ_FORMAT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mRZFORMAT = new Option(utf8JsonReader.GetInt32()); - break; - case "PRINT_POSITION": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pRINTPOSITION = new Option(utf8JsonReader.GetInt32()); - break; - case "STAIN_MRZ": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sTAINMRZ = new Option(utf8JsonReader.GetInt32()); - break; - case "SYMBOLS_PARAM": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sYMBOLSPARAM = new Option(utf8JsonReader.GetInt32()); - break; - case "StrCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - strCount = new Option(utf8JsonReader.GetInt32()); - break; - case "Strings": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - strings = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "TEXTUAL_FILLING": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - tEXTUALFILLING = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!cHECKSUMS.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(cHECKSUMS)); - - if (!cONTRASTPRINT.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(cONTRASTPRINT)); - - if (!dOCFORMAT.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(dOCFORMAT)); - - if (!mRZFORMAT.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(mRZFORMAT)); - - if (!pRINTPOSITION.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(pRINTPOSITION)); - - if (!sTAINMRZ.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(sTAINMRZ)); - - if (!sYMBOLSPARAM.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(sYMBOLSPARAM)); - - if (!strCount.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(strCount)); - - if (!strings.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(strings)); - - if (!tEXTUALFILLING.IsSet) - throw new ArgumentException("Property is required for class MRZTestQuality.", nameof(tEXTUALFILLING)); - - if (cHECKSUMS.IsSet && cHECKSUMS.Value == null) - throw new ArgumentNullException(nameof(cHECKSUMS), "Property is not nullable for class MRZTestQuality."); - - if (cONTRASTPRINT.IsSet && cONTRASTPRINT.Value == null) - throw new ArgumentNullException(nameof(cONTRASTPRINT), "Property is not nullable for class MRZTestQuality."); - - if (dOCFORMAT.IsSet && dOCFORMAT.Value == null) - throw new ArgumentNullException(nameof(dOCFORMAT), "Property is not nullable for class MRZTestQuality."); - - if (mRZFORMAT.IsSet && mRZFORMAT.Value == null) - throw new ArgumentNullException(nameof(mRZFORMAT), "Property is not nullable for class MRZTestQuality."); - - if (pRINTPOSITION.IsSet && pRINTPOSITION.Value == null) - throw new ArgumentNullException(nameof(pRINTPOSITION), "Property is not nullable for class MRZTestQuality."); - - if (sTAINMRZ.IsSet && sTAINMRZ.Value == null) - throw new ArgumentNullException(nameof(sTAINMRZ), "Property is not nullable for class MRZTestQuality."); - - if (sYMBOLSPARAM.IsSet && sYMBOLSPARAM.Value == null) - throw new ArgumentNullException(nameof(sYMBOLSPARAM), "Property is not nullable for class MRZTestQuality."); - - if (strCount.IsSet && strCount.Value == null) - throw new ArgumentNullException(nameof(strCount), "Property is not nullable for class MRZTestQuality."); - - if (strings.IsSet && strings.Value == null) - throw new ArgumentNullException(nameof(strings), "Property is not nullable for class MRZTestQuality."); - - if (tEXTUALFILLING.IsSet && tEXTUALFILLING.Value == null) - throw new ArgumentNullException(nameof(tEXTUALFILLING), "Property is not nullable for class MRZTestQuality."); - - return new MRZTestQuality(cHECKSUMS.Value!.Value!, cONTRASTPRINT.Value!.Value!, dOCFORMAT.Value!.Value!, mRZFORMAT.Value!.Value!, pRINTPOSITION.Value!.Value!, sTAINMRZ.Value!.Value!, sYMBOLSPARAM.Value!.Value!, strCount.Value!.Value!, strings.Value!, tEXTUALFILLING.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MRZTestQuality mRZTestQuality, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mRZTestQuality, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MRZTestQuality mRZTestQuality, JsonSerializerOptions jsonSerializerOptions) - { - if (mRZTestQuality.Strings == null) - throw new ArgumentNullException(nameof(mRZTestQuality.Strings), "Property is required for class MRZTestQuality."); - - writer.WriteNumber("CHECK_SUMS", mRZTestQuality.CHECK_SUMS); - - writer.WriteNumber("CONTRAST_PRINT", mRZTestQuality.CONTRAST_PRINT); - - writer.WriteNumber("DOC_FORMAT", mRZTestQuality.DOC_FORMAT); - - writer.WriteNumber("MRZ_FORMAT", mRZTestQuality.MRZ_FORMAT); - - writer.WriteNumber("PRINT_POSITION", mRZTestQuality.PRINT_POSITION); - - writer.WriteNumber("STAIN_MRZ", mRZTestQuality.STAIN_MRZ); - - writer.WriteNumber("SYMBOLS_PARAM", mRZTestQuality.SYMBOLS_PARAM); - - writer.WriteNumber("StrCount", mRZTestQuality.StrCount); - - writer.WritePropertyName("Strings"); - JsonSerializer.Serialize(writer, mRZTestQuality.Strings, jsonSerializerOptions); - writer.WriteNumber("TEXTUAL_FILLING", mRZTestQuality.TEXTUAL_FILLING); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs index 7253b37..7dae218 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// MRZTestQualityItem /// + [DataContract(Name = "MRZTestQualityItem")] public partial class MRZTestQualityItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mRZTestQuality - [JsonConstructor] - public MRZTestQualityItem(MRZTestQuality mRZTestQuality) + [JsonConstructorAttribute] + protected MRZTestQualityItem() { } + /// + /// Initializes a new instance of the class. + /// + /// mRZTestQuality (required). + public MRZTestQualityItem(MRZTestQuality mRZTestQuality = default(MRZTestQuality)) { - MRZTestQuality = mRZTestQuality; - OnCreated(); + // to ensure "mRZTestQuality" is required (not null) + if (mRZTestQuality == null) + { + throw new ArgumentNullException("mRZTestQuality is a required property for MRZTestQualityItem and cannot be null"); + } + this.MRZTestQuality = mRZTestQuality; } - partial void OnCreated(); - /// /// Gets or Sets MRZTestQuality /// - [JsonPropertyName("MRZTestQuality")] + [DataMember(Name = "MRZTestQuality", IsRequired = true, EmitDefaultValue = true)] public MRZTestQuality MRZTestQuality { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class MRZTestQualityItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MRZTestQualityItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option mRZTestQuality = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "MRZTestQuality": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mRZTestQuality = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!mRZTestQuality.IsSet) - throw new ArgumentException("Property is required for class MRZTestQualityItem.", nameof(mRZTestQuality)); - - if (mRZTestQuality.IsSet && mRZTestQuality.Value == null) - throw new ArgumentNullException(nameof(mRZTestQuality), "Property is not nullable for class MRZTestQualityItem."); - - return new MRZTestQualityItem(mRZTestQuality.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MRZTestQualityItem mRZTestQualityItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mRZTestQualityItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MRZTestQualityItem mRZTestQualityItem, JsonSerializerOptions jsonSerializerOptions) - { - if (mRZTestQualityItem.MRZTestQuality == null) - throw new ArgumentNullException(nameof(mRZTestQualityItem.MRZTestQuality), "Property is required for class MRZTestQualityItem."); - - writer.WritePropertyName("MRZTestQuality"); - JsonSerializer.Serialize(writer, mRZTestQualityItem.MRZTestQuality, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs index f42e9db..e2b594e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// MRZTestQualityResult /// + [DataContract(Name = "MRZTestQualityResult")] public partial class MRZTestQualityResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mRZTestQuality - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public MRZTestQualityResult(MRZTestQuality mRZTestQuality, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected MRZTestQualityResult() { } + /// + /// Initializes a new instance of the class. + /// + /// mRZTestQuality (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public MRZTestQualityResult(MRZTestQuality mRZTestQuality = default(MRZTestQuality), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - MRZTestQuality = mRZTestQuality; - OnCreated(); + // to ensure "mRZTestQuality" is required (not null) + if (mRZTestQuality == null) + { + throw new ArgumentNullException("mRZTestQuality is a required property for MRZTestQualityResult and cannot be null"); + } + this.MRZTestQuality = mRZTestQuality; } - partial void OnCreated(); - /// /// Gets or Sets MRZTestQuality /// - [JsonPropertyName("MRZTestQuality")] + [DataMember(Name = "MRZTestQuality", IsRequired = true, EmitDefaultValue = true)] public MRZTestQuality MRZTestQuality { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class MRZTestQualityResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" MRZTestQuality: ").Append(MRZTestQuality).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class MRZTestQualityResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override MRZTestQualityResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option mRZTestQuality = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "MRZTestQuality": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mRZTestQuality = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!mRZTestQuality.IsSet) - throw new ArgumentException("Property is required for class MRZTestQualityResult.", nameof(mRZTestQuality)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class MRZTestQualityResult.", nameof(resultType)); - - if (mRZTestQuality.IsSet && mRZTestQuality.Value == null) - throw new ArgumentNullException(nameof(mRZTestQuality), "Property is not nullable for class MRZTestQualityResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class MRZTestQualityResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class MRZTestQualityResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class MRZTestQualityResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class MRZTestQualityResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class MRZTestQualityResult."); - - return new MRZTestQualityResult(mRZTestQuality.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MRZTestQualityResult mRZTestQualityResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, mRZTestQualityResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MRZTestQualityResult mRZTestQualityResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (mRZTestQualityResult.MRZTestQuality == null) - throw new ArgumentNullException(nameof(mRZTestQualityResult.MRZTestQuality), "Property is required for class MRZTestQualityResult."); - - writer.WritePropertyName("MRZTestQuality"); - JsonSerializer.Serialize(writer, mRZTestQualityResult.MRZTestQuality, jsonSerializerOptions); - if (mRZTestQualityResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", mRZTestQualityResult.BufLengthOption.Value!.Value); - - if (mRZTestQualityResult.LightOption.IsSet) - writer.WriteNumber("light", mRZTestQualityResult.LightOption.Value!.Value); - - if (mRZTestQualityResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", mRZTestQualityResult.ListIdxOption.Value!.Value); - - if (mRZTestQualityResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", mRZTestQualityResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", mRZTestQualityResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs b/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs index c871ac9..c4dc0cc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MeasureSystem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -41,129 +42,4 @@ public enum MeasureSystem IMPERIAL = 1 } - /// - /// Converts to and from the JSON value - /// - public static class MeasureSystemValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static MeasureSystem FromString(string value) - { - if (value.Equals((0).ToString())) - return MeasureSystem.METRIC; - - if (value.Equals((1).ToString())) - return MeasureSystem.IMPERIAL; - - throw new NotImplementedException($"Could not convert value to type MeasureSystem: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static MeasureSystem? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return MeasureSystem.METRIC; - - if (value.Equals((1).ToString())) - return MeasureSystem.IMPERIAL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(MeasureSystem value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class MeasureSystemJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override MeasureSystem Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - MeasureSystem? result = rawValue == null - ? null - : MeasureSystemValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the MeasureSystem to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MeasureSystem measureSystem, JsonSerializerOptions options) - { - writer.WriteStringValue(measureSystem.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class MeasureSystemNullableJsonConverter : JsonConverter - { - /// - /// Returns a MeasureSystem from the Json object - /// - /// - /// - /// - /// - public override MeasureSystem? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - MeasureSystem? result = rawValue == null - ? null - : MeasureSystemValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MeasureSystem? measureSystem, JsonSerializerOptions options) - { - writer.WriteStringValue(measureSystem?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs b/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs index 276c73c..75dcad1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzDetectModeEnum.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -47,135 +48,4 @@ public enum MrzDetectModeEnum eMDM_BlurBeforeBinarization = 2 } - /// - /// Converts to and from the JSON value - /// - public static class MrzDetectModeEnumValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static MrzDetectModeEnum FromString(string value) - { - if (value.Equals((0).ToString())) - return MrzDetectModeEnum.eMDM_Default; - - if (value.Equals((1).ToString())) - return MrzDetectModeEnum.eMDM_ResizeBinarizeWindow; - - if (value.Equals((2).ToString())) - return MrzDetectModeEnum.eMDM_BlurBeforeBinarization; - - throw new NotImplementedException($"Could not convert value to type MrzDetectModeEnum: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static MrzDetectModeEnum? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return MrzDetectModeEnum.eMDM_Default; - - if (value.Equals((1).ToString())) - return MrzDetectModeEnum.eMDM_ResizeBinarizeWindow; - - if (value.Equals((2).ToString())) - return MrzDetectModeEnum.eMDM_BlurBeforeBinarization; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(MrzDetectModeEnum value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class MrzDetectModeEnumJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override MrzDetectModeEnum Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - MrzDetectModeEnum? result = rawValue == null - ? null - : MrzDetectModeEnumValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the MrzDetectModeEnum to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MrzDetectModeEnum mrzDetectModeEnum, JsonSerializerOptions options) - { - writer.WriteStringValue(mrzDetectModeEnum.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class MrzDetectModeEnumNullableJsonConverter : JsonConverter - { - /// - /// Returns a MrzDetectModeEnum from the Json object - /// - /// - /// - /// - /// - public override MrzDetectModeEnum? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - MrzDetectModeEnum? result = rawValue == null - ? null - : MrzDetectModeEnumValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MrzDetectModeEnum? mrzDetectModeEnum, JsonSerializerOptions options) - { - writer.WriteStringValue(mrzDetectModeEnum?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs index 0b78e6d..14b7bc0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,188 +14,183 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// MrzPosition /// + [DataContract(Name = "MrzPosition")] public partial class MrzPosition : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// docFormat - /// Document rotation angle - /// Document width - /// Document height - /// center - /// leftBottom - /// leftTop - /// rightBottom - /// rightTop - /// dpi - /// inverse - /// objArea - /// objIntAngleDev - /// perspectiveTr - /// resultStatus - [JsonConstructor] - public MrzPosition(DocumentFormat docFormat, decimal angle, int width, int height, Point center, Point leftBottom, Point leftTop, Point rightBottom, Point rightTop, int dpi, Option inverse = default, Option objArea = default, Option objIntAngleDev = default, Option perspectiveTr = default, Option resultStatus = default) - { - DocFormat = docFormat; - Angle = angle; - Width = width; - Height = height; - Center = center; - LeftBottom = leftBottom; - LeftTop = leftTop; - RightBottom = rightBottom; - RightTop = rightTop; - Dpi = dpi; - InverseOption = inverse; - ObjAreaOption = objArea; - ObjIntAngleDevOption = objIntAngleDev; - PerspectiveTrOption = perspectiveTr; - ResultStatusOption = resultStatus; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets DocFormat /// - [JsonPropertyName("docFormat")] + [DataMember(Name = "docFormat", IsRequired = true, EmitDefaultValue = true)] public DocumentFormat DocFormat { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected MrzPosition() { } + /// + /// Initializes a new instance of the class. + /// + /// docFormat (required). + /// Document rotation angle (required). + /// Document width (required). + /// Document height (required). + /// center (required). + /// leftBottom (required). + /// leftTop (required). + /// rightBottom (required). + /// rightTop (required). + /// dpi (required). + /// inverse. + /// objArea. + /// objIntAngleDev. + /// perspectiveTr. + /// resultStatus. + public MrzPosition(DocumentFormat docFormat = default(DocumentFormat), decimal angle = default(decimal), int width = default(int), int height = default(int), Point center = default(Point), Point leftBottom = default(Point), Point leftTop = default(Point), Point rightBottom = default(Point), Point rightTop = default(Point), int dpi = default(int), int inverse = default(int), int objArea = default(int), int objIntAngleDev = default(int), int perspectiveTr = default(int), int resultStatus = default(int)) + { + this.DocFormat = docFormat; + this.Angle = angle; + this.Width = width; + this.Height = height; + // to ensure "center" is required (not null) + if (center == null) + { + throw new ArgumentNullException("center is a required property for MrzPosition and cannot be null"); + } + this.Center = center; + // to ensure "leftBottom" is required (not null) + if (leftBottom == null) + { + throw new ArgumentNullException("leftBottom is a required property for MrzPosition and cannot be null"); + } + this.LeftBottom = leftBottom; + // to ensure "leftTop" is required (not null) + if (leftTop == null) + { + throw new ArgumentNullException("leftTop is a required property for MrzPosition and cannot be null"); + } + this.LeftTop = leftTop; + // to ensure "rightBottom" is required (not null) + if (rightBottom == null) + { + throw new ArgumentNullException("rightBottom is a required property for MrzPosition and cannot be null"); + } + this.RightBottom = rightBottom; + // to ensure "rightTop" is required (not null) + if (rightTop == null) + { + throw new ArgumentNullException("rightTop is a required property for MrzPosition and cannot be null"); + } + this.RightTop = rightTop; + this.Dpi = dpi; + this.Inverse = inverse; + this.ObjArea = objArea; + this.ObjIntAngleDev = objIntAngleDev; + this.PerspectiveTr = perspectiveTr; + this.ResultStatus = resultStatus; + } /// /// Document rotation angle /// /// Document rotation angle - [JsonPropertyName("Angle")] + [DataMember(Name = "Angle", IsRequired = true, EmitDefaultValue = true)] public decimal Angle { get; set; } /// /// Document width /// /// Document width - [JsonPropertyName("Width")] + [DataMember(Name = "Width", IsRequired = true, EmitDefaultValue = true)] public int Width { get; set; } /// /// Document height /// /// Document height - [JsonPropertyName("Height")] + [DataMember(Name = "Height", IsRequired = true, EmitDefaultValue = true)] public int Height { get; set; } /// /// Gets or Sets Center /// - [JsonPropertyName("Center")] + [DataMember(Name = "Center", IsRequired = true, EmitDefaultValue = true)] public Point Center { get; set; } /// /// Gets or Sets LeftBottom /// - [JsonPropertyName("LeftBottom")] + [DataMember(Name = "LeftBottom", IsRequired = true, EmitDefaultValue = true)] public Point LeftBottom { get; set; } /// /// Gets or Sets LeftTop /// - [JsonPropertyName("LeftTop")] + [DataMember(Name = "LeftTop", IsRequired = true, EmitDefaultValue = true)] public Point LeftTop { get; set; } /// /// Gets or Sets RightBottom /// - [JsonPropertyName("RightBottom")] + [DataMember(Name = "RightBottom", IsRequired = true, EmitDefaultValue = true)] public Point RightBottom { get; set; } /// /// Gets or Sets RightTop /// - [JsonPropertyName("RightTop")] + [DataMember(Name = "RightTop", IsRequired = true, EmitDefaultValue = true)] public Point RightTop { get; set; } /// /// Gets or Sets Dpi /// - [JsonPropertyName("Dpi")] + [DataMember(Name = "Dpi", IsRequired = true, EmitDefaultValue = true)] public int Dpi { get; set; } - /// - /// Used to track the state of Inverse - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option InverseOption { get; private set; } - /// /// Gets or Sets Inverse /// - [JsonPropertyName("Inverse")] - public int? Inverse { get { return this.InverseOption; } set { this.InverseOption = new(value); } } - - /// - /// Used to track the state of ObjArea - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ObjAreaOption { get; private set; } + [DataMember(Name = "Inverse", EmitDefaultValue = false)] + public int Inverse { get; set; } /// /// Gets or Sets ObjArea /// - [JsonPropertyName("ObjArea")] - public int? ObjArea { get { return this.ObjAreaOption; } set { this.ObjAreaOption = new(value); } } - - /// - /// Used to track the state of ObjIntAngleDev - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ObjIntAngleDevOption { get; private set; } + [DataMember(Name = "ObjArea", EmitDefaultValue = false)] + public int ObjArea { get; set; } /// /// Gets or Sets ObjIntAngleDev /// - [JsonPropertyName("ObjIntAngleDev")] - public int? ObjIntAngleDev { get { return this.ObjIntAngleDevOption; } set { this.ObjIntAngleDevOption = new(value); } } - - /// - /// Used to track the state of PerspectiveTr - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PerspectiveTrOption { get; private set; } + [DataMember(Name = "ObjIntAngleDev", EmitDefaultValue = false)] + public int ObjIntAngleDev { get; set; } /// /// Gets or Sets PerspectiveTr /// - [JsonPropertyName("PerspectiveTr")] - public int? PerspectiveTr { get { return this.PerspectiveTrOption; } set { this.PerspectiveTrOption = new(value); } } - - /// - /// Used to track the state of ResultStatus - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ResultStatusOption { get; private set; } + [DataMember(Name = "PerspectiveTr", EmitDefaultValue = false)] + public int PerspectiveTr { get; set; } /// /// Gets or Sets ResultStatus /// - [JsonPropertyName("ResultStatus")] - public int? ResultStatus { get { return this.ResultStatusOption; } set { this.ResultStatusOption = new(value); } } + [DataMember(Name = "ResultStatus", EmitDefaultValue = false)] + public int ResultStatus { get; set; } /// /// Returns the string presentation of the object @@ -226,6 +219,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -237,278 +239,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class MrzPositionJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MrzPosition Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docFormat = default; - Option angle = default; - Option width = default; - Option height = default; - Option center = default; - Option leftBottom = default; - Option leftTop = default; - Option rightBottom = default; - Option rightTop = default; - Option dpi = default; - Option inverse = default; - Option objArea = default; - Option objIntAngleDev = default; - Option perspectiveTr = default; - Option resultStatus = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "docFormat": - string? docFormatRawValue = utf8JsonReader.GetString(); - if (docFormatRawValue != null) - docFormat = new Option(DocumentFormatValueConverter.FromStringOrDefault(docFormatRawValue)); - break; - case "Angle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - angle = new Option(utf8JsonReader.GetDecimal()); - break; - case "Width": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - width = new Option(utf8JsonReader.GetInt32()); - break; - case "Height": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - height = new Option(utf8JsonReader.GetInt32()); - break; - case "Center": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - center = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "LeftBottom": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - leftBottom = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "LeftTop": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - leftTop = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RightBottom": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rightBottom = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RightTop": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rightTop = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Dpi": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - dpi = new Option(utf8JsonReader.GetInt32()); - break; - case "Inverse": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - inverse = new Option(utf8JsonReader.GetInt32()); - break; - case "ObjArea": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - objArea = new Option(utf8JsonReader.GetInt32()); - break; - case "ObjIntAngleDev": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - objIntAngleDev = new Option(utf8JsonReader.GetInt32()); - break; - case "PerspectiveTr": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - perspectiveTr = new Option(utf8JsonReader.GetInt32()); - break; - case "ResultStatus": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultStatus = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!docFormat.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(docFormat)); - - if (!angle.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(angle)); - - if (!width.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(width)); - - if (!height.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(height)); - - if (!center.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(center)); - - if (!leftBottom.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(leftBottom)); - - if (!leftTop.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(leftTop)); - - if (!rightBottom.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(rightBottom)); - - if (!rightTop.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(rightTop)); - - if (!dpi.IsSet) - throw new ArgumentException("Property is required for class MrzPosition.", nameof(dpi)); - - if (docFormat.IsSet && docFormat.Value == null) - throw new ArgumentNullException(nameof(docFormat), "Property is not nullable for class MrzPosition."); - - if (angle.IsSet && angle.Value == null) - throw new ArgumentNullException(nameof(angle), "Property is not nullable for class MrzPosition."); - - if (width.IsSet && width.Value == null) - throw new ArgumentNullException(nameof(width), "Property is not nullable for class MrzPosition."); - - if (height.IsSet && height.Value == null) - throw new ArgumentNullException(nameof(height), "Property is not nullable for class MrzPosition."); - - if (center.IsSet && center.Value == null) - throw new ArgumentNullException(nameof(center), "Property is not nullable for class MrzPosition."); - - if (leftBottom.IsSet && leftBottom.Value == null) - throw new ArgumentNullException(nameof(leftBottom), "Property is not nullable for class MrzPosition."); - - if (leftTop.IsSet && leftTop.Value == null) - throw new ArgumentNullException(nameof(leftTop), "Property is not nullable for class MrzPosition."); - - if (rightBottom.IsSet && rightBottom.Value == null) - throw new ArgumentNullException(nameof(rightBottom), "Property is not nullable for class MrzPosition."); - - if (rightTop.IsSet && rightTop.Value == null) - throw new ArgumentNullException(nameof(rightTop), "Property is not nullable for class MrzPosition."); - - if (dpi.IsSet && dpi.Value == null) - throw new ArgumentNullException(nameof(dpi), "Property is not nullable for class MrzPosition."); - - if (inverse.IsSet && inverse.Value == null) - throw new ArgumentNullException(nameof(inverse), "Property is not nullable for class MrzPosition."); - - if (objArea.IsSet && objArea.Value == null) - throw new ArgumentNullException(nameof(objArea), "Property is not nullable for class MrzPosition."); - - if (objIntAngleDev.IsSet && objIntAngleDev.Value == null) - throw new ArgumentNullException(nameof(objIntAngleDev), "Property is not nullable for class MrzPosition."); - - if (perspectiveTr.IsSet && perspectiveTr.Value == null) - throw new ArgumentNullException(nameof(perspectiveTr), "Property is not nullable for class MrzPosition."); - - if (resultStatus.IsSet && resultStatus.Value == null) - throw new ArgumentNullException(nameof(resultStatus), "Property is not nullable for class MrzPosition."); - - return new MrzPosition(docFormat.Value!.Value!, angle.Value!.Value!, width.Value!.Value!, height.Value!.Value!, center.Value!, leftBottom.Value!, leftTop.Value!, rightBottom.Value!, rightTop.Value!, dpi.Value!.Value!, inverse, objArea, objIntAngleDev, perspectiveTr, resultStatus); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MrzPosition mrzPosition, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mrzPosition, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MrzPosition mrzPosition, JsonSerializerOptions jsonSerializerOptions) - { - if (mrzPosition.Center == null) - throw new ArgumentNullException(nameof(mrzPosition.Center), "Property is required for class MrzPosition."); - - if (mrzPosition.LeftBottom == null) - throw new ArgumentNullException(nameof(mrzPosition.LeftBottom), "Property is required for class MrzPosition."); - - if (mrzPosition.LeftTop == null) - throw new ArgumentNullException(nameof(mrzPosition.LeftTop), "Property is required for class MrzPosition."); - - if (mrzPosition.RightBottom == null) - throw new ArgumentNullException(nameof(mrzPosition.RightBottom), "Property is required for class MrzPosition."); - - if (mrzPosition.RightTop == null) - throw new ArgumentNullException(nameof(mrzPosition.RightTop), "Property is required for class MrzPosition."); - - var docFormatRawValue = DocumentFormatValueConverter.ToJsonValue(mrzPosition.DocFormat); - writer.WriteNumber("docFormat", docFormatRawValue); - - writer.WriteNumber("Angle", mrzPosition.Angle); - - writer.WriteNumber("Width", mrzPosition.Width); - - writer.WriteNumber("Height", mrzPosition.Height); - - writer.WritePropertyName("Center"); - JsonSerializer.Serialize(writer, mrzPosition.Center, jsonSerializerOptions); - writer.WritePropertyName("LeftBottom"); - JsonSerializer.Serialize(writer, mrzPosition.LeftBottom, jsonSerializerOptions); - writer.WritePropertyName("LeftTop"); - JsonSerializer.Serialize(writer, mrzPosition.LeftTop, jsonSerializerOptions); - writer.WritePropertyName("RightBottom"); - JsonSerializer.Serialize(writer, mrzPosition.RightBottom, jsonSerializerOptions); - writer.WritePropertyName("RightTop"); - JsonSerializer.Serialize(writer, mrzPosition.RightTop, jsonSerializerOptions); - writer.WriteNumber("Dpi", mrzPosition.Dpi); - - if (mrzPosition.InverseOption.IsSet) - writer.WriteNumber("Inverse", mrzPosition.InverseOption.Value!.Value); - - if (mrzPosition.ObjAreaOption.IsSet) - writer.WriteNumber("ObjArea", mrzPosition.ObjAreaOption.Value!.Value); - - if (mrzPosition.ObjIntAngleDevOption.IsSet) - writer.WriteNumber("ObjIntAngleDev", mrzPosition.ObjIntAngleDevOption.Value!.Value); - - if (mrzPosition.PerspectiveTrOption.IsSet) - writer.WriteNumber("PerspectiveTr", mrzPosition.PerspectiveTrOption.Value!.Value); - - if (mrzPosition.ResultStatusOption.IsSet) - writer.WriteNumber("ResultStatus", mrzPosition.ResultStatusOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs index e09d15a..50bd25e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPositionItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// MrzPositionItem /// + [DataContract(Name = "MrzPositionItem")] public partial class MrzPositionItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mrzPosition - [JsonConstructor] - public MrzPositionItem(MrzPosition mrzPosition) + [JsonConstructorAttribute] + protected MrzPositionItem() { } + /// + /// Initializes a new instance of the class. + /// + /// mrzPosition (required). + public MrzPositionItem(MrzPosition mrzPosition = default(MrzPosition)) { - MrzPosition = mrzPosition; - OnCreated(); + // to ensure "mrzPosition" is required (not null) + if (mrzPosition == null) + { + throw new ArgumentNullException("mrzPosition is a required property for MrzPositionItem and cannot be null"); + } + this.MrzPosition = mrzPosition; } - partial void OnCreated(); - /// /// Gets or Sets MrzPosition /// - [JsonPropertyName("MrzPosition")] + [DataMember(Name = "MrzPosition", IsRequired = true, EmitDefaultValue = true)] public MrzPosition MrzPosition { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class MrzPositionItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override MrzPositionItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option mrzPosition = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "MrzPosition": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mrzPosition = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!mrzPosition.IsSet) - throw new ArgumentException("Property is required for class MrzPositionItem.", nameof(mrzPosition)); - - if (mrzPosition.IsSet && mrzPosition.Value == null) - throw new ArgumentNullException(nameof(mrzPosition), "Property is not nullable for class MrzPositionItem."); - - return new MrzPositionItem(mrzPosition.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, MrzPositionItem mrzPositionItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, mrzPositionItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, MrzPositionItem mrzPositionItem, JsonSerializerOptions jsonSerializerOptions) - { - if (mrzPositionItem.MrzPosition == null) - throw new ArgumentNullException(nameof(mrzPositionItem.MrzPosition), "Property is required for class MrzPositionItem."); - - writer.WritePropertyName("MrzPosition"); - JsonSerializer.Serialize(writer, mrzPositionItem.MrzPosition, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs index 170fb45..d28f29c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,132 +14,143 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// OCRSecurityTextItem /// + [DataContract(Name = "OCRSecurityTextItem")] public partial class OCRSecurityTextItem : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// criticalFlag - /// lightType - /// fieldRect - /// etalonResultType - /// etalonFieldType - /// etalonLightType - /// etalonFieldRect - /// securityTextResultOCR - /// etalonResultOCR - /// reserved1 - /// reserved2 - [JsonConstructor] - public OCRSecurityTextItem(Critical criticalFlag, Light lightType, RectangleCoordinates fieldRect, int etalonResultType, int etalonFieldType, int etalonLightType, RectangleCoordinates etalonFieldRect, string securityTextResultOCR, string etalonResultOCR, Option reserved1 = default, Option reserved2 = default) - { - CriticalFlag = criticalFlag; - LightType = lightType; - FieldRect = fieldRect; - EtalonResultType = etalonResultType; - EtalonFieldType = etalonFieldType; - EtalonLightType = etalonLightType; - EtalonFieldRect = etalonFieldRect; - SecurityTextResultOCR = securityTextResultOCR; - EtalonResultOCR = etalonResultOCR; - Reserved1Option = reserved1; - Reserved2Option = reserved2; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets CriticalFlag /// - [JsonPropertyName("CriticalFlag")] + [DataMember(Name = "CriticalFlag", IsRequired = true, EmitDefaultValue = true)] public Critical CriticalFlag { get; set; } /// /// Gets or Sets LightType /// - [JsonPropertyName("LightType")] + [DataMember(Name = "LightType", IsRequired = true, EmitDefaultValue = true)] public Light LightType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OCRSecurityTextItem() { } + /// + /// Initializes a new instance of the class. + /// + /// criticalFlag (required). + /// lightType (required). + /// fieldRect (required). + /// etalonResultType (required). + /// etalonFieldType (required). + /// etalonLightType (required). + /// etalonFieldRect (required). + /// securityTextResultOCR (required). + /// etalonResultOCR (required). + /// reserved1. + /// reserved2. + public OCRSecurityTextItem(Critical criticalFlag = default(Critical), Light lightType = default(Light), RectangleCoordinates fieldRect = default(RectangleCoordinates), int etalonResultType = default(int), int etalonFieldType = default(int), int etalonLightType = default(int), RectangleCoordinates etalonFieldRect = default(RectangleCoordinates), string securityTextResultOCR = default(string), string etalonResultOCR = default(string), int reserved1 = default(int), int reserved2 = default(int)) + { + this.CriticalFlag = criticalFlag; + this.LightType = lightType; + // to ensure "fieldRect" is required (not null) + if (fieldRect == null) + { + throw new ArgumentNullException("fieldRect is a required property for OCRSecurityTextItem and cannot be null"); + } + this.FieldRect = fieldRect; + this.EtalonResultType = etalonResultType; + this.EtalonFieldType = etalonFieldType; + this.EtalonLightType = etalonLightType; + // to ensure "etalonFieldRect" is required (not null) + if (etalonFieldRect == null) + { + throw new ArgumentNullException("etalonFieldRect is a required property for OCRSecurityTextItem and cannot be null"); + } + this.EtalonFieldRect = etalonFieldRect; + // to ensure "securityTextResultOCR" is required (not null) + if (securityTextResultOCR == null) + { + throw new ArgumentNullException("securityTextResultOCR is a required property for OCRSecurityTextItem and cannot be null"); + } + this.SecurityTextResultOCR = securityTextResultOCR; + // to ensure "etalonResultOCR" is required (not null) + if (etalonResultOCR == null) + { + throw new ArgumentNullException("etalonResultOCR is a required property for OCRSecurityTextItem and cannot be null"); + } + this.EtalonResultOCR = etalonResultOCR; + this.Reserved1 = reserved1; + this.Reserved2 = reserved2; + } /// /// Gets or Sets FieldRect /// - [JsonPropertyName("FieldRect")] + [DataMember(Name = "FieldRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates FieldRect { get; set; } /// /// Gets or Sets EtalonResultType /// - [JsonPropertyName("EtalonResultType")] + [DataMember(Name = "EtalonResultType", IsRequired = true, EmitDefaultValue = true)] public int EtalonResultType { get; set; } /// /// Gets or Sets EtalonFieldType /// - [JsonPropertyName("EtalonFieldType")] + [DataMember(Name = "EtalonFieldType", IsRequired = true, EmitDefaultValue = true)] public int EtalonFieldType { get; set; } /// /// Gets or Sets EtalonLightType /// - [JsonPropertyName("EtalonLightType")] + [DataMember(Name = "EtalonLightType", IsRequired = true, EmitDefaultValue = true)] public int EtalonLightType { get; set; } /// /// Gets or Sets EtalonFieldRect /// - [JsonPropertyName("EtalonFieldRect")] + [DataMember(Name = "EtalonFieldRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates EtalonFieldRect { get; set; } /// /// Gets or Sets SecurityTextResultOCR /// - [JsonPropertyName("SecurityTextResultOCR")] + [DataMember(Name = "SecurityTextResultOCR", IsRequired = true, EmitDefaultValue = true)] public string SecurityTextResultOCR { get; set; } /// /// Gets or Sets EtalonResultOCR /// - [JsonPropertyName("EtalonResultOCR")] + [DataMember(Name = "EtalonResultOCR", IsRequired = true, EmitDefaultValue = true)] public string EtalonResultOCR { get; set; } - /// - /// Used to track the state of Reserved1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved1Option { get; private set; } - /// /// Gets or Sets Reserved1 /// - [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } - - /// - /// Used to track the state of Reserved2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved2Option { get; private set; } + [DataMember(Name = "Reserved1", EmitDefaultValue = false)] + public int Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// - [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + [DataMember(Name = "Reserved2", EmitDefaultValue = false)] + public int Reserved2 { get; set; } /// /// Returns the string presentation of the object @@ -166,6 +175,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -177,229 +195,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class OCRSecurityTextItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override OCRSecurityTextItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option criticalFlag = default; - Option lightType = default; - Option fieldRect = default; - Option etalonResultType = default; - Option etalonFieldType = default; - Option etalonLightType = default; - Option etalonFieldRect = default; - Option securityTextResultOCR = default; - Option etalonResultOCR = default; - Option reserved1 = default; - Option reserved2 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "CriticalFlag": - string? criticalFlagRawValue = utf8JsonReader.GetString(); - if (criticalFlagRawValue != null) - criticalFlag = new Option(CriticalValueConverter.FromStringOrDefault(criticalFlagRawValue)); - break; - case "LightType": - string? lightTypeRawValue = utf8JsonReader.GetString(); - if (lightTypeRawValue != null) - lightType = new Option(LightValueConverter.FromStringOrDefault(lightTypeRawValue)); - break; - case "FieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "EtalonResultType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonResultType = new Option(utf8JsonReader.GetInt32()); - break; - case "EtalonFieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonFieldType = new Option(utf8JsonReader.GetInt32()); - break; - case "EtalonLightType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonLightType = new Option(utf8JsonReader.GetInt32()); - break; - case "EtalonFieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonFieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SecurityTextResultOCR": - securityTextResultOCR = new Option(utf8JsonReader.GetString()!); - break; - case "EtalonResultOCR": - etalonResultOCR = new Option(utf8JsonReader.GetString()!); - break; - case "Reserved1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved1 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!criticalFlag.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(criticalFlag)); - - if (!lightType.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(lightType)); - - if (!fieldRect.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(fieldRect)); - - if (!etalonResultType.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonResultType)); - - if (!etalonFieldType.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonFieldType)); - - if (!etalonLightType.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonLightType)); - - if (!etalonFieldRect.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonFieldRect)); - - if (!securityTextResultOCR.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(securityTextResultOCR)); - - if (!etalonResultOCR.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextItem.", nameof(etalonResultOCR)); - - if (criticalFlag.IsSet && criticalFlag.Value == null) - throw new ArgumentNullException(nameof(criticalFlag), "Property is not nullable for class OCRSecurityTextItem."); - - if (lightType.IsSet && lightType.Value == null) - throw new ArgumentNullException(nameof(lightType), "Property is not nullable for class OCRSecurityTextItem."); - - if (fieldRect.IsSet && fieldRect.Value == null) - throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class OCRSecurityTextItem."); - - if (etalonResultType.IsSet && etalonResultType.Value == null) - throw new ArgumentNullException(nameof(etalonResultType), "Property is not nullable for class OCRSecurityTextItem."); - - if (etalonFieldType.IsSet && etalonFieldType.Value == null) - throw new ArgumentNullException(nameof(etalonFieldType), "Property is not nullable for class OCRSecurityTextItem."); - - if (etalonLightType.IsSet && etalonLightType.Value == null) - throw new ArgumentNullException(nameof(etalonLightType), "Property is not nullable for class OCRSecurityTextItem."); - - if (etalonFieldRect.IsSet && etalonFieldRect.Value == null) - throw new ArgumentNullException(nameof(etalonFieldRect), "Property is not nullable for class OCRSecurityTextItem."); - - if (securityTextResultOCR.IsSet && securityTextResultOCR.Value == null) - throw new ArgumentNullException(nameof(securityTextResultOCR), "Property is not nullable for class OCRSecurityTextItem."); - - if (etalonResultOCR.IsSet && etalonResultOCR.Value == null) - throw new ArgumentNullException(nameof(etalonResultOCR), "Property is not nullable for class OCRSecurityTextItem."); - - if (reserved1.IsSet && reserved1.Value == null) - throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class OCRSecurityTextItem."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class OCRSecurityTextItem."); - - return new OCRSecurityTextItem(criticalFlag.Value!.Value!, lightType.Value!.Value!, fieldRect.Value!, etalonResultType.Value!.Value!, etalonFieldType.Value!.Value!, etalonLightType.Value!.Value!, etalonFieldRect.Value!, securityTextResultOCR.Value!, etalonResultOCR.Value!, reserved1, reserved2); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, OCRSecurityTextItem oCRSecurityTextItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, oCRSecurityTextItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, OCRSecurityTextItem oCRSecurityTextItem, JsonSerializerOptions jsonSerializerOptions) - { - if (oCRSecurityTextItem.FieldRect == null) - throw new ArgumentNullException(nameof(oCRSecurityTextItem.FieldRect), "Property is required for class OCRSecurityTextItem."); - - if (oCRSecurityTextItem.EtalonFieldRect == null) - throw new ArgumentNullException(nameof(oCRSecurityTextItem.EtalonFieldRect), "Property is required for class OCRSecurityTextItem."); - - if (oCRSecurityTextItem.SecurityTextResultOCR == null) - throw new ArgumentNullException(nameof(oCRSecurityTextItem.SecurityTextResultOCR), "Property is required for class OCRSecurityTextItem."); - - if (oCRSecurityTextItem.EtalonResultOCR == null) - throw new ArgumentNullException(nameof(oCRSecurityTextItem.EtalonResultOCR), "Property is required for class OCRSecurityTextItem."); - - var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(oCRSecurityTextItem.CriticalFlag); - writer.WriteNumber("CriticalFlag", criticalFlagRawValue); - - var lightTypeRawValue = LightValueConverter.ToJsonValue(oCRSecurityTextItem.LightType); - writer.WriteNumber("LightType", lightTypeRawValue); - - writer.WritePropertyName("FieldRect"); - JsonSerializer.Serialize(writer, oCRSecurityTextItem.FieldRect, jsonSerializerOptions); - writer.WriteNumber("EtalonResultType", oCRSecurityTextItem.EtalonResultType); - - writer.WriteNumber("EtalonFieldType", oCRSecurityTextItem.EtalonFieldType); - - writer.WriteNumber("EtalonLightType", oCRSecurityTextItem.EtalonLightType); - - writer.WritePropertyName("EtalonFieldRect"); - JsonSerializer.Serialize(writer, oCRSecurityTextItem.EtalonFieldRect, jsonSerializerOptions); - writer.WriteString("SecurityTextResultOCR", oCRSecurityTextItem.SecurityTextResultOCR); - - writer.WriteString("EtalonResultOCR", oCRSecurityTextItem.EtalonResultOCR); - - if (oCRSecurityTextItem.Reserved1Option.IsSet) - writer.WriteNumber("Reserved1", oCRSecurityTextItem.Reserved1Option.Value!.Value); - - if (oCRSecurityTextItem.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", oCRSecurityTextItem.Reserved2Option.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs index 3a45df7..0ece855 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,135 +14,148 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// OCRSecurityTextResult /// + [DataContract(Name = "OCRSecurityTextResult")] public partial class OCRSecurityTextResult : AuthenticityCheckResultItem, IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// criticalFlag - /// lightType - /// fieldRect - /// etalonResultType - /// etalonFieldType - /// etalonLightType - /// etalonFieldRect - /// securityTextResultOCR - /// etalonResultOCR - /// elementResult - /// elementDiagnose - /// percentValue - /// reserved1 - /// reserved2 - [JsonConstructor] - public OCRSecurityTextResult(Critical criticalFlag, Light lightType, RectangleCoordinates fieldRect, int etalonResultType, int etalonFieldType, int etalonLightType, RectangleCoordinates etalonFieldRect, string securityTextResultOCR, string etalonResultOCR, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option reserved1 = default, Option reserved2 = default) : base(elementResult, elementDiagnose, percentValue) - { - CriticalFlag = criticalFlag; - LightType = lightType; - FieldRect = fieldRect; - EtalonResultType = etalonResultType; - EtalonFieldType = etalonFieldType; - EtalonLightType = etalonLightType; - EtalonFieldRect = etalonFieldRect; - SecurityTextResultOCR = securityTextResultOCR; - EtalonResultOCR = etalonResultOCR; - Reserved1Option = reserved1; - Reserved2Option = reserved2; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets CriticalFlag /// - [JsonPropertyName("CriticalFlag")] + [DataMember(Name = "CriticalFlag", IsRequired = true, EmitDefaultValue = true)] public Critical CriticalFlag { get; set; } /// /// Gets or Sets LightType /// - [JsonPropertyName("LightType")] + [DataMember(Name = "LightType", IsRequired = true, EmitDefaultValue = true)] public Light LightType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OCRSecurityTextResult() { } + /// + /// Initializes a new instance of the class. + /// + /// criticalFlag (required). + /// lightType (required). + /// fieldRect (required). + /// etalonResultType (required). + /// etalonFieldType (required). + /// etalonLightType (required). + /// etalonFieldRect (required). + /// securityTextResultOCR (required). + /// etalonResultOCR (required). + /// reserved1. + /// reserved2. + /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// elementResult. + /// elementDiagnose. + /// percentValue. + public OCRSecurityTextResult(Critical criticalFlag = default(Critical), Light lightType = default(Light), RectangleCoordinates fieldRect = default(RectangleCoordinates), int etalonResultType = default(int), int etalonFieldType = default(int), int etalonLightType = default(int), RectangleCoordinates etalonFieldRect = default(RectangleCoordinates), string securityTextResultOCR = default(string), string etalonResultOCR = default(string), int reserved1 = default(int), int reserved2 = default(int), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + { + this.CriticalFlag = criticalFlag; + this.LightType = lightType; + // to ensure "fieldRect" is required (not null) + if (fieldRect == null) + { + throw new ArgumentNullException("fieldRect is a required property for OCRSecurityTextResult and cannot be null"); + } + this.FieldRect = fieldRect; + this.EtalonResultType = etalonResultType; + this.EtalonFieldType = etalonFieldType; + this.EtalonLightType = etalonLightType; + // to ensure "etalonFieldRect" is required (not null) + if (etalonFieldRect == null) + { + throw new ArgumentNullException("etalonFieldRect is a required property for OCRSecurityTextResult and cannot be null"); + } + this.EtalonFieldRect = etalonFieldRect; + // to ensure "securityTextResultOCR" is required (not null) + if (securityTextResultOCR == null) + { + throw new ArgumentNullException("securityTextResultOCR is a required property for OCRSecurityTextResult and cannot be null"); + } + this.SecurityTextResultOCR = securityTextResultOCR; + // to ensure "etalonResultOCR" is required (not null) + if (etalonResultOCR == null) + { + throw new ArgumentNullException("etalonResultOCR is a required property for OCRSecurityTextResult and cannot be null"); + } + this.EtalonResultOCR = etalonResultOCR; + this.Reserved1 = reserved1; + this.Reserved2 = reserved2; + } /// /// Gets or Sets FieldRect /// - [JsonPropertyName("FieldRect")] + [DataMember(Name = "FieldRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates FieldRect { get; set; } /// /// Gets or Sets EtalonResultType /// - [JsonPropertyName("EtalonResultType")] + [DataMember(Name = "EtalonResultType", IsRequired = true, EmitDefaultValue = true)] public int EtalonResultType { get; set; } /// /// Gets or Sets EtalonFieldType /// - [JsonPropertyName("EtalonFieldType")] + [DataMember(Name = "EtalonFieldType", IsRequired = true, EmitDefaultValue = true)] public int EtalonFieldType { get; set; } /// /// Gets or Sets EtalonLightType /// - [JsonPropertyName("EtalonLightType")] + [DataMember(Name = "EtalonLightType", IsRequired = true, EmitDefaultValue = true)] public int EtalonLightType { get; set; } /// /// Gets or Sets EtalonFieldRect /// - [JsonPropertyName("EtalonFieldRect")] + [DataMember(Name = "EtalonFieldRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates EtalonFieldRect { get; set; } /// /// Gets or Sets SecurityTextResultOCR /// - [JsonPropertyName("SecurityTextResultOCR")] + [DataMember(Name = "SecurityTextResultOCR", IsRequired = true, EmitDefaultValue = true)] public string SecurityTextResultOCR { get; set; } /// /// Gets or Sets EtalonResultOCR /// - [JsonPropertyName("EtalonResultOCR")] + [DataMember(Name = "EtalonResultOCR", IsRequired = true, EmitDefaultValue = true)] public string EtalonResultOCR { get; set; } - /// - /// Used to track the state of Reserved1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved1Option { get; private set; } - /// /// Gets or Sets Reserved1 /// - [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } - - /// - /// Used to track the state of Reserved2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved2Option { get; private set; } + [DataMember(Name = "Reserved1", EmitDefaultValue = false)] + public int Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// - [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + [DataMember(Name = "Reserved2", EmitDefaultValue = false)] + public int Reserved2 { get; set; } /// /// Returns the string presentation of the object @@ -154,7 +165,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class OCRSecurityTextResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" CriticalFlag: ").Append(CriticalFlag).Append("\n"); sb.Append(" LightType: ").Append(LightType).Append("\n"); sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); @@ -169,283 +180,39 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class OCRSecurityTextResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override OCRSecurityTextResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option criticalFlag = default; - Option lightType = default; - Option fieldRect = default; - Option etalonResultType = default; - Option etalonFieldType = default; - Option etalonLightType = default; - Option etalonFieldRect = default; - Option securityTextResultOCR = default; - Option etalonResultOCR = default; - Option type = default; - Option elementResult = default; - Option elementDiagnose = default; - Option percentValue = default; - Option reserved1 = default; - Option reserved2 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "CriticalFlag": - string? criticalFlagRawValue = utf8JsonReader.GetString(); - if (criticalFlagRawValue != null) - criticalFlag = new Option(CriticalValueConverter.FromStringOrDefault(criticalFlagRawValue)); - break; - case "LightType": - string? lightTypeRawValue = utf8JsonReader.GetString(); - if (lightTypeRawValue != null) - lightType = new Option(LightValueConverter.FromStringOrDefault(lightTypeRawValue)); - break; - case "FieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "EtalonResultType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonResultType = new Option(utf8JsonReader.GetInt32()); - break; - case "EtalonFieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonFieldType = new Option(utf8JsonReader.GetInt32()); - break; - case "EtalonLightType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonLightType = new Option(utf8JsonReader.GetInt32()); - break; - case "EtalonFieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - etalonFieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SecurityTextResultOCR": - securityTextResultOCR = new Option(utf8JsonReader.GetString()!); - break; - case "EtalonResultOCR": - etalonResultOCR = new Option(utf8JsonReader.GetString()!); - break; - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - case "ElementResult": - string? elementResultRawValue = utf8JsonReader.GetString(); - if (elementResultRawValue != null) - elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); - break; - case "ElementDiagnose": - string? elementDiagnoseRawValue = utf8JsonReader.GetString(); - if (elementDiagnoseRawValue != null) - elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); - break; - case "PercentValue": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - percentValue = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved1 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!criticalFlag.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(criticalFlag)); - - if (!lightType.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(lightType)); - - if (!fieldRect.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(fieldRect)); - - if (!etalonResultType.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonResultType)); - - if (!etalonFieldType.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonFieldType)); - - if (!etalonLightType.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonLightType)); - - if (!etalonFieldRect.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonFieldRect)); - - if (!securityTextResultOCR.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(securityTextResultOCR)); - - if (!etalonResultOCR.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(etalonResultOCR)); - - if (!type.IsSet) - throw new ArgumentException("Property is required for class OCRSecurityTextResult.", nameof(type)); - - if (criticalFlag.IsSet && criticalFlag.Value == null) - throw new ArgumentNullException(nameof(criticalFlag), "Property is not nullable for class OCRSecurityTextResult."); - - if (lightType.IsSet && lightType.Value == null) - throw new ArgumentNullException(nameof(lightType), "Property is not nullable for class OCRSecurityTextResult."); - - if (fieldRect.IsSet && fieldRect.Value == null) - throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class OCRSecurityTextResult."); - - if (etalonResultType.IsSet && etalonResultType.Value == null) - throw new ArgumentNullException(nameof(etalonResultType), "Property is not nullable for class OCRSecurityTextResult."); - - if (etalonFieldType.IsSet && etalonFieldType.Value == null) - throw new ArgumentNullException(nameof(etalonFieldType), "Property is not nullable for class OCRSecurityTextResult."); - - if (etalonLightType.IsSet && etalonLightType.Value == null) - throw new ArgumentNullException(nameof(etalonLightType), "Property is not nullable for class OCRSecurityTextResult."); - - if (etalonFieldRect.IsSet && etalonFieldRect.Value == null) - throw new ArgumentNullException(nameof(etalonFieldRect), "Property is not nullable for class OCRSecurityTextResult."); - - if (securityTextResultOCR.IsSet && securityTextResultOCR.Value == null) - throw new ArgumentNullException(nameof(securityTextResultOCR), "Property is not nullable for class OCRSecurityTextResult."); - - if (etalonResultOCR.IsSet && etalonResultOCR.Value == null) - throw new ArgumentNullException(nameof(etalonResultOCR), "Property is not nullable for class OCRSecurityTextResult."); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class OCRSecurityTextResult."); - - if (elementResult.IsSet && elementResult.Value == null) - throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class OCRSecurityTextResult."); - - if (elementDiagnose.IsSet && elementDiagnose.Value == null) - throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class OCRSecurityTextResult."); - - if (percentValue.IsSet && percentValue.Value == null) - throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class OCRSecurityTextResult."); - - if (reserved1.IsSet && reserved1.Value == null) - throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class OCRSecurityTextResult."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class OCRSecurityTextResult."); - - return new OCRSecurityTextResult(criticalFlag.Value!.Value!, lightType.Value!.Value!, fieldRect.Value!, etalonResultType.Value!.Value!, etalonFieldType.Value!.Value!, etalonLightType.Value!.Value!, etalonFieldRect.Value!, securityTextResultOCR.Value!, etalonResultOCR.Value!, elementResult, elementDiagnose, percentValue, reserved1, reserved2); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, OCRSecurityTextResult oCRSecurityTextResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, oCRSecurityTextResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, OCRSecurityTextResult oCRSecurityTextResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (oCRSecurityTextResult.FieldRect == null) - throw new ArgumentNullException(nameof(oCRSecurityTextResult.FieldRect), "Property is required for class OCRSecurityTextResult."); - - if (oCRSecurityTextResult.EtalonFieldRect == null) - throw new ArgumentNullException(nameof(oCRSecurityTextResult.EtalonFieldRect), "Property is required for class OCRSecurityTextResult."); - - if (oCRSecurityTextResult.SecurityTextResultOCR == null) - throw new ArgumentNullException(nameof(oCRSecurityTextResult.SecurityTextResultOCR), "Property is required for class OCRSecurityTextResult."); - - if (oCRSecurityTextResult.EtalonResultOCR == null) - throw new ArgumentNullException(nameof(oCRSecurityTextResult.EtalonResultOCR), "Property is required for class OCRSecurityTextResult."); - - var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(oCRSecurityTextResult.CriticalFlag); - writer.WriteNumber("CriticalFlag", criticalFlagRawValue); - - var lightTypeRawValue = LightValueConverter.ToJsonValue(oCRSecurityTextResult.LightType); - writer.WriteNumber("LightType", lightTypeRawValue); - - writer.WritePropertyName("FieldRect"); - JsonSerializer.Serialize(writer, oCRSecurityTextResult.FieldRect, jsonSerializerOptions); - writer.WriteNumber("EtalonResultType", oCRSecurityTextResult.EtalonResultType); - - writer.WriteNumber("EtalonFieldType", oCRSecurityTextResult.EtalonFieldType); - - writer.WriteNumber("EtalonLightType", oCRSecurityTextResult.EtalonLightType); - - writer.WritePropertyName("EtalonFieldRect"); - JsonSerializer.Serialize(writer, oCRSecurityTextResult.EtalonFieldRect, jsonSerializerOptions); - writer.WriteString("SecurityTextResultOCR", oCRSecurityTextResult.SecurityTextResultOCR); - - writer.WriteString("EtalonResultOCR", oCRSecurityTextResult.EtalonResultOCR); - - writer.WriteNumber("Type", oCRSecurityTextResult.Type); - - if (oCRSecurityTextResult.ElementResultOption.IsSet) + foreach (var x in base.BaseValidate(validationContext)) { - var elementResultRawValue = CheckResultValueConverter.ToJsonValue(oCRSecurityTextResult.ElementResult!.Value); - writer.WriteNumber("ElementResult", elementResultRawValue); + yield return x; } - if (oCRSecurityTextResult.ElementDiagnoseOption.IsSet) - { - var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(oCRSecurityTextResult.ElementDiagnose!.Value); - writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); - } - if (oCRSecurityTextResult.PercentValueOption.IsSet) - writer.WriteNumber("PercentValue", oCRSecurityTextResult.PercentValueOption.Value!.Value); - - if (oCRSecurityTextResult.Reserved1Option.IsSet) - writer.WriteNumber("Reserved1", oCRSecurityTextResult.Reserved1Option.Value!.Value); - - if (oCRSecurityTextResult.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", oCRSecurityTextResult.Reserved2Option.Value!.Value); + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs index 7a1e863..45299b5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,143 +14,153 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains information about one document type candidate /// + [DataContract(Name = "OneCandidate")] public partial class OneCandidate : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// Document name - /// Unique document type template identifier (Regula's internal numeric code) - /// A measure of the likelihood of correct recognition in the analysis of this type of document - /// true if the document of the given type is rotated by 180 degrees - /// rFIDPresence - /// fDSIDList - /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document - /// Set of authentication options provided for this type of document (combination of Authenticity enum) - /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme - /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity - /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme - /// rotationAngle - [JsonConstructor] - public OneCandidate(string documentName, int iD, decimal p, int rotated180, RfidLocation rFIDPresence, FDSIDList fDSIDList, int necessaryLights, int checkAuthenticity, int uVExp, int authenticityNecessaryLights, decimal oVIExp, Option rotationAngle = default) - { - DocumentName = documentName; - ID = iD; - P = p; - Rotated180 = rotated180; - RFIDPresence = rFIDPresence; - FDSIDList = fDSIDList; - NecessaryLights = necessaryLights; - CheckAuthenticity = checkAuthenticity; - UVExp = uVExp; - AuthenticityNecessaryLights = authenticityNecessaryLights; - OVIExp = oVIExp; - RotationAngleOption = rotationAngle; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets RFIDPresence /// - [JsonPropertyName("RFID_Presence")] + [DataMember(Name = "RFID_Presence", IsRequired = true, EmitDefaultValue = true)] public RfidLocation RFIDPresence { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected OneCandidate() { } + /// + /// Initializes a new instance of the class. + /// + /// Document name (required). + /// Unique document type template identifier (Regula's internal numeric code) (required). + /// A measure of the likelihood of correct recognition in the analysis of this type of document (required). + /// true if the document of the given type is rotated by 180 degrees (required). + /// rFIDPresence (required). + /// fDSIDList (required). + /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document (required). + /// Set of authentication options provided for this type of document (combination of Authenticity enum) (required). + /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme (required). + /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity (required). + /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme (required). + /// rotationAngle. + public OneCandidate(string documentName = default(string), int iD = default(int), decimal p = default(decimal), int rotated180 = default(int), RfidLocation rFIDPresence = default(RfidLocation), FDSIDList fDSIDList = default(FDSIDList), int necessaryLights = default(int), int checkAuthenticity = default(int), int uVExp = default(int), int authenticityNecessaryLights = default(int), decimal oVIExp = default(decimal), int rotationAngle = default(int)) + { + // to ensure "documentName" is required (not null) + if (documentName == null) + { + throw new ArgumentNullException("documentName is a required property for OneCandidate and cannot be null"); + } + this.DocumentName = documentName; + this.ID = iD; + this.P = p; + this.Rotated180 = rotated180; + this.RFIDPresence = rFIDPresence; + // to ensure "fDSIDList" is required (not null) + if (fDSIDList == null) + { + throw new ArgumentNullException("fDSIDList is a required property for OneCandidate and cannot be null"); + } + this.FDSIDList = fDSIDList; + this.NecessaryLights = necessaryLights; + this.CheckAuthenticity = checkAuthenticity; + this.UVExp = uVExp; + this.AuthenticityNecessaryLights = authenticityNecessaryLights; + this.OVIExp = oVIExp; + this.RotationAngle = rotationAngle; + } /// /// Document name /// /// Document name - [JsonPropertyName("DocumentName")] + [DataMember(Name = "DocumentName", IsRequired = true, EmitDefaultValue = true)] public string DocumentName { get; set; } /// /// Unique document type template identifier (Regula's internal numeric code) /// /// Unique document type template identifier (Regula's internal numeric code) - [JsonPropertyName("ID")] + [DataMember(Name = "ID", IsRequired = true, EmitDefaultValue = true)] public int ID { get; set; } /// /// A measure of the likelihood of correct recognition in the analysis of this type of document /// /// A measure of the likelihood of correct recognition in the analysis of this type of document - /* 0.9913095831871032 */ - [JsonPropertyName("P")] + /* + 0.9913095831871032 + */ + [DataMember(Name = "P", IsRequired = true, EmitDefaultValue = true)] public decimal P { get; set; } /// /// true if the document of the given type is rotated by 180 degrees /// /// true if the document of the given type is rotated by 180 degrees - [JsonPropertyName("Rotated180")] + [DataMember(Name = "Rotated180", IsRequired = true, EmitDefaultValue = true)] public int Rotated180 { get; set; } /// /// Gets or Sets FDSIDList /// - [JsonPropertyName("FDSIDList")] + [DataMember(Name = "FDSIDList", IsRequired = true, EmitDefaultValue = true)] public FDSIDList FDSIDList { get; set; } /// /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document /// /// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document - [JsonPropertyName("NecessaryLights")] + [DataMember(Name = "NecessaryLights", IsRequired = true, EmitDefaultValue = true)] public int NecessaryLights { get; set; } /// /// Set of authentication options provided for this type of document (combination of Authenticity enum) /// /// Set of authentication options provided for this type of document (combination of Authenticity enum) - [JsonPropertyName("CheckAuthenticity")] + [DataMember(Name = "CheckAuthenticity", IsRequired = true, EmitDefaultValue = true)] public int CheckAuthenticity { get; set; } /// /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme /// /// The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme - [JsonPropertyName("UVExp")] + [DataMember(Name = "UVExp", IsRequired = true, EmitDefaultValue = true)] public int UVExp { get; set; } /// /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity /// /// Combination of lighting scheme identifiers (combination of Light enum) needed to perform all authenticity checks specified in CheckAuthenticity - [JsonPropertyName("AuthenticityNecessaryLights")] + [DataMember(Name = "AuthenticityNecessaryLights", IsRequired = true, EmitDefaultValue = true)] public int AuthenticityNecessaryLights { get; set; } /// /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme /// /// Camera exposure value necessary when obtaining document images of the given type for AXIAL lighting scheme - [JsonPropertyName("OVIExp")] + [DataMember(Name = "OVIExp", IsRequired = true, EmitDefaultValue = true)] public decimal OVIExp { get; set; } - /// - /// Used to track the state of RotationAngle - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RotationAngleOption { get; private set; } - /// /// Gets or Sets RotationAngle /// - [JsonPropertyName("RotationAngle")] - public int? RotationAngle { get { return this.RotationAngleOption; } set { this.RotationAngleOption = new(value); } } + [DataMember(Name = "RotationAngle", EmitDefaultValue = false)] + public int RotationAngle { get; set; } /// /// Returns the string presentation of the object @@ -178,6 +186,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -201,237 +218,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class OneCandidateJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override OneCandidate Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option documentName = default; - Option iD = default; - Option p = default; - Option rotated180 = default; - Option rFIDPresence = default; - Option fDSIDList = default; - Option necessaryLights = default; - Option checkAuthenticity = default; - Option uVExp = default; - Option authenticityNecessaryLights = default; - Option oVIExp = default; - Option rotationAngle = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocumentName": - documentName = new Option(utf8JsonReader.GetString()!); - break; - case "ID": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - iD = new Option(utf8JsonReader.GetInt32()); - break; - case "P": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - p = new Option(utf8JsonReader.GetDecimal()); - break; - case "Rotated180": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rotated180 = new Option(utf8JsonReader.GetInt32()); - break; - case "RFID_Presence": - string? rFIDPresenceRawValue = utf8JsonReader.GetString(); - if (rFIDPresenceRawValue != null) - rFIDPresence = new Option(RfidLocationValueConverter.FromStringOrDefault(rFIDPresenceRawValue)); - break; - case "FDSIDList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fDSIDList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "NecessaryLights": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - necessaryLights = new Option(utf8JsonReader.GetInt32()); - break; - case "CheckAuthenticity": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkAuthenticity = new Option(utf8JsonReader.GetInt32()); - break; - case "UVExp": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - uVExp = new Option(utf8JsonReader.GetInt32()); - break; - case "AuthenticityNecessaryLights": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - authenticityNecessaryLights = new Option(utf8JsonReader.GetInt32()); - break; - case "OVIExp": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - oVIExp = new Option(utf8JsonReader.GetDecimal()); - break; - case "RotationAngle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rotationAngle = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!documentName.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(documentName)); - - if (!iD.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(iD)); - - if (!p.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(p)); - - if (!rotated180.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(rotated180)); - - if (!rFIDPresence.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(rFIDPresence)); - - if (!fDSIDList.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(fDSIDList)); - - if (!necessaryLights.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(necessaryLights)); - - if (!checkAuthenticity.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(checkAuthenticity)); - - if (!uVExp.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(uVExp)); - - if (!authenticityNecessaryLights.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(authenticityNecessaryLights)); - - if (!oVIExp.IsSet) - throw new ArgumentException("Property is required for class OneCandidate.", nameof(oVIExp)); - - if (documentName.IsSet && documentName.Value == null) - throw new ArgumentNullException(nameof(documentName), "Property is not nullable for class OneCandidate."); - - if (iD.IsSet && iD.Value == null) - throw new ArgumentNullException(nameof(iD), "Property is not nullable for class OneCandidate."); - - if (p.IsSet && p.Value == null) - throw new ArgumentNullException(nameof(p), "Property is not nullable for class OneCandidate."); - - if (rotated180.IsSet && rotated180.Value == null) - throw new ArgumentNullException(nameof(rotated180), "Property is not nullable for class OneCandidate."); - - if (rFIDPresence.IsSet && rFIDPresence.Value == null) - throw new ArgumentNullException(nameof(rFIDPresence), "Property is not nullable for class OneCandidate."); - - if (fDSIDList.IsSet && fDSIDList.Value == null) - throw new ArgumentNullException(nameof(fDSIDList), "Property is not nullable for class OneCandidate."); - - if (necessaryLights.IsSet && necessaryLights.Value == null) - throw new ArgumentNullException(nameof(necessaryLights), "Property is not nullable for class OneCandidate."); - - if (checkAuthenticity.IsSet && checkAuthenticity.Value == null) - throw new ArgumentNullException(nameof(checkAuthenticity), "Property is not nullable for class OneCandidate."); - - if (uVExp.IsSet && uVExp.Value == null) - throw new ArgumentNullException(nameof(uVExp), "Property is not nullable for class OneCandidate."); - - if (authenticityNecessaryLights.IsSet && authenticityNecessaryLights.Value == null) - throw new ArgumentNullException(nameof(authenticityNecessaryLights), "Property is not nullable for class OneCandidate."); - - if (oVIExp.IsSet && oVIExp.Value == null) - throw new ArgumentNullException(nameof(oVIExp), "Property is not nullable for class OneCandidate."); - - if (rotationAngle.IsSet && rotationAngle.Value == null) - throw new ArgumentNullException(nameof(rotationAngle), "Property is not nullable for class OneCandidate."); - - return new OneCandidate(documentName.Value!, iD.Value!.Value!, p.Value!.Value!, rotated180.Value!.Value!, rFIDPresence.Value!.Value!, fDSIDList.Value!, necessaryLights.Value!.Value!, checkAuthenticity.Value!.Value!, uVExp.Value!.Value!, authenticityNecessaryLights.Value!.Value!, oVIExp.Value!.Value!, rotationAngle); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, OneCandidate oneCandidate, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, oneCandidate, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, OneCandidate oneCandidate, JsonSerializerOptions jsonSerializerOptions) - { - if (oneCandidate.DocumentName == null) - throw new ArgumentNullException(nameof(oneCandidate.DocumentName), "Property is required for class OneCandidate."); - - if (oneCandidate.FDSIDList == null) - throw new ArgumentNullException(nameof(oneCandidate.FDSIDList), "Property is required for class OneCandidate."); - - writer.WriteString("DocumentName", oneCandidate.DocumentName); - - writer.WriteNumber("ID", oneCandidate.ID); - - writer.WriteNumber("P", oneCandidate.P); - - writer.WriteNumber("Rotated180", oneCandidate.Rotated180); - - var rFIDPresenceRawValue = RfidLocationValueConverter.ToJsonValue(oneCandidate.RFIDPresence); - writer.WriteNumber("RFID_Presence", rFIDPresenceRawValue); - - writer.WritePropertyName("FDSIDList"); - JsonSerializer.Serialize(writer, oneCandidate.FDSIDList, jsonSerializerOptions); - writer.WriteNumber("NecessaryLights", oneCandidate.NecessaryLights); - - writer.WriteNumber("CheckAuthenticity", oneCandidate.CheckAuthenticity); - - writer.WriteNumber("UVExp", oneCandidate.UVExp); - - writer.WriteNumber("AuthenticityNecessaryLights", oneCandidate.AuthenticityNecessaryLights); - - writer.WriteNumber("OVIExp", oneCandidate.OVIExp); - - if (oneCandidate.RotationAngleOption.IsSet) - writer.WriteNumber("RotationAngle", oneCandidate.RotationAngleOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs index 60f9e11..53b3d07 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,54 +14,63 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// OneCandidateItem /// + [DataContract(Name = "OneCandidateItem")] public partial class OneCandidateItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// oneCandidate - /// xMLBuffer - [JsonConstructor] - public OneCandidateItem(OneCandidate oneCandidate, Option xMLBuffer = default) + [JsonConstructorAttribute] + protected OneCandidateItem() { } + /// + /// Initializes a new instance of the class. + /// + /// oneCandidate (required). + public OneCandidateItem(OneCandidate oneCandidate = default(OneCandidate)) { - OneCandidate = oneCandidate; - XMLBufferOption = xMLBuffer; - OnCreated(); + // to ensure "oneCandidate" is required (not null) + if (oneCandidate == null) + { + throw new ArgumentNullException("oneCandidate is a required property for OneCandidateItem and cannot be null"); + } + this.OneCandidate = oneCandidate; } - partial void OnCreated(); - /// /// Gets or Sets OneCandidate /// - [JsonPropertyName("OneCandidate")] + [DataMember(Name = "OneCandidate", IsRequired = true, EmitDefaultValue = true)] public OneCandidate OneCandidate { get; set; } /// - /// Used to track the state of XMLBuffer + /// Gets or Sets XMLBuffer /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option XMLBufferOption { get; } + [DataMember(Name = "XML_buffer", EmitDefaultValue = false)] + public string XMLBuffer { get; private set; } /// - /// Gets or Sets XMLBuffer + /// Returns false as XMLBuffer should not be serialized given that it's read-only. /// - [JsonPropertyName("XML_buffer")] - public string? XMLBuffer { get { return this.XMLBufferOption; } } - + /// false (boolean) + public bool ShouldSerializeXMLBuffer() + { + return false; + } /// /// Returns the string presentation of the object /// @@ -78,6 +85,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -89,105 +105,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class OneCandidateItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override OneCandidateItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option oneCandidate = default; - Option xMLBuffer = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "OneCandidate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - oneCandidate = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "XML_buffer": - xMLBuffer = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!oneCandidate.IsSet) - throw new ArgumentException("Property is required for class OneCandidateItem.", nameof(oneCandidate)); - - if (oneCandidate.IsSet && oneCandidate.Value == null) - throw new ArgumentNullException(nameof(oneCandidate), "Property is not nullable for class OneCandidateItem."); - - if (xMLBuffer.IsSet && xMLBuffer.Value == null) - throw new ArgumentNullException(nameof(xMLBuffer), "Property is not nullable for class OneCandidateItem."); - - return new OneCandidateItem(oneCandidate.Value!, xMLBuffer); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, OneCandidateItem oneCandidateItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, oneCandidateItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, OneCandidateItem oneCandidateItem, JsonSerializerOptions jsonSerializerOptions) - { - if (oneCandidateItem.OneCandidate == null) - throw new ArgumentNullException(nameof(oneCandidateItem.OneCandidate), "Property is required for class OneCandidateItem."); - - if (oneCandidateItem.XMLBufferOption.IsSet && oneCandidateItem.XMLBuffer == null) - throw new ArgumentNullException(nameof(oneCandidateItem.XMLBuffer), "Property is required for class OneCandidateItem."); - - writer.WritePropertyName("OneCandidate"); - JsonSerializer.Serialize(writer, oneCandidateItem.OneCandidate, jsonSerializerOptions); - if (oneCandidateItem.XMLBufferOption.IsSet) - writer.WriteString("XML_buffer", oneCandidateItem.XMLBuffer); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs index dc6baaf..51867b1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,63 +14,61 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// OriginalSymbol /// + [DataContract(Name = "OriginalSymbol")] public partial class OriginalSymbol : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Unicode symbol code - /// Probability of correctness reading of a single character - /// rect - [JsonConstructor] - public OriginalSymbol(long code, int probability, Option rect = default) + [JsonConstructorAttribute] + protected OriginalSymbol() { } + /// + /// Initializes a new instance of the class. + /// + /// Unicode symbol code (required). + /// Probability of correctness reading of a single character (required). + /// rect. + public OriginalSymbol(long code = default(long), int probability = default(int), RectangleCoordinates rect = default(RectangleCoordinates)) { - Code = code; - Probability = probability; - RectOption = rect; - OnCreated(); + this.Code = code; + this.Probability = probability; + this.Rect = rect; } - partial void OnCreated(); - /// /// Unicode symbol code /// /// Unicode symbol code - [JsonPropertyName("code")] + [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = true)] public long Code { get; set; } /// /// Probability of correctness reading of a single character /// /// Probability of correctness reading of a single character - [JsonPropertyName("probability")] + [DataMember(Name = "probability", IsRequired = true, EmitDefaultValue = true)] public int Probability { get; set; } - /// - /// Used to track the state of Rect - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RectOption { get; private set; } - /// /// Gets or Sets Rect /// - [JsonPropertyName("rect")] - public RectangleCoordinates? Rect { get { return this.RectOption; } set { this.RectOption = new(value); } } + [DataMember(Name = "rect", EmitDefaultValue = false)] + public RectangleCoordinates Rect { get; set; } /// /// Returns the string presentation of the object @@ -89,6 +85,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -112,119 +117,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class OriginalSymbolJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override OriginalSymbol Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option code = default; - Option probability = default; - Option rect = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "code": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - code = new Option(utf8JsonReader.GetInt64()); - break; - case "probability": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - probability = new Option(utf8JsonReader.GetInt32()); - break; - case "rect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!code.IsSet) - throw new ArgumentException("Property is required for class OriginalSymbol.", nameof(code)); - - if (!probability.IsSet) - throw new ArgumentException("Property is required for class OriginalSymbol.", nameof(probability)); - - if (code.IsSet && code.Value == null) - throw new ArgumentNullException(nameof(code), "Property is not nullable for class OriginalSymbol."); - - if (probability.IsSet && probability.Value == null) - throw new ArgumentNullException(nameof(probability), "Property is not nullable for class OriginalSymbol."); - - if (rect.IsSet && rect.Value == null) - throw new ArgumentNullException(nameof(rect), "Property is not nullable for class OriginalSymbol."); - - return new OriginalSymbol(code.Value!.Value!, probability.Value!.Value!, rect); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, OriginalSymbol originalSymbol, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, originalSymbol, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, OriginalSymbol originalSymbol, JsonSerializerOptions jsonSerializerOptions) - { - if (originalSymbol.RectOption.IsSet && originalSymbol.Rect == null) - throw new ArgumentNullException(nameof(originalSymbol.Rect), "Property is required for class OriginalSymbol."); - - writer.WriteNumber("code", originalSymbol.Code); - - writer.WriteNumber("probability", originalSymbol.Probability); - - if (originalSymbol.RectOption.IsSet) - { - writer.WritePropertyName("rect"); - JsonSerializer.Serialize(writer, originalSymbol.Rect, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/OutData.cs b/src/Regula.DocumentReader.WebClient/Model/OutData.cs index f6c92f7..ab5255c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,61 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// OutData /// + [DataContract(Name = "OutData")] public partial class OutData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Response url - /// images - [JsonConstructor] - public OutData(Option url = default, Option?> images = default) + /// Response url. + /// images. + public OutData(string url = default(string), List images = default(List)) { - UrlOption = url; - ImagesOption = images; - OnCreated(); + this.Url = url; + this.Images = images; } - partial void OnCreated(); - - /// - /// Used to track the state of Url - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UrlOption { get; private set; } - /// /// Response url /// /// Response url - [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } - - /// - /// Used to track the state of Images - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ImagesOption { get; private set; } + [DataMember(Name = "url", EmitDefaultValue = false)] + public string Url { get; set; } /// /// Gets or Sets Images /// - [JsonPropertyName("images")] - public List? Images { get { return this.ImagesOption; } set { this.ImagesOption = new(value); } } + [DataMember(Name = "images", EmitDefaultValue = false)] + public List Images { get; set; } /// /// Returns the string presentation of the object @@ -86,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -97,106 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class OutDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override OutData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option url = default; - Option?> images = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "url": - url = new Option(utf8JsonReader.GetString()!); - break; - case "images": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - images = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (url.IsSet && url.Value == null) - throw new ArgumentNullException(nameof(url), "Property is not nullable for class OutData."); - - if (images.IsSet && images.Value == null) - throw new ArgumentNullException(nameof(images), "Property is not nullable for class OutData."); - - return new OutData(url, images); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, OutData outData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, outData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, OutData outData, JsonSerializerOptions jsonSerializerOptions) - { - if (outData.UrlOption.IsSet && outData.Url == null) - throw new ArgumentNullException(nameof(outData.Url), "Property is required for class OutData."); - - if (outData.ImagesOption.IsSet && outData.Images == null) - throw new ArgumentNullException(nameof(outData.Images), "Property is required for class OutData."); - - if (outData.UrlOption.IsSet) - writer.WriteString("url", outData.Url); - - if (outData.ImagesOption.IsSet) - { - writer.WritePropertyName("images"); - JsonSerializer.Serialize(writer, outData.Images, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs index 4b930b4..9351918 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,107 +14,72 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// OutDataTransactionImagesFieldValue /// + [DataContract(Name = "OutDataTransactionImagesFieldValue")] public partial class OutDataTransactionImagesFieldValue : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// fieldType - /// light - /// listIdx - /// Page index of the image from input list - /// Image url - [JsonConstructor] - public OutDataTransactionImagesFieldValue(Option fieldType = default, Option light = default, Option listIdx = default, Option pageIdx = default, Option url = default) - { - FieldTypeOption = fieldType; - LightOption = light; - ListIdxOption = listIdx; - PageIdxOption = pageIdx; - UrlOption = url; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Used to track the state of FieldType - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldTypeOption { get; private set; } /// /// Gets or Sets FieldType /// - [JsonPropertyName("fieldType")] - public GraphicFieldType? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new(value); } } - - /// - /// Used to track the state of Light - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LightOption { get; private set; } + [DataMember(Name = "fieldType", EmitDefaultValue = false)] + public GraphicFieldType? FieldType { get; set; } /// /// Gets or Sets Light /// - [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } - + [DataMember(Name = "light", EmitDefaultValue = false)] + public Light? Light { get; set; } /// - /// Used to track the state of ListIdx + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ListIdxOption { get; private set; } + /// fieldType. + /// light. + /// listIdx. + /// Page index of the image from input list. + /// Image url. + public OutDataTransactionImagesFieldValue(GraphicFieldType? fieldType = default(GraphicFieldType?), Light? light = default(Light?), int listIdx = default(int), int pageIdx = default(int), string url = default(string)) + { + this.FieldType = fieldType; + this.Light = light; + this.ListIdx = listIdx; + this.PageIdx = pageIdx; + this.Url = url; + } /// /// Gets or Sets ListIdx /// - [JsonPropertyName("listIdx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } - - /// - /// Used to track the state of PageIdx - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PageIdxOption { get; private set; } + [DataMember(Name = "listIdx", EmitDefaultValue = false)] + public int ListIdx { get; set; } /// /// Page index of the image from input list /// /// Page index of the image from input list - [JsonPropertyName("pageIdx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } - - /// - /// Used to track the state of Url - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UrlOption { get; private set; } + [DataMember(Name = "pageIdx", EmitDefaultValue = false)] + public int PageIdx { get; set; } /// /// Image url /// /// Image url - [JsonPropertyName("url")] - public string? Url { get { return this.UrlOption; } set { this.UrlOption = new(value); } } + [DataMember(Name = "url", EmitDefaultValue = false)] + public string Url { get; set; } /// /// Returns the string presentation of the object @@ -135,6 +98,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -146,139 +118,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class OutDataTransactionImagesFieldValueJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override OutDataTransactionImagesFieldValue Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldType = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option url = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "fieldType": - string? fieldTypeRawValue = utf8JsonReader.GetString(); - if (fieldTypeRawValue != null) - fieldType = new Option(GraphicFieldTypeValueConverter.FromStringOrDefault(fieldTypeRawValue)); - break; - case "light": - string? lightRawValue = utf8JsonReader.GetString(); - if (lightRawValue != null) - light = new Option(LightValueConverter.FromStringOrDefault(lightRawValue)); - break; - case "listIdx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "pageIdx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "url": - url = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class OutDataTransactionImagesFieldValue."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class OutDataTransactionImagesFieldValue."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class OutDataTransactionImagesFieldValue."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class OutDataTransactionImagesFieldValue."); - - if (url.IsSet && url.Value == null) - throw new ArgumentNullException(nameof(url), "Property is not nullable for class OutDataTransactionImagesFieldValue."); - - return new OutDataTransactionImagesFieldValue(fieldType, light, listIdx, pageIdx, url); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, OutDataTransactionImagesFieldValue outDataTransactionImagesFieldValue, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, outDataTransactionImagesFieldValue, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, OutDataTransactionImagesFieldValue outDataTransactionImagesFieldValue, JsonSerializerOptions jsonSerializerOptions) - { - if (outDataTransactionImagesFieldValue.UrlOption.IsSet && outDataTransactionImagesFieldValue.Url == null) - throw new ArgumentNullException(nameof(outDataTransactionImagesFieldValue.Url), "Property is required for class OutDataTransactionImagesFieldValue."); - - if (outDataTransactionImagesFieldValue.FieldTypeOption.IsSet) - { - var fieldTypeRawValue = GraphicFieldTypeValueConverter.ToJsonValue(outDataTransactionImagesFieldValue.FieldType!.Value); - writer.WriteNumber("fieldType", fieldTypeRawValue); - } - if (outDataTransactionImagesFieldValue.LightOption.IsSet) - { - var lightRawValue = LightValueConverter.ToJsonValue(outDataTransactionImagesFieldValue.Light!.Value); - writer.WriteNumber("light", lightRawValue); - } - if (outDataTransactionImagesFieldValue.ListIdxOption.IsSet) - writer.WriteNumber("listIdx", outDataTransactionImagesFieldValue.ListIdxOption.Value!.Value); - - if (outDataTransactionImagesFieldValue.PageIdxOption.IsSet) - writer.WriteNumber("pageIdx", outDataTransactionImagesFieldValue.PageIdxOption.Value!.Value); - - if (outDataTransactionImagesFieldValue.UrlOption.IsSet) - writer.WriteString("url", outDataTransactionImagesFieldValue.Url); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs index bb77a6e..47344b0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,131 +14,125 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// PArrayField /// + [DataContract(Name = "pArrayField")] public partial class PArrayField : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// bcAngleDETECT - /// bcCodeResult - /// bcCountModule - /// bcDataModule - /// bcROIDETECT - /// bcTypeDECODE - /// bcTypeDETECT - /// bcPDF417INFO - /// bcTextDecoderTypes - /// bcTextFieldType - [JsonConstructor] - public PArrayField(float bcAngleDETECT, int bcCodeResult, int bcCountModule, List bcDataModule, BcROIDETECT bcROIDETECT, BarcodeType bcTypeDECODE, int bcTypeDETECT, Option bcPDF417INFO = default, Option bcTextDecoderTypes = default, Option bcTextFieldType = default) - { - BcAngleDETECT = bcAngleDETECT; - BcCodeResult = bcCodeResult; - BcCountModule = bcCountModule; - BcDataModule = bcDataModule; - BcROIDETECT = bcROIDETECT; - BcTypeDECODE = bcTypeDECODE; - BcTypeDETECT = bcTypeDETECT; - BcPDF417INFOOption = bcPDF417INFO; - BcTextDecoderTypesOption = bcTextDecoderTypes; - BcTextFieldTypeOption = bcTextFieldType; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets BcTypeDECODE /// - [JsonPropertyName("bcType_DECODE")] + [DataMember(Name = "bcType_DECODE", IsRequired = true, EmitDefaultValue = true)] public BarcodeType BcTypeDECODE { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PArrayField() { } + /// + /// Initializes a new instance of the class. + /// + /// bcAngleDETECT (required). + /// bcCodeResult (required). + /// bcCountModule (required). + /// bcDataModule (required). + /// bcPDF417INFO. + /// bcROIDETECT (required). + /// bcTextDecoderTypes. + /// bcTextFieldType. + /// bcTypeDECODE (required). + /// bcTypeDETECT (required). + public PArrayField(float bcAngleDETECT = default(float), int bcCodeResult = default(int), int bcCountModule = default(int), List bcDataModule = default(List), BcPDF417INFO bcPDF417INFO = default(BcPDF417INFO), BcROIDETECT bcROIDETECT = default(BcROIDETECT), int bcTextDecoderTypes = default(int), int bcTextFieldType = default(int), BarcodeType bcTypeDECODE = default(BarcodeType), int bcTypeDETECT = default(int)) + { + this.BcAngleDETECT = bcAngleDETECT; + this.BcCodeResult = bcCodeResult; + this.BcCountModule = bcCountModule; + // to ensure "bcDataModule" is required (not null) + if (bcDataModule == null) + { + throw new ArgumentNullException("bcDataModule is a required property for PArrayField and cannot be null"); + } + this.BcDataModule = bcDataModule; + // to ensure "bcROIDETECT" is required (not null) + if (bcROIDETECT == null) + { + throw new ArgumentNullException("bcROIDETECT is a required property for PArrayField and cannot be null"); + } + this.BcROIDETECT = bcROIDETECT; + this.BcTypeDECODE = bcTypeDECODE; + this.BcTypeDETECT = bcTypeDETECT; + this.BcPDF417INFO = bcPDF417INFO; + this.BcTextDecoderTypes = bcTextDecoderTypes; + this.BcTextFieldType = bcTextFieldType; + } /// /// Gets or Sets BcAngleDETECT /// - [JsonPropertyName("bcAngle_DETECT")] + [DataMember(Name = "bcAngle_DETECT", IsRequired = true, EmitDefaultValue = true)] public float BcAngleDETECT { get; set; } /// /// Gets or Sets BcCodeResult /// - [JsonPropertyName("bcCodeResult")] + [DataMember(Name = "bcCodeResult", IsRequired = true, EmitDefaultValue = true)] public int BcCodeResult { get; set; } /// /// Gets or Sets BcCountModule /// - [JsonPropertyName("bcCountModule")] + [DataMember(Name = "bcCountModule", IsRequired = true, EmitDefaultValue = true)] public int BcCountModule { get; set; } /// /// Gets or Sets BcDataModule /// - [JsonPropertyName("bcDataModule")] + [DataMember(Name = "bcDataModule", IsRequired = true, EmitDefaultValue = true)] public List BcDataModule { get; set; } - /// - /// Gets or Sets BcROIDETECT - /// - [JsonPropertyName("bcROI_DETECT")] - public BcROIDETECT BcROIDETECT { get; set; } - - /// - /// Gets or Sets BcTypeDETECT - /// - [JsonPropertyName("bcType_DETECT")] - public int BcTypeDETECT { get; set; } - - /// - /// Used to track the state of BcPDF417INFO - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BcPDF417INFOOption { get; private set; } - /// /// Gets or Sets BcPDF417INFO /// - [JsonPropertyName("bcPDF417INFO")] - public BcPDF417INFO? BcPDF417INFO { get { return this.BcPDF417INFOOption; } set { this.BcPDF417INFOOption = new(value); } } + [DataMember(Name = "bcPDF417INFO", EmitDefaultValue = false)] + public BcPDF417INFO BcPDF417INFO { get; set; } /// - /// Used to track the state of BcTextDecoderTypes + /// Gets or Sets BcROIDETECT /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BcTextDecoderTypesOption { get; private set; } + [DataMember(Name = "bcROI_DETECT", IsRequired = true, EmitDefaultValue = true)] + public BcROIDETECT BcROIDETECT { get; set; } /// /// Gets or Sets BcTextDecoderTypes /// - [JsonPropertyName("bcTextDecoderTypes")] - public int? BcTextDecoderTypes { get { return this.BcTextDecoderTypesOption; } set { this.BcTextDecoderTypesOption = new(value); } } + [DataMember(Name = "bcTextDecoderTypes", EmitDefaultValue = false)] + public int BcTextDecoderTypes { get; set; } /// - /// Used to track the state of BcTextFieldType + /// Gets or Sets BcTextFieldType /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BcTextFieldTypeOption { get; private set; } + [DataMember(Name = "bcTextFieldType", EmitDefaultValue = false)] + public int BcTextFieldType { get; set; } /// - /// Gets or Sets BcTextFieldType + /// Gets or Sets BcTypeDETECT /// - [JsonPropertyName("bcTextFieldType")] - public int? BcTextFieldType { get { return this.BcTextFieldTypeOption; } set { this.BcTextFieldTypeOption = new(value); } } + [DataMember(Name = "bcType_DETECT", IsRequired = true, EmitDefaultValue = true)] + public int BcTypeDETECT { get; set; } /// /// Returns the string presentation of the object @@ -154,16 +146,25 @@ public override string ToString() sb.Append(" BcCodeResult: ").Append(BcCodeResult).Append("\n"); sb.Append(" BcCountModule: ").Append(BcCountModule).Append("\n"); sb.Append(" BcDataModule: ").Append(BcDataModule).Append("\n"); - sb.Append(" BcROIDETECT: ").Append(BcROIDETECT).Append("\n"); - sb.Append(" BcTypeDECODE: ").Append(BcTypeDECODE).Append("\n"); - sb.Append(" BcTypeDETECT: ").Append(BcTypeDETECT).Append("\n"); sb.Append(" BcPDF417INFO: ").Append(BcPDF417INFO).Append("\n"); + sb.Append(" BcROIDETECT: ").Append(BcROIDETECT).Append("\n"); sb.Append(" BcTextDecoderTypes: ").Append(BcTextDecoderTypes).Append("\n"); sb.Append(" BcTextFieldType: ").Append(BcTextFieldType).Append("\n"); + sb.Append(" BcTypeDECODE: ").Append(BcTypeDECODE).Append("\n"); + sb.Append(" BcTypeDETECT: ").Append(BcTypeDETECT).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -175,213 +176,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class PArrayFieldJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override PArrayField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option bcAngleDETECT = default; - Option bcCodeResult = default; - Option bcCountModule = default; - Option?> bcDataModule = default; - Option bcROIDETECT = default; - Option bcTypeDECODE = default; - Option bcTypeDETECT = default; - Option bcPDF417INFO = default; - Option bcTextDecoderTypes = default; - Option bcTextFieldType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "bcAngle_DETECT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcAngleDETECT = new Option((float)utf8JsonReader.GetDouble()); - break; - case "bcCodeResult": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcCodeResult = new Option(utf8JsonReader.GetInt32()); - break; - case "bcCountModule": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcCountModule = new Option(utf8JsonReader.GetInt32()); - break; - case "bcDataModule": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcDataModule = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "bcROI_DETECT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcROIDETECT = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "bcType_DECODE": - string? bcTypeDECODERawValue = utf8JsonReader.GetString(); - if (bcTypeDECODERawValue != null) - bcTypeDECODE = new Option(BarcodeTypeValueConverter.FromStringOrDefault(bcTypeDECODERawValue)); - break; - case "bcType_DETECT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcTypeDETECT = new Option(utf8JsonReader.GetInt32()); - break; - case "bcPDF417INFO": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcPDF417INFO = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "bcTextDecoderTypes": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcTextDecoderTypes = new Option(utf8JsonReader.GetInt32()); - break; - case "bcTextFieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bcTextFieldType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!bcAngleDETECT.IsSet) - throw new ArgumentException("Property is required for class PArrayField.", nameof(bcAngleDETECT)); - - if (!bcCodeResult.IsSet) - throw new ArgumentException("Property is required for class PArrayField.", nameof(bcCodeResult)); - - if (!bcCountModule.IsSet) - throw new ArgumentException("Property is required for class PArrayField.", nameof(bcCountModule)); - - if (!bcDataModule.IsSet) - throw new ArgumentException("Property is required for class PArrayField.", nameof(bcDataModule)); - - if (!bcROIDETECT.IsSet) - throw new ArgumentException("Property is required for class PArrayField.", nameof(bcROIDETECT)); - - if (!bcTypeDECODE.IsSet) - throw new ArgumentException("Property is required for class PArrayField.", nameof(bcTypeDECODE)); - - if (!bcTypeDETECT.IsSet) - throw new ArgumentException("Property is required for class PArrayField.", nameof(bcTypeDETECT)); - - if (bcAngleDETECT.IsSet && bcAngleDETECT.Value == null) - throw new ArgumentNullException(nameof(bcAngleDETECT), "Property is not nullable for class PArrayField."); - - if (bcCodeResult.IsSet && bcCodeResult.Value == null) - throw new ArgumentNullException(nameof(bcCodeResult), "Property is not nullable for class PArrayField."); - - if (bcCountModule.IsSet && bcCountModule.Value == null) - throw new ArgumentNullException(nameof(bcCountModule), "Property is not nullable for class PArrayField."); - - if (bcDataModule.IsSet && bcDataModule.Value == null) - throw new ArgumentNullException(nameof(bcDataModule), "Property is not nullable for class PArrayField."); - - if (bcROIDETECT.IsSet && bcROIDETECT.Value == null) - throw new ArgumentNullException(nameof(bcROIDETECT), "Property is not nullable for class PArrayField."); - - if (bcTypeDECODE.IsSet && bcTypeDECODE.Value == null) - throw new ArgumentNullException(nameof(bcTypeDECODE), "Property is not nullable for class PArrayField."); - - if (bcTypeDETECT.IsSet && bcTypeDETECT.Value == null) - throw new ArgumentNullException(nameof(bcTypeDETECT), "Property is not nullable for class PArrayField."); - - if (bcPDF417INFO.IsSet && bcPDF417INFO.Value == null) - throw new ArgumentNullException(nameof(bcPDF417INFO), "Property is not nullable for class PArrayField."); - - if (bcTextDecoderTypes.IsSet && bcTextDecoderTypes.Value == null) - throw new ArgumentNullException(nameof(bcTextDecoderTypes), "Property is not nullable for class PArrayField."); - - if (bcTextFieldType.IsSet && bcTextFieldType.Value == null) - throw new ArgumentNullException(nameof(bcTextFieldType), "Property is not nullable for class PArrayField."); - - return new PArrayField(bcAngleDETECT.Value!.Value!, bcCodeResult.Value!.Value!, bcCountModule.Value!.Value!, bcDataModule.Value!, bcROIDETECT.Value!, bcTypeDECODE.Value!.Value!, bcTypeDETECT.Value!.Value!, bcPDF417INFO, bcTextDecoderTypes, bcTextFieldType); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, PArrayField pArrayField, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, pArrayField, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, PArrayField pArrayField, JsonSerializerOptions jsonSerializerOptions) - { - if (pArrayField.BcDataModule == null) - throw new ArgumentNullException(nameof(pArrayField.BcDataModule), "Property is required for class PArrayField."); - - if (pArrayField.BcROIDETECT == null) - throw new ArgumentNullException(nameof(pArrayField.BcROIDETECT), "Property is required for class PArrayField."); - - if (pArrayField.BcPDF417INFOOption.IsSet && pArrayField.BcPDF417INFO == null) - throw new ArgumentNullException(nameof(pArrayField.BcPDF417INFO), "Property is required for class PArrayField."); - - writer.WriteNumber("bcAngle_DETECT", pArrayField.BcAngleDETECT); - - writer.WriteNumber("bcCodeResult", pArrayField.BcCodeResult); - - writer.WriteNumber("bcCountModule", pArrayField.BcCountModule); - - writer.WritePropertyName("bcDataModule"); - JsonSerializer.Serialize(writer, pArrayField.BcDataModule, jsonSerializerOptions); - writer.WritePropertyName("bcROI_DETECT"); - JsonSerializer.Serialize(writer, pArrayField.BcROIDETECT, jsonSerializerOptions); - var bcTypeDECODERawValue = BarcodeTypeValueConverter.ToJsonValue(pArrayField.BcTypeDECODE); - writer.WriteNumber("bcType_DECODE", bcTypeDECODERawValue); - - writer.WriteNumber("bcType_DETECT", pArrayField.BcTypeDETECT); - - if (pArrayField.BcPDF417INFOOption.IsSet) - { - writer.WritePropertyName("bcPDF417INFO"); - JsonSerializer.Serialize(writer, pArrayField.BcPDF417INFO, jsonSerializerOptions); - } - if (pArrayField.BcTextDecoderTypesOption.IsSet) - writer.WriteNumber("bcTextDecoderTypes", pArrayField.BcTextDecoderTypesOption.Value!.Value); - - if (pArrayField.BcTextFieldTypeOption.IsSet) - writer.WriteNumber("bcTextFieldType", pArrayField.BcTextFieldTypeOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs index 0451b48..57cd437 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,38 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ParsedData /// + [DataContract(Name = "ParsedData")] public partial class ParsedData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// parsingNotifications - [JsonConstructor] - public ParsedData(Option?> parsingNotifications = default) + /// parsingNotifications. + public ParsedData(List parsingNotifications = default(List)) { - ParsingNotificationsOption = parsingNotifications; - OnCreated(); + this.ParsingNotifications = parsingNotifications; } - partial void OnCreated(); - - /// - /// Used to track the state of ParsingNotifications - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ParsingNotificationsOption { get; private set; } - /// /// Gets or Sets ParsingNotifications /// - [JsonPropertyName("ParsingNotifications")] - public List? ParsingNotifications { get { return this.ParsingNotificationsOption; } set { this.ParsingNotificationsOption = new(value); } } + [DataMember(Name = "ParsingNotifications", EmitDefaultValue = false)] + public List ParsingNotifications { get; set; } /// /// Returns the string presentation of the object @@ -69,6 +60,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -80,93 +80,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ParsedDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ParsedData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> parsingNotifications = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ParsingNotifications": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - parsingNotifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (parsingNotifications.IsSet && parsingNotifications.Value == null) - throw new ArgumentNullException(nameof(parsingNotifications), "Property is not nullable for class ParsedData."); - - return new ParsedData(parsingNotifications); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ParsedData parsedData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, parsedData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ParsedData parsedData, JsonSerializerOptions jsonSerializerOptions) - { - if (parsedData.ParsingNotificationsOption.IsSet && parsedData.ParsingNotifications == null) - throw new ArgumentNullException(nameof(parsedData.ParsingNotifications), "Property is required for class ParsedData."); - - if (parsedData.ParsingNotificationsOption.IsSet) - { - writer.WritePropertyName("ParsingNotifications"); - JsonSerializer.Serialize(writer, parsedData.ParsingNotifications, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs b/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs index a2f126b..55a3d3d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsingNotificationCodes.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -1142,1449 +1143,4 @@ public enum ParsingNotificationCodes: long ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching = 2415919698 } - /// - /// Converts to and from the JSON value - /// - public static class ParsingNotificationCodesValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static ParsingNotificationCodes FromString(string value) - { - if (value.Equals((2415919105).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectVersion; - - if (value.Equals((2415919106).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_NonMatchingSignatureAlgorithm; - - if (value.Equals((2415919107).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectTimeCoding; - - if (value.Equals((2415919108).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectUseOfGeneralizedTime; - - if (value.Equals((2415919109).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_EmptyIssuer; - - if (value.Equals((2415919110).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_EmptySubject; - - if (value.Equals((2415919112).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_UnsupportedCriticalExtension; - - if (value.Equals((2415919118).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_ForcedDefaultCSCARole; - - if (value.Equals((2415919119).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_ForcedDefaultDSRole; - - if (value.Equals((2415919120).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectIssuerSubjectDS; - - if (value.Equals((2415919127).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_DuplicatingExtensions; - - if (value.Equals((2415919616).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Version_Missed; - - if (value.Equals((2415919617).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Version_Incorrect; - - if (value.Equals((2415919618).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_Country_Missed; - - if (value.Equals((2415919619).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_CommonName_Missed; - - if (value.Equals((2415919620).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_CountryNonCompliant; - - if (value.Equals((2415919621).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_Country_Missed; - - if (value.Equals((2415919622).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CommonName_Missed; - - if (value.Equals((2415919623).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CountryNonCompliant; - - if (value.Equals((2415919624).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UsingNonCompliantData; - - if (value.Equals((2415919625).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UnsupportedSignatureAlgorithm; - - if (value.Equals((2415919626).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UnsupportedPublicKeyAlgorithm; - - if (value.Equals((2415919627).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_MissedExtensions; - - if (value.Equals((2415919628).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Validity; - - if (value.Equals((2415919629).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_UsingNonCompliantData; - - if (value.Equals((2415919630).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_Missed; - - if (value.Equals((2415919631).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_NotCritical; - - if (value.Equals((2415919632).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_IncorrectData; - - if (value.Equals((2415919633).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_Missed; - - if (value.Equals((2415919634).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage1; - - if (value.Equals((2415919635).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage2; - - if (value.Equals((2415919636).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_NotCritical; - - if (value.Equals((2415919637).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectData; - - if (value.Equals((2415919638).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Missed; - - if (value.Equals((2415919639).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Incorrect; - - if (value.Equals((2415919640).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_NotCritical; - - if (value.Equals((2415919641).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectUsage; - - if (value.Equals((2415919642).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectData; - - if (value.Equals((2415919643).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_Missed; - - if (value.Equals((2415919644).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_IncorrectData; - - if (value.Equals((2415919645).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_KeyID_Missed; - - if (value.Equals((2415919646).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_Missed; - - if (value.Equals((2415919647).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_IncorrectData; - - if (value.Equals((2415919648).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Missed; - - if (value.Equals((2415919649).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_IncorrectData; - - if (value.Equals((2415919650).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Empty; - - if (value.Equals((2415919651).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Missed; - - if (value.Equals((2415919652).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_IncorrectData; - - if (value.Equals((2415919653).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Empty; - - if (value.Equals((2415919654).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_NonCompliant; - - if (value.Equals((2415919656).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Critical; - - if (value.Equals((2415919657).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Empty; - - if (value.Equals((2415919658).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Incorrect; - - if (value.Equals((2415919659).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_NonCompliant; - - if (value.Equals((2415919660).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Missed; - - if (value.Equals((2415919661).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_IncorrectData; - - if (value.Equals((2415919662).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Empty; - - if (value.Equals((2415919663).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_NonCompliant; - - if (value.Equals((2415919665).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Critical; - - if (value.Equals((2415919666).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Empty; - - if (value.Equals((2415919667).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Incorrect; - - if (value.Equals((2415919668).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_NonCompliant; - - if (value.Equals((2415919669).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Missed; - - if (value.Equals((2415919670).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_IncorrectData; - - if (value.Equals((2415919671).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Version; - - if (value.Equals((2415919672).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes; - - if (value.Equals((2415919673).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes_Empty; - - if (value.Equals((2415919674).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_IncorrectData; - - if (value.Equals((2415919675).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_Empty; - - if (value.Equals((2415919676).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_PolicyID_Missed; - - if (value.Equals((2415919677).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Missed; - - if (value.Equals((2415919678).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_IncorrectData; - - if (value.Equals((2415919679).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Empty; - - if (value.Equals((2415919680).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_PointMissed; - - if (value.Equals((2415919681).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_SN_NonCompliant; - - if (value.Equals((2415919682).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_SN_NonCompliant; - - if (value.Equals((2415919683).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_SN_NonCompliant; - - if (value.Equals((2415919684).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_AttributeNonCompliant; - - if (value.Equals((2415919685).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_AttributeNonCompliant; - - if (value.Equals((2415919686).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_IssuerSubject_Country_NonMatching; - - if (value.Equals((2415919687).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CSCA_AltNames_NonMatching; - - if (value.Equals((2415919688).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_IncorrectData; - - if (value.Equals((2415919689).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_NonCompliant; - - if (value.Equals((2415919690).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_Critical; - - if (value.Equals((2415919691).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_NonCompliant; - - if (value.Equals((2415919692).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Critical; - - if (value.Equals((2415919693).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_Optional_Critical; - - if (value.Equals((2415919694).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_NonCompliant; - - if (value.Equals((2415919695).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CommonNameNonCompliant; - - if (value.Equals((2415919136).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_LDS_Version_Incorrect; - - if (value.Equals((2415919137).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_LDS_Version_Missing; - - if (value.Equals((2415919138).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_Unicode_Version_Incorrect; - - if (value.Equals((2415919139).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_Unicode_Version_Missing; - - if (value.Equals((2415919140).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Incorrect; - - if (value.Equals((2415919141).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Missing; - - if (value.Equals((2415919142).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Unexpected; - - if (value.Equals((2415919152).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Application_LDSVersion_Unsupported; - - if (value.Equals((2415919153).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Application_UnicodeVersion_Unsupported; - - if (value.Equals((2415919154).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Application_LDSVersion_Inconsistent; - - if (value.Equals((2415919155).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Application_UnicodeVersion_Inconsistent; - - if (value.Equals((2415919360).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignedData_OID_Incorrect; - - if (value.Equals((2415919520).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignedData_Version_Incorrect; - - if (value.Equals((2415919521).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignedData_ContentOID_Incorrect; - - if (value.Equals((2415919361).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Version_Incorrect; - - if (value.Equals((2415919362).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_DigestAlgorithms_Empty; - - if (value.Equals((2415919363).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_DigestAlgorithms_Unsupported; - - if (value.Equals((2415919369).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_SignerInfos_MultipleEntries; - - if (value.Equals((2415919536).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Certificates_Missed; - - if (value.Equals((2415919537).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Certificates_Empty; - - if (value.Equals((2415919538).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_CRLs_IncorrectUsage; - - if (value.Equals((2415919364).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_IncorrectContentOID; - - if (value.Equals((2415919365).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGNumber_Incorrect; - - if (value.Equals((2415919366).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGHash_Missing; - - if (value.Equals((2415919367).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGHash_Extra; - - if (value.Equals((2415919368).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_Version_Incorrect; - - if (value.Equals((2415919552).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_MasterList_Version_Incorrect; - - if (value.Equals((2415919560).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_DeviationList_Version_Incorrect; - - if (value.Equals((2415919568).ToString())) - return ParsingNotificationCodes.ntfLDS_BSI_DefectList_Version_Incorrect; - - if (value.Equals((2415919576).ToString())) - return ParsingNotificationCodes.ntfLDS_BSI_BlackList_Version_Incorrect; - - if (value.Equals((2415919370).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_Version_Incorrect; - - if (value.Equals((2415919371).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SID_IncorrectChoice; - - if (value.Equals((2415919372).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SID_DigestAlgorithmNotListed; - - if (value.Equals((2415919373).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Missing; - - if (value.Equals((2415919374).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Data; - - if (value.Equals((2415919375).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Value; - - if (value.Equals((2415919376).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Missing; - - if (value.Equals((2415919377).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Data; - - if (value.Equals((2415919378).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Value; - - if (value.Equals((2415919387).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Missing; - - if (value.Equals((2415919388).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Data; - - if (value.Equals((2415919389).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Value; - - if (value.Equals((2415919390).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Missing; - - if (value.Equals((2415919391).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Data; - - if (value.Equals((2415919381).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_Validity; - - if (value.Equals((2415919382).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_RootIsNotTrusted; - - if (value.Equals((2415919383).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_CantFindCSCA; - - if (value.Equals((2415919384).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_Revoked; - - if (value.Equals((2415919385).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_SignatureInvalid; - - if (value.Equals((2415919386).ToString())) - return ParsingNotificationCodes.ntfLDS_UnsupportedImageFormat; - - if (value.Equals((139272).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DocumentType_Unknown; - - if (value.Equals((139273).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_IssuingState_SyntaxError; - - if (value.Equals((139274).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Name_IsVoid; - - if (value.Equals((139277).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Number_IncorrectChecksum; - - if (value.Equals((139278).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Nationality_SyntaxError; - - if (value.Equals((139279).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOB_SyntaxError; - - if (value.Equals((139280).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOB_Error; - - if (value.Equals((139281).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOB_IncorrectChecksum; - - if (value.Equals((139282).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Sex_Incorrect; - - if (value.Equals((139283).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOE_SyntaxError; - - if (value.Equals((139284).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOE_Error; - - if (value.Equals((139285).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOE_IncorrectChecksum; - - if (value.Equals((139286).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_OptionalData_IncorrectChecksum; - - if (value.Equals((139287).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_IncorrectChecksum; - - if (value.Equals((139288).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Incorrect; - - if (value.Equals((2415984640).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_FormatOwner_Missing; - - if (value.Equals((2416050176).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_FormatOwner_Incorrect; - - if (value.Equals((2416115712).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_FormatType_Missing; - - if (value.Equals((2416181248).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_FormatType_Incorrect; - - if (value.Equals((2416246784).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_Type_Incorrect; - - if (value.Equals((2416312320).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_SubType_Missing; - - if (value.Equals((2416377856).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_SubType_Incorrect; - - if (value.Equals((2416443392).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Image_Missing; - - if (value.Equals((2416508928).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_FormatID_Incorrect; - - if (value.Equals((2416574464).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Version_Incorrect; - - if (value.Equals((2416640000).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_DataLength_Incorrect; - - if (value.Equals((2416967680).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_Gender; - - if (value.Equals((2417033216).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_EyeColor; - - if (value.Equals((2417098752).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_HairColor; - - if (value.Equals((2417164288).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Yaw; - - if (value.Equals((2417229824).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Pitch; - - if (value.Equals((2417295360).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Roll; - - if (value.Equals((2417360896).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Yaw; - - if (value.Equals((2417426432).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Pitch; - - if (value.Equals((2417491968).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Roll; - - if (value.Equals((2417557504).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_FaceImageType; - - if (value.Equals((2417623040).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_ImageDataType; - - if (value.Equals((2432696320).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_PACE_Info_UnsupportedStdParameters; - - if (value.Equals((2432696321).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_PACE_Info_DeprecatedVersion; - - if (value.Equals((2432696322).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_PACE_DomainParams_UsingStdRef; - - if (value.Equals((2432696323).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_PACE_DomainParams_UnsupportedAlgorithm; - - if (value.Equals((2432696324).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_CA_Info_IncorrectVersion; - - if (value.Equals((2432696325).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_CA_PublicKey_UnsupportedAlgorithm; - - if (value.Equals((2432696326).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_CA_DomainParams_UnsupportedAlgorithm; - - if (value.Equals((2432696327).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_TA_Info_IncorrectVersion; - - if (value.Equals((2432696328).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_TA_Info_FileIDForVersion2; - - if (value.Equals((2432696329).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_eIDSecurity_UnsupportedDigestAlgorithm; - - if (value.Equals((2432696330).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_RI_Info_IncorrectVersion; - - if (value.Equals((2432696331).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_RI_DomainParams_UnsupportedAlgorithm; - - if (value.Equals((2432696332).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_AA_Info_IncorrectVersion; - - if (value.Equals((2432696333).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_AA_Info_UnsupportedAlgorithm; - - if (value.Equals((2432696334).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_AA_Info_InconsistentAlgorithmReference; - - if (value.Equals((2432696576).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NotAvailable; - - if (value.Equals((2432696577).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NoStdParameters; - - if (value.Equals((2432696578).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NoMatchingDomainParams; - - if (value.Equals((2432696579).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NotAvailable; - - if (value.Equals((2432696580).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_DomainParams_NoRequiredOption; - - if (value.Equals((2432696581).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_DomainParams_NotAvailable; - - if (value.Equals((2432696582).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_AnonymousInfos; - - if (value.Equals((2432696583).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NoMatchingDomainParams; - - if (value.Equals((2432696584).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NoMatchingPublicKey; - - if (value.Equals((2432696585).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_IncorrectInfosQuantity; - - if (value.Equals((2432696586).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_TA_Info_NotAvailable; - - if (value.Equals((2432696587).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CardInfoLocator_MultipleEntries; - - if (value.Equals((2432696588).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_eIDSecurityInfo_MultipleEntries; - - if (value.Equals((2432696589).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PrivilegedTI_MultipleEntries; - - if (value.Equals((2432696590).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PrivilegedTI_IncorrectUsage; - - if (value.Equals((2432696591).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_RI_DomainParams_MultipleEntries; - - if (value.Equals((2432696592).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PACEInfos_NonConsistant; - - if (value.Equals((2432696833).ToString())) - return ParsingNotificationCodes.ntfLDS_CVCertificate_Profile_IncorrectVersion; - - if (value.Equals((2432696834).ToString())) - return ParsingNotificationCodes.ntfLDS_CVCertificate_Validity; - - if (value.Equals((2432696835).ToString())) - return ParsingNotificationCodes.ntfLDS_CVCertificate_NonCVCADomainParameters; - - if (value.Equals((2432696836).ToString())) - return ParsingNotificationCodes.ntfLDS_CV_Certificate_PrivateKey_IncorrectVersion; - - if (value.Equals((2432697088).ToString())) - return ParsingNotificationCodes.ntfLDS_TA_PACEStaticBindingUsed; - - if (value.Equals((2449473813).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_Validity; - - if (value.Equals((2449473814).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_RootIsNotTrusted; - - if (value.Equals((2449473815).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_CantFindCSCA; - - if (value.Equals((2449473816).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_Revoked; - - if (value.Equals((2449473817).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_SignatureInvalid; - - if (value.Equals((2415919696).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Chain_Country_NonMatching; - - if (value.Equals((2415919697).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_VisualMrz_Country_NonMatching; - - if (value.Equals((139289).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_CountryCode_VisualMrz_NonMatching; - - if (value.Equals((2415919698).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching; - - throw new NotImplementedException($"Could not convert value to type ParsingNotificationCodes: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static ParsingNotificationCodes? FromStringOrDefault(string value) - { - if (value.Equals((2415919105).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectVersion; - - if (value.Equals((2415919106).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_NonMatchingSignatureAlgorithm; - - if (value.Equals((2415919107).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectTimeCoding; - - if (value.Equals((2415919108).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectUseOfGeneralizedTime; - - if (value.Equals((2415919109).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_EmptyIssuer; - - if (value.Equals((2415919110).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_EmptySubject; - - if (value.Equals((2415919112).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_UnsupportedCriticalExtension; - - if (value.Equals((2415919118).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_ForcedDefaultCSCARole; - - if (value.Equals((2415919119).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_ForcedDefaultDSRole; - - if (value.Equals((2415919120).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_IncorrectIssuerSubjectDS; - - if (value.Equals((2415919127).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_Certificate_DuplicatingExtensions; - - if (value.Equals((2415919616).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Version_Missed; - - if (value.Equals((2415919617).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Version_Incorrect; - - if (value.Equals((2415919618).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_Country_Missed; - - if (value.Equals((2415919619).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_CommonName_Missed; - - if (value.Equals((2415919620).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_CountryNonCompliant; - - if (value.Equals((2415919621).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_Country_Missed; - - if (value.Equals((2415919622).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CommonName_Missed; - - if (value.Equals((2415919623).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CountryNonCompliant; - - if (value.Equals((2415919624).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UsingNonCompliantData; - - if (value.Equals((2415919625).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UnsupportedSignatureAlgorithm; - - if (value.Equals((2415919626).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_UnsupportedPublicKeyAlgorithm; - - if (value.Equals((2415919627).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_MissedExtensions; - - if (value.Equals((2415919628).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Validity; - - if (value.Equals((2415919629).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_UsingNonCompliantData; - - if (value.Equals((2415919630).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_Missed; - - if (value.Equals((2415919631).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_NotCritical; - - if (value.Equals((2415919632).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_KeyUsage_IncorrectData; - - if (value.Equals((2415919633).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_Missed; - - if (value.Equals((2415919634).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage1; - - if (value.Equals((2415919635).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectUsage2; - - if (value.Equals((2415919636).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_NotCritical; - - if (value.Equals((2415919637).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_IncorrectData; - - if (value.Equals((2415919638).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Missed; - - if (value.Equals((2415919639).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_BasicC_PathLenC_Incorrect; - - if (value.Equals((2415919640).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_NotCritical; - - if (value.Equals((2415919641).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectUsage; - - if (value.Equals((2415919642).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_ExtKeyUsage_IncorrectData; - - if (value.Equals((2415919643).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_Missed; - - if (value.Equals((2415919644).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_IncorrectData; - - if (value.Equals((2415919645).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_AuthKeyID_KeyID_Missed; - - if (value.Equals((2415919646).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_Missed; - - if (value.Equals((2415919647).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectKeyID_IncorrectData; - - if (value.Equals((2415919648).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Missed; - - if (value.Equals((2415919649).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_IncorrectData; - - if (value.Equals((2415919650).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_PrivateKeyUP_Empty; - - if (value.Equals((2415919651).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Missed; - - if (value.Equals((2415919652).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_IncorrectData; - - if (value.Equals((2415919653).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Empty; - - if (value.Equals((2415919654).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_NonCompliant; - - if (value.Equals((2415919656).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_Critical; - - if (value.Equals((2415919657).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Empty; - - if (value.Equals((2415919658).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_Incorrect; - - if (value.Equals((2415919659).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_SubjectAltName_DN_NonCompliant; - - if (value.Equals((2415919660).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Missed; - - if (value.Equals((2415919661).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_IncorrectData; - - if (value.Equals((2415919662).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Empty; - - if (value.Equals((2415919663).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_NonCompliant; - - if (value.Equals((2415919665).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_Critical; - - if (value.Equals((2415919666).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Empty; - - if (value.Equals((2415919667).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_Incorrect; - - if (value.Equals((2415919668).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_IssuerAltName_DN_NonCompliant; - - if (value.Equals((2415919669).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Missed; - - if (value.Equals((2415919670).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_IncorrectData; - - if (value.Equals((2415919671).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Version; - - if (value.Equals((2415919672).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes; - - if (value.Equals((2415919673).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_DocTypes_Empty; - - if (value.Equals((2415919674).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_IncorrectData; - - if (value.Equals((2415919675).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_Empty; - - if (value.Equals((2415919676).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CertPolicies_PolicyID_Missed; - - if (value.Equals((2415919677).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Missed; - - if (value.Equals((2415919678).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_IncorrectData; - - if (value.Equals((2415919679).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_Empty; - - if (value.Equals((2415919680).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CRLDistPoint_PointMissed; - - if (value.Equals((2415919681).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_SN_NonCompliant; - - if (value.Equals((2415919682).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_SN_NonCompliant; - - if (value.Equals((2415919683).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_SN_NonCompliant; - - if (value.Equals((2415919684).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Issuer_AttributeNonCompliant; - - if (value.Equals((2415919685).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_AttributeNonCompliant; - - if (value.Equals((2415919686).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_IssuerSubject_Country_NonMatching; - - if (value.Equals((2415919687).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_CSCA_AltNames_NonMatching; - - if (value.Equals((2415919688).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_IncorrectData; - - if (value.Equals((2415919689).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_NonCompliant; - - if (value.Equals((2415919690).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_NameChange_Critical; - - if (value.Equals((2415919691).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_NonCompliant; - - if (value.Equals((2415919692).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_DocTypeList_Critical; - - if (value.Equals((2415919693).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Ext_Optional_Critical; - - if (value.Equals((2415919694).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_NonCompliant; - - if (value.Equals((2415919695).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Subject_CommonNameNonCompliant; - - if (value.Equals((2415919136).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_LDS_Version_Incorrect; - - if (value.Equals((2415919137).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_LDS_Version_Missing; - - if (value.Equals((2415919138).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_Unicode_Version_Incorrect; - - if (value.Equals((2415919139).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_Unicode_Version_Missing; - - if (value.Equals((2415919140).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Incorrect; - - if (value.Equals((2415919141).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Missing; - - if (value.Equals((2415919142).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_COM_DGPM_Unexpected; - - if (value.Equals((2415919152).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Application_LDSVersion_Unsupported; - - if (value.Equals((2415919153).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Application_UnicodeVersion_Unsupported; - - if (value.Equals((2415919154).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Application_LDSVersion_Inconsistent; - - if (value.Equals((2415919155).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Application_UnicodeVersion_Inconsistent; - - if (value.Equals((2415919360).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignedData_OID_Incorrect; - - if (value.Equals((2415919520).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignedData_Version_Incorrect; - - if (value.Equals((2415919521).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignedData_ContentOID_Incorrect; - - if (value.Equals((2415919361).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Version_Incorrect; - - if (value.Equals((2415919362).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_DigestAlgorithms_Empty; - - if (value.Equals((2415919363).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_DigestAlgorithms_Unsupported; - - if (value.Equals((2415919369).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_SignerInfos_MultipleEntries; - - if (value.Equals((2415919536).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Certificates_Missed; - - if (value.Equals((2415919537).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_Certificates_Empty; - - if (value.Equals((2415919538).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_SignedData_CRLs_IncorrectUsage; - - if (value.Equals((2415919364).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_IncorrectContentOID; - - if (value.Equals((2415919365).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGNumber_Incorrect; - - if (value.Equals((2415919366).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGHash_Missing; - - if (value.Equals((2415919367).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_DGHash_Extra; - - if (value.Equals((2415919368).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_LDSObject_Version_Incorrect; - - if (value.Equals((2415919552).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_MasterList_Version_Incorrect; - - if (value.Equals((2415919560).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_DeviationList_Version_Incorrect; - - if (value.Equals((2415919568).ToString())) - return ParsingNotificationCodes.ntfLDS_BSI_DefectList_Version_Incorrect; - - if (value.Equals((2415919576).ToString())) - return ParsingNotificationCodes.ntfLDS_BSI_BlackList_Version_Incorrect; - - if (value.Equals((2415919370).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_Version_Incorrect; - - if (value.Equals((2415919371).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SID_IncorrectChoice; - - if (value.Equals((2415919372).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SID_DigestAlgorithmNotListed; - - if (value.Equals((2415919373).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Missing; - - if (value.Equals((2415919374).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Data; - - if (value.Equals((2415919375).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_MessageDigestAttr_Value; - - if (value.Equals((2415919376).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Missing; - - if (value.Equals((2415919377).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Data; - - if (value.Equals((2415919378).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ContentTypeAttr_Value; - - if (value.Equals((2415919387).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Missing; - - if (value.Equals((2415919388).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Data; - - if (value.Equals((2415919389).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_SigningTimeAttr_Value; - - if (value.Equals((2415919390).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Missing; - - if (value.Equals((2415919391).ToString())) - return ParsingNotificationCodes.ntfLDS_ASN_SignerInfo_ListContentDescriptionAttr_Data; - - if (value.Equals((2415919381).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_Validity; - - if (value.Equals((2415919382).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_RootIsNotTrusted; - - if (value.Equals((2415919383).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_CantFindCSCA; - - if (value.Equals((2415919384).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_Revoked; - - if (value.Equals((2415919385).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_SignerInfo_Certificate_SignatureInvalid; - - if (value.Equals((2415919386).ToString())) - return ParsingNotificationCodes.ntfLDS_UnsupportedImageFormat; - - if (value.Equals((139272).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DocumentType_Unknown; - - if (value.Equals((139273).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_IssuingState_SyntaxError; - - if (value.Equals((139274).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Name_IsVoid; - - if (value.Equals((139277).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Number_IncorrectChecksum; - - if (value.Equals((139278).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Nationality_SyntaxError; - - if (value.Equals((139279).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOB_SyntaxError; - - if (value.Equals((139280).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOB_Error; - - if (value.Equals((139281).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOB_IncorrectChecksum; - - if (value.Equals((139282).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Sex_Incorrect; - - if (value.Equals((139283).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOE_SyntaxError; - - if (value.Equals((139284).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOE_Error; - - if (value.Equals((139285).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_DOE_IncorrectChecksum; - - if (value.Equals((139286).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_OptionalData_IncorrectChecksum; - - if (value.Equals((139287).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_IncorrectChecksum; - - if (value.Equals((139288).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_Incorrect; - - if (value.Equals((2415984640).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_FormatOwner_Missing; - - if (value.Equals((2416050176).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_FormatOwner_Incorrect; - - if (value.Equals((2416115712).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_FormatType_Missing; - - if (value.Equals((2416181248).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_FormatType_Incorrect; - - if (value.Equals((2416246784).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_Type_Incorrect; - - if (value.Equals((2416312320).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_SubType_Missing; - - if (value.Equals((2416377856).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_SubType_Incorrect; - - if (value.Equals((2416443392).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Image_Missing; - - if (value.Equals((2416508928).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_FormatID_Incorrect; - - if (value.Equals((2416574464).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Version_Incorrect; - - if (value.Equals((2416640000).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_DataLength_Incorrect; - - if (value.Equals((2416967680).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_Gender; - - if (value.Equals((2417033216).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_EyeColor; - - if (value.Equals((2417098752).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_HairColor; - - if (value.Equals((2417164288).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Yaw; - - if (value.Equals((2417229824).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Pitch; - - if (value.Equals((2417295360).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngle_Roll; - - if (value.Equals((2417360896).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Yaw; - - if (value.Equals((2417426432).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Pitch; - - if (value.Equals((2417491968).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_PoseAngleU_Roll; - - if (value.Equals((2417557504).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_FaceImageType; - - if (value.Equals((2417623040).ToString())) - return ParsingNotificationCodes.ntfLDS_Biometrics_BDB_Data_ImageDataType; - - if (value.Equals((2432696320).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_PACE_Info_UnsupportedStdParameters; - - if (value.Equals((2432696321).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_PACE_Info_DeprecatedVersion; - - if (value.Equals((2432696322).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_PACE_DomainParams_UsingStdRef; - - if (value.Equals((2432696323).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_PACE_DomainParams_UnsupportedAlgorithm; - - if (value.Equals((2432696324).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_CA_Info_IncorrectVersion; - - if (value.Equals((2432696325).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_CA_PublicKey_UnsupportedAlgorithm; - - if (value.Equals((2432696326).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_CA_DomainParams_UnsupportedAlgorithm; - - if (value.Equals((2432696327).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_TA_Info_IncorrectVersion; - - if (value.Equals((2432696328).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_TA_Info_FileIDForVersion2; - - if (value.Equals((2432696329).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_eIDSecurity_UnsupportedDigestAlgorithm; - - if (value.Equals((2432696330).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_RI_Info_IncorrectVersion; - - if (value.Equals((2432696331).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_RI_DomainParams_UnsupportedAlgorithm; - - if (value.Equals((2432696332).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_AA_Info_IncorrectVersion; - - if (value.Equals((2432696333).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_AA_Info_UnsupportedAlgorithm; - - if (value.Equals((2432696334).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_AA_Info_InconsistentAlgorithmReference; - - if (value.Equals((2432696576).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NotAvailable; - - if (value.Equals((2432696577).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NoStdParameters; - - if (value.Equals((2432696578).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PACE_Info_NoMatchingDomainParams; - - if (value.Equals((2432696579).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NotAvailable; - - if (value.Equals((2432696580).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_DomainParams_NoRequiredOption; - - if (value.Equals((2432696581).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_DomainParams_NotAvailable; - - if (value.Equals((2432696582).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_AnonymousInfos; - - if (value.Equals((2432696583).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NoMatchingDomainParams; - - if (value.Equals((2432696584).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_Info_NoMatchingPublicKey; - - if (value.Equals((2432696585).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CA_IncorrectInfosQuantity; - - if (value.Equals((2432696586).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_TA_Info_NotAvailable; - - if (value.Equals((2432696587).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_CardInfoLocator_MultipleEntries; - - if (value.Equals((2432696588).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_eIDSecurityInfo_MultipleEntries; - - if (value.Equals((2432696589).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PrivilegedTI_MultipleEntries; - - if (value.Equals((2432696590).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PrivilegedTI_IncorrectUsage; - - if (value.Equals((2432696591).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_RI_DomainParams_MultipleEntries; - - if (value.Equals((2432696592).ToString())) - return ParsingNotificationCodes.ntfLDS_SI_Storage_PACEInfos_NonConsistant; - - if (value.Equals((2432696833).ToString())) - return ParsingNotificationCodes.ntfLDS_CVCertificate_Profile_IncorrectVersion; - - if (value.Equals((2432696834).ToString())) - return ParsingNotificationCodes.ntfLDS_CVCertificate_Validity; - - if (value.Equals((2432696835).ToString())) - return ParsingNotificationCodes.ntfLDS_CVCertificate_NonCVCADomainParameters; - - if (value.Equals((2432696836).ToString())) - return ParsingNotificationCodes.ntfLDS_CV_Certificate_PrivateKey_IncorrectVersion; - - if (value.Equals((2432697088).ToString())) - return ParsingNotificationCodes.ntfLDS_TA_PACEStaticBindingUsed; - - if (value.Equals((2449473813).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_Validity; - - if (value.Equals((2449473814).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_RootIsNotTrusted; - - if (value.Equals((2449473815).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_CantFindCSCA; - - if (value.Equals((2449473816).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_Revoked; - - if (value.Equals((2449473817).ToString())) - return ParsingNotificationCodes.ntfLDS_Auth_MLSignerInfo_Certificate_SignatureInvalid; - - if (value.Equals((2415919696).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_Chain_Country_NonMatching; - - if (value.Equals((2415919697).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_VisualMrz_Country_NonMatching; - - if (value.Equals((139289).ToString())) - return ParsingNotificationCodes.ntfLDS_MRZ_CountryCode_VisualMrz_NonMatching; - - if (value.Equals((2415919698).ToString())) - return ParsingNotificationCodes.ntfLDS_ICAO_Certificate_MRZ_Country_NonMatching; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static long ToJsonValue(ParsingNotificationCodes value) - { - return (long) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class ParsingNotificationCodesJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override ParsingNotificationCodes Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - ParsingNotificationCodes? result = rawValue == null - ? null - : ParsingNotificationCodesValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the ParsingNotificationCodes to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ParsingNotificationCodes parsingNotificationCodes, JsonSerializerOptions options) - { - writer.WriteStringValue(parsingNotificationCodes.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class ParsingNotificationCodesNullableJsonConverter : JsonConverter - { - /// - /// Returns a ParsingNotificationCodes from the Json object - /// - /// - /// - /// - /// - public override ParsingNotificationCodes? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - ParsingNotificationCodes? result = rawValue == null - ? null - : ParsingNotificationCodesValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ParsingNotificationCodes? parsingNotificationCodes, JsonSerializerOptions options) - { - writer.WriteStringValue(parsingNotificationCodes?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs index d55b378..6166ed7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,63 +14,51 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// PerDocumentConfig /// + [DataContract(Name = "PerDocumentConfig")] public partial class PerDocumentConfig : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Specific template IDs, for which apply current custom configuration - /// Contains items from AuthenticityResultType as sum via OR operation - [JsonConstructor] - public PerDocumentConfig(Option?> docID = default, Option excludeAuthChecks = default) + /// Specific template IDs, for which apply current custom configuration. + /// Contains items from AuthenticityResultType as sum via OR operation. + public PerDocumentConfig(List docID = default(List), int excludeAuthChecks = default(int)) { - DocIDOption = docID; - ExcludeAuthChecksOption = excludeAuthChecks; - OnCreated(); + this.DocID = docID; + this.ExcludeAuthChecks = excludeAuthChecks; } - partial void OnCreated(); - - /// - /// Used to track the state of DocID - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> DocIDOption { get; private set; } - /// /// Specific template IDs, for which apply current custom configuration /// /// Specific template IDs, for which apply current custom configuration - [JsonPropertyName("docID")] - public List? DocID { get { return this.DocIDOption; } set { this.DocIDOption = new(value); } } - - /// - /// Used to track the state of ExcludeAuthChecks - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ExcludeAuthChecksOption { get; private set; } + [DataMember(Name = "docID", EmitDefaultValue = false)] + public List DocID { get; set; } /// /// Contains items from AuthenticityResultType as sum via OR operation /// /// Contains items from AuthenticityResultType as sum via OR operation - /* 2 */ - [JsonPropertyName("excludeAuthChecks")] - public int? ExcludeAuthChecks { get { return this.ExcludeAuthChecksOption; } set { this.ExcludeAuthChecksOption = new(value); } } + /* + 2 + */ + [DataMember(Name = "excludeAuthChecks", EmitDefaultValue = false)] + public int ExcludeAuthChecks { get; set; } /// /// Returns the string presentation of the object @@ -88,6 +74,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -99,103 +94,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class PerDocumentConfigJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override PerDocumentConfig Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> docID = default; - Option excludeAuthChecks = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "docID": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docID = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "excludeAuthChecks": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - excludeAuthChecks = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (docID.IsSet && docID.Value == null) - throw new ArgumentNullException(nameof(docID), "Property is not nullable for class PerDocumentConfig."); - - if (excludeAuthChecks.IsSet && excludeAuthChecks.Value == null) - throw new ArgumentNullException(nameof(excludeAuthChecks), "Property is not nullable for class PerDocumentConfig."); - - return new PerDocumentConfig(docID, excludeAuthChecks); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, PerDocumentConfig perDocumentConfig, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, perDocumentConfig, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, PerDocumentConfig perDocumentConfig, JsonSerializerOptions jsonSerializerOptions) - { - if (perDocumentConfig.DocIDOption.IsSet && perDocumentConfig.DocID == null) - throw new ArgumentNullException(nameof(perDocumentConfig.DocID), "Property is required for class PerDocumentConfig."); - - if (perDocumentConfig.DocIDOption.IsSet) - { - writer.WritePropertyName("docID"); - JsonSerializer.Serialize(writer, perDocumentConfig.DocID, jsonSerializerOptions); - } - if (perDocumentConfig.ExcludeAuthChecksOption.IsSet) - writer.WriteNumber("excludeAuthChecks", perDocumentConfig.ExcludeAuthChecksOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs index 4c71794..2e484c0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,167 +14,138 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// PhotoIdentItem /// + [DataContract(Name = "PhotoIdentItem")] public partial class PhotoIdentItem : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// lightIndex - /// area - /// sourceImage - /// resultImages - /// fieldTypesCount - /// fieldTypesList - /// step - /// angle - /// reserved1 - /// reserved2 - /// reserved3 - [JsonConstructor] - public PhotoIdentItem(Light lightIndex, RectangleCoordinates area, ImageData sourceImage, RawImageContainerList resultImages, Option fieldTypesCount = default, Option?> fieldTypesList = default, Option step = default, Option angle = default, Option reserved1 = default, Option reserved2 = default, Option reserved3 = default) - { - LightIndex = lightIndex; - Area = area; - SourceImage = sourceImage; - ResultImages = resultImages; - FieldTypesCountOption = fieldTypesCount; - FieldTypesListOption = fieldTypesList; - StepOption = step; - AngleOption = angle; - Reserved1Option = reserved1; - Reserved2Option = reserved2; - Reserved3Option = reserved3; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets LightIndex /// - [JsonPropertyName("LightIndex")] + [DataMember(Name = "LightIndex", IsRequired = true, EmitDefaultValue = true)] public Light LightIndex { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PhotoIdentItem() { } + /// + /// Initializes a new instance of the class. + /// + /// lightIndex (required). + /// area (required). + /// sourceImage (required). + /// resultImages (required). + /// fieldTypesCount. + /// fieldTypesList. + /// step. + /// angle. + /// reserved1. + /// reserved2. + /// reserved3. + public PhotoIdentItem(Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData sourceImage = default(ImageData), RawImageContainerList resultImages = default(RawImageContainerList), int fieldTypesCount = default(int), List fieldTypesList = default(List), int step = default(int), int angle = default(int), int reserved1 = default(int), int reserved2 = default(int), int reserved3 = default(int)) + { + this.LightIndex = lightIndex; + // to ensure "area" is required (not null) + if (area == null) + { + throw new ArgumentNullException("area is a required property for PhotoIdentItem and cannot be null"); + } + this.Area = area; + // to ensure "sourceImage" is required (not null) + if (sourceImage == null) + { + throw new ArgumentNullException("sourceImage is a required property for PhotoIdentItem and cannot be null"); + } + this.SourceImage = sourceImage; + // to ensure "resultImages" is required (not null) + if (resultImages == null) + { + throw new ArgumentNullException("resultImages is a required property for PhotoIdentItem and cannot be null"); + } + this.ResultImages = resultImages; + this.FieldTypesCount = fieldTypesCount; + this.FieldTypesList = fieldTypesList; + this.Step = step; + this.Angle = angle; + this.Reserved1 = reserved1; + this.Reserved2 = reserved2; + this.Reserved3 = reserved3; + } /// /// Gets or Sets Area /// - [JsonPropertyName("Area")] + [DataMember(Name = "Area", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates Area { get; set; } /// /// Gets or Sets SourceImage /// - [JsonPropertyName("SourceImage")] + [DataMember(Name = "SourceImage", IsRequired = true, EmitDefaultValue = true)] public ImageData SourceImage { get; set; } /// /// Gets or Sets ResultImages /// - [JsonPropertyName("ResultImages")] + [DataMember(Name = "ResultImages", IsRequired = true, EmitDefaultValue = true)] public RawImageContainerList ResultImages { get; set; } - /// - /// Used to track the state of FieldTypesCount - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldTypesCountOption { get; private set; } - /// /// Gets or Sets FieldTypesCount /// - [JsonPropertyName("FieldTypesCount")] - public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new(value); } } - - /// - /// Used to track the state of FieldTypesList - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> FieldTypesListOption { get; private set; } + [DataMember(Name = "FieldTypesCount", EmitDefaultValue = false)] + public int FieldTypesCount { get; set; } /// /// Gets or Sets FieldTypesList /// - [JsonPropertyName("FieldTypesList")] - public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new(value); } } - - /// - /// Used to track the state of Step - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option StepOption { get; private set; } + [DataMember(Name = "FieldTypesList", EmitDefaultValue = false)] + public List FieldTypesList { get; set; } /// /// Gets or Sets Step /// - [JsonPropertyName("Step")] - public int? Step { get { return this.StepOption; } set { this.StepOption = new(value); } } - - /// - /// Used to track the state of Angle - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AngleOption { get; private set; } + [DataMember(Name = "Step", EmitDefaultValue = false)] + public int Step { get; set; } /// /// Gets or Sets Angle /// - [JsonPropertyName("Angle")] - public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new(value); } } - - /// - /// Used to track the state of Reserved1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved1Option { get; private set; } + [DataMember(Name = "Angle", EmitDefaultValue = false)] + public int Angle { get; set; } /// /// Gets or Sets Reserved1 /// - [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } - - /// - /// Used to track the state of Reserved2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved2Option { get; private set; } + [DataMember(Name = "Reserved1", EmitDefaultValue = false)] + public int Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// - [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } - - /// - /// Used to track the state of Reserved3 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved3Option { get; private set; } + [DataMember(Name = "Reserved2", EmitDefaultValue = false)] + public int Reserved2 { get; set; } /// /// Gets or Sets Reserved3 /// - [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } + [DataMember(Name = "Reserved3", EmitDefaultValue = false)] + public int Reserved3 { get; set; } /// /// Returns the string presentation of the object @@ -201,6 +170,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -212,221 +190,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class PhotoIdentItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override PhotoIdentItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option lightIndex = default; - Option area = default; - Option sourceImage = default; - Option resultImages = default; - Option fieldTypesCount = default; - Option?> fieldTypesList = default; - Option step = default; - Option angle = default; - Option reserved1 = default; - Option reserved2 = default; - Option reserved3 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "LightIndex": - string? lightIndexRawValue = utf8JsonReader.GetString(); - if (lightIndexRawValue != null) - lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); - break; - case "Area": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - area = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SourceImage": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sourceImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "ResultImages": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultImages = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "FieldTypesCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldTypesCount = new Option(utf8JsonReader.GetInt32()); - break; - case "FieldTypesList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldTypesList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Step": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - step = new Option(utf8JsonReader.GetInt32()); - break; - case "Angle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - angle = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved1 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved3": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved3 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!lightIndex.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentItem.", nameof(lightIndex)); - - if (!area.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentItem.", nameof(area)); - - if (!sourceImage.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentItem.", nameof(sourceImage)); - - if (!resultImages.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentItem.", nameof(resultImages)); - - if (lightIndex.IsSet && lightIndex.Value == null) - throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class PhotoIdentItem."); - - if (area.IsSet && area.Value == null) - throw new ArgumentNullException(nameof(area), "Property is not nullable for class PhotoIdentItem."); - - if (sourceImage.IsSet && sourceImage.Value == null) - throw new ArgumentNullException(nameof(sourceImage), "Property is not nullable for class PhotoIdentItem."); - - if (resultImages.IsSet && resultImages.Value == null) - throw new ArgumentNullException(nameof(resultImages), "Property is not nullable for class PhotoIdentItem."); - - if (fieldTypesCount.IsSet && fieldTypesCount.Value == null) - throw new ArgumentNullException(nameof(fieldTypesCount), "Property is not nullable for class PhotoIdentItem."); - - if (fieldTypesList.IsSet && fieldTypesList.Value == null) - throw new ArgumentNullException(nameof(fieldTypesList), "Property is not nullable for class PhotoIdentItem."); - - if (step.IsSet && step.Value == null) - throw new ArgumentNullException(nameof(step), "Property is not nullable for class PhotoIdentItem."); - - if (angle.IsSet && angle.Value == null) - throw new ArgumentNullException(nameof(angle), "Property is not nullable for class PhotoIdentItem."); - - if (reserved1.IsSet && reserved1.Value == null) - throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class PhotoIdentItem."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class PhotoIdentItem."); - - if (reserved3.IsSet && reserved3.Value == null) - throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class PhotoIdentItem."); - - return new PhotoIdentItem(lightIndex.Value!.Value!, area.Value!, sourceImage.Value!, resultImages.Value!, fieldTypesCount, fieldTypesList, step, angle, reserved1, reserved2, reserved3); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, PhotoIdentItem photoIdentItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, photoIdentItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, PhotoIdentItem photoIdentItem, JsonSerializerOptions jsonSerializerOptions) - { - if (photoIdentItem.Area == null) - throw new ArgumentNullException(nameof(photoIdentItem.Area), "Property is required for class PhotoIdentItem."); - - if (photoIdentItem.SourceImage == null) - throw new ArgumentNullException(nameof(photoIdentItem.SourceImage), "Property is required for class PhotoIdentItem."); - - if (photoIdentItem.ResultImages == null) - throw new ArgumentNullException(nameof(photoIdentItem.ResultImages), "Property is required for class PhotoIdentItem."); - - if (photoIdentItem.FieldTypesListOption.IsSet && photoIdentItem.FieldTypesList == null) - throw new ArgumentNullException(nameof(photoIdentItem.FieldTypesList), "Property is required for class PhotoIdentItem."); - - var lightIndexRawValue = LightValueConverter.ToJsonValue(photoIdentItem.LightIndex); - writer.WriteNumber("LightIndex", lightIndexRawValue); - - writer.WritePropertyName("Area"); - JsonSerializer.Serialize(writer, photoIdentItem.Area, jsonSerializerOptions); - writer.WritePropertyName("SourceImage"); - JsonSerializer.Serialize(writer, photoIdentItem.SourceImage, jsonSerializerOptions); - writer.WritePropertyName("ResultImages"); - JsonSerializer.Serialize(writer, photoIdentItem.ResultImages, jsonSerializerOptions); - if (photoIdentItem.FieldTypesCountOption.IsSet) - writer.WriteNumber("FieldTypesCount", photoIdentItem.FieldTypesCountOption.Value!.Value); - - if (photoIdentItem.FieldTypesListOption.IsSet) - { - writer.WritePropertyName("FieldTypesList"); - JsonSerializer.Serialize(writer, photoIdentItem.FieldTypesList, jsonSerializerOptions); - } - if (photoIdentItem.StepOption.IsSet) - writer.WriteNumber("Step", photoIdentItem.StepOption.Value!.Value); - - if (photoIdentItem.AngleOption.IsSet) - writer.WriteNumber("Angle", photoIdentItem.AngleOption.Value!.Value); - - if (photoIdentItem.Reserved1Option.IsSet) - writer.WriteNumber("Reserved1", photoIdentItem.Reserved1Option.Value!.Value); - - if (photoIdentItem.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", photoIdentItem.Reserved2Option.Value!.Value); - - if (photoIdentItem.Reserved3Option.IsSet) - writer.WriteNumber("Reserved3", photoIdentItem.Reserved3Option.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs index 75b3bed..5a1b3e5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,170 +14,143 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// PhotoIdentResult /// + [DataContract(Name = "PhotoIdentResult")] public partial class PhotoIdentResult : AuthenticityCheckResultItem, IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// lightIndex - /// area - /// sourceImage - /// resultImages - /// elementResult - /// elementDiagnose - /// percentValue - /// fieldTypesCount - /// fieldTypesList - /// step - /// angle - /// reserved1 - /// reserved2 - /// reserved3 - [JsonConstructor] - public PhotoIdentResult(Light lightIndex, RectangleCoordinates area, ImageData sourceImage, RawImageContainerList resultImages, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option fieldTypesCount = default, Option?> fieldTypesList = default, Option step = default, Option angle = default, Option reserved1 = default, Option reserved2 = default, Option reserved3 = default) : base(elementResult, elementDiagnose, percentValue) - { - LightIndex = lightIndex; - Area = area; - SourceImage = sourceImage; - ResultImages = resultImages; - FieldTypesCountOption = fieldTypesCount; - FieldTypesListOption = fieldTypesList; - StepOption = step; - AngleOption = angle; - Reserved1Option = reserved1; - Reserved2Option = reserved2; - Reserved3Option = reserved3; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets LightIndex /// - [JsonPropertyName("LightIndex")] + [DataMember(Name = "LightIndex", IsRequired = true, EmitDefaultValue = true)] public Light LightIndex { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected PhotoIdentResult() { } + /// + /// Initializes a new instance of the class. + /// + /// lightIndex (required). + /// area (required). + /// sourceImage (required). + /// resultImages (required). + /// fieldTypesCount. + /// fieldTypesList. + /// step. + /// angle. + /// reserved1. + /// reserved2. + /// reserved3. + /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// elementResult. + /// elementDiagnose. + /// percentValue. + public PhotoIdentResult(Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData sourceImage = default(ImageData), RawImageContainerList resultImages = default(RawImageContainerList), int fieldTypesCount = default(int), List fieldTypesList = default(List), int step = default(int), int angle = default(int), int reserved1 = default(int), int reserved2 = default(int), int reserved3 = default(int), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + { + this.LightIndex = lightIndex; + // to ensure "area" is required (not null) + if (area == null) + { + throw new ArgumentNullException("area is a required property for PhotoIdentResult and cannot be null"); + } + this.Area = area; + // to ensure "sourceImage" is required (not null) + if (sourceImage == null) + { + throw new ArgumentNullException("sourceImage is a required property for PhotoIdentResult and cannot be null"); + } + this.SourceImage = sourceImage; + // to ensure "resultImages" is required (not null) + if (resultImages == null) + { + throw new ArgumentNullException("resultImages is a required property for PhotoIdentResult and cannot be null"); + } + this.ResultImages = resultImages; + this.FieldTypesCount = fieldTypesCount; + this.FieldTypesList = fieldTypesList; + this.Step = step; + this.Angle = angle; + this.Reserved1 = reserved1; + this.Reserved2 = reserved2; + this.Reserved3 = reserved3; + } /// /// Gets or Sets Area /// - [JsonPropertyName("Area")] + [DataMember(Name = "Area", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates Area { get; set; } /// /// Gets or Sets SourceImage /// - [JsonPropertyName("SourceImage")] + [DataMember(Name = "SourceImage", IsRequired = true, EmitDefaultValue = true)] public ImageData SourceImage { get; set; } /// /// Gets or Sets ResultImages /// - [JsonPropertyName("ResultImages")] + [DataMember(Name = "ResultImages", IsRequired = true, EmitDefaultValue = true)] public RawImageContainerList ResultImages { get; set; } - /// - /// Used to track the state of FieldTypesCount - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldTypesCountOption { get; private set; } - /// /// Gets or Sets FieldTypesCount /// - [JsonPropertyName("FieldTypesCount")] - public int? FieldTypesCount { get { return this.FieldTypesCountOption; } set { this.FieldTypesCountOption = new(value); } } - - /// - /// Used to track the state of FieldTypesList - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> FieldTypesListOption { get; private set; } + [DataMember(Name = "FieldTypesCount", EmitDefaultValue = false)] + public int FieldTypesCount { get; set; } /// /// Gets or Sets FieldTypesList /// - [JsonPropertyName("FieldTypesList")] - public List? FieldTypesList { get { return this.FieldTypesListOption; } set { this.FieldTypesListOption = new(value); } } - - /// - /// Used to track the state of Step - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option StepOption { get; private set; } + [DataMember(Name = "FieldTypesList", EmitDefaultValue = false)] + public List FieldTypesList { get; set; } /// /// Gets or Sets Step /// - [JsonPropertyName("Step")] - public int? Step { get { return this.StepOption; } set { this.StepOption = new(value); } } - - /// - /// Used to track the state of Angle - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AngleOption { get; private set; } + [DataMember(Name = "Step", EmitDefaultValue = false)] + public int Step { get; set; } /// /// Gets or Sets Angle /// - [JsonPropertyName("Angle")] - public int? Angle { get { return this.AngleOption; } set { this.AngleOption = new(value); } } - - /// - /// Used to track the state of Reserved1 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved1Option { get; private set; } + [DataMember(Name = "Angle", EmitDefaultValue = false)] + public int Angle { get; set; } /// /// Gets or Sets Reserved1 /// - [JsonPropertyName("Reserved1")] - public int? Reserved1 { get { return this.Reserved1Option; } set { this.Reserved1Option = new(value); } } - - /// - /// Used to track the state of Reserved2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved2Option { get; private set; } + [DataMember(Name = "Reserved1", EmitDefaultValue = false)] + public int Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// - [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } - - /// - /// Used to track the state of Reserved3 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved3Option { get; private set; } + [DataMember(Name = "Reserved2", EmitDefaultValue = false)] + public int Reserved2 { get; set; } /// /// Gets or Sets Reserved3 /// - [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } + [DataMember(Name = "Reserved3", EmitDefaultValue = false)] + public int Reserved3 { get; set; } /// /// Returns the string presentation of the object @@ -189,7 +160,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class PhotoIdentResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" LightIndex: ").Append(LightIndex).Append("\n"); sb.Append(" Area: ").Append(Area).Append("\n"); sb.Append(" SourceImage: ").Append(SourceImage).Append("\n"); @@ -204,275 +175,39 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class PhotoIdentResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override PhotoIdentResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option lightIndex = default; - Option area = default; - Option sourceImage = default; - Option resultImages = default; - Option type = default; - Option elementResult = default; - Option elementDiagnose = default; - Option percentValue = default; - Option fieldTypesCount = default; - Option?> fieldTypesList = default; - Option step = default; - Option angle = default; - Option reserved1 = default; - Option reserved2 = default; - Option reserved3 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "LightIndex": - string? lightIndexRawValue = utf8JsonReader.GetString(); - if (lightIndexRawValue != null) - lightIndex = new Option(LightValueConverter.FromStringOrDefault(lightIndexRawValue)); - break; - case "Area": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - area = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SourceImage": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sourceImage = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "ResultImages": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultImages = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - case "ElementResult": - string? elementResultRawValue = utf8JsonReader.GetString(); - if (elementResultRawValue != null) - elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); - break; - case "ElementDiagnose": - string? elementDiagnoseRawValue = utf8JsonReader.GetString(); - if (elementDiagnoseRawValue != null) - elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); - break; - case "PercentValue": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - percentValue = new Option(utf8JsonReader.GetInt32()); - break; - case "FieldTypesCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldTypesCount = new Option(utf8JsonReader.GetInt32()); - break; - case "FieldTypesList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldTypesList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Step": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - step = new Option(utf8JsonReader.GetInt32()); - break; - case "Angle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - angle = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved1": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved1 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved3": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved3 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!lightIndex.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(lightIndex)); - - if (!area.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(area)); - - if (!sourceImage.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(sourceImage)); - - if (!resultImages.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(resultImages)); - - if (!type.IsSet) - throw new ArgumentException("Property is required for class PhotoIdentResult.", nameof(type)); - - if (lightIndex.IsSet && lightIndex.Value == null) - throw new ArgumentNullException(nameof(lightIndex), "Property is not nullable for class PhotoIdentResult."); - - if (area.IsSet && area.Value == null) - throw new ArgumentNullException(nameof(area), "Property is not nullable for class PhotoIdentResult."); - - if (sourceImage.IsSet && sourceImage.Value == null) - throw new ArgumentNullException(nameof(sourceImage), "Property is not nullable for class PhotoIdentResult."); - - if (resultImages.IsSet && resultImages.Value == null) - throw new ArgumentNullException(nameof(resultImages), "Property is not nullable for class PhotoIdentResult."); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class PhotoIdentResult."); - - if (elementResult.IsSet && elementResult.Value == null) - throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class PhotoIdentResult."); - - if (elementDiagnose.IsSet && elementDiagnose.Value == null) - throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class PhotoIdentResult."); - - if (percentValue.IsSet && percentValue.Value == null) - throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class PhotoIdentResult."); - - if (fieldTypesCount.IsSet && fieldTypesCount.Value == null) - throw new ArgumentNullException(nameof(fieldTypesCount), "Property is not nullable for class PhotoIdentResult."); - - if (fieldTypesList.IsSet && fieldTypesList.Value == null) - throw new ArgumentNullException(nameof(fieldTypesList), "Property is not nullable for class PhotoIdentResult."); - - if (step.IsSet && step.Value == null) - throw new ArgumentNullException(nameof(step), "Property is not nullable for class PhotoIdentResult."); - - if (angle.IsSet && angle.Value == null) - throw new ArgumentNullException(nameof(angle), "Property is not nullable for class PhotoIdentResult."); - - if (reserved1.IsSet && reserved1.Value == null) - throw new ArgumentNullException(nameof(reserved1), "Property is not nullable for class PhotoIdentResult."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class PhotoIdentResult."); - - if (reserved3.IsSet && reserved3.Value == null) - throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class PhotoIdentResult."); - - return new PhotoIdentResult(lightIndex.Value!.Value!, area.Value!, sourceImage.Value!, resultImages.Value!, elementResult, elementDiagnose, percentValue, fieldTypesCount, fieldTypesList, step, angle, reserved1, reserved2, reserved3); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, PhotoIdentResult photoIdentResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, photoIdentResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, PhotoIdentResult photoIdentResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (photoIdentResult.Area == null) - throw new ArgumentNullException(nameof(photoIdentResult.Area), "Property is required for class PhotoIdentResult."); - - if (photoIdentResult.SourceImage == null) - throw new ArgumentNullException(nameof(photoIdentResult.SourceImage), "Property is required for class PhotoIdentResult."); - - if (photoIdentResult.ResultImages == null) - throw new ArgumentNullException(nameof(photoIdentResult.ResultImages), "Property is required for class PhotoIdentResult."); - - if (photoIdentResult.FieldTypesListOption.IsSet && photoIdentResult.FieldTypesList == null) - throw new ArgumentNullException(nameof(photoIdentResult.FieldTypesList), "Property is required for class PhotoIdentResult."); - - var lightIndexRawValue = LightValueConverter.ToJsonValue(photoIdentResult.LightIndex); - writer.WriteNumber("LightIndex", lightIndexRawValue); - - writer.WritePropertyName("Area"); - JsonSerializer.Serialize(writer, photoIdentResult.Area, jsonSerializerOptions); - writer.WritePropertyName("SourceImage"); - JsonSerializer.Serialize(writer, photoIdentResult.SourceImage, jsonSerializerOptions); - writer.WritePropertyName("ResultImages"); - JsonSerializer.Serialize(writer, photoIdentResult.ResultImages, jsonSerializerOptions); - writer.WriteNumber("Type", photoIdentResult.Type); - - if (photoIdentResult.ElementResultOption.IsSet) + foreach (var x in base.BaseValidate(validationContext)) { - var elementResultRawValue = CheckResultValueConverter.ToJsonValue(photoIdentResult.ElementResult!.Value); - writer.WriteNumber("ElementResult", elementResultRawValue); + yield return x; } - if (photoIdentResult.ElementDiagnoseOption.IsSet) - { - var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(photoIdentResult.ElementDiagnose!.Value); - writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); - } - if (photoIdentResult.PercentValueOption.IsSet) - writer.WriteNumber("PercentValue", photoIdentResult.PercentValueOption.Value!.Value); - - if (photoIdentResult.FieldTypesCountOption.IsSet) - writer.WriteNumber("FieldTypesCount", photoIdentResult.FieldTypesCountOption.Value!.Value); - - if (photoIdentResult.FieldTypesListOption.IsSet) - { - writer.WritePropertyName("FieldTypesList"); - JsonSerializer.Serialize(writer, photoIdentResult.FieldTypesList, jsonSerializerOptions); - } - if (photoIdentResult.StepOption.IsSet) - writer.WriteNumber("Step", photoIdentResult.StepOption.Value!.Value); - - if (photoIdentResult.AngleOption.IsSet) - writer.WriteNumber("Angle", photoIdentResult.AngleOption.Value!.Value); - - if (photoIdentResult.Reserved1Option.IsSet) - writer.WriteNumber("Reserved1", photoIdentResult.Reserved1Option.Value!.Value); - - if (photoIdentResult.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", photoIdentResult.Reserved2Option.Value!.Value); - - if (photoIdentResult.Reserved3Option.IsSet) - writer.WriteNumber("Reserved3", photoIdentResult.Reserved3Option.Value!.Value); + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/Point.cs b/src/Regula.DocumentReader.WebClient/Model/Point.cs index 9125c72..0fb0ba1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Point.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Point.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,50 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Point /// + [DataContract(Name = "Point")] public partial class Point : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// x - /// y - [JsonConstructor] - public Point(int x, int y) + [JsonConstructorAttribute] + protected Point() { } + /// + /// Initializes a new instance of the class. + /// + /// x (required). + /// y (required). + public Point(int x = default(int), int y = default(int)) { - X = x; - Y = y; - OnCreated(); + this.X = x; + this.Y = y; } - partial void OnCreated(); - /// /// Gets or Sets X /// - [JsonPropertyName("x")] + [DataMember(Name = "x", IsRequired = true, EmitDefaultValue = true)] public int X { get; set; } /// /// Gets or Sets Y /// - [JsonPropertyName("y")] + [DataMember(Name = "y", IsRequired = true, EmitDefaultValue = true)] public int Y { get; set; } /// @@ -71,6 +74,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -82,102 +94,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class PointJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override Point Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option x = default; - Option y = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "x": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - x = new Option(utf8JsonReader.GetInt32()); - break; - case "y": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - y = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!x.IsSet) - throw new ArgumentException("Property is required for class Point.", nameof(x)); - - if (!y.IsSet) - throw new ArgumentException("Property is required for class Point.", nameof(y)); - - if (x.IsSet && x.Value == null) - throw new ArgumentNullException(nameof(x), "Property is not nullable for class Point."); - - if (y.IsSet && y.Value == null) - throw new ArgumentNullException(nameof(y), "Property is not nullable for class Point."); - - return new Point(x.Value!.Value!, y.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Point point, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, point, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, Point point, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("x", point.X); - - writer.WriteNumber("y", point.Y); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/PointArray.cs b/src/Regula.DocumentReader.WebClient/Model/PointArray.cs index 342b781..ec38c49 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointArray.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointArray.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// PointArray /// + [DataContract(Name = "PointArray")] public partial class PointArray : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// pointsList - [JsonConstructor] - public PointArray(List pointsList) + [JsonConstructorAttribute] + protected PointArray() { } + /// + /// Initializes a new instance of the class. + /// + /// pointsList (required). + public PointArray(List pointsList = default(List)) { - PointsList = pointsList; - OnCreated(); + // to ensure "pointsList" is required (not null) + if (pointsList == null) + { + throw new ArgumentNullException("pointsList is a required property for PointArray and cannot be null"); + } + this.PointsList = pointsList; } - partial void OnCreated(); - /// /// Gets or Sets PointsList /// - [JsonPropertyName("PointsList")] + [DataMember(Name = "PointsList", IsRequired = true, EmitDefaultValue = true)] public List PointsList { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class PointArrayJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override PointArray Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> pointsList = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "PointsList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pointsList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!pointsList.IsSet) - throw new ArgumentException("Property is required for class PointArray.", nameof(pointsList)); - - if (pointsList.IsSet && pointsList.Value == null) - throw new ArgumentNullException(nameof(pointsList), "Property is not nullable for class PointArray."); - - return new PointArray(pointsList.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, PointArray pointArray, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, pointArray, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, PointArray pointArray, JsonSerializerOptions jsonSerializerOptions) - { - if (pointArray.PointsList == null) - throw new ArgumentNullException(nameof(pointArray.PointsList), "Property is required for class PointArray."); - - writer.WritePropertyName("PointsList"); - JsonSerializer.Serialize(writer, pointArray.PointsList, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs index aa5b7b4..037adb0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,53 +14,56 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// PointsContainer /// + [DataContract(Name = "PointsContainer")] public partial class PointsContainer : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// pointsList - /// pointCount - [JsonConstructor] - public PointsContainer(List pointsList, Option pointCount = default) - { - PointsList = pointsList; - PointCountOption = pointCount; - OnCreated(); - } - - partial void OnCreated(); - + [JsonConstructorAttribute] + protected PointsContainer() { } /// - /// Gets or Sets PointsList + /// Initializes a new instance of the class. /// - [JsonPropertyName("PointsList")] - public List PointsList { get; set; } + /// pointCount. + /// pointsList (required). + public PointsContainer(int pointCount = default(int), List pointsList = default(List)) + { + // to ensure "pointsList" is required (not null) + if (pointsList == null) + { + throw new ArgumentNullException("pointsList is a required property for PointsContainer and cannot be null"); + } + this.PointsList = pointsList; + this.PointCount = pointCount; + } /// - /// Used to track the state of PointCount + /// Gets or Sets PointCount /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PointCountOption { get; private set; } + [DataMember(Name = "PointCount", EmitDefaultValue = false)] + public int PointCount { get; set; } /// - /// Gets or Sets PointCount + /// Gets or Sets PointsList /// - [JsonPropertyName("PointCount")] - public int? PointCount { get { return this.PointCountOption; } set { this.PointCountOption = new(value); } } + [DataMember(Name = "PointsList", IsRequired = true, EmitDefaultValue = true)] + public List PointsList { get; set; } /// /// Returns the string presentation of the object @@ -72,12 +73,21 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class PointsContainer {\n"); - sb.Append(" PointsList: ").Append(PointsList).Append("\n"); sb.Append(" PointCount: ").Append(PointCount).Append("\n"); + sb.Append(" PointsList: ").Append(PointsList).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -89,103 +99,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class PointsContainerJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override PointsContainer Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> pointsList = default; - Option pointCount = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "PointsList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pointsList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "PointCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pointCount = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!pointsList.IsSet) - throw new ArgumentException("Property is required for class PointsContainer.", nameof(pointsList)); - - if (pointsList.IsSet && pointsList.Value == null) - throw new ArgumentNullException(nameof(pointsList), "Property is not nullable for class PointsContainer."); - - if (pointCount.IsSet && pointCount.Value == null) - throw new ArgumentNullException(nameof(pointCount), "Property is not nullable for class PointsContainer."); - - return new PointsContainer(pointsList.Value!, pointCount); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, PointsContainer pointsContainer, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, pointsContainer, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, PointsContainer pointsContainer, JsonSerializerOptions jsonSerializerOptions) - { - if (pointsContainer.PointsList == null) - throw new ArgumentNullException(nameof(pointsContainer.PointsList), "Property is required for class PointsContainer."); - - writer.WritePropertyName("PointsList"); - JsonSerializer.Serialize(writer, pointsContainer.PointsList, jsonSerializerOptions); - if (pointsContainer.PointCountOption.IsSet) - writer.WriteNumber("PointCount", pointsContainer.PointCountOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index 94ba98a..8a32499 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,977 +14,571 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessParams /// + [DataContract(Name = "ProcessParams")] public partial class ProcessParams : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// scenario - /// This parameter is used to generate separate DTC-VC data container from RFID session data. - /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. - /// This parameter is used to enable document liveness check. - /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. - /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face - /// This parameter allows comparing faces on Regula Face Web Service - /// faceApi - /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. - /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. - /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. - /// Types of results to return in response. See 'Result' enum for available options - /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. - /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. - /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. - /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). - /// measureSystem - /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. - /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. - /// This option allows passing custom processing parameters that can be implemented in future without changing API. - /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. - /// When enabled, results will contain transaction processing log. Disabled by default - /// logLevel - /// Force use of specific template ID and skip document type identification step. - /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. - /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. - /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. - /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. - /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. - /// imageQa - /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. - /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. - /// forceDocFormat - /// When enabled, no graphic fields will be cropped from document image. Disabled by default. - /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. - /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. - /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default - /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. - /// When enabled, returns input images in output. Disabled by default. - /// This option allows limiting MRZ formats to be recognized by specifying them in array. - /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. - /// This option can be disabled to stop parsing after barcode is read. Enabled by default. - /// convertCase - /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. - /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. - /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. - /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. - /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. - /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. - /// This parameter is used to specify the document reader device type from which input images were captured - /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false - /// List of the document ID's to process. All documents will be processed, if empty. - /// rfid - /// This parameter is used to enable authenticity checks - /// authParams - /// mrzDetectMode - /// This parameter is used to generate numeric representation for issuing state and nationality codes - /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. - /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. - /// Set the types of barcodes to process. - [JsonConstructor] - public ProcessParams(Scenario scenario, Option generateDTCVC = default, Option?> lcidFilter = default, Option checkLiveness = default, Option?> lcidIgnoreFilter = default, Option oneShotIdentification = default, Option useFaceApi = default, Option faceApi = default, Option doDetectCan = default, Option imageOutputMaxHeight = default, Option imageOutputMaxWidth = default, Option?> resultTypeOutput = default, Option doublePageSpread = default, Option generateDoublePageSpreadImage = default, Option?> fieldTypesFilter = default, Option dateFormat = default, Option measureSystem = default, Option imageDpiOutMax = default, Option alreadyCropped = default, Option?> customParams = default, Option?> config = default, Option log = default, Option logLevel = default, Option forceDocID = default, Option matchTextFieldMask = default, Option fastDocDetect = default, Option updateOCRValidityByGlare = default, Option checkRequiredTextFields = default, Option returnCroppedBarcode = default, Option imageQa = default, Option strictImageQuality = default, Option respectImageQuality = default, Option forceDocFormat = default, Option noGraphics = default, Option depersonalizeLog = default, Option multiDocOnImage = default, Option shiftExpiryDate = default, Option minimalHolderAge = default, Option returnUncroppedImage = default, Option?> mrzFormatsFilter = default, Option forceReadMrzBeforeLocate = default, Option parseBarcodes = default, Option convertCase = default, Option splitNames = default, Option disablePerforationOCR = default, Option?> documentGroupFilter = default, Option processAuth = default, Option deviceId = default, Option deviceType = default, Option deviceTypeHex = default, Option ignoreDeviceIdFromImage = default, Option?> documentIdList = default, Option rfid = default, Option checkAuth = default, Option authParams = default, Option mrzDetectMode = default, Option generateNumericCodes = default, Option strictBarcodeDigitalSignatureCheck = default, Option selectLongestNames = default, Option?> doBarcodes = default) - { - Scenario = scenario; - GenerateDTCVCOption = generateDTCVC; - LcidFilterOption = lcidFilter; - CheckLivenessOption = checkLiveness; - LcidIgnoreFilterOption = lcidIgnoreFilter; - OneShotIdentificationOption = oneShotIdentification; - UseFaceApiOption = useFaceApi; - FaceApiOption = faceApi; - DoDetectCanOption = doDetectCan; - ImageOutputMaxHeightOption = imageOutputMaxHeight; - ImageOutputMaxWidthOption = imageOutputMaxWidth; - ResultTypeOutputOption = resultTypeOutput; - DoublePageSpreadOption = doublePageSpread; - GenerateDoublePageSpreadImageOption = generateDoublePageSpreadImage; - FieldTypesFilterOption = fieldTypesFilter; - DateFormatOption = dateFormat; - MeasureSystemOption = measureSystem; - ImageDpiOutMaxOption = imageDpiOutMax; - AlreadyCroppedOption = alreadyCropped; - CustomParamsOption = customParams; - ConfigOption = config; - LogOption = log; - LogLevelOption = logLevel; - ForceDocIDOption = forceDocID; - MatchTextFieldMaskOption = matchTextFieldMask; - FastDocDetectOption = fastDocDetect; - UpdateOCRValidityByGlareOption = updateOCRValidityByGlare; - CheckRequiredTextFieldsOption = checkRequiredTextFields; - ReturnCroppedBarcodeOption = returnCroppedBarcode; - ImageQaOption = imageQa; - StrictImageQualityOption = strictImageQuality; - RespectImageQualityOption = respectImageQuality; - ForceDocFormatOption = forceDocFormat; - NoGraphicsOption = noGraphics; - DepersonalizeLogOption = depersonalizeLog; - MultiDocOnImageOption = multiDocOnImage; - ShiftExpiryDateOption = shiftExpiryDate; - MinimalHolderAgeOption = minimalHolderAge; - ReturnUncroppedImageOption = returnUncroppedImage; - MrzFormatsFilterOption = mrzFormatsFilter; - ForceReadMrzBeforeLocateOption = forceReadMrzBeforeLocate; - ParseBarcodesOption = parseBarcodes; - ConvertCaseOption = convertCase; - SplitNamesOption = splitNames; - DisablePerforationOCROption = disablePerforationOCR; - DocumentGroupFilterOption = documentGroupFilter; - ProcessAuthOption = processAuth; - DeviceIdOption = deviceId; - DeviceTypeOption = deviceType; - DeviceTypeHexOption = deviceTypeHex; - IgnoreDeviceIdFromImageOption = ignoreDeviceIdFromImage; - DocumentIdListOption = documentIdList; - RfidOption = rfid; - CheckAuthOption = checkAuth; - AuthParamsOption = authParams; - MrzDetectModeOption = mrzDetectMode; - GenerateNumericCodesOption = generateNumericCodes; - StrictBarcodeDigitalSignatureCheckOption = strictBarcodeDigitalSignatureCheck; - SelectLongestNamesOption = selectLongestNames; - DoBarcodesOption = doBarcodes; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Scenario /// - [JsonPropertyName("scenario")] + [DataMember(Name = "scenario", IsRequired = true, EmitDefaultValue = true)] public Scenario Scenario { get; set; } - /// - /// Used to track the state of MeasureSystem - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option MeasureSystemOption { get; private set; } - /// /// Gets or Sets MeasureSystem /// - [JsonPropertyName("measureSystem")] - public MeasureSystem? MeasureSystem { get { return this.MeasureSystemOption; } set { this.MeasureSystemOption = new(value); } } - - /// - /// Used to track the state of LogLevel - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LogLevelOption { get; private set; } + [DataMember(Name = "measureSystem", EmitDefaultValue = false)] + public MeasureSystem? MeasureSystem { get; set; } /// /// Gets or Sets LogLevel /// - [JsonPropertyName("logLevel")] - public LogLevel? LogLevel { get { return this.LogLevelOption; } set { this.LogLevelOption = new(value); } } - - /// - /// Used to track the state of ForceDocFormat - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ForceDocFormatOption { get; private set; } + [DataMember(Name = "logLevel", EmitDefaultValue = false)] + public LogLevel? LogLevel { get; set; } /// /// Gets or Sets ForceDocFormat /// - [JsonPropertyName("forceDocFormat")] - public DocumentFormat? ForceDocFormat { get { return this.ForceDocFormatOption; } set { this.ForceDocFormatOption = new(value); } } - - /// - /// Used to track the state of ConvertCase - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ConvertCaseOption { get; private set; } + [DataMember(Name = "forceDocFormat", EmitDefaultValue = false)] + public DocumentFormat? ForceDocFormat { get; set; } /// /// Gets or Sets ConvertCase /// - [JsonPropertyName("convertCase")] - public TextPostProcessing? ConvertCase { get { return this.ConvertCaseOption; } set { this.ConvertCaseOption = new(value); } } + [DataMember(Name = "convertCase", EmitDefaultValue = false)] + public TextPostProcessing? ConvertCase { get; set; } /// - /// Used to track the state of MrzDetectMode + /// Gets or Sets MrzDetectMode /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option MrzDetectModeOption { get; private set; } - + [DataMember(Name = "mrzDetectMode", EmitDefaultValue = false)] + public MrzDetectModeEnum? MrzDetectMode { get; set; } /// - /// Gets or Sets MrzDetectMode + /// Initializes a new instance of the class. /// - [JsonPropertyName("mrzDetectMode")] - public MrzDetectModeEnum? MrzDetectMode { get { return this.MrzDetectModeOption; } set { this.MrzDetectModeOption = new(value); } } - + [JsonConstructorAttribute] + protected ProcessParams() { } /// - /// Used to track the state of GenerateDTCVC + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option GenerateDTCVCOption { get; private set; } + /// This parameter is used to generate separate DTC-VC data container from RFID session data.. + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default.. + /// This parameter is used to enable document liveness check.. + /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default.. + /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face. + /// This parameter allows comparing faces on Regula Face Web Service. + /// faceApi. + /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario.. + /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0.. + /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0.. + /// scenario (required). + /// Types of results to return in response. See 'Result' enum for available options. + /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default.. + /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default.. + /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default.. + /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running).. + /// measureSystem. + /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default.. + /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default.. + /// This option allows passing custom processing parameters that can be implemented in future without changing API.. + /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration.. + /// When enabled, results will contain transaction processing log. Disabled by default. + /// logLevel. + /// Force use of specific template ID and skip document type identification step.. + /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default.. + /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default.. + /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default.. + /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default.. + /// When enabled, returns cropped barcode images for unknown documents. Disabled by default.. + /// imageQa. + /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default.. + /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default.. + /// forceDocFormat. + /// When enabled, no graphic fields will be cropped from document image. Disabled by default.. + /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default.. + /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default.. + /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default. + /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid.. + /// When enabled, returns input images in output. Disabled by default.. + /// This option allows limiting MRZ formats to be recognized by specifying them in array.. + /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default.. + /// This option can be disabled to stop parsing after barcode is read. Enabled by default.. + /// convertCase. + /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default.. + /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default.. + /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default.. + /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. . + /// This parameter is used to specify the document reader device type from which input images were captured. Default 0.. + /// This parameter is used to specify the document reader device type from which input images were captured. Default 0.. + /// This parameter is used to specify the document reader device type from which input images were captured. + /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false. + /// List of the document ID's to process. All documents will be processed, if empty.. + /// rfid. + /// This parameter is used to enable authenticity checks. + /// authParams. + /// mrzDetectMode. + /// This parameter is used to generate numeric representation for issuing state and nationality codes. + /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed.. + /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc.. + /// Set the types of barcodes to process.. + public ProcessParams(bool generateDTCVC = default(bool), List lcidFilter = default(List), bool checkLiveness = default(bool), List lcidIgnoreFilter = default(List), bool oneShotIdentification = default(bool), bool useFaceApi = default(bool), FaceApi faceApi = default(FaceApi), bool doDetectCan = default(bool), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), Scenario scenario = default(Scenario), List resultTypeOutput = default(List), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List fieldTypesFilter = default(List), string dateFormat = default(string), MeasureSystem? measureSystem = default(MeasureSystem?), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary customParams = default(Dictionary), List config = default(List), bool log = default(bool), LogLevel? logLevel = default(LogLevel?), int forceDocID = default(int), bool matchTextFieldMask = default(bool), bool fastDocDetect = default(bool), bool updateOCRValidityByGlare = default(bool), bool checkRequiredTextFields = default(bool), bool returnCroppedBarcode = default(bool), ImageQA imageQa = default(ImageQA), bool strictImageQuality = default(bool), bool respectImageQuality = default(bool), DocumentFormat? forceDocFormat = default(DocumentFormat?), bool noGraphics = default(bool), bool depersonalizeLog = default(bool), bool multiDocOnImage = default(bool), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool returnUncroppedImage = default(bool), List mrzFormatsFilter = default(List), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), TextPostProcessing? convertCase = default(TextPostProcessing?), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List documentGroupFilter = default(List), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List documentIdList = default(List), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool checkAuth = default(bool), AuthParams authParams = default(AuthParams), MrzDetectModeEnum? mrzDetectMode = default(MrzDetectModeEnum?), bool generateNumericCodes = default(bool), bool strictBarcodeDigitalSignatureCheck = default(bool), bool selectLongestNames = default(bool), List doBarcodes = default(List)) + { + this.Scenario = scenario; + this.GenerateDTCVC = generateDTCVC; + this.LcidFilter = lcidFilter; + this.CheckLiveness = checkLiveness; + this.LcidIgnoreFilter = lcidIgnoreFilter; + this.OneShotIdentification = oneShotIdentification; + this.UseFaceApi = useFaceApi; + this.FaceApi = faceApi; + this.DoDetectCan = doDetectCan; + this.ImageOutputMaxHeight = imageOutputMaxHeight; + this.ImageOutputMaxWidth = imageOutputMaxWidth; + this.ResultTypeOutput = resultTypeOutput; + this.DoublePageSpread = doublePageSpread; + this.GenerateDoublePageSpreadImage = generateDoublePageSpreadImage; + this.FieldTypesFilter = fieldTypesFilter; + this.DateFormat = dateFormat; + this.MeasureSystem = measureSystem; + this.ImageDpiOutMax = imageDpiOutMax; + this.AlreadyCropped = alreadyCropped; + this.CustomParams = customParams; + this.Config = config; + this.Log = log; + this.LogLevel = logLevel; + this.ForceDocID = forceDocID; + this.MatchTextFieldMask = matchTextFieldMask; + this.FastDocDetect = fastDocDetect; + this.UpdateOCRValidityByGlare = updateOCRValidityByGlare; + this.CheckRequiredTextFields = checkRequiredTextFields; + this.ReturnCroppedBarcode = returnCroppedBarcode; + this.ImageQa = imageQa; + this.StrictImageQuality = strictImageQuality; + this.RespectImageQuality = respectImageQuality; + this.ForceDocFormat = forceDocFormat; + this.NoGraphics = noGraphics; + this.DepersonalizeLog = depersonalizeLog; + this.MultiDocOnImage = multiDocOnImage; + this.ShiftExpiryDate = shiftExpiryDate; + this.MinimalHolderAge = minimalHolderAge; + this.ReturnUncroppedImage = returnUncroppedImage; + this.MrzFormatsFilter = mrzFormatsFilter; + this.ForceReadMrzBeforeLocate = forceReadMrzBeforeLocate; + this.ParseBarcodes = parseBarcodes; + this.ConvertCase = convertCase; + this.SplitNames = splitNames; + this.DisablePerforationOCR = disablePerforationOCR; + this.DocumentGroupFilter = documentGroupFilter; + this.ProcessAuth = processAuth; + this.DeviceId = deviceId; + this.DeviceType = deviceType; + this.DeviceTypeHex = deviceTypeHex; + this.IgnoreDeviceIdFromImage = ignoreDeviceIdFromImage; + this.DocumentIdList = documentIdList; + this.Rfid = rfid; + this.CheckAuth = checkAuth; + this.AuthParams = authParams; + this.MrzDetectMode = mrzDetectMode; + this.GenerateNumericCodes = generateNumericCodes; + this.StrictBarcodeDigitalSignatureCheck = strictBarcodeDigitalSignatureCheck; + this.SelectLongestNames = selectLongestNames; + this.DoBarcodes = doBarcodes; + } /// /// This parameter is used to generate separate DTC-VC data container from RFID session data. /// /// This parameter is used to generate separate DTC-VC data container from RFID session data. - [JsonPropertyName("generateDTCVC")] - public bool? GenerateDTCVC { get { return this.GenerateDTCVCOption; } set { this.GenerateDTCVCOption = new(value); } } - - /// - /// Used to track the state of LcidFilter - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> LcidFilterOption { get; private set; } + [DataMember(Name = "generateDTCVC", EmitDefaultValue = true)] + public bool GenerateDTCVC { get; set; } /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. - [JsonPropertyName("lcidFilter")] - public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } - - /// - /// Used to track the state of CheckLiveness - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckLivenessOption { get; private set; } + [DataMember(Name = "lcidFilter", EmitDefaultValue = false)] + public List LcidFilter { get; set; } /// /// This parameter is used to enable document liveness check. /// /// This parameter is used to enable document liveness check. - [JsonPropertyName("checkLiveness")] - public bool? CheckLiveness { get { return this.CheckLivenessOption; } set { this.CheckLivenessOption = new(value); } } - - /// - /// Used to track the state of LcidIgnoreFilter - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> LcidIgnoreFilterOption { get; private set; } + [DataMember(Name = "checkLiveness", EmitDefaultValue = true)] + public bool CheckLiveness { get; set; } /// /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. /// /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. - [JsonPropertyName("lcidIgnoreFilter")] - public List? LcidIgnoreFilter { get { return this.LcidIgnoreFilterOption; } set { this.LcidIgnoreFilterOption = new(value); } } - - /// - /// Used to track the state of OneShotIdentification - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OneShotIdentificationOption { get; private set; } + [DataMember(Name = "lcidIgnoreFilter", EmitDefaultValue = false)] + public List LcidIgnoreFilter { get; set; } /// /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face /// /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face - [JsonPropertyName("oneShotIdentification")] - public bool? OneShotIdentification { get { return this.OneShotIdentificationOption; } set { this.OneShotIdentificationOption = new(value); } } - - /// - /// Used to track the state of UseFaceApi - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UseFaceApiOption { get; private set; } + [DataMember(Name = "oneShotIdentification", EmitDefaultValue = true)] + public bool OneShotIdentification { get; set; } /// /// This parameter allows comparing faces on Regula Face Web Service /// /// This parameter allows comparing faces on Regula Face Web Service - [JsonPropertyName("useFaceApi")] - public bool? UseFaceApi { get { return this.UseFaceApiOption; } set { this.UseFaceApiOption = new(value); } } - - /// - /// Used to track the state of FaceApi - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FaceApiOption { get; private set; } + [DataMember(Name = "useFaceApi", EmitDefaultValue = true)] + public bool UseFaceApi { get; set; } /// /// Gets or Sets FaceApi /// - [JsonPropertyName("faceApi")] - public FaceApi? FaceApi { get { return this.FaceApiOption; } set { this.FaceApiOption = new(value); } } - - /// - /// Used to track the state of DoDetectCan - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DoDetectCanOption { get; private set; } + [DataMember(Name = "faceApi", EmitDefaultValue = false)] + public FaceApi FaceApi { get; set; } /// /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. /// /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. - [JsonPropertyName("doDetectCan")] - public bool? DoDetectCan { get { return this.DoDetectCanOption; } set { this.DoDetectCanOption = new(value); } } - - /// - /// Used to track the state of ImageOutputMaxHeight - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ImageOutputMaxHeightOption { get; private set; } + [DataMember(Name = "doDetectCan", EmitDefaultValue = true)] + public bool DoDetectCan { get; set; } /// /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. /// /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. - [JsonPropertyName("imageOutputMaxHeight")] - public int? ImageOutputMaxHeight { get { return this.ImageOutputMaxHeightOption; } set { this.ImageOutputMaxHeightOption = new(value); } } - - /// - /// Used to track the state of ImageOutputMaxWidth - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ImageOutputMaxWidthOption { get; private set; } + [DataMember(Name = "imageOutputMaxHeight", EmitDefaultValue = false)] + public int ImageOutputMaxHeight { get; set; } /// /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. /// /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. - [JsonPropertyName("imageOutputMaxWidth")] - public int? ImageOutputMaxWidth { get { return this.ImageOutputMaxWidthOption; } set { this.ImageOutputMaxWidthOption = new(value); } } - - /// - /// Used to track the state of ResultTypeOutput - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ResultTypeOutputOption { get; private set; } + [DataMember(Name = "imageOutputMaxWidth", EmitDefaultValue = false)] + public int ImageOutputMaxWidth { get; set; } /// /// Types of results to return in response. See 'Result' enum for available options /// /// Types of results to return in response. See 'Result' enum for available options - [JsonPropertyName("resultTypeOutput")] - public List? ResultTypeOutput { get { return this.ResultTypeOutputOption; } set { this.ResultTypeOutputOption = new(value); } } - - /// - /// Used to track the state of DoublePageSpread - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DoublePageSpreadOption { get; private set; } + [DataMember(Name = "resultTypeOutput", EmitDefaultValue = false)] + public List ResultTypeOutput { get; set; } /// /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. /// /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. - [JsonPropertyName("doublePageSpread")] + [DataMember(Name = "doublePageSpread", EmitDefaultValue = true)] [Obsolete] - public bool? DoublePageSpread { get { return this.DoublePageSpreadOption; } set { this.DoublePageSpreadOption = new(value); } } - - /// - /// Used to track the state of GenerateDoublePageSpreadImage - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option GenerateDoublePageSpreadImageOption { get; private set; } + public bool DoublePageSpread { get; set; } /// /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. /// /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. - [JsonPropertyName("generateDoublePageSpreadImage")] - public bool? GenerateDoublePageSpreadImage { get { return this.GenerateDoublePageSpreadImageOption; } set { this.GenerateDoublePageSpreadImageOption = new(value); } } - - /// - /// Used to track the state of FieldTypesFilter - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> FieldTypesFilterOption { get; private set; } + [DataMember(Name = "generateDoublePageSpreadImage", EmitDefaultValue = true)] + public bool GenerateDoublePageSpreadImage { get; set; } /// /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. /// /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. - [JsonPropertyName("fieldTypesFilter")] - public List? FieldTypesFilter { get { return this.FieldTypesFilterOption; } set { this.FieldTypesFilterOption = new(value); } } - - /// - /// Used to track the state of DateFormat - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DateFormatOption { get; private set; } + [DataMember(Name = "fieldTypesFilter", EmitDefaultValue = false)] + public List FieldTypesFilter { get; set; } /// /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). /// /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). - /* MM/dd/yyyy */ - [JsonPropertyName("dateFormat")] - public string? DateFormat { get { return this.DateFormatOption; } set { this.DateFormatOption = new(value); } } - - /// - /// Used to track the state of ImageDpiOutMax - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ImageDpiOutMaxOption { get; private set; } + /* + MM/dd/yyyy + */ + [DataMember(Name = "dateFormat", EmitDefaultValue = false)] + public string DateFormat { get; set; } /// /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. /// /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. - [JsonPropertyName("imageDpiOutMax")] - public int? ImageDpiOutMax { get { return this.ImageDpiOutMaxOption; } set { this.ImageDpiOutMaxOption = new(value); } } - - /// - /// Used to track the state of AlreadyCropped - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AlreadyCroppedOption { get; private set; } + [DataMember(Name = "imageDpiOutMax", EmitDefaultValue = false)] + public int ImageDpiOutMax { get; set; } /// /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. /// /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. - [JsonPropertyName("alreadyCropped")] - public bool? AlreadyCropped { get { return this.AlreadyCroppedOption; } set { this.AlreadyCroppedOption = new(value); } } - - /// - /// Used to track the state of CustomParams - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> CustomParamsOption { get; private set; } + [DataMember(Name = "alreadyCropped", EmitDefaultValue = true)] + public bool AlreadyCropped { get; set; } /// /// This option allows passing custom processing parameters that can be implemented in future without changing API. /// /// This option allows passing custom processing parameters that can be implemented in future without changing API. - [JsonPropertyName("customParams")] - public Dictionary? CustomParams { get { return this.CustomParamsOption; } set { this.CustomParamsOption = new(value); } } - - /// - /// Used to track the state of Config - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ConfigOption { get; private set; } + [DataMember(Name = "customParams", EmitDefaultValue = false)] + public Dictionary CustomParams { get; set; } /// /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. /// /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. - [JsonPropertyName("config")] - public List? Config { get { return this.ConfigOption; } set { this.ConfigOption = new(value); } } - - /// - /// Used to track the state of Log - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LogOption { get; private set; } + [DataMember(Name = "config", EmitDefaultValue = false)] + public List Config { get; set; } /// /// When enabled, results will contain transaction processing log. Disabled by default /// /// When enabled, results will contain transaction processing log. Disabled by default - [JsonPropertyName("log")] - public bool? Log { get { return this.LogOption; } set { this.LogOption = new(value); } } - - /// - /// Used to track the state of ForceDocID - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ForceDocIDOption { get; private set; } + [DataMember(Name = "log", EmitDefaultValue = true)] + public bool Log { get; set; } /// /// Force use of specific template ID and skip document type identification step. /// /// Force use of specific template ID and skip document type identification step. - [JsonPropertyName("forceDocID")] - public int? ForceDocID { get { return this.ForceDocIDOption; } set { this.ForceDocIDOption = new(value); } } - - /// - /// Used to track the state of MatchTextFieldMask - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option MatchTextFieldMaskOption { get; private set; } + [DataMember(Name = "forceDocID", EmitDefaultValue = false)] + public int ForceDocID { get; set; } /// /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. /// /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. - [JsonPropertyName("matchTextFieldMask")] - public bool? MatchTextFieldMask { get { return this.MatchTextFieldMaskOption; } set { this.MatchTextFieldMaskOption = new(value); } } - - /// - /// Used to track the state of FastDocDetect - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FastDocDetectOption { get; private set; } + [DataMember(Name = "matchTextFieldMask", EmitDefaultValue = true)] + public bool MatchTextFieldMask { get; set; } /// /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. /// /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. - [JsonPropertyName("fastDocDetect")] + [DataMember(Name = "fastDocDetect", EmitDefaultValue = true)] [Obsolete] - public bool? FastDocDetect { get { return this.FastDocDetectOption; } set { this.FastDocDetectOption = new(value); } } - - /// - /// Used to track the state of UpdateOCRValidityByGlare - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UpdateOCRValidityByGlareOption { get; private set; } + public bool FastDocDetect { get; set; } /// /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. /// /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. - [JsonPropertyName("updateOCRValidityByGlare")] - public bool? UpdateOCRValidityByGlare { get { return this.UpdateOCRValidityByGlareOption; } set { this.UpdateOCRValidityByGlareOption = new(value); } } - - /// - /// Used to track the state of CheckRequiredTextFields - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckRequiredTextFieldsOption { get; private set; } + [DataMember(Name = "updateOCRValidityByGlare", EmitDefaultValue = true)] + public bool UpdateOCRValidityByGlare { get; set; } /// /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. /// /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. - [JsonPropertyName("checkRequiredTextFields")] - public bool? CheckRequiredTextFields { get { return this.CheckRequiredTextFieldsOption; } set { this.CheckRequiredTextFieldsOption = new(value); } } - - /// - /// Used to track the state of ReturnCroppedBarcode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ReturnCroppedBarcodeOption { get; private set; } + [DataMember(Name = "checkRequiredTextFields", EmitDefaultValue = true)] + public bool CheckRequiredTextFields { get; set; } /// /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. /// /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. - [JsonPropertyName("returnCroppedBarcode")] - public bool? ReturnCroppedBarcode { get { return this.ReturnCroppedBarcodeOption; } set { this.ReturnCroppedBarcodeOption = new(value); } } - - /// - /// Used to track the state of ImageQa - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ImageQaOption { get; private set; } + [DataMember(Name = "returnCroppedBarcode", EmitDefaultValue = true)] + public bool ReturnCroppedBarcode { get; set; } /// /// Gets or Sets ImageQa /// - [JsonPropertyName("imageQa")] - public ImageQA? ImageQa { get { return this.ImageQaOption; } set { this.ImageQaOption = new(value); } } - - /// - /// Used to track the state of StrictImageQuality - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option StrictImageQualityOption { get; private set; } + [DataMember(Name = "imageQa", EmitDefaultValue = false)] + public ImageQA ImageQa { get; set; } /// /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. /// /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. - [JsonPropertyName("strictImageQuality")] - public bool? StrictImageQuality { get { return this.StrictImageQualityOption; } set { this.StrictImageQualityOption = new(value); } } - - /// - /// Used to track the state of RespectImageQuality - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RespectImageQualityOption { get; private set; } + [DataMember(Name = "strictImageQuality", EmitDefaultValue = true)] + public bool StrictImageQuality { get; set; } /// /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. /// /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. - [JsonPropertyName("respectImageQuality")] + [DataMember(Name = "respectImageQuality", EmitDefaultValue = true)] [Obsolete] - public bool? RespectImageQuality { get { return this.RespectImageQualityOption; } set { this.RespectImageQualityOption = new(value); } } - - /// - /// Used to track the state of NoGraphics - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option NoGraphicsOption { get; private set; } + public bool RespectImageQuality { get; set; } /// /// When enabled, no graphic fields will be cropped from document image. Disabled by default. /// /// When enabled, no graphic fields will be cropped from document image. Disabled by default. - [JsonPropertyName("noGraphics")] - public bool? NoGraphics { get { return this.NoGraphicsOption; } set { this.NoGraphicsOption = new(value); } } - - /// - /// Used to track the state of DepersonalizeLog - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DepersonalizeLogOption { get; private set; } + [DataMember(Name = "noGraphics", EmitDefaultValue = true)] + public bool NoGraphics { get; set; } /// /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. /// /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. - [JsonPropertyName("depersonalizeLog")] - public bool? DepersonalizeLog { get { return this.DepersonalizeLogOption; } set { this.DepersonalizeLogOption = new(value); } } - - /// - /// Used to track the state of MultiDocOnImage - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option MultiDocOnImageOption { get; private set; } + [DataMember(Name = "depersonalizeLog", EmitDefaultValue = true)] + public bool DepersonalizeLog { get; set; } /// /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. /// /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. - [JsonPropertyName("multiDocOnImage")] - public bool? MultiDocOnImage { get { return this.MultiDocOnImageOption; } set { this.MultiDocOnImageOption = new(value); } } - - /// - /// Used to track the state of ShiftExpiryDate - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ShiftExpiryDateOption { get; private set; } + [DataMember(Name = "multiDocOnImage", EmitDefaultValue = true)] + public bool MultiDocOnImage { get; set; } /// /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default /// /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default - [JsonPropertyName("shiftExpiryDate")] - public int? ShiftExpiryDate { get { return this.ShiftExpiryDateOption; } set { this.ShiftExpiryDateOption = new(value); } } - - /// - /// Used to track the state of MinimalHolderAge - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option MinimalHolderAgeOption { get; private set; } + [DataMember(Name = "shiftExpiryDate", EmitDefaultValue = false)] + public int ShiftExpiryDate { get; set; } /// /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. /// /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. - [JsonPropertyName("minimalHolderAge")] - public int? MinimalHolderAge { get { return this.MinimalHolderAgeOption; } set { this.MinimalHolderAgeOption = new(value); } } - - /// - /// Used to track the state of ReturnUncroppedImage - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ReturnUncroppedImageOption { get; private set; } + [DataMember(Name = "minimalHolderAge", EmitDefaultValue = false)] + public int MinimalHolderAge { get; set; } /// /// When enabled, returns input images in output. Disabled by default. /// /// When enabled, returns input images in output. Disabled by default. - [JsonPropertyName("returnUncroppedImage")] - public bool? ReturnUncroppedImage { get { return this.ReturnUncroppedImageOption; } set { this.ReturnUncroppedImageOption = new(value); } } - - /// - /// Used to track the state of MrzFormatsFilter - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> MrzFormatsFilterOption { get; private set; } + [DataMember(Name = "returnUncroppedImage", EmitDefaultValue = true)] + public bool ReturnUncroppedImage { get; set; } /// /// This option allows limiting MRZ formats to be recognized by specifying them in array. /// /// This option allows limiting MRZ formats to be recognized by specifying them in array. - [JsonPropertyName("mrzFormatsFilter")] - public List? MrzFormatsFilter { get { return this.MrzFormatsFilterOption; } set { this.MrzFormatsFilterOption = new(value); } } - - /// - /// Used to track the state of ForceReadMrzBeforeLocate - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ForceReadMrzBeforeLocateOption { get; private set; } + [DataMember(Name = "mrzFormatsFilter", EmitDefaultValue = false)] + public List MrzFormatsFilter { get; set; } /// /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. /// /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. - [JsonPropertyName("forceReadMrzBeforeLocate")] - public bool? ForceReadMrzBeforeLocate { get { return this.ForceReadMrzBeforeLocateOption; } set { this.ForceReadMrzBeforeLocateOption = new(value); } } - - /// - /// Used to track the state of ParseBarcodes - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ParseBarcodesOption { get; private set; } + [DataMember(Name = "forceReadMrzBeforeLocate", EmitDefaultValue = true)] + public bool ForceReadMrzBeforeLocate { get; set; } /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. - [JsonPropertyName("parseBarcodes")] - public bool? ParseBarcodes { get { return this.ParseBarcodesOption; } set { this.ParseBarcodesOption = new(value); } } - - /// - /// Used to track the state of SplitNames - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SplitNamesOption { get; private set; } + [DataMember(Name = "parseBarcodes", EmitDefaultValue = true)] + public bool ParseBarcodes { get; set; } /// /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. /// /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. - [JsonPropertyName("splitNames")] - public bool? SplitNames { get { return this.SplitNamesOption; } set { this.SplitNamesOption = new(value); } } - - /// - /// Used to track the state of DisablePerforationOCR - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DisablePerforationOCROption { get; private set; } + [DataMember(Name = "splitNames", EmitDefaultValue = true)] + public bool SplitNames { get; set; } /// /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. /// /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. - [JsonPropertyName("disablePerforationOCR")] - public bool? DisablePerforationOCR { get { return this.DisablePerforationOCROption; } set { this.DisablePerforationOCROption = new(value); } } - - /// - /// Used to track the state of DocumentGroupFilter - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> DocumentGroupFilterOption { get; private set; } + [DataMember(Name = "disablePerforationOCR", EmitDefaultValue = true)] + public bool DisablePerforationOCR { get; set; } /// /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. /// /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. - [JsonPropertyName("documentGroupFilter")] - public List? DocumentGroupFilter { get { return this.DocumentGroupFilterOption; } set { this.DocumentGroupFilterOption = new(value); } } - - /// - /// Used to track the state of ProcessAuth - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ProcessAuthOption { get; private set; } + [DataMember(Name = "documentGroupFilter", EmitDefaultValue = false)] + public List DocumentGroupFilter { get; set; } /// /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. /// /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. - [JsonPropertyName("processAuth")] - public long? ProcessAuth { get { return this.ProcessAuthOption; } set { this.ProcessAuthOption = new(value); } } - - /// - /// Used to track the state of DeviceId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeviceIdOption { get; private set; } + [DataMember(Name = "processAuth", EmitDefaultValue = false)] + public long ProcessAuth { get; set; } /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. - [JsonPropertyName("deviceId")] - public int? DeviceId { get { return this.DeviceIdOption; } set { this.DeviceIdOption = new(value); } } - - /// - /// Used to track the state of DeviceType - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeviceTypeOption { get; private set; } + [DataMember(Name = "deviceId", EmitDefaultValue = false)] + public int DeviceId { get; set; } /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. - [JsonPropertyName("deviceType")] - public int? DeviceType { get { return this.DeviceTypeOption; } set { this.DeviceTypeOption = new(value); } } - - /// - /// Used to track the state of DeviceTypeHex - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DeviceTypeHexOption { get; private set; } + [DataMember(Name = "deviceType", EmitDefaultValue = false)] + public int DeviceType { get; set; } /// /// This parameter is used to specify the document reader device type from which input images were captured /// /// This parameter is used to specify the document reader device type from which input images were captured - [JsonPropertyName("deviceTypeHex")] - public string? DeviceTypeHex { get { return this.DeviceTypeHexOption; } set { this.DeviceTypeHexOption = new(value); } } - - /// - /// Used to track the state of IgnoreDeviceIdFromImage - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option IgnoreDeviceIdFromImageOption { get; private set; } + [DataMember(Name = "deviceTypeHex", EmitDefaultValue = false)] + public string DeviceTypeHex { get; set; } /// /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false /// /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false - [JsonPropertyName("ignoreDeviceIdFromImage")] - public bool? IgnoreDeviceIdFromImage { get { return this.IgnoreDeviceIdFromImageOption; } set { this.IgnoreDeviceIdFromImageOption = new(value); } } - - /// - /// Used to track the state of DocumentIdList - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> DocumentIdListOption { get; private set; } + [DataMember(Name = "ignoreDeviceIdFromImage", EmitDefaultValue = true)] + public bool IgnoreDeviceIdFromImage { get; set; } /// /// List of the document ID's to process. All documents will be processed, if empty. /// /// List of the document ID's to process. All documents will be processed, if empty. - [JsonPropertyName("documentIdList")] - public List? DocumentIdList { get { return this.DocumentIdListOption; } set { this.DocumentIdListOption = new(value); } } - - /// - /// Used to track the state of Rfid - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RfidOption { get; private set; } + [DataMember(Name = "documentIdList", EmitDefaultValue = false)] + public List DocumentIdList { get; set; } /// /// Gets or Sets Rfid /// - [JsonPropertyName("rfid")] - public ProcessParamsRfid? Rfid { get { return this.RfidOption; } set { this.RfidOption = new(value); } } - - /// - /// Used to track the state of CheckAuth - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CheckAuthOption { get; private set; } + [DataMember(Name = "rfid", EmitDefaultValue = false)] + public ProcessParamsRfid Rfid { get; set; } /// /// This parameter is used to enable authenticity checks /// /// This parameter is used to enable authenticity checks - [JsonPropertyName("checkAuth")] - public bool? CheckAuth { get { return this.CheckAuthOption; } set { this.CheckAuthOption = new(value); } } - - /// - /// Used to track the state of AuthParams - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AuthParamsOption { get; private set; } + [DataMember(Name = "checkAuth", EmitDefaultValue = true)] + public bool CheckAuth { get; set; } /// /// Gets or Sets AuthParams /// - [JsonPropertyName("authParams")] - public AuthParams? AuthParams { get { return this.AuthParamsOption; } set { this.AuthParamsOption = new(value); } } - - /// - /// Used to track the state of GenerateNumericCodes - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option GenerateNumericCodesOption { get; private set; } + [DataMember(Name = "authParams", EmitDefaultValue = false)] + public AuthParams AuthParams { get; set; } /// /// This parameter is used to generate numeric representation for issuing state and nationality codes /// /// This parameter is used to generate numeric representation for issuing state and nationality codes - [JsonPropertyName("generateNumericCodes")] - public bool? GenerateNumericCodes { get { return this.GenerateNumericCodesOption; } set { this.GenerateNumericCodesOption = new(value); } } - - /// - /// Used to track the state of StrictBarcodeDigitalSignatureCheck - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option StrictBarcodeDigitalSignatureCheckOption { get; private set; } + [DataMember(Name = "generateNumericCodes", EmitDefaultValue = true)] + public bool GenerateNumericCodes { get; set; } /// /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. /// /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. - [JsonPropertyName("strictBarcodeDigitalSignatureCheck")] - public bool? StrictBarcodeDigitalSignatureCheck { get { return this.StrictBarcodeDigitalSignatureCheckOption; } set { this.StrictBarcodeDigitalSignatureCheckOption = new(value); } } - - /// - /// Used to track the state of SelectLongestNames - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SelectLongestNamesOption { get; private set; } + [DataMember(Name = "strictBarcodeDigitalSignatureCheck", EmitDefaultValue = true)] + public bool StrictBarcodeDigitalSignatureCheck { get; set; } /// /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. /// /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. - [JsonPropertyName("selectLongestNames")] - public bool? SelectLongestNames { get { return this.SelectLongestNamesOption; } set { this.SelectLongestNamesOption = new(value); } } - - /// - /// Used to track the state of DoBarcodes - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> DoBarcodesOption { get; private set; } + [DataMember(Name = "selectLongestNames", EmitDefaultValue = true)] + public bool SelectLongestNames { get; set; } /// /// Set the types of barcodes to process. /// /// Set the types of barcodes to process. - [JsonPropertyName("doBarcodes")] - public List? DoBarcodes { get { return this.DoBarcodesOption; } set { this.DoBarcodesOption = new(value); } } + [DataMember(Name = "doBarcodes", EmitDefaultValue = false)] + public List DoBarcodes { get; set; } /// /// Returns the string presentation of the object @@ -996,7 +588,6 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class ProcessParams {\n"); - sb.Append(" Scenario: ").Append(Scenario).Append("\n"); sb.Append(" GenerateDTCVC: ").Append(GenerateDTCVC).Append("\n"); sb.Append(" LcidFilter: ").Append(LcidFilter).Append("\n"); sb.Append(" CheckLiveness: ").Append(CheckLiveness).Append("\n"); @@ -1007,6 +598,7 @@ public override string ToString() sb.Append(" DoDetectCan: ").Append(DoDetectCan).Append("\n"); sb.Append(" ImageOutputMaxHeight: ").Append(ImageOutputMaxHeight).Append("\n"); sb.Append(" ImageOutputMaxWidth: ").Append(ImageOutputMaxWidth).Append("\n"); + sb.Append(" Scenario: ").Append(Scenario).Append("\n"); sb.Append(" ResultTypeOutput: ").Append(ResultTypeOutput).Append("\n"); sb.Append(" DoublePageSpread: ").Append(DoublePageSpread).Append("\n"); sb.Append(" GenerateDoublePageSpreadImage: ").Append(GenerateDoublePageSpreadImage).Append("\n"); @@ -1060,6 +652,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -1071,830 +672,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ProcessParamsJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ProcessParams Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option scenario = default; - Option generateDTCVC = default; - Option?> lcidFilter = default; - Option checkLiveness = default; - Option?> lcidIgnoreFilter = default; - Option oneShotIdentification = default; - Option useFaceApi = default; - Option faceApi = default; - Option doDetectCan = default; - Option imageOutputMaxHeight = default; - Option imageOutputMaxWidth = default; - Option?> resultTypeOutput = default; - Option doublePageSpread = default; - Option generateDoublePageSpreadImage = default; - Option?> fieldTypesFilter = default; - Option dateFormat = default; - Option measureSystem = default; - Option imageDpiOutMax = default; - Option alreadyCropped = default; - Option?> customParams = default; - Option?> config = default; - Option log = default; - Option logLevel = default; - Option forceDocID = default; - Option matchTextFieldMask = default; - Option fastDocDetect = default; - Option updateOCRValidityByGlare = default; - Option checkRequiredTextFields = default; - Option returnCroppedBarcode = default; - Option imageQa = default; - Option strictImageQuality = default; - Option respectImageQuality = default; - Option forceDocFormat = default; - Option noGraphics = default; - Option depersonalizeLog = default; - Option multiDocOnImage = default; - Option shiftExpiryDate = default; - Option minimalHolderAge = default; - Option returnUncroppedImage = default; - Option?> mrzFormatsFilter = default; - Option forceReadMrzBeforeLocate = default; - Option parseBarcodes = default; - Option convertCase = default; - Option splitNames = default; - Option disablePerforationOCR = default; - Option?> documentGroupFilter = default; - Option processAuth = default; - Option deviceId = default; - Option deviceType = default; - Option deviceTypeHex = default; - Option ignoreDeviceIdFromImage = default; - Option?> documentIdList = default; - Option rfid = default; - Option checkAuth = default; - Option authParams = default; - Option mrzDetectMode = default; - Option generateNumericCodes = default; - Option strictBarcodeDigitalSignatureCheck = default; - Option selectLongestNames = default; - Option?> doBarcodes = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "scenario": - string? scenarioRawValue = utf8JsonReader.GetString(); - if (scenarioRawValue != null) - scenario = new Option(ScenarioValueConverter.FromStringOrDefault(scenarioRawValue)); - break; - case "generateDTCVC": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - generateDTCVC = new Option(utf8JsonReader.GetBoolean()); - break; - case "lcidFilter": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - lcidFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "checkLiveness": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkLiveness = new Option(utf8JsonReader.GetBoolean()); - break; - case "lcidIgnoreFilter": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - lcidIgnoreFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "oneShotIdentification": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - oneShotIdentification = new Option(utf8JsonReader.GetBoolean()); - break; - case "useFaceApi": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - useFaceApi = new Option(utf8JsonReader.GetBoolean()); - break; - case "faceApi": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - faceApi = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "doDetectCan": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - doDetectCan = new Option(utf8JsonReader.GetBoolean()); - break; - case "imageOutputMaxHeight": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - imageOutputMaxHeight = new Option(utf8JsonReader.GetInt32()); - break; - case "imageOutputMaxWidth": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - imageOutputMaxWidth = new Option(utf8JsonReader.GetInt32()); - break; - case "resultTypeOutput": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultTypeOutput = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "doublePageSpread": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - doublePageSpread = new Option(utf8JsonReader.GetBoolean()); - break; - case "generateDoublePageSpreadImage": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - generateDoublePageSpreadImage = new Option(utf8JsonReader.GetBoolean()); - break; - case "fieldTypesFilter": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldTypesFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "dateFormat": - dateFormat = new Option(utf8JsonReader.GetString()!); - break; - case "measureSystem": - string? measureSystemRawValue = utf8JsonReader.GetString(); - if (measureSystemRawValue != null) - measureSystem = new Option(MeasureSystemValueConverter.FromStringOrDefault(measureSystemRawValue)); - break; - case "imageDpiOutMax": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - imageDpiOutMax = new Option(utf8JsonReader.GetInt32()); - break; - case "alreadyCropped": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - alreadyCropped = new Option(utf8JsonReader.GetBoolean()); - break; - case "customParams": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - customParams = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "config": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - config = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "log": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - log = new Option(utf8JsonReader.GetBoolean()); - break; - case "logLevel": - string? logLevelRawValue = utf8JsonReader.GetString(); - if (logLevelRawValue != null) - logLevel = new Option(LogLevelValueConverter.FromStringOrDefault(logLevelRawValue)); - break; - case "forceDocID": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - forceDocID = new Option(utf8JsonReader.GetInt32()); - break; - case "matchTextFieldMask": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - matchTextFieldMask = new Option(utf8JsonReader.GetBoolean()); - break; - case "fastDocDetect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fastDocDetect = new Option(utf8JsonReader.GetBoolean()); - break; - case "updateOCRValidityByGlare": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - updateOCRValidityByGlare = new Option(utf8JsonReader.GetBoolean()); - break; - case "checkRequiredTextFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkRequiredTextFields = new Option(utf8JsonReader.GetBoolean()); - break; - case "returnCroppedBarcode": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - returnCroppedBarcode = new Option(utf8JsonReader.GetBoolean()); - break; - case "imageQa": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - imageQa = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "strictImageQuality": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - strictImageQuality = new Option(utf8JsonReader.GetBoolean()); - break; - case "respectImageQuality": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - respectImageQuality = new Option(utf8JsonReader.GetBoolean()); - break; - case "forceDocFormat": - string? forceDocFormatRawValue = utf8JsonReader.GetString(); - if (forceDocFormatRawValue != null) - forceDocFormat = new Option(DocumentFormatValueConverter.FromStringOrDefault(forceDocFormatRawValue)); - break; - case "noGraphics": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - noGraphics = new Option(utf8JsonReader.GetBoolean()); - break; - case "depersonalizeLog": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - depersonalizeLog = new Option(utf8JsonReader.GetBoolean()); - break; - case "multiDocOnImage": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - multiDocOnImage = new Option(utf8JsonReader.GetBoolean()); - break; - case "shiftExpiryDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - shiftExpiryDate = new Option(utf8JsonReader.GetInt32()); - break; - case "minimalHolderAge": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - minimalHolderAge = new Option(utf8JsonReader.GetInt32()); - break; - case "returnUncroppedImage": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - returnUncroppedImage = new Option(utf8JsonReader.GetBoolean()); - break; - case "mrzFormatsFilter": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mrzFormatsFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "forceReadMrzBeforeLocate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - forceReadMrzBeforeLocate = new Option(utf8JsonReader.GetBoolean()); - break; - case "parseBarcodes": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - parseBarcodes = new Option(utf8JsonReader.GetBoolean()); - break; - case "convertCase": - string? convertCaseRawValue = utf8JsonReader.GetString(); - if (convertCaseRawValue != null) - convertCase = new Option(TextPostProcessingValueConverter.FromStringOrDefault(convertCaseRawValue)); - break; - case "splitNames": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - splitNames = new Option(utf8JsonReader.GetBoolean()); - break; - case "disablePerforationOCR": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - disablePerforationOCR = new Option(utf8JsonReader.GetBoolean()); - break; - case "documentGroupFilter": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - documentGroupFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "processAuth": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - processAuth = new Option(utf8JsonReader.GetInt64()); - break; - case "deviceId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - deviceId = new Option(utf8JsonReader.GetInt32()); - break; - case "deviceType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - deviceType = new Option(utf8JsonReader.GetInt32()); - break; - case "deviceTypeHex": - deviceTypeHex = new Option(utf8JsonReader.GetString()!); - break; - case "ignoreDeviceIdFromImage": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - ignoreDeviceIdFromImage = new Option(utf8JsonReader.GetBoolean()); - break; - case "documentIdList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - documentIdList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "rfid": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rfid = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "checkAuth": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkAuth = new Option(utf8JsonReader.GetBoolean()); - break; - case "authParams": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - authParams = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "mrzDetectMode": - string? mrzDetectModeRawValue = utf8JsonReader.GetString(); - if (mrzDetectModeRawValue != null) - mrzDetectMode = new Option(MrzDetectModeEnumValueConverter.FromStringOrDefault(mrzDetectModeRawValue)); - break; - case "generateNumericCodes": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - generateNumericCodes = new Option(utf8JsonReader.GetBoolean()); - break; - case "strictBarcodeDigitalSignatureCheck": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - strictBarcodeDigitalSignatureCheck = new Option(utf8JsonReader.GetBoolean()); - break; - case "selectLongestNames": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - selectLongestNames = new Option(utf8JsonReader.GetBoolean()); - break; - case "doBarcodes": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - doBarcodes = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!scenario.IsSet) - throw new ArgumentException("Property is required for class ProcessParams.", nameof(scenario)); - - if (scenario.IsSet && scenario.Value == null) - throw new ArgumentNullException(nameof(scenario), "Property is not nullable for class ProcessParams."); - - if (generateDTCVC.IsSet && generateDTCVC.Value == null) - throw new ArgumentNullException(nameof(generateDTCVC), "Property is not nullable for class ProcessParams."); - - if (lcidFilter.IsSet && lcidFilter.Value == null) - throw new ArgumentNullException(nameof(lcidFilter), "Property is not nullable for class ProcessParams."); - - if (checkLiveness.IsSet && checkLiveness.Value == null) - throw new ArgumentNullException(nameof(checkLiveness), "Property is not nullable for class ProcessParams."); - - if (lcidIgnoreFilter.IsSet && lcidIgnoreFilter.Value == null) - throw new ArgumentNullException(nameof(lcidIgnoreFilter), "Property is not nullable for class ProcessParams."); - - if (oneShotIdentification.IsSet && oneShotIdentification.Value == null) - throw new ArgumentNullException(nameof(oneShotIdentification), "Property is not nullable for class ProcessParams."); - - if (useFaceApi.IsSet && useFaceApi.Value == null) - throw new ArgumentNullException(nameof(useFaceApi), "Property is not nullable for class ProcessParams."); - - if (faceApi.IsSet && faceApi.Value == null) - throw new ArgumentNullException(nameof(faceApi), "Property is not nullable for class ProcessParams."); - - if (doDetectCan.IsSet && doDetectCan.Value == null) - throw new ArgumentNullException(nameof(doDetectCan), "Property is not nullable for class ProcessParams."); - - if (imageOutputMaxHeight.IsSet && imageOutputMaxHeight.Value == null) - throw new ArgumentNullException(nameof(imageOutputMaxHeight), "Property is not nullable for class ProcessParams."); - - if (imageOutputMaxWidth.IsSet && imageOutputMaxWidth.Value == null) - throw new ArgumentNullException(nameof(imageOutputMaxWidth), "Property is not nullable for class ProcessParams."); - - if (resultTypeOutput.IsSet && resultTypeOutput.Value == null) - throw new ArgumentNullException(nameof(resultTypeOutput), "Property is not nullable for class ProcessParams."); - - if (doublePageSpread.IsSet && doublePageSpread.Value == null) - throw new ArgumentNullException(nameof(doublePageSpread), "Property is not nullable for class ProcessParams."); - - if (generateDoublePageSpreadImage.IsSet && generateDoublePageSpreadImage.Value == null) - throw new ArgumentNullException(nameof(generateDoublePageSpreadImage), "Property is not nullable for class ProcessParams."); - - if (fieldTypesFilter.IsSet && fieldTypesFilter.Value == null) - throw new ArgumentNullException(nameof(fieldTypesFilter), "Property is not nullable for class ProcessParams."); - - if (dateFormat.IsSet && dateFormat.Value == null) - throw new ArgumentNullException(nameof(dateFormat), "Property is not nullable for class ProcessParams."); - - if (measureSystem.IsSet && measureSystem.Value == null) - throw new ArgumentNullException(nameof(measureSystem), "Property is not nullable for class ProcessParams."); - - if (imageDpiOutMax.IsSet && imageDpiOutMax.Value == null) - throw new ArgumentNullException(nameof(imageDpiOutMax), "Property is not nullable for class ProcessParams."); - - if (alreadyCropped.IsSet && alreadyCropped.Value == null) - throw new ArgumentNullException(nameof(alreadyCropped), "Property is not nullable for class ProcessParams."); - - if (customParams.IsSet && customParams.Value == null) - throw new ArgumentNullException(nameof(customParams), "Property is not nullable for class ProcessParams."); - - if (config.IsSet && config.Value == null) - throw new ArgumentNullException(nameof(config), "Property is not nullable for class ProcessParams."); - - if (log.IsSet && log.Value == null) - throw new ArgumentNullException(nameof(log), "Property is not nullable for class ProcessParams."); - - if (logLevel.IsSet && logLevel.Value == null) - throw new ArgumentNullException(nameof(logLevel), "Property is not nullable for class ProcessParams."); - - if (forceDocID.IsSet && forceDocID.Value == null) - throw new ArgumentNullException(nameof(forceDocID), "Property is not nullable for class ProcessParams."); - - if (matchTextFieldMask.IsSet && matchTextFieldMask.Value == null) - throw new ArgumentNullException(nameof(matchTextFieldMask), "Property is not nullable for class ProcessParams."); - - if (fastDocDetect.IsSet && fastDocDetect.Value == null) - throw new ArgumentNullException(nameof(fastDocDetect), "Property is not nullable for class ProcessParams."); - - if (updateOCRValidityByGlare.IsSet && updateOCRValidityByGlare.Value == null) - throw new ArgumentNullException(nameof(updateOCRValidityByGlare), "Property is not nullable for class ProcessParams."); - - if (checkRequiredTextFields.IsSet && checkRequiredTextFields.Value == null) - throw new ArgumentNullException(nameof(checkRequiredTextFields), "Property is not nullable for class ProcessParams."); - - if (returnCroppedBarcode.IsSet && returnCroppedBarcode.Value == null) - throw new ArgumentNullException(nameof(returnCroppedBarcode), "Property is not nullable for class ProcessParams."); - - if (imageQa.IsSet && imageQa.Value == null) - throw new ArgumentNullException(nameof(imageQa), "Property is not nullable for class ProcessParams."); - - if (strictImageQuality.IsSet && strictImageQuality.Value == null) - throw new ArgumentNullException(nameof(strictImageQuality), "Property is not nullable for class ProcessParams."); - - if (respectImageQuality.IsSet && respectImageQuality.Value == null) - throw new ArgumentNullException(nameof(respectImageQuality), "Property is not nullable for class ProcessParams."); - - if (forceDocFormat.IsSet && forceDocFormat.Value == null) - throw new ArgumentNullException(nameof(forceDocFormat), "Property is not nullable for class ProcessParams."); - - if (noGraphics.IsSet && noGraphics.Value == null) - throw new ArgumentNullException(nameof(noGraphics), "Property is not nullable for class ProcessParams."); - - if (depersonalizeLog.IsSet && depersonalizeLog.Value == null) - throw new ArgumentNullException(nameof(depersonalizeLog), "Property is not nullable for class ProcessParams."); - - if (multiDocOnImage.IsSet && multiDocOnImage.Value == null) - throw new ArgumentNullException(nameof(multiDocOnImage), "Property is not nullable for class ProcessParams."); - - if (shiftExpiryDate.IsSet && shiftExpiryDate.Value == null) - throw new ArgumentNullException(nameof(shiftExpiryDate), "Property is not nullable for class ProcessParams."); - - if (minimalHolderAge.IsSet && minimalHolderAge.Value == null) - throw new ArgumentNullException(nameof(minimalHolderAge), "Property is not nullable for class ProcessParams."); - - if (returnUncroppedImage.IsSet && returnUncroppedImage.Value == null) - throw new ArgumentNullException(nameof(returnUncroppedImage), "Property is not nullable for class ProcessParams."); - - if (mrzFormatsFilter.IsSet && mrzFormatsFilter.Value == null) - throw new ArgumentNullException(nameof(mrzFormatsFilter), "Property is not nullable for class ProcessParams."); - - if (forceReadMrzBeforeLocate.IsSet && forceReadMrzBeforeLocate.Value == null) - throw new ArgumentNullException(nameof(forceReadMrzBeforeLocate), "Property is not nullable for class ProcessParams."); - - if (parseBarcodes.IsSet && parseBarcodes.Value == null) - throw new ArgumentNullException(nameof(parseBarcodes), "Property is not nullable for class ProcessParams."); - - if (convertCase.IsSet && convertCase.Value == null) - throw new ArgumentNullException(nameof(convertCase), "Property is not nullable for class ProcessParams."); - - if (splitNames.IsSet && splitNames.Value == null) - throw new ArgumentNullException(nameof(splitNames), "Property is not nullable for class ProcessParams."); - - if (disablePerforationOCR.IsSet && disablePerforationOCR.Value == null) - throw new ArgumentNullException(nameof(disablePerforationOCR), "Property is not nullable for class ProcessParams."); - - if (documentGroupFilter.IsSet && documentGroupFilter.Value == null) - throw new ArgumentNullException(nameof(documentGroupFilter), "Property is not nullable for class ProcessParams."); - - if (processAuth.IsSet && processAuth.Value == null) - throw new ArgumentNullException(nameof(processAuth), "Property is not nullable for class ProcessParams."); - - if (deviceId.IsSet && deviceId.Value == null) - throw new ArgumentNullException(nameof(deviceId), "Property is not nullable for class ProcessParams."); - - if (deviceType.IsSet && deviceType.Value == null) - throw new ArgumentNullException(nameof(deviceType), "Property is not nullable for class ProcessParams."); - - if (deviceTypeHex.IsSet && deviceTypeHex.Value == null) - throw new ArgumentNullException(nameof(deviceTypeHex), "Property is not nullable for class ProcessParams."); - - if (ignoreDeviceIdFromImage.IsSet && ignoreDeviceIdFromImage.Value == null) - throw new ArgumentNullException(nameof(ignoreDeviceIdFromImage), "Property is not nullable for class ProcessParams."); - - if (documentIdList.IsSet && documentIdList.Value == null) - throw new ArgumentNullException(nameof(documentIdList), "Property is not nullable for class ProcessParams."); - - if (rfid.IsSet && rfid.Value == null) - throw new ArgumentNullException(nameof(rfid), "Property is not nullable for class ProcessParams."); - - if (checkAuth.IsSet && checkAuth.Value == null) - throw new ArgumentNullException(nameof(checkAuth), "Property is not nullable for class ProcessParams."); - - if (authParams.IsSet && authParams.Value == null) - throw new ArgumentNullException(nameof(authParams), "Property is not nullable for class ProcessParams."); - - if (mrzDetectMode.IsSet && mrzDetectMode.Value == null) - throw new ArgumentNullException(nameof(mrzDetectMode), "Property is not nullable for class ProcessParams."); - - if (generateNumericCodes.IsSet && generateNumericCodes.Value == null) - throw new ArgumentNullException(nameof(generateNumericCodes), "Property is not nullable for class ProcessParams."); - - if (strictBarcodeDigitalSignatureCheck.IsSet && strictBarcodeDigitalSignatureCheck.Value == null) - throw new ArgumentNullException(nameof(strictBarcodeDigitalSignatureCheck), "Property is not nullable for class ProcessParams."); - - if (selectLongestNames.IsSet && selectLongestNames.Value == null) - throw new ArgumentNullException(nameof(selectLongestNames), "Property is not nullable for class ProcessParams."); - - if (doBarcodes.IsSet && doBarcodes.Value == null) - throw new ArgumentNullException(nameof(doBarcodes), "Property is not nullable for class ProcessParams."); - - return new ProcessParams(scenario.Value!.Value!, generateDTCVC, lcidFilter, checkLiveness, lcidIgnoreFilter, oneShotIdentification, useFaceApi, faceApi, doDetectCan, imageOutputMaxHeight, imageOutputMaxWidth, resultTypeOutput, doublePageSpread, generateDoublePageSpreadImage, fieldTypesFilter, dateFormat, measureSystem, imageDpiOutMax, alreadyCropped, customParams, config, log, logLevel, forceDocID, matchTextFieldMask, fastDocDetect, updateOCRValidityByGlare, checkRequiredTextFields, returnCroppedBarcode, imageQa, strictImageQuality, respectImageQuality, forceDocFormat, noGraphics, depersonalizeLog, multiDocOnImage, shiftExpiryDate, minimalHolderAge, returnUncroppedImage, mrzFormatsFilter, forceReadMrzBeforeLocate, parseBarcodes, convertCase, splitNames, disablePerforationOCR, documentGroupFilter, processAuth, deviceId, deviceType, deviceTypeHex, ignoreDeviceIdFromImage, documentIdList, rfid, checkAuth, authParams, mrzDetectMode, generateNumericCodes, strictBarcodeDigitalSignatureCheck, selectLongestNames, doBarcodes); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ProcessParams processParams, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, processParams, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ProcessParams processParams, JsonSerializerOptions jsonSerializerOptions) - { - if (processParams.LcidFilterOption.IsSet && processParams.LcidFilter == null) - throw new ArgumentNullException(nameof(processParams.LcidFilter), "Property is required for class ProcessParams."); - - if (processParams.LcidIgnoreFilterOption.IsSet && processParams.LcidIgnoreFilter == null) - throw new ArgumentNullException(nameof(processParams.LcidIgnoreFilter), "Property is required for class ProcessParams."); - - if (processParams.FaceApiOption.IsSet && processParams.FaceApi == null) - throw new ArgumentNullException(nameof(processParams.FaceApi), "Property is required for class ProcessParams."); - - if (processParams.ResultTypeOutputOption.IsSet && processParams.ResultTypeOutput == null) - throw new ArgumentNullException(nameof(processParams.ResultTypeOutput), "Property is required for class ProcessParams."); - - if (processParams.FieldTypesFilterOption.IsSet && processParams.FieldTypesFilter == null) - throw new ArgumentNullException(nameof(processParams.FieldTypesFilter), "Property is required for class ProcessParams."); - - if (processParams.DateFormatOption.IsSet && processParams.DateFormat == null) - throw new ArgumentNullException(nameof(processParams.DateFormat), "Property is required for class ProcessParams."); - - if (processParams.CustomParamsOption.IsSet && processParams.CustomParams == null) - throw new ArgumentNullException(nameof(processParams.CustomParams), "Property is required for class ProcessParams."); - - if (processParams.ConfigOption.IsSet && processParams.Config == null) - throw new ArgumentNullException(nameof(processParams.Config), "Property is required for class ProcessParams."); - - if (processParams.ImageQaOption.IsSet && processParams.ImageQa == null) - throw new ArgumentNullException(nameof(processParams.ImageQa), "Property is required for class ProcessParams."); - - if (processParams.MrzFormatsFilterOption.IsSet && processParams.MrzFormatsFilter == null) - throw new ArgumentNullException(nameof(processParams.MrzFormatsFilter), "Property is required for class ProcessParams."); - - if (processParams.DocumentGroupFilterOption.IsSet && processParams.DocumentGroupFilter == null) - throw new ArgumentNullException(nameof(processParams.DocumentGroupFilter), "Property is required for class ProcessParams."); - - if (processParams.DeviceTypeHexOption.IsSet && processParams.DeviceTypeHex == null) - throw new ArgumentNullException(nameof(processParams.DeviceTypeHex), "Property is required for class ProcessParams."); - - if (processParams.DocumentIdListOption.IsSet && processParams.DocumentIdList == null) - throw new ArgumentNullException(nameof(processParams.DocumentIdList), "Property is required for class ProcessParams."); - - if (processParams.RfidOption.IsSet && processParams.Rfid == null) - throw new ArgumentNullException(nameof(processParams.Rfid), "Property is required for class ProcessParams."); - - if (processParams.AuthParamsOption.IsSet && processParams.AuthParams == null) - throw new ArgumentNullException(nameof(processParams.AuthParams), "Property is required for class ProcessParams."); - - if (processParams.DoBarcodesOption.IsSet && processParams.DoBarcodes == null) - throw new ArgumentNullException(nameof(processParams.DoBarcodes), "Property is required for class ProcessParams."); - - var scenarioRawValue = ScenarioValueConverter.ToJsonValue(processParams.Scenario); - writer.WriteString("scenario", scenarioRawValue); - - if (processParams.GenerateDTCVCOption.IsSet) - writer.WriteBoolean("generateDTCVC", processParams.GenerateDTCVCOption.Value!.Value); - - if (processParams.LcidFilterOption.IsSet) - { - writer.WritePropertyName("lcidFilter"); - JsonSerializer.Serialize(writer, processParams.LcidFilter, jsonSerializerOptions); - } - if (processParams.CheckLivenessOption.IsSet) - writer.WriteBoolean("checkLiveness", processParams.CheckLivenessOption.Value!.Value); - - if (processParams.LcidIgnoreFilterOption.IsSet) - { - writer.WritePropertyName("lcidIgnoreFilter"); - JsonSerializer.Serialize(writer, processParams.LcidIgnoreFilter, jsonSerializerOptions); - } - if (processParams.OneShotIdentificationOption.IsSet) - writer.WriteBoolean("oneShotIdentification", processParams.OneShotIdentificationOption.Value!.Value); - - if (processParams.UseFaceApiOption.IsSet) - writer.WriteBoolean("useFaceApi", processParams.UseFaceApiOption.Value!.Value); - - if (processParams.FaceApiOption.IsSet) - { - writer.WritePropertyName("faceApi"); - JsonSerializer.Serialize(writer, processParams.FaceApi, jsonSerializerOptions); - } - if (processParams.DoDetectCanOption.IsSet) - writer.WriteBoolean("doDetectCan", processParams.DoDetectCanOption.Value!.Value); - - if (processParams.ImageOutputMaxHeightOption.IsSet) - writer.WriteNumber("imageOutputMaxHeight", processParams.ImageOutputMaxHeightOption.Value!.Value); - - if (processParams.ImageOutputMaxWidthOption.IsSet) - writer.WriteNumber("imageOutputMaxWidth", processParams.ImageOutputMaxWidthOption.Value!.Value); - - if (processParams.ResultTypeOutputOption.IsSet) - { - writer.WritePropertyName("resultTypeOutput"); - JsonSerializer.Serialize(writer, processParams.ResultTypeOutput, jsonSerializerOptions); - } - if (processParams.DoublePageSpreadOption.IsSet) - writer.WriteBoolean("doublePageSpread", processParams.DoublePageSpreadOption.Value!.Value); - - if (processParams.GenerateDoublePageSpreadImageOption.IsSet) - writer.WriteBoolean("generateDoublePageSpreadImage", processParams.GenerateDoublePageSpreadImageOption.Value!.Value); - - if (processParams.FieldTypesFilterOption.IsSet) - { - writer.WritePropertyName("fieldTypesFilter"); - JsonSerializer.Serialize(writer, processParams.FieldTypesFilter, jsonSerializerOptions); - } - if (processParams.DateFormatOption.IsSet) - writer.WriteString("dateFormat", processParams.DateFormat); - - if (processParams.MeasureSystemOption.IsSet) - { - var measureSystemRawValue = MeasureSystemValueConverter.ToJsonValue(processParams.MeasureSystem!.Value); - writer.WriteNumber("measureSystem", measureSystemRawValue); - } - if (processParams.ImageDpiOutMaxOption.IsSet) - writer.WriteNumber("imageDpiOutMax", processParams.ImageDpiOutMaxOption.Value!.Value); - - if (processParams.AlreadyCroppedOption.IsSet) - writer.WriteBoolean("alreadyCropped", processParams.AlreadyCroppedOption.Value!.Value); - - if (processParams.CustomParamsOption.IsSet) - { - writer.WritePropertyName("customParams"); - JsonSerializer.Serialize(writer, processParams.CustomParams, jsonSerializerOptions); - } - if (processParams.ConfigOption.IsSet) - { - writer.WritePropertyName("config"); - JsonSerializer.Serialize(writer, processParams.Config, jsonSerializerOptions); - } - if (processParams.LogOption.IsSet) - writer.WriteBoolean("log", processParams.LogOption.Value!.Value); - - if (processParams.LogLevelOption.IsSet) - { - var logLevelRawValue = LogLevelValueConverter.ToJsonValue(processParams.LogLevel!.Value); - writer.WriteString("logLevel", logLevelRawValue); - } - if (processParams.ForceDocIDOption.IsSet) - writer.WriteNumber("forceDocID", processParams.ForceDocIDOption.Value!.Value); - - if (processParams.MatchTextFieldMaskOption.IsSet) - writer.WriteBoolean("matchTextFieldMask", processParams.MatchTextFieldMaskOption.Value!.Value); - - if (processParams.FastDocDetectOption.IsSet) - writer.WriteBoolean("fastDocDetect", processParams.FastDocDetectOption.Value!.Value); - - if (processParams.UpdateOCRValidityByGlareOption.IsSet) - writer.WriteBoolean("updateOCRValidityByGlare", processParams.UpdateOCRValidityByGlareOption.Value!.Value); - - if (processParams.CheckRequiredTextFieldsOption.IsSet) - writer.WriteBoolean("checkRequiredTextFields", processParams.CheckRequiredTextFieldsOption.Value!.Value); - - if (processParams.ReturnCroppedBarcodeOption.IsSet) - writer.WriteBoolean("returnCroppedBarcode", processParams.ReturnCroppedBarcodeOption.Value!.Value); - - if (processParams.ImageQaOption.IsSet) - { - writer.WritePropertyName("imageQa"); - JsonSerializer.Serialize(writer, processParams.ImageQa, jsonSerializerOptions); - } - if (processParams.StrictImageQualityOption.IsSet) - writer.WriteBoolean("strictImageQuality", processParams.StrictImageQualityOption.Value!.Value); - - if (processParams.RespectImageQualityOption.IsSet) - writer.WriteBoolean("respectImageQuality", processParams.RespectImageQualityOption.Value!.Value); - - if (processParams.ForceDocFormatOption.IsSet) - { - var forceDocFormatRawValue = DocumentFormatValueConverter.ToJsonValue(processParams.ForceDocFormat!.Value); - writer.WriteNumber("forceDocFormat", forceDocFormatRawValue); - } - if (processParams.NoGraphicsOption.IsSet) - writer.WriteBoolean("noGraphics", processParams.NoGraphicsOption.Value!.Value); - - if (processParams.DepersonalizeLogOption.IsSet) - writer.WriteBoolean("depersonalizeLog", processParams.DepersonalizeLogOption.Value!.Value); - - if (processParams.MultiDocOnImageOption.IsSet) - writer.WriteBoolean("multiDocOnImage", processParams.MultiDocOnImageOption.Value!.Value); - - if (processParams.ShiftExpiryDateOption.IsSet) - writer.WriteNumber("shiftExpiryDate", processParams.ShiftExpiryDateOption.Value!.Value); - - if (processParams.MinimalHolderAgeOption.IsSet) - writer.WriteNumber("minimalHolderAge", processParams.MinimalHolderAgeOption.Value!.Value); - - if (processParams.ReturnUncroppedImageOption.IsSet) - writer.WriteBoolean("returnUncroppedImage", processParams.ReturnUncroppedImageOption.Value!.Value); - - if (processParams.MrzFormatsFilterOption.IsSet) - { - writer.WritePropertyName("mrzFormatsFilter"); - JsonSerializer.Serialize(writer, processParams.MrzFormatsFilter, jsonSerializerOptions); - } - if (processParams.ForceReadMrzBeforeLocateOption.IsSet) - writer.WriteBoolean("forceReadMrzBeforeLocate", processParams.ForceReadMrzBeforeLocateOption.Value!.Value); - - if (processParams.ParseBarcodesOption.IsSet) - writer.WriteBoolean("parseBarcodes", processParams.ParseBarcodesOption.Value!.Value); - - if (processParams.ConvertCaseOption.IsSet) - { - var convertCaseRawValue = TextPostProcessingValueConverter.ToJsonValue(processParams.ConvertCase!.Value); - writer.WriteNumber("convertCase", convertCaseRawValue); - } - if (processParams.SplitNamesOption.IsSet) - writer.WriteBoolean("splitNames", processParams.SplitNamesOption.Value!.Value); - - if (processParams.DisablePerforationOCROption.IsSet) - writer.WriteBoolean("disablePerforationOCR", processParams.DisablePerforationOCROption.Value!.Value); - - if (processParams.DocumentGroupFilterOption.IsSet) - { - writer.WritePropertyName("documentGroupFilter"); - JsonSerializer.Serialize(writer, processParams.DocumentGroupFilter, jsonSerializerOptions); - } - if (processParams.ProcessAuthOption.IsSet) - writer.WriteNumber("processAuth", processParams.ProcessAuthOption.Value!.Value); - - if (processParams.DeviceIdOption.IsSet) - writer.WriteNumber("deviceId", processParams.DeviceIdOption.Value!.Value); - - if (processParams.DeviceTypeOption.IsSet) - writer.WriteNumber("deviceType", processParams.DeviceTypeOption.Value!.Value); - - if (processParams.DeviceTypeHexOption.IsSet) - writer.WriteString("deviceTypeHex", processParams.DeviceTypeHex); - - if (processParams.IgnoreDeviceIdFromImageOption.IsSet) - writer.WriteBoolean("ignoreDeviceIdFromImage", processParams.IgnoreDeviceIdFromImageOption.Value!.Value); - - if (processParams.DocumentIdListOption.IsSet) - { - writer.WritePropertyName("documentIdList"); - JsonSerializer.Serialize(writer, processParams.DocumentIdList, jsonSerializerOptions); - } - if (processParams.RfidOption.IsSet) - { - writer.WritePropertyName("rfid"); - JsonSerializer.Serialize(writer, processParams.Rfid, jsonSerializerOptions); - } - if (processParams.CheckAuthOption.IsSet) - writer.WriteBoolean("checkAuth", processParams.CheckAuthOption.Value!.Value); - - if (processParams.AuthParamsOption.IsSet) - { - writer.WritePropertyName("authParams"); - JsonSerializer.Serialize(writer, processParams.AuthParams, jsonSerializerOptions); - } - if (processParams.MrzDetectModeOption.IsSet) - { - var mrzDetectModeRawValue = MrzDetectModeEnumValueConverter.ToJsonValue(processParams.MrzDetectMode!.Value); - writer.WriteNumber("mrzDetectMode", mrzDetectModeRawValue); - } - if (processParams.GenerateNumericCodesOption.IsSet) - writer.WriteBoolean("generateNumericCodes", processParams.GenerateNumericCodesOption.Value!.Value); - - if (processParams.StrictBarcodeDigitalSignatureCheckOption.IsSet) - writer.WriteBoolean("strictBarcodeDigitalSignatureCheck", processParams.StrictBarcodeDigitalSignatureCheckOption.Value!.Value); - - if (processParams.SelectLongestNamesOption.IsSet) - writer.WriteBoolean("selectLongestNames", processParams.SelectLongestNamesOption.Value!.Value); - - if (processParams.DoBarcodesOption.IsSet) - { - writer.WritePropertyName("doBarcodes"); - JsonSerializer.Serialize(writer, processParams.DoBarcodes, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs index c97241b..c21c584 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,46 +14,39 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Params for the RFID chip data reprocessing /// + [DataContract(Name = "ProcessParams_rfid")] public partial class ProcessParamsRfid : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// A list of notification codes that should be ignored during passive authentication (PA) - [JsonConstructor] - public ProcessParamsRfid(Option?> paSensitiveCodesDisable = default) + /// A list of notification codes that should be ignored during passive authentication (PA). + public ProcessParamsRfid(List paSensitiveCodesDisable = default(List)) { - PaSensitiveCodesDisableOption = paSensitiveCodesDisable; - OnCreated(); + this.PaSensitiveCodesDisable = paSensitiveCodesDisable; } - partial void OnCreated(); - - /// - /// Used to track the state of PaSensitiveCodesDisable - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> PaSensitiveCodesDisableOption { get; private set; } - /// /// A list of notification codes that should be ignored during passive authentication (PA) /// /// A list of notification codes that should be ignored during passive authentication (PA) - [JsonPropertyName("paSensitiveCodesDisable")] - public List? PaSensitiveCodesDisable { get { return this.PaSensitiveCodesDisableOption; } set { this.PaSensitiveCodesDisableOption = new(value); } } + [DataMember(Name = "paSensitiveCodesDisable", EmitDefaultValue = false)] + public List PaSensitiveCodesDisable { get; set; } /// /// Returns the string presentation of the object @@ -70,6 +61,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -81,93 +81,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ProcessParamsRfidJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ProcessParamsRfid Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> paSensitiveCodesDisable = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "paSensitiveCodesDisable": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - paSensitiveCodesDisable = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (paSensitiveCodesDisable.IsSet && paSensitiveCodesDisable.Value == null) - throw new ArgumentNullException(nameof(paSensitiveCodesDisable), "Property is not nullable for class ProcessParamsRfid."); - - return new ProcessParamsRfid(paSensitiveCodesDisable); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ProcessParamsRfid processParamsRfid, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, processParamsRfid, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ProcessParamsRfid processParamsRfid, JsonSerializerOptions jsonSerializerOptions) - { - if (processParamsRfid.PaSensitiveCodesDisableOption.IsSet && processParamsRfid.PaSensitiveCodesDisable == null) - throw new ArgumentNullException(nameof(processParamsRfid.PaSensitiveCodesDisable), "Property is required for class ProcessParamsRfid."); - - if (processParamsRfid.PaSensitiveCodesDisableOption.IsSet) - { - writer.WritePropertyName("paSensitiveCodesDisable"); - JsonSerializer.Serialize(writer, processParamsRfid.PaSensitiveCodesDisable, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs index 88c03f0..2cfb19b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,229 +14,159 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessRequest /// + [DataContract(Name = "ProcessRequest")] public partial class ProcessRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// processParam - /// list - /// Session ID - /// Customer name - /// Environment type - /// Live portrait photo - /// Portrait photo from an external source - /// containerList - /// systemInfo - /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. - /// Digital Travel Credential (DTC-VC) data in base64 format for processing - /// URLs to the document images for processing. - /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. - [JsonConstructor] - public ProcessRequest(ProcessParams processParam, Option?> list = default, Option tag = default, Option tenant = default, Option env = default, Option livePortrait = default, Option extPortrait = default, Option containerList = default, Option systemInfo = default, Option?> passBackObject = default, Option dtc = default, Option?> imageUrls = default, Option?> lcidFilter = default) + [JsonConstructorAttribute] + protected ProcessRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// processParam (required). + /// list. + /// Session ID. + /// Customer name. + /// Environment type. + /// Live portrait photo. + /// Portrait photo from an external source. + /// containerList. + /// systemInfo. + /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs.. + /// Digital Travel Credential (DTC-VC) data in base64 format for processing. + /// URLs to the document images for processing.. + /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default.. + public ProcessRequest(ProcessParams processParam = default(ProcessParams), List list = default(List), string tag = default(string), string tenant = default(string), string env = default(string), string livePortrait = default(string), string extPortrait = default(string), ContainerList containerList = default(ContainerList), ProcessSystemInfo systemInfo = default(ProcessSystemInfo), Dictionary passBackObject = default(Dictionary), string dtc = default(string), List imageUrls = default(List), List lcidFilter = default(List)) { - ProcessParam = processParam; - ListOption = list; - TagOption = tag; - TenantOption = tenant; - EnvOption = env; - LivePortraitOption = livePortrait; - ExtPortraitOption = extPortrait; - ContainerListOption = containerList; - SystemInfoOption = systemInfo; - PassBackObjectOption = passBackObject; - DtcOption = dtc; - ImageUrlsOption = imageUrls; - LcidFilterOption = lcidFilter; - OnCreated(); + // to ensure "processParam" is required (not null) + if (processParam == null) + { + throw new ArgumentNullException("processParam is a required property for ProcessRequest and cannot be null"); + } + this.ProcessParam = processParam; + this.List = list; + this.Tag = tag; + this.Tenant = tenant; + this.Env = env; + this.LivePortrait = livePortrait; + this.ExtPortrait = extPortrait; + this.ContainerList = containerList; + this.SystemInfo = systemInfo; + this.PassBackObject = passBackObject; + this.Dtc = dtc; + this.ImageUrls = imageUrls; + this.LcidFilter = lcidFilter; } - partial void OnCreated(); - /// /// Gets or Sets ProcessParam /// - [JsonPropertyName("processParam")] + [DataMember(Name = "processParam", IsRequired = true, EmitDefaultValue = true)] public ProcessParams ProcessParam { get; set; } - /// - /// Used to track the state of List - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ListOption { get; private set; } - /// /// Gets or Sets List /// - [JsonPropertyName("List")] - public List? List { get { return this.ListOption; } set { this.ListOption = new(value); } } - - /// - /// Used to track the state of Tag - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TagOption { get; private set; } + [DataMember(Name = "List", EmitDefaultValue = false)] + public List List { get; set; } /// /// Session ID /// /// Session ID - [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } - - /// - /// Used to track the state of Tenant - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TenantOption { get; private set; } + [DataMember(Name = "tag", EmitDefaultValue = false)] + public string Tag { get; set; } /// /// Customer name /// /// Customer name - [JsonPropertyName("tenant")] - public string? Tenant { get { return this.TenantOption; } set { this.TenantOption = new(value); } } - - /// - /// Used to track the state of Env - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option EnvOption { get; private set; } + [DataMember(Name = "tenant", EmitDefaultValue = false)] + public string Tenant { get; set; } /// /// Environment type /// /// Environment type - [JsonPropertyName("env")] - public string? Env { get { return this.EnvOption; } set { this.EnvOption = new(value); } } - - /// - /// Used to track the state of LivePortrait - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LivePortraitOption { get; private set; } + [DataMember(Name = "env", EmitDefaultValue = false)] + public string Env { get; set; } /// /// Live portrait photo /// /// Live portrait photo - /* Base64 encoded data */ - [JsonPropertyName("livePortrait")] - public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new(value); } } - - /// - /// Used to track the state of ExtPortrait - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ExtPortraitOption { get; private set; } + /* + Base64 encoded data + */ + [DataMember(Name = "livePortrait", EmitDefaultValue = false)] + public string LivePortrait { get; set; } /// /// Portrait photo from an external source /// /// Portrait photo from an external source - /* Base64 encoded data */ - [JsonPropertyName("extPortrait")] - public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new(value); } } - - /// - /// Used to track the state of ContainerList - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ContainerListOption { get; private set; } + /* + Base64 encoded data + */ + [DataMember(Name = "extPortrait", EmitDefaultValue = false)] + public string ExtPortrait { get; set; } /// /// Gets or Sets ContainerList /// - [JsonPropertyName("ContainerList")] - public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new(value); } } - - /// - /// Used to track the state of SystemInfo - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SystemInfoOption { get; private set; } + [DataMember(Name = "ContainerList", EmitDefaultValue = false)] + public ContainerList ContainerList { get; set; } /// /// Gets or Sets SystemInfo /// - [JsonPropertyName("systemInfo")] - public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } - - /// - /// Used to track the state of PassBackObject - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> PassBackObjectOption { get; private set; } + [DataMember(Name = "systemInfo", EmitDefaultValue = false)] + public ProcessSystemInfo SystemInfo { get; set; } /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. - [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } - - /// - /// Used to track the state of Dtc - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DtcOption { get; private set; } + [DataMember(Name = "passBackObject", EmitDefaultValue = false)] + public Dictionary PassBackObject { get; set; } /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing - [JsonPropertyName("dtc")] - public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new(value); } } - - /// - /// Used to track the state of ImageUrls - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ImageUrlsOption { get; private set; } + [DataMember(Name = "dtc", EmitDefaultValue = false)] + public string Dtc { get; set; } /// /// URLs to the document images for processing. /// /// URLs to the document images for processing. - [JsonPropertyName("ImageUrls")] - public List? ImageUrls { get { return this.ImageUrlsOption; } set { this.ImageUrlsOption = new(value); } } - - /// - /// Used to track the state of LcidFilter - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> LcidFilterOption { get; private set; } + [DataMember(Name = "ImageUrls", EmitDefaultValue = false)] + public List ImageUrls { get; set; } /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. - [JsonPropertyName("lcidFilter")] - public List? LcidFilter { get { return this.LcidFilterOption; } set { this.LcidFilterOption = new(value); } } + [DataMember(Name = "lcidFilter", EmitDefaultValue = false)] + public List LcidFilter { get; set; } /// /// Returns the string presentation of the object @@ -265,6 +193,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -276,267 +213,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ProcessRequestJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option processParam = default; - Option?> list = default; - Option tag = default; - Option tenant = default; - Option env = default; - Option livePortrait = default; - Option extPortrait = default; - Option containerList = default; - Option systemInfo = default; - Option?> passBackObject = default; - Option dtc = default; - Option?> imageUrls = default; - Option?> lcidFilter = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "processParam": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - processParam = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "tag": - tag = new Option(utf8JsonReader.GetString()!); - break; - case "tenant": - tenant = new Option(utf8JsonReader.GetString()!); - break; - case "env": - env = new Option(utf8JsonReader.GetString()!); - break; - case "livePortrait": - livePortrait = new Option(utf8JsonReader.GetString()!); - break; - case "extPortrait": - extPortrait = new Option(utf8JsonReader.GetString()!); - break; - case "ContainerList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - containerList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "systemInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - systemInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "passBackObject": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - passBackObject = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "dtc": - dtc = new Option(utf8JsonReader.GetString()!); - break; - case "ImageUrls": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - imageUrls = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "lcidFilter": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - lcidFilter = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!processParam.IsSet) - throw new ArgumentException("Property is required for class ProcessRequest.", nameof(processParam)); - - if (processParam.IsSet && processParam.Value == null) - throw new ArgumentNullException(nameof(processParam), "Property is not nullable for class ProcessRequest."); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class ProcessRequest."); - - if (tag.IsSet && tag.Value == null) - throw new ArgumentNullException(nameof(tag), "Property is not nullable for class ProcessRequest."); - - if (tenant.IsSet && tenant.Value == null) - throw new ArgumentNullException(nameof(tenant), "Property is not nullable for class ProcessRequest."); - - if (env.IsSet && env.Value == null) - throw new ArgumentNullException(nameof(env), "Property is not nullable for class ProcessRequest."); - - if (livePortrait.IsSet && livePortrait.Value == null) - throw new ArgumentNullException(nameof(livePortrait), "Property is not nullable for class ProcessRequest."); - - if (extPortrait.IsSet && extPortrait.Value == null) - throw new ArgumentNullException(nameof(extPortrait), "Property is not nullable for class ProcessRequest."); - - if (containerList.IsSet && containerList.Value == null) - throw new ArgumentNullException(nameof(containerList), "Property is not nullable for class ProcessRequest."); - - if (systemInfo.IsSet && systemInfo.Value == null) - throw new ArgumentNullException(nameof(systemInfo), "Property is not nullable for class ProcessRequest."); - - if (passBackObject.IsSet && passBackObject.Value == null) - throw new ArgumentNullException(nameof(passBackObject), "Property is not nullable for class ProcessRequest."); - - if (dtc.IsSet && dtc.Value == null) - throw new ArgumentNullException(nameof(dtc), "Property is not nullable for class ProcessRequest."); - - if (imageUrls.IsSet && imageUrls.Value == null) - throw new ArgumentNullException(nameof(imageUrls), "Property is not nullable for class ProcessRequest."); - - if (lcidFilter.IsSet && lcidFilter.Value == null) - throw new ArgumentNullException(nameof(lcidFilter), "Property is not nullable for class ProcessRequest."); - - return new ProcessRequest(processParam.Value!, list, tag, tenant, env, livePortrait, extPortrait, containerList, systemInfo, passBackObject, dtc, imageUrls, lcidFilter); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ProcessRequest processRequest, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, processRequest, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ProcessRequest processRequest, JsonSerializerOptions jsonSerializerOptions) - { - if (processRequest.ProcessParam == null) - throw new ArgumentNullException(nameof(processRequest.ProcessParam), "Property is required for class ProcessRequest."); - - if (processRequest.ListOption.IsSet && processRequest.List == null) - throw new ArgumentNullException(nameof(processRequest.List), "Property is required for class ProcessRequest."); - - if (processRequest.TagOption.IsSet && processRequest.Tag == null) - throw new ArgumentNullException(nameof(processRequest.Tag), "Property is required for class ProcessRequest."); - - if (processRequest.TenantOption.IsSet && processRequest.Tenant == null) - throw new ArgumentNullException(nameof(processRequest.Tenant), "Property is required for class ProcessRequest."); - - if (processRequest.EnvOption.IsSet && processRequest.Env == null) - throw new ArgumentNullException(nameof(processRequest.Env), "Property is required for class ProcessRequest."); - - if (processRequest.LivePortraitOption.IsSet && processRequest.LivePortrait == null) - throw new ArgumentNullException(nameof(processRequest.LivePortrait), "Property is required for class ProcessRequest."); - - if (processRequest.ExtPortraitOption.IsSet && processRequest.ExtPortrait == null) - throw new ArgumentNullException(nameof(processRequest.ExtPortrait), "Property is required for class ProcessRequest."); - - if (processRequest.ContainerListOption.IsSet && processRequest.ContainerList == null) - throw new ArgumentNullException(nameof(processRequest.ContainerList), "Property is required for class ProcessRequest."); - - if (processRequest.SystemInfoOption.IsSet && processRequest.SystemInfo == null) - throw new ArgumentNullException(nameof(processRequest.SystemInfo), "Property is required for class ProcessRequest."); - - if (processRequest.PassBackObjectOption.IsSet && processRequest.PassBackObject == null) - throw new ArgumentNullException(nameof(processRequest.PassBackObject), "Property is required for class ProcessRequest."); - - if (processRequest.DtcOption.IsSet && processRequest.Dtc == null) - throw new ArgumentNullException(nameof(processRequest.Dtc), "Property is required for class ProcessRequest."); - - if (processRequest.ImageUrlsOption.IsSet && processRequest.ImageUrls == null) - throw new ArgumentNullException(nameof(processRequest.ImageUrls), "Property is required for class ProcessRequest."); - - if (processRequest.LcidFilterOption.IsSet && processRequest.LcidFilter == null) - throw new ArgumentNullException(nameof(processRequest.LcidFilter), "Property is required for class ProcessRequest."); - - writer.WritePropertyName("processParam"); - JsonSerializer.Serialize(writer, processRequest.ProcessParam, jsonSerializerOptions); - if (processRequest.ListOption.IsSet) - { - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, processRequest.List, jsonSerializerOptions); - } - if (processRequest.TagOption.IsSet) - writer.WriteString("tag", processRequest.Tag); - - if (processRequest.TenantOption.IsSet) - writer.WriteString("tenant", processRequest.Tenant); - - if (processRequest.EnvOption.IsSet) - writer.WriteString("env", processRequest.Env); - - if (processRequest.LivePortraitOption.IsSet) - writer.WriteString("livePortrait", processRequest.LivePortrait); - - if (processRequest.ExtPortraitOption.IsSet) - writer.WriteString("extPortrait", processRequest.ExtPortrait); - - if (processRequest.ContainerListOption.IsSet) - { - writer.WritePropertyName("ContainerList"); - JsonSerializer.Serialize(writer, processRequest.ContainerList, jsonSerializerOptions); - } - if (processRequest.SystemInfoOption.IsSet) - { - writer.WritePropertyName("systemInfo"); - JsonSerializer.Serialize(writer, processRequest.SystemInfo, jsonSerializerOptions); - } - if (processRequest.PassBackObjectOption.IsSet) - { - writer.WritePropertyName("passBackObject"); - JsonSerializer.Serialize(writer, processRequest.PassBackObject, jsonSerializerOptions); - } - if (processRequest.DtcOption.IsSet) - writer.WriteString("dtc", processRequest.Dtc); - - if (processRequest.ImageUrlsOption.IsSet) - { - writer.WritePropertyName("ImageUrls"); - JsonSerializer.Serialize(writer, processRequest.ImageUrls, jsonSerializerOptions); - } - if (processRequest.LcidFilterOption.IsSet) - { - writer.WritePropertyName("lcidFilter"); - JsonSerializer.Serialize(writer, processRequest.LcidFilter, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs index 78210c7..ed47f9b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,76 +14,55 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessRequestImage /// + [DataContract(Name = "ProcessRequestImage")] public partial class ProcessRequestImage : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// imageData - /// light - /// page/image number - [JsonConstructor] - public ProcessRequestImage(Option imageData = default, Option light = default, Option pageIdx = default) - { - ImageDataOption = imageData; - LightOption = light; - PageIdxOption = pageIdx; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Used to track the state of Light - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LightOption { get; private set; } /// /// Gets or Sets Light /// - [JsonPropertyName("light")] - public Light? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } - + [DataMember(Name = "light", EmitDefaultValue = false)] + public Light? Light { get; set; } /// - /// Used to track the state of ImageData + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ImageDataOption { get; private set; } + /// imageData. + /// light. + /// page/image number. + public ProcessRequestImage(ImageData imageData = default(ImageData), Light? light = default(Light?), int pageIdx = default(int)) + { + this.ImageData = imageData; + this.Light = light; + this.PageIdx = pageIdx; + } /// /// Gets or Sets ImageData /// - [JsonPropertyName("ImageData")] - public ImageData? ImageData { get { return this.ImageDataOption; } set { this.ImageDataOption = new(value); } } - - /// - /// Used to track the state of PageIdx - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PageIdxOption { get; private set; } + [DataMember(Name = "ImageData", EmitDefaultValue = false)] + public ImageData ImageData { get; set; } /// /// page/image number /// /// page/image number - [JsonPropertyName("page_idx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } + [DataMember(Name = "page_idx", EmitDefaultValue = false)] + public int PageIdx { get; set; } /// /// Returns the string presentation of the object @@ -102,6 +79,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -113,117 +99,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ProcessRequestImageJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ProcessRequestImage Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option imageData = default; - Option light = default; - Option pageIdx = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ImageData": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - imageData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "light": - string? lightRawValue = utf8JsonReader.GetString(); - if (lightRawValue != null) - light = new Option(LightValueConverter.FromStringOrDefault(lightRawValue)); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (imageData.IsSet && imageData.Value == null) - throw new ArgumentNullException(nameof(imageData), "Property is not nullable for class ProcessRequestImage."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class ProcessRequestImage."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ProcessRequestImage."); - - return new ProcessRequestImage(imageData, light, pageIdx); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ProcessRequestImage processRequestImage, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, processRequestImage, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ProcessRequestImage processRequestImage, JsonSerializerOptions jsonSerializerOptions) - { - if (processRequestImage.ImageDataOption.IsSet && processRequestImage.ImageData == null) - throw new ArgumentNullException(nameof(processRequestImage.ImageData), "Property is required for class ProcessRequestImage."); - - if (processRequestImage.ImageDataOption.IsSet) - { - writer.WritePropertyName("ImageData"); - JsonSerializer.Serialize(writer, processRequestImage.ImageData, jsonSerializerOptions); - } - if (processRequestImage.LightOption.IsSet) - { - var lightRawValue = LightValueConverter.ToJsonValue(processRequestImage.Light!.Value); - writer.WriteNumber("light", lightRawValue); - } - if (processRequestImage.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", processRequestImage.PageIdxOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs index 8673324..ece138c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,141 +14,128 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessResponse /// + [DataContract(Name = "ProcessResponse")] public partial class ProcessResponse : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// chipPage - /// processingFinished - /// containerList - /// transactionInfo - /// morePagesAvailable - /// Time the document processing has taken, ms. - /// coreLibResultCode - /// Base64 encoded transaction processing log - /// Free-form object provided in request. See passBackObject property of ProcessRequest. - /// metadata - [JsonConstructor] - public ProcessResponse(RfidLocation chipPage, ProcessingStatus processingFinished, ContainerList containerList, TransactionInfo transactionInfo, int morePagesAvailable, int elapsedTime, Option coreLibResultCode = default, Option log = default, Option?> passBackObject = default, Option?> metadata = default) - { - ChipPage = chipPage; - ProcessingFinished = processingFinished; - ContainerList = containerList; - TransactionInfo = transactionInfo; - MorePagesAvailable = morePagesAvailable; - ElapsedTime = elapsedTime; - CoreLibResultCodeOption = coreLibResultCode; - LogOption = log; - PassBackObjectOption = passBackObject; - MetadataOption = metadata; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets ChipPage /// - [JsonPropertyName("ChipPage")] + [DataMember(Name = "ChipPage", IsRequired = true, EmitDefaultValue = true)] public RfidLocation ChipPage { get; set; } /// /// Gets or Sets ProcessingFinished /// - [JsonPropertyName("ProcessingFinished")] + [DataMember(Name = "ProcessingFinished", IsRequired = true, EmitDefaultValue = true)] public ProcessingStatus ProcessingFinished { get; set; } - - /// - /// Gets or Sets ContainerList - /// - [JsonPropertyName("ContainerList")] - public ContainerList ContainerList { get; set; } - - /// - /// Gets or Sets TransactionInfo - /// - [JsonPropertyName("TransactionInfo")] - public TransactionInfo TransactionInfo { get; set; } - /// - /// Gets or Sets MorePagesAvailable + /// Initializes a new instance of the class. /// - [JsonPropertyName("morePagesAvailable")] - public int MorePagesAvailable { get; set; } - + [JsonConstructorAttribute] + protected ProcessResponse() { } /// - /// Time the document processing has taken, ms. + /// Initializes a new instance of the class. /// - /// Time the document processing has taken, ms. - [JsonPropertyName("elapsedTime")] - public int ElapsedTime { get; set; } + /// chipPage (required). + /// coreLibResultCode. + /// processingFinished (required). + /// containerList (required). + /// transactionInfo (required). + /// Base64 encoded transaction processing log. + /// Free-form object provided in request. See passBackObject property of ProcessRequest.. + /// morePagesAvailable (required). + /// Time the document processing has taken, ms. (required). + /// metadata. + public ProcessResponse(RfidLocation chipPage = default(RfidLocation), int coreLibResultCode = default(int), ProcessingStatus processingFinished = default(ProcessingStatus), ContainerList containerList = default(ContainerList), TransactionInfo transactionInfo = default(TransactionInfo), string log = default(string), Dictionary passBackObject = default(Dictionary), int morePagesAvailable = default(int), int elapsedTime = default(int), Dictionary metadata = default(Dictionary)) + { + this.ChipPage = chipPage; + this.ProcessingFinished = processingFinished; + // to ensure "containerList" is required (not null) + if (containerList == null) + { + throw new ArgumentNullException("containerList is a required property for ProcessResponse and cannot be null"); + } + this.ContainerList = containerList; + // to ensure "transactionInfo" is required (not null) + if (transactionInfo == null) + { + throw new ArgumentNullException("transactionInfo is a required property for ProcessResponse and cannot be null"); + } + this.TransactionInfo = transactionInfo; + this.MorePagesAvailable = morePagesAvailable; + this.ElapsedTime = elapsedTime; + this.CoreLibResultCode = coreLibResultCode; + this.Log = log; + this.PassBackObject = passBackObject; + this.Metadata = metadata; + } /// - /// Used to track the state of CoreLibResultCode + /// Gets or Sets CoreLibResultCode /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CoreLibResultCodeOption { get; private set; } + [DataMember(Name = "CoreLibResultCode", EmitDefaultValue = false)] + public int CoreLibResultCode { get; set; } /// - /// Gets or Sets CoreLibResultCode + /// Gets or Sets ContainerList /// - [JsonPropertyName("CoreLibResultCode")] - public int? CoreLibResultCode { get { return this.CoreLibResultCodeOption; } set { this.CoreLibResultCodeOption = new(value); } } + [DataMember(Name = "ContainerList", IsRequired = true, EmitDefaultValue = true)] + public ContainerList ContainerList { get; set; } /// - /// Used to track the state of Log + /// Gets or Sets TransactionInfo /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LogOption { get; private set; } + [DataMember(Name = "TransactionInfo", IsRequired = true, EmitDefaultValue = true)] + public TransactionInfo TransactionInfo { get; set; } /// /// Base64 encoded transaction processing log /// /// Base64 encoded transaction processing log - [JsonPropertyName("log")] - public string? Log { get { return this.LogOption; } set { this.LogOption = new(value); } } + [DataMember(Name = "log", EmitDefaultValue = false)] + public string Log { get; set; } /// - /// Used to track the state of PassBackObject + /// Free-form object provided in request. See passBackObject property of ProcessRequest. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> PassBackObjectOption { get; private set; } + /// Free-form object provided in request. See passBackObject property of ProcessRequest. + [DataMember(Name = "passBackObject", EmitDefaultValue = false)] + public Dictionary PassBackObject { get; set; } /// - /// Free-form object provided in request. See passBackObject property of ProcessRequest. + /// Gets or Sets MorePagesAvailable /// - /// Free-form object provided in request. See passBackObject property of ProcessRequest. - [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } + [DataMember(Name = "morePagesAvailable", IsRequired = true, EmitDefaultValue = true)] + public int MorePagesAvailable { get; set; } /// - /// Used to track the state of Metadata + /// Time the document processing has taken, ms. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> MetadataOption { get; private set; } + /// Time the document processing has taken, ms. + [DataMember(Name = "elapsedTime", IsRequired = true, EmitDefaultValue = true)] + public int ElapsedTime { get; set; } /// /// Gets or Sets Metadata /// - [JsonPropertyName("metadata")] - public Dictionary? Metadata { get { return this.MetadataOption; } set { this.MetadataOption = new(value); } } + [DataMember(Name = "metadata", EmitDefaultValue = false)] + public Dictionary Metadata { get; set; } /// /// Returns the string presentation of the object @@ -161,19 +146,28 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class ProcessResponse {\n"); sb.Append(" ChipPage: ").Append(ChipPage).Append("\n"); + sb.Append(" CoreLibResultCode: ").Append(CoreLibResultCode).Append("\n"); sb.Append(" ProcessingFinished: ").Append(ProcessingFinished).Append("\n"); sb.Append(" ContainerList: ").Append(ContainerList).Append("\n"); sb.Append(" TransactionInfo: ").Append(TransactionInfo).Append("\n"); - sb.Append(" MorePagesAvailable: ").Append(MorePagesAvailable).Append("\n"); - sb.Append(" ElapsedTime: ").Append(ElapsedTime).Append("\n"); - sb.Append(" CoreLibResultCode: ").Append(CoreLibResultCode).Append("\n"); sb.Append(" Log: ").Append(Log).Append("\n"); sb.Append(" PassBackObject: ").Append(PassBackObject).Append("\n"); + sb.Append(" MorePagesAvailable: ").Append(MorePagesAvailable).Append("\n"); + sb.Append(" ElapsedTime: ").Append(ElapsedTime).Append("\n"); sb.Append(" Metadata: ").Append(Metadata).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -185,221 +179,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ProcessResponseJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ProcessResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option chipPage = default; - Option processingFinished = default; - Option containerList = default; - Option transactionInfo = default; - Option morePagesAvailable = default; - Option elapsedTime = default; - Option coreLibResultCode = default; - Option log = default; - Option?> passBackObject = default; - Option?> metadata = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ChipPage": - string? chipPageRawValue = utf8JsonReader.GetString(); - if (chipPageRawValue != null) - chipPage = new Option(RfidLocationValueConverter.FromStringOrDefault(chipPageRawValue)); - break; - case "ProcessingFinished": - string? processingFinishedRawValue = utf8JsonReader.GetString(); - if (processingFinishedRawValue != null) - processingFinished = new Option(ProcessingStatusValueConverter.FromStringOrDefault(processingFinishedRawValue)); - break; - case "ContainerList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - containerList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "TransactionInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - transactionInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "morePagesAvailable": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - morePagesAvailable = new Option(utf8JsonReader.GetInt32()); - break; - case "elapsedTime": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - elapsedTime = new Option(utf8JsonReader.GetInt32()); - break; - case "CoreLibResultCode": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - coreLibResultCode = new Option(utf8JsonReader.GetInt32()); - break; - case "log": - log = new Option(utf8JsonReader.GetString()!); - break; - case "passBackObject": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - passBackObject = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "metadata": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - metadata = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!chipPage.IsSet) - throw new ArgumentException("Property is required for class ProcessResponse.", nameof(chipPage)); - - if (!processingFinished.IsSet) - throw new ArgumentException("Property is required for class ProcessResponse.", nameof(processingFinished)); - - if (!containerList.IsSet) - throw new ArgumentException("Property is required for class ProcessResponse.", nameof(containerList)); - - if (!transactionInfo.IsSet) - throw new ArgumentException("Property is required for class ProcessResponse.", nameof(transactionInfo)); - - if (!morePagesAvailable.IsSet) - throw new ArgumentException("Property is required for class ProcessResponse.", nameof(morePagesAvailable)); - - if (!elapsedTime.IsSet) - throw new ArgumentException("Property is required for class ProcessResponse.", nameof(elapsedTime)); - - if (chipPage.IsSet && chipPage.Value == null) - throw new ArgumentNullException(nameof(chipPage), "Property is not nullable for class ProcessResponse."); - - if (processingFinished.IsSet && processingFinished.Value == null) - throw new ArgumentNullException(nameof(processingFinished), "Property is not nullable for class ProcessResponse."); - - if (containerList.IsSet && containerList.Value == null) - throw new ArgumentNullException(nameof(containerList), "Property is not nullable for class ProcessResponse."); - - if (transactionInfo.IsSet && transactionInfo.Value == null) - throw new ArgumentNullException(nameof(transactionInfo), "Property is not nullable for class ProcessResponse."); - - if (morePagesAvailable.IsSet && morePagesAvailable.Value == null) - throw new ArgumentNullException(nameof(morePagesAvailable), "Property is not nullable for class ProcessResponse."); - - if (elapsedTime.IsSet && elapsedTime.Value == null) - throw new ArgumentNullException(nameof(elapsedTime), "Property is not nullable for class ProcessResponse."); - - if (coreLibResultCode.IsSet && coreLibResultCode.Value == null) - throw new ArgumentNullException(nameof(coreLibResultCode), "Property is not nullable for class ProcessResponse."); - - if (log.IsSet && log.Value == null) - throw new ArgumentNullException(nameof(log), "Property is not nullable for class ProcessResponse."); - - if (passBackObject.IsSet && passBackObject.Value == null) - throw new ArgumentNullException(nameof(passBackObject), "Property is not nullable for class ProcessResponse."); - - if (metadata.IsSet && metadata.Value == null) - throw new ArgumentNullException(nameof(metadata), "Property is not nullable for class ProcessResponse."); - - return new ProcessResponse(chipPage.Value!.Value!, processingFinished.Value!.Value!, containerList.Value!, transactionInfo.Value!, morePagesAvailable.Value!.Value!, elapsedTime.Value!.Value!, coreLibResultCode, log, passBackObject, metadata); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ProcessResponse processResponse, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, processResponse, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ProcessResponse processResponse, JsonSerializerOptions jsonSerializerOptions) - { - if (processResponse.ContainerList == null) - throw new ArgumentNullException(nameof(processResponse.ContainerList), "Property is required for class ProcessResponse."); - - if (processResponse.TransactionInfo == null) - throw new ArgumentNullException(nameof(processResponse.TransactionInfo), "Property is required for class ProcessResponse."); - - if (processResponse.LogOption.IsSet && processResponse.Log == null) - throw new ArgumentNullException(nameof(processResponse.Log), "Property is required for class ProcessResponse."); - - if (processResponse.PassBackObjectOption.IsSet && processResponse.PassBackObject == null) - throw new ArgumentNullException(nameof(processResponse.PassBackObject), "Property is required for class ProcessResponse."); - - if (processResponse.MetadataOption.IsSet && processResponse.Metadata == null) - throw new ArgumentNullException(nameof(processResponse.Metadata), "Property is required for class ProcessResponse."); - - var chipPageRawValue = RfidLocationValueConverter.ToJsonValue(processResponse.ChipPage); - writer.WriteNumber("ChipPage", chipPageRawValue); - - var processingFinishedRawValue = ProcessingStatusValueConverter.ToJsonValue(processResponse.ProcessingFinished); - writer.WriteNumber("ProcessingFinished", processingFinishedRawValue); - - writer.WritePropertyName("ContainerList"); - JsonSerializer.Serialize(writer, processResponse.ContainerList, jsonSerializerOptions); - writer.WritePropertyName("TransactionInfo"); - JsonSerializer.Serialize(writer, processResponse.TransactionInfo, jsonSerializerOptions); - writer.WriteNumber("morePagesAvailable", processResponse.MorePagesAvailable); - - writer.WriteNumber("elapsedTime", processResponse.ElapsedTime); - - if (processResponse.CoreLibResultCodeOption.IsSet) - writer.WriteNumber("CoreLibResultCode", processResponse.CoreLibResultCodeOption.Value!.Value); - - if (processResponse.LogOption.IsSet) - writer.WriteString("log", processResponse.Log); - - if (processResponse.PassBackObjectOption.IsSet) - { - writer.WritePropertyName("passBackObject"); - JsonSerializer.Serialize(writer, processResponse.PassBackObject, jsonSerializerOptions); - } - if (processResponse.MetadataOption.IsSet) - { - writer.WritePropertyName("metadata"); - JsonSerializer.Serialize(writer, processResponse.Metadata, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs index 536efcb..2d60a4f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,62 +14,48 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ProcessSystemInfo /// + [DataContract(Name = "ProcessSystemInfo")] public partial class ProcessSystemInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Base64 encoded license file - /// For internal use. Demo-sites recaptcha token. - [JsonConstructor] - public ProcessSystemInfo(Option license = default, Option recaptchaToken = default) + /// Base64 encoded license file. + /// For internal use. Demo-sites recaptcha token.. + public ProcessSystemInfo(string license = default(string), string recaptchaToken = default(string)) { - LicenseOption = license; - RecaptchaTokenOption = recaptchaToken; - OnCreated(); + this.License = license; + this.RecaptchaToken = recaptchaToken; } - partial void OnCreated(); - - /// - /// Used to track the state of License - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LicenseOption { get; private set; } - /// /// Base64 encoded license file /// /// Base64 encoded license file - [JsonPropertyName("license")] - public string? License { get { return this.LicenseOption; } set { this.LicenseOption = new(value); } } - - /// - /// Used to track the state of RecaptchaToken - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RecaptchaTokenOption { get; private set; } + [DataMember(Name = "license", EmitDefaultValue = false)] + public string License { get; set; } /// /// For internal use. Demo-sites recaptcha token. /// /// For internal use. Demo-sites recaptcha token. - [JsonPropertyName("recaptcha_token")] - public string? RecaptchaToken { get { return this.RecaptchaTokenOption; } set { this.RecaptchaTokenOption = new(value); } } + [DataMember(Name = "recaptcha_token", EmitDefaultValue = false)] + public string RecaptchaToken { get; set; } /// /// Returns the string presentation of the object @@ -87,6 +71,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -98,102 +91,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ProcessSystemInfoJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ProcessSystemInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option license = default; - Option recaptchaToken = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "license": - license = new Option(utf8JsonReader.GetString()!); - break; - case "recaptcha_token": - recaptchaToken = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (license.IsSet && license.Value == null) - throw new ArgumentNullException(nameof(license), "Property is not nullable for class ProcessSystemInfo."); - - if (recaptchaToken.IsSet && recaptchaToken.Value == null) - throw new ArgumentNullException(nameof(recaptchaToken), "Property is not nullable for class ProcessSystemInfo."); - - return new ProcessSystemInfo(license, recaptchaToken); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ProcessSystemInfo processSystemInfo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, processSystemInfo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ProcessSystemInfo processSystemInfo, JsonSerializerOptions jsonSerializerOptions) - { - if (processSystemInfo.LicenseOption.IsSet && processSystemInfo.License == null) - throw new ArgumentNullException(nameof(processSystemInfo.License), "Property is required for class ProcessSystemInfo."); - - if (processSystemInfo.RecaptchaTokenOption.IsSet && processSystemInfo.RecaptchaToken == null) - throw new ArgumentNullException(nameof(processSystemInfo.RecaptchaToken), "Property is required for class ProcessSystemInfo."); - - if (processSystemInfo.LicenseOption.IsSet) - writer.WriteString("license", processSystemInfo.License); - - if (processSystemInfo.RecaptchaTokenOption.IsSet) - writer.WriteString("recaptcha_token", processSystemInfo.RecaptchaToken); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs index 719ded0..9c471d0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessingStatus.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -46,135 +47,4 @@ public enum ProcessingStatus TIMEOUT = 2 } - /// - /// Converts to and from the JSON value - /// - public static class ProcessingStatusValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static ProcessingStatus FromString(string value) - { - if (value.Equals((0).ToString())) - return ProcessingStatus.NOT_FINISHED; - - if (value.Equals((1).ToString())) - return ProcessingStatus.FINISHED; - - if (value.Equals((2).ToString())) - return ProcessingStatus.TIMEOUT; - - throw new NotImplementedException($"Could not convert value to type ProcessingStatus: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static ProcessingStatus? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return ProcessingStatus.NOT_FINISHED; - - if (value.Equals((1).ToString())) - return ProcessingStatus.FINISHED; - - if (value.Equals((2).ToString())) - return ProcessingStatus.TIMEOUT; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(ProcessingStatus value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class ProcessingStatusJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override ProcessingStatus Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - ProcessingStatus? result = rawValue == null - ? null - : ProcessingStatusValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the ProcessingStatus to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ProcessingStatus processingStatus, JsonSerializerOptions options) - { - writer.WriteStringValue(processingStatus.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class ProcessingStatusNullableJsonConverter : JsonConverter - { - /// - /// Returns a ProcessingStatus from the Json object - /// - /// - /// - /// - /// - public override ProcessingStatus? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - ProcessingStatus? result = rawValue == null - ? null - : ProcessingStatusValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ProcessingStatus? processingStatus, JsonSerializerOptions options) - { - writer.WriteStringValue(processingStatus?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs index c481e89..5f07a96 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,90 +14,81 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// RFIDDocVisualExtendedField /// + [DataContract(Name = "RFIDDocVisualExtendedField")] public partial class RFIDDocVisualExtendedField : VisualExtendedFieldItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// fieldType - /// wFieldType - /// Field symbolic name (null-terminated string) - /// Number of StringsResult array elements - /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. - /// Buf_Text text string length - /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' - /// originDG - /// Record index of the text field source in the data group - /// fieldMask - /// validity - /// inComparison - /// wLCID - /// reserved2 - /// reserved3 - /// originDGTag - /// originEntryView - [JsonConstructor] - public RFIDDocVisualExtendedField(int fieldType, TextFieldType wFieldType, string fieldName, decimal stringsCount, List stringsResult, decimal bufLength, string bufText, int originDG, decimal originTagEntry, Option fieldMask = default, Option validity = default, Option inComparison = default, Option wLCID = default, Option reserved2 = default, Option reserved3 = default, Option originDGTag = default, Option originEntryView = default) : base(fieldType, wFieldType, fieldName, stringsCount, stringsResult, bufLength, bufText, fieldMask, validity, inComparison, wLCID, reserved2, reserved3) + [JsonConstructorAttribute] + protected RFIDDocVisualExtendedField() { } + /// + /// Initializes a new instance of the class. + /// + /// originDG (required). + /// originDGTag. + /// Record index of the text field source in the data group (required). + /// originEntryView. + /// fieldType (required). + /// wFieldType (required). + /// Field symbolic name (null-terminated string) (required). + /// Number of StringsResult array elements (required). + /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. (required). + /// Buf_Text text string length (required). + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' (required). + /// fieldMask. + /// validity. + /// inComparison. + /// wLCID. + /// reserved2. + /// reserved3. + public RFIDDocVisualExtendedField(int originDG = default(int), int originDGTag = default(int), decimal originTagEntry = default(decimal), int originEntryView = default(int), int fieldType = default(int), TextFieldType wFieldType = default(TextFieldType), string fieldName = default(string), decimal stringsCount = default(decimal), List stringsResult = default(List), decimal bufLength = default(decimal), string bufText = default(string), string fieldMask = default(string), int validity = default(int), int inComparison = default(int), int wLCID = default(int), int reserved2 = default(int), int reserved3 = default(int)) : base(fieldType, wFieldType, fieldName, stringsCount, stringsResult, bufLength, bufText, fieldMask, validity, inComparison, wLCID, reserved2, reserved3) { - OriginDG = originDG; - OriginTagEntry = originTagEntry; - OriginDGTagOption = originDGTag; - OriginEntryViewOption = originEntryView; - OnCreated(); + this.OriginDG = originDG; + this.OriginTagEntry = originTagEntry; + this.OriginDGTag = originDGTag; + this.OriginEntryView = originEntryView; } - partial void OnCreated(); - /// /// Gets or Sets OriginDG /// - [JsonPropertyName("OriginDG")] + [DataMember(Name = "OriginDG", IsRequired = true, EmitDefaultValue = true)] public int OriginDG { get; set; } - /// - /// Record index of the text field source in the data group - /// - /// Record index of the text field source in the data group - [JsonPropertyName("OriginTagEntry")] - public decimal OriginTagEntry { get; set; } - - /// - /// Used to track the state of OriginDGTag - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OriginDGTagOption { get; private set; } - /// /// Gets or Sets OriginDGTag /// - [JsonPropertyName("OriginDGTag")] - public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new(value); } } + [DataMember(Name = "OriginDGTag", EmitDefaultValue = false)] + public int OriginDGTag { get; set; } /// - /// Used to track the state of OriginEntryView + /// Record index of the text field source in the data group /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OriginEntryViewOption { get; private set; } + /// Record index of the text field source in the data group + [DataMember(Name = "OriginTagEntry", IsRequired = true, EmitDefaultValue = true)] + public decimal OriginTagEntry { get; set; } /// /// Gets or Sets OriginEntryView /// - [JsonPropertyName("OriginEntryView")] - public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new(value); } } + [DataMember(Name = "OriginEntryView", EmitDefaultValue = false)] + public int OriginEntryView { get; set; } /// /// Returns the string presentation of the object @@ -109,302 +98,47 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RFIDDocVisualExtendedField {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" OriginDG: ").Append(OriginDG).Append("\n"); - sb.Append(" OriginTagEntry: ").Append(OriginTagEntry).Append("\n"); sb.Append(" OriginDGTag: ").Append(OriginDGTag).Append("\n"); + sb.Append(" OriginTagEntry: ").Append(OriginTagEntry).Append("\n"); sb.Append(" OriginEntryView: ").Append(OriginEntryView).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class RFIDDocVisualExtendedFieldJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override RFIDDocVisualExtendedField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldType = default; - Option wFieldType = default; - Option fieldName = default; - Option stringsCount = default; - Option?> stringsResult = default; - Option bufLength = default; - Option bufText = default; - Option originDG = default; - Option originTagEntry = default; - Option fieldMask = default; - Option validity = default; - Option inComparison = default; - Option wLCID = default; - Option reserved2 = default; - Option reserved3 = default; - Option originDGTag = default; - Option originEntryView = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldType = new Option(utf8JsonReader.GetInt32()); - break; - case "wFieldType": - string? wFieldTypeRawValue = utf8JsonReader.GetString(); - if (wFieldTypeRawValue != null) - wFieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(wFieldTypeRawValue)); - break; - case "FieldName": - fieldName = new Option(utf8JsonReader.GetString()!); - break; - case "StringsCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringsCount = new Option(utf8JsonReader.GetDecimal()); - break; - case "StringsResult": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringsResult = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Buf_Length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetDecimal()); - break; - case "Buf_Text": - bufText = new Option(utf8JsonReader.GetString()!); - break; - case "OriginDG": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originDG = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginTagEntry": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originTagEntry = new Option(utf8JsonReader.GetDecimal()); - break; - case "FieldMask": - fieldMask = new Option(utf8JsonReader.GetString()!); - break; - case "Validity": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - validity = new Option(utf8JsonReader.GetInt32()); - break; - case "InComparison": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - inComparison = new Option(utf8JsonReader.GetInt32()); - break; - case "wLCID": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - wLCID = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved3": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved3 = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginDGTag": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originDGTag = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginEntryView": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originEntryView = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(fieldType)); - - if (!wFieldType.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(wFieldType)); - - if (!fieldName.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(fieldName)); - - if (!stringsCount.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(stringsCount)); - - if (!stringsResult.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(stringsResult)); - - if (!bufLength.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(bufLength)); - - if (!bufText.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(bufText)); - - if (!originDG.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(originDG)); - - if (!originTagEntry.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedField.", nameof(originTagEntry)); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (wFieldType.IsSet && wFieldType.Value == null) - throw new ArgumentNullException(nameof(wFieldType), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (fieldName.IsSet && fieldName.Value == null) - throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (stringsCount.IsSet && stringsCount.Value == null) - throw new ArgumentNullException(nameof(stringsCount), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (stringsResult.IsSet && stringsResult.Value == null) - throw new ArgumentNullException(nameof(stringsResult), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (bufText.IsSet && bufText.Value == null) - throw new ArgumentNullException(nameof(bufText), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (originDG.IsSet && originDG.Value == null) - throw new ArgumentNullException(nameof(originDG), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (originTagEntry.IsSet && originTagEntry.Value == null) - throw new ArgumentNullException(nameof(originTagEntry), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (fieldMask.IsSet && fieldMask.Value == null) - throw new ArgumentNullException(nameof(fieldMask), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (validity.IsSet && validity.Value == null) - throw new ArgumentNullException(nameof(validity), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (inComparison.IsSet && inComparison.Value == null) - throw new ArgumentNullException(nameof(inComparison), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (wLCID.IsSet && wLCID.Value == null) - throw new ArgumentNullException(nameof(wLCID), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (reserved3.IsSet && reserved3.Value == null) - throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (originDGTag.IsSet && originDGTag.Value == null) - throw new ArgumentNullException(nameof(originDGTag), "Property is not nullable for class RFIDDocVisualExtendedField."); - - if (originEntryView.IsSet && originEntryView.Value == null) - throw new ArgumentNullException(nameof(originEntryView), "Property is not nullable for class RFIDDocVisualExtendedField."); - - return new RFIDDocVisualExtendedField(fieldType.Value!.Value!, wFieldType.Value!.Value!, fieldName.Value!, stringsCount.Value!.Value!, stringsResult.Value!, bufLength.Value!.Value!, bufText.Value!, originDG.Value!.Value!, originTagEntry.Value!.Value!, fieldMask, validity, inComparison, wLCID, reserved2, reserved3, originDGTag, originEntryView); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDDocVisualExtendedField rFIDDocVisualExtendedField, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, rFIDDocVisualExtendedField, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RFIDDocVisualExtendedField rFIDDocVisualExtendedField, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (rFIDDocVisualExtendedField.FieldName == null) - throw new ArgumentNullException(nameof(rFIDDocVisualExtendedField.FieldName), "Property is required for class RFIDDocVisualExtendedField."); - - if (rFIDDocVisualExtendedField.StringsResult == null) - throw new ArgumentNullException(nameof(rFIDDocVisualExtendedField.StringsResult), "Property is required for class RFIDDocVisualExtendedField."); - - if (rFIDDocVisualExtendedField.BufText == null) - throw new ArgumentNullException(nameof(rFIDDocVisualExtendedField.BufText), "Property is required for class RFIDDocVisualExtendedField."); - - if (rFIDDocVisualExtendedField.FieldMaskOption.IsSet && rFIDDocVisualExtendedField.FieldMask == null) - throw new ArgumentNullException(nameof(rFIDDocVisualExtendedField.FieldMask), "Property is required for class RFIDDocVisualExtendedField."); - - writer.WriteNumber("FieldType", rFIDDocVisualExtendedField.FieldType); - - var wFieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(rFIDDocVisualExtendedField.WFieldType); - writer.WriteNumber("wFieldType", wFieldTypeRawValue); - - writer.WriteString("FieldName", rFIDDocVisualExtendedField.FieldName); - - writer.WriteNumber("StringsCount", rFIDDocVisualExtendedField.StringsCount); - - writer.WritePropertyName("StringsResult"); - JsonSerializer.Serialize(writer, rFIDDocVisualExtendedField.StringsResult, jsonSerializerOptions); - writer.WriteNumber("Buf_Length", rFIDDocVisualExtendedField.BufLength); - - writer.WriteString("Buf_Text", rFIDDocVisualExtendedField.BufText); - - writer.WriteNumber("OriginDG", rFIDDocVisualExtendedField.OriginDG); - - writer.WriteNumber("OriginTagEntry", rFIDDocVisualExtendedField.OriginTagEntry); - - if (rFIDDocVisualExtendedField.FieldMaskOption.IsSet) - writer.WriteString("FieldMask", rFIDDocVisualExtendedField.FieldMask); - - if (rFIDDocVisualExtendedField.ValidityOption.IsSet) - writer.WriteNumber("Validity", rFIDDocVisualExtendedField.ValidityOption.Value!.Value); - - if (rFIDDocVisualExtendedField.InComparisonOption.IsSet) - writer.WriteNumber("InComparison", rFIDDocVisualExtendedField.InComparisonOption.Value!.Value); - - if (rFIDDocVisualExtendedField.WLCIDOption.IsSet) - writer.WriteNumber("wLCID", rFIDDocVisualExtendedField.WLCIDOption.Value!.Value); - - if (rFIDDocVisualExtendedField.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", rFIDDocVisualExtendedField.Reserved2Option.Value!.Value); - - if (rFIDDocVisualExtendedField.Reserved3Option.IsSet) - writer.WriteNumber("Reserved3", rFIDDocVisualExtendedField.Reserved3Option.Value!.Value); - - if (rFIDDocVisualExtendedField.OriginDGTagOption.IsSet) - writer.WriteNumber("OriginDGTag", rFIDDocVisualExtendedField.OriginDGTagOption.Value!.Value); - - if (rFIDDocVisualExtendedField.OriginEntryViewOption.IsSet) - writer.WriteNumber("OriginEntryView", rFIDDocVisualExtendedField.OriginEntryViewOption.Value!.Value); + foreach (var x in BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs index 3857dd8..6fea30b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,77 +14,68 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// RFIDDocVisualExtendedFieldItem /// + [DataContract(Name = "RFIDDocVisualExtendedFieldItem")] public partial class RFIDDocVisualExtendedFieldItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// originDG - /// Record index of the text field source in the data group - /// originDGTag - /// originEntryView - [JsonConstructor] - public RFIDDocVisualExtendedFieldItem(int originDG, decimal originTagEntry, Option originDGTag = default, Option originEntryView = default) + [JsonConstructorAttribute] + protected RFIDDocVisualExtendedFieldItem() { } + /// + /// Initializes a new instance of the class. + /// + /// originDG (required). + /// originDGTag. + /// Record index of the text field source in the data group (required). + /// originEntryView. + public RFIDDocVisualExtendedFieldItem(int originDG = default(int), int originDGTag = default(int), decimal originTagEntry = default(decimal), int originEntryView = default(int)) { - OriginDG = originDG; - OriginTagEntry = originTagEntry; - OriginDGTagOption = originDGTag; - OriginEntryViewOption = originEntryView; - OnCreated(); + this.OriginDG = originDG; + this.OriginTagEntry = originTagEntry; + this.OriginDGTag = originDGTag; + this.OriginEntryView = originEntryView; } - partial void OnCreated(); - /// /// Gets or Sets OriginDG /// - [JsonPropertyName("OriginDG")] + [DataMember(Name = "OriginDG", IsRequired = true, EmitDefaultValue = true)] public int OriginDG { get; set; } - /// - /// Record index of the text field source in the data group - /// - /// Record index of the text field source in the data group - [JsonPropertyName("OriginTagEntry")] - public decimal OriginTagEntry { get; set; } - - /// - /// Used to track the state of OriginDGTag - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OriginDGTagOption { get; private set; } - /// /// Gets or Sets OriginDGTag /// - [JsonPropertyName("OriginDGTag")] - public int? OriginDGTag { get { return this.OriginDGTagOption; } set { this.OriginDGTagOption = new(value); } } + [DataMember(Name = "OriginDGTag", EmitDefaultValue = false)] + public int OriginDGTag { get; set; } /// - /// Used to track the state of OriginEntryView + /// Record index of the text field source in the data group /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OriginEntryViewOption { get; private set; } + /// Record index of the text field source in the data group + [DataMember(Name = "OriginTagEntry", IsRequired = true, EmitDefaultValue = true)] + public decimal OriginTagEntry { get; set; } /// /// Gets or Sets OriginEntryView /// - [JsonPropertyName("OriginEntryView")] - public int? OriginEntryView { get { return this.OriginEntryViewOption; } set { this.OriginEntryViewOption = new(value); } } + [DataMember(Name = "OriginEntryView", EmitDefaultValue = false)] + public int OriginEntryView { get; set; } /// /// Returns the string presentation of the object @@ -97,13 +86,22 @@ public override string ToString() StringBuilder sb = new StringBuilder(); sb.Append("class RFIDDocVisualExtendedFieldItem {\n"); sb.Append(" OriginDG: ").Append(OriginDG).Append("\n"); - sb.Append(" OriginTagEntry: ").Append(OriginTagEntry).Append("\n"); sb.Append(" OriginDGTag: ").Append(OriginDGTag).Append("\n"); + sb.Append(" OriginTagEntry: ").Append(OriginTagEntry).Append("\n"); sb.Append(" OriginEntryView: ").Append(OriginEntryView).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -115,124 +113,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RFIDDocVisualExtendedFieldItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RFIDDocVisualExtendedFieldItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option originDG = default; - Option originTagEntry = default; - Option originDGTag = default; - Option originEntryView = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "OriginDG": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originDG = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginTagEntry": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originTagEntry = new Option(utf8JsonReader.GetDecimal()); - break; - case "OriginDGTag": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originDGTag = new Option(utf8JsonReader.GetInt32()); - break; - case "OriginEntryView": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originEntryView = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!originDG.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedFieldItem.", nameof(originDG)); - - if (!originTagEntry.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedFieldItem.", nameof(originTagEntry)); - - if (originDG.IsSet && originDG.Value == null) - throw new ArgumentNullException(nameof(originDG), "Property is not nullable for class RFIDDocVisualExtendedFieldItem."); - - if (originTagEntry.IsSet && originTagEntry.Value == null) - throw new ArgumentNullException(nameof(originTagEntry), "Property is not nullable for class RFIDDocVisualExtendedFieldItem."); - - if (originDGTag.IsSet && originDGTag.Value == null) - throw new ArgumentNullException(nameof(originDGTag), "Property is not nullable for class RFIDDocVisualExtendedFieldItem."); - - if (originEntryView.IsSet && originEntryView.Value == null) - throw new ArgumentNullException(nameof(originEntryView), "Property is not nullable for class RFIDDocVisualExtendedFieldItem."); - - return new RFIDDocVisualExtendedFieldItem(originDG.Value!.Value!, originTagEntry.Value!.Value!, originDGTag, originEntryView); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDDocVisualExtendedFieldItem rFIDDocVisualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rFIDDocVisualExtendedFieldItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RFIDDocVisualExtendedFieldItem rFIDDocVisualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("OriginDG", rFIDDocVisualExtendedFieldItem.OriginDG); - - writer.WriteNumber("OriginTagEntry", rFIDDocVisualExtendedFieldItem.OriginTagEntry); - - if (rFIDDocVisualExtendedFieldItem.OriginDGTagOption.IsSet) - writer.WriteNumber("OriginDGTag", rFIDDocVisualExtendedFieldItem.OriginDGTagOption.Value!.Value); - - if (rFIDDocVisualExtendedFieldItem.OriginEntryViewOption.IsSet) - writer.WriteNumber("OriginEntryView", rFIDDocVisualExtendedFieldItem.OriginEntryViewOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs index 75b067f..5f8a2f4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,46 +14,56 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Container for extracted text fields. Fields are identified by type and language /// + [DataContract(Name = "RFIDDocVisualExtendedInfo")] public partial class RFIDDocVisualExtendedInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Number of pArrayFields array elements - /// pArrayFields - [JsonConstructor] - public RFIDDocVisualExtendedInfo(decimal nFields, List pArrayFields) + [JsonConstructorAttribute] + protected RFIDDocVisualExtendedInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// Number of pArrayFields array elements (required). + /// pArrayFields (required). + public RFIDDocVisualExtendedInfo(decimal nFields = default(decimal), List pArrayFields = default(List)) { - NFields = nFields; - PArrayFields = pArrayFields; - OnCreated(); + this.NFields = nFields; + // to ensure "pArrayFields" is required (not null) + if (pArrayFields == null) + { + throw new ArgumentNullException("pArrayFields is a required property for RFIDDocVisualExtendedInfo and cannot be null"); + } + this.PArrayFields = pArrayFields; } - partial void OnCreated(); - /// /// Number of pArrayFields array elements /// /// Number of pArrayFields array elements - [JsonPropertyName("nFields")] + [DataMember(Name = "nFields", IsRequired = true, EmitDefaultValue = true)] public decimal NFields { get; set; } /// /// Gets or Sets PArrayFields /// - [JsonPropertyName("pArrayFields")] + [DataMember(Name = "pArrayFields", IsRequired = true, EmitDefaultValue = true)] public List PArrayFields { get; set; } /// @@ -72,6 +80,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -83,106 +100,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RFIDDocVisualExtendedInfoJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RFIDDocVisualExtendedInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option nFields = default; - Option?> pArrayFields = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "nFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - nFields = new Option(utf8JsonReader.GetDecimal()); - break; - case "pArrayFields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pArrayFields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!nFields.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedInfo.", nameof(nFields)); - - if (!pArrayFields.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedInfo.", nameof(pArrayFields)); - - if (nFields.IsSet && nFields.Value == null) - throw new ArgumentNullException(nameof(nFields), "Property is not nullable for class RFIDDocVisualExtendedInfo."); - - if (pArrayFields.IsSet && pArrayFields.Value == null) - throw new ArgumentNullException(nameof(pArrayFields), "Property is not nullable for class RFIDDocVisualExtendedInfo."); - - return new RFIDDocVisualExtendedInfo(nFields.Value!.Value!, pArrayFields.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDDocVisualExtendedInfo rFIDDocVisualExtendedInfo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rFIDDocVisualExtendedInfo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RFIDDocVisualExtendedInfo rFIDDocVisualExtendedInfo, JsonSerializerOptions jsonSerializerOptions) - { - if (rFIDDocVisualExtendedInfo.PArrayFields == null) - throw new ArgumentNullException(nameof(rFIDDocVisualExtendedInfo.PArrayFields), "Property is required for class RFIDDocVisualExtendedInfo."); - - writer.WriteNumber("nFields", rFIDDocVisualExtendedInfo.NFields); - - writer.WritePropertyName("pArrayFields"); - JsonSerializer.Serialize(writer, rFIDDocVisualExtendedInfo.PArrayFields, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs index b456a27..0b67952 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedInfoItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// RFIDDocVisualExtendedInfoItem /// + [DataContract(Name = "RFIDDocVisualExtendedInfoItem")] public partial class RFIDDocVisualExtendedInfoItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// docVisualExtendedInfo - [JsonConstructor] - public RFIDDocVisualExtendedInfoItem(RFIDDocVisualExtendedInfo docVisualExtendedInfo) + [JsonConstructorAttribute] + protected RFIDDocVisualExtendedInfoItem() { } + /// + /// Initializes a new instance of the class. + /// + /// docVisualExtendedInfo (required). + public RFIDDocVisualExtendedInfoItem(RFIDDocVisualExtendedInfo docVisualExtendedInfo = default(RFIDDocVisualExtendedInfo)) { - DocVisualExtendedInfo = docVisualExtendedInfo; - OnCreated(); + // to ensure "docVisualExtendedInfo" is required (not null) + if (docVisualExtendedInfo == null) + { + throw new ArgumentNullException("docVisualExtendedInfo is a required property for RFIDDocVisualExtendedInfoItem and cannot be null"); + } + this.DocVisualExtendedInfo = docVisualExtendedInfo; } - partial void OnCreated(); - /// /// Gets or Sets DocVisualExtendedInfo /// - [JsonPropertyName("DocVisualExtendedInfo")] + [DataMember(Name = "DocVisualExtendedInfo", IsRequired = true, EmitDefaultValue = true)] public RFIDDocVisualExtendedInfo DocVisualExtendedInfo { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RFIDDocVisualExtendedInfoItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RFIDDocVisualExtendedInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docVisualExtendedInfo = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocVisualExtendedInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docVisualExtendedInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!docVisualExtendedInfo.IsSet) - throw new ArgumentException("Property is required for class RFIDDocVisualExtendedInfoItem.", nameof(docVisualExtendedInfo)); - - if (docVisualExtendedInfo.IsSet && docVisualExtendedInfo.Value == null) - throw new ArgumentNullException(nameof(docVisualExtendedInfo), "Property is not nullable for class RFIDDocVisualExtendedInfoItem."); - - return new RFIDDocVisualExtendedInfoItem(docVisualExtendedInfo.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDDocVisualExtendedInfoItem rFIDDocVisualExtendedInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rFIDDocVisualExtendedInfoItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RFIDDocVisualExtendedInfoItem rFIDDocVisualExtendedInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - if (rFIDDocVisualExtendedInfoItem.DocVisualExtendedInfo == null) - throw new ArgumentNullException(nameof(rFIDDocVisualExtendedInfoItem.DocVisualExtendedInfo), "Property is required for class RFIDDocVisualExtendedInfoItem."); - - writer.WritePropertyName("DocVisualExtendedInfo"); - JsonSerializer.Serialize(writer, rFIDDocVisualExtendedInfoItem.DocVisualExtendedInfo, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs index 5d7f8b3..7ee55c0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDErrorCodes.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -602,801 +603,4 @@ public enum RFIDErrorCodes: long RFID_ERROR_ALREADY_DONE = 2 } - /// - /// Converts to and from the JSON value - /// - public static class RFIDErrorCodesValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RFIDErrorCodes FromString(string value) - { - if (value.Equals((2147508866).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_EOF1; - - if (value.Equals((2147508867).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_DEACTIVATED; - - if (value.Equals((2147509184).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_BLOCKED; - - if (value.Equals((2147509185).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_SUSPEND; - - if (value.Equals((2147510659).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_BLOCKED2; - - if (value.Equals((2147510660).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_DEACTIVATED2; - - if (value.Equals((2147510661).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_SUSPEND2; - - if (value.Equals((2147510912).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_INCORRECT_PARAMS; - - if (value.Equals((2147510914).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_NOT_FOUND; - - if (value.Equals((2147510920).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_NO_REFERENCE_DATA; - - if (value.Equals((2147511040).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_EOF2; - - if (value.Equals((2147549185).ToString())) - return RFIDErrorCodes.RFID_ERROR_NO_CHIP_DETECTED; - - if (value.Equals((2147549186).ToString())) - return RFIDErrorCodes.RFID_ERROR_NOT_AVAILABLE; - - if (value.Equals((2147549188).ToString())) - return RFIDErrorCodes.RFID_ERROR_INVALID_PARAMETER; - - if (value.Equals((2147549189).ToString())) - return RFIDErrorCodes.RFID_ERROR_NOT_INITIALIZED; - - if (value.Equals((2147549190).ToString())) - return RFIDErrorCodes.RFID_ERROR_NOT_ENOUGH_MEMORY; - - if (value.Equals((2147549192).ToString())) - return RFIDErrorCodes.RFID_ERROR_INVALID_DIRECTORY; - - if (value.Equals((2147549193).ToString())) - return RFIDErrorCodes.RFID_ERROR_UNKNOWN_COMMAND; - - if (value.Equals((2147549194).ToString())) - return RFIDErrorCodes.RFID_ERROR_FILE_IO_ERROR; - - if (value.Equals((2147549195).ToString())) - return RFIDErrorCodes.RFID_ERROR_BUSY; - - if (value.Equals((2147549196).ToString())) - return RFIDErrorCodes.RFID_ERROR_OLD_FIRMWARE; - - if (value.Equals((2147614720).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_FAILED; - - if (value.Equals((2147614721).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_READER_NOT_AVAILABLE; - - if (value.Equals((2147614722).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_CANT_CONNECT_CARD; - - if (value.Equals((2147614723).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_CARD_IS_NOT_CONNECTED; - - if (value.Equals((2147614724).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_OPERATION_CANCELLED; - - if (value.Equals((2147614725).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_CARD_IS_BUSY; - - if (value.Equals((2147614726).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_FAILED_SCARD; - - if (value.Equals((2147614736).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_EXT_LE_FAILED; - - if (value.Equals((2148557760).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_FAILED; - - if (value.Equals((2197815296).ToString())) - return RFIDErrorCodes.RFID_ERROR_NOT_PERFORMED; - - if (value.Equals((2197815297).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_IS_CLOSED; - - if (value.Equals((2197815298).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_UNSUPPORTED_OPERATION; - - if (value.Equals((2197815312).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_UNKNOWN; - - if (value.Equals((2197815313).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_BAD_CERTIFICATE; - - if (value.Equals((2197815314).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_NOT_SET; - - if (value.Equals((2197815315).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PROCEDURE_TYPE_UNKNOWN; - - if (value.Equals((2197815316).ToString())) - return RFIDErrorCodes.RFID_ERROR_Session_Procedure_Type_Unsupported; - - if (value.Equals((2197815317).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PROCEDURE_TYPE_NOT_SET; - - if (value.Equals((2197815318).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_UNKNOWN_TYPE; - - if (value.Equals((2197815319).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_UNSUPPORTED_SM_TYPE; - - if (value.Equals((2197815320).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_SM_TYPE; - - if (value.Equals((2197815321).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_RESTRICTED; - - if (value.Equals((2197815322).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_DATA; - - if (value.Equals((2197815323).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_NOT_SET; - - if (value.Equals((2197815324).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PWD_MANAGEMENT_NOT_AUTHORIZED; - - if (value.Equals((2197815328).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_UNKNOWN_TYPE; - - if (value.Equals((2197815329).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_SM; - - if (value.Equals((2197815330).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_PACE; - - if (value.Equals((2197815331).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA_KEYS; - - if (value.Equals((2197815332).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_TA; - - if (value.Equals((2197815333).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA; - - if (value.Equals((2197815334).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_INCORRECT_OPTION_CA; - - if (value.Equals((2197815335).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_CA_FAILED; - - if (value.Equals((2197815336).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_TA_FAILED; - - if (value.Equals((2197815337).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_AA_FAILED; - - if (value.Equals((2197815338).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_RI_FAILED; - - if (value.Equals((2197815344).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PA_SIGNATURE_CHECK_FAILED; - - if (value.Equals((2197815345).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PA_HASH_CHECK_FAILED; - - if (value.Equals((2197815360).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_EXPIRY; - - if (value.Equals((2197815361).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_BIRTH; - - if (value.Equals((2197815362).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_COMMUNITY_ID; - - if (value.Equals((2197815376).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_REQUIRES_APP_SELECTION; - - if (value.Equals((2197815377).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_SET; - - if (value.Equals((2197815378).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_VERIFIED; - - if (value.Equals((2197815392).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_INCORRECT_DATA; - - if (value.Equals((2197880832).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_NOT_ENOUGH_DATA; - - if (value.Equals((2197946368).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_INCORRECT_DATA; - - if (value.Equals((2198011904).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_UNEXPECTED_DATA; - - if (value.Equals((2198077440).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CONTENTS_UNEXPECTED_DATA; - - if (value.Equals((2198142976).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_WRONG_TAG; - - if (value.Equals((2198208512).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CANT_USE_DATA; - - if (value.Equals((2198274048).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CANT_READ_DATA; - - if (value.Equals((2198339584).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_ACCESS_DENIED; - - if (value.Equals((2214592512).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_NO_ERROR; - - if (value.Equals((2214658048).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_TIME_OUT; - - if (value.Equals((2214723584).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_COLLISION; - - if (value.Equals((2214789120).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_CRC; - - if (value.Equals((2214854656).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_INTEGRITY; - - if (value.Equals((2214920192).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_LENGTH; - - if (value.Equals((2214985728).ToString())) - return RFIDErrorCodes.RFID_ERROR_Layer34_RFU; - - if (value.Equals((2215051264).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_COLLISION_TOO_MANY; - - if (value.Equals((2215116800).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_PROTOCOL_B; - - if (value.Equals((2215182336).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_CONTENTS; - - if (value.Equals((2215247872).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_PROTOCOL; - - if (value.Equals((2215313408).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_GLOBAL_TIME_OUT; - - if (value.Equals((2215378944).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_MIFARE_AUTH; - - if (value.Equals((2215444480).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_ERROR; - - if (value.Equals((2215510016).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_COLLISION; - - if (value.Equals((2215575552).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE; - - if (value.Equals((2248146944).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SECURITY_MANAGER; - - if (value.Equals((2248146945).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_APP_SELECTION_FAILURE; - - if (value.Equals((2248147200).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_MAC_FAIL; - - if (value.Equals((2248147201).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_ENC_FAIL; - - if (value.Equals((2248147202).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE; - - if (value.Equals((2248147203).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE_DATA; - - if (value.Equals((2248147456).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_8E_MISSING; - - if (value.Equals((2248147457).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_87_MISSING; - - if (value.Equals((2248147458).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_99_MISSING; - - if (value.Equals((2248147459).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_MAC_INCORRECT; - - if (value.Equals((2248147460).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_87_INCORRECT; - - if (value.Equals((2248147712).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_NON_TLV_RESPONSE_DATA; - - if (value.Equals((2248147713).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_WRONG_RND_ICC_LENGTH; - - if (value.Equals((2248147714).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_INT_AUTH_FAILURE; - - if (value.Equals((2248147715).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_KAT_FAILURE; - - if (value.Equals((2248147716).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_DST_FAILURE; - - if (value.Equals((2248147717).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PSO_CERTIFICATE_FAILURE; - - if (value.Equals((2248147718).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_AT_FAILURE; - - if (value.Equals((2248147719).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_GET_CHALLENGE_FAILURE; - - if (value.Equals((2248147720).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_EXT_AUTH_FAILURE; - - if (value.Equals((2248147721).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_GENERAL_AUTH_FAILURE; - - if (value.Equals((4294967295).ToString())) - return RFIDErrorCodes.RFID_ERROR_FAILED; - - if (value.Equals((1).ToString())) - return RFIDErrorCodes.RFID_ERROR_NO_ERROR; - - if (value.Equals((2).ToString())) - return RFIDErrorCodes.RFID_ERROR_ALREADY_DONE; - - throw new NotImplementedException($"Could not convert value to type RFIDErrorCodes: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RFIDErrorCodes? FromStringOrDefault(string value) - { - if (value.Equals((2147508866).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_EOF1; - - if (value.Equals((2147508867).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_DEACTIVATED; - - if (value.Equals((2147509184).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_BLOCKED; - - if (value.Equals((2147509185).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_SUSPEND; - - if (value.Equals((2147510659).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_BLOCKED2; - - if (value.Equals((2147510660).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_DEACTIVATED2; - - if (value.Equals((2147510661).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_SUSPEND2; - - if (value.Equals((2147510912).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_INCORRECT_PARAMS; - - if (value.Equals((2147510914).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_NOT_FOUND; - - if (value.Equals((2147510920).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_NO_REFERENCE_DATA; - - if (value.Equals((2147511040).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_FILE_EOF2; - - if (value.Equals((2147549185).ToString())) - return RFIDErrorCodes.RFID_ERROR_NO_CHIP_DETECTED; - - if (value.Equals((2147549186).ToString())) - return RFIDErrorCodes.RFID_ERROR_NOT_AVAILABLE; - - if (value.Equals((2147549188).ToString())) - return RFIDErrorCodes.RFID_ERROR_INVALID_PARAMETER; - - if (value.Equals((2147549189).ToString())) - return RFIDErrorCodes.RFID_ERROR_NOT_INITIALIZED; - - if (value.Equals((2147549190).ToString())) - return RFIDErrorCodes.RFID_ERROR_NOT_ENOUGH_MEMORY; - - if (value.Equals((2147549192).ToString())) - return RFIDErrorCodes.RFID_ERROR_INVALID_DIRECTORY; - - if (value.Equals((2147549193).ToString())) - return RFIDErrorCodes.RFID_ERROR_UNKNOWN_COMMAND; - - if (value.Equals((2147549194).ToString())) - return RFIDErrorCodes.RFID_ERROR_FILE_IO_ERROR; - - if (value.Equals((2147549195).ToString())) - return RFIDErrorCodes.RFID_ERROR_BUSY; - - if (value.Equals((2147549196).ToString())) - return RFIDErrorCodes.RFID_ERROR_OLD_FIRMWARE; - - if (value.Equals((2147614720).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_FAILED; - - if (value.Equals((2147614721).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_READER_NOT_AVAILABLE; - - if (value.Equals((2147614722).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_CANT_CONNECT_CARD; - - if (value.Equals((2147614723).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_CARD_IS_NOT_CONNECTED; - - if (value.Equals((2147614724).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_OPERATION_CANCELLED; - - if (value.Equals((2147614725).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_CARD_IS_BUSY; - - if (value.Equals((2147614726).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_FAILED_SCARD; - - if (value.Equals((2147614736).ToString())) - return RFIDErrorCodes.RFID_ERROR_PCSC_EXT_LE_FAILED; - - if (value.Equals((2148557760).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PWD_FAILED; - - if (value.Equals((2197815296).ToString())) - return RFIDErrorCodes.RFID_ERROR_NOT_PERFORMED; - - if (value.Equals((2197815297).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_IS_CLOSED; - - if (value.Equals((2197815298).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_UNSUPPORTED_OPERATION; - - if (value.Equals((2197815312).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_UNKNOWN; - - if (value.Equals((2197815313).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_BAD_CERTIFICATE; - - if (value.Equals((2197815314).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_TERMINAL_TYPE_NOT_SET; - - if (value.Equals((2197815315).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PROCEDURE_TYPE_UNKNOWN; - - if (value.Equals((2197815316).ToString())) - return RFIDErrorCodes.RFID_ERROR_Session_Procedure_Type_Unsupported; - - if (value.Equals((2197815317).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PROCEDURE_TYPE_NOT_SET; - - if (value.Equals((2197815318).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_UNKNOWN_TYPE; - - if (value.Equals((2197815319).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_UNSUPPORTED_SM_TYPE; - - if (value.Equals((2197815320).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_SM_TYPE; - - if (value.Equals((2197815321).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_RESTRICTED; - - if (value.Equals((2197815322).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_INCORRECT_DATA; - - if (value.Equals((2197815323).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_KEY_NOT_SET; - - if (value.Equals((2197815324).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PWD_MANAGEMENT_NOT_AUTHORIZED; - - if (value.Equals((2197815328).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_UNKNOWN_TYPE; - - if (value.Equals((2197815329).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_SM; - - if (value.Equals((2197815330).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_PACE; - - if (value.Equals((2197815331).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA_KEYS; - - if (value.Equals((2197815332).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_TA; - - if (value.Equals((2197815333).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_REQUIRES_CA; - - if (value.Equals((2197815334).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_INCORRECT_OPTION_CA; - - if (value.Equals((2197815335).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_CA_FAILED; - - if (value.Equals((2197815336).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_TA_FAILED; - - if (value.Equals((2197815337).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_AA_FAILED; - - if (value.Equals((2197815338).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_ACCESS_CONTROL_RI_FAILED; - - if (value.Equals((2197815344).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PA_SIGNATURE_CHECK_FAILED; - - if (value.Equals((2197815345).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_PA_HASH_CHECK_FAILED; - - if (value.Equals((2197815360).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_EXPIRY; - - if (value.Equals((2197815361).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_DATE_OF_BIRTH; - - if (value.Equals((2197815362).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_INVALID_AUX_DATA_COMMUNITY_ID; - - if (value.Equals((2197815376).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_REQUIRES_APP_SELECTION; - - if (value.Equals((2197815377).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_SET; - - if (value.Equals((2197815378).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_E_SIGN_PIN_NOT_VERIFIED; - - if (value.Equals((2197815392).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_INCORRECT_DATA; - - if (value.Equals((2197880832).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_NOT_ENOUGH_DATA; - - if (value.Equals((2197946368).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_INCORRECT_DATA; - - if (value.Equals((2198011904).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_UNEXPECTED_DATA; - - if (value.Equals((2198077440).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CONTENTS_UNEXPECTED_DATA; - - if (value.Equals((2198142976).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_WRONG_TAG; - - if (value.Equals((2198208512).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CANT_USE_DATA; - - if (value.Equals((2198274048).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_CANT_READ_DATA; - - if (value.Equals((2198339584).ToString())) - return RFIDErrorCodes.RFID_ERROR_SESSION_FILE_ACCESS_DENIED; - - if (value.Equals((2214592512).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_NO_ERROR; - - if (value.Equals((2214658048).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_TIME_OUT; - - if (value.Equals((2214723584).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_COLLISION; - - if (value.Equals((2214789120).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_CRC; - - if (value.Equals((2214854656).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_INTEGRITY; - - if (value.Equals((2214920192).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_LENGTH; - - if (value.Equals((2214985728).ToString())) - return RFIDErrorCodes.RFID_ERROR_Layer34_RFU; - - if (value.Equals((2215051264).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_COLLISION_TOO_MANY; - - if (value.Equals((2215116800).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_PROTOCOL_B; - - if (value.Equals((2215182336).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_DATA_CONTENTS; - - if (value.Equals((2215247872).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_PROTOCOL; - - if (value.Equals((2215313408).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_GLOBAL_TIME_OUT; - - if (value.Equals((2215378944).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_MIFARE_AUTH; - - if (value.Equals((2215444480).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_ERROR; - - if (value.Equals((2215510016).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_COLLISION; - - if (value.Equals((2215575552).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE; - - if (value.Equals((2248146944).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SECURITY_MANAGER; - - if (value.Equals((2248146945).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_APP_SELECTION_FAILURE; - - if (value.Equals((2248147200).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_MAC_FAIL; - - if (value.Equals((2248147201).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_ENC_FAIL; - - if (value.Equals((2248147202).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE; - - if (value.Equals((2248147203).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MUTUAL_AUTH_FAILURE_DATA; - - if (value.Equals((2248147456).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_8E_MISSING; - - if (value.Equals((2248147457).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_87_MISSING; - - if (value.Equals((2248147458).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_99_MISSING; - - if (value.Equals((2248147459).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_MAC_INCORRECT; - - if (value.Equals((2248147460).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_SM_DO_87_INCORRECT; - - if (value.Equals((2248147712).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_NON_TLV_RESPONSE_DATA; - - if (value.Equals((2248147713).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_WRONG_RND_ICC_LENGTH; - - if (value.Equals((2248147714).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_INT_AUTH_FAILURE; - - if (value.Equals((2248147715).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_KAT_FAILURE; - - if (value.Equals((2248147716).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_DST_FAILURE; - - if (value.Equals((2248147717).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_PSO_CERTIFICATE_FAILURE; - - if (value.Equals((2248147718).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_MSE_SET_AT_FAILURE; - - if (value.Equals((2248147719).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_GET_CHALLENGE_FAILURE; - - if (value.Equals((2248147720).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_EXT_AUTH_FAILURE; - - if (value.Equals((2248147721).ToString())) - return RFIDErrorCodes.RFID_ERROR_LAYER6_GENERAL_AUTH_FAILURE; - - if (value.Equals((4294967295).ToString())) - return RFIDErrorCodes.RFID_ERROR_FAILED; - - if (value.Equals((1).ToString())) - return RFIDErrorCodes.RFID_ERROR_NO_ERROR; - - if (value.Equals((2).ToString())) - return RFIDErrorCodes.RFID_ERROR_ALREADY_DONE; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static long ToJsonValue(RFIDErrorCodes value) - { - return (long) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RFIDErrorCodesJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RFIDErrorCodes Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RFIDErrorCodes? result = rawValue == null - ? null - : RFIDErrorCodesValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RFIDErrorCodes to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDErrorCodes rFIDErrorCodes, JsonSerializerOptions options) - { - writer.WriteStringValue(rFIDErrorCodes.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RFIDErrorCodesNullableJsonConverter : JsonConverter - { - /// - /// Returns a RFIDErrorCodes from the Json object - /// - /// - /// - /// - /// - public override RFIDErrorCodes? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RFIDErrorCodes? result = rawValue == null - ? null - : RFIDErrorCodesValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDErrorCodes? rFIDErrorCodes, JsonSerializerOptions options) - { - writer.WriteStringValue(rFIDErrorCodes?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs index a301478..325d652 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// RFIDGraphicsInfoResult /// + [DataContract(Name = "RFIDGraphicsInfoResult")] public partial class RFIDGraphicsInfoResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// tOriginalRFIDGraphicsInfo - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public RFIDGraphicsInfoResult(TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected RFIDGraphicsInfoResult() { } + /// + /// Initializes a new instance of the class. + /// + /// tOriginalRFIDGraphicsInfo (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public RFIDGraphicsInfoResult(TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo = default(TOriginalRFIDGraphicsInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - TOriginalRFIDGraphicsInfo = tOriginalRFIDGraphicsInfo; - OnCreated(); + // to ensure "tOriginalRFIDGraphicsInfo" is required (not null) + if (tOriginalRFIDGraphicsInfo == null) + { + throw new ArgumentNullException("tOriginalRFIDGraphicsInfo is a required property for RFIDGraphicsInfoResult and cannot be null"); + } + this.TOriginalRFIDGraphicsInfo = tOriginalRFIDGraphicsInfo; } - partial void OnCreated(); - /// /// Gets or Sets TOriginalRFIDGraphicsInfo /// - [JsonPropertyName("TOriginalRFIDGraphicsInfo")] + [DataMember(Name = "TOriginalRFIDGraphicsInfo", IsRequired = true, EmitDefaultValue = true)] public TOriginalRFIDGraphicsInfo TOriginalRFIDGraphicsInfo { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RFIDGraphicsInfoResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" TOriginalRFIDGraphicsInfo: ").Append(TOriginalRFIDGraphicsInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class RFIDGraphicsInfoResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override RFIDGraphicsInfoResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option tOriginalRFIDGraphicsInfo = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "TOriginalRFIDGraphicsInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - tOriginalRFIDGraphicsInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!tOriginalRFIDGraphicsInfo.IsSet) - throw new ArgumentException("Property is required for class RFIDGraphicsInfoResult.", nameof(tOriginalRFIDGraphicsInfo)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class RFIDGraphicsInfoResult.", nameof(resultType)); - - if (tOriginalRFIDGraphicsInfo.IsSet && tOriginalRFIDGraphicsInfo.Value == null) - throw new ArgumentNullException(nameof(tOriginalRFIDGraphicsInfo), "Property is not nullable for class RFIDGraphicsInfoResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class RFIDGraphicsInfoResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class RFIDGraphicsInfoResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class RFIDGraphicsInfoResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class RFIDGraphicsInfoResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class RFIDGraphicsInfoResult."); - - return new RFIDGraphicsInfoResult(tOriginalRFIDGraphicsInfo.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDGraphicsInfoResult rFIDGraphicsInfoResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, rFIDGraphicsInfoResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RFIDGraphicsInfoResult rFIDGraphicsInfoResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (rFIDGraphicsInfoResult.TOriginalRFIDGraphicsInfo == null) - throw new ArgumentNullException(nameof(rFIDGraphicsInfoResult.TOriginalRFIDGraphicsInfo), "Property is required for class RFIDGraphicsInfoResult."); - - writer.WritePropertyName("TOriginalRFIDGraphicsInfo"); - JsonSerializer.Serialize(writer, rFIDGraphicsInfoResult.TOriginalRFIDGraphicsInfo, jsonSerializerOptions); - if (rFIDGraphicsInfoResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", rFIDGraphicsInfoResult.BufLengthOption.Value!.Value); - - if (rFIDGraphicsInfoResult.LightOption.IsSet) - writer.WriteNumber("light", rFIDGraphicsInfoResult.LightOption.Value!.Value); - - if (rFIDGraphicsInfoResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", rFIDGraphicsInfoResult.ListIdxOption.Value!.Value); - - if (rFIDGraphicsInfoResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", rFIDGraphicsInfoResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", rFIDGraphicsInfoResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs index b817f7e..b36346c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDPKDResourceType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -72,165 +73,4 @@ public enum RFIDPKDResourceType BL = 7 } - /// - /// Converts to and from the JSON value - /// - public static class RFIDPKDResourceTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RFIDPKDResourceType FromString(string value) - { - if (value.Equals((0).ToString())) - return RFIDPKDResourceType.CERTIFICATE_PA; - - if (value.Equals((1).ToString())) - return RFIDPKDResourceType.CERTIFICATE_TA; - - if (value.Equals((2).ToString())) - return RFIDPKDResourceType.LDIF; - - if (value.Equals((3).ToString())) - return RFIDPKDResourceType.CRL; - - if (value.Equals((4).ToString())) - return RFIDPKDResourceType.ML; - - if (value.Equals((5).ToString())) - return RFIDPKDResourceType.DEFL; - - if (value.Equals((6).ToString())) - return RFIDPKDResourceType.DEVL; - - if (value.Equals((7).ToString())) - return RFIDPKDResourceType.BL; - - throw new NotImplementedException($"Could not convert value to type RFIDPKDResourceType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RFIDPKDResourceType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RFIDPKDResourceType.CERTIFICATE_PA; - - if (value.Equals((1).ToString())) - return RFIDPKDResourceType.CERTIFICATE_TA; - - if (value.Equals((2).ToString())) - return RFIDPKDResourceType.LDIF; - - if (value.Equals((3).ToString())) - return RFIDPKDResourceType.CRL; - - if (value.Equals((4).ToString())) - return RFIDPKDResourceType.ML; - - if (value.Equals((5).ToString())) - return RFIDPKDResourceType.DEFL; - - if (value.Equals((6).ToString())) - return RFIDPKDResourceType.DEVL; - - if (value.Equals((7).ToString())) - return RFIDPKDResourceType.BL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RFIDPKDResourceType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RFIDPKDResourceTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RFIDPKDResourceType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RFIDPKDResourceType? result = rawValue == null - ? null - : RFIDPKDResourceTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RFIDPKDResourceType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDPKDResourceType rFIDPKDResourceType, JsonSerializerOptions options) - { - writer.WriteStringValue(rFIDPKDResourceType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RFIDPKDResourceTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RFIDPKDResourceType from the Json object - /// - /// - /// - /// - /// - public override RFIDPKDResourceType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RFIDPKDResourceType? result = rawValue == null - ? null - : RFIDPKDResourceTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDPKDResourceType? rFIDPKDResourceType, JsonSerializerOptions options) - { - writer.WriteStringValue(rFIDPKDResourceType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs index 575f4d3..28e410f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// RFIDTextDataResult /// + [DataContract(Name = "RFIDTextDataResult")] public partial class RFIDTextDataResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// docVisualExtendedInfo - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public RFIDTextDataResult(RFIDDocVisualExtendedInfo docVisualExtendedInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected RFIDTextDataResult() { } + /// + /// Initializes a new instance of the class. + /// + /// docVisualExtendedInfo (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public RFIDTextDataResult(RFIDDocVisualExtendedInfo docVisualExtendedInfo = default(RFIDDocVisualExtendedInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - DocVisualExtendedInfo = docVisualExtendedInfo; - OnCreated(); + // to ensure "docVisualExtendedInfo" is required (not null) + if (docVisualExtendedInfo == null) + { + throw new ArgumentNullException("docVisualExtendedInfo is a required property for RFIDTextDataResult and cannot be null"); + } + this.DocVisualExtendedInfo = docVisualExtendedInfo; } - partial void OnCreated(); - /// /// Gets or Sets DocVisualExtendedInfo /// - [JsonPropertyName("DocVisualExtendedInfo")] + [DataMember(Name = "DocVisualExtendedInfo", IsRequired = true, EmitDefaultValue = true)] public RFIDDocVisualExtendedInfo DocVisualExtendedInfo { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RFIDTextDataResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" DocVisualExtendedInfo: ").Append(DocVisualExtendedInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class RFIDTextDataResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override RFIDTextDataResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docVisualExtendedInfo = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocVisualExtendedInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docVisualExtendedInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!docVisualExtendedInfo.IsSet) - throw new ArgumentException("Property is required for class RFIDTextDataResult.", nameof(docVisualExtendedInfo)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class RFIDTextDataResult.", nameof(resultType)); - - if (docVisualExtendedInfo.IsSet && docVisualExtendedInfo.Value == null) - throw new ArgumentNullException(nameof(docVisualExtendedInfo), "Property is not nullable for class RFIDTextDataResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class RFIDTextDataResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class RFIDTextDataResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class RFIDTextDataResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class RFIDTextDataResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class RFIDTextDataResult."); - - return new RFIDTextDataResult(docVisualExtendedInfo.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RFIDTextDataResult rFIDTextDataResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, rFIDTextDataResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RFIDTextDataResult rFIDTextDataResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (rFIDTextDataResult.DocVisualExtendedInfo == null) - throw new ArgumentNullException(nameof(rFIDTextDataResult.DocVisualExtendedInfo), "Property is required for class RFIDTextDataResult."); - - writer.WritePropertyName("DocVisualExtendedInfo"); - JsonSerializer.Serialize(writer, rFIDTextDataResult.DocVisualExtendedInfo, jsonSerializerOptions); - if (rFIDTextDataResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", rFIDTextDataResult.BufLengthOption.Value!.Value); - - if (rFIDTextDataResult.LightOption.IsSet) - writer.WriteNumber("light", rFIDTextDataResult.LightOption.Value!.Value); - - if (rFIDTextDataResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", rFIDTextDataResult.ListIdxOption.Value!.Value); - - if (rFIDTextDataResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", rFIDTextDataResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", rFIDTextDataResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs index 69952fb..f77ab15 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// RawImageContainerItem /// + [DataContract(Name = "RawImageContainerItem")] public partial class RawImageContainerItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// rawImageContainer - [JsonConstructor] - public RawImageContainerItem(ImageData rawImageContainer) + [JsonConstructorAttribute] + protected RawImageContainerItem() { } + /// + /// Initializes a new instance of the class. + /// + /// rawImageContainer (required). + public RawImageContainerItem(ImageData rawImageContainer = default(ImageData)) { - RawImageContainer = rawImageContainer; - OnCreated(); + // to ensure "rawImageContainer" is required (not null) + if (rawImageContainer == null) + { + throw new ArgumentNullException("rawImageContainer is a required property for RawImageContainerItem and cannot be null"); + } + this.RawImageContainer = rawImageContainer; } - partial void OnCreated(); - /// /// Gets or Sets RawImageContainer /// - [JsonPropertyName("RawImageContainer")] + [DataMember(Name = "RawImageContainer", IsRequired = true, EmitDefaultValue = true)] public ImageData RawImageContainer { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RawImageContainerItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RawImageContainerItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option rawImageContainer = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RawImageContainer": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rawImageContainer = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!rawImageContainer.IsSet) - throw new ArgumentException("Property is required for class RawImageContainerItem.", nameof(rawImageContainer)); - - if (rawImageContainer.IsSet && rawImageContainer.Value == null) - throw new ArgumentNullException(nameof(rawImageContainer), "Property is not nullable for class RawImageContainerItem."); - - return new RawImageContainerItem(rawImageContainer.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RawImageContainerItem rawImageContainerItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rawImageContainerItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RawImageContainerItem rawImageContainerItem, JsonSerializerOptions jsonSerializerOptions) - { - if (rawImageContainerItem.RawImageContainer == null) - throw new ArgumentNullException(nameof(rawImageContainerItem.RawImageContainer), "Property is required for class RawImageContainerItem."); - - writer.WritePropertyName("RawImageContainer"); - JsonSerializer.Serialize(writer, rawImageContainerItem.RawImageContainer, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs index ee8f1ec..04a4977 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RawImageContainerList.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,55 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// RawImageContainerList /// + [DataContract(Name = "RawImageContainerList")] public partial class RawImageContainerList : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// count - /// images - [JsonConstructor] - public RawImageContainerList(int count, List images) + [JsonConstructorAttribute] + protected RawImageContainerList() { } + /// + /// Initializes a new instance of the class. + /// + /// count (required). + /// images (required). + public RawImageContainerList(int count = default(int), List images = default(List)) { - Count = count; - Images = images; - OnCreated(); + this.Count = count; + // to ensure "images" is required (not null) + if (images == null) + { + throw new ArgumentNullException("images is a required property for RawImageContainerList and cannot be null"); + } + this.Images = images; } - partial void OnCreated(); - /// /// Gets or Sets Count /// - [JsonPropertyName("Count")] + [DataMember(Name = "Count", IsRequired = true, EmitDefaultValue = true)] public int Count { get; set; } /// /// Gets or Sets Images /// - [JsonPropertyName("Images")] + [DataMember(Name = "Images", IsRequired = true, EmitDefaultValue = true)] public List Images { get; set; } /// @@ -71,6 +79,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -82,106 +99,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RawImageContainerListJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RawImageContainerList Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option count = default; - Option?> images = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Count": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - count = new Option(utf8JsonReader.GetInt32()); - break; - case "Images": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - images = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!count.IsSet) - throw new ArgumentException("Property is required for class RawImageContainerList.", nameof(count)); - - if (!images.IsSet) - throw new ArgumentException("Property is required for class RawImageContainerList.", nameof(images)); - - if (count.IsSet && count.Value == null) - throw new ArgumentNullException(nameof(count), "Property is not nullable for class RawImageContainerList."); - - if (images.IsSet && images.Value == null) - throw new ArgumentNullException(nameof(images), "Property is not nullable for class RawImageContainerList."); - - return new RawImageContainerList(count.Value!.Value!, images.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RawImageContainerList rawImageContainerList, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rawImageContainerList, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RawImageContainerList rawImageContainerList, JsonSerializerOptions jsonSerializerOptions) - { - if (rawImageContainerList.Images == null) - throw new ArgumentNullException(nameof(rawImageContainerList.Images), "Property is required for class RawImageContainerList."); - - writer.WriteNumber("Count", rawImageContainerList.Count); - - writer.WritePropertyName("Images"); - JsonSerializer.Serialize(writer, rawImageContainerList.Images, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs index 4d8e6ec..99904a9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RectangleCoordinates.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,61 +14,66 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Coordinates of the rectangle region on a document image(result type 1). Represented by two points - (left, top) + (right, bottom) /// + [DataContract(Name = "RectangleCoordinates")] public partial class RectangleCoordinates : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// left - /// top - /// right - /// bottom - [JsonConstructor] - public RectangleCoordinates(int left, int top, int right, int bottom) + [JsonConstructorAttribute] + protected RectangleCoordinates() { } + /// + /// Initializes a new instance of the class. + /// + /// left (required). + /// top (required). + /// right (required). + /// bottom (required). + public RectangleCoordinates(int left = default(int), int top = default(int), int right = default(int), int bottom = default(int)) { - Left = left; - Top = top; - Right = right; - Bottom = bottom; - OnCreated(); + this.Left = left; + this.Top = top; + this.Right = right; + this.Bottom = bottom; } - partial void OnCreated(); - /// /// Gets or Sets Left /// - [JsonPropertyName("left")] + [DataMember(Name = "left", IsRequired = true, EmitDefaultValue = true)] public int Left { get; set; } /// /// Gets or Sets Top /// - [JsonPropertyName("top")] + [DataMember(Name = "top", IsRequired = true, EmitDefaultValue = true)] public int Top { get; set; } /// /// Gets or Sets Right /// - [JsonPropertyName("right")] + [DataMember(Name = "right", IsRequired = true, EmitDefaultValue = true)] public int Right { get; set; } /// /// Gets or Sets Bottom /// - [JsonPropertyName("bottom")] + [DataMember(Name = "bottom", IsRequired = true, EmitDefaultValue = true)] public int Bottom { get; set; } /// @@ -89,6 +92,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -100,128 +112,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RectangleCoordinatesJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RectangleCoordinates Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option left = default; - Option top = default; - Option right = default; - Option bottom = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "left": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - left = new Option(utf8JsonReader.GetInt32()); - break; - case "top": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - top = new Option(utf8JsonReader.GetInt32()); - break; - case "right": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - right = new Option(utf8JsonReader.GetInt32()); - break; - case "bottom": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bottom = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!left.IsSet) - throw new ArgumentException("Property is required for class RectangleCoordinates.", nameof(left)); - - if (!top.IsSet) - throw new ArgumentException("Property is required for class RectangleCoordinates.", nameof(top)); - - if (!right.IsSet) - throw new ArgumentException("Property is required for class RectangleCoordinates.", nameof(right)); - - if (!bottom.IsSet) - throw new ArgumentException("Property is required for class RectangleCoordinates.", nameof(bottom)); - - if (left.IsSet && left.Value == null) - throw new ArgumentNullException(nameof(left), "Property is not nullable for class RectangleCoordinates."); - - if (top.IsSet && top.Value == null) - throw new ArgumentNullException(nameof(top), "Property is not nullable for class RectangleCoordinates."); - - if (right.IsSet && right.Value == null) - throw new ArgumentNullException(nameof(right), "Property is not nullable for class RectangleCoordinates."); - - if (bottom.IsSet && bottom.Value == null) - throw new ArgumentNullException(nameof(bottom), "Property is not nullable for class RectangleCoordinates."); - - return new RectangleCoordinates(left.Value!.Value!, top.Value!.Value!, right.Value!.Value!, bottom.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RectangleCoordinates rectangleCoordinates, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rectangleCoordinates, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RectangleCoordinates rectangleCoordinates, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("left", rectangleCoordinates.Left); - - writer.WriteNumber("top", rectangleCoordinates.Top); - - writer.WriteNumber("right", rectangleCoordinates.Right); - - writer.WriteNumber("bottom", rectangleCoordinates.Bottom); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Result.cs b/src/Regula.DocumentReader.WebClient/Model/Result.cs index 9931466..a69301e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Result.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Result.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -211,333 +212,4 @@ public enum Result DTC_VC = 109 } - /// - /// Converts to and from the JSON value - /// - public static class ResultValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static Result FromString(string value) - { - if (value.Equals((1).ToString())) - return Result.DOCUMENT_IMAGE; - - if (value.Equals((3).ToString())) - return Result.MRZ_TEXT; - - if (value.Equals((5).ToString())) - return Result.BARCODES; - - if (value.Equals((6).ToString())) - return Result.VISUAL_GRAPHICS; - - if (value.Equals((7).ToString())) - return Result.MRZ_TEST_QUALITY; - - if (value.Equals((8).ToString())) - return Result.DOCUMENT_TYPE_CANDIDATES; - - if (value.Equals((9).ToString())) - return Result.DOCUMENT_TYPE; - - if (value.Equals((15).ToString())) - return Result.LEXICAL_ANALYSIS; - - if (value.Equals((16).ToString())) - return Result.RAW_UNCROPPED_IMAGE; - - if (value.Equals((17).ToString())) - return Result.VISUAL_TEXT; - - if (value.Equals((18).ToString())) - return Result.BARCODE_TEXT; - - if (value.Equals((19).ToString())) - return Result.BARCODE_GRAPHICS; - - if (value.Equals((20).ToString())) - return Result.AUTHENTICITY; - - if (value.Equals((26).ToString())) - return Result.MAGNETIC_STRIPE_TEXT_DATA; - - if (value.Equals((30).ToString())) - return Result.IMAGE_QUALITY; - - if (value.Equals((32).ToString())) - return Result.LIVE_PORTRAIT; - - if (value.Equals((33).ToString())) - return Result.STATUS; - - if (value.Equals((34).ToString())) - return Result.PORTRAIT_COMPARISON; - - if (value.Equals((35).ToString())) - return Result.EXT_PORTRAIT; - - if (value.Equals((36).ToString())) - return Result.TEXT; - - if (value.Equals((37).ToString())) - return Result.IMAGES; - - if (value.Equals((38).ToString())) - return Result.FINGERPRINTS; - - if (value.Equals((39).ToString())) - return Result.FINGERPRINT_COMPARISON; - - if (value.Equals((49).ToString())) - return Result.ENCRYPTED_RCL; - - if (value.Equals((50).ToString())) - return Result.LICENSE; - - if (value.Equals((61).ToString())) - return Result.MRZ_POSITION; - - if (value.Equals((62).ToString())) - return Result.BARCODE_POSITION; - - if (value.Equals((85).ToString())) - return Result.DOCUMENT_POSITION; - - if (value.Equals((87).ToString())) - return Result.MRZ_DETECTOR; - - if (value.Equals((97).ToString())) - return Result.FACE_DETECTION; - - if (value.Equals((101).ToString())) - return Result.RFID_RAW_DATA; - - if (value.Equals((102).ToString())) - return Result.RFID_TEXT; - - if (value.Equals((103).ToString())) - return Result.RFID_GRAPHICS; - - if (value.Equals((104).ToString())) - return Result.RFID_BINARY_DATA; - - if (value.Equals((105).ToString())) - return Result.RFID_ORIGINAL_GRAPHICS; - - if (value.Equals((109).ToString())) - return Result.DTC_VC; - - throw new NotImplementedException($"Could not convert value to type Result: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static Result? FromStringOrDefault(string value) - { - if (value.Equals((1).ToString())) - return Result.DOCUMENT_IMAGE; - - if (value.Equals((3).ToString())) - return Result.MRZ_TEXT; - - if (value.Equals((5).ToString())) - return Result.BARCODES; - - if (value.Equals((6).ToString())) - return Result.VISUAL_GRAPHICS; - - if (value.Equals((7).ToString())) - return Result.MRZ_TEST_QUALITY; - - if (value.Equals((8).ToString())) - return Result.DOCUMENT_TYPE_CANDIDATES; - - if (value.Equals((9).ToString())) - return Result.DOCUMENT_TYPE; - - if (value.Equals((15).ToString())) - return Result.LEXICAL_ANALYSIS; - - if (value.Equals((16).ToString())) - return Result.RAW_UNCROPPED_IMAGE; - - if (value.Equals((17).ToString())) - return Result.VISUAL_TEXT; - - if (value.Equals((18).ToString())) - return Result.BARCODE_TEXT; - - if (value.Equals((19).ToString())) - return Result.BARCODE_GRAPHICS; - - if (value.Equals((20).ToString())) - return Result.AUTHENTICITY; - - if (value.Equals((26).ToString())) - return Result.MAGNETIC_STRIPE_TEXT_DATA; - - if (value.Equals((30).ToString())) - return Result.IMAGE_QUALITY; - - if (value.Equals((32).ToString())) - return Result.LIVE_PORTRAIT; - - if (value.Equals((33).ToString())) - return Result.STATUS; - - if (value.Equals((34).ToString())) - return Result.PORTRAIT_COMPARISON; - - if (value.Equals((35).ToString())) - return Result.EXT_PORTRAIT; - - if (value.Equals((36).ToString())) - return Result.TEXT; - - if (value.Equals((37).ToString())) - return Result.IMAGES; - - if (value.Equals((38).ToString())) - return Result.FINGERPRINTS; - - if (value.Equals((39).ToString())) - return Result.FINGERPRINT_COMPARISON; - - if (value.Equals((49).ToString())) - return Result.ENCRYPTED_RCL; - - if (value.Equals((50).ToString())) - return Result.LICENSE; - - if (value.Equals((61).ToString())) - return Result.MRZ_POSITION; - - if (value.Equals((62).ToString())) - return Result.BARCODE_POSITION; - - if (value.Equals((85).ToString())) - return Result.DOCUMENT_POSITION; - - if (value.Equals((87).ToString())) - return Result.MRZ_DETECTOR; - - if (value.Equals((97).ToString())) - return Result.FACE_DETECTION; - - if (value.Equals((101).ToString())) - return Result.RFID_RAW_DATA; - - if (value.Equals((102).ToString())) - return Result.RFID_TEXT; - - if (value.Equals((103).ToString())) - return Result.RFID_GRAPHICS; - - if (value.Equals((104).ToString())) - return Result.RFID_BINARY_DATA; - - if (value.Equals((105).ToString())) - return Result.RFID_ORIGINAL_GRAPHICS; - - if (value.Equals((109).ToString())) - return Result.DTC_VC; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(Result value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class ResultJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override Result Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Result? result = rawValue == null - ? null - : ResultValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the Result to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Result result, JsonSerializerOptions options) - { - writer.WriteStringValue(result.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class ResultNullableJsonConverter : JsonConverter - { - /// - /// Returns a Result from the Json object - /// - /// - /// - /// - /// - public override Result? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Result? result = rawValue == null - ? null - : ResultValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Result? result, JsonSerializerOptions options) - { - writer.WriteStringValue(result?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs index f13888b..272b652 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,98 +14,114 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Common fields for all result objects /// + [DataContract(Name = "ResultItem")] + [JsonConverter(typeof(JsonSubtypes), "ResultType")] + [JsonSubtypes.KnownSubType(typeof(DocumentImageResult), "1")] + [JsonSubtypes.KnownSubType(typeof(DocumentBinaryInfoResult), "101")] + [JsonSubtypes.KnownSubType(typeof(RFIDTextDataResult), "102")] + [JsonSubtypes.KnownSubType(typeof(GraphicsResult), "103")] + [JsonSubtypes.KnownSubType(typeof(DocumentBinaryInfoResult), "104")] + [JsonSubtypes.KnownSubType(typeof(RFIDGraphicsInfoResult), "105")] + [JsonSubtypes.KnownSubType(typeof(ByteArrayResult), "109")] + [JsonSubtypes.KnownSubType(typeof(LexicalAnalysisResult), "15")] + [JsonSubtypes.KnownSubType(typeof(DocumentImageResult), "16")] + [JsonSubtypes.KnownSubType(typeof(TextDataResult), "17")] + [JsonSubtypes.KnownSubType(typeof(TextDataResult), "18")] + [JsonSubtypes.KnownSubType(typeof(GraphicsResult), "19")] + [JsonSubtypes.KnownSubType(typeof(AuthenticityResult), "20")] + [JsonSubtypes.KnownSubType(typeof(TextDataResult), "26")] + [JsonSubtypes.KnownSubType(typeof(TextDataResult), "3")] + [JsonSubtypes.KnownSubType(typeof(ImageQualityResult), "30")] + [JsonSubtypes.KnownSubType(typeof(GraphicsResult), "32")] + [JsonSubtypes.KnownSubType(typeof(StatusResult), "33")] + [JsonSubtypes.KnownSubType(typeof(AuthenticityResult), "34")] + [JsonSubtypes.KnownSubType(typeof(GraphicsResult), "35")] + [JsonSubtypes.KnownSubType(typeof(TextResult), "36")] + [JsonSubtypes.KnownSubType(typeof(ImagesResult), "37")] + [JsonSubtypes.KnownSubType(typeof(GraphicsResult), "38")] + [JsonSubtypes.KnownSubType(typeof(AuthenticityResult), "39")] + [JsonSubtypes.KnownSubType(typeof(EncryptedRCLResult), "49")] + [JsonSubtypes.KnownSubType(typeof(DocBarCodeInfo), "5")] + [JsonSubtypes.KnownSubType(typeof(LicenseResult), "50")] + [JsonSubtypes.KnownSubType(typeof(GraphicsResult), "6")] + [JsonSubtypes.KnownSubType(typeof(MRZPositionResult), "61")] + [JsonSubtypes.KnownSubType(typeof(DocumentPositionResult), "62")] + [JsonSubtypes.KnownSubType(typeof(MRZTestQualityResult), "7")] + [JsonSubtypes.KnownSubType(typeof(DocumentTypesCandidatesResult), "8")] + [JsonSubtypes.KnownSubType(typeof(DocumentPositionResult), "85")] + [JsonSubtypes.KnownSubType(typeof(MRZDetectorResult), "87")] + [JsonSubtypes.KnownSubType(typeof(ChosenDocumentTypeResult), "9")] + [JsonSubtypes.KnownSubType(typeof(FaceDetectionResult), "97")] public partial class ResultItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public ResultItem(Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) - { - BufLengthOption = bufLength; - LightOption = light; - ListIdxOption = listIdx; - PageIdxOption = pageIdx; - ResultType = 0; - OnCreated(); - } - - partial void OnCreated(); - + [JsonConstructorAttribute] + protected ResultItem() { } /// - /// Used to track the state of BufLength + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BufLengthOption { get; private set; } + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public ResultItem(int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) + { + this.ResultType = resultType; + this.BufLength = bufLength; + this.Light = light; + this.ListIdx = listIdx; + this.PageIdx = pageIdx; + } /// /// Gets or Sets BufLength /// - [JsonPropertyName("buf_length")] - public int? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new(value); } } - - /// - /// Used to track the state of Light - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LightOption { get; private set; } + [DataMember(Name = "buf_length", EmitDefaultValue = false)] + public int BufLength { get; set; } /// /// Gets or Sets Light /// - [JsonPropertyName("light")] - public int? Light { get { return this.LightOption; } set { this.LightOption = new(value); } } - - /// - /// Used to track the state of ListIdx - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ListIdxOption { get; private set; } + [DataMember(Name = "light", EmitDefaultValue = false)] + public int Light { get; set; } /// /// Gets or Sets ListIdx /// - [JsonPropertyName("list_idx")] - public int? ListIdx { get { return this.ListIdxOption; } set { this.ListIdxOption = new(value); } } - - /// - /// Used to track the state of PageIdx - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PageIdxOption { get; private set; } + [DataMember(Name = "list_idx", EmitDefaultValue = false)] + public int ListIdx { get; set; } /// /// Gets or Sets PageIdx /// - [JsonPropertyName("page_idx")] - public int? PageIdx { get { return this.PageIdxOption; } set { this.PageIdxOption = new(value); } } + [DataMember(Name = "page_idx", EmitDefaultValue = false)] + public int PageIdx { get; set; } /// - /// The discriminator + /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public int ResultType { get; } + /// Same as Result type, but used for safe parsing of not-described values. See Result type. + [DataMember(Name = "result_type", IsRequired = true, EmitDefaultValue = true)] + public int ResultType { get; set; } /// /// Returns the string presentation of the object @@ -121,10 +135,20 @@ public override string ToString() sb.Append(" Light: ").Append(Light).Append("\n"); sb.Append(" ListIdx: ").Append(ListIdx).Append("\n"); sb.Append(" PageIdx: ").Append(PageIdx).Append("\n"); + sb.Append(" ResultType: ").Append(ResultType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -146,322 +170,4 @@ protected IEnumerable BaseValidate(ValidationContext validatio } } - /// - /// A Json converter for type - /// - public class ResultItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ResultItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - string? discriminator = ClientUtils.GetDiscriminator(utf8JsonReader, "result_type"); - - if (discriminator != null && discriminator.Equals("1")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("101")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("102")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("103")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("104")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("105")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("109")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("15")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("16")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("17")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("18")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("19")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("20")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("26")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("3")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("30")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("32")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("33")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("34")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("35")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("36")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("37")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("38")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("39")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("49")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("5")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("50")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("6")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("61")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("62")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("7")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("8")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("85")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("87")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("9")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - if (discriminator != null && discriminator.Equals("97")) - return JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions) ?? throw new JsonException("The result was an unexpected value."); - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class ResultItem.", nameof(resultType)); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class ResultItem."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class ResultItem."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class ResultItem."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class ResultItem."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class ResultItem."); - - return new ResultItem(bufLength, light, listIdx, pageIdx); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ResultItem resultItem, JsonSerializerOptions jsonSerializerOptions) - { - if (resultItem is AuthenticityResult authenticityResult){ - JsonSerializer.Serialize(writer, authenticityResult, jsonSerializerOptions); - return; - } - - if (resultItem is ByteArrayResult byteArrayResult){ - JsonSerializer.Serialize(writer, byteArrayResult, jsonSerializerOptions); - return; - } - - if (resultItem is ChosenDocumentTypeResult chosenDocumentTypeResult){ - JsonSerializer.Serialize(writer, chosenDocumentTypeResult, jsonSerializerOptions); - return; - } - - if (resultItem is DocBarCodeInfo docBarCodeInfo){ - JsonSerializer.Serialize(writer, docBarCodeInfo, jsonSerializerOptions); - return; - } - - if (resultItem is DocumentBinaryInfoResult documentBinaryInfoResult){ - JsonSerializer.Serialize(writer, documentBinaryInfoResult, jsonSerializerOptions); - return; - } - - if (resultItem is DocumentImageResult documentImageResult){ - JsonSerializer.Serialize(writer, documentImageResult, jsonSerializerOptions); - return; - } - - if (resultItem is DocumentPositionResult documentPositionResult){ - JsonSerializer.Serialize(writer, documentPositionResult, jsonSerializerOptions); - return; - } - - if (resultItem is DocumentTypesCandidatesResult documentTypesCandidatesResult){ - JsonSerializer.Serialize(writer, documentTypesCandidatesResult, jsonSerializerOptions); - return; - } - - if (resultItem is EncryptedRCLResult encryptedRCLResult){ - JsonSerializer.Serialize(writer, encryptedRCLResult, jsonSerializerOptions); - return; - } - - if (resultItem is FaceDetectionResult faceDetectionResult){ - JsonSerializer.Serialize(writer, faceDetectionResult, jsonSerializerOptions); - return; - } - - if (resultItem is GraphicsResult graphicsResult){ - JsonSerializer.Serialize(writer, graphicsResult, jsonSerializerOptions); - return; - } - - if (resultItem is ImageQualityResult imageQualityResult){ - JsonSerializer.Serialize(writer, imageQualityResult, jsonSerializerOptions); - return; - } - - if (resultItem is ImagesResult imagesResult){ - JsonSerializer.Serialize(writer, imagesResult, jsonSerializerOptions); - return; - } - - if (resultItem is LexicalAnalysisResult lexicalAnalysisResult){ - JsonSerializer.Serialize(writer, lexicalAnalysisResult, jsonSerializerOptions); - return; - } - - if (resultItem is LicenseResult licenseResult){ - JsonSerializer.Serialize(writer, licenseResult, jsonSerializerOptions); - return; - } - - if (resultItem is MRZDetectorResult mRZDetectorResult){ - JsonSerializer.Serialize(writer, mRZDetectorResult, jsonSerializerOptions); - return; - } - - if (resultItem is MRZPositionResult mRZPositionResult){ - JsonSerializer.Serialize(writer, mRZPositionResult, jsonSerializerOptions); - return; - } - - if (resultItem is MRZTestQualityResult mRZTestQualityResult){ - JsonSerializer.Serialize(writer, mRZTestQualityResult, jsonSerializerOptions); - return; - } - - if (resultItem is RFIDGraphicsInfoResult rFIDGraphicsInfoResult){ - JsonSerializer.Serialize(writer, rFIDGraphicsInfoResult, jsonSerializerOptions); - return; - } - - if (resultItem is RFIDTextDataResult rFIDTextDataResult){ - JsonSerializer.Serialize(writer, rFIDTextDataResult, jsonSerializerOptions); - return; - } - - if (resultItem is StatusResult statusResult){ - JsonSerializer.Serialize(writer, statusResult, jsonSerializerOptions); - return; - } - - if (resultItem is TextDataResult textDataResult){ - JsonSerializer.Serialize(writer, textDataResult, jsonSerializerOptions); - return; - } - - if (resultItem is TextResult textResult){ - JsonSerializer.Serialize(writer, textResult, jsonSerializerOptions); - return; - } - - writer.WriteStartObject(); - - WriteProperties(writer, resultItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ResultItem resultItem, JsonSerializerOptions jsonSerializerOptions) - { - if (resultItem.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", resultItem.BufLengthOption.Value!.Value); - - if (resultItem.LightOption.IsSet) - writer.WriteNumber("light", resultItem.LightOption.Value!.Value); - - if (resultItem.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", resultItem.ListIdxOption.Value!.Value); - - if (resultItem.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", resultItem.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", resultItem.ResultType); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs index 4eca59c..6b8ea31 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetector.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,61 +14,76 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ResultMRZDetector /// + [DataContract(Name = "ResultMRZDetector")] public partial class ResultMRZDetector : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// mRZFormat - /// mRZRows - /// mRZRowsNum - /// boundingQuadrangle - [JsonConstructor] - public ResultMRZDetector(int mRZFormat, List mRZRows, int mRZRowsNum, List boundingQuadrangle) + [JsonConstructorAttribute] + protected ResultMRZDetector() { } + /// + /// Initializes a new instance of the class. + /// + /// mRZFormat (required). + /// mRZRows (required). + /// mRZRowsNum (required). + /// boundingQuadrangle (required). + public ResultMRZDetector(int mRZFormat = default(int), List mRZRows = default(List), int mRZRowsNum = default(int), List boundingQuadrangle = default(List)) { - MRZFormat = mRZFormat; - MRZRows = mRZRows; - MRZRowsNum = mRZRowsNum; - BoundingQuadrangle = boundingQuadrangle; - OnCreated(); + this.MRZFormat = mRZFormat; + // to ensure "mRZRows" is required (not null) + if (mRZRows == null) + { + throw new ArgumentNullException("mRZRows is a required property for ResultMRZDetector and cannot be null"); + } + this.MRZRows = mRZRows; + this.MRZRowsNum = mRZRowsNum; + // to ensure "boundingQuadrangle" is required (not null) + if (boundingQuadrangle == null) + { + throw new ArgumentNullException("boundingQuadrangle is a required property for ResultMRZDetector and cannot be null"); + } + this.BoundingQuadrangle = boundingQuadrangle; } - partial void OnCreated(); - /// /// Gets or Sets MRZFormat /// - [JsonPropertyName("MRZFormat")] + [DataMember(Name = "MRZFormat", IsRequired = true, EmitDefaultValue = true)] public int MRZFormat { get; set; } /// /// Gets or Sets MRZRows /// - [JsonPropertyName("MRZRows")] + [DataMember(Name = "MRZRows", IsRequired = true, EmitDefaultValue = true)] public List MRZRows { get; set; } /// /// Gets or Sets MRZRowsNum /// - [JsonPropertyName("MRZRowsNum")] + [DataMember(Name = "MRZRowsNum", IsRequired = true, EmitDefaultValue = true)] public int MRZRowsNum { get; set; } /// /// Gets or Sets BoundingQuadrangle /// - [JsonPropertyName("boundingQuadrangle")] + [DataMember(Name = "boundingQuadrangle", IsRequired = true, EmitDefaultValue = true)] public List BoundingQuadrangle { get; set; } /// @@ -89,6 +102,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -100,135 +122,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ResultMRZDetectorJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ResultMRZDetector Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option mRZFormat = default; - Option?> mRZRows = default; - Option mRZRowsNum = default; - Option?> boundingQuadrangle = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "MRZFormat": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mRZFormat = new Option(utf8JsonReader.GetInt32()); - break; - case "MRZRows": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mRZRows = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "MRZRowsNum": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mRZRowsNum = new Option(utf8JsonReader.GetInt32()); - break; - case "boundingQuadrangle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - boundingQuadrangle = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!mRZFormat.IsSet) - throw new ArgumentException("Property is required for class ResultMRZDetector.", nameof(mRZFormat)); - - if (!mRZRows.IsSet) - throw new ArgumentException("Property is required for class ResultMRZDetector.", nameof(mRZRows)); - - if (!mRZRowsNum.IsSet) - throw new ArgumentException("Property is required for class ResultMRZDetector.", nameof(mRZRowsNum)); - - if (!boundingQuadrangle.IsSet) - throw new ArgumentException("Property is required for class ResultMRZDetector.", nameof(boundingQuadrangle)); - - if (mRZFormat.IsSet && mRZFormat.Value == null) - throw new ArgumentNullException(nameof(mRZFormat), "Property is not nullable for class ResultMRZDetector."); - - if (mRZRows.IsSet && mRZRows.Value == null) - throw new ArgumentNullException(nameof(mRZRows), "Property is not nullable for class ResultMRZDetector."); - - if (mRZRowsNum.IsSet && mRZRowsNum.Value == null) - throw new ArgumentNullException(nameof(mRZRowsNum), "Property is not nullable for class ResultMRZDetector."); - - if (boundingQuadrangle.IsSet && boundingQuadrangle.Value == null) - throw new ArgumentNullException(nameof(boundingQuadrangle), "Property is not nullable for class ResultMRZDetector."); - - return new ResultMRZDetector(mRZFormat.Value!.Value!, mRZRows.Value!, mRZRowsNum.Value!.Value!, boundingQuadrangle.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ResultMRZDetector resultMRZDetector, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, resultMRZDetector, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ResultMRZDetector resultMRZDetector, JsonSerializerOptions jsonSerializerOptions) - { - if (resultMRZDetector.MRZRows == null) - throw new ArgumentNullException(nameof(resultMRZDetector.MRZRows), "Property is required for class ResultMRZDetector."); - - if (resultMRZDetector.BoundingQuadrangle == null) - throw new ArgumentNullException(nameof(resultMRZDetector.BoundingQuadrangle), "Property is required for class ResultMRZDetector."); - - writer.WriteNumber("MRZFormat", resultMRZDetector.MRZFormat); - - writer.WritePropertyName("MRZRows"); - JsonSerializer.Serialize(writer, resultMRZDetector.MRZRows, jsonSerializerOptions); - writer.WriteNumber("MRZRowsNum", resultMRZDetector.MRZRowsNum); - - writer.WritePropertyName("boundingQuadrangle"); - JsonSerializer.Serialize(writer, resultMRZDetector.BoundingQuadrangle, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs index 93c6120..2fd061a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultMRZDetectorItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// ResultMRZDetectorItem /// + [DataContract(Name = "ResultMRZDetectorItem")] public partial class ResultMRZDetectorItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// resultMRZDetector - [JsonConstructor] - public ResultMRZDetectorItem(ResultMRZDetector resultMRZDetector) + [JsonConstructorAttribute] + protected ResultMRZDetectorItem() { } + /// + /// Initializes a new instance of the class. + /// + /// resultMRZDetector (required). + public ResultMRZDetectorItem(ResultMRZDetector resultMRZDetector = default(ResultMRZDetector)) { - ResultMRZDetector = resultMRZDetector; - OnCreated(); + // to ensure "resultMRZDetector" is required (not null) + if (resultMRZDetector == null) + { + throw new ArgumentNullException("resultMRZDetector is a required property for ResultMRZDetectorItem and cannot be null"); + } + this.ResultMRZDetector = resultMRZDetector; } - partial void OnCreated(); - /// /// Gets or Sets ResultMRZDetector /// - [JsonPropertyName("ResultMRZDetector")] + [DataMember(Name = "ResultMRZDetector", IsRequired = true, EmitDefaultValue = true)] public ResultMRZDetector ResultMRZDetector { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class ResultMRZDetectorItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override ResultMRZDetectorItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option resultMRZDetector = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ResultMRZDetector": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultMRZDetector = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!resultMRZDetector.IsSet) - throw new ArgumentException("Property is required for class ResultMRZDetectorItem.", nameof(resultMRZDetector)); - - if (resultMRZDetector.IsSet && resultMRZDetector.Value == null) - throw new ArgumentNullException(nameof(resultMRZDetector), "Property is not nullable for class ResultMRZDetectorItem."); - - return new ResultMRZDetectorItem(resultMRZDetector.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, ResultMRZDetectorItem resultMRZDetectorItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, resultMRZDetectorItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, ResultMRZDetectorItem resultMRZDetectorItem, JsonSerializerOptions jsonSerializerOptions) - { - if (resultMRZDetectorItem.ResultMRZDetector == null) - throw new ArgumentNullException(nameof(resultMRZDetectorItem.ResultMRZDetector), "Property is required for class ResultMRZDetectorItem."); - - writer.WritePropertyName("ResultMRZDetector"); - JsonSerializer.Serialize(writer, resultMRZDetectorItem.ResultMRZDetector, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs index 4f49783..b474426 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAChip.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -62,153 +63,4 @@ public enum RfidAChip MIFARE_PROX = 5 } - /// - /// Converts to and from the JSON value - /// - public static class RfidAChipValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidAChip FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidAChip.UNKNOWN; - - if (value.Equals((1).ToString())) - return RfidAChip.MIFARE_1K; - - if (value.Equals((2).ToString())) - return RfidAChip.MIFARE_4K; - - if (value.Equals((3).ToString())) - return RfidAChip.MIFARE_ULTRALIGHT; - - if (value.Equals((4).ToString())) - return RfidAChip.MIFARE_DES_FIRE; - - if (value.Equals((5).ToString())) - return RfidAChip.MIFARE_PROX; - - throw new NotImplementedException($"Could not convert value to type RfidAChip: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidAChip? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidAChip.UNKNOWN; - - if (value.Equals((1).ToString())) - return RfidAChip.MIFARE_1K; - - if (value.Equals((2).ToString())) - return RfidAChip.MIFARE_4K; - - if (value.Equals((3).ToString())) - return RfidAChip.MIFARE_ULTRALIGHT; - - if (value.Equals((4).ToString())) - return RfidAChip.MIFARE_DES_FIRE; - - if (value.Equals((5).ToString())) - return RfidAChip.MIFARE_PROX; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidAChip value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidAChipJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidAChip Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidAChip? result = rawValue == null - ? null - : RfidAChipValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidAChip to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAChip rfidAChip, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidAChip.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidAChipNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidAChip from the Json object - /// - /// - /// - /// - /// - public override RfidAChip? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidAChip? result = rawValue == null - ? null - : RfidAChipValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAChip? rfidAChip, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidAChip?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs index c47fe22..2193ea1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,87 +14,83 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the results of a single authentication procedure or a procedure of secure data access within the context of the communication session with electronic document /// + [DataContract(Name = "RfidAccessControlInfo")] public partial class RfidAccessControlInfo : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// type - /// status - /// List of remarks arisen during the procedure. - /// Index of the active variant of the procedure - /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document - [JsonConstructor] - public RfidAccessControlInfo(RfidAccessControlProcedureType type, RFIDErrorCodes status, List notifications, Option activeOptionIdx = default, Option?> accessControlOptions = default) - { - Type = type; - Status = status; - Notifications = notifications; - ActiveOptionIdxOption = activeOptionIdx; - AccessControlOptionsOption = accessControlOptions; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Type /// - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public RfidAccessControlProcedureType Type { get; set; } /// /// Gets or Sets Status /// - [JsonPropertyName("Status")] + [DataMember(Name = "Status", IsRequired = true, EmitDefaultValue = true)] public RFIDErrorCodes Status { get; set; } - /// - /// List of remarks arisen during the procedure. + /// Initializes a new instance of the class. /// - /// List of remarks arisen during the procedure. - [JsonPropertyName("Notifications")] - public List Notifications { get; set; } - + [JsonConstructorAttribute] + protected RfidAccessControlInfo() { } /// - /// Used to track the state of ActiveOptionIdx + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ActiveOptionIdxOption { get; private set; } + /// type (required). + /// status (required). + /// Index of the active variant of the procedure. + /// List of remarks arisen during the procedure. (required). + /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document. + public RfidAccessControlInfo(RfidAccessControlProcedureType type = default(RfidAccessControlProcedureType), RFIDErrorCodes status = default(RFIDErrorCodes), decimal activeOptionIdx = default(decimal), List notifications = default(List), List accessControlOptions = default(List)) + { + this.Type = type; + this.Status = status; + // to ensure "notifications" is required (not null) + if (notifications == null) + { + throw new ArgumentNullException("notifications is a required property for RfidAccessControlInfo and cannot be null"); + } + this.Notifications = notifications; + this.ActiveOptionIdx = activeOptionIdx; + this.AccessControlOptions = accessControlOptions; + } /// /// Index of the active variant of the procedure /// /// Index of the active variant of the procedure - [JsonPropertyName("ActiveOptionIdx")] - public decimal? ActiveOptionIdx { get { return this.ActiveOptionIdxOption; } set { this.ActiveOptionIdxOption = new(value); } } + [DataMember(Name = "ActiveOptionIdx", EmitDefaultValue = false)] + public decimal ActiveOptionIdx { get; set; } /// - /// Used to track the state of AccessControlOptions + /// List of remarks arisen during the procedure. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> AccessControlOptionsOption { get; private set; } + /// List of remarks arisen during the procedure. + [DataMember(Name = "Notifications", IsRequired = true, EmitDefaultValue = true)] + public List Notifications { get; set; } /// /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document /// /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document - [JsonPropertyName("AccessControlOptions")] - public List? AccessControlOptions { get { return this.AccessControlOptionsOption; } set { this.AccessControlOptionsOption = new(value); } } + [DataMember(Name = "AccessControlOptions", EmitDefaultValue = false)] + public List AccessControlOptions { get; set; } /// /// Returns the string presentation of the object @@ -108,13 +102,22 @@ public override string ToString() sb.Append("class RfidAccessControlInfo {\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Notifications: ").Append(Notifications).Append("\n"); sb.Append(" ActiveOptionIdx: ").Append(ActiveOptionIdx).Append("\n"); + sb.Append(" Notifications: ").Append(Notifications).Append("\n"); sb.Append(" AccessControlOptions: ").Append(AccessControlOptions).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -126,150 +129,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidAccessControlInfoJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidAccessControlInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option status = default; - Option?> notifications = default; - Option activeOptionIdx = default; - Option?> accessControlOptions = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - string? typeRawValue = utf8JsonReader.GetString(); - if (typeRawValue != null) - type = new Option(RfidAccessControlProcedureTypeValueConverter.FromStringOrDefault(typeRawValue)); - break; - case "Status": - string? statusRawValue = utf8JsonReader.GetString(); - if (statusRawValue != null) - status = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(statusRawValue)); - break; - case "Notifications": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "ActiveOptionIdx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - activeOptionIdx = new Option(utf8JsonReader.GetDecimal()); - break; - case "AccessControlOptions": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - accessControlOptions = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class RfidAccessControlInfo.", nameof(type)); - - if (!status.IsSet) - throw new ArgumentException("Property is required for class RfidAccessControlInfo.", nameof(status)); - - if (!notifications.IsSet) - throw new ArgumentException("Property is required for class RfidAccessControlInfo.", nameof(notifications)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidAccessControlInfo."); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class RfidAccessControlInfo."); - - if (notifications.IsSet && notifications.Value == null) - throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidAccessControlInfo."); - - if (activeOptionIdx.IsSet && activeOptionIdx.Value == null) - throw new ArgumentNullException(nameof(activeOptionIdx), "Property is not nullable for class RfidAccessControlInfo."); - - if (accessControlOptions.IsSet && accessControlOptions.Value == null) - throw new ArgumentNullException(nameof(accessControlOptions), "Property is not nullable for class RfidAccessControlInfo."); - - return new RfidAccessControlInfo(type.Value!.Value!, status.Value!.Value!, notifications.Value!, activeOptionIdx, accessControlOptions); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAccessControlInfo rfidAccessControlInfo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidAccessControlInfo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidAccessControlInfo rfidAccessControlInfo, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidAccessControlInfo.Notifications == null) - throw new ArgumentNullException(nameof(rfidAccessControlInfo.Notifications), "Property is required for class RfidAccessControlInfo."); - - if (rfidAccessControlInfo.AccessControlOptionsOption.IsSet && rfidAccessControlInfo.AccessControlOptions == null) - throw new ArgumentNullException(nameof(rfidAccessControlInfo.AccessControlOptions), "Property is required for class RfidAccessControlInfo."); - - var typeRawValue = RfidAccessControlProcedureTypeValueConverter.ToJsonValue(rfidAccessControlInfo.Type); - writer.WriteNumber("Type", typeRawValue); - - var statusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidAccessControlInfo.Status); - writer.WriteNumber("Status", statusRawValue); - - writer.WritePropertyName("Notifications"); - JsonSerializer.Serialize(writer, rfidAccessControlInfo.Notifications, jsonSerializerOptions); - if (rfidAccessControlInfo.ActiveOptionIdxOption.IsSet) - writer.WriteNumber("ActiveOptionIdx", rfidAccessControlInfo.ActiveOptionIdxOption.Value!.Value); - - if (rfidAccessControlInfo.AccessControlOptionsOption.IsSet) - { - writer.WritePropertyName("AccessControlOptions"); - JsonSerializer.Serialize(writer, rfidAccessControlInfo.AccessControlOptions, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs index cd2ee3a..7830f61 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlProcedureType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -72,165 +73,4 @@ public enum RfidAccessControlProcedureType CARD_INFO = 10 } - /// - /// Converts to and from the JSON value - /// - public static class RfidAccessControlProcedureTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidAccessControlProcedureType FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidAccessControlProcedureType.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidAccessControlProcedureType.BAC; - - if (value.Equals((2).ToString())) - return RfidAccessControlProcedureType.PACE; - - if (value.Equals((3).ToString())) - return RfidAccessControlProcedureType.CA; - - if (value.Equals((4).ToString())) - return RfidAccessControlProcedureType.TA; - - if (value.Equals((5).ToString())) - return RfidAccessControlProcedureType.AA; - - if (value.Equals((6).ToString())) - return RfidAccessControlProcedureType.RI; - - if (value.Equals((10).ToString())) - return RfidAccessControlProcedureType.CARD_INFO; - - throw new NotImplementedException($"Could not convert value to type RfidAccessControlProcedureType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidAccessControlProcedureType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidAccessControlProcedureType.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidAccessControlProcedureType.BAC; - - if (value.Equals((2).ToString())) - return RfidAccessControlProcedureType.PACE; - - if (value.Equals((3).ToString())) - return RfidAccessControlProcedureType.CA; - - if (value.Equals((4).ToString())) - return RfidAccessControlProcedureType.TA; - - if (value.Equals((5).ToString())) - return RfidAccessControlProcedureType.AA; - - if (value.Equals((6).ToString())) - return RfidAccessControlProcedureType.RI; - - if (value.Equals((10).ToString())) - return RfidAccessControlProcedureType.CARD_INFO; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidAccessControlProcedureType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidAccessControlProcedureTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidAccessControlProcedureType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidAccessControlProcedureType? result = rawValue == null - ? null - : RfidAccessControlProcedureTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidAccessControlProcedureType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAccessControlProcedureType rfidAccessControlProcedureType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidAccessControlProcedureType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidAccessControlProcedureTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidAccessControlProcedureType from the Json object - /// - /// - /// - /// - /// - public override RfidAccessControlProcedureType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidAccessControlProcedureType? result = rawValue == null - ? null - : RfidAccessControlProcedureTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAccessControlProcedureType? rfidAccessControlProcedureType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidAccessControlProcedureType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs index 818106e..34197bc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessKey.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,63 +14,73 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the contents of secure data access key within the context of the communication session with electronic document /// + [DataContract(Name = "RfidAccessKey")] public partial class RfidAccessKey : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// Key contents - /// keyType - /// accessType - /// Logical sign of the need for a full comparison of AccessKey contents with the contents of DG1 (MRZ) data group - [JsonConstructor] - public RfidAccessKey(string accessKey, RfidPasswordType keyType, RfidAccessControlProcedureType accessType, bool checkFullKeyMatching) - { - AccessKey = accessKey; - KeyType = keyType; - AccessType = accessType; - CheckFullKeyMatching = checkFullKeyMatching; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets KeyType /// - [JsonPropertyName("KeyType")] + [DataMember(Name = "KeyType", IsRequired = true, EmitDefaultValue = true)] public RfidPasswordType KeyType { get; set; } /// /// Gets or Sets AccessType /// - [JsonPropertyName("AccessType")] + [DataMember(Name = "AccessType", IsRequired = true, EmitDefaultValue = true)] public RfidAccessControlProcedureType AccessType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RfidAccessKey() { } + /// + /// Initializes a new instance of the class. + /// + /// Key contents (required). + /// keyType (required). + /// accessType (required). + /// Logical sign of the need for a full comparison of AccessKey contents with the contents of DG1 (MRZ) data group (required). + public RfidAccessKey(string accessKey = default(string), RfidPasswordType keyType = default(RfidPasswordType), RfidAccessControlProcedureType accessType = default(RfidAccessControlProcedureType), bool checkFullKeyMatching = default(bool)) + { + // to ensure "accessKey" is required (not null) + if (accessKey == null) + { + throw new ArgumentNullException("accessKey is a required property for RfidAccessKey and cannot be null"); + } + this.AccessKey = accessKey; + this.KeyType = keyType; + this.AccessType = accessType; + this.CheckFullKeyMatching = checkFullKeyMatching; + } /// /// Key contents /// /// Key contents - [JsonPropertyName("AccessKey")] + [DataMember(Name = "AccessKey", IsRequired = true, EmitDefaultValue = true)] public string AccessKey { get; set; } /// /// Logical sign of the need for a full comparison of AccessKey contents with the contents of DG1 (MRZ) data group /// /// Logical sign of the need for a full comparison of AccessKey contents with the contents of DG1 (MRZ) data group - [JsonPropertyName("CheckFullKeyMatching")] + [DataMember(Name = "CheckFullKeyMatching", IsRequired = true, EmitDefaultValue = true)] public bool CheckFullKeyMatching { get; set; } /// @@ -91,6 +99,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -102,134 +119,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidAccessKeyJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidAccessKey Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option accessKey = default; - Option keyType = default; - Option accessType = default; - Option checkFullKeyMatching = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "AccessKey": - accessKey = new Option(utf8JsonReader.GetString()!); - break; - case "KeyType": - string? keyTypeRawValue = utf8JsonReader.GetString(); - if (keyTypeRawValue != null) - keyType = new Option(RfidPasswordTypeValueConverter.FromStringOrDefault(keyTypeRawValue)); - break; - case "AccessType": - string? accessTypeRawValue = utf8JsonReader.GetString(); - if (accessTypeRawValue != null) - accessType = new Option(RfidAccessControlProcedureTypeValueConverter.FromStringOrDefault(accessTypeRawValue)); - break; - case "CheckFullKeyMatching": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkFullKeyMatching = new Option(utf8JsonReader.GetBoolean()); - break; - default: - break; - } - } - } - - if (!accessKey.IsSet) - throw new ArgumentException("Property is required for class RfidAccessKey.", nameof(accessKey)); - - if (!keyType.IsSet) - throw new ArgumentException("Property is required for class RfidAccessKey.", nameof(keyType)); - - if (!accessType.IsSet) - throw new ArgumentException("Property is required for class RfidAccessKey.", nameof(accessType)); - - if (!checkFullKeyMatching.IsSet) - throw new ArgumentException("Property is required for class RfidAccessKey.", nameof(checkFullKeyMatching)); - - if (accessKey.IsSet && accessKey.Value == null) - throw new ArgumentNullException(nameof(accessKey), "Property is not nullable for class RfidAccessKey."); - - if (keyType.IsSet && keyType.Value == null) - throw new ArgumentNullException(nameof(keyType), "Property is not nullable for class RfidAccessKey."); - - if (accessType.IsSet && accessType.Value == null) - throw new ArgumentNullException(nameof(accessType), "Property is not nullable for class RfidAccessKey."); - - if (checkFullKeyMatching.IsSet && checkFullKeyMatching.Value == null) - throw new ArgumentNullException(nameof(checkFullKeyMatching), "Property is not nullable for class RfidAccessKey."); - - return new RfidAccessKey(accessKey.Value!, keyType.Value!.Value!, accessType.Value!.Value!, checkFullKeyMatching.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAccessKey rfidAccessKey, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidAccessKey, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidAccessKey rfidAccessKey, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidAccessKey.AccessKey == null) - throw new ArgumentNullException(nameof(rfidAccessKey.AccessKey), "Property is required for class RfidAccessKey."); - - writer.WriteString("AccessKey", rfidAccessKey.AccessKey); - - var keyTypeRawValue = RfidPasswordTypeValueConverter.ToJsonValue(rfidAccessKey.KeyType); - writer.WriteNumber("KeyType", keyTypeRawValue); - - var accessTypeRawValue = RfidAccessControlProcedureTypeValueConverter.ToJsonValue(rfidAccessKey.AccessType); - writer.WriteNumber("AccessType", accessTypeRawValue); - - writer.WriteBoolean("CheckFullKeyMatching", rfidAccessKey.CheckFullKeyMatching); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs b/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs index a456c9a..aedbceb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidApplication.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,90 +14,120 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the contents of a single LDS application and their analysis within the context of the communication session with electronic document /// + [DataContract(Name = "RfidApplication")] public partial class RfidApplication : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// type - /// status - /// Application identifier - /// Version of the application - /// Unicode version for application - /// Algorithm for calculating hash values for files for the procedure of PA - /// List of containers to store information about the read files of the application - [JsonConstructor] - public RfidApplication(RfidApplicationType type, RFIDErrorCodes status, string applicationID, string varVersion, string unicodeVersion, string dataHashAlgorithm, List files) - { - Type = type; - Status = status; - ApplicationID = applicationID; - VarVersion = varVersion; - UnicodeVersion = unicodeVersion; - DataHashAlgorithm = dataHashAlgorithm; - Files = files; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Type /// - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public RfidApplicationType Type { get; set; } /// /// Gets or Sets Status /// - [JsonPropertyName("Status")] + [DataMember(Name = "Status", IsRequired = true, EmitDefaultValue = true)] public RFIDErrorCodes Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RfidApplication() { } + /// + /// Initializes a new instance of the class. + /// + /// type (required). + /// status (required). + /// Application identifier (required). + /// Version of the application (required). + /// Unicode version for application (required). + /// Algorithm for calculating hash values for files for the procedure of PA (required). + /// List of containers to store information about the read files of the application (required). + public RfidApplication(RfidApplicationType type = default(RfidApplicationType), RFIDErrorCodes status = default(RFIDErrorCodes), string applicationID = default(string), string varVersion = default(string), string unicodeVersion = default(string), string dataHashAlgorithm = default(string), List files = default(List)) + { + this.Type = type; + this.Status = status; + // to ensure "applicationID" is required (not null) + if (applicationID == null) + { + throw new ArgumentNullException("applicationID is a required property for RfidApplication and cannot be null"); + } + this.ApplicationID = applicationID; + // to ensure "varVersion" is required (not null) + if (varVersion == null) + { + throw new ArgumentNullException("varVersion is a required property for RfidApplication and cannot be null"); + } + this.VarVersion = varVersion; + // to ensure "unicodeVersion" is required (not null) + if (unicodeVersion == null) + { + throw new ArgumentNullException("unicodeVersion is a required property for RfidApplication and cannot be null"); + } + this.UnicodeVersion = unicodeVersion; + // to ensure "dataHashAlgorithm" is required (not null) + if (dataHashAlgorithm == null) + { + throw new ArgumentNullException("dataHashAlgorithm is a required property for RfidApplication and cannot be null"); + } + this.DataHashAlgorithm = dataHashAlgorithm; + // to ensure "files" is required (not null) + if (files == null) + { + throw new ArgumentNullException("files is a required property for RfidApplication and cannot be null"); + } + this.Files = files; + } /// /// Application identifier /// /// Application identifier - [JsonPropertyName("ApplicationID")] + [DataMember(Name = "ApplicationID", IsRequired = true, EmitDefaultValue = true)] public string ApplicationID { get; set; } /// /// Version of the application /// /// Version of the application - [JsonPropertyName("Version")] + [DataMember(Name = "Version", IsRequired = true, EmitDefaultValue = true)] public string VarVersion { get; set; } /// /// Unicode version for application /// /// Unicode version for application - [JsonPropertyName("UnicodeVersion")] + [DataMember(Name = "UnicodeVersion", IsRequired = true, EmitDefaultValue = true)] public string UnicodeVersion { get; set; } /// /// Algorithm for calculating hash values for files for the procedure of PA /// /// Algorithm for calculating hash values for files for the procedure of PA - [JsonPropertyName("DataHashAlgorithm")] + [DataMember(Name = "DataHashAlgorithm", IsRequired = true, EmitDefaultValue = true)] public string DataHashAlgorithm { get; set; } /// /// List of containers to store information about the read files of the application /// /// List of containers to store information about the read files of the application - [JsonPropertyName("Files")] + [DataMember(Name = "Files", IsRequired = true, EmitDefaultValue = true)] public List Files { get; set; } /// @@ -121,6 +149,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -132,183 +169,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidApplicationJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidApplication Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option status = default; - Option applicationID = default; - Option varVersion = default; - Option unicodeVersion = default; - Option dataHashAlgorithm = default; - Option?> files = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - string? typeRawValue = utf8JsonReader.GetString(); - if (typeRawValue != null) - type = new Option(RfidApplicationTypeValueConverter.FromStringOrDefault(typeRawValue)); - break; - case "Status": - string? statusRawValue = utf8JsonReader.GetString(); - if (statusRawValue != null) - status = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(statusRawValue)); - break; - case "ApplicationID": - applicationID = new Option(utf8JsonReader.GetString()!); - break; - case "Version": - varVersion = new Option(utf8JsonReader.GetString()!); - break; - case "UnicodeVersion": - unicodeVersion = new Option(utf8JsonReader.GetString()!); - break; - case "DataHashAlgorithm": - dataHashAlgorithm = new Option(utf8JsonReader.GetString()!); - break; - case "Files": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - files = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class RfidApplication.", nameof(type)); - - if (!status.IsSet) - throw new ArgumentException("Property is required for class RfidApplication.", nameof(status)); - - if (!applicationID.IsSet) - throw new ArgumentException("Property is required for class RfidApplication.", nameof(applicationID)); - - if (!varVersion.IsSet) - throw new ArgumentException("Property is required for class RfidApplication.", nameof(varVersion)); - - if (!unicodeVersion.IsSet) - throw new ArgumentException("Property is required for class RfidApplication.", nameof(unicodeVersion)); - - if (!dataHashAlgorithm.IsSet) - throw new ArgumentException("Property is required for class RfidApplication.", nameof(dataHashAlgorithm)); - - if (!files.IsSet) - throw new ArgumentException("Property is required for class RfidApplication.", nameof(files)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidApplication."); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class RfidApplication."); - - if (applicationID.IsSet && applicationID.Value == null) - throw new ArgumentNullException(nameof(applicationID), "Property is not nullable for class RfidApplication."); - - if (varVersion.IsSet && varVersion.Value == null) - throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class RfidApplication."); - - if (unicodeVersion.IsSet && unicodeVersion.Value == null) - throw new ArgumentNullException(nameof(unicodeVersion), "Property is not nullable for class RfidApplication."); - - if (dataHashAlgorithm.IsSet && dataHashAlgorithm.Value == null) - throw new ArgumentNullException(nameof(dataHashAlgorithm), "Property is not nullable for class RfidApplication."); - - if (files.IsSet && files.Value == null) - throw new ArgumentNullException(nameof(files), "Property is not nullable for class RfidApplication."); - - return new RfidApplication(type.Value!.Value!, status.Value!.Value!, applicationID.Value!, varVersion.Value!, unicodeVersion.Value!, dataHashAlgorithm.Value!, files.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidApplication rfidApplication, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidApplication, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidApplication rfidApplication, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidApplication.ApplicationID == null) - throw new ArgumentNullException(nameof(rfidApplication.ApplicationID), "Property is required for class RfidApplication."); - - if (rfidApplication.VarVersion == null) - throw new ArgumentNullException(nameof(rfidApplication.VarVersion), "Property is required for class RfidApplication."); - - if (rfidApplication.UnicodeVersion == null) - throw new ArgumentNullException(nameof(rfidApplication.UnicodeVersion), "Property is required for class RfidApplication."); - - if (rfidApplication.DataHashAlgorithm == null) - throw new ArgumentNullException(nameof(rfidApplication.DataHashAlgorithm), "Property is required for class RfidApplication."); - - if (rfidApplication.Files == null) - throw new ArgumentNullException(nameof(rfidApplication.Files), "Property is required for class RfidApplication."); - - var typeRawValue = RfidApplicationTypeValueConverter.ToJsonValue(rfidApplication.Type); - writer.WriteNumber("Type", typeRawValue); - - var statusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidApplication.Status); - writer.WriteNumber("Status", statusRawValue); - - writer.WriteString("ApplicationID", rfidApplication.ApplicationID); - - writer.WriteString("Version", rfidApplication.VarVersion); - - writer.WriteString("UnicodeVersion", rfidApplication.UnicodeVersion); - - writer.WriteString("DataHashAlgorithm", rfidApplication.DataHashAlgorithm); - - writer.WritePropertyName("Files"); - JsonSerializer.Serialize(writer, rfidApplication.Files, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs index a485577..ea4d741 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidApplicationType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -82,177 +83,4 @@ public enum RfidApplicationType ROOT_FILES = 0 } - /// - /// Converts to and from the JSON value - /// - public static class RfidApplicationTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidApplicationType FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidApplicationType.UNSPECIFIED; - - if (value.Equals((1).ToString())) - return RfidApplicationType.E_PASSPORT; - - if (value.Equals((2).ToString())) - return RfidApplicationType.E_ID; - - if (value.Equals((3).ToString())) - return RfidApplicationType.E_SIGN; - - if (value.Equals((4).ToString())) - return RfidApplicationType.E_DL; - - if (value.Equals((5).ToString())) - return RfidApplicationType.LDS2_TravelRecords; - - if (value.Equals((6).ToString())) - return RfidApplicationType.LDS2_VisaRecords; - - if (value.Equals((7).ToString())) - return RfidApplicationType.LDS2_AddBiometrics; - - if (value.Equals((8).ToString())) - return RfidApplicationType.eDTC_PC; - - if (value.Equals((0).ToString())) - return RfidApplicationType.ROOT_FILES; - - throw new NotImplementedException($"Could not convert value to type RfidApplicationType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidApplicationType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidApplicationType.UNSPECIFIED; - - if (value.Equals((1).ToString())) - return RfidApplicationType.E_PASSPORT; - - if (value.Equals((2).ToString())) - return RfidApplicationType.E_ID; - - if (value.Equals((3).ToString())) - return RfidApplicationType.E_SIGN; - - if (value.Equals((4).ToString())) - return RfidApplicationType.E_DL; - - if (value.Equals((5).ToString())) - return RfidApplicationType.LDS2_TravelRecords; - - if (value.Equals((6).ToString())) - return RfidApplicationType.LDS2_VisaRecords; - - if (value.Equals((7).ToString())) - return RfidApplicationType.LDS2_AddBiometrics; - - if (value.Equals((8).ToString())) - return RfidApplicationType.eDTC_PC; - - if (value.Equals((0).ToString())) - return RfidApplicationType.ROOT_FILES; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidApplicationType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidApplicationTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidApplicationType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidApplicationType? result = rawValue == null - ? null - : RfidApplicationTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidApplicationType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidApplicationType rfidApplicationType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidApplicationType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidApplicationTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidApplicationType from the Json object - /// - /// - /// - /// - /// - public override RfidApplicationType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidApplicationType? result = rawValue == null - ? null - : RfidApplicationTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidApplicationType? rfidApplicationType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidApplicationType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs index f5d3218..04e90b2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,47 +14,62 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure contains the data of one attribute of the digital signature object. /// + [DataContract(Name = "RfidAttributeData")] public partial class RfidAttributeData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) - /// Attribute binary data. Base64 encoded. - [JsonConstructor] - public RfidAttributeData(string type, string data) + [JsonConstructorAttribute] + protected RfidAttributeData() { } + /// + /// Initializes a new instance of the class. + /// + /// Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) (required). + /// Attribute binary data. Base64 encoded. (required). + public RfidAttributeData(string type = default(string), string data = default(string)) { - Type = type; - Data = data; - OnCreated(); + // to ensure "type" is required (not null) + if (type == null) + { + throw new ArgumentNullException("type is a required property for RfidAttributeData and cannot be null"); + } + this.Type = type; + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for RfidAttributeData and cannot be null"); + } + this.Data = data; } - partial void OnCreated(); - /// /// Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) /// /// Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } /// /// Attribute binary data. Base64 encoded. /// /// Attribute binary data. Base64 encoded. - [JsonPropertyName("Data")] + [DataMember(Name = "Data", IsRequired = true, EmitDefaultValue = true)] public string Data { get; set; } /// @@ -73,6 +86,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -84,106 +106,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidAttributeDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidAttributeData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option data = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - type = new Option(utf8JsonReader.GetString()!); - break; - case "Data": - data = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class RfidAttributeData.", nameof(type)); - - if (!data.IsSet) - throw new ArgumentException("Property is required for class RfidAttributeData.", nameof(data)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidAttributeData."); - - if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class RfidAttributeData."); - - return new RfidAttributeData(type.Value!, data.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAttributeData rfidAttributeData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidAttributeData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidAttributeData rfidAttributeData, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidAttributeData.Type == null) - throw new ArgumentNullException(nameof(rfidAttributeData.Type), "Property is required for class RfidAttributeData."); - - if (rfidAttributeData.Data == null) - throw new ArgumentNullException(nameof(rfidAttributeData.Data), "Property is required for class RfidAttributeData."); - - writer.WriteString("Type", rfidAttributeData.Type); - - writer.WriteString("Data", rfidAttributeData.Data); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs index a427dae..1f57374 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAttributeName.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,46 +14,61 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure contains information that serves as the distinguished name (identifier) of an object. /// + [DataContract(Name = "RfidAttributeName")] public partial class RfidAttributeName : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Attribute identifier (OID ASCII string); contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) - /// value - [JsonConstructor] - public RfidAttributeName(string type, TrfFtString value) + [JsonConstructorAttribute] + protected RfidAttributeName() { } + /// + /// Initializes a new instance of the class. + /// + /// Attribute identifier (OID ASCII string); contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) (required). + /// value (required). + public RfidAttributeName(string type = default(string), TrfFtString value = default(TrfFtString)) { - Type = type; - Value = value; - OnCreated(); + // to ensure "type" is required (not null) + if (type == null) + { + throw new ArgumentNullException("type is a required property for RfidAttributeName and cannot be null"); + } + this.Type = type; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for RfidAttributeName and cannot be null"); + } + this.Value = value; } - partial void OnCreated(); - /// /// Attribute identifier (OID ASCII string); contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) /// /// Attribute identifier (OID ASCII string); contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } /// /// Gets or Sets Value /// - [JsonPropertyName("Value")] + [DataMember(Name = "Value", IsRequired = true, EmitDefaultValue = true)] public TrfFtString Value { get; set; } /// @@ -72,6 +85,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -83,108 +105,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidAttributeNameJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidAttributeName Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option value = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - type = new Option(utf8JsonReader.GetString()!); - break; - case "Value": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - value = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class RfidAttributeName.", nameof(type)); - - if (!value.IsSet) - throw new ArgumentException("Property is required for class RfidAttributeName.", nameof(value)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidAttributeName."); - - if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class RfidAttributeName."); - - return new RfidAttributeName(type.Value!, value.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAttributeName rfidAttributeName, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidAttributeName, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidAttributeName rfidAttributeName, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidAttributeName.Type == null) - throw new ArgumentNullException(nameof(rfidAttributeName.Type), "Property is required for class RfidAttributeName."); - - if (rfidAttributeName.Value == null) - throw new ArgumentNullException(nameof(rfidAttributeName.Value), "Property is required for class RfidAttributeName."); - - writer.WriteString("Type", rfidAttributeName.Type); - - writer.WritePropertyName("Value"); - JsonSerializer.Serialize(writer, rfidAttributeName.Value, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs index 3d31e8b..1349c07 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAuthenticationProcedureType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -52,141 +53,4 @@ public enum RfidAuthenticationProcedureType GENERAL = 3 } - /// - /// Converts to and from the JSON value - /// - public static class RfidAuthenticationProcedureTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidAuthenticationProcedureType FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidAuthenticationProcedureType.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidAuthenticationProcedureType.STANDARD; - - if (value.Equals((2).ToString())) - return RfidAuthenticationProcedureType.ADVANCED; - - if (value.Equals((3).ToString())) - return RfidAuthenticationProcedureType.GENERAL; - - throw new NotImplementedException($"Could not convert value to type RfidAuthenticationProcedureType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidAuthenticationProcedureType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidAuthenticationProcedureType.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidAuthenticationProcedureType.STANDARD; - - if (value.Equals((2).ToString())) - return RfidAuthenticationProcedureType.ADVANCED; - - if (value.Equals((3).ToString())) - return RfidAuthenticationProcedureType.GENERAL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidAuthenticationProcedureType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidAuthenticationProcedureTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidAuthenticationProcedureType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidAuthenticationProcedureType? result = rawValue == null - ? null - : RfidAuthenticationProcedureTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidAuthenticationProcedureType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAuthenticationProcedureType rfidAuthenticationProcedureType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidAuthenticationProcedureType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidAuthenticationProcedureTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidAuthenticationProcedureType from the Json object - /// - /// - /// - /// - /// - public override RfidAuthenticationProcedureType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidAuthenticationProcedureType? result = rawValue == null - ? null - : RfidAuthenticationProcedureTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidAuthenticationProcedureType? rfidAuthenticationProcedureType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidAuthenticationProcedureType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs b/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs index 1c58ef0..3c53f02 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidBaudRate.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -57,147 +58,4 @@ public enum RfidBaudRate RFBR_848 = 8 } - /// - /// Converts to and from the JSON value - /// - public static class RfidBaudRateValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidBaudRate FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidBaudRate.UNKNOWN; - - if (value.Equals((1).ToString())) - return RfidBaudRate.RFBR_106; - - if (value.Equals((2).ToString())) - return RfidBaudRate.RFBR_212; - - if (value.Equals((4).ToString())) - return RfidBaudRate.RFBR_424; - - if (value.Equals((8).ToString())) - return RfidBaudRate.RFBR_848; - - throw new NotImplementedException($"Could not convert value to type RfidBaudRate: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidBaudRate? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidBaudRate.UNKNOWN; - - if (value.Equals((1).ToString())) - return RfidBaudRate.RFBR_106; - - if (value.Equals((2).ToString())) - return RfidBaudRate.RFBR_212; - - if (value.Equals((4).ToString())) - return RfidBaudRate.RFBR_424; - - if (value.Equals((8).ToString())) - return RfidBaudRate.RFBR_848; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidBaudRate value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidBaudRateJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidBaudRate Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidBaudRate? result = rawValue == null - ? null - : RfidBaudRateValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidBaudRate to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidBaudRate rfidBaudRate, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidBaudRate.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidBaudRateNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidBaudRate from the Json object - /// - /// - /// - /// - /// - public override RfidBaudRate? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidBaudRate? result = rawValue == null - ? null - : RfidBaudRateValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidBaudRate? rfidBaudRate, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidBaudRate?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs index e568a90..a60626a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCardPropertiesExt.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,152 +14,192 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to store extended information about the characteristics of the RFID-chip located in the scope of the reader /// + [DataContract(Name = "RfidCardPropertiesExt")] public partial class RfidCardPropertiesExt : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// rFIDType - /// Numeric Baudrate1 value in hexadecimal format (e.g. 0x0000000F) - /// Numeric Baudrate2 value in hexadecimal format - /// Boolean Support_4 value - /// chipTypeA - /// Sign of support for ISO/IEC 14443-3 data exchange protocol - /// Amount of operational memory MIFARE® of the chip, kilobytes - /// UID contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. F9 4F 41 60) - /// bitRateS - /// bitRateR - /// ATR-string of RFID-chip - /// Reply of the «A» type chip to «REQA» command of ISO/IEC 14443-3 protocol (Answer To Request, Type A – ATQA) – for the internal use by the main control library - /// Response of type-A RFID-chip to SELECT command of ISO/IEC 14443-3 protocol (Select Acknowledge, SAK). - /// ATQ_B contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 50 F9 4F 41 60 00 00 00 00 77 81 81) - [JsonConstructor] - public RfidCardPropertiesExt(RfidType rFIDType, string baudrate1, string baudrate2, bool support4, RfidAChip chipTypeA, bool supportMifare, decimal mifareMemory, string uID, RfidBaudRate bitRateS, RfidBaudRate bitRateR, string aTR, Object? aTQA = default, Object? sAK = default, Object? aTQB = default) - { - RFIDType = rFIDType; - Baudrate1 = baudrate1; - Baudrate2 = baudrate2; - Support4 = support4; - ChipTypeA = chipTypeA; - SupportMifare = supportMifare; - MifareMemory = mifareMemory; - UID = uID; - BitRateS = bitRateS; - BitRateR = bitRateR; - ATR = aTR; - ATQ_A = aTQA; - SAK = sAK; - ATQ_B = aTQB; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets RFIDType /// - [JsonPropertyName("RFID_Type")] + [DataMember(Name = "RFID_Type", IsRequired = true, EmitDefaultValue = true)] public RfidType RFIDType { get; set; } /// /// Gets or Sets ChipTypeA /// - [JsonPropertyName("ChipType_A")] + [DataMember(Name = "ChipType_A", IsRequired = true, EmitDefaultValue = true)] public RfidAChip ChipTypeA { get; set; } /// /// Gets or Sets BitRateS /// - [JsonPropertyName("BitRateS")] + [DataMember(Name = "BitRateS", IsRequired = true, EmitDefaultValue = true)] public RfidBaudRate BitRateS { get; set; } /// /// Gets or Sets BitRateR /// - [JsonPropertyName("BitRateR")] + [DataMember(Name = "BitRateR", IsRequired = true, EmitDefaultValue = true)] public RfidBaudRate BitRateR { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RfidCardPropertiesExt() { } + /// + /// Initializes a new instance of the class. + /// + /// rFIDType (required). + /// Numeric Baudrate1 value in hexadecimal format (e.g. 0x0000000F) (required). + /// Numeric Baudrate2 value in hexadecimal format (required). + /// Boolean Support_4 value (required). + /// chipTypeA (required). + /// Sign of support for ISO/IEC 14443-3 data exchange protocol (required). + /// Amount of operational memory MIFARE® of the chip, kilobytes (required). + /// UID contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. F9 4F 41 60) (required). + /// Reply of the «A» type chip to «REQA» command of ISO/IEC 14443-3 protocol (Answer To Request, Type A – ATQA) – for the internal use by the main control library (required). + /// Response of type-A RFID-chip to SELECT command of ISO/IEC 14443-3 protocol (Select Acknowledge, SAK). (required). + /// ATQ_B contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 50 F9 4F 41 60 00 00 00 00 77 81 81) (required). + /// bitRateS (required). + /// bitRateR (required). + /// ATR-string of RFID-chip (required). + public RfidCardPropertiesExt(RfidType rFIDType = default(RfidType), string baudrate1 = default(string), string baudrate2 = default(string), bool support4 = default(bool), RfidAChip chipTypeA = default(RfidAChip), bool supportMifare = default(bool), decimal mifareMemory = default(decimal), string uID = default(string), Object aTQA = default(Object), Object sAK = default(Object), Object aTQB = default(Object), RfidBaudRate bitRateS = default(RfidBaudRate), RfidBaudRate bitRateR = default(RfidBaudRate), string aTR = default(string)) + { + this.RFIDType = rFIDType; + // to ensure "baudrate1" is required (not null) + if (baudrate1 == null) + { + throw new ArgumentNullException("baudrate1 is a required property for RfidCardPropertiesExt and cannot be null"); + } + this.Baudrate1 = baudrate1; + // to ensure "baudrate2" is required (not null) + if (baudrate2 == null) + { + throw new ArgumentNullException("baudrate2 is a required property for RfidCardPropertiesExt and cannot be null"); + } + this.Baudrate2 = baudrate2; + this.Support4 = support4; + this.ChipTypeA = chipTypeA; + this.SupportMifare = supportMifare; + this.MifareMemory = mifareMemory; + // to ensure "uID" is required (not null) + if (uID == null) + { + throw new ArgumentNullException("uID is a required property for RfidCardPropertiesExt and cannot be null"); + } + this.UID = uID; + // to ensure "aTQA" is required (not null) + if (aTQA == null) + { + throw new ArgumentNullException("aTQA is a required property for RfidCardPropertiesExt and cannot be null"); + } + this.ATQ_A = aTQA; + // to ensure "sAK" is required (not null) + if (sAK == null) + { + throw new ArgumentNullException("sAK is a required property for RfidCardPropertiesExt and cannot be null"); + } + this.SAK = sAK; + // to ensure "aTQB" is required (not null) + if (aTQB == null) + { + throw new ArgumentNullException("aTQB is a required property for RfidCardPropertiesExt and cannot be null"); + } + this.ATQ_B = aTQB; + this.BitRateS = bitRateS; + this.BitRateR = bitRateR; + // to ensure "aTR" is required (not null) + if (aTR == null) + { + throw new ArgumentNullException("aTR is a required property for RfidCardPropertiesExt and cannot be null"); + } + this.ATR = aTR; + } /// /// Numeric Baudrate1 value in hexadecimal format (e.g. 0x0000000F) /// /// Numeric Baudrate1 value in hexadecimal format (e.g. 0x0000000F) - [JsonPropertyName("Baudrate1")] + [DataMember(Name = "Baudrate1", IsRequired = true, EmitDefaultValue = true)] public string Baudrate1 { get; set; } /// /// Numeric Baudrate2 value in hexadecimal format /// /// Numeric Baudrate2 value in hexadecimal format - [JsonPropertyName("Baudrate2")] + [DataMember(Name = "Baudrate2", IsRequired = true, EmitDefaultValue = true)] public string Baudrate2 { get; set; } /// /// Boolean Support_4 value /// /// Boolean Support_4 value - [JsonPropertyName("Support_4")] + [DataMember(Name = "Support_4", IsRequired = true, EmitDefaultValue = true)] public bool Support4 { get; set; } /// /// Sign of support for ISO/IEC 14443-3 data exchange protocol /// /// Sign of support for ISO/IEC 14443-3 data exchange protocol - [JsonPropertyName("Support_Mifare")] + [DataMember(Name = "Support_Mifare", IsRequired = true, EmitDefaultValue = true)] public bool SupportMifare { get; set; } /// /// Amount of operational memory MIFARE® of the chip, kilobytes /// /// Amount of operational memory MIFARE® of the chip, kilobytes - [JsonPropertyName("MifareMemory")] + [DataMember(Name = "MifareMemory", IsRequired = true, EmitDefaultValue = true)] public decimal MifareMemory { get; set; } /// /// UID contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. F9 4F 41 60) /// /// UID contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. F9 4F 41 60) - [JsonPropertyName("UID")] + [DataMember(Name = "UID", IsRequired = true, EmitDefaultValue = true)] public string UID { get; set; } - /// - /// ATR-string of RFID-chip - /// - /// ATR-string of RFID-chip - [JsonPropertyName("ATR")] - public string ATR { get; set; } - /// /// Reply of the «A» type chip to «REQA» command of ISO/IEC 14443-3 protocol (Answer To Request, Type A – ATQA) – for the internal use by the main control library /// /// Reply of the «A» type chip to «REQA» command of ISO/IEC 14443-3 protocol (Answer To Request, Type A – ATQA) – for the internal use by the main control library - [JsonPropertyName("ATQ_A")] - public Object? ATQ_A { get; set; } + [DataMember(Name = "ATQ_A", IsRequired = true, EmitDefaultValue = true)] + public Object ATQ_A { get; set; } /// /// Response of type-A RFID-chip to SELECT command of ISO/IEC 14443-3 protocol (Select Acknowledge, SAK). /// /// Response of type-A RFID-chip to SELECT command of ISO/IEC 14443-3 protocol (Select Acknowledge, SAK). - [JsonPropertyName("SAK")] - public Object? SAK { get; set; } + [DataMember(Name = "SAK", IsRequired = true, EmitDefaultValue = true)] + public Object SAK { get; set; } /// /// ATQ_B contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 50 F9 4F 41 60 00 00 00 00 77 81 81) /// /// ATQ_B contents in text format. Each byte is represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 50 F9 4F 41 60 00 00 00 00 77 81 81) - [JsonPropertyName("ATQ_B")] - public Object? ATQ_B { get; set; } + [DataMember(Name = "ATQ_B", IsRequired = true, EmitDefaultValue = true)] + public Object ATQ_B { get; set; } + + /// + /// ATR-string of RFID-chip + /// + /// ATR-string of RFID-chip + [DataMember(Name = "ATR", IsRequired = true, EmitDefaultValue = true)] + public string ATR { get; set; } /// /// Returns the string presentation of the object @@ -179,16 +217,25 @@ public override string ToString() sb.Append(" SupportMifare: ").Append(SupportMifare).Append("\n"); sb.Append(" MifareMemory: ").Append(MifareMemory).Append("\n"); sb.Append(" UID: ").Append(UID).Append("\n"); - sb.Append(" BitRateS: ").Append(BitRateS).Append("\n"); - sb.Append(" BitRateR: ").Append(BitRateR).Append("\n"); - sb.Append(" ATR: ").Append(ATR).Append("\n"); sb.Append(" ATQ_A: ").Append(ATQ_A).Append("\n"); sb.Append(" SAK: ").Append(SAK).Append("\n"); sb.Append(" ATQ_B: ").Append(ATQ_B).Append("\n"); + sb.Append(" BitRateS: ").Append(BitRateS).Append("\n"); + sb.Append(" BitRateR: ").Append(BitRateR).Append("\n"); + sb.Append(" ATR: ").Append(ATR).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -200,281 +247,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidCardPropertiesExtJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidCardPropertiesExt Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option rFIDType = default; - Option baudrate1 = default; - Option baudrate2 = default; - Option support4 = default; - Option chipTypeA = default; - Option supportMifare = default; - Option mifareMemory = default; - Option uID = default; - Option bitRateS = default; - Option bitRateR = default; - Option aTR = default; - Option aTQA = default; - Option sAK = default; - Option aTQB = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RFID_Type": - string? rFIDTypeRawValue = utf8JsonReader.GetString(); - if (rFIDTypeRawValue != null) - rFIDType = new Option(RfidTypeValueConverter.FromStringOrDefault(rFIDTypeRawValue)); - break; - case "Baudrate1": - baudrate1 = new Option(utf8JsonReader.GetString()!); - break; - case "Baudrate2": - baudrate2 = new Option(utf8JsonReader.GetString()!); - break; - case "Support_4": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - support4 = new Option(utf8JsonReader.GetBoolean()); - break; - case "ChipType_A": - string? chipTypeARawValue = utf8JsonReader.GetString(); - if (chipTypeARawValue != null) - chipTypeA = new Option(RfidAChipValueConverter.FromStringOrDefault(chipTypeARawValue)); - break; - case "Support_Mifare": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - supportMifare = new Option(utf8JsonReader.GetBoolean()); - break; - case "MifareMemory": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - mifareMemory = new Option(utf8JsonReader.GetDecimal()); - break; - case "UID": - uID = new Option(utf8JsonReader.GetString()!); - break; - case "BitRateS": - string? bitRateSRawValue = utf8JsonReader.GetString(); - if (bitRateSRawValue != null) - bitRateS = new Option(RfidBaudRateValueConverter.FromStringOrDefault(bitRateSRawValue)); - break; - case "BitRateR": - string? bitRateRRawValue = utf8JsonReader.GetString(); - if (bitRateRRawValue != null) - bitRateR = new Option(RfidBaudRateValueConverter.FromStringOrDefault(bitRateRRawValue)); - break; - case "ATR": - aTR = new Option(utf8JsonReader.GetString()!); - break; - case "ATQ_A": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - aTQA = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "SAK": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sAK = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - case "ATQ_B": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - aTQB = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)); - break; - default: - break; - } - } - } - - if (!rFIDType.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(rFIDType)); - - if (!baudrate1.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(baudrate1)); - - if (!baudrate2.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(baudrate2)); - - if (!support4.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(support4)); - - if (!chipTypeA.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(chipTypeA)); - - if (!supportMifare.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(supportMifare)); - - if (!mifareMemory.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(mifareMemory)); - - if (!uID.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(uID)); - - if (!bitRateS.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(bitRateS)); - - if (!bitRateR.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(bitRateR)); - - if (!aTR.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(aTR)); - - if (!aTQA.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(aTQA)); - - if (!sAK.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(sAK)); - - if (!aTQB.IsSet) - throw new ArgumentException("Property is required for class RfidCardPropertiesExt.", nameof(aTQB)); - - if (rFIDType.IsSet && rFIDType.Value == null) - throw new ArgumentNullException(nameof(rFIDType), "Property is not nullable for class RfidCardPropertiesExt."); - - if (baudrate1.IsSet && baudrate1.Value == null) - throw new ArgumentNullException(nameof(baudrate1), "Property is not nullable for class RfidCardPropertiesExt."); - - if (baudrate2.IsSet && baudrate2.Value == null) - throw new ArgumentNullException(nameof(baudrate2), "Property is not nullable for class RfidCardPropertiesExt."); - - if (support4.IsSet && support4.Value == null) - throw new ArgumentNullException(nameof(support4), "Property is not nullable for class RfidCardPropertiesExt."); - - if (chipTypeA.IsSet && chipTypeA.Value == null) - throw new ArgumentNullException(nameof(chipTypeA), "Property is not nullable for class RfidCardPropertiesExt."); - - if (supportMifare.IsSet && supportMifare.Value == null) - throw new ArgumentNullException(nameof(supportMifare), "Property is not nullable for class RfidCardPropertiesExt."); - - if (mifareMemory.IsSet && mifareMemory.Value == null) - throw new ArgumentNullException(nameof(mifareMemory), "Property is not nullable for class RfidCardPropertiesExt."); - - if (uID.IsSet && uID.Value == null) - throw new ArgumentNullException(nameof(uID), "Property is not nullable for class RfidCardPropertiesExt."); - - if (bitRateS.IsSet && bitRateS.Value == null) - throw new ArgumentNullException(nameof(bitRateS), "Property is not nullable for class RfidCardPropertiesExt."); - - if (bitRateR.IsSet && bitRateR.Value == null) - throw new ArgumentNullException(nameof(bitRateR), "Property is not nullable for class RfidCardPropertiesExt."); - - if (aTR.IsSet && aTR.Value == null) - throw new ArgumentNullException(nameof(aTR), "Property is not nullable for class RfidCardPropertiesExt."); - - return new RfidCardPropertiesExt(rFIDType.Value!.Value!, baudrate1.Value!, baudrate2.Value!, support4.Value!.Value!, chipTypeA.Value!.Value!, supportMifare.Value!.Value!, mifareMemory.Value!.Value!, uID.Value!, bitRateS.Value!.Value!, bitRateR.Value!.Value!, aTR.Value!, aTQA.Value!, sAK.Value!, aTQB.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidCardPropertiesExt rfidCardPropertiesExt, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidCardPropertiesExt, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidCardPropertiesExt rfidCardPropertiesExt, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidCardPropertiesExt.Baudrate1 == null) - throw new ArgumentNullException(nameof(rfidCardPropertiesExt.Baudrate1), "Property is required for class RfidCardPropertiesExt."); - - if (rfidCardPropertiesExt.Baudrate2 == null) - throw new ArgumentNullException(nameof(rfidCardPropertiesExt.Baudrate2), "Property is required for class RfidCardPropertiesExt."); - - if (rfidCardPropertiesExt.UID == null) - throw new ArgumentNullException(nameof(rfidCardPropertiesExt.UID), "Property is required for class RfidCardPropertiesExt."); - - if (rfidCardPropertiesExt.ATR == null) - throw new ArgumentNullException(nameof(rfidCardPropertiesExt.ATR), "Property is required for class RfidCardPropertiesExt."); - - var rFIDTypeRawValue = RfidTypeValueConverter.ToJsonValue(rfidCardPropertiesExt.RFIDType); - writer.WriteNumber("RFID_Type", rFIDTypeRawValue); - - writer.WriteString("Baudrate1", rfidCardPropertiesExt.Baudrate1); - - writer.WriteString("Baudrate2", rfidCardPropertiesExt.Baudrate2); - - writer.WriteBoolean("Support_4", rfidCardPropertiesExt.Support4); - - var chipTypeARawValue = RfidAChipValueConverter.ToJsonValue(rfidCardPropertiesExt.ChipTypeA); - writer.WriteNumber("ChipType_A", chipTypeARawValue); - - writer.WriteBoolean("Support_Mifare", rfidCardPropertiesExt.SupportMifare); - - writer.WriteNumber("MifareMemory", rfidCardPropertiesExt.MifareMemory); - - writer.WriteString("UID", rfidCardPropertiesExt.UID); - - var bitRateSRawValue = RfidBaudRateValueConverter.ToJsonValue(rfidCardPropertiesExt.BitRateS); - writer.WriteNumber("BitRateS", bitRateSRawValue); - - var bitRateRRawValue = RfidBaudRateValueConverter.ToJsonValue(rfidCardPropertiesExt.BitRateR); - writer.WriteNumber("BitRateR", bitRateRRawValue); - - writer.WriteString("ATR", rfidCardPropertiesExt.ATR); - - if (rfidCardPropertiesExt.ATQ_A != null) - { - writer.WritePropertyName("ATQ_A"); - JsonSerializer.Serialize(writer, rfidCardPropertiesExt.ATQ_A, jsonSerializerOptions); - } - else - writer.WriteNull("ATQ_A"); - if (rfidCardPropertiesExt.SAK != null) - { - writer.WritePropertyName("SAK"); - JsonSerializer.Serialize(writer, rfidCardPropertiesExt.SAK, jsonSerializerOptions); - } - else - writer.WriteNull("SAK"); - if (rfidCardPropertiesExt.ATQ_B != null) - { - writer.WritePropertyName("ATQ_B"); - JsonSerializer.Serialize(writer, rfidCardPropertiesExt.ATQ_B, jsonSerializerOptions); - } - else - writer.WriteNull("ATQ_B"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs index 2383eda..ceebcd7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateEx.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,139 +14,189 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the certificate contents used for the digital signature verification of the document security object within the context of the communication session with electronic document. /// + [DataContract(Name = "RfidCertificateEx")] public partial class RfidCertificateEx : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// Version of Certificate ASN.1 structure - /// Certificate serial number. Base64 encoded. - /// Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). - /// issuer - /// validity - /// subject - /// Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). - /// List of the certificate extensions - /// List of remarks arisen during the analysis of the certificate data structure and its validity verification. - /// origin - /// type - /// fileName - /// pAStatus - [JsonConstructor] - public RfidCertificateEx(decimal varVersion, string serialNumber, string signatureAlgorithm, RfidDistinguishedName issuer, RfidValidity validity, RfidDistinguishedName subject, string subjectPKAlgorithm, List extensions, List notifications, RfidCertificateOrigin origin, RfidCertificateType type, TrfFtString fileName, RFIDErrorCodes pAStatus) - { - VarVersion = varVersion; - SerialNumber = serialNumber; - SignatureAlgorithm = signatureAlgorithm; - Issuer = issuer; - Validity = validity; - Subject = subject; - SubjectPKAlgorithm = subjectPKAlgorithm; - Extensions = extensions; - Notifications = notifications; - Origin = origin; - Type = type; - FileName = fileName; - PAStatus = pAStatus; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Origin /// - [JsonPropertyName("Origin")] + [DataMember(Name = "Origin", IsRequired = true, EmitDefaultValue = true)] public RfidCertificateOrigin Origin { get; set; } /// /// Gets or Sets Type /// - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public RfidCertificateType Type { get; set; } /// /// Gets or Sets PAStatus /// - [JsonPropertyName("PA_Status")] + [DataMember(Name = "PA_Status", IsRequired = true, EmitDefaultValue = true)] public RFIDErrorCodes PAStatus { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RfidCertificateEx() { } + /// + /// Initializes a new instance of the class. + /// + /// Version of Certificate ASN.1 structure (required). + /// Certificate serial number. Base64 encoded. (required). + /// Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). (required). + /// issuer (required). + /// validity (required). + /// subject (required). + /// Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). (required). + /// List of the certificate extensions (required). + /// List of remarks arisen during the analysis of the certificate data structure and its validity verification. (required). + /// origin (required). + /// type (required). + /// fileName (required). + /// pAStatus (required). + public RfidCertificateEx(decimal varVersion = default(decimal), string serialNumber = default(string), string signatureAlgorithm = default(string), RfidDistinguishedName issuer = default(RfidDistinguishedName), RfidValidity validity = default(RfidValidity), RfidDistinguishedName subject = default(RfidDistinguishedName), string subjectPKAlgorithm = default(string), List extensions = default(List), List notifications = default(List), RfidCertificateOrigin origin = default(RfidCertificateOrigin), RfidCertificateType type = default(RfidCertificateType), TrfFtString fileName = default(TrfFtString), RFIDErrorCodes pAStatus = default(RFIDErrorCodes)) + { + this.VarVersion = varVersion; + // to ensure "serialNumber" is required (not null) + if (serialNumber == null) + { + throw new ArgumentNullException("serialNumber is a required property for RfidCertificateEx and cannot be null"); + } + this.SerialNumber = serialNumber; + // to ensure "signatureAlgorithm" is required (not null) + if (signatureAlgorithm == null) + { + throw new ArgumentNullException("signatureAlgorithm is a required property for RfidCertificateEx and cannot be null"); + } + this.SignatureAlgorithm = signatureAlgorithm; + // to ensure "issuer" is required (not null) + if (issuer == null) + { + throw new ArgumentNullException("issuer is a required property for RfidCertificateEx and cannot be null"); + } + this.Issuer = issuer; + // to ensure "validity" is required (not null) + if (validity == null) + { + throw new ArgumentNullException("validity is a required property for RfidCertificateEx and cannot be null"); + } + this.Validity = validity; + // to ensure "subject" is required (not null) + if (subject == null) + { + throw new ArgumentNullException("subject is a required property for RfidCertificateEx and cannot be null"); + } + this.Subject = subject; + // to ensure "subjectPKAlgorithm" is required (not null) + if (subjectPKAlgorithm == null) + { + throw new ArgumentNullException("subjectPKAlgorithm is a required property for RfidCertificateEx and cannot be null"); + } + this.SubjectPKAlgorithm = subjectPKAlgorithm; + // to ensure "extensions" is required (not null) + if (extensions == null) + { + throw new ArgumentNullException("extensions is a required property for RfidCertificateEx and cannot be null"); + } + this.Extensions = extensions; + // to ensure "notifications" is required (not null) + if (notifications == null) + { + throw new ArgumentNullException("notifications is a required property for RfidCertificateEx and cannot be null"); + } + this.Notifications = notifications; + this.Origin = origin; + this.Type = type; + // to ensure "fileName" is required (not null) + if (fileName == null) + { + throw new ArgumentNullException("fileName is a required property for RfidCertificateEx and cannot be null"); + } + this.FileName = fileName; + this.PAStatus = pAStatus; + } /// /// Version of Certificate ASN.1 structure /// /// Version of Certificate ASN.1 structure - [JsonPropertyName("Version")] + [DataMember(Name = "Version", IsRequired = true, EmitDefaultValue = true)] public decimal VarVersion { get; set; } /// /// Certificate serial number. Base64 encoded. /// /// Certificate serial number. Base64 encoded. - [JsonPropertyName("SerialNumber")] + [DataMember(Name = "SerialNumber", IsRequired = true, EmitDefaultValue = true)] public string SerialNumber { get; set; } /// /// Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). /// /// Certificate digital signature algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). - [JsonPropertyName("SignatureAlgorithm")] + [DataMember(Name = "SignatureAlgorithm", IsRequired = true, EmitDefaultValue = true)] public string SignatureAlgorithm { get; set; } /// /// Gets or Sets Issuer /// - [JsonPropertyName("Issuer")] + [DataMember(Name = "Issuer", IsRequired = true, EmitDefaultValue = true)] public RfidDistinguishedName Issuer { get; set; } /// /// Gets or Sets Validity /// - [JsonPropertyName("Validity")] + [DataMember(Name = "Validity", IsRequired = true, EmitDefaultValue = true)] public RfidValidity Validity { get; set; } /// /// Gets or Sets Subject /// - [JsonPropertyName("Subject")] + [DataMember(Name = "Subject", IsRequired = true, EmitDefaultValue = true)] public RfidDistinguishedName Subject { get; set; } /// /// Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). /// /// Certificate public key algorithm identifier (OID); String in the format S1 (S2), where S1 – algorithm name, S2 – identifier (OID string). - [JsonPropertyName("SubjectPKAlgorithm")] + [DataMember(Name = "SubjectPKAlgorithm", IsRequired = true, EmitDefaultValue = true)] public string SubjectPKAlgorithm { get; set; } /// /// List of the certificate extensions /// /// List of the certificate extensions - [JsonPropertyName("Extensions")] + [DataMember(Name = "Extensions", IsRequired = true, EmitDefaultValue = true)] public List Extensions { get; set; } /// /// List of remarks arisen during the analysis of the certificate data structure and its validity verification. /// /// List of remarks arisen during the analysis of the certificate data structure and its validity verification. - [JsonPropertyName("Notifications")] + [DataMember(Name = "Notifications", IsRequired = true, EmitDefaultValue = true)] public List Notifications { get; set; } /// /// Gets or Sets FileName /// - [JsonPropertyName("FileName")] + [DataMember(Name = "FileName", IsRequired = true, EmitDefaultValue = true)] public TrfFtString FileName { get; set; } /// @@ -176,6 +224,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -187,275 +244,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidCertificateExJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidCertificateEx Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option varVersion = default; - Option serialNumber = default; - Option signatureAlgorithm = default; - Option issuer = default; - Option validity = default; - Option subject = default; - Option subjectPKAlgorithm = default; - Option?> extensions = default; - Option?> notifications = default; - Option origin = default; - Option type = default; - Option fileName = default; - Option pAStatus = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Version": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - varVersion = new Option(utf8JsonReader.GetDecimal()); - break; - case "SerialNumber": - serialNumber = new Option(utf8JsonReader.GetString()!); - break; - case "SignatureAlgorithm": - signatureAlgorithm = new Option(utf8JsonReader.GetString()!); - break; - case "Issuer": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - issuer = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Validity": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - validity = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Subject": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - subject = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SubjectPKAlgorithm": - subjectPKAlgorithm = new Option(utf8JsonReader.GetString()!); - break; - case "Extensions": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - extensions = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Notifications": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Origin": - string? originRawValue = utf8JsonReader.GetString(); - if (originRawValue != null) - origin = new Option(RfidCertificateOriginValueConverter.FromStringOrDefault(originRawValue)); - break; - case "Type": - string? typeRawValue = utf8JsonReader.GetString(); - if (typeRawValue != null) - type = new Option(RfidCertificateTypeValueConverter.FromStringOrDefault(typeRawValue)); - break; - case "FileName": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fileName = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "PA_Status": - string? pAStatusRawValue = utf8JsonReader.GetString(); - if (pAStatusRawValue != null) - pAStatus = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(pAStatusRawValue)); - break; - default: - break; - } - } - } - - if (!varVersion.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(varVersion)); - - if (!serialNumber.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(serialNumber)); - - if (!signatureAlgorithm.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(signatureAlgorithm)); - - if (!issuer.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(issuer)); - - if (!validity.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(validity)); - - if (!subject.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(subject)); - - if (!subjectPKAlgorithm.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(subjectPKAlgorithm)); - - if (!extensions.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(extensions)); - - if (!notifications.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(notifications)); - - if (!origin.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(origin)); - - if (!type.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(type)); - - if (!fileName.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(fileName)); - - if (!pAStatus.IsSet) - throw new ArgumentException("Property is required for class RfidCertificateEx.", nameof(pAStatus)); - - if (varVersion.IsSet && varVersion.Value == null) - throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class RfidCertificateEx."); - - if (serialNumber.IsSet && serialNumber.Value == null) - throw new ArgumentNullException(nameof(serialNumber), "Property is not nullable for class RfidCertificateEx."); - - if (signatureAlgorithm.IsSet && signatureAlgorithm.Value == null) - throw new ArgumentNullException(nameof(signatureAlgorithm), "Property is not nullable for class RfidCertificateEx."); - - if (issuer.IsSet && issuer.Value == null) - throw new ArgumentNullException(nameof(issuer), "Property is not nullable for class RfidCertificateEx."); - - if (validity.IsSet && validity.Value == null) - throw new ArgumentNullException(nameof(validity), "Property is not nullable for class RfidCertificateEx."); - - if (subject.IsSet && subject.Value == null) - throw new ArgumentNullException(nameof(subject), "Property is not nullable for class RfidCertificateEx."); - - if (subjectPKAlgorithm.IsSet && subjectPKAlgorithm.Value == null) - throw new ArgumentNullException(nameof(subjectPKAlgorithm), "Property is not nullable for class RfidCertificateEx."); - - if (extensions.IsSet && extensions.Value == null) - throw new ArgumentNullException(nameof(extensions), "Property is not nullable for class RfidCertificateEx."); - - if (notifications.IsSet && notifications.Value == null) - throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidCertificateEx."); - - if (origin.IsSet && origin.Value == null) - throw new ArgumentNullException(nameof(origin), "Property is not nullable for class RfidCertificateEx."); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidCertificateEx."); - - if (fileName.IsSet && fileName.Value == null) - throw new ArgumentNullException(nameof(fileName), "Property is not nullable for class RfidCertificateEx."); - - if (pAStatus.IsSet && pAStatus.Value == null) - throw new ArgumentNullException(nameof(pAStatus), "Property is not nullable for class RfidCertificateEx."); - - return new RfidCertificateEx(varVersion.Value!.Value!, serialNumber.Value!, signatureAlgorithm.Value!, issuer.Value!, validity.Value!, subject.Value!, subjectPKAlgorithm.Value!, extensions.Value!, notifications.Value!, origin.Value!.Value!, type.Value!.Value!, fileName.Value!, pAStatus.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidCertificateEx rfidCertificateEx, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidCertificateEx, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidCertificateEx rfidCertificateEx, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidCertificateEx.SerialNumber == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.SerialNumber), "Property is required for class RfidCertificateEx."); - - if (rfidCertificateEx.SignatureAlgorithm == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.SignatureAlgorithm), "Property is required for class RfidCertificateEx."); - - if (rfidCertificateEx.Issuer == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.Issuer), "Property is required for class RfidCertificateEx."); - - if (rfidCertificateEx.Validity == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.Validity), "Property is required for class RfidCertificateEx."); - - if (rfidCertificateEx.Subject == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.Subject), "Property is required for class RfidCertificateEx."); - - if (rfidCertificateEx.SubjectPKAlgorithm == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.SubjectPKAlgorithm), "Property is required for class RfidCertificateEx."); - - if (rfidCertificateEx.Extensions == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.Extensions), "Property is required for class RfidCertificateEx."); - - if (rfidCertificateEx.Notifications == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.Notifications), "Property is required for class RfidCertificateEx."); - - if (rfidCertificateEx.FileName == null) - throw new ArgumentNullException(nameof(rfidCertificateEx.FileName), "Property is required for class RfidCertificateEx."); - - writer.WriteNumber("Version", rfidCertificateEx.VarVersion); - - writer.WriteString("SerialNumber", rfidCertificateEx.SerialNumber); - - writer.WriteString("SignatureAlgorithm", rfidCertificateEx.SignatureAlgorithm); - - writer.WritePropertyName("Issuer"); - JsonSerializer.Serialize(writer, rfidCertificateEx.Issuer, jsonSerializerOptions); - writer.WritePropertyName("Validity"); - JsonSerializer.Serialize(writer, rfidCertificateEx.Validity, jsonSerializerOptions); - writer.WritePropertyName("Subject"); - JsonSerializer.Serialize(writer, rfidCertificateEx.Subject, jsonSerializerOptions); - writer.WriteString("SubjectPKAlgorithm", rfidCertificateEx.SubjectPKAlgorithm); - - writer.WritePropertyName("Extensions"); - JsonSerializer.Serialize(writer, rfidCertificateEx.Extensions, jsonSerializerOptions); - writer.WritePropertyName("Notifications"); - JsonSerializer.Serialize(writer, rfidCertificateEx.Notifications, jsonSerializerOptions); - var originRawValue = RfidCertificateOriginValueConverter.ToJsonValue(rfidCertificateEx.Origin); - writer.WriteNumber("Origin", originRawValue); - - var typeRawValue = RfidCertificateTypeValueConverter.ToJsonValue(rfidCertificateEx.Type); - writer.WriteNumber("Type", typeRawValue); - - writer.WritePropertyName("FileName"); - JsonSerializer.Serialize(writer, rfidCertificateEx.FileName, jsonSerializerOptions); - var pAStatusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidCertificateEx.PAStatus); - writer.WriteNumber("PA_Status", pAStatusRawValue); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs index 1479bf8..40ac563 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateOrigin.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -77,171 +78,4 @@ public enum RfidCertificateOrigin BLACK_LIST_SO = 8 } - /// - /// Converts to and from the JSON value - /// - public static class RfidCertificateOriginValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidCertificateOrigin FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidCertificateOrigin.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidCertificateOrigin.PKD; - - if (value.Equals((2).ToString())) - return RfidCertificateOrigin.SECURITY_OBJECT; - - if (value.Equals((3).ToString())) - return RfidCertificateOrigin.USER_DEFINED; - - if (value.Equals((4).ToString())) - return RfidCertificateOrigin.MASTER_LIST_PKD; - - if (value.Equals((5).ToString())) - return RfidCertificateOrigin.MASTER_LIST_SO; - - if (value.Equals((6).ToString())) - return RfidCertificateOrigin.DEFECT_LIST_SO; - - if (value.Equals((7).ToString())) - return RfidCertificateOrigin.DEVIATION_LIST_SO; - - if (value.Equals((8).ToString())) - return RfidCertificateOrigin.BLACK_LIST_SO; - - throw new NotImplementedException($"Could not convert value to type RfidCertificateOrigin: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidCertificateOrigin? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidCertificateOrigin.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidCertificateOrigin.PKD; - - if (value.Equals((2).ToString())) - return RfidCertificateOrigin.SECURITY_OBJECT; - - if (value.Equals((3).ToString())) - return RfidCertificateOrigin.USER_DEFINED; - - if (value.Equals((4).ToString())) - return RfidCertificateOrigin.MASTER_LIST_PKD; - - if (value.Equals((5).ToString())) - return RfidCertificateOrigin.MASTER_LIST_SO; - - if (value.Equals((6).ToString())) - return RfidCertificateOrigin.DEFECT_LIST_SO; - - if (value.Equals((7).ToString())) - return RfidCertificateOrigin.DEVIATION_LIST_SO; - - if (value.Equals((8).ToString())) - return RfidCertificateOrigin.BLACK_LIST_SO; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidCertificateOrigin value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidCertificateOriginJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidCertificateOrigin Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidCertificateOrigin? result = rawValue == null - ? null - : RfidCertificateOriginValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidCertificateOrigin to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidCertificateOrigin rfidCertificateOrigin, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidCertificateOrigin.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidCertificateOriginNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidCertificateOrigin from the Json object - /// - /// - /// - /// - /// - public override RfidCertificateOrigin? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidCertificateOrigin? result = rawValue == null - ? null - : RfidCertificateOriginValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidCertificateOrigin? rfidCertificateOrigin, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidCertificateOrigin?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs index c6143d7..80dd1d9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidCertificateType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -72,165 +73,4 @@ public enum RfidCertificateType BLS = 7 } - /// - /// Converts to and from the JSON value - /// - public static class RfidCertificateTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidCertificateType FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidCertificateType.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidCertificateType.CSCA; - - if (value.Equals((2).ToString())) - return RfidCertificateType.CSCA_LINK; - - if (value.Equals((3).ToString())) - return RfidCertificateType.DS; - - if (value.Equals((4).ToString())) - return RfidCertificateType.MLS; - - if (value.Equals((5).ToString())) - return RfidCertificateType.DEV_LS; - - if (value.Equals((6).ToString())) - return RfidCertificateType.DEF_LS; - - if (value.Equals((7).ToString())) - return RfidCertificateType.BLS; - - throw new NotImplementedException($"Could not convert value to type RfidCertificateType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidCertificateType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidCertificateType.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidCertificateType.CSCA; - - if (value.Equals((2).ToString())) - return RfidCertificateType.CSCA_LINK; - - if (value.Equals((3).ToString())) - return RfidCertificateType.DS; - - if (value.Equals((4).ToString())) - return RfidCertificateType.MLS; - - if (value.Equals((5).ToString())) - return RfidCertificateType.DEV_LS; - - if (value.Equals((6).ToString())) - return RfidCertificateType.DEF_LS; - - if (value.Equals((7).ToString())) - return RfidCertificateType.BLS; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidCertificateType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidCertificateTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidCertificateType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidCertificateType? result = rawValue == null - ? null - : RfidCertificateTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidCertificateType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidCertificateType rfidCertificateType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidCertificateType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidCertificateTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidCertificateType from the Json object - /// - /// - /// - /// - /// - public override RfidCertificateType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidCertificateType? result = rawValue == null - ? null - : RfidCertificateTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidCertificateType? rfidCertificateType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidCertificateType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs index d548e77..f0981b0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDG1.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,171 +14,221 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure used to store the contents of EF.DG1 informational data group of ePassport application – document MRZ data /// + [DataContract(Name = "RfidDG1")] public partial class RfidDG1 : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// type - /// documentID - /// Symbolic code of document type - /// Symbolic code of document issuing state - /// DO’s name and surname - /// Document number - /// Check digit of document number - /// Symbolic code of DO’s nationality - /// DO’s date of birth - /// Check digit of DO’s date of birth - /// DO’s sex - /// Term of validity of the document - /// Check digit of term of validity of the document - /// DO’s personal number or other additional data - /// Check digit of additional data - /// General check digit - [JsonConstructor] - public RfidDG1(RfidDataGroupTypeTag type, DocumentFormat documentID, string documentType, string state, string holder, string documentNumber, decimal checkDigitDocumentNumber, string nationality, string birthday, decimal checkDigitBirthday, string sex, string expiryDate, decimal checkDigitExpiryDate, string optionalData, decimal checkDigitOptionalData, decimal checkDigitComposite) - { - Type = type; - DocumentID = documentID; - DocumentType = documentType; - State = state; - Holder = holder; - DocumentNumber = documentNumber; - CheckDigitDocumentNumber = checkDigitDocumentNumber; - Nationality = nationality; - Birthday = birthday; - CheckDigitBirthday = checkDigitBirthday; - Sex = sex; - ExpiryDate = expiryDate; - CheckDigitExpiryDate = checkDigitExpiryDate; - OptionalData = optionalData; - CheckDigitOptionalData = checkDigitOptionalData; - CheckDigitComposite = checkDigitComposite; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Type /// - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public RfidDataGroupTypeTag Type { get; set; } /// /// Gets or Sets DocumentID /// - [JsonPropertyName("DocumentID")] + [DataMember(Name = "DocumentID", IsRequired = true, EmitDefaultValue = true)] public DocumentFormat DocumentID { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RfidDG1() { } + /// + /// Initializes a new instance of the class. + /// + /// type (required). + /// documentID (required). + /// Symbolic code of document type (required). + /// Symbolic code of document issuing state (required). + /// DO’s name and surname (required). + /// Document number (required). + /// Check digit of document number (required). + /// Symbolic code of DO’s nationality (required). + /// DO’s date of birth (required). + /// Check digit of DO’s date of birth (required). + /// DO’s sex (required). + /// Term of validity of the document (required). + /// Check digit of term of validity of the document (required). + /// DO’s personal number or other additional data (required). + /// Check digit of additional data (required). + /// General check digit (required). + public RfidDG1(RfidDataGroupTypeTag type = default(RfidDataGroupTypeTag), DocumentFormat documentID = default(DocumentFormat), string documentType = default(string), string state = default(string), string holder = default(string), string documentNumber = default(string), decimal checkDigitDocumentNumber = default(decimal), string nationality = default(string), string birthday = default(string), decimal checkDigitBirthday = default(decimal), string sex = default(string), string expiryDate = default(string), decimal checkDigitExpiryDate = default(decimal), string optionalData = default(string), decimal checkDigitOptionalData = default(decimal), decimal checkDigitComposite = default(decimal)) + { + this.Type = type; + this.DocumentID = documentID; + // to ensure "documentType" is required (not null) + if (documentType == null) + { + throw new ArgumentNullException("documentType is a required property for RfidDG1 and cannot be null"); + } + this.DocumentType = documentType; + // to ensure "state" is required (not null) + if (state == null) + { + throw new ArgumentNullException("state is a required property for RfidDG1 and cannot be null"); + } + this.State = state; + // to ensure "holder" is required (not null) + if (holder == null) + { + throw new ArgumentNullException("holder is a required property for RfidDG1 and cannot be null"); + } + this.Holder = holder; + // to ensure "documentNumber" is required (not null) + if (documentNumber == null) + { + throw new ArgumentNullException("documentNumber is a required property for RfidDG1 and cannot be null"); + } + this.DocumentNumber = documentNumber; + this.CheckDigitDocumentNumber = checkDigitDocumentNumber; + // to ensure "nationality" is required (not null) + if (nationality == null) + { + throw new ArgumentNullException("nationality is a required property for RfidDG1 and cannot be null"); + } + this.Nationality = nationality; + // to ensure "birthday" is required (not null) + if (birthday == null) + { + throw new ArgumentNullException("birthday is a required property for RfidDG1 and cannot be null"); + } + this.Birthday = birthday; + this.CheckDigitBirthday = checkDigitBirthday; + // to ensure "sex" is required (not null) + if (sex == null) + { + throw new ArgumentNullException("sex is a required property for RfidDG1 and cannot be null"); + } + this.Sex = sex; + // to ensure "expiryDate" is required (not null) + if (expiryDate == null) + { + throw new ArgumentNullException("expiryDate is a required property for RfidDG1 and cannot be null"); + } + this.ExpiryDate = expiryDate; + this.CheckDigitExpiryDate = checkDigitExpiryDate; + // to ensure "optionalData" is required (not null) + if (optionalData == null) + { + throw new ArgumentNullException("optionalData is a required property for RfidDG1 and cannot be null"); + } + this.OptionalData = optionalData; + this.CheckDigitOptionalData = checkDigitOptionalData; + this.CheckDigitComposite = checkDigitComposite; + } /// /// Symbolic code of document type /// /// Symbolic code of document type - [JsonPropertyName("DocumentType")] + [DataMember(Name = "DocumentType", IsRequired = true, EmitDefaultValue = true)] public string DocumentType { get; set; } /// /// Symbolic code of document issuing state /// /// Symbolic code of document issuing state - [JsonPropertyName("State")] + [DataMember(Name = "State", IsRequired = true, EmitDefaultValue = true)] public string State { get; set; } /// /// DO’s name and surname /// /// DO’s name and surname - [JsonPropertyName("Holder")] + [DataMember(Name = "Holder", IsRequired = true, EmitDefaultValue = true)] public string Holder { get; set; } /// /// Document number /// /// Document number - [JsonPropertyName("DocumentNumber")] + [DataMember(Name = "DocumentNumber", IsRequired = true, EmitDefaultValue = true)] public string DocumentNumber { get; set; } /// /// Check digit of document number /// /// Check digit of document number - [JsonPropertyName("CheckDigitDocumentNumber")] + [DataMember(Name = "CheckDigitDocumentNumber", IsRequired = true, EmitDefaultValue = true)] public decimal CheckDigitDocumentNumber { get; set; } /// /// Symbolic code of DO’s nationality /// /// Symbolic code of DO’s nationality - [JsonPropertyName("Nationality")] + [DataMember(Name = "Nationality", IsRequired = true, EmitDefaultValue = true)] public string Nationality { get; set; } /// /// DO’s date of birth /// /// DO’s date of birth - [JsonPropertyName("Birthday")] + [DataMember(Name = "Birthday", IsRequired = true, EmitDefaultValue = true)] public string Birthday { get; set; } /// /// Check digit of DO’s date of birth /// /// Check digit of DO’s date of birth - [JsonPropertyName("CheckDigitBirthday")] + [DataMember(Name = "CheckDigitBirthday", IsRequired = true, EmitDefaultValue = true)] public decimal CheckDigitBirthday { get; set; } /// /// DO’s sex /// /// DO’s sex - [JsonPropertyName("Sex")] + [DataMember(Name = "Sex", IsRequired = true, EmitDefaultValue = true)] public string Sex { get; set; } /// /// Term of validity of the document /// /// Term of validity of the document - [JsonPropertyName("ExpiryDate")] + [DataMember(Name = "ExpiryDate", IsRequired = true, EmitDefaultValue = true)] public string ExpiryDate { get; set; } /// /// Check digit of term of validity of the document /// /// Check digit of term of validity of the document - [JsonPropertyName("CheckDigitExpiryDate")] + [DataMember(Name = "CheckDigitExpiryDate", IsRequired = true, EmitDefaultValue = true)] public decimal CheckDigitExpiryDate { get; set; } /// /// DO’s personal number or other additional data /// /// DO’s personal number or other additional data - [JsonPropertyName("OptionalData")] + [DataMember(Name = "OptionalData", IsRequired = true, EmitDefaultValue = true)] public string OptionalData { get; set; } /// /// Check digit of additional data /// /// Check digit of additional data - [JsonPropertyName("CheckDigitOptionalData")] + [DataMember(Name = "CheckDigitOptionalData", IsRequired = true, EmitDefaultValue = true)] public decimal CheckDigitOptionalData { get; set; } /// /// General check digit /// /// General check digit - [JsonPropertyName("CheckDigitComposite")] + [DataMember(Name = "CheckDigitComposite", IsRequired = true, EmitDefaultValue = true)] public decimal CheckDigitComposite { get; set; } /// @@ -211,6 +259,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -222,306 +279,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidDG1JsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidDG1 Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option documentID = default; - Option documentType = default; - Option state = default; - Option holder = default; - Option documentNumber = default; - Option checkDigitDocumentNumber = default; - Option nationality = default; - Option birthday = default; - Option checkDigitBirthday = default; - Option sex = default; - Option expiryDate = default; - Option checkDigitExpiryDate = default; - Option optionalData = default; - Option checkDigitOptionalData = default; - Option checkDigitComposite = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - string? typeRawValue = utf8JsonReader.GetString(); - if (typeRawValue != null) - type = new Option(RfidDataGroupTypeTagValueConverter.FromStringOrDefault(typeRawValue)); - break; - case "DocumentID": - string? documentIDRawValue = utf8JsonReader.GetString(); - if (documentIDRawValue != null) - documentID = new Option(DocumentFormatValueConverter.FromStringOrDefault(documentIDRawValue)); - break; - case "DocumentType": - documentType = new Option(utf8JsonReader.GetString()!); - break; - case "State": - state = new Option(utf8JsonReader.GetString()!); - break; - case "Holder": - holder = new Option(utf8JsonReader.GetString()!); - break; - case "DocumentNumber": - documentNumber = new Option(utf8JsonReader.GetString()!); - break; - case "CheckDigitDocumentNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkDigitDocumentNumber = new Option(utf8JsonReader.GetDecimal()); - break; - case "Nationality": - nationality = new Option(utf8JsonReader.GetString()!); - break; - case "Birthday": - birthday = new Option(utf8JsonReader.GetString()!); - break; - case "CheckDigitBirthday": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkDigitBirthday = new Option(utf8JsonReader.GetDecimal()); - break; - case "Sex": - sex = new Option(utf8JsonReader.GetString()!); - break; - case "ExpiryDate": - expiryDate = new Option(utf8JsonReader.GetString()!); - break; - case "CheckDigitExpiryDate": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkDigitExpiryDate = new Option(utf8JsonReader.GetDecimal()); - break; - case "OptionalData": - optionalData = new Option(utf8JsonReader.GetString()!); - break; - case "CheckDigitOptionalData": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkDigitOptionalData = new Option(utf8JsonReader.GetDecimal()); - break; - case "CheckDigitComposite": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - checkDigitComposite = new Option(utf8JsonReader.GetDecimal()); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(type)); - - if (!documentID.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(documentID)); - - if (!documentType.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(documentType)); - - if (!state.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(state)); - - if (!holder.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(holder)); - - if (!documentNumber.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(documentNumber)); - - if (!checkDigitDocumentNumber.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitDocumentNumber)); - - if (!nationality.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(nationality)); - - if (!birthday.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(birthday)); - - if (!checkDigitBirthday.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitBirthday)); - - if (!sex.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(sex)); - - if (!expiryDate.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(expiryDate)); - - if (!checkDigitExpiryDate.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitExpiryDate)); - - if (!optionalData.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(optionalData)); - - if (!checkDigitOptionalData.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitOptionalData)); - - if (!checkDigitComposite.IsSet) - throw new ArgumentException("Property is required for class RfidDG1.", nameof(checkDigitComposite)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidDG1."); - - if (documentID.IsSet && documentID.Value == null) - throw new ArgumentNullException(nameof(documentID), "Property is not nullable for class RfidDG1."); - - if (documentType.IsSet && documentType.Value == null) - throw new ArgumentNullException(nameof(documentType), "Property is not nullable for class RfidDG1."); - - if (state.IsSet && state.Value == null) - throw new ArgumentNullException(nameof(state), "Property is not nullable for class RfidDG1."); - - if (holder.IsSet && holder.Value == null) - throw new ArgumentNullException(nameof(holder), "Property is not nullable for class RfidDG1."); - - if (documentNumber.IsSet && documentNumber.Value == null) - throw new ArgumentNullException(nameof(documentNumber), "Property is not nullable for class RfidDG1."); - - if (checkDigitDocumentNumber.IsSet && checkDigitDocumentNumber.Value == null) - throw new ArgumentNullException(nameof(checkDigitDocumentNumber), "Property is not nullable for class RfidDG1."); - - if (nationality.IsSet && nationality.Value == null) - throw new ArgumentNullException(nameof(nationality), "Property is not nullable for class RfidDG1."); - - if (birthday.IsSet && birthday.Value == null) - throw new ArgumentNullException(nameof(birthday), "Property is not nullable for class RfidDG1."); - - if (checkDigitBirthday.IsSet && checkDigitBirthday.Value == null) - throw new ArgumentNullException(nameof(checkDigitBirthday), "Property is not nullable for class RfidDG1."); - - if (sex.IsSet && sex.Value == null) - throw new ArgumentNullException(nameof(sex), "Property is not nullable for class RfidDG1."); - - if (expiryDate.IsSet && expiryDate.Value == null) - throw new ArgumentNullException(nameof(expiryDate), "Property is not nullable for class RfidDG1."); - - if (checkDigitExpiryDate.IsSet && checkDigitExpiryDate.Value == null) - throw new ArgumentNullException(nameof(checkDigitExpiryDate), "Property is not nullable for class RfidDG1."); - - if (optionalData.IsSet && optionalData.Value == null) - throw new ArgumentNullException(nameof(optionalData), "Property is not nullable for class RfidDG1."); - - if (checkDigitOptionalData.IsSet && checkDigitOptionalData.Value == null) - throw new ArgumentNullException(nameof(checkDigitOptionalData), "Property is not nullable for class RfidDG1."); - - if (checkDigitComposite.IsSet && checkDigitComposite.Value == null) - throw new ArgumentNullException(nameof(checkDigitComposite), "Property is not nullable for class RfidDG1."); - - return new RfidDG1(type.Value!.Value!, documentID.Value!.Value!, documentType.Value!, state.Value!, holder.Value!, documentNumber.Value!, checkDigitDocumentNumber.Value!.Value!, nationality.Value!, birthday.Value!, checkDigitBirthday.Value!.Value!, sex.Value!, expiryDate.Value!, checkDigitExpiryDate.Value!.Value!, optionalData.Value!, checkDigitOptionalData.Value!.Value!, checkDigitComposite.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidDG1 rfidDG1, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidDG1, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidDG1 rfidDG1, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidDG1.DocumentType == null) - throw new ArgumentNullException(nameof(rfidDG1.DocumentType), "Property is required for class RfidDG1."); - - if (rfidDG1.State == null) - throw new ArgumentNullException(nameof(rfidDG1.State), "Property is required for class RfidDG1."); - - if (rfidDG1.Holder == null) - throw new ArgumentNullException(nameof(rfidDG1.Holder), "Property is required for class RfidDG1."); - - if (rfidDG1.DocumentNumber == null) - throw new ArgumentNullException(nameof(rfidDG1.DocumentNumber), "Property is required for class RfidDG1."); - - if (rfidDG1.Nationality == null) - throw new ArgumentNullException(nameof(rfidDG1.Nationality), "Property is required for class RfidDG1."); - - if (rfidDG1.Birthday == null) - throw new ArgumentNullException(nameof(rfidDG1.Birthday), "Property is required for class RfidDG1."); - - if (rfidDG1.Sex == null) - throw new ArgumentNullException(nameof(rfidDG1.Sex), "Property is required for class RfidDG1."); - - if (rfidDG1.ExpiryDate == null) - throw new ArgumentNullException(nameof(rfidDG1.ExpiryDate), "Property is required for class RfidDG1."); - - if (rfidDG1.OptionalData == null) - throw new ArgumentNullException(nameof(rfidDG1.OptionalData), "Property is required for class RfidDG1."); - - var typeRawValue = RfidDataGroupTypeTagValueConverter.ToJsonValue(rfidDG1.Type); - writer.WriteNumber("Type", typeRawValue); - - var documentIDRawValue = DocumentFormatValueConverter.ToJsonValue(rfidDG1.DocumentID); - writer.WriteNumber("DocumentID", documentIDRawValue); - - writer.WriteString("DocumentType", rfidDG1.DocumentType); - - writer.WriteString("State", rfidDG1.State); - - writer.WriteString("Holder", rfidDG1.Holder); - - writer.WriteString("DocumentNumber", rfidDG1.DocumentNumber); - - writer.WriteNumber("CheckDigitDocumentNumber", rfidDG1.CheckDigitDocumentNumber); - - writer.WriteString("Nationality", rfidDG1.Nationality); - - writer.WriteString("Birthday", rfidDG1.Birthday); - - writer.WriteNumber("CheckDigitBirthday", rfidDG1.CheckDigitBirthday); - - writer.WriteString("Sex", rfidDG1.Sex); - - writer.WriteString("ExpiryDate", rfidDG1.ExpiryDate); - - writer.WriteNumber("CheckDigitExpiryDate", rfidDG1.CheckDigitExpiryDate); - - writer.WriteString("OptionalData", rfidDG1.OptionalData); - - writer.WriteNumber("CheckDigitOptionalData", rfidDG1.CheckDigitOptionalData); - - writer.WriteNumber("CheckDigitComposite", rfidDG1.CheckDigitComposite); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs index 4768fd1..5c91862 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,202 +14,137 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the contents of a single file of the LDS of electronic document and the analysis of its contents within the context of the communication session with electronic document /// + [DataContract(Name = "RfidDataFile")] public partial class RfidDataFile : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// type - /// readingStatus - /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) - /// fileData - /// Time of reading, milliseconds - /// pAStatus - /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. - /// List of document text fields formed on the basis of the file contents - /// List of document graphic fields formed on the basis of the file contents - /// List of the original binary representation of graphic document fields formed on the basis of the file contents - /// parsedData - /// securityObjectCertificates - [JsonConstructor] - public RfidDataFile(RfidDataFileType type, RFIDErrorCodes readingStatus, Option fileID = default, Option fileData = default, Option readingTime = default, Option pAStatus = default, Option?> notifications = default, Option?> docFieldsText = default, Option?> docFieldsGraphics = default, Option?> docFieldsOriginals = default, Option parsedData = default, Option securityObjectCertificates = default) - { - Type = type; - ReadingStatus = readingStatus; - FileIDOption = fileID; - FileDataOption = fileData; - ReadingTimeOption = readingTime; - PAStatusOption = pAStatus; - NotificationsOption = notifications; - DocFieldsTextOption = docFieldsText; - DocFieldsGraphicsOption = docFieldsGraphics; - DocFieldsOriginalsOption = docFieldsOriginals; - ParsedDataOption = parsedData; - SecurityObjectCertificatesOption = securityObjectCertificates; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Type /// - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public RfidDataFileType Type { get; set; } /// /// Gets or Sets ReadingStatus /// - [JsonPropertyName("ReadingStatus")] + [DataMember(Name = "ReadingStatus", IsRequired = true, EmitDefaultValue = true)] public RFIDErrorCodes ReadingStatus { get; set; } /// - /// Used to track the state of PAStatus + /// Gets or Sets PAStatus /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option PAStatusOption { get; private set; } - + [DataMember(Name = "PA_Status", EmitDefaultValue = false)] + public RFIDErrorCodes? PAStatus { get; set; } /// - /// Gets or Sets PAStatus + /// Initializes a new instance of the class. /// - [JsonPropertyName("PA_Status")] - public RFIDErrorCodes? PAStatus { get { return this.PAStatusOption; } set { this.PAStatusOption = new(value); } } - + [JsonConstructorAttribute] + protected RfidDataFile() { } /// - /// Used to track the state of FileID + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FileIDOption { get; private set; } + /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E). + /// type (required). + /// fileData. + /// readingStatus (required). + /// Time of reading, milliseconds. + /// pAStatus. + /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure.. + /// List of document text fields formed on the basis of the file contents. + /// List of document graphic fields formed on the basis of the file contents. + /// List of the original binary representation of graphic document fields formed on the basis of the file contents. + /// parsedData. + /// securityObjectCertificates. + public RfidDataFile(string fileID = default(string), RfidDataFileType type = default(RfidDataFileType), TrfFtBytes fileData = default(TrfFtBytes), RFIDErrorCodes readingStatus = default(RFIDErrorCodes), decimal readingTime = default(decimal), RFIDErrorCodes? pAStatus = default(RFIDErrorCodes?), List notifications = default(List), List docFieldsText = default(List), List docFieldsGraphics = default(List), List docFieldsOriginals = default(List), ParsedData parsedData = default(ParsedData), SecurityObjectCertificates securityObjectCertificates = default(SecurityObjectCertificates)) + { + this.Type = type; + this.ReadingStatus = readingStatus; + this.FileID = fileID; + this.FileData = fileData; + this.ReadingTime = readingTime; + this.PAStatus = pAStatus; + this.Notifications = notifications; + this.DocFieldsText = docFieldsText; + this.DocFieldsGraphics = docFieldsGraphics; + this.DocFieldsOriginals = docFieldsOriginals; + this.ParsedData = parsedData; + this.SecurityObjectCertificates = securityObjectCertificates; + } /// /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) /// /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) - [JsonPropertyName("FileID")] - public string? FileID { get { return this.FileIDOption; } set { this.FileIDOption = new(value); } } - - /// - /// Used to track the state of FileData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FileDataOption { get; private set; } + [DataMember(Name = "FileID", EmitDefaultValue = false)] + public string FileID { get; set; } /// /// Gets or Sets FileData /// - [JsonPropertyName("FileData")] - public TrfFtBytes? FileData { get { return this.FileDataOption; } set { this.FileDataOption = new(value); } } - - /// - /// Used to track the state of ReadingTime - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ReadingTimeOption { get; private set; } + [DataMember(Name = "FileData", EmitDefaultValue = false)] + public TrfFtBytes FileData { get; set; } /// /// Time of reading, milliseconds /// /// Time of reading, milliseconds - [JsonPropertyName("ReadingTime")] - public decimal? ReadingTime { get { return this.ReadingTimeOption; } set { this.ReadingTimeOption = new(value); } } - - /// - /// Used to track the state of Notifications - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> NotificationsOption { get; private set; } + [DataMember(Name = "ReadingTime", EmitDefaultValue = false)] + public decimal ReadingTime { get; set; } /// /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. /// /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. - [JsonPropertyName("Notifications")] - public List? Notifications { get { return this.NotificationsOption; } set { this.NotificationsOption = new(value); } } - - /// - /// Used to track the state of DocFieldsText - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> DocFieldsTextOption { get; private set; } + [DataMember(Name = "Notifications", EmitDefaultValue = false)] + public List Notifications { get; set; } /// /// List of document text fields formed on the basis of the file contents /// /// List of document text fields formed on the basis of the file contents - [JsonPropertyName("DocFields_Text")] - public List? DocFieldsText { get { return this.DocFieldsTextOption; } set { this.DocFieldsTextOption = new(value); } } - - /// - /// Used to track the state of DocFieldsGraphics - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> DocFieldsGraphicsOption { get; private set; } + [DataMember(Name = "DocFields_Text", EmitDefaultValue = false)] + public List DocFieldsText { get; set; } /// /// List of document graphic fields formed on the basis of the file contents /// /// List of document graphic fields formed on the basis of the file contents - [JsonPropertyName("DocFields_Graphics")] - public List? DocFieldsGraphics { get { return this.DocFieldsGraphicsOption; } set { this.DocFieldsGraphicsOption = new(value); } } - - /// - /// Used to track the state of DocFieldsOriginals - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> DocFieldsOriginalsOption { get; private set; } + [DataMember(Name = "DocFields_Graphics", EmitDefaultValue = false)] + public List DocFieldsGraphics { get; set; } /// /// List of the original binary representation of graphic document fields formed on the basis of the file contents /// /// List of the original binary representation of graphic document fields formed on the basis of the file contents - [JsonPropertyName("DocFields_Originals")] - public List? DocFieldsOriginals { get { return this.DocFieldsOriginalsOption; } set { this.DocFieldsOriginalsOption = new(value); } } - - /// - /// Used to track the state of ParsedData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ParsedDataOption { get; private set; } + [DataMember(Name = "DocFields_Originals", EmitDefaultValue = false)] + public List DocFieldsOriginals { get; set; } /// /// Gets or Sets ParsedData /// - [JsonPropertyName("ParsedData")] - public ParsedData? ParsedData { get { return this.ParsedDataOption; } set { this.ParsedDataOption = new(value); } } - - /// - /// Used to track the state of SecurityObjectCertificates - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SecurityObjectCertificatesOption { get; private set; } + [DataMember(Name = "ParsedData", EmitDefaultValue = false)] + public ParsedData ParsedData { get; set; } /// /// Gets or Sets SecurityObjectCertificates /// - [JsonPropertyName("SecurityObject_Certificates")] - public SecurityObjectCertificates? SecurityObjectCertificates { get { return this.SecurityObjectCertificatesOption; } set { this.SecurityObjectCertificatesOption = new(value); } } + [DataMember(Name = "SecurityObject_Certificates", EmitDefaultValue = false)] + public SecurityObjectCertificates SecurityObjectCertificates { get; set; } /// /// Returns the string presentation of the object @@ -221,10 +154,10 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RfidDataFile {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" ReadingStatus: ").Append(ReadingStatus).Append("\n"); sb.Append(" FileID: ").Append(FileID).Append("\n"); + sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" FileData: ").Append(FileData).Append("\n"); + sb.Append(" ReadingStatus: ").Append(ReadingStatus).Append("\n"); sb.Append(" ReadingTime: ").Append(ReadingTime).Append("\n"); sb.Append(" PAStatus: ").Append(PAStatus).Append("\n"); sb.Append(" Notifications: ").Append(Notifications).Append("\n"); @@ -237,6 +170,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -248,257 +190,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidDataFileJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidDataFile Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option readingStatus = default; - Option fileID = default; - Option fileData = default; - Option readingTime = default; - Option pAStatus = default; - Option?> notifications = default; - Option?> docFieldsText = default; - Option?> docFieldsGraphics = default; - Option?> docFieldsOriginals = default; - Option parsedData = default; - Option securityObjectCertificates = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - string? typeRawValue = utf8JsonReader.GetString(); - if (typeRawValue != null) - type = new Option(RfidDataFileTypeValueConverter.FromStringOrDefault(typeRawValue)); - break; - case "ReadingStatus": - string? readingStatusRawValue = utf8JsonReader.GetString(); - if (readingStatusRawValue != null) - readingStatus = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(readingStatusRawValue)); - break; - case "FileID": - fileID = new Option(utf8JsonReader.GetString()!); - break; - case "FileData": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fileData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "ReadingTime": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - readingTime = new Option(utf8JsonReader.GetDecimal()); - break; - case "PA_Status": - string? pAStatusRawValue = utf8JsonReader.GetString(); - if (pAStatusRawValue != null) - pAStatus = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(pAStatusRawValue)); - break; - case "Notifications": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "DocFields_Text": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docFieldsText = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "DocFields_Graphics": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docFieldsGraphics = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "DocFields_Originals": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docFieldsOriginals = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "ParsedData": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - parsedData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SecurityObject_Certificates": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - securityObjectCertificates = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class RfidDataFile.", nameof(type)); - - if (!readingStatus.IsSet) - throw new ArgumentException("Property is required for class RfidDataFile.", nameof(readingStatus)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidDataFile."); - - if (readingStatus.IsSet && readingStatus.Value == null) - throw new ArgumentNullException(nameof(readingStatus), "Property is not nullable for class RfidDataFile."); - - if (fileID.IsSet && fileID.Value == null) - throw new ArgumentNullException(nameof(fileID), "Property is not nullable for class RfidDataFile."); - - if (fileData.IsSet && fileData.Value == null) - throw new ArgumentNullException(nameof(fileData), "Property is not nullable for class RfidDataFile."); - - if (readingTime.IsSet && readingTime.Value == null) - throw new ArgumentNullException(nameof(readingTime), "Property is not nullable for class RfidDataFile."); - - if (pAStatus.IsSet && pAStatus.Value == null) - throw new ArgumentNullException(nameof(pAStatus), "Property is not nullable for class RfidDataFile."); - - if (notifications.IsSet && notifications.Value == null) - throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidDataFile."); - - if (docFieldsText.IsSet && docFieldsText.Value == null) - throw new ArgumentNullException(nameof(docFieldsText), "Property is not nullable for class RfidDataFile."); - - if (docFieldsGraphics.IsSet && docFieldsGraphics.Value == null) - throw new ArgumentNullException(nameof(docFieldsGraphics), "Property is not nullable for class RfidDataFile."); - - if (docFieldsOriginals.IsSet && docFieldsOriginals.Value == null) - throw new ArgumentNullException(nameof(docFieldsOriginals), "Property is not nullable for class RfidDataFile."); - - if (parsedData.IsSet && parsedData.Value == null) - throw new ArgumentNullException(nameof(parsedData), "Property is not nullable for class RfidDataFile."); - - if (securityObjectCertificates.IsSet && securityObjectCertificates.Value == null) - throw new ArgumentNullException(nameof(securityObjectCertificates), "Property is not nullable for class RfidDataFile."); - - return new RfidDataFile(type.Value!.Value!, readingStatus.Value!.Value!, fileID, fileData, readingTime, pAStatus, notifications, docFieldsText, docFieldsGraphics, docFieldsOriginals, parsedData, securityObjectCertificates); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidDataFile rfidDataFile, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidDataFile, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidDataFile rfidDataFile, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidDataFile.FileIDOption.IsSet && rfidDataFile.FileID == null) - throw new ArgumentNullException(nameof(rfidDataFile.FileID), "Property is required for class RfidDataFile."); - - if (rfidDataFile.FileDataOption.IsSet && rfidDataFile.FileData == null) - throw new ArgumentNullException(nameof(rfidDataFile.FileData), "Property is required for class RfidDataFile."); - - if (rfidDataFile.NotificationsOption.IsSet && rfidDataFile.Notifications == null) - throw new ArgumentNullException(nameof(rfidDataFile.Notifications), "Property is required for class RfidDataFile."); - - if (rfidDataFile.DocFieldsTextOption.IsSet && rfidDataFile.DocFieldsText == null) - throw new ArgumentNullException(nameof(rfidDataFile.DocFieldsText), "Property is required for class RfidDataFile."); - - if (rfidDataFile.DocFieldsGraphicsOption.IsSet && rfidDataFile.DocFieldsGraphics == null) - throw new ArgumentNullException(nameof(rfidDataFile.DocFieldsGraphics), "Property is required for class RfidDataFile."); - - if (rfidDataFile.DocFieldsOriginalsOption.IsSet && rfidDataFile.DocFieldsOriginals == null) - throw new ArgumentNullException(nameof(rfidDataFile.DocFieldsOriginals), "Property is required for class RfidDataFile."); - - if (rfidDataFile.ParsedDataOption.IsSet && rfidDataFile.ParsedData == null) - throw new ArgumentNullException(nameof(rfidDataFile.ParsedData), "Property is required for class RfidDataFile."); - - if (rfidDataFile.SecurityObjectCertificatesOption.IsSet && rfidDataFile.SecurityObjectCertificates == null) - throw new ArgumentNullException(nameof(rfidDataFile.SecurityObjectCertificates), "Property is required for class RfidDataFile."); - - var typeRawValue = RfidDataFileTypeValueConverter.ToJsonValue(rfidDataFile.Type); - writer.WriteNumber("Type", typeRawValue); - - var readingStatusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidDataFile.ReadingStatus); - writer.WriteNumber("ReadingStatus", readingStatusRawValue); - - if (rfidDataFile.FileIDOption.IsSet) - writer.WriteString("FileID", rfidDataFile.FileID); - - if (rfidDataFile.FileDataOption.IsSet) - { - writer.WritePropertyName("FileData"); - JsonSerializer.Serialize(writer, rfidDataFile.FileData, jsonSerializerOptions); - } - if (rfidDataFile.ReadingTimeOption.IsSet) - writer.WriteNumber("ReadingTime", rfidDataFile.ReadingTimeOption.Value!.Value); - - if (rfidDataFile.PAStatusOption.IsSet) - { - var pAStatusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidDataFile.PAStatus!.Value); - writer.WriteNumber("PA_Status", pAStatusRawValue); - } - if (rfidDataFile.NotificationsOption.IsSet) - { - writer.WritePropertyName("Notifications"); - JsonSerializer.Serialize(writer, rfidDataFile.Notifications, jsonSerializerOptions); - } - if (rfidDataFile.DocFieldsTextOption.IsSet) - { - writer.WritePropertyName("DocFields_Text"); - JsonSerializer.Serialize(writer, rfidDataFile.DocFieldsText, jsonSerializerOptions); - } - if (rfidDataFile.DocFieldsGraphicsOption.IsSet) - { - writer.WritePropertyName("DocFields_Graphics"); - JsonSerializer.Serialize(writer, rfidDataFile.DocFieldsGraphics, jsonSerializerOptions); - } - if (rfidDataFile.DocFieldsOriginalsOption.IsSet) - { - writer.WritePropertyName("DocFields_Originals"); - JsonSerializer.Serialize(writer, rfidDataFile.DocFieldsOriginals, jsonSerializerOptions); - } - if (rfidDataFile.ParsedDataOption.IsSet) - { - writer.WritePropertyName("ParsedData"); - JsonSerializer.Serialize(writer, rfidDataFile.ParsedData, jsonSerializerOptions); - } - if (rfidDataFile.SecurityObjectCertificatesOption.IsSet) - { - writer.WritePropertyName("SecurityObject_Certificates"); - JsonSerializer.Serialize(writer, rfidDataFile.SecurityObjectCertificates, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs index a386c37..1df4e91 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFileType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -492,669 +493,4 @@ public enum RfidDataFileType USER_DEFINED = 1000 } - /// - /// Converts to and from the JSON value - /// - public static class RfidDataFileTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidDataFileType FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidDataFileType.UNSPECIFIED; - - if (value.Equals((1).ToString())) - return RfidDataFileType.PASSPORT_DG1; - - if (value.Equals((2).ToString())) - return RfidDataFileType.PASSPORT_DG2; - - if (value.Equals((3).ToString())) - return RfidDataFileType.PASSPORT_DG3; - - if (value.Equals((4).ToString())) - return RfidDataFileType.PASSPORT_DG4; - - if (value.Equals((5).ToString())) - return RfidDataFileType.PASSPORT_DG5; - - if (value.Equals((6).ToString())) - return RfidDataFileType.PASSPORT_DG6; - - if (value.Equals((7).ToString())) - return RfidDataFileType.PASSPORT_DG7; - - if (value.Equals((8).ToString())) - return RfidDataFileType.PASSPORT_DG8; - - if (value.Equals((9).ToString())) - return RfidDataFileType.PASSPORT_DG9; - - if (value.Equals((10).ToString())) - return RfidDataFileType.PASSPORT_DG10; - - if (value.Equals((11).ToString())) - return RfidDataFileType.PASSPORT_DG11; - - if (value.Equals((12).ToString())) - return RfidDataFileType.PASSPORT_DG12; - - if (value.Equals((13).ToString())) - return RfidDataFileType.PASSPORT_DG13; - - if (value.Equals((14).ToString())) - return RfidDataFileType.PASSPORT_DG14; - - if (value.Equals((15).ToString())) - return RfidDataFileType.PASSPORT_DG15; - - if (value.Equals((16).ToString())) - return RfidDataFileType.PASSPORT_DG16; - - if (value.Equals((17).ToString())) - return RfidDataFileType.PASSPORT_DG17; - - if (value.Equals((18).ToString())) - return RfidDataFileType.PASSPORT_DG18; - - if (value.Equals((19).ToString())) - return RfidDataFileType.PASSPORT_DG19; - - if (value.Equals((20).ToString())) - return RfidDataFileType.PASSPORT_DG20; - - if (value.Equals((21).ToString())) - return RfidDataFileType.PASSPORT_SOD; - - if (value.Equals((22).ToString())) - return RfidDataFileType.PASSPORT_CVCA; - - if (value.Equals((23).ToString())) - return RfidDataFileType.PASSPORT_COM; - - if (value.Equals((57).ToString())) - return RfidDataFileType.DTC_DG17; - - if (value.Equals((58).ToString())) - return RfidDataFileType.DTC_DG18; - - if (value.Equals((62).ToString())) - return RfidDataFileType.DTC_DG22; - - if (value.Equals((63).ToString())) - return RfidDataFileType.DTC_DG23; - - if (value.Equals((64).ToString())) - return RfidDataFileType.DTC_DG24; - - if (value.Equals((101).ToString())) - return RfidDataFileType.ID_DG1; - - if (value.Equals((102).ToString())) - return RfidDataFileType.ID_DG2; - - if (value.Equals((103).ToString())) - return RfidDataFileType.ID_DG3; - - if (value.Equals((104).ToString())) - return RfidDataFileType.ID_DG4; - - if (value.Equals((105).ToString())) - return RfidDataFileType.ID_DG5; - - if (value.Equals((106).ToString())) - return RfidDataFileType.ID_DG6; - - if (value.Equals((107).ToString())) - return RfidDataFileType.ID_DG7; - - if (value.Equals((108).ToString())) - return RfidDataFileType.ID_DG8; - - if (value.Equals((109).ToString())) - return RfidDataFileType.ID_DG9; - - if (value.Equals((110).ToString())) - return RfidDataFileType.ID_DG10; - - if (value.Equals((111).ToString())) - return RfidDataFileType.ID_DG11; - - if (value.Equals((112).ToString())) - return RfidDataFileType.ID_DG12; - - if (value.Equals((113).ToString())) - return RfidDataFileType.ID_DG13; - - if (value.Equals((114).ToString())) - return RfidDataFileType.ID_DG14; - - if (value.Equals((115).ToString())) - return RfidDataFileType.ID_DG15; - - if (value.Equals((116).ToString())) - return RfidDataFileType.ID_DG16; - - if (value.Equals((117).ToString())) - return RfidDataFileType.ID_DG17; - - if (value.Equals((118).ToString())) - return RfidDataFileType.ID_DG18; - - if (value.Equals((119).ToString())) - return RfidDataFileType.ID_DG19; - - if (value.Equals((120).ToString())) - return RfidDataFileType.ID_DG20; - - if (value.Equals((121).ToString())) - return RfidDataFileType.ID_DG21; - - if (value.Equals((150).ToString())) - return RfidDataFileType.DL_COM; - - if (value.Equals((151).ToString())) - return RfidDataFileType.DL_DG1; - - if (value.Equals((152).ToString())) - return RfidDataFileType.DL_DG2; - - if (value.Equals((153).ToString())) - return RfidDataFileType.DL_DG3; - - if (value.Equals((154).ToString())) - return RfidDataFileType.DL_DG4; - - if (value.Equals((155).ToString())) - return RfidDataFileType.DL_DG5; - - if (value.Equals((156).ToString())) - return RfidDataFileType.DL_DG6; - - if (value.Equals((157).ToString())) - return RfidDataFileType.DL_DG7; - - if (value.Equals((158).ToString())) - return RfidDataFileType.DL_DG8; - - if (value.Equals((159).ToString())) - return RfidDataFileType.DL_DG9; - - if (value.Equals((160).ToString())) - return RfidDataFileType.DL_DG10; - - if (value.Equals((161).ToString())) - return RfidDataFileType.DL_DG11; - - if (value.Equals((162).ToString())) - return RfidDataFileType.DL_DG12; - - if (value.Equals((163).ToString())) - return RfidDataFileType.DL_DG13; - - if (value.Equals((164).ToString())) - return RfidDataFileType.DL_DG14; - - if (value.Equals((165).ToString())) - return RfidDataFileType.DL_SOD; - - if (value.Equals((166).ToString())) - return RfidDataFileType.DL_CE; - - if (value.Equals((167).ToString())) - return RfidDataFileType.DL_CVCA; - - if (value.Equals((200).ToString())) - return RfidDataFileType.PACE_CARD_ACCESS; - - if (value.Equals((201).ToString())) - return RfidDataFileType.PACE_CARD_SECURITY; - - if (value.Equals((202).ToString())) - return RfidDataFileType.PACE_CHIP_SECURITY; - - if (value.Equals((300).ToString())) - return RfidDataFileType.MIFARE_DATA; - - if (value.Equals((301).ToString())) - return RfidDataFileType.MIFARE_VALIDITY; - - if (value.Equals((302).ToString())) - return RfidDataFileType.AUTHENTICITY_V2; - - if (value.Equals((400).ToString())) - return RfidDataFileType.ATR; - - if (value.Equals((500).ToString())) - return RfidDataFileType._E_SIGN_PK; - - if (value.Equals((501).ToString())) - return RfidDataFileType._E_SIGN_SIGNED_DATA; - - if (value.Equals((600).ToString())) - return RfidDataFileType.CERTIFICATE; - - if (value.Equals((601).ToString())) - return RfidDataFileType.MASTER_LIST; - - if (value.Equals((602).ToString())) - return RfidDataFileType.DEFECT_LIST; - - if (value.Equals((603).ToString())) - return RfidDataFileType.BLACK_LIST; - - if (value.Equals((700).ToString())) - return RfidDataFileType.APP_DIRECTORY; - - if (value.Equals((701).ToString())) - return RfidDataFileType.SESSION; - - if (value.Equals((702).ToString())) - return RfidDataFileType.LOG_DATA; - - if (value.Equals((703).ToString())) - return RfidDataFileType.CHIP_PROPERTIES; - - if (value.Equals((710).ToString())) - return RfidDataFileType.POST_CA_RESPONSE; - - if (value.Equals((711).ToString())) - return RfidDataFileType.POST_CA_PUBLIC_KEY; - - if (value.Equals((712).ToString())) - return RfidDataFileType.POST_CA_INFO; - - if (value.Equals((713).ToString())) - return RfidDataFileType.POST_CA_D_PARAMS; - - if (value.Equals((714).ToString())) - return RfidDataFileType.POST_CA_CHECK_PK; - - if (value.Equals((715).ToString())) - return RfidDataFileType.POST_CA_CHECK_SK; - - if (value.Equals((1000).ToString())) - return RfidDataFileType.USER_DEFINED; - - throw new NotImplementedException($"Could not convert value to type RfidDataFileType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidDataFileType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidDataFileType.UNSPECIFIED; - - if (value.Equals((1).ToString())) - return RfidDataFileType.PASSPORT_DG1; - - if (value.Equals((2).ToString())) - return RfidDataFileType.PASSPORT_DG2; - - if (value.Equals((3).ToString())) - return RfidDataFileType.PASSPORT_DG3; - - if (value.Equals((4).ToString())) - return RfidDataFileType.PASSPORT_DG4; - - if (value.Equals((5).ToString())) - return RfidDataFileType.PASSPORT_DG5; - - if (value.Equals((6).ToString())) - return RfidDataFileType.PASSPORT_DG6; - - if (value.Equals((7).ToString())) - return RfidDataFileType.PASSPORT_DG7; - - if (value.Equals((8).ToString())) - return RfidDataFileType.PASSPORT_DG8; - - if (value.Equals((9).ToString())) - return RfidDataFileType.PASSPORT_DG9; - - if (value.Equals((10).ToString())) - return RfidDataFileType.PASSPORT_DG10; - - if (value.Equals((11).ToString())) - return RfidDataFileType.PASSPORT_DG11; - - if (value.Equals((12).ToString())) - return RfidDataFileType.PASSPORT_DG12; - - if (value.Equals((13).ToString())) - return RfidDataFileType.PASSPORT_DG13; - - if (value.Equals((14).ToString())) - return RfidDataFileType.PASSPORT_DG14; - - if (value.Equals((15).ToString())) - return RfidDataFileType.PASSPORT_DG15; - - if (value.Equals((16).ToString())) - return RfidDataFileType.PASSPORT_DG16; - - if (value.Equals((17).ToString())) - return RfidDataFileType.PASSPORT_DG17; - - if (value.Equals((18).ToString())) - return RfidDataFileType.PASSPORT_DG18; - - if (value.Equals((19).ToString())) - return RfidDataFileType.PASSPORT_DG19; - - if (value.Equals((20).ToString())) - return RfidDataFileType.PASSPORT_DG20; - - if (value.Equals((21).ToString())) - return RfidDataFileType.PASSPORT_SOD; - - if (value.Equals((22).ToString())) - return RfidDataFileType.PASSPORT_CVCA; - - if (value.Equals((23).ToString())) - return RfidDataFileType.PASSPORT_COM; - - if (value.Equals((57).ToString())) - return RfidDataFileType.DTC_DG17; - - if (value.Equals((58).ToString())) - return RfidDataFileType.DTC_DG18; - - if (value.Equals((62).ToString())) - return RfidDataFileType.DTC_DG22; - - if (value.Equals((63).ToString())) - return RfidDataFileType.DTC_DG23; - - if (value.Equals((64).ToString())) - return RfidDataFileType.DTC_DG24; - - if (value.Equals((101).ToString())) - return RfidDataFileType.ID_DG1; - - if (value.Equals((102).ToString())) - return RfidDataFileType.ID_DG2; - - if (value.Equals((103).ToString())) - return RfidDataFileType.ID_DG3; - - if (value.Equals((104).ToString())) - return RfidDataFileType.ID_DG4; - - if (value.Equals((105).ToString())) - return RfidDataFileType.ID_DG5; - - if (value.Equals((106).ToString())) - return RfidDataFileType.ID_DG6; - - if (value.Equals((107).ToString())) - return RfidDataFileType.ID_DG7; - - if (value.Equals((108).ToString())) - return RfidDataFileType.ID_DG8; - - if (value.Equals((109).ToString())) - return RfidDataFileType.ID_DG9; - - if (value.Equals((110).ToString())) - return RfidDataFileType.ID_DG10; - - if (value.Equals((111).ToString())) - return RfidDataFileType.ID_DG11; - - if (value.Equals((112).ToString())) - return RfidDataFileType.ID_DG12; - - if (value.Equals((113).ToString())) - return RfidDataFileType.ID_DG13; - - if (value.Equals((114).ToString())) - return RfidDataFileType.ID_DG14; - - if (value.Equals((115).ToString())) - return RfidDataFileType.ID_DG15; - - if (value.Equals((116).ToString())) - return RfidDataFileType.ID_DG16; - - if (value.Equals((117).ToString())) - return RfidDataFileType.ID_DG17; - - if (value.Equals((118).ToString())) - return RfidDataFileType.ID_DG18; - - if (value.Equals((119).ToString())) - return RfidDataFileType.ID_DG19; - - if (value.Equals((120).ToString())) - return RfidDataFileType.ID_DG20; - - if (value.Equals((121).ToString())) - return RfidDataFileType.ID_DG21; - - if (value.Equals((150).ToString())) - return RfidDataFileType.DL_COM; - - if (value.Equals((151).ToString())) - return RfidDataFileType.DL_DG1; - - if (value.Equals((152).ToString())) - return RfidDataFileType.DL_DG2; - - if (value.Equals((153).ToString())) - return RfidDataFileType.DL_DG3; - - if (value.Equals((154).ToString())) - return RfidDataFileType.DL_DG4; - - if (value.Equals((155).ToString())) - return RfidDataFileType.DL_DG5; - - if (value.Equals((156).ToString())) - return RfidDataFileType.DL_DG6; - - if (value.Equals((157).ToString())) - return RfidDataFileType.DL_DG7; - - if (value.Equals((158).ToString())) - return RfidDataFileType.DL_DG8; - - if (value.Equals((159).ToString())) - return RfidDataFileType.DL_DG9; - - if (value.Equals((160).ToString())) - return RfidDataFileType.DL_DG10; - - if (value.Equals((161).ToString())) - return RfidDataFileType.DL_DG11; - - if (value.Equals((162).ToString())) - return RfidDataFileType.DL_DG12; - - if (value.Equals((163).ToString())) - return RfidDataFileType.DL_DG13; - - if (value.Equals((164).ToString())) - return RfidDataFileType.DL_DG14; - - if (value.Equals((165).ToString())) - return RfidDataFileType.DL_SOD; - - if (value.Equals((166).ToString())) - return RfidDataFileType.DL_CE; - - if (value.Equals((167).ToString())) - return RfidDataFileType.DL_CVCA; - - if (value.Equals((200).ToString())) - return RfidDataFileType.PACE_CARD_ACCESS; - - if (value.Equals((201).ToString())) - return RfidDataFileType.PACE_CARD_SECURITY; - - if (value.Equals((202).ToString())) - return RfidDataFileType.PACE_CHIP_SECURITY; - - if (value.Equals((300).ToString())) - return RfidDataFileType.MIFARE_DATA; - - if (value.Equals((301).ToString())) - return RfidDataFileType.MIFARE_VALIDITY; - - if (value.Equals((302).ToString())) - return RfidDataFileType.AUTHENTICITY_V2; - - if (value.Equals((400).ToString())) - return RfidDataFileType.ATR; - - if (value.Equals((500).ToString())) - return RfidDataFileType._E_SIGN_PK; - - if (value.Equals((501).ToString())) - return RfidDataFileType._E_SIGN_SIGNED_DATA; - - if (value.Equals((600).ToString())) - return RfidDataFileType.CERTIFICATE; - - if (value.Equals((601).ToString())) - return RfidDataFileType.MASTER_LIST; - - if (value.Equals((602).ToString())) - return RfidDataFileType.DEFECT_LIST; - - if (value.Equals((603).ToString())) - return RfidDataFileType.BLACK_LIST; - - if (value.Equals((700).ToString())) - return RfidDataFileType.APP_DIRECTORY; - - if (value.Equals((701).ToString())) - return RfidDataFileType.SESSION; - - if (value.Equals((702).ToString())) - return RfidDataFileType.LOG_DATA; - - if (value.Equals((703).ToString())) - return RfidDataFileType.CHIP_PROPERTIES; - - if (value.Equals((710).ToString())) - return RfidDataFileType.POST_CA_RESPONSE; - - if (value.Equals((711).ToString())) - return RfidDataFileType.POST_CA_PUBLIC_KEY; - - if (value.Equals((712).ToString())) - return RfidDataFileType.POST_CA_INFO; - - if (value.Equals((713).ToString())) - return RfidDataFileType.POST_CA_D_PARAMS; - - if (value.Equals((714).ToString())) - return RfidDataFileType.POST_CA_CHECK_PK; - - if (value.Equals((715).ToString())) - return RfidDataFileType.POST_CA_CHECK_SK; - - if (value.Equals((1000).ToString())) - return RfidDataFileType.USER_DEFINED; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidDataFileType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidDataFileTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidDataFileType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidDataFileType? result = rawValue == null - ? null - : RfidDataFileTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidDataFileType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidDataFileType rfidDataFileType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidDataFileType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidDataFileTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidDataFileType from the Json object - /// - /// - /// - /// - /// - public override RfidDataFileType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidDataFileType? result = rawValue == null - ? null - : RfidDataFileTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidDataFileType? rfidDataFileType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidDataFileType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs index bf3e0ea..c43fa0f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataGroupTypeTag.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -307,447 +308,4 @@ public enum RfidDataGroupTypeTag EDL_DG14 = 110 } - /// - /// Converts to and from the JSON value - /// - public static class RfidDataGroupTypeTagValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidDataGroupTypeTag FromString(string value) - { - if (value.Equals((96).ToString())) - return RfidDataGroupTypeTag.COM; - - if (value.Equals((97).ToString())) - return RfidDataGroupTypeTag.DG1; - - if (value.Equals((117).ToString())) - return RfidDataGroupTypeTag.DG2; - - if (value.Equals((99).ToString())) - return RfidDataGroupTypeTag.DG3; - - if (value.Equals((118).ToString())) - return RfidDataGroupTypeTag.DG4; - - if (value.Equals((101).ToString())) - return RfidDataGroupTypeTag.DG5; - - if (value.Equals((102).ToString())) - return RfidDataGroupTypeTag.DG6; - - if (value.Equals((103).ToString())) - return RfidDataGroupTypeTag.DG7; - - if (value.Equals((104).ToString())) - return RfidDataGroupTypeTag.DG8; - - if (value.Equals((105).ToString())) - return RfidDataGroupTypeTag.DG9; - - if (value.Equals((106).ToString())) - return RfidDataGroupTypeTag.DG10; - - if (value.Equals((107).ToString())) - return RfidDataGroupTypeTag.DG11; - - if (value.Equals((108).ToString())) - return RfidDataGroupTypeTag.DG12; - - if (value.Equals((109).ToString())) - return RfidDataGroupTypeTag.DG13; - - if (value.Equals((110).ToString())) - return RfidDataGroupTypeTag.DG14; - - if (value.Equals((111).ToString())) - return RfidDataGroupTypeTag.DG15; - - if (value.Equals((112).ToString())) - return RfidDataGroupTypeTag.DG16; - - if (value.Equals((119).ToString())) - return RfidDataGroupTypeTag.SOD; - - if (value.Equals((97).ToString())) - return RfidDataGroupTypeTag.EID_DG1; - - if (value.Equals((98).ToString())) - return RfidDataGroupTypeTag.EID_DG2; - - if (value.Equals((99).ToString())) - return RfidDataGroupTypeTag.EID_DG3; - - if (value.Equals((100).ToString())) - return RfidDataGroupTypeTag.EID_DG4; - - if (value.Equals((101).ToString())) - return RfidDataGroupTypeTag.EID_DG5; - - if (value.Equals((102).ToString())) - return RfidDataGroupTypeTag.EID_DG6; - - if (value.Equals((103).ToString())) - return RfidDataGroupTypeTag.EID_DG7; - - if (value.Equals((104).ToString())) - return RfidDataGroupTypeTag.EID_DG8; - - if (value.Equals((105).ToString())) - return RfidDataGroupTypeTag.EID_DG9; - - if (value.Equals((106).ToString())) - return RfidDataGroupTypeTag.EID_DG10; - - if (value.Equals((107).ToString())) - return RfidDataGroupTypeTag.EID_DG11; - - if (value.Equals((108).ToString())) - return RfidDataGroupTypeTag.EID_DG12; - - if (value.Equals((109).ToString())) - return RfidDataGroupTypeTag.EID_DG13; - - if (value.Equals((110).ToString())) - return RfidDataGroupTypeTag.EID_DG14; - - if (value.Equals((111).ToString())) - return RfidDataGroupTypeTag.EID_DG15; - - if (value.Equals((112).ToString())) - return RfidDataGroupTypeTag.EID_DG16; - - if (value.Equals((113).ToString())) - return RfidDataGroupTypeTag.EID_DG17; - - if (value.Equals((114).ToString())) - return RfidDataGroupTypeTag.EID_DG18; - - if (value.Equals((115).ToString())) - return RfidDataGroupTypeTag.EID_DG19; - - if (value.Equals((116).ToString())) - return RfidDataGroupTypeTag.EID_DG20; - - if (value.Equals((117).ToString())) - return RfidDataGroupTypeTag.EID_DG21; - - if (value.Equals((96).ToString())) - return RfidDataGroupTypeTag.EDL_COM; - - if (value.Equals((119).ToString())) - return RfidDataGroupTypeTag.EDL_SOD; - - if (value.Equals((119).ToString())) - return RfidDataGroupTypeTag.EDL_CE; - - if (value.Equals((97).ToString())) - return RfidDataGroupTypeTag.EDL_DG1; - - if (value.Equals((107).ToString())) - return RfidDataGroupTypeTag.EDL_DG2; - - if (value.Equals((108).ToString())) - return RfidDataGroupTypeTag.EDL_DG3; - - if (value.Equals((101).ToString())) - return RfidDataGroupTypeTag.EDL_DG4; - - if (value.Equals((103).ToString())) - return RfidDataGroupTypeTag.EDL_DG5; - - if (value.Equals((117).ToString())) - return RfidDataGroupTypeTag.EDL_DG6; - - if (value.Equals((99).ToString())) - return RfidDataGroupTypeTag.EDL_DG7; - - if (value.Equals((118).ToString())) - return RfidDataGroupTypeTag.EDL_DG8; - - if (value.Equals((112).ToString())) - return RfidDataGroupTypeTag.EDL_DG9; - - if (value.Equals((109).ToString())) - return RfidDataGroupTypeTag.EDL_DG11; - - if (value.Equals((113).ToString())) - return RfidDataGroupTypeTag.EDL_DG12; - - if (value.Equals((111).ToString())) - return RfidDataGroupTypeTag.EDL_DG13; - - if (value.Equals((110).ToString())) - return RfidDataGroupTypeTag.EDL_DG14; - - throw new NotImplementedException($"Could not convert value to type RfidDataGroupTypeTag: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidDataGroupTypeTag? FromStringOrDefault(string value) - { - if (value.Equals((96).ToString())) - return RfidDataGroupTypeTag.COM; - - if (value.Equals((97).ToString())) - return RfidDataGroupTypeTag.DG1; - - if (value.Equals((117).ToString())) - return RfidDataGroupTypeTag.DG2; - - if (value.Equals((99).ToString())) - return RfidDataGroupTypeTag.DG3; - - if (value.Equals((118).ToString())) - return RfidDataGroupTypeTag.DG4; - - if (value.Equals((101).ToString())) - return RfidDataGroupTypeTag.DG5; - - if (value.Equals((102).ToString())) - return RfidDataGroupTypeTag.DG6; - - if (value.Equals((103).ToString())) - return RfidDataGroupTypeTag.DG7; - - if (value.Equals((104).ToString())) - return RfidDataGroupTypeTag.DG8; - - if (value.Equals((105).ToString())) - return RfidDataGroupTypeTag.DG9; - - if (value.Equals((106).ToString())) - return RfidDataGroupTypeTag.DG10; - - if (value.Equals((107).ToString())) - return RfidDataGroupTypeTag.DG11; - - if (value.Equals((108).ToString())) - return RfidDataGroupTypeTag.DG12; - - if (value.Equals((109).ToString())) - return RfidDataGroupTypeTag.DG13; - - if (value.Equals((110).ToString())) - return RfidDataGroupTypeTag.DG14; - - if (value.Equals((111).ToString())) - return RfidDataGroupTypeTag.DG15; - - if (value.Equals((112).ToString())) - return RfidDataGroupTypeTag.DG16; - - if (value.Equals((119).ToString())) - return RfidDataGroupTypeTag.SOD; - - if (value.Equals((97).ToString())) - return RfidDataGroupTypeTag.EID_DG1; - - if (value.Equals((98).ToString())) - return RfidDataGroupTypeTag.EID_DG2; - - if (value.Equals((99).ToString())) - return RfidDataGroupTypeTag.EID_DG3; - - if (value.Equals((100).ToString())) - return RfidDataGroupTypeTag.EID_DG4; - - if (value.Equals((101).ToString())) - return RfidDataGroupTypeTag.EID_DG5; - - if (value.Equals((102).ToString())) - return RfidDataGroupTypeTag.EID_DG6; - - if (value.Equals((103).ToString())) - return RfidDataGroupTypeTag.EID_DG7; - - if (value.Equals((104).ToString())) - return RfidDataGroupTypeTag.EID_DG8; - - if (value.Equals((105).ToString())) - return RfidDataGroupTypeTag.EID_DG9; - - if (value.Equals((106).ToString())) - return RfidDataGroupTypeTag.EID_DG10; - - if (value.Equals((107).ToString())) - return RfidDataGroupTypeTag.EID_DG11; - - if (value.Equals((108).ToString())) - return RfidDataGroupTypeTag.EID_DG12; - - if (value.Equals((109).ToString())) - return RfidDataGroupTypeTag.EID_DG13; - - if (value.Equals((110).ToString())) - return RfidDataGroupTypeTag.EID_DG14; - - if (value.Equals((111).ToString())) - return RfidDataGroupTypeTag.EID_DG15; - - if (value.Equals((112).ToString())) - return RfidDataGroupTypeTag.EID_DG16; - - if (value.Equals((113).ToString())) - return RfidDataGroupTypeTag.EID_DG17; - - if (value.Equals((114).ToString())) - return RfidDataGroupTypeTag.EID_DG18; - - if (value.Equals((115).ToString())) - return RfidDataGroupTypeTag.EID_DG19; - - if (value.Equals((116).ToString())) - return RfidDataGroupTypeTag.EID_DG20; - - if (value.Equals((117).ToString())) - return RfidDataGroupTypeTag.EID_DG21; - - if (value.Equals((96).ToString())) - return RfidDataGroupTypeTag.EDL_COM; - - if (value.Equals((119).ToString())) - return RfidDataGroupTypeTag.EDL_SOD; - - if (value.Equals((119).ToString())) - return RfidDataGroupTypeTag.EDL_CE; - - if (value.Equals((97).ToString())) - return RfidDataGroupTypeTag.EDL_DG1; - - if (value.Equals((107).ToString())) - return RfidDataGroupTypeTag.EDL_DG2; - - if (value.Equals((108).ToString())) - return RfidDataGroupTypeTag.EDL_DG3; - - if (value.Equals((101).ToString())) - return RfidDataGroupTypeTag.EDL_DG4; - - if (value.Equals((103).ToString())) - return RfidDataGroupTypeTag.EDL_DG5; - - if (value.Equals((117).ToString())) - return RfidDataGroupTypeTag.EDL_DG6; - - if (value.Equals((99).ToString())) - return RfidDataGroupTypeTag.EDL_DG7; - - if (value.Equals((118).ToString())) - return RfidDataGroupTypeTag.EDL_DG8; - - if (value.Equals((112).ToString())) - return RfidDataGroupTypeTag.EDL_DG9; - - if (value.Equals((109).ToString())) - return RfidDataGroupTypeTag.EDL_DG11; - - if (value.Equals((113).ToString())) - return RfidDataGroupTypeTag.EDL_DG12; - - if (value.Equals((111).ToString())) - return RfidDataGroupTypeTag.EDL_DG13; - - if (value.Equals((110).ToString())) - return RfidDataGroupTypeTag.EDL_DG14; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidDataGroupTypeTag value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidDataGroupTypeTagJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidDataGroupTypeTag Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidDataGroupTypeTag? result = rawValue == null - ? null - : RfidDataGroupTypeTagValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidDataGroupTypeTag to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidDataGroupTypeTag rfidDataGroupTypeTag, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidDataGroupTypeTag.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidDataGroupTypeTagNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidDataGroupTypeTag from the Json object - /// - /// - /// - /// - /// - public override RfidDataGroupTypeTag? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidDataGroupTypeTag? result = rawValue == null - ? null - : RfidDataGroupTypeTagValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidDataGroupTypeTag? rfidDataGroupTypeTag, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidDataGroupTypeTag?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs index 8a047ac..6435f1c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDistinguishedName.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,55 +14,75 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contents of the identifier in binary form. Base64 encoded. /// + [DataContract(Name = "RfidDistinguishedName")] public partial class RfidDistinguishedName : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Contents of the identifier in binary form. Base64 encoded. - /// friendlyName - /// List of individual attributes contained in the identifier - [JsonConstructor] - public RfidDistinguishedName(string data, TrfFtString friendlyName, List attributes) + [JsonConstructorAttribute] + protected RfidDistinguishedName() { } + /// + /// Initializes a new instance of the class. + /// + /// Contents of the identifier in binary form. Base64 encoded. (required). + /// friendlyName (required). + /// List of individual attributes contained in the identifier (required). + public RfidDistinguishedName(string data = default(string), TrfFtString friendlyName = default(TrfFtString), List attributes = default(List)) { - Data = data; - FriendlyName = friendlyName; - Attributes = attributes; - OnCreated(); + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for RfidDistinguishedName and cannot be null"); + } + this.Data = data; + // to ensure "friendlyName" is required (not null) + if (friendlyName == null) + { + throw new ArgumentNullException("friendlyName is a required property for RfidDistinguishedName and cannot be null"); + } + this.FriendlyName = friendlyName; + // to ensure "attributes" is required (not null) + if (attributes == null) + { + throw new ArgumentNullException("attributes is a required property for RfidDistinguishedName and cannot be null"); + } + this.Attributes = attributes; } - partial void OnCreated(); - /// /// Contents of the identifier in binary form. Base64 encoded. /// /// Contents of the identifier in binary form. Base64 encoded. - [JsonPropertyName("Data")] + [DataMember(Name = "Data", IsRequired = true, EmitDefaultValue = true)] public string Data { get; set; } /// /// Gets or Sets FriendlyName /// - [JsonPropertyName("FriendlyName")] + [DataMember(Name = "FriendlyName", IsRequired = true, EmitDefaultValue = true)] public TrfFtString FriendlyName { get; set; } /// /// List of individual attributes contained in the identifier /// /// List of individual attributes contained in the identifier - [JsonPropertyName("Attributes")] + [DataMember(Name = "Attributes", IsRequired = true, EmitDefaultValue = true)] public List Attributes { get; set; } /// @@ -82,6 +100,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -93,124 +120,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidDistinguishedNameJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidDistinguishedName Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option data = default; - Option friendlyName = default; - Option?> attributes = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Data": - data = new Option(utf8JsonReader.GetString()!); - break; - case "FriendlyName": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - friendlyName = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Attributes": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - attributes = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!data.IsSet) - throw new ArgumentException("Property is required for class RfidDistinguishedName.", nameof(data)); - - if (!friendlyName.IsSet) - throw new ArgumentException("Property is required for class RfidDistinguishedName.", nameof(friendlyName)); - - if (!attributes.IsSet) - throw new ArgumentException("Property is required for class RfidDistinguishedName.", nameof(attributes)); - - if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class RfidDistinguishedName."); - - if (friendlyName.IsSet && friendlyName.Value == null) - throw new ArgumentNullException(nameof(friendlyName), "Property is not nullable for class RfidDistinguishedName."); - - if (attributes.IsSet && attributes.Value == null) - throw new ArgumentNullException(nameof(attributes), "Property is not nullable for class RfidDistinguishedName."); - - return new RfidDistinguishedName(data.Value!, friendlyName.Value!, attributes.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidDistinguishedName rfidDistinguishedName, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidDistinguishedName, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidDistinguishedName rfidDistinguishedName, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidDistinguishedName.Data == null) - throw new ArgumentNullException(nameof(rfidDistinguishedName.Data), "Property is required for class RfidDistinguishedName."); - - if (rfidDistinguishedName.FriendlyName == null) - throw new ArgumentNullException(nameof(rfidDistinguishedName.FriendlyName), "Property is required for class RfidDistinguishedName."); - - if (rfidDistinguishedName.Attributes == null) - throw new ArgumentNullException(nameof(rfidDistinguishedName.Attributes), "Property is required for class RfidDistinguishedName."); - - writer.WriteString("Data", rfidDistinguishedName.Data); - - writer.WritePropertyName("FriendlyName"); - JsonSerializer.Serialize(writer, rfidDistinguishedName.FriendlyName, jsonSerializerOptions); - writer.WritePropertyName("Attributes"); - JsonSerializer.Serialize(writer, rfidDistinguishedName.Attributes, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs b/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs index b59b90a..460fe87 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidLocation.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -47,135 +48,4 @@ public enum RfidLocation BACK_PAGE = 2 } - /// - /// Converts to and from the JSON value - /// - public static class RfidLocationValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidLocation FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidLocation.NONE; - - if (value.Equals((1).ToString())) - return RfidLocation.MAIN_PAGE; - - if (value.Equals((2).ToString())) - return RfidLocation.BACK_PAGE; - - throw new NotImplementedException($"Could not convert value to type RfidLocation: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidLocation? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidLocation.NONE; - - if (value.Equals((1).ToString())) - return RfidLocation.MAIN_PAGE; - - if (value.Equals((2).ToString())) - return RfidLocation.BACK_PAGE; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidLocation value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidLocationJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidLocation Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidLocation? result = rawValue == null - ? null - : RfidLocationValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidLocation to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidLocation rfidLocation, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidLocation.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidLocationNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidLocation from the Json object - /// - /// - /// - /// - /// - public override RfidLocation? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidLocation? result = rawValue == null - ? null - : RfidLocationValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidLocation? rfidLocation, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidLocation?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs b/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs index 6065d01..c337145 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidOrigin.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,65 +14,70 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Location of data in RFID chip /// + [DataContract(Name = "RfidOrigin")] public partial class RfidOrigin : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Source data group file - /// Index of the source record of the image with biometric information in the information data group - /// Index of the template in the record with biometric data - /// Index of the variant of the biometric data template - [JsonConstructor] - public RfidOrigin(int dg, int dgTag, int tagEntry, int entryView) + [JsonConstructorAttribute] + protected RfidOrigin() { } + /// + /// Initializes a new instance of the class. + /// + /// Source data group file (required). + /// Index of the source record of the image with biometric information in the information data group (required). + /// Index of the template in the record with biometric data (required). + /// Index of the variant of the biometric data template (required). + public RfidOrigin(int dg = default(int), int dgTag = default(int), int tagEntry = default(int), int entryView = default(int)) { - Dg = dg; - DgTag = dgTag; - TagEntry = tagEntry; - EntryView = entryView; - OnCreated(); + this.Dg = dg; + this.DgTag = dgTag; + this.TagEntry = tagEntry; + this.EntryView = entryView; } - partial void OnCreated(); - /// /// Source data group file /// /// Source data group file - [JsonPropertyName("dg")] + [DataMember(Name = "dg", IsRequired = true, EmitDefaultValue = true)] public int Dg { get; set; } /// /// Index of the source record of the image with biometric information in the information data group /// /// Index of the source record of the image with biometric information in the information data group - [JsonPropertyName("dgTag")] + [DataMember(Name = "dgTag", IsRequired = true, EmitDefaultValue = true)] public int DgTag { get; set; } /// /// Index of the template in the record with biometric data /// /// Index of the template in the record with biometric data - [JsonPropertyName("tagEntry")] + [DataMember(Name = "tagEntry", IsRequired = true, EmitDefaultValue = true)] public int TagEntry { get; set; } /// /// Index of the variant of the biometric data template /// /// Index of the variant of the biometric data template - [JsonPropertyName("entryView")] + [DataMember(Name = "entryView", IsRequired = true, EmitDefaultValue = true)] public int EntryView { get; set; } /// @@ -93,6 +96,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -104,128 +116,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidOriginJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidOrigin Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option dg = default; - Option dgTag = default; - Option tagEntry = default; - Option entryView = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "dg": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - dg = new Option(utf8JsonReader.GetInt32()); - break; - case "dgTag": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - dgTag = new Option(utf8JsonReader.GetInt32()); - break; - case "tagEntry": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - tagEntry = new Option(utf8JsonReader.GetInt32()); - break; - case "entryView": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - entryView = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!dg.IsSet) - throw new ArgumentException("Property is required for class RfidOrigin.", nameof(dg)); - - if (!dgTag.IsSet) - throw new ArgumentException("Property is required for class RfidOrigin.", nameof(dgTag)); - - if (!tagEntry.IsSet) - throw new ArgumentException("Property is required for class RfidOrigin.", nameof(tagEntry)); - - if (!entryView.IsSet) - throw new ArgumentException("Property is required for class RfidOrigin.", nameof(entryView)); - - if (dg.IsSet && dg.Value == null) - throw new ArgumentNullException(nameof(dg), "Property is not nullable for class RfidOrigin."); - - if (dgTag.IsSet && dgTag.Value == null) - throw new ArgumentNullException(nameof(dgTag), "Property is not nullable for class RfidOrigin."); - - if (tagEntry.IsSet && tagEntry.Value == null) - throw new ArgumentNullException(nameof(tagEntry), "Property is not nullable for class RfidOrigin."); - - if (entryView.IsSet && entryView.Value == null) - throw new ArgumentNullException(nameof(entryView), "Property is not nullable for class RfidOrigin."); - - return new RfidOrigin(dg.Value!.Value!, dgTag.Value!.Value!, tagEntry.Value!.Value!, entryView.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidOrigin rfidOrigin, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidOrigin, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidOrigin rfidOrigin, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("dg", rfidOrigin.Dg); - - writer.WriteNumber("dgTag", rfidOrigin.DgTag); - - writer.WriteNumber("tagEntry", rfidOrigin.TagEntry); - - writer.WriteNumber("entryView", rfidOrigin.EntryView); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs index 5fb76db..5dcf8e6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidPasswordType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -67,159 +68,4 @@ public enum RfidPasswordType SAI = 6 } - /// - /// Converts to and from the JSON value - /// - public static class RfidPasswordTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidPasswordType FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidPasswordType.UNKNOWN; - - if (value.Equals((1).ToString())) - return RfidPasswordType.MRZ; - - if (value.Equals((2).ToString())) - return RfidPasswordType.CAN; - - if (value.Equals((3).ToString())) - return RfidPasswordType.PIN; - - if (value.Equals((4).ToString())) - return RfidPasswordType.PUK; - - if (value.Equals((5).ToString())) - return RfidPasswordType.PIN_E_SIGN; - - if (value.Equals((6).ToString())) - return RfidPasswordType.SAI; - - throw new NotImplementedException($"Could not convert value to type RfidPasswordType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidPasswordType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidPasswordType.UNKNOWN; - - if (value.Equals((1).ToString())) - return RfidPasswordType.MRZ; - - if (value.Equals((2).ToString())) - return RfidPasswordType.CAN; - - if (value.Equals((3).ToString())) - return RfidPasswordType.PIN; - - if (value.Equals((4).ToString())) - return RfidPasswordType.PUK; - - if (value.Equals((5).ToString())) - return RfidPasswordType.PIN_E_SIGN; - - if (value.Equals((6).ToString())) - return RfidPasswordType.SAI; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidPasswordType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidPasswordTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidPasswordType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidPasswordType? result = rawValue == null - ? null - : RfidPasswordTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidPasswordType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidPasswordType rfidPasswordType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidPasswordType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidPasswordTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidPasswordType from the Json object - /// - /// - /// - /// - /// - public override RfidPasswordType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidPasswordType? result = rawValue == null - ? null - : RfidPasswordTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidPasswordType? rfidPasswordType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidPasswordType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs b/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs index f960b51..3c4a9bd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidPkiExtension.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,47 +14,62 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) /// + [DataContract(Name = "RfidPkiExtension")] public partial class RfidPkiExtension : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) - /// Extension binary data. Base64 encoded. - [JsonConstructor] - public RfidPkiExtension(string type, string data) + [JsonConstructorAttribute] + protected RfidPkiExtension() { } + /// + /// Initializes a new instance of the class. + /// + /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) (required). + /// Extension binary data. Base64 encoded. (required). + public RfidPkiExtension(string type = default(string), string data = default(string)) { - Type = type; - Data = data; - OnCreated(); + // to ensure "type" is required (not null) + if (type == null) + { + throw new ArgumentNullException("type is a required property for RfidPkiExtension and cannot be null"); + } + this.Type = type; + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for RfidPkiExtension and cannot be null"); + } + this.Data = data; } - partial void OnCreated(); - /// /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) /// /// Extension identifier (OID, ASCII string); Contents of the identifier in the format S1 (S2), where S1 – attribute name, S2 – identifier (OID string) - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public string Type { get; set; } /// /// Extension binary data. Base64 encoded. /// /// Extension binary data. Base64 encoded. - [JsonPropertyName("Data")] + [DataMember(Name = "Data", IsRequired = true, EmitDefaultValue = true)] public string Data { get; set; } /// @@ -73,6 +86,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -84,106 +106,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidPkiExtensionJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidPkiExtension Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option data = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - type = new Option(utf8JsonReader.GetString()!); - break; - case "Data": - data = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class RfidPkiExtension.", nameof(type)); - - if (!data.IsSet) - throw new ArgumentException("Property is required for class RfidPkiExtension.", nameof(data)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class RfidPkiExtension."); - - if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class RfidPkiExtension."); - - return new RfidPkiExtension(type.Value!, data.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidPkiExtension rfidPkiExtension, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidPkiExtension, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidPkiExtension rfidPkiExtension, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidPkiExtension.Type == null) - throw new ArgumentNullException(nameof(rfidPkiExtension.Type), "Property is required for class RfidPkiExtension."); - - if (rfidPkiExtension.Data == null) - throw new ArgumentNullException(nameof(rfidPkiExtension.Data), "Property is required for class RfidPkiExtension."); - - writer.WriteString("Type", rfidPkiExtension.Type); - - writer.WriteString("Data", rfidPkiExtension.Data); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs index 2dc56db..17e0b0b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidRawData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,55 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// RfidRawData /// + [DataContract(Name = "RfidRawData")] public partial class RfidRawData : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// data - /// fieldType - [JsonConstructor] - public RfidRawData(string data, int fieldType) + [JsonConstructorAttribute] + protected RfidRawData() { } + /// + /// Initializes a new instance of the class. + /// + /// data (required). + /// fieldType (required). + public RfidRawData(string data = default(string), int fieldType = default(int)) { - Data = data; - FieldType = fieldType; - OnCreated(); + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for RfidRawData and cannot be null"); + } + this.Data = data; + this.FieldType = fieldType; } - partial void OnCreated(); - /// /// Gets or Sets Data /// - [JsonPropertyName("Data")] + [DataMember(Name = "Data", IsRequired = true, EmitDefaultValue = true)] public string Data { get; set; } /// /// Gets or Sets FieldType /// - [JsonPropertyName("FieldType")] + [DataMember(Name = "FieldType", IsRequired = true, EmitDefaultValue = true)] public int FieldType { get; set; } /// @@ -71,6 +79,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -82,104 +99,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidRawDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidRawData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option data = default; - Option fieldType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Data": - data = new Option(utf8JsonReader.GetString()!); - break; - case "FieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!data.IsSet) - throw new ArgumentException("Property is required for class RfidRawData.", nameof(data)); - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class RfidRawData.", nameof(fieldType)); - - if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class RfidRawData."); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class RfidRawData."); - - return new RfidRawData(data.Value!, fieldType.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidRawData rfidRawData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidRawData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidRawData rfidRawData, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidRawData.Data == null) - throw new ArgumentNullException(nameof(rfidRawData.Data), "Property is required for class RfidRawData."); - - writer.WriteString("Data", rfidRawData.Data); - - writer.WriteNumber("FieldType", rfidRawData.FieldType); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs index 6bd154e..ad172ed 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSecurityObject.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,74 +14,94 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the contents of a single document security object (SO) and the results of its check within the context of the communication session with electronic document /// + [DataContract(Name = "RfidSecurityObject")] public partial class RfidSecurityObject : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Security object version - /// Identifier of the security object - /// Reference to the source file of the security object data - /// List of remarks arisen during the analysis of SO data structure. - /// List of containers to store information about digital signature objects contained in the SO - [JsonConstructor] - public RfidSecurityObject(decimal varVersion, string objectType, decimal fileReference, List notifications, List signerInfos) + [JsonConstructorAttribute] + protected RfidSecurityObject() { } + /// + /// Initializes a new instance of the class. + /// + /// Security object version (required). + /// Identifier of the security object (required). + /// Reference to the source file of the security object data (required). + /// List of remarks arisen during the analysis of SO data structure. (required). + /// List of containers to store information about digital signature objects contained in the SO (required). + public RfidSecurityObject(decimal varVersion = default(decimal), string objectType = default(string), decimal fileReference = default(decimal), List notifications = default(List), List signerInfos = default(List)) { - VarVersion = varVersion; - ObjectType = objectType; - FileReference = fileReference; - Notifications = notifications; - SignerInfos = signerInfos; - OnCreated(); + this.VarVersion = varVersion; + // to ensure "objectType" is required (not null) + if (objectType == null) + { + throw new ArgumentNullException("objectType is a required property for RfidSecurityObject and cannot be null"); + } + this.ObjectType = objectType; + this.FileReference = fileReference; + // to ensure "notifications" is required (not null) + if (notifications == null) + { + throw new ArgumentNullException("notifications is a required property for RfidSecurityObject and cannot be null"); + } + this.Notifications = notifications; + // to ensure "signerInfos" is required (not null) + if (signerInfos == null) + { + throw new ArgumentNullException("signerInfos is a required property for RfidSecurityObject and cannot be null"); + } + this.SignerInfos = signerInfos; } - partial void OnCreated(); - /// /// Security object version /// /// Security object version - [JsonPropertyName("Version")] + [DataMember(Name = "Version", IsRequired = true, EmitDefaultValue = true)] public decimal VarVersion { get; set; } /// /// Identifier of the security object /// /// Identifier of the security object - [JsonPropertyName("ObjectType")] + [DataMember(Name = "ObjectType", IsRequired = true, EmitDefaultValue = true)] public string ObjectType { get; set; } /// /// Reference to the source file of the security object data /// /// Reference to the source file of the security object data - [JsonPropertyName("FileReference")] + [DataMember(Name = "FileReference", IsRequired = true, EmitDefaultValue = true)] public decimal FileReference { get; set; } /// /// List of remarks arisen during the analysis of SO data structure. /// /// List of remarks arisen during the analysis of SO data structure. - [JsonPropertyName("Notifications")] + [DataMember(Name = "Notifications", IsRequired = true, EmitDefaultValue = true)] public List Notifications { get; set; } /// /// List of containers to store information about digital signature objects contained in the SO /// /// List of containers to store information about digital signature objects contained in the SO - [JsonPropertyName("SignerInfos")] + [DataMember(Name = "SignerInfos", IsRequired = true, EmitDefaultValue = true)] public List SignerInfos { get; set; } /// @@ -103,6 +121,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -114,150 +141,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidSecurityObjectJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidSecurityObject Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option varVersion = default; - Option objectType = default; - Option fileReference = default; - Option?> notifications = default; - Option?> signerInfos = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Version": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - varVersion = new Option(utf8JsonReader.GetDecimal()); - break; - case "ObjectType": - objectType = new Option(utf8JsonReader.GetString()!); - break; - case "FileReference": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fileReference = new Option(utf8JsonReader.GetDecimal()); - break; - case "Notifications": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SignerInfos": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - signerInfos = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!varVersion.IsSet) - throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(varVersion)); - - if (!objectType.IsSet) - throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(objectType)); - - if (!fileReference.IsSet) - throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(fileReference)); - - if (!notifications.IsSet) - throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(notifications)); - - if (!signerInfos.IsSet) - throw new ArgumentException("Property is required for class RfidSecurityObject.", nameof(signerInfos)); - - if (varVersion.IsSet && varVersion.Value == null) - throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class RfidSecurityObject."); - - if (objectType.IsSet && objectType.Value == null) - throw new ArgumentNullException(nameof(objectType), "Property is not nullable for class RfidSecurityObject."); - - if (fileReference.IsSet && fileReference.Value == null) - throw new ArgumentNullException(nameof(fileReference), "Property is not nullable for class RfidSecurityObject."); - - if (notifications.IsSet && notifications.Value == null) - throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidSecurityObject."); - - if (signerInfos.IsSet && signerInfos.Value == null) - throw new ArgumentNullException(nameof(signerInfos), "Property is not nullable for class RfidSecurityObject."); - - return new RfidSecurityObject(varVersion.Value!.Value!, objectType.Value!, fileReference.Value!.Value!, notifications.Value!, signerInfos.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidSecurityObject rfidSecurityObject, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidSecurityObject, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidSecurityObject rfidSecurityObject, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidSecurityObject.ObjectType == null) - throw new ArgumentNullException(nameof(rfidSecurityObject.ObjectType), "Property is required for class RfidSecurityObject."); - - if (rfidSecurityObject.Notifications == null) - throw new ArgumentNullException(nameof(rfidSecurityObject.Notifications), "Property is required for class RfidSecurityObject."); - - if (rfidSecurityObject.SignerInfos == null) - throw new ArgumentNullException(nameof(rfidSecurityObject.SignerInfos), "Property is required for class RfidSecurityObject."); - - writer.WriteNumber("Version", rfidSecurityObject.VarVersion); - - writer.WriteString("ObjectType", rfidSecurityObject.ObjectType); - - writer.WriteNumber("FileReference", rfidSecurityObject.FileReference); - - writer.WritePropertyName("Notifications"); - JsonSerializer.Serialize(writer, rfidSecurityObject.Notifications, jsonSerializerOptions); - writer.WritePropertyName("SignerInfos"); - JsonSerializer.Serialize(writer, rfidSecurityObject.SignerInfos, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs index b6a0b46..6fbf2ff 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,213 +14,218 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the results of work with the SDK within the context of the current communication session with electronic document /// + [DataContract(Name = "RfidSessionData")] public partial class RfidSessionData : IValidatableObject { + + /// + /// Gets or Sets ExtLeSupport + /// + [DataMember(Name = "ExtLeSupport", IsRequired = true, EmitDefaultValue = true)] + public RFIDErrorCodes ExtLeSupport { get; set; } + + /// + /// Gets or Sets SessionProcedure + /// + [DataMember(Name = "Session_procedure", IsRequired = true, EmitDefaultValue = true)] + public RfidAuthenticationProcedureType SessionProcedure { get; set; } + + /// + /// Gets or Sets Status + /// + [DataMember(Name = "Status", EmitDefaultValue = false)] + public CheckResult? Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RfidSessionData() { } /// /// Initializes a new instance of the class. /// - /// List of containers to store information about the involved applications of electronic document - /// List of containers to store information about the supported procedures of authentication and secure data access within the context of the session - /// cardProperties - /// extLeSupport - /// Time of processing, milliseconds - /// List of containers to store information about the read files of the root Master File - /// Total number of bytes transmitted to the RFID-chip during the whole session - /// Total number of bytes received from the RFID-chip during the whole session - /// sessionKey - /// sessionTerminal - /// sessionProcedure - /// List of containers to store information about the detected document security objects - /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document - /// Text SDKVersion value in format A.B (e.g. 3.1) - /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) - /// Text FirmwareVersion value in format A.B (e.g. 5.19) - /// status - [JsonConstructor] - public RfidSessionData(List applications, List accessControls, RfidCardPropertiesExt cardProperties, RFIDErrorCodes extLeSupport, decimal processTime, List rootFiles, decimal totalBytesSent, decimal totalBytesReceived, RfidAccessKey sessionKey, RfidTerminal sessionTerminal, RfidAuthenticationProcedureType sessionProcedure, List securityObjects, Option virtualMode = default, Option sDKVersion = default, Option driverVersion = default, Option firmwareVersion = default, Option status = default) + /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document. + /// Text SDKVersion value in format A.B (e.g. 3.1). + /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4). + /// Text FirmwareVersion value in format A.B (e.g. 5.19). + /// List of containers to store information about the involved applications of electronic document (required). + /// List of containers to store information about the supported procedures of authentication and secure data access within the context of the session (required). + /// cardProperties (required). + /// extLeSupport (required). + /// Time of processing, milliseconds (required). + /// List of containers to store information about the read files of the root Master File (required). + /// Total number of bytes transmitted to the RFID-chip during the whole session (required). + /// Total number of bytes received from the RFID-chip during the whole session (required). + /// sessionKey (required). + /// sessionTerminal (required). + /// sessionProcedure (required). + /// List of containers to store information about the detected document security objects (required). + /// status. + public RfidSessionData(string virtualMode = default(string), string sDKVersion = default(string), string driverVersion = default(string), string firmwareVersion = default(string), List applications = default(List), List accessControls = default(List), RfidCardPropertiesExt cardProperties = default(RfidCardPropertiesExt), RFIDErrorCodes extLeSupport = default(RFIDErrorCodes), decimal processTime = default(decimal), List rootFiles = default(List), decimal totalBytesSent = default(decimal), decimal totalBytesReceived = default(decimal), RfidAccessKey sessionKey = default(RfidAccessKey), RfidTerminal sessionTerminal = default(RfidTerminal), RfidAuthenticationProcedureType sessionProcedure = default(RfidAuthenticationProcedureType), List securityObjects = default(List), CheckResult? status = default(CheckResult?)) { - Applications = applications; - AccessControls = accessControls; - CardProperties = cardProperties; - ExtLeSupport = extLeSupport; - ProcessTime = processTime; - RootFiles = rootFiles; - TotalBytesSent = totalBytesSent; - TotalBytesReceived = totalBytesReceived; - SessionKey = sessionKey; - SessionTerminal = sessionTerminal; - SessionProcedure = sessionProcedure; - SecurityObjects = securityObjects; - VirtualModeOption = virtualMode; - SDKVersionOption = sDKVersion; - DriverVersionOption = driverVersion; - FirmwareVersionOption = firmwareVersion; - StatusOption = status; - OnCreated(); + // to ensure "applications" is required (not null) + if (applications == null) + { + throw new ArgumentNullException("applications is a required property for RfidSessionData and cannot be null"); + } + this.Applications = applications; + // to ensure "accessControls" is required (not null) + if (accessControls == null) + { + throw new ArgumentNullException("accessControls is a required property for RfidSessionData and cannot be null"); + } + this.AccessControls = accessControls; + // to ensure "cardProperties" is required (not null) + if (cardProperties == null) + { + throw new ArgumentNullException("cardProperties is a required property for RfidSessionData and cannot be null"); + } + this.CardProperties = cardProperties; + this.ExtLeSupport = extLeSupport; + this.ProcessTime = processTime; + // to ensure "rootFiles" is required (not null) + if (rootFiles == null) + { + throw new ArgumentNullException("rootFiles is a required property for RfidSessionData and cannot be null"); + } + this.RootFiles = rootFiles; + this.TotalBytesSent = totalBytesSent; + this.TotalBytesReceived = totalBytesReceived; + // to ensure "sessionKey" is required (not null) + if (sessionKey == null) + { + throw new ArgumentNullException("sessionKey is a required property for RfidSessionData and cannot be null"); + } + this.SessionKey = sessionKey; + // to ensure "sessionTerminal" is required (not null) + if (sessionTerminal == null) + { + throw new ArgumentNullException("sessionTerminal is a required property for RfidSessionData and cannot be null"); + } + this.SessionTerminal = sessionTerminal; + this.SessionProcedure = sessionProcedure; + // to ensure "securityObjects" is required (not null) + if (securityObjects == null) + { + throw new ArgumentNullException("securityObjects is a required property for RfidSessionData and cannot be null"); + } + this.SecurityObjects = securityObjects; + this.VirtualMode = virtualMode; + this.SDKVersion = sDKVersion; + this.DriverVersion = driverVersion; + this.FirmwareVersion = firmwareVersion; + this.Status = status; } - partial void OnCreated(); - /// - /// Gets or Sets ExtLeSupport + /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document /// - [JsonPropertyName("ExtLeSupport")] - public RFIDErrorCodes ExtLeSupport { get; set; } + /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document + [DataMember(Name = "VirtualMode", EmitDefaultValue = false)] + public string VirtualMode { get; set; } /// - /// Gets or Sets SessionProcedure + /// Text SDKVersion value in format A.B (e.g. 3.1) /// - [JsonPropertyName("Session_procedure")] - public RfidAuthenticationProcedureType SessionProcedure { get; set; } + /// Text SDKVersion value in format A.B (e.g. 3.1) + [DataMember(Name = "SDKVersion", EmitDefaultValue = false)] + public string SDKVersion { get; set; } /// - /// Used to track the state of Status + /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option StatusOption { get; private set; } + /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) + [DataMember(Name = "DriverVersion", EmitDefaultValue = false)] + public string DriverVersion { get; set; } /// - /// Gets or Sets Status + /// Text FirmwareVersion value in format A.B (e.g. 5.19) /// - [JsonPropertyName("Status")] - public CheckResult? Status { get { return this.StatusOption; } set { this.StatusOption = new(value); } } + /// Text FirmwareVersion value in format A.B (e.g. 5.19) + [DataMember(Name = "FirmwareVersion", EmitDefaultValue = false)] + public string FirmwareVersion { get; set; } /// /// List of containers to store information about the involved applications of electronic document /// /// List of containers to store information about the involved applications of electronic document - [JsonPropertyName("Applications")] + [DataMember(Name = "Applications", IsRequired = true, EmitDefaultValue = true)] public List Applications { get; set; } /// /// List of containers to store information about the supported procedures of authentication and secure data access within the context of the session /// /// List of containers to store information about the supported procedures of authentication and secure data access within the context of the session - [JsonPropertyName("AccessControls")] + [DataMember(Name = "AccessControls", IsRequired = true, EmitDefaultValue = true)] public List AccessControls { get; set; } /// /// Gets or Sets CardProperties /// - [JsonPropertyName("CardProperties")] + [DataMember(Name = "CardProperties", IsRequired = true, EmitDefaultValue = true)] public RfidCardPropertiesExt CardProperties { get; set; } /// /// Time of processing, milliseconds /// /// Time of processing, milliseconds - [JsonPropertyName("ProcessTime")] + [DataMember(Name = "ProcessTime", IsRequired = true, EmitDefaultValue = true)] public decimal ProcessTime { get; set; } /// /// List of containers to store information about the read files of the root Master File /// /// List of containers to store information about the read files of the root Master File - [JsonPropertyName("RootFiles")] + [DataMember(Name = "RootFiles", IsRequired = true, EmitDefaultValue = true)] public List RootFiles { get; set; } /// /// Total number of bytes transmitted to the RFID-chip during the whole session /// /// Total number of bytes transmitted to the RFID-chip during the whole session - [JsonPropertyName("TotalBytesSent")] + [DataMember(Name = "TotalBytesSent", IsRequired = true, EmitDefaultValue = true)] public decimal TotalBytesSent { get; set; } /// /// Total number of bytes received from the RFID-chip during the whole session /// /// Total number of bytes received from the RFID-chip during the whole session - [JsonPropertyName("TotalBytesReceived")] + [DataMember(Name = "TotalBytesReceived", IsRequired = true, EmitDefaultValue = true)] public decimal TotalBytesReceived { get; set; } /// /// Gets or Sets SessionKey /// - [JsonPropertyName("Session_key")] + [DataMember(Name = "Session_key", IsRequired = true, EmitDefaultValue = true)] public RfidAccessKey SessionKey { get; set; } /// /// Gets or Sets SessionTerminal /// - [JsonPropertyName("Session_terminal")] + [DataMember(Name = "Session_terminal", IsRequired = true, EmitDefaultValue = true)] public RfidTerminal SessionTerminal { get; set; } /// /// List of containers to store information about the detected document security objects /// /// List of containers to store information about the detected document security objects - [JsonPropertyName("SecurityObjects")] + [DataMember(Name = "SecurityObjects", IsRequired = true, EmitDefaultValue = true)] public List SecurityObjects { get; set; } - /// - /// Used to track the state of VirtualMode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option VirtualModeOption { get; private set; } - - /// - /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document - /// - /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document - [JsonPropertyName("VirtualMode")] - public string? VirtualMode { get { return this.VirtualModeOption; } set { this.VirtualModeOption = new(value); } } - - /// - /// Used to track the state of SDKVersion - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SDKVersionOption { get; private set; } - - /// - /// Text SDKVersion value in format A.B (e.g. 3.1) - /// - /// Text SDKVersion value in format A.B (e.g. 3.1) - [JsonPropertyName("SDKVersion")] - public string? SDKVersion { get { return this.SDKVersionOption; } set { this.SDKVersionOption = new(value); } } - - /// - /// Used to track the state of DriverVersion - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DriverVersionOption { get; private set; } - - /// - /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) - /// - /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) - [JsonPropertyName("DriverVersion")] - public string? DriverVersion { get { return this.DriverVersionOption; } set { this.DriverVersionOption = new(value); } } - - /// - /// Used to track the state of FirmwareVersion - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FirmwareVersionOption { get; private set; } - - /// - /// Text FirmwareVersion value in format A.B (e.g. 5.19) - /// - /// Text FirmwareVersion value in format A.B (e.g. 5.19) - [JsonPropertyName("FirmwareVersion")] - public string? FirmwareVersion { get { return this.FirmwareVersionOption; } set { this.FirmwareVersionOption = new(value); } } - /// /// Returns the string presentation of the object /// @@ -231,6 +234,10 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class RfidSessionData {\n"); + sb.Append(" VirtualMode: ").Append(VirtualMode).Append("\n"); + sb.Append(" SDKVersion: ").Append(SDKVersion).Append("\n"); + sb.Append(" DriverVersion: ").Append(DriverVersion).Append("\n"); + sb.Append(" FirmwareVersion: ").Append(FirmwareVersion).Append("\n"); sb.Append(" Applications: ").Append(Applications).Append("\n"); sb.Append(" AccessControls: ").Append(AccessControls).Append("\n"); sb.Append(" CardProperties: ").Append(CardProperties).Append("\n"); @@ -243,15 +250,20 @@ public override string ToString() sb.Append(" SessionTerminal: ").Append(SessionTerminal).Append("\n"); sb.Append(" SessionProcedure: ").Append(SessionProcedure).Append("\n"); sb.Append(" SecurityObjects: ").Append(SecurityObjects).Append("\n"); - sb.Append(" VirtualMode: ").Append(VirtualMode).Append("\n"); - sb.Append(" SDKVersion: ").Append(SDKVersion).Append("\n"); - sb.Append(" DriverVersion: ").Append(DriverVersion).Append("\n"); - sb.Append(" FirmwareVersion: ").Append(FirmwareVersion).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -263,324 +275,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidSessionDataJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidSessionData Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> applications = default; - Option?> accessControls = default; - Option cardProperties = default; - Option extLeSupport = default; - Option processTime = default; - Option?> rootFiles = default; - Option totalBytesSent = default; - Option totalBytesReceived = default; - Option sessionKey = default; - Option sessionTerminal = default; - Option sessionProcedure = default; - Option?> securityObjects = default; - Option virtualMode = default; - Option sDKVersion = default; - Option driverVersion = default; - Option firmwareVersion = default; - Option status = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Applications": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - applications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "AccessControls": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - accessControls = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "CardProperties": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - cardProperties = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "ExtLeSupport": - string? extLeSupportRawValue = utf8JsonReader.GetString(); - if (extLeSupportRawValue != null) - extLeSupport = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(extLeSupportRawValue)); - break; - case "ProcessTime": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - processTime = new Option(utf8JsonReader.GetDecimal()); - break; - case "RootFiles": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rootFiles = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "TotalBytesSent": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalBytesSent = new Option(utf8JsonReader.GetDecimal()); - break; - case "TotalBytesReceived": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - totalBytesReceived = new Option(utf8JsonReader.GetDecimal()); - break; - case "Session_key": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sessionKey = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Session_terminal": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sessionTerminal = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Session_procedure": - string? sessionProcedureRawValue = utf8JsonReader.GetString(); - if (sessionProcedureRawValue != null) - sessionProcedure = new Option(RfidAuthenticationProcedureTypeValueConverter.FromStringOrDefault(sessionProcedureRawValue)); - break; - case "SecurityObjects": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - securityObjects = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "VirtualMode": - virtualMode = new Option(utf8JsonReader.GetString()!); - break; - case "SDKVersion": - sDKVersion = new Option(utf8JsonReader.GetString()!); - break; - case "DriverVersion": - driverVersion = new Option(utf8JsonReader.GetString()!); - break; - case "FirmwareVersion": - firmwareVersion = new Option(utf8JsonReader.GetString()!); - break; - case "Status": - string? statusRawValue = utf8JsonReader.GetString(); - if (statusRawValue != null) - status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); - break; - default: - break; - } - } - } - - if (!applications.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(applications)); - - if (!accessControls.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(accessControls)); - - if (!cardProperties.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(cardProperties)); - - if (!extLeSupport.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(extLeSupport)); - - if (!processTime.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(processTime)); - - if (!rootFiles.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(rootFiles)); - - if (!totalBytesSent.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(totalBytesSent)); - - if (!totalBytesReceived.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(totalBytesReceived)); - - if (!sessionKey.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(sessionKey)); - - if (!sessionTerminal.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(sessionTerminal)); - - if (!sessionProcedure.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(sessionProcedure)); - - if (!securityObjects.IsSet) - throw new ArgumentException("Property is required for class RfidSessionData.", nameof(securityObjects)); - - if (applications.IsSet && applications.Value == null) - throw new ArgumentNullException(nameof(applications), "Property is not nullable for class RfidSessionData."); - - if (accessControls.IsSet && accessControls.Value == null) - throw new ArgumentNullException(nameof(accessControls), "Property is not nullable for class RfidSessionData."); - - if (cardProperties.IsSet && cardProperties.Value == null) - throw new ArgumentNullException(nameof(cardProperties), "Property is not nullable for class RfidSessionData."); - - if (extLeSupport.IsSet && extLeSupport.Value == null) - throw new ArgumentNullException(nameof(extLeSupport), "Property is not nullable for class RfidSessionData."); - - if (processTime.IsSet && processTime.Value == null) - throw new ArgumentNullException(nameof(processTime), "Property is not nullable for class RfidSessionData."); - - if (rootFiles.IsSet && rootFiles.Value == null) - throw new ArgumentNullException(nameof(rootFiles), "Property is not nullable for class RfidSessionData."); - - if (totalBytesSent.IsSet && totalBytesSent.Value == null) - throw new ArgumentNullException(nameof(totalBytesSent), "Property is not nullable for class RfidSessionData."); - - if (totalBytesReceived.IsSet && totalBytesReceived.Value == null) - throw new ArgumentNullException(nameof(totalBytesReceived), "Property is not nullable for class RfidSessionData."); - - if (sessionKey.IsSet && sessionKey.Value == null) - throw new ArgumentNullException(nameof(sessionKey), "Property is not nullable for class RfidSessionData."); - - if (sessionTerminal.IsSet && sessionTerminal.Value == null) - throw new ArgumentNullException(nameof(sessionTerminal), "Property is not nullable for class RfidSessionData."); - - if (sessionProcedure.IsSet && sessionProcedure.Value == null) - throw new ArgumentNullException(nameof(sessionProcedure), "Property is not nullable for class RfidSessionData."); - - if (securityObjects.IsSet && securityObjects.Value == null) - throw new ArgumentNullException(nameof(securityObjects), "Property is not nullable for class RfidSessionData."); - - if (virtualMode.IsSet && virtualMode.Value == null) - throw new ArgumentNullException(nameof(virtualMode), "Property is not nullable for class RfidSessionData."); - - if (sDKVersion.IsSet && sDKVersion.Value == null) - throw new ArgumentNullException(nameof(sDKVersion), "Property is not nullable for class RfidSessionData."); - - if (driverVersion.IsSet && driverVersion.Value == null) - throw new ArgumentNullException(nameof(driverVersion), "Property is not nullable for class RfidSessionData."); - - if (firmwareVersion.IsSet && firmwareVersion.Value == null) - throw new ArgumentNullException(nameof(firmwareVersion), "Property is not nullable for class RfidSessionData."); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class RfidSessionData."); - - return new RfidSessionData(applications.Value!, accessControls.Value!, cardProperties.Value!, extLeSupport.Value!.Value!, processTime.Value!.Value!, rootFiles.Value!, totalBytesSent.Value!.Value!, totalBytesReceived.Value!.Value!, sessionKey.Value!, sessionTerminal.Value!, sessionProcedure.Value!.Value!, securityObjects.Value!, virtualMode, sDKVersion, driverVersion, firmwareVersion, status); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidSessionData rfidSessionData, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidSessionData, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidSessionData rfidSessionData, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidSessionData.Applications == null) - throw new ArgumentNullException(nameof(rfidSessionData.Applications), "Property is required for class RfidSessionData."); - - if (rfidSessionData.AccessControls == null) - throw new ArgumentNullException(nameof(rfidSessionData.AccessControls), "Property is required for class RfidSessionData."); - - if (rfidSessionData.CardProperties == null) - throw new ArgumentNullException(nameof(rfidSessionData.CardProperties), "Property is required for class RfidSessionData."); - - if (rfidSessionData.RootFiles == null) - throw new ArgumentNullException(nameof(rfidSessionData.RootFiles), "Property is required for class RfidSessionData."); - - if (rfidSessionData.SessionKey == null) - throw new ArgumentNullException(nameof(rfidSessionData.SessionKey), "Property is required for class RfidSessionData."); - - if (rfidSessionData.SessionTerminal == null) - throw new ArgumentNullException(nameof(rfidSessionData.SessionTerminal), "Property is required for class RfidSessionData."); - - if (rfidSessionData.SecurityObjects == null) - throw new ArgumentNullException(nameof(rfidSessionData.SecurityObjects), "Property is required for class RfidSessionData."); - - if (rfidSessionData.VirtualModeOption.IsSet && rfidSessionData.VirtualMode == null) - throw new ArgumentNullException(nameof(rfidSessionData.VirtualMode), "Property is required for class RfidSessionData."); - - if (rfidSessionData.SDKVersionOption.IsSet && rfidSessionData.SDKVersion == null) - throw new ArgumentNullException(nameof(rfidSessionData.SDKVersion), "Property is required for class RfidSessionData."); - - if (rfidSessionData.DriverVersionOption.IsSet && rfidSessionData.DriverVersion == null) - throw new ArgumentNullException(nameof(rfidSessionData.DriverVersion), "Property is required for class RfidSessionData."); - - if (rfidSessionData.FirmwareVersionOption.IsSet && rfidSessionData.FirmwareVersion == null) - throw new ArgumentNullException(nameof(rfidSessionData.FirmwareVersion), "Property is required for class RfidSessionData."); - - writer.WritePropertyName("Applications"); - JsonSerializer.Serialize(writer, rfidSessionData.Applications, jsonSerializerOptions); - writer.WritePropertyName("AccessControls"); - JsonSerializer.Serialize(writer, rfidSessionData.AccessControls, jsonSerializerOptions); - writer.WritePropertyName("CardProperties"); - JsonSerializer.Serialize(writer, rfidSessionData.CardProperties, jsonSerializerOptions); - var extLeSupportRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidSessionData.ExtLeSupport); - writer.WriteNumber("ExtLeSupport", extLeSupportRawValue); - - writer.WriteNumber("ProcessTime", rfidSessionData.ProcessTime); - - writer.WritePropertyName("RootFiles"); - JsonSerializer.Serialize(writer, rfidSessionData.RootFiles, jsonSerializerOptions); - writer.WriteNumber("TotalBytesSent", rfidSessionData.TotalBytesSent); - - writer.WriteNumber("TotalBytesReceived", rfidSessionData.TotalBytesReceived); - - writer.WritePropertyName("Session_key"); - JsonSerializer.Serialize(writer, rfidSessionData.SessionKey, jsonSerializerOptions); - writer.WritePropertyName("Session_terminal"); - JsonSerializer.Serialize(writer, rfidSessionData.SessionTerminal, jsonSerializerOptions); - var sessionProcedureRawValue = RfidAuthenticationProcedureTypeValueConverter.ToJsonValue(rfidSessionData.SessionProcedure); - writer.WriteNumber("Session_procedure", sessionProcedureRawValue); - - writer.WritePropertyName("SecurityObjects"); - JsonSerializer.Serialize(writer, rfidSessionData.SecurityObjects, jsonSerializerOptions); - if (rfidSessionData.VirtualModeOption.IsSet) - writer.WriteString("VirtualMode", rfidSessionData.VirtualMode); - - if (rfidSessionData.SDKVersionOption.IsSet) - writer.WriteString("SDKVersion", rfidSessionData.SDKVersion); - - if (rfidSessionData.DriverVersionOption.IsSet) - writer.WriteString("DriverVersion", rfidSessionData.DriverVersion); - - if (rfidSessionData.FirmwareVersionOption.IsSet) - writer.WriteString("FirmwareVersion", rfidSessionData.FirmwareVersion); - - if (rfidSessionData.StatusOption.IsSet) - { - var statusRawValue = CheckResultValueConverter.ToJsonValue(rfidSessionData.Status!.Value); - writer.WriteNumber("Status", statusRawValue); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs index e6539fc..496a64a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSignerInfoEx.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,131 +14,186 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the contents of a single copy of digital signature of the document security object and the results of its check within the context of the communication session with electronic document /// + [DataContract(Name = "RfidSignerInfoEx")] public partial class RfidSignerInfoEx : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// Version of SignerInfo ASN.1 structure - /// issuer - /// serialNumber - /// subjectKeyIdentifier - /// Hash algorithm identifier (OID) for digital signature generation - /// List of the signed attributes - /// Digital signature algorithm identifier (OID) - /// signature - /// pAStatus - /// Certificate chain, used for the digital signature verification. - /// Binary data array used to calculate the hash value for digital signature verification. Base64 encoded. - /// notifications - [JsonConstructor] - public RfidSignerInfoEx(decimal varVersion, RfidDistinguishedName issuer, TrfFtBytes serialNumber, TrfFtBytes subjectKeyIdentifier, string digestAlgorithm, List signedAttributes, string signatureAlgorithm, TrfFtBytes signature, RFIDErrorCodes pAStatus, List certificateChain, string dataToHash, List notifications) - { - VarVersion = varVersion; - Issuer = issuer; - SerialNumber = serialNumber; - SubjectKeyIdentifier = subjectKeyIdentifier; - DigestAlgorithm = digestAlgorithm; - SignedAttributes = signedAttributes; - SignatureAlgorithm = signatureAlgorithm; - Signature = signature; - PAStatus = pAStatus; - CertificateChain = certificateChain; - DataToHash = dataToHash; - Notifications = notifications; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets PAStatus /// - [JsonPropertyName("PA_Status")] + [DataMember(Name = "PA_Status", IsRequired = true, EmitDefaultValue = true)] public RFIDErrorCodes PAStatus { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RfidSignerInfoEx() { } + /// + /// Initializes a new instance of the class. + /// + /// Version of SignerInfo ASN.1 structure (required). + /// issuer (required). + /// serialNumber (required). + /// subjectKeyIdentifier (required). + /// Hash algorithm identifier (OID) for digital signature generation (required). + /// List of the signed attributes (required). + /// Digital signature algorithm identifier (OID) (required). + /// signature (required). + /// pAStatus (required). + /// Certificate chain, used for the digital signature verification. (required). + /// Binary data array used to calculate the hash value for digital signature verification. Base64 encoded. (required). + /// notifications (required). + public RfidSignerInfoEx(decimal varVersion = default(decimal), RfidDistinguishedName issuer = default(RfidDistinguishedName), TrfFtBytes serialNumber = default(TrfFtBytes), TrfFtBytes subjectKeyIdentifier = default(TrfFtBytes), string digestAlgorithm = default(string), List signedAttributes = default(List), string signatureAlgorithm = default(string), TrfFtBytes signature = default(TrfFtBytes), RFIDErrorCodes pAStatus = default(RFIDErrorCodes), List certificateChain = default(List), string dataToHash = default(string), List notifications = default(List)) + { + this.VarVersion = varVersion; + // to ensure "issuer" is required (not null) + if (issuer == null) + { + throw new ArgumentNullException("issuer is a required property for RfidSignerInfoEx and cannot be null"); + } + this.Issuer = issuer; + // to ensure "serialNumber" is required (not null) + if (serialNumber == null) + { + throw new ArgumentNullException("serialNumber is a required property for RfidSignerInfoEx and cannot be null"); + } + this.SerialNumber = serialNumber; + // to ensure "subjectKeyIdentifier" is required (not null) + if (subjectKeyIdentifier == null) + { + throw new ArgumentNullException("subjectKeyIdentifier is a required property for RfidSignerInfoEx and cannot be null"); + } + this.SubjectKeyIdentifier = subjectKeyIdentifier; + // to ensure "digestAlgorithm" is required (not null) + if (digestAlgorithm == null) + { + throw new ArgumentNullException("digestAlgorithm is a required property for RfidSignerInfoEx and cannot be null"); + } + this.DigestAlgorithm = digestAlgorithm; + // to ensure "signedAttributes" is required (not null) + if (signedAttributes == null) + { + throw new ArgumentNullException("signedAttributes is a required property for RfidSignerInfoEx and cannot be null"); + } + this.SignedAttributes = signedAttributes; + // to ensure "signatureAlgorithm" is required (not null) + if (signatureAlgorithm == null) + { + throw new ArgumentNullException("signatureAlgorithm is a required property for RfidSignerInfoEx and cannot be null"); + } + this.SignatureAlgorithm = signatureAlgorithm; + // to ensure "signature" is required (not null) + if (signature == null) + { + throw new ArgumentNullException("signature is a required property for RfidSignerInfoEx and cannot be null"); + } + this.Signature = signature; + this.PAStatus = pAStatus; + // to ensure "certificateChain" is required (not null) + if (certificateChain == null) + { + throw new ArgumentNullException("certificateChain is a required property for RfidSignerInfoEx and cannot be null"); + } + this.CertificateChain = certificateChain; + // to ensure "dataToHash" is required (not null) + if (dataToHash == null) + { + throw new ArgumentNullException("dataToHash is a required property for RfidSignerInfoEx and cannot be null"); + } + this.DataToHash = dataToHash; + // to ensure "notifications" is required (not null) + if (notifications == null) + { + throw new ArgumentNullException("notifications is a required property for RfidSignerInfoEx and cannot be null"); + } + this.Notifications = notifications; + } /// /// Version of SignerInfo ASN.1 structure /// /// Version of SignerInfo ASN.1 structure - [JsonPropertyName("Version")] + [DataMember(Name = "Version", IsRequired = true, EmitDefaultValue = true)] public decimal VarVersion { get; set; } /// /// Gets or Sets Issuer /// - [JsonPropertyName("Issuer")] + [DataMember(Name = "Issuer", IsRequired = true, EmitDefaultValue = true)] public RfidDistinguishedName Issuer { get; set; } /// /// Gets or Sets SerialNumber /// - [JsonPropertyName("SerialNumber")] + [DataMember(Name = "SerialNumber", IsRequired = true, EmitDefaultValue = true)] public TrfFtBytes SerialNumber { get; set; } /// /// Gets or Sets SubjectKeyIdentifier /// - [JsonPropertyName("SubjectKeyIdentifier")] + [DataMember(Name = "SubjectKeyIdentifier", IsRequired = true, EmitDefaultValue = true)] public TrfFtBytes SubjectKeyIdentifier { get; set; } /// /// Hash algorithm identifier (OID) for digital signature generation /// /// Hash algorithm identifier (OID) for digital signature generation - [JsonPropertyName("DigestAlgorithm")] + [DataMember(Name = "DigestAlgorithm", IsRequired = true, EmitDefaultValue = true)] public string DigestAlgorithm { get; set; } /// /// List of the signed attributes /// /// List of the signed attributes - [JsonPropertyName("SignedAttributes")] + [DataMember(Name = "SignedAttributes", IsRequired = true, EmitDefaultValue = true)] public List SignedAttributes { get; set; } /// /// Digital signature algorithm identifier (OID) /// /// Digital signature algorithm identifier (OID) - [JsonPropertyName("SignatureAlgorithm")] + [DataMember(Name = "SignatureAlgorithm", IsRequired = true, EmitDefaultValue = true)] public string SignatureAlgorithm { get; set; } /// /// Gets or Sets Signature /// - [JsonPropertyName("Signature")] + [DataMember(Name = "Signature", IsRequired = true, EmitDefaultValue = true)] public TrfFtBytes Signature { get; set; } /// /// Certificate chain, used for the digital signature verification. /// /// Certificate chain, used for the digital signature verification. - [JsonPropertyName("CertificateChain")] + [DataMember(Name = "CertificateChain", IsRequired = true, EmitDefaultValue = true)] public List CertificateChain { get; set; } /// /// Binary data array used to calculate the hash value for digital signature verification. Base64 encoded. /// /// Binary data array used to calculate the hash value for digital signature verification. Base64 encoded. - [JsonPropertyName("DataToHash")] + [DataMember(Name = "DataToHash", IsRequired = true, EmitDefaultValue = true)] public string DataToHash { get; set; } /// /// Gets or Sets Notifications /// - [JsonPropertyName("Notifications")] + [DataMember(Name = "Notifications", IsRequired = true, EmitDefaultValue = true)] public List Notifications { get; set; } /// @@ -167,6 +220,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -178,262 +240,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidSignerInfoExJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidSignerInfoEx Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option varVersion = default; - Option issuer = default; - Option serialNumber = default; - Option subjectKeyIdentifier = default; - Option digestAlgorithm = default; - Option?> signedAttributes = default; - Option signatureAlgorithm = default; - Option signature = default; - Option pAStatus = default; - Option?> certificateChain = default; - Option dataToHash = default; - Option?> notifications = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Version": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - varVersion = new Option(utf8JsonReader.GetDecimal()); - break; - case "Issuer": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - issuer = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SerialNumber": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - serialNumber = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SubjectKeyIdentifier": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - subjectKeyIdentifier = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "DigestAlgorithm": - digestAlgorithm = new Option(utf8JsonReader.GetString()!); - break; - case "SignedAttributes": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - signedAttributes = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SignatureAlgorithm": - signatureAlgorithm = new Option(utf8JsonReader.GetString()!); - break; - case "Signature": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - signature = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "PA_Status": - string? pAStatusRawValue = utf8JsonReader.GetString(); - if (pAStatusRawValue != null) - pAStatus = new Option(RFIDErrorCodesValueConverter.FromStringOrDefault(pAStatusRawValue)); - break; - case "CertificateChain": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - certificateChain = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "DataToHash": - dataToHash = new Option(utf8JsonReader.GetString()!); - break; - case "Notifications": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - notifications = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!varVersion.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(varVersion)); - - if (!issuer.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(issuer)); - - if (!serialNumber.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(serialNumber)); - - if (!subjectKeyIdentifier.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(subjectKeyIdentifier)); - - if (!digestAlgorithm.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(digestAlgorithm)); - - if (!signedAttributes.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(signedAttributes)); - - if (!signatureAlgorithm.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(signatureAlgorithm)); - - if (!signature.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(signature)); - - if (!pAStatus.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(pAStatus)); - - if (!certificateChain.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(certificateChain)); - - if (!dataToHash.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(dataToHash)); - - if (!notifications.IsSet) - throw new ArgumentException("Property is required for class RfidSignerInfoEx.", nameof(notifications)); - - if (varVersion.IsSet && varVersion.Value == null) - throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class RfidSignerInfoEx."); - - if (issuer.IsSet && issuer.Value == null) - throw new ArgumentNullException(nameof(issuer), "Property is not nullable for class RfidSignerInfoEx."); - - if (serialNumber.IsSet && serialNumber.Value == null) - throw new ArgumentNullException(nameof(serialNumber), "Property is not nullable for class RfidSignerInfoEx."); - - if (subjectKeyIdentifier.IsSet && subjectKeyIdentifier.Value == null) - throw new ArgumentNullException(nameof(subjectKeyIdentifier), "Property is not nullable for class RfidSignerInfoEx."); - - if (digestAlgorithm.IsSet && digestAlgorithm.Value == null) - throw new ArgumentNullException(nameof(digestAlgorithm), "Property is not nullable for class RfidSignerInfoEx."); - - if (signedAttributes.IsSet && signedAttributes.Value == null) - throw new ArgumentNullException(nameof(signedAttributes), "Property is not nullable for class RfidSignerInfoEx."); - - if (signatureAlgorithm.IsSet && signatureAlgorithm.Value == null) - throw new ArgumentNullException(nameof(signatureAlgorithm), "Property is not nullable for class RfidSignerInfoEx."); - - if (signature.IsSet && signature.Value == null) - throw new ArgumentNullException(nameof(signature), "Property is not nullable for class RfidSignerInfoEx."); - - if (pAStatus.IsSet && pAStatus.Value == null) - throw new ArgumentNullException(nameof(pAStatus), "Property is not nullable for class RfidSignerInfoEx."); - - if (certificateChain.IsSet && certificateChain.Value == null) - throw new ArgumentNullException(nameof(certificateChain), "Property is not nullable for class RfidSignerInfoEx."); - - if (dataToHash.IsSet && dataToHash.Value == null) - throw new ArgumentNullException(nameof(dataToHash), "Property is not nullable for class RfidSignerInfoEx."); - - if (notifications.IsSet && notifications.Value == null) - throw new ArgumentNullException(nameof(notifications), "Property is not nullable for class RfidSignerInfoEx."); - - return new RfidSignerInfoEx(varVersion.Value!.Value!, issuer.Value!, serialNumber.Value!, subjectKeyIdentifier.Value!, digestAlgorithm.Value!, signedAttributes.Value!, signatureAlgorithm.Value!, signature.Value!, pAStatus.Value!.Value!, certificateChain.Value!, dataToHash.Value!, notifications.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidSignerInfoEx rfidSignerInfoEx, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidSignerInfoEx, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidSignerInfoEx rfidSignerInfoEx, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidSignerInfoEx.Issuer == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.Issuer), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.SerialNumber == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.SerialNumber), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.SubjectKeyIdentifier == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.SubjectKeyIdentifier), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.DigestAlgorithm == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.DigestAlgorithm), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.SignedAttributes == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.SignedAttributes), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.SignatureAlgorithm == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.SignatureAlgorithm), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.Signature == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.Signature), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.CertificateChain == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.CertificateChain), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.DataToHash == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.DataToHash), "Property is required for class RfidSignerInfoEx."); - - if (rfidSignerInfoEx.Notifications == null) - throw new ArgumentNullException(nameof(rfidSignerInfoEx.Notifications), "Property is required for class RfidSignerInfoEx."); - - writer.WriteNumber("Version", rfidSignerInfoEx.VarVersion); - - writer.WritePropertyName("Issuer"); - JsonSerializer.Serialize(writer, rfidSignerInfoEx.Issuer, jsonSerializerOptions); - writer.WritePropertyName("SerialNumber"); - JsonSerializer.Serialize(writer, rfidSignerInfoEx.SerialNumber, jsonSerializerOptions); - writer.WritePropertyName("SubjectKeyIdentifier"); - JsonSerializer.Serialize(writer, rfidSignerInfoEx.SubjectKeyIdentifier, jsonSerializerOptions); - writer.WriteString("DigestAlgorithm", rfidSignerInfoEx.DigestAlgorithm); - - writer.WritePropertyName("SignedAttributes"); - JsonSerializer.Serialize(writer, rfidSignerInfoEx.SignedAttributes, jsonSerializerOptions); - writer.WriteString("SignatureAlgorithm", rfidSignerInfoEx.SignatureAlgorithm); - - writer.WritePropertyName("Signature"); - JsonSerializer.Serialize(writer, rfidSignerInfoEx.Signature, jsonSerializerOptions); - var pAStatusRawValue = RFIDErrorCodesValueConverter.ToJsonValue(rfidSignerInfoEx.PAStatus); - writer.WriteNumber("PA_Status", pAStatusRawValue); - - writer.WritePropertyName("CertificateChain"); - JsonSerializer.Serialize(writer, rfidSignerInfoEx.CertificateChain, jsonSerializerOptions); - writer.WriteString("DataToHash", rfidSignerInfoEx.DataToHash); - - writer.WritePropertyName("Notifications"); - JsonSerializer.Serialize(writer, rfidSignerInfoEx.Notifications, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs b/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs index 7da0cb7..937535e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidTerminal.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,55 +14,60 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to describe the terminal type within the context of the communication session with electronic document /// + [DataContract(Name = "RfidTerminal")] public partial class RfidTerminal : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// termType - /// Declared (set) combination of flags of access rights to the functionality of the document (combination of eRfidTerminalAuthorizationRequirement values) - /// Declared (set) combination of flags of access rights to the functionality of the document (combination of RfidTerminalAuthorizationRequirement values) - [JsonConstructor] - public RfidTerminal(RfidTerminalType termType, decimal authReq, decimal authReq2) - { - TermType = termType; - AuthReq = authReq; - AuthReq2 = authReq2; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets TermType /// - [JsonPropertyName("TermType")] + [DataMember(Name = "TermType", IsRequired = true, EmitDefaultValue = true)] public RfidTerminalType TermType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected RfidTerminal() { } + /// + /// Initializes a new instance of the class. + /// + /// termType (required). + /// Declared (set) combination of flags of access rights to the functionality of the document (combination of eRfidTerminalAuthorizationRequirement values) (required). + /// Declared (set) combination of flags of access rights to the functionality of the document (combination of RfidTerminalAuthorizationRequirement values) (required). + public RfidTerminal(RfidTerminalType termType = default(RfidTerminalType), decimal authReq = default(decimal), decimal authReq2 = default(decimal)) + { + this.TermType = termType; + this.AuthReq = authReq; + this.AuthReq2 = authReq2; + } /// /// Declared (set) combination of flags of access rights to the functionality of the document (combination of eRfidTerminalAuthorizationRequirement values) /// /// Declared (set) combination of flags of access rights to the functionality of the document (combination of eRfidTerminalAuthorizationRequirement values) - [JsonPropertyName("AuthReq")] + [DataMember(Name = "AuthReq", IsRequired = true, EmitDefaultValue = true)] public decimal AuthReq { get; set; } /// /// Declared (set) combination of flags of access rights to the functionality of the document (combination of RfidTerminalAuthorizationRequirement values) /// /// Declared (set) combination of flags of access rights to the functionality of the document (combination of RfidTerminalAuthorizationRequirement values) - [JsonPropertyName("AuthReq2")] + [DataMember(Name = "AuthReq2", IsRequired = true, EmitDefaultValue = true)] public decimal AuthReq2 { get; set; } /// @@ -82,6 +85,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -93,117 +105,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidTerminalJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidTerminal Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option termType = default; - Option authReq = default; - Option authReq2 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "TermType": - string? termTypeRawValue = utf8JsonReader.GetString(); - if (termTypeRawValue != null) - termType = new Option(RfidTerminalTypeValueConverter.FromStringOrDefault(termTypeRawValue)); - break; - case "AuthReq": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - authReq = new Option(utf8JsonReader.GetDecimal()); - break; - case "AuthReq2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - authReq2 = new Option(utf8JsonReader.GetDecimal()); - break; - default: - break; - } - } - } - - if (!termType.IsSet) - throw new ArgumentException("Property is required for class RfidTerminal.", nameof(termType)); - - if (!authReq.IsSet) - throw new ArgumentException("Property is required for class RfidTerminal.", nameof(authReq)); - - if (!authReq2.IsSet) - throw new ArgumentException("Property is required for class RfidTerminal.", nameof(authReq2)); - - if (termType.IsSet && termType.Value == null) - throw new ArgumentNullException(nameof(termType), "Property is not nullable for class RfidTerminal."); - - if (authReq.IsSet && authReq.Value == null) - throw new ArgumentNullException(nameof(authReq), "Property is not nullable for class RfidTerminal."); - - if (authReq2.IsSet && authReq2.Value == null) - throw new ArgumentNullException(nameof(authReq2), "Property is not nullable for class RfidTerminal."); - - return new RfidTerminal(termType.Value!.Value!, authReq.Value!.Value!, authReq2.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidTerminal rfidTerminal, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidTerminal, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidTerminal rfidTerminal, JsonSerializerOptions jsonSerializerOptions) - { - var termTypeRawValue = RfidTerminalTypeValueConverter.ToJsonValue(rfidTerminal.TermType); - writer.WriteNumber("TermType", termTypeRawValue); - - writer.WriteNumber("AuthReq", rfidTerminal.AuthReq); - - writer.WriteNumber("AuthReq2", rfidTerminal.AuthReq2); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs index bb8206d..d870678 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidTerminalType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -57,147 +58,4 @@ public enum RfidTerminalType UNAUTHENTICATED_TERMINAL = 4 } - /// - /// Converts to and from the JSON value - /// - public static class RfidTerminalTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidTerminalType FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidTerminalType.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidTerminalType.INSPECTION_SYSTEM; - - if (value.Equals((2).ToString())) - return RfidTerminalType.AUTHENTICATION_TERMINAL; - - if (value.Equals((3).ToString())) - return RfidTerminalType.SIGNATURE_TERMINAL; - - if (value.Equals((4).ToString())) - return RfidTerminalType.UNAUTHENTICATED_TERMINAL; - - throw new NotImplementedException($"Could not convert value to type RfidTerminalType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidTerminalType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidTerminalType.UNDEFINED; - - if (value.Equals((1).ToString())) - return RfidTerminalType.INSPECTION_SYSTEM; - - if (value.Equals((2).ToString())) - return RfidTerminalType.AUTHENTICATION_TERMINAL; - - if (value.Equals((3).ToString())) - return RfidTerminalType.SIGNATURE_TERMINAL; - - if (value.Equals((4).ToString())) - return RfidTerminalType.UNAUTHENTICATED_TERMINAL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidTerminalType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidTerminalTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidTerminalType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidTerminalType? result = rawValue == null - ? null - : RfidTerminalTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidTerminalType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidTerminalType rfidTerminalType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidTerminalType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidTerminalTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidTerminalType from the Json object - /// - /// - /// - /// - /// - public override RfidTerminalType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidTerminalType? result = rawValue == null - ? null - : RfidTerminalTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidTerminalType? rfidTerminalType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidTerminalType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidType.cs b/src/Regula.DocumentReader.WebClient/Model/RfidType.cs index 9361a75..576bc74 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -47,135 +48,4 @@ public enum RfidType B = 2 } - /// - /// Converts to and from the JSON value - /// - public static class RfidTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static RfidType FromString(string value) - { - if (value.Equals((0).ToString())) - return RfidType.UNKNOWN; - - if (value.Equals((1).ToString())) - return RfidType.A; - - if (value.Equals((2).ToString())) - return RfidType.B; - - throw new NotImplementedException($"Could not convert value to type RfidType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static RfidType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return RfidType.UNKNOWN; - - if (value.Equals((1).ToString())) - return RfidType.A; - - if (value.Equals((2).ToString())) - return RfidType.B; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(RfidType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class RfidTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override RfidType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidType? result = rawValue == null - ? null - : RfidTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the RfidType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidType rfidType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class RfidTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a RfidType from the Json object - /// - /// - /// - /// - /// - public override RfidType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - RfidType? result = rawValue == null - ? null - : RfidTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidType? rfidType, JsonSerializerOptions options) - { - writer.WriteStringValue(rfidType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs b/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs index ed6187b..be9162d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidValidity.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,60 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure contains information on a certificate validity. /// + [DataContract(Name = "RfidValidity")] public partial class RfidValidity : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// notBefore - /// notAfter - [JsonConstructor] - public RfidValidity(TrfFtString notBefore, TrfFtString notAfter) + [JsonConstructorAttribute] + protected RfidValidity() { } + /// + /// Initializes a new instance of the class. + /// + /// notBefore (required). + /// notAfter (required). + public RfidValidity(TrfFtString notBefore = default(TrfFtString), TrfFtString notAfter = default(TrfFtString)) { - NotBefore = notBefore; - NotAfter = notAfter; - OnCreated(); + // to ensure "notBefore" is required (not null) + if (notBefore == null) + { + throw new ArgumentNullException("notBefore is a required property for RfidValidity and cannot be null"); + } + this.NotBefore = notBefore; + // to ensure "notAfter" is required (not null) + if (notAfter == null) + { + throw new ArgumentNullException("notAfter is a required property for RfidValidity and cannot be null"); + } + this.NotAfter = notAfter; } - partial void OnCreated(); - /// /// Gets or Sets NotBefore /// - [JsonPropertyName("NotBefore")] + [DataMember(Name = "NotBefore", IsRequired = true, EmitDefaultValue = true)] public TrfFtString NotBefore { get; set; } /// /// Gets or Sets NotAfter /// - [JsonPropertyName("NotAfter")] + [DataMember(Name = "NotAfter", IsRequired = true, EmitDefaultValue = true)] public TrfFtString NotAfter { get; set; } /// @@ -71,6 +84,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -82,109 +104,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class RfidValidityJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override RfidValidity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option notBefore = default; - Option notAfter = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "NotBefore": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - notBefore = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "NotAfter": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - notAfter = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!notBefore.IsSet) - throw new ArgumentException("Property is required for class RfidValidity.", nameof(notBefore)); - - if (!notAfter.IsSet) - throw new ArgumentException("Property is required for class RfidValidity.", nameof(notAfter)); - - if (notBefore.IsSet && notBefore.Value == null) - throw new ArgumentNullException(nameof(notBefore), "Property is not nullable for class RfidValidity."); - - if (notAfter.IsSet && notAfter.Value == null) - throw new ArgumentNullException(nameof(notAfter), "Property is not nullable for class RfidValidity."); - - return new RfidValidity(notBefore.Value!, notAfter.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, RfidValidity rfidValidity, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, rfidValidity, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, RfidValidity rfidValidity, JsonSerializerOptions jsonSerializerOptions) - { - if (rfidValidity.NotBefore == null) - throw new ArgumentNullException(nameof(rfidValidity.NotBefore), "Property is required for class RfidValidity."); - - if (rfidValidity.NotAfter == null) - throw new ArgumentNullException(nameof(rfidValidity.NotAfter), "Property is required for class RfidValidity."); - - writer.WritePropertyName("NotBefore"); - JsonSerializer.Serialize(writer, rfidValidity.NotBefore, jsonSerializerOptions); - writer.WritePropertyName("NotAfter"); - JsonSerializer.Serialize(writer, rfidValidity.NotAfter, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Scenario.cs b/src/Regula.DocumentReader.WebClient/Model/Scenario.cs index 03f83c5..9f7b2c5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Scenario.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Scenario.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -29,386 +30,122 @@ namespace Regula.DocumentReader.WebClient.Model /// Document processing scenario /// /// Document processing scenario + [JsonConverter(typeof(StringEnumConverter))] public enum Scenario { /// /// Enum MRZ for value: Mrz /// + [EnumMember(Value = "Mrz")] MRZ = 1, /// /// Enum BARCODE for value: Barcode /// + [EnumMember(Value = "Barcode")] BARCODE = 2, /// /// Enum LOCATE for value: Locate /// + [EnumMember(Value = "Locate")] LOCATE = 3, /// /// Enum OCR for value: Ocr /// + [EnumMember(Value = "Ocr")] OCR = 4, /// /// Enum DOCTYPE for value: DocType /// + [EnumMember(Value = "DocType")] DOCTYPE = 5, /// /// Enum MRZ_OR_BARCODE for value: MrzOrBarcode /// + [EnumMember(Value = "MrzOrBarcode")] MRZ_OR_BARCODE = 6, /// /// Enum MRZ_OR_LOCATE for value: MrzOrLocate /// + [EnumMember(Value = "MrzOrLocate")] MRZ_OR_LOCATE = 7, /// /// Enum MRZ_AND_LOCATE for value: MrzAndLocate /// + [EnumMember(Value = "MrzAndLocate")] MRZ_AND_LOCATE = 8, /// /// Enum BARCODE_AND_LOCATE for value: BarcodeAndLocate /// + [EnumMember(Value = "BarcodeAndLocate")] BARCODE_AND_LOCATE = 9, /// /// Enum MRZ_OR_OCR for value: MrzOrOcr /// + [EnumMember(Value = "MrzOrOcr")] MRZ_OR_OCR = 10, /// /// Enum MRZ_OR_BARCODE_OR_OCR for value: MrzOrBarcodeOrOcr /// + [EnumMember(Value = "MrzOrBarcodeOrOcr")] MRZ_OR_BARCODE_OR_OCR = 11, /// /// Enum LOCATE_VISUAL_AND_MRZ_OR_OCR for value: LocateVisual_And_MrzOrOcr /// + [EnumMember(Value = "LocateVisual_And_MrzOrOcr")] LOCATE_VISUAL_AND_MRZ_OR_OCR = 12, /// /// Enum FULL_PROCESS for value: FullProcess /// + [EnumMember(Value = "FullProcess")] FULL_PROCESS = 13, /// /// Enum FULL_AUTH for value: FullAuth /// + [EnumMember(Value = "FullAuth")] FULL_AUTH = 14, /// /// Enum RUS_STAMP for value: RusStamp /// + [EnumMember(Value = "RusStamp")] RUS_STAMP = 15, /// /// Enum OCR_FREE for value: OcrFree /// + [EnumMember(Value = "OcrFree")] OCR_FREE = 16, /// /// Enum CREDIT_CARD for value: CreditCard /// + [EnumMember(Value = "CreditCard")] CREDIT_CARD = 17, /// /// Enum CAPTURE for value: Capture /// + [EnumMember(Value = "Capture")] CAPTURE = 18, /// /// Enum DTC for value: DTC /// + [EnumMember(Value = "DTC")] DTC = 19 } - /// - /// Converts to and from the JSON value - /// - public static class ScenarioValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static Scenario FromString(string value) - { - if (value.Equals("Mrz")) - return Scenario.MRZ; - - if (value.Equals("Barcode")) - return Scenario.BARCODE; - - if (value.Equals("Locate")) - return Scenario.LOCATE; - - if (value.Equals("Ocr")) - return Scenario.OCR; - - if (value.Equals("DocType")) - return Scenario.DOCTYPE; - - if (value.Equals("MrzOrBarcode")) - return Scenario.MRZ_OR_BARCODE; - - if (value.Equals("MrzOrLocate")) - return Scenario.MRZ_OR_LOCATE; - - if (value.Equals("MrzAndLocate")) - return Scenario.MRZ_AND_LOCATE; - - if (value.Equals("BarcodeAndLocate")) - return Scenario.BARCODE_AND_LOCATE; - - if (value.Equals("MrzOrOcr")) - return Scenario.MRZ_OR_OCR; - - if (value.Equals("MrzOrBarcodeOrOcr")) - return Scenario.MRZ_OR_BARCODE_OR_OCR; - - if (value.Equals("LocateVisual_And_MrzOrOcr")) - return Scenario.LOCATE_VISUAL_AND_MRZ_OR_OCR; - - if (value.Equals("FullProcess")) - return Scenario.FULL_PROCESS; - - if (value.Equals("FullAuth")) - return Scenario.FULL_AUTH; - - if (value.Equals("RusStamp")) - return Scenario.RUS_STAMP; - - if (value.Equals("OcrFree")) - return Scenario.OCR_FREE; - - if (value.Equals("CreditCard")) - return Scenario.CREDIT_CARD; - - if (value.Equals("Capture")) - return Scenario.CAPTURE; - - if (value.Equals("DTC")) - return Scenario.DTC; - - throw new NotImplementedException($"Could not convert value to type Scenario: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static Scenario? FromStringOrDefault(string value) - { - if (value.Equals("Mrz")) - return Scenario.MRZ; - - if (value.Equals("Barcode")) - return Scenario.BARCODE; - - if (value.Equals("Locate")) - return Scenario.LOCATE; - - if (value.Equals("Ocr")) - return Scenario.OCR; - - if (value.Equals("DocType")) - return Scenario.DOCTYPE; - - if (value.Equals("MrzOrBarcode")) - return Scenario.MRZ_OR_BARCODE; - - if (value.Equals("MrzOrLocate")) - return Scenario.MRZ_OR_LOCATE; - - if (value.Equals("MrzAndLocate")) - return Scenario.MRZ_AND_LOCATE; - - if (value.Equals("BarcodeAndLocate")) - return Scenario.BARCODE_AND_LOCATE; - - if (value.Equals("MrzOrOcr")) - return Scenario.MRZ_OR_OCR; - - if (value.Equals("MrzOrBarcodeOrOcr")) - return Scenario.MRZ_OR_BARCODE_OR_OCR; - - if (value.Equals("LocateVisual_And_MrzOrOcr")) - return Scenario.LOCATE_VISUAL_AND_MRZ_OR_OCR; - - if (value.Equals("FullProcess")) - return Scenario.FULL_PROCESS; - - if (value.Equals("FullAuth")) - return Scenario.FULL_AUTH; - - if (value.Equals("RusStamp")) - return Scenario.RUS_STAMP; - - if (value.Equals("OcrFree")) - return Scenario.OCR_FREE; - - if (value.Equals("CreditCard")) - return Scenario.CREDIT_CARD; - - if (value.Equals("Capture")) - return Scenario.CAPTURE; - - if (value.Equals("DTC")) - return Scenario.DTC; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static string ToJsonValue(Scenario value) - { - if (value == Scenario.MRZ) - return "Mrz"; - - if (value == Scenario.BARCODE) - return "Barcode"; - - if (value == Scenario.LOCATE) - return "Locate"; - - if (value == Scenario.OCR) - return "Ocr"; - - if (value == Scenario.DOCTYPE) - return "DocType"; - - if (value == Scenario.MRZ_OR_BARCODE) - return "MrzOrBarcode"; - - if (value == Scenario.MRZ_OR_LOCATE) - return "MrzOrLocate"; - - if (value == Scenario.MRZ_AND_LOCATE) - return "MrzAndLocate"; - - if (value == Scenario.BARCODE_AND_LOCATE) - return "BarcodeAndLocate"; - - if (value == Scenario.MRZ_OR_OCR) - return "MrzOrOcr"; - - if (value == Scenario.MRZ_OR_BARCODE_OR_OCR) - return "MrzOrBarcodeOrOcr"; - - if (value == Scenario.LOCATE_VISUAL_AND_MRZ_OR_OCR) - return "LocateVisual_And_MrzOrOcr"; - - if (value == Scenario.FULL_PROCESS) - return "FullProcess"; - - if (value == Scenario.FULL_AUTH) - return "FullAuth"; - - if (value == Scenario.RUS_STAMP) - return "RusStamp"; - - if (value == Scenario.OCR_FREE) - return "OcrFree"; - - if (value == Scenario.CREDIT_CARD) - return "CreditCard"; - - if (value == Scenario.CAPTURE) - return "Capture"; - - if (value == Scenario.DTC) - return "DTC"; - - throw new NotImplementedException($"Value could not be handled: '{value}'"); - } - } - - /// - /// A Json converter for type - /// - /// - public class ScenarioJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override Scenario Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Scenario? result = rawValue == null - ? null - : ScenarioValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the Scenario to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Scenario scenario, JsonSerializerOptions options) - { - writer.WriteStringValue(scenario.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class ScenarioNullableJsonConverter : JsonConverter - { - /// - /// Returns a Scenario from the Json object - /// - /// - /// - /// - /// - public override Scenario? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Scenario? result = rawValue == null - ? null - : ScenarioValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Scenario? scenario, JsonSerializerOptions options) - { - writer.WriteStringValue(scenario?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs index aaf2ccd..40d735d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,92 +14,88 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// SecurityFeatureItem /// + [DataContract(Name = "SecurityFeatureItem")] public partial class SecurityFeatureItem : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// elementType - /// elementRect - /// visibility - /// criticalFlag - /// areaList - /// reserved2 - [JsonConstructor] - public SecurityFeatureItem(SecurityFeatureType elementType, RectangleCoordinates elementRect, Visibility visibility, Critical criticalFlag, Option areaList = default, Option reserved2 = default) - { - ElementType = elementType; - ElementRect = elementRect; - Visibility = visibility; - CriticalFlag = criticalFlag; - AreaListOption = areaList; - Reserved2Option = reserved2; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets ElementType /// - [JsonPropertyName("ElementType")] + [DataMember(Name = "ElementType", IsRequired = true, EmitDefaultValue = true)] public SecurityFeatureType ElementType { get; set; } /// /// Gets or Sets Visibility /// - [JsonPropertyName("Visibility")] + [DataMember(Name = "Visibility", IsRequired = true, EmitDefaultValue = true)] public Visibility Visibility { get; set; } /// /// Gets or Sets CriticalFlag /// - [JsonPropertyName("CriticalFlag")] + [DataMember(Name = "CriticalFlag", IsRequired = true, EmitDefaultValue = true)] public Critical CriticalFlag { get; set; } - /// - /// Gets or Sets ElementRect + /// Initializes a new instance of the class. /// - [JsonPropertyName("ElementRect")] - public RectangleCoordinates ElementRect { get; set; } - + [JsonConstructorAttribute] + protected SecurityFeatureItem() { } /// - /// Used to track the state of AreaList + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AreaListOption { get; private set; } + /// elementType (required). + /// elementRect (required). + /// visibility (required). + /// criticalFlag (required). + /// areaList. + /// reserved2. + public SecurityFeatureItem(SecurityFeatureType elementType = default(SecurityFeatureType), RectangleCoordinates elementRect = default(RectangleCoordinates), Visibility visibility = default(Visibility), Critical criticalFlag = default(Critical), AreaContainer areaList = default(AreaContainer), int reserved2 = default(int)) + { + this.ElementType = elementType; + // to ensure "elementRect" is required (not null) + if (elementRect == null) + { + throw new ArgumentNullException("elementRect is a required property for SecurityFeatureItem and cannot be null"); + } + this.ElementRect = elementRect; + this.Visibility = visibility; + this.CriticalFlag = criticalFlag; + this.AreaList = areaList; + this.Reserved2 = reserved2; + } /// - /// Gets or Sets AreaList + /// Gets or Sets ElementRect /// - [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + [DataMember(Name = "ElementRect", IsRequired = true, EmitDefaultValue = true)] + public RectangleCoordinates ElementRect { get; set; } /// - /// Used to track the state of Reserved2 + /// Gets or Sets AreaList /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved2Option { get; private set; } + [DataMember(Name = "AreaList", EmitDefaultValue = false)] + public AreaContainer AreaList { get; set; } /// /// Gets or Sets Reserved2 /// - [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + [DataMember(Name = "Reserved2", EmitDefaultValue = false)] + public int Reserved2 { get; set; } /// /// Returns the string presentation of the object @@ -121,6 +115,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -132,164 +135,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class SecurityFeatureItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override SecurityFeatureItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option elementType = default; - Option elementRect = default; - Option visibility = default; - Option criticalFlag = default; - Option areaList = default; - Option reserved2 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ElementType": - string? elementTypeRawValue = utf8JsonReader.GetString(); - if (elementTypeRawValue != null) - elementType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(elementTypeRawValue)); - break; - case "ElementRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - elementRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Visibility": - string? visibilityRawValue = utf8JsonReader.GetString(); - if (visibilityRawValue != null) - visibility = new Option(VisibilityValueConverter.FromStringOrDefault(visibilityRawValue)); - break; - case "CriticalFlag": - string? criticalFlagRawValue = utf8JsonReader.GetString(); - if (criticalFlagRawValue != null) - criticalFlag = new Option(CriticalValueConverter.FromStringOrDefault(criticalFlagRawValue)); - break; - case "AreaList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - areaList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!elementType.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureItem.", nameof(elementType)); - - if (!elementRect.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureItem.", nameof(elementRect)); - - if (!visibility.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureItem.", nameof(visibility)); - - if (!criticalFlag.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureItem.", nameof(criticalFlag)); - - if (elementType.IsSet && elementType.Value == null) - throw new ArgumentNullException(nameof(elementType), "Property is not nullable for class SecurityFeatureItem."); - - if (elementRect.IsSet && elementRect.Value == null) - throw new ArgumentNullException(nameof(elementRect), "Property is not nullable for class SecurityFeatureItem."); - - if (visibility.IsSet && visibility.Value == null) - throw new ArgumentNullException(nameof(visibility), "Property is not nullable for class SecurityFeatureItem."); - - if (criticalFlag.IsSet && criticalFlag.Value == null) - throw new ArgumentNullException(nameof(criticalFlag), "Property is not nullable for class SecurityFeatureItem."); - - if (areaList.IsSet && areaList.Value == null) - throw new ArgumentNullException(nameof(areaList), "Property is not nullable for class SecurityFeatureItem."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class SecurityFeatureItem."); - - return new SecurityFeatureItem(elementType.Value!.Value!, elementRect.Value!, visibility.Value!.Value!, criticalFlag.Value!.Value!, areaList, reserved2); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SecurityFeatureItem securityFeatureItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, securityFeatureItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, SecurityFeatureItem securityFeatureItem, JsonSerializerOptions jsonSerializerOptions) - { - if (securityFeatureItem.ElementRect == null) - throw new ArgumentNullException(nameof(securityFeatureItem.ElementRect), "Property is required for class SecurityFeatureItem."); - - if (securityFeatureItem.AreaListOption.IsSet && securityFeatureItem.AreaList == null) - throw new ArgumentNullException(nameof(securityFeatureItem.AreaList), "Property is required for class SecurityFeatureItem."); - - var elementTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(securityFeatureItem.ElementType); - writer.WriteNumber("ElementType", elementTypeRawValue); - - writer.WritePropertyName("ElementRect"); - JsonSerializer.Serialize(writer, securityFeatureItem.ElementRect, jsonSerializerOptions); - var visibilityRawValue = VisibilityValueConverter.ToJsonValue(securityFeatureItem.Visibility); - writer.WriteNumber("Visibility", visibilityRawValue); - - var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(securityFeatureItem.CriticalFlag); - writer.WriteNumber("CriticalFlag", criticalFlagRawValue); - - if (securityFeatureItem.AreaListOption.IsSet) - { - writer.WritePropertyName("AreaList"); - JsonSerializer.Serialize(writer, securityFeatureItem.AreaList, jsonSerializerOptions); - } - if (securityFeatureItem.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", securityFeatureItem.Reserved2Option.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs index ae8bf9d..d1ba436 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,95 +14,93 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// SecurityFeatureResult /// + [DataContract(Name = "SecurityFeatureResult")] public partial class SecurityFeatureResult : AuthenticityCheckResultItem, IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// elementType - /// elementRect - /// visibility - /// criticalFlag - /// elementResult - /// elementDiagnose - /// percentValue - /// areaList - /// reserved2 - [JsonConstructor] - public SecurityFeatureResult(SecurityFeatureType elementType, RectangleCoordinates elementRect, Visibility visibility, Critical criticalFlag, Option elementResult = default, Option elementDiagnose = default, Option percentValue = default, Option areaList = default, Option reserved2 = default) : base(elementResult, elementDiagnose, percentValue) - { - ElementType = elementType; - ElementRect = elementRect; - Visibility = visibility; - CriticalFlag = criticalFlag; - AreaListOption = areaList; - Reserved2Option = reserved2; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets ElementType /// - [JsonPropertyName("ElementType")] + [DataMember(Name = "ElementType", IsRequired = true, EmitDefaultValue = true)] public SecurityFeatureType ElementType { get; set; } /// /// Gets or Sets Visibility /// - [JsonPropertyName("Visibility")] + [DataMember(Name = "Visibility", IsRequired = true, EmitDefaultValue = true)] public Visibility Visibility { get; set; } /// /// Gets or Sets CriticalFlag /// - [JsonPropertyName("CriticalFlag")] + [DataMember(Name = "CriticalFlag", IsRequired = true, EmitDefaultValue = true)] public Critical CriticalFlag { get; set; } - /// - /// Gets or Sets ElementRect + /// Initializes a new instance of the class. /// - [JsonPropertyName("ElementRect")] - public RectangleCoordinates ElementRect { get; set; } - + [JsonConstructorAttribute] + protected SecurityFeatureResult() { } /// - /// Used to track the state of AreaList + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option AreaListOption { get; private set; } + /// elementType (required). + /// elementRect (required). + /// visibility (required). + /// criticalFlag (required). + /// areaList. + /// reserved2. + /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// elementResult. + /// elementDiagnose. + /// percentValue. + public SecurityFeatureResult(SecurityFeatureType elementType = default(SecurityFeatureType), RectangleCoordinates elementRect = default(RectangleCoordinates), Visibility visibility = default(Visibility), Critical criticalFlag = default(Critical), AreaContainer areaList = default(AreaContainer), int reserved2 = default(int), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + { + this.ElementType = elementType; + // to ensure "elementRect" is required (not null) + if (elementRect == null) + { + throw new ArgumentNullException("elementRect is a required property for SecurityFeatureResult and cannot be null"); + } + this.ElementRect = elementRect; + this.Visibility = visibility; + this.CriticalFlag = criticalFlag; + this.AreaList = areaList; + this.Reserved2 = reserved2; + } /// - /// Gets or Sets AreaList + /// Gets or Sets ElementRect /// - [JsonPropertyName("AreaList")] - public AreaContainer? AreaList { get { return this.AreaListOption; } set { this.AreaListOption = new(value); } } + [DataMember(Name = "ElementRect", IsRequired = true, EmitDefaultValue = true)] + public RectangleCoordinates ElementRect { get; set; } /// - /// Used to track the state of Reserved2 + /// Gets or Sets AreaList /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved2Option { get; private set; } + [DataMember(Name = "AreaList", EmitDefaultValue = false)] + public AreaContainer AreaList { get; set; } /// /// Gets or Sets Reserved2 /// - [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } + [DataMember(Name = "Reserved2", EmitDefaultValue = false)] + public int Reserved2 { get; set; } /// /// Returns the string presentation of the object @@ -114,7 +110,7 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class SecurityFeatureResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" ElementType: ").Append(ElementType).Append("\n"); sb.Append(" ElementRect: ").Append(ElementRect).Append("\n"); sb.Append(" Visibility: ").Append(Visibility).Append("\n"); @@ -124,218 +120,39 @@ public override string ToString() sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class SecurityFeatureResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override SecurityFeatureResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option elementType = default; - Option elementRect = default; - Option visibility = default; - Option criticalFlag = default; - Option type = default; - Option elementResult = default; - Option elementDiagnose = default; - Option percentValue = default; - Option areaList = default; - Option reserved2 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ElementType": - string? elementTypeRawValue = utf8JsonReader.GetString(); - if (elementTypeRawValue != null) - elementType = new Option(SecurityFeatureTypeValueConverter.FromStringOrDefault(elementTypeRawValue)); - break; - case "ElementRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - elementRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Visibility": - string? visibilityRawValue = utf8JsonReader.GetString(); - if (visibilityRawValue != null) - visibility = new Option(VisibilityValueConverter.FromStringOrDefault(visibilityRawValue)); - break; - case "CriticalFlag": - string? criticalFlagRawValue = utf8JsonReader.GetString(); - if (criticalFlagRawValue != null) - criticalFlag = new Option(CriticalValueConverter.FromStringOrDefault(criticalFlagRawValue)); - break; - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - case "ElementResult": - string? elementResultRawValue = utf8JsonReader.GetString(); - if (elementResultRawValue != null) - elementResult = new Option(CheckResultValueConverter.FromStringOrDefault(elementResultRawValue)); - break; - case "ElementDiagnose": - string? elementDiagnoseRawValue = utf8JsonReader.GetString(); - if (elementDiagnoseRawValue != null) - elementDiagnose = new Option(CheckDiagnoseValueConverter.FromStringOrDefault(elementDiagnoseRawValue)); - break; - case "PercentValue": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - percentValue = new Option(utf8JsonReader.GetInt32()); - break; - case "AreaList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - areaList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!elementType.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(elementType)); - - if (!elementRect.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(elementRect)); - - if (!visibility.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(visibility)); - - if (!criticalFlag.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(criticalFlag)); - - if (!type.IsSet) - throw new ArgumentException("Property is required for class SecurityFeatureResult.", nameof(type)); - - if (elementType.IsSet && elementType.Value == null) - throw new ArgumentNullException(nameof(elementType), "Property is not nullable for class SecurityFeatureResult."); - - if (elementRect.IsSet && elementRect.Value == null) - throw new ArgumentNullException(nameof(elementRect), "Property is not nullable for class SecurityFeatureResult."); - - if (visibility.IsSet && visibility.Value == null) - throw new ArgumentNullException(nameof(visibility), "Property is not nullable for class SecurityFeatureResult."); - - if (criticalFlag.IsSet && criticalFlag.Value == null) - throw new ArgumentNullException(nameof(criticalFlag), "Property is not nullable for class SecurityFeatureResult."); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class SecurityFeatureResult."); - - if (elementResult.IsSet && elementResult.Value == null) - throw new ArgumentNullException(nameof(elementResult), "Property is not nullable for class SecurityFeatureResult."); - - if (elementDiagnose.IsSet && elementDiagnose.Value == null) - throw new ArgumentNullException(nameof(elementDiagnose), "Property is not nullable for class SecurityFeatureResult."); - - if (percentValue.IsSet && percentValue.Value == null) - throw new ArgumentNullException(nameof(percentValue), "Property is not nullable for class SecurityFeatureResult."); - - if (areaList.IsSet && areaList.Value == null) - throw new ArgumentNullException(nameof(areaList), "Property is not nullable for class SecurityFeatureResult."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class SecurityFeatureResult."); - - return new SecurityFeatureResult(elementType.Value!.Value!, elementRect.Value!, visibility.Value!.Value!, criticalFlag.Value!.Value!, elementResult, elementDiagnose, percentValue, areaList, reserved2); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SecurityFeatureResult securityFeatureResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, securityFeatureResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, SecurityFeatureResult securityFeatureResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (securityFeatureResult.ElementRect == null) - throw new ArgumentNullException(nameof(securityFeatureResult.ElementRect), "Property is required for class SecurityFeatureResult."); - - if (securityFeatureResult.AreaListOption.IsSet && securityFeatureResult.AreaList == null) - throw new ArgumentNullException(nameof(securityFeatureResult.AreaList), "Property is required for class SecurityFeatureResult."); - - var elementTypeRawValue = SecurityFeatureTypeValueConverter.ToJsonValue(securityFeatureResult.ElementType); - writer.WriteNumber("ElementType", elementTypeRawValue); - - writer.WritePropertyName("ElementRect"); - JsonSerializer.Serialize(writer, securityFeatureResult.ElementRect, jsonSerializerOptions); - var visibilityRawValue = VisibilityValueConverter.ToJsonValue(securityFeatureResult.Visibility); - writer.WriteNumber("Visibility", visibilityRawValue); - - var criticalFlagRawValue = CriticalValueConverter.ToJsonValue(securityFeatureResult.CriticalFlag); - writer.WriteNumber("CriticalFlag", criticalFlagRawValue); - - writer.WriteNumber("Type", securityFeatureResult.Type); - - if (securityFeatureResult.ElementResultOption.IsSet) - { - var elementResultRawValue = CheckResultValueConverter.ToJsonValue(securityFeatureResult.ElementResult!.Value); - writer.WriteNumber("ElementResult", elementResultRawValue); - } - if (securityFeatureResult.ElementDiagnoseOption.IsSet) + foreach (var x in base.BaseValidate(validationContext)) { - var elementDiagnoseRawValue = CheckDiagnoseValueConverter.ToJsonValue(securityFeatureResult.ElementDiagnose!.Value); - writer.WriteNumber("ElementDiagnose", elementDiagnoseRawValue); + yield return x; } - if (securityFeatureResult.PercentValueOption.IsSet) - writer.WriteNumber("PercentValue", securityFeatureResult.PercentValueOption.Value!.Value); - - if (securityFeatureResult.AreaListOption.IsSet) - { - writer.WritePropertyName("AreaList"); - JsonSerializer.Serialize(writer, securityFeatureResult.AreaList, jsonSerializerOptions); - } - if (securityFeatureResult.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", securityFeatureResult.Reserved2Option.Value!.Value); + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs index 28d9abe..b4e3460 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -297,435 +298,4 @@ public enum SecurityFeatureType LIVENESS_BLACK_AND_WHITE_COPY_CHECK = 53 } - /// - /// Converts to and from the JSON value - /// - public static class SecurityFeatureTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static SecurityFeatureType FromString(string value) - { - if (value.Equals((0).ToString())) - return SecurityFeatureType.BLANK; - - if (value.Equals((1).ToString())) - return SecurityFeatureType.FILL; - - if (value.Equals((2).ToString())) - return SecurityFeatureType.PHOTO; - - if (value.Equals((3).ToString())) - return SecurityFeatureType.MRZ; - - if (value.Equals((4).ToString())) - return SecurityFeatureType.FALSE_LUMINESCENCE; - - if (value.Equals((5).ToString())) - return SecurityFeatureType.HOLO_SIMPLE; - - if (value.Equals((6).ToString())) - return SecurityFeatureType.HOLO_VERIFY_STATIC; - - if (value.Equals((7).ToString())) - return SecurityFeatureType.HOLO_VERIFY_MULTI_STATIC; - - if (value.Equals((8).ToString())) - return SecurityFeatureType.HOLO_VERIFY_DYNAMIC; - - if (value.Equals((9).ToString())) - return SecurityFeatureType.PATTERN_NOT_INTERRUPTED; - - if (value.Equals((10).ToString())) - return SecurityFeatureType.PATTERN_NOT_SHIFTED; - - if (value.Equals((11).ToString())) - return SecurityFeatureType.PATTERN_SAME_COLORS; - - if (value.Equals((12).ToString())) - return SecurityFeatureType.PATTERN_IR_INVISIBLE; - - if (value.Equals((13).ToString())) - return SecurityFeatureType.PHOTO_SIZE_CHECK; - - if (value.Equals((14).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_GHOST; - - if (value.Equals((15).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_RFID; - - if (value.Equals((16).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_VISUAL; - - if (value.Equals((17).ToString())) - return SecurityFeatureType.BARCODE; - - if (value.Equals((18).ToString())) - return SecurityFeatureType.PATTERN_DIFFERENT_LINES_THICKNESS; - - if (value.Equals((19).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_CAMERA; - - if (value.Equals((20).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_RFID_VS_CAMERA; - - if (value.Equals((21).ToString())) - return SecurityFeatureType.GHOST_PHOTO; - - if (value.Equals((22).ToString())) - return SecurityFeatureType.CLEAR_GHOST_PHOTO; - - if (value.Equals((23).ToString())) - return SecurityFeatureType.INVISIBLE_OBJECT; - - if (value.Equals((24).ToString())) - return SecurityFeatureType.LOW_CONTRAST_OBJECT; - - if (value.Equals((25).ToString())) - return SecurityFeatureType.PHOTO_COLOR; - - if (value.Equals((26).ToString())) - return SecurityFeatureType.PHOTO_SHAPE; - - if (value.Equals((27).ToString())) - return SecurityFeatureType.PHOTO_CORNERS; - - if (value.Equals((28).ToString())) - return SecurityFeatureType.OCR; - - if (value.Equals((29).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_VISUAL; - - if (value.Equals((30).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_RFID; - - if (value.Equals((31).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_CAMERA; - - if (value.Equals((32).ToString())) - return SecurityFeatureType.LIVENESS_DEPTH; - - if (value.Equals((33).ToString())) - return SecurityFeatureType.MICRO_TEXT; - - if (value.Equals((34).ToString())) - return SecurityFeatureType.FLUORESCENT_OBJECT; - - if (value.Equals((35).ToString())) - return SecurityFeatureType.LANDMARK_CHECK; - - if (value.Equals((36).ToString())) - return SecurityFeatureType.FACE_PRESENCE; - - if (value.Equals((38).ToString())) - return SecurityFeatureType.FACE_ABSENCE; - - if (value.Equals((39).ToString())) - return SecurityFeatureType.LIVENESS_SCREEN_CAPTURE; - - if (value.Equals((40).ToString())) - return SecurityFeatureType.LIVENESS_ELECTRONIC_DEVICE; - - if (value.Equals((41).ToString())) - return SecurityFeatureType.LIVENESS_OVI; - - if (value.Equals((42).ToString())) - return SecurityFeatureType.BARCODE_SIZE_CHECK; - - if (value.Equals((43).ToString())) - return SecurityFeatureType.LASINK; - - if (value.Equals((44).ToString())) - return SecurityFeatureType.LIVENESS_MLI; - - if (value.Equals((45).ToString())) - return SecurityFeatureType.LIVENESS_BARCODE_BACKGROUND; - - if (value.Equals((46).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_BARCODE; - - if (value.Equals((47).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_RFID_VS_BARCODE; - - if (value.Equals((48).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_BARCODE; - - if (value.Equals((49).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_BARCODE_VS_CAMERA; - - if (value.Equals((50).ToString())) - return SecurityFeatureType.CHECK_DIGITAL_SIGNATURE; - - if (value.Equals((51).ToString())) - return SecurityFeatureType.CONTACT_CHIP_CLASSIFICATION; - - if (value.Equals((52).ToString())) - return SecurityFeatureType.HEAD_POSITION_CHECK; - - if (value.Equals((53).ToString())) - return SecurityFeatureType.LIVENESS_BLACK_AND_WHITE_COPY_CHECK; - - throw new NotImplementedException($"Could not convert value to type SecurityFeatureType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static SecurityFeatureType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return SecurityFeatureType.BLANK; - - if (value.Equals((1).ToString())) - return SecurityFeatureType.FILL; - - if (value.Equals((2).ToString())) - return SecurityFeatureType.PHOTO; - - if (value.Equals((3).ToString())) - return SecurityFeatureType.MRZ; - - if (value.Equals((4).ToString())) - return SecurityFeatureType.FALSE_LUMINESCENCE; - - if (value.Equals((5).ToString())) - return SecurityFeatureType.HOLO_SIMPLE; - - if (value.Equals((6).ToString())) - return SecurityFeatureType.HOLO_VERIFY_STATIC; - - if (value.Equals((7).ToString())) - return SecurityFeatureType.HOLO_VERIFY_MULTI_STATIC; - - if (value.Equals((8).ToString())) - return SecurityFeatureType.HOLO_VERIFY_DYNAMIC; - - if (value.Equals((9).ToString())) - return SecurityFeatureType.PATTERN_NOT_INTERRUPTED; - - if (value.Equals((10).ToString())) - return SecurityFeatureType.PATTERN_NOT_SHIFTED; - - if (value.Equals((11).ToString())) - return SecurityFeatureType.PATTERN_SAME_COLORS; - - if (value.Equals((12).ToString())) - return SecurityFeatureType.PATTERN_IR_INVISIBLE; - - if (value.Equals((13).ToString())) - return SecurityFeatureType.PHOTO_SIZE_CHECK; - - if (value.Equals((14).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_GHOST; - - if (value.Equals((15).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_RFID; - - if (value.Equals((16).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_VISUAL; - - if (value.Equals((17).ToString())) - return SecurityFeatureType.BARCODE; - - if (value.Equals((18).ToString())) - return SecurityFeatureType.PATTERN_DIFFERENT_LINES_THICKNESS; - - if (value.Equals((19).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_CAMERA; - - if (value.Equals((20).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_RFID_VS_CAMERA; - - if (value.Equals((21).ToString())) - return SecurityFeatureType.GHOST_PHOTO; - - if (value.Equals((22).ToString())) - return SecurityFeatureType.CLEAR_GHOST_PHOTO; - - if (value.Equals((23).ToString())) - return SecurityFeatureType.INVISIBLE_OBJECT; - - if (value.Equals((24).ToString())) - return SecurityFeatureType.LOW_CONTRAST_OBJECT; - - if (value.Equals((25).ToString())) - return SecurityFeatureType.PHOTO_COLOR; - - if (value.Equals((26).ToString())) - return SecurityFeatureType.PHOTO_SHAPE; - - if (value.Equals((27).ToString())) - return SecurityFeatureType.PHOTO_CORNERS; - - if (value.Equals((28).ToString())) - return SecurityFeatureType.OCR; - - if (value.Equals((29).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_VISUAL; - - if (value.Equals((30).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_RFID; - - if (value.Equals((31).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_CAMERA; - - if (value.Equals((32).ToString())) - return SecurityFeatureType.LIVENESS_DEPTH; - - if (value.Equals((33).ToString())) - return SecurityFeatureType.MICRO_TEXT; - - if (value.Equals((34).ToString())) - return SecurityFeatureType.FLUORESCENT_OBJECT; - - if (value.Equals((35).ToString())) - return SecurityFeatureType.LANDMARK_CHECK; - - if (value.Equals((36).ToString())) - return SecurityFeatureType.FACE_PRESENCE; - - if (value.Equals((38).ToString())) - return SecurityFeatureType.FACE_ABSENCE; - - if (value.Equals((39).ToString())) - return SecurityFeatureType.LIVENESS_SCREEN_CAPTURE; - - if (value.Equals((40).ToString())) - return SecurityFeatureType.LIVENESS_ELECTRONIC_DEVICE; - - if (value.Equals((41).ToString())) - return SecurityFeatureType.LIVENESS_OVI; - - if (value.Equals((42).ToString())) - return SecurityFeatureType.BARCODE_SIZE_CHECK; - - if (value.Equals((43).ToString())) - return SecurityFeatureType.LASINK; - - if (value.Equals((44).ToString())) - return SecurityFeatureType.LIVENESS_MLI; - - if (value.Equals((45).ToString())) - return SecurityFeatureType.LIVENESS_BARCODE_BACKGROUND; - - if (value.Equals((46).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_VS_BARCODE; - - if (value.Equals((47).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_RFID_VS_BARCODE; - - if (value.Equals((48).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_EXT_VS_BARCODE; - - if (value.Equals((49).ToString())) - return SecurityFeatureType.PORTRAIT_COMPARISON_BARCODE_VS_CAMERA; - - if (value.Equals((50).ToString())) - return SecurityFeatureType.CHECK_DIGITAL_SIGNATURE; - - if (value.Equals((51).ToString())) - return SecurityFeatureType.CONTACT_CHIP_CLASSIFICATION; - - if (value.Equals((52).ToString())) - return SecurityFeatureType.HEAD_POSITION_CHECK; - - if (value.Equals((53).ToString())) - return SecurityFeatureType.LIVENESS_BLACK_AND_WHITE_COPY_CHECK; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(SecurityFeatureType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class SecurityFeatureTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override SecurityFeatureType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - SecurityFeatureType? result = rawValue == null - ? null - : SecurityFeatureTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the SecurityFeatureType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SecurityFeatureType securityFeatureType, JsonSerializerOptions options) - { - writer.WriteStringValue(securityFeatureType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class SecurityFeatureTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a SecurityFeatureType from the Json object - /// - /// - /// - /// - /// - public override SecurityFeatureType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - SecurityFeatureType? result = rawValue == null - ? null - : SecurityFeatureTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SecurityFeatureType? securityFeatureType, JsonSerializerOptions options) - { - writer.WriteStringValue(securityFeatureType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs index d0c4667..fc5cdcb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,38 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// SecurityObjectCertificates /// + [DataContract(Name = "SecurityObjectCertificates")] public partial class SecurityObjectCertificates : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// certificateData - [JsonConstructor] - public SecurityObjectCertificates(Option certificateData = default) + /// certificateData. + public SecurityObjectCertificates(CertificateData certificateData = default(CertificateData)) { - CertificateDataOption = certificateData; - OnCreated(); + this.CertificateData = certificateData; } - partial void OnCreated(); - - /// - /// Used to track the state of CertificateData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option CertificateDataOption { get; private set; } - /// /// Gets or Sets CertificateData /// - [JsonPropertyName("Certificate_Data")] - public CertificateData? CertificateData { get { return this.CertificateDataOption; } set { this.CertificateDataOption = new(value); } } + [DataMember(Name = "Certificate_Data", EmitDefaultValue = false)] + public CertificateData CertificateData { get; set; } /// /// Returns the string presentation of the object @@ -69,6 +60,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -80,93 +80,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class SecurityObjectCertificatesJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override SecurityObjectCertificates Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option certificateData = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Certificate_Data": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - certificateData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (certificateData.IsSet && certificateData.Value == null) - throw new ArgumentNullException(nameof(certificateData), "Property is not nullable for class SecurityObjectCertificates."); - - return new SecurityObjectCertificates(certificateData); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SecurityObjectCertificates securityObjectCertificates, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, securityObjectCertificates, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, SecurityObjectCertificates securityObjectCertificates, JsonSerializerOptions jsonSerializerOptions) - { - if (securityObjectCertificates.CertificateDataOption.IsSet && securityObjectCertificates.CertificateData == null) - throw new ArgumentNullException(nameof(securityObjectCertificates.CertificateData), "Property is required for class SecurityObjectCertificates."); - - if (securityObjectCertificates.CertificateDataOption.IsSet) - { - writer.WritePropertyName("Certificate_Data"); - JsonSerializer.Serialize(writer, securityObjectCertificates.CertificateData, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Source.cs b/src/Regula.DocumentReader.WebClient/Model/Source.cs index 8506a5a..f95343d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Source.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Source.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -29,204 +30,44 @@ namespace Regula.DocumentReader.WebClient.Model /// Document data sources /// /// Document data sources + [JsonConverter(typeof(StringEnumConverter))] public enum Source { /// /// Enum MRZ for value: MRZ /// + [EnumMember(Value = "MRZ")] MRZ = 1, /// /// Enum VISUAL for value: VISUAL /// + [EnumMember(Value = "VISUAL")] VISUAL = 2, /// /// Enum BARCODE for value: BARCODE /// + [EnumMember(Value = "BARCODE")] BARCODE = 3, /// /// Enum RFID for value: RFID /// + [EnumMember(Value = "RFID")] RFID = 4, /// /// Enum MAGNETIC for value: MAGNETIC /// + [EnumMember(Value = "MAGNETIC")] MAGNETIC = 5, /// /// Enum EXTERNAL for value: EXTERNAL /// + [EnumMember(Value = "EXTERNAL")] EXTERNAL = 6 } - /// - /// Converts to and from the JSON value - /// - public static class SourceValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static Source FromString(string value) - { - if (value.Equals("MRZ")) - return Source.MRZ; - - if (value.Equals("VISUAL")) - return Source.VISUAL; - - if (value.Equals("BARCODE")) - return Source.BARCODE; - - if (value.Equals("RFID")) - return Source.RFID; - - if (value.Equals("MAGNETIC")) - return Source.MAGNETIC; - - if (value.Equals("EXTERNAL")) - return Source.EXTERNAL; - - throw new NotImplementedException($"Could not convert value to type Source: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static Source? FromStringOrDefault(string value) - { - if (value.Equals("MRZ")) - return Source.MRZ; - - if (value.Equals("VISUAL")) - return Source.VISUAL; - - if (value.Equals("BARCODE")) - return Source.BARCODE; - - if (value.Equals("RFID")) - return Source.RFID; - - if (value.Equals("MAGNETIC")) - return Source.MAGNETIC; - - if (value.Equals("EXTERNAL")) - return Source.EXTERNAL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static string ToJsonValue(Source value) - { - if (value == Source.MRZ) - return "MRZ"; - - if (value == Source.VISUAL) - return "VISUAL"; - - if (value == Source.BARCODE) - return "BARCODE"; - - if (value == Source.RFID) - return "RFID"; - - if (value == Source.MAGNETIC) - return "MAGNETIC"; - - if (value == Source.EXTERNAL) - return "EXTERNAL"; - - throw new NotImplementedException($"Value could not be handled: '{value}'"); - } - } - - /// - /// A Json converter for type - /// - /// - public class SourceJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override Source Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Source? result = rawValue == null - ? null - : SourceValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the Source to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Source source, JsonSerializerOptions options) - { - writer.WriteStringValue(source.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class SourceNullableJsonConverter : JsonConverter - { - /// - /// Returns a Source from the Json object - /// - /// - /// - /// - /// - public override Source? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Source? result = rawValue == null - ? null - : SourceValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Source? source, JsonSerializerOptions options) - { - writer.WriteStringValue(source?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs b/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs index a1c46a6..e3291d9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SourceValidity.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,46 +14,51 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// SourceValidity /// + [DataContract(Name = "SourceValidity")] public partial class SourceValidity : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// source - /// status - [JsonConstructor] - public SourceValidity(Source source, CheckResult status) - { - Source = source; - Status = status; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Source /// - [JsonPropertyName("source")] + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)] public Source Source { get; set; } /// /// Gets or Sets Status /// - [JsonPropertyName("status")] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] public CheckResult Status { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected SourceValidity() { } + /// + /// Initializes a new instance of the class. + /// + /// source (required). + /// status (required). + public SourceValidity(Source source = default(Source), CheckResult status = default(CheckResult)) + { + this.Source = source; + this.Status = status; + } /// /// Returns the string presentation of the object @@ -71,6 +74,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -82,106 +94,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class SourceValidityJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override SourceValidity Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option source = default; - Option status = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "source": - string? sourceRawValue = utf8JsonReader.GetString(); - if (sourceRawValue != null) - source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); - break; - case "status": - string? statusRawValue = utf8JsonReader.GetString(); - if (statusRawValue != null) - status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); - break; - default: - break; - } - } - } - - if (!source.IsSet) - throw new ArgumentException("Property is required for class SourceValidity.", nameof(source)); - - if (!status.IsSet) - throw new ArgumentException("Property is required for class SourceValidity.", nameof(status)); - - if (source.IsSet && source.Value == null) - throw new ArgumentNullException(nameof(source), "Property is not nullable for class SourceValidity."); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class SourceValidity."); - - return new SourceValidity(source.Value!.Value!, status.Value!.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SourceValidity sourceValidity, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, sourceValidity, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, SourceValidity sourceValidity, JsonSerializerOptions jsonSerializerOptions) - { - var sourceRawValue = SourceValueConverter.ToJsonValue(sourceValidity.Source); - writer.WriteString("source", sourceRawValue); - - var statusRawValue = CheckResultValueConverter.ToJsonValue(sourceValidity.Status); - writer.WriteNumber("status", statusRawValue); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Status.cs b/src/Regula.DocumentReader.WebClient/Model/Status.cs index 296d29d..8c11e91 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Status.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Status.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,93 +14,96 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Status /// + [DataContract(Name = "Status")] public partial class Status : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// overallStatus - /// optical - /// portrait - /// rfid - /// stopList - /// detailsOptical - /// detailsRFID - [JsonConstructor] - public Status(CheckResult overallStatus, CheckResult optical, CheckResult portrait, CheckResult rfid, CheckResult stopList, DetailsOptical detailsOptical, Option detailsRFID = default) - { - OverallStatus = overallStatus; - Optical = optical; - Portrait = portrait; - Rfid = rfid; - StopList = stopList; - DetailsOptical = detailsOptical; - DetailsRFIDOption = detailsRFID; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets OverallStatus /// - [JsonPropertyName("overallStatus")] + [DataMember(Name = "overallStatus", IsRequired = true, EmitDefaultValue = true)] public CheckResult OverallStatus { get; set; } /// /// Gets or Sets Optical /// - [JsonPropertyName("optical")] + [DataMember(Name = "optical", IsRequired = true, EmitDefaultValue = true)] public CheckResult Optical { get; set; } /// /// Gets or Sets Portrait /// - [JsonPropertyName("portrait")] + [DataMember(Name = "portrait", IsRequired = true, EmitDefaultValue = true)] public CheckResult Portrait { get; set; } /// /// Gets or Sets Rfid /// - [JsonPropertyName("rfid")] + [DataMember(Name = "rfid", IsRequired = true, EmitDefaultValue = true)] public CheckResult Rfid { get; set; } /// /// Gets or Sets StopList /// - [JsonPropertyName("stopList")] + [DataMember(Name = "stopList", IsRequired = true, EmitDefaultValue = true)] public CheckResult StopList { get; set; } - /// - /// Gets or Sets DetailsOptical + /// Initializes a new instance of the class. /// - [JsonPropertyName("detailsOptical")] - public DetailsOptical DetailsOptical { get; set; } - + [JsonConstructorAttribute] + protected Status() { } /// - /// Used to track the state of DetailsRFID + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DetailsRFIDOption { get; private set; } + /// overallStatus (required). + /// optical (required). + /// portrait (required). + /// rfid (required). + /// stopList (required). + /// detailsRFID. + /// detailsOptical (required). + public Status(CheckResult overallStatus = default(CheckResult), CheckResult optical = default(CheckResult), CheckResult portrait = default(CheckResult), CheckResult rfid = default(CheckResult), CheckResult stopList = default(CheckResult), DetailsRFID detailsRFID = default(DetailsRFID), DetailsOptical detailsOptical = default(DetailsOptical)) + { + this.OverallStatus = overallStatus; + this.Optical = optical; + this.Portrait = portrait; + this.Rfid = rfid; + this.StopList = stopList; + // to ensure "detailsOptical" is required (not null) + if (detailsOptical == null) + { + throw new ArgumentNullException("detailsOptical is a required property for Status and cannot be null"); + } + this.DetailsOptical = detailsOptical; + this.DetailsRFID = detailsRFID; + } /// /// Gets or Sets DetailsRFID /// - [JsonPropertyName("detailsRFID")] - public DetailsRFID? DetailsRFID { get { return this.DetailsRFIDOption; } set { this.DetailsRFIDOption = new(value); } } + [DataMember(Name = "detailsRFID", EmitDefaultValue = false)] + public DetailsRFID DetailsRFID { get; set; } + + /// + /// Gets or Sets DetailsOptical + /// + [DataMember(Name = "detailsOptical", IsRequired = true, EmitDefaultValue = true)] + public DetailsOptical DetailsOptical { get; set; } /// /// Returns the string presentation of the object @@ -117,12 +118,21 @@ public override string ToString() sb.Append(" Portrait: ").Append(Portrait).Append("\n"); sb.Append(" Rfid: ").Append(Rfid).Append("\n"); sb.Append(" StopList: ").Append(StopList).Append("\n"); - sb.Append(" DetailsOptical: ").Append(DetailsOptical).Append("\n"); sb.Append(" DetailsRFID: ").Append(DetailsRFID).Append("\n"); + sb.Append(" DetailsOptical: ").Append(DetailsOptical).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -134,184 +144,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class StatusJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override Status Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option overallStatus = default; - Option optical = default; - Option portrait = default; - Option rfid = default; - Option stopList = default; - Option detailsOptical = default; - Option detailsRFID = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "overallStatus": - string? overallStatusRawValue = utf8JsonReader.GetString(); - if (overallStatusRawValue != null) - overallStatus = new Option(CheckResultValueConverter.FromStringOrDefault(overallStatusRawValue)); - break; - case "optical": - string? opticalRawValue = utf8JsonReader.GetString(); - if (opticalRawValue != null) - optical = new Option(CheckResultValueConverter.FromStringOrDefault(opticalRawValue)); - break; - case "portrait": - string? portraitRawValue = utf8JsonReader.GetString(); - if (portraitRawValue != null) - portrait = new Option(CheckResultValueConverter.FromStringOrDefault(portraitRawValue)); - break; - case "rfid": - string? rfidRawValue = utf8JsonReader.GetString(); - if (rfidRawValue != null) - rfid = new Option(CheckResultValueConverter.FromStringOrDefault(rfidRawValue)); - break; - case "stopList": - string? stopListRawValue = utf8JsonReader.GetString(); - if (stopListRawValue != null) - stopList = new Option(CheckResultValueConverter.FromStringOrDefault(stopListRawValue)); - break; - case "detailsOptical": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - detailsOptical = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "detailsRFID": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - detailsRFID = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!overallStatus.IsSet) - throw new ArgumentException("Property is required for class Status.", nameof(overallStatus)); - - if (!optical.IsSet) - throw new ArgumentException("Property is required for class Status.", nameof(optical)); - - if (!portrait.IsSet) - throw new ArgumentException("Property is required for class Status.", nameof(portrait)); - - if (!rfid.IsSet) - throw new ArgumentException("Property is required for class Status.", nameof(rfid)); - - if (!stopList.IsSet) - throw new ArgumentException("Property is required for class Status.", nameof(stopList)); - - if (!detailsOptical.IsSet) - throw new ArgumentException("Property is required for class Status.", nameof(detailsOptical)); - - if (overallStatus.IsSet && overallStatus.Value == null) - throw new ArgumentNullException(nameof(overallStatus), "Property is not nullable for class Status."); - - if (optical.IsSet && optical.Value == null) - throw new ArgumentNullException(nameof(optical), "Property is not nullable for class Status."); - - if (portrait.IsSet && portrait.Value == null) - throw new ArgumentNullException(nameof(portrait), "Property is not nullable for class Status."); - - if (rfid.IsSet && rfid.Value == null) - throw new ArgumentNullException(nameof(rfid), "Property is not nullable for class Status."); - - if (stopList.IsSet && stopList.Value == null) - throw new ArgumentNullException(nameof(stopList), "Property is not nullable for class Status."); - - if (detailsOptical.IsSet && detailsOptical.Value == null) - throw new ArgumentNullException(nameof(detailsOptical), "Property is not nullable for class Status."); - - if (detailsRFID.IsSet && detailsRFID.Value == null) - throw new ArgumentNullException(nameof(detailsRFID), "Property is not nullable for class Status."); - - return new Status(overallStatus.Value!.Value!, optical.Value!.Value!, portrait.Value!.Value!, rfid.Value!.Value!, stopList.Value!.Value!, detailsOptical.Value!, detailsRFID); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Status status, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, status, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, Status status, JsonSerializerOptions jsonSerializerOptions) - { - if (status.DetailsOptical == null) - throw new ArgumentNullException(nameof(status.DetailsOptical), "Property is required for class Status."); - - if (status.DetailsRFIDOption.IsSet && status.DetailsRFID == null) - throw new ArgumentNullException(nameof(status.DetailsRFID), "Property is required for class Status."); - - var overallStatusRawValue = CheckResultValueConverter.ToJsonValue(status.OverallStatus); - writer.WriteNumber("overallStatus", overallStatusRawValue); - - var opticalRawValue = CheckResultValueConverter.ToJsonValue(status.Optical); - writer.WriteNumber("optical", opticalRawValue); - - var portraitRawValue = CheckResultValueConverter.ToJsonValue(status.Portrait); - writer.WriteNumber("portrait", portraitRawValue); - - var rfidRawValue = CheckResultValueConverter.ToJsonValue(status.Rfid); - writer.WriteNumber("rfid", rfidRawValue); - - var stopListRawValue = CheckResultValueConverter.ToJsonValue(status.StopList); - writer.WriteNumber("stopList", stopListRawValue); - - writer.WritePropertyName("detailsOptical"); - JsonSerializer.Serialize(writer, status.DetailsOptical, jsonSerializerOptions); - if (status.DetailsRFIDOption.IsSet) - { - writer.WritePropertyName("detailsRFID"); - JsonSerializer.Serialize(writer, status.DetailsRFID, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs b/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs index dd65757..bcc7a19 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StatusItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// StatusItem /// + [DataContract(Name = "StatusItem")] public partial class StatusItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// status - [JsonConstructor] - public StatusItem(Status status) + [JsonConstructorAttribute] + protected StatusItem() { } + /// + /// Initializes a new instance of the class. + /// + /// status (required). + public StatusItem(Status status = default(Status)) { - Status = status; - OnCreated(); + // to ensure "status" is required (not null) + if (status == null) + { + throw new ArgumentNullException("status is a required property for StatusItem and cannot be null"); + } + this.Status = status; } - partial void OnCreated(); - /// /// Gets or Sets Status /// - [JsonPropertyName("Status")] + [DataMember(Name = "Status", IsRequired = true, EmitDefaultValue = true)] public Status Status { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class StatusItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override StatusItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option status = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Status": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - status = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!status.IsSet) - throw new ArgumentException("Property is required for class StatusItem.", nameof(status)); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class StatusItem."); - - return new StatusItem(status.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, StatusItem statusItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, statusItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, StatusItem statusItem, JsonSerializerOptions jsonSerializerOptions) - { - if (statusItem.Status == null) - throw new ArgumentNullException(nameof(statusItem.Status), "Property is required for class StatusItem."); - - writer.WritePropertyName("Status"); - JsonSerializer.Serialize(writer, statusItem.Status, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs index de7aea1..63d3269 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// StatusResult /// + [DataContract(Name = "StatusResult")] public partial class StatusResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// status - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public StatusResult(Status status, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected StatusResult() { } + /// + /// Initializes a new instance of the class. + /// + /// status (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public StatusResult(Status status = default(Status), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - Status = status; - OnCreated(); + // to ensure "status" is required (not null) + if (status == null) + { + throw new ArgumentNullException("status is a required property for StatusResult and cannot be null"); + } + this.Status = status; } - partial void OnCreated(); - /// /// Gets or Sets Status /// - [JsonPropertyName("Status")] + [DataMember(Name = "Status", IsRequired = true, EmitDefaultValue = true)] public Status Status { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class StatusResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class StatusResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override StatusResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option status = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Status": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - status = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!status.IsSet) - throw new ArgumentException("Property is required for class StatusResult.", nameof(status)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class StatusResult.", nameof(resultType)); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class StatusResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class StatusResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class StatusResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class StatusResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class StatusResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class StatusResult."); - - return new StatusResult(status.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, StatusResult statusResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, statusResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, StatusResult statusResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (statusResult.Status == null) - throw new ArgumentNullException(nameof(statusResult.Status), "Property is required for class StatusResult."); - - writer.WritePropertyName("Status"); - JsonSerializer.Serialize(writer, statusResult.Status, jsonSerializerOptions); - if (statusResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", statusResult.BufLengthOption.Value!.Value); - - if (statusResult.LightOption.IsSet) - writer.WriteNumber("light", statusResult.LightOption.Value!.Value); - - if (statusResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", statusResult.ListIdxOption.Value!.Value); - - if (statusResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", statusResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", statusResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/StringItem.cs b/src/Regula.DocumentReader.WebClient/Model/StringItem.cs index 055563a..a434854 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StringItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StringItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,165 +14,190 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// StringItem /// + [DataContract(Name = "StringItem")] public partial class StringItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// aLIGNMENTSYMBOLSINSTRING - /// cHECKSUMS - /// errorPOSITION - /// fieldCount - /// fields - /// sTRINGSDISTANCE - /// sTRINGSINTERVAL - /// sTRINGFILLING - /// sTRINGPOSITION - /// sYMBOLSPARAM - /// sizeErrorALIGNMENT - /// sizeErrorDISTANCE - /// sizeErrorINTERVAL - /// stringAngle - /// stringBorders - /// symbolsCount - /// symbolsEstimations - [JsonConstructor] - public StringItem(int aLIGNMENTSYMBOLSINSTRING, int cHECKSUMS, ErrorCoordinates errorPOSITION, int fieldCount, List fields, int sTRINGSDISTANCE, int sTRINGSINTERVAL, int sTRINGFILLING, int sTRINGPOSITION, int sYMBOLSPARAM, decimal sizeErrorALIGNMENT, decimal sizeErrorDISTANCE, decimal sizeErrorINTERVAL, decimal stringAngle, RectangleCoordinates stringBorders, int symbolsCount, List symbolsEstimations) + [JsonConstructorAttribute] + protected StringItem() { } + /// + /// Initializes a new instance of the class. + /// + /// aLIGNMENTSYMBOLSINSTRING (required). + /// cHECKSUMS (required). + /// errorPOSITION (required). + /// fieldCount (required). + /// fields (required). + /// sTRINGSDISTANCE (required). + /// sTRINGSINTERVAL (required). + /// sTRINGFILLING (required). + /// sTRINGPOSITION (required). + /// sYMBOLSPARAM (required). + /// sizeErrorALIGNMENT (required). + /// sizeErrorDISTANCE (required). + /// sizeErrorINTERVAL (required). + /// stringAngle (required). + /// stringBorders (required). + /// symbolsCount (required). + /// symbolsEstimations (required). + public StringItem(int aLIGNMENTSYMBOLSINSTRING = default(int), int cHECKSUMS = default(int), ErrorCoordinates errorPOSITION = default(ErrorCoordinates), int fieldCount = default(int), List fields = default(List), int sTRINGSDISTANCE = default(int), int sTRINGSINTERVAL = default(int), int sTRINGFILLING = default(int), int sTRINGPOSITION = default(int), int sYMBOLSPARAM = default(int), decimal sizeErrorALIGNMENT = default(decimal), decimal sizeErrorDISTANCE = default(decimal), decimal sizeErrorINTERVAL = default(decimal), decimal stringAngle = default(decimal), RectangleCoordinates stringBorders = default(RectangleCoordinates), int symbolsCount = default(int), List symbolsEstimations = default(List)) { - ALIGNMENT_SYMBOLS_IN_STRING = aLIGNMENTSYMBOLSINSTRING; - CHECK_SUMS = cHECKSUMS; - ErrorPOSITION = errorPOSITION; - FieldCount = fieldCount; - Fields = fields; - STRINGS_DISTANCE = sTRINGSDISTANCE; - STRINGS_INTERVAL = sTRINGSINTERVAL; - STRING_FILLING = sTRINGFILLING; - STRING_POSITION = sTRINGPOSITION; - SYMBOLS_PARAM = sYMBOLSPARAM; - SizeErrorALIGNMENT = sizeErrorALIGNMENT; - SizeErrorDISTANCE = sizeErrorDISTANCE; - SizeErrorINTERVAL = sizeErrorINTERVAL; - StringAngle = stringAngle; - StringBorders = stringBorders; - SymbolsCount = symbolsCount; - SymbolsEstimations = symbolsEstimations; - OnCreated(); + this.ALIGNMENT_SYMBOLS_IN_STRING = aLIGNMENTSYMBOLSINSTRING; + this.CHECK_SUMS = cHECKSUMS; + // to ensure "errorPOSITION" is required (not null) + if (errorPOSITION == null) + { + throw new ArgumentNullException("errorPOSITION is a required property for StringItem and cannot be null"); + } + this.ErrorPOSITION = errorPOSITION; + this.FieldCount = fieldCount; + // to ensure "fields" is required (not null) + if (fields == null) + { + throw new ArgumentNullException("fields is a required property for StringItem and cannot be null"); + } + this.Fields = fields; + this.STRINGS_DISTANCE = sTRINGSDISTANCE; + this.STRINGS_INTERVAL = sTRINGSINTERVAL; + this.STRING_FILLING = sTRINGFILLING; + this.STRING_POSITION = sTRINGPOSITION; + this.SYMBOLS_PARAM = sYMBOLSPARAM; + this.SizeErrorALIGNMENT = sizeErrorALIGNMENT; + this.SizeErrorDISTANCE = sizeErrorDISTANCE; + this.SizeErrorINTERVAL = sizeErrorINTERVAL; + this.StringAngle = stringAngle; + // to ensure "stringBorders" is required (not null) + if (stringBorders == null) + { + throw new ArgumentNullException("stringBorders is a required property for StringItem and cannot be null"); + } + this.StringBorders = stringBorders; + this.SymbolsCount = symbolsCount; + // to ensure "symbolsEstimations" is required (not null) + if (symbolsEstimations == null) + { + throw new ArgumentNullException("symbolsEstimations is a required property for StringItem and cannot be null"); + } + this.SymbolsEstimations = symbolsEstimations; } - partial void OnCreated(); - /// /// Gets or Sets ALIGNMENT_SYMBOLS_IN_STRING /// - [JsonPropertyName("ALIGNMENT_SYMBOLS_IN_STRING")] + [DataMember(Name = "ALIGNMENT_SYMBOLS_IN_STRING", IsRequired = true, EmitDefaultValue = true)] public int ALIGNMENT_SYMBOLS_IN_STRING { get; set; } /// /// Gets or Sets CHECK_SUMS /// - [JsonPropertyName("CHECK_SUMS")] + [DataMember(Name = "CHECK_SUMS", IsRequired = true, EmitDefaultValue = true)] public int CHECK_SUMS { get; set; } /// /// Gets or Sets ErrorPOSITION /// - [JsonPropertyName("ErrorPOSITION")] + [DataMember(Name = "ErrorPOSITION", IsRequired = true, EmitDefaultValue = true)] public ErrorCoordinates ErrorPOSITION { get; set; } /// /// Gets or Sets FieldCount /// - [JsonPropertyName("FieldCount")] + [DataMember(Name = "FieldCount", IsRequired = true, EmitDefaultValue = true)] public int FieldCount { get; set; } /// /// Gets or Sets Fields /// - [JsonPropertyName("Fields")] + [DataMember(Name = "Fields", IsRequired = true, EmitDefaultValue = true)] public List Fields { get; set; } /// /// Gets or Sets STRINGS_DISTANCE /// - [JsonPropertyName("STRINGS_DISTANCE")] + [DataMember(Name = "STRINGS_DISTANCE", IsRequired = true, EmitDefaultValue = true)] public int STRINGS_DISTANCE { get; set; } /// /// Gets or Sets STRINGS_INTERVAL /// - [JsonPropertyName("STRINGS_INTERVAL")] + [DataMember(Name = "STRINGS_INTERVAL", IsRequired = true, EmitDefaultValue = true)] public int STRINGS_INTERVAL { get; set; } /// /// Gets or Sets STRING_FILLING /// - [JsonPropertyName("STRING_FILLING")] + [DataMember(Name = "STRING_FILLING", IsRequired = true, EmitDefaultValue = true)] public int STRING_FILLING { get; set; } /// /// Gets or Sets STRING_POSITION /// - [JsonPropertyName("STRING_POSITION")] + [DataMember(Name = "STRING_POSITION", IsRequired = true, EmitDefaultValue = true)] public int STRING_POSITION { get; set; } /// /// Gets or Sets SYMBOLS_PARAM /// - [JsonPropertyName("SYMBOLS_PARAM")] + [DataMember(Name = "SYMBOLS_PARAM", IsRequired = true, EmitDefaultValue = true)] public int SYMBOLS_PARAM { get; set; } /// /// Gets or Sets SizeErrorALIGNMENT /// - [JsonPropertyName("SizeError_ALIGNMENT")] + [DataMember(Name = "SizeError_ALIGNMENT", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorALIGNMENT { get; set; } /// /// Gets or Sets SizeErrorDISTANCE /// - [JsonPropertyName("SizeError_DISTANCE")] + [DataMember(Name = "SizeError_DISTANCE", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorDISTANCE { get; set; } /// /// Gets or Sets SizeErrorINTERVAL /// - [JsonPropertyName("SizeError_INTERVAL")] + [DataMember(Name = "SizeError_INTERVAL", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorINTERVAL { get; set; } /// /// Gets or Sets StringAngle /// - [JsonPropertyName("StringAngle")] + [DataMember(Name = "StringAngle", IsRequired = true, EmitDefaultValue = true)] public decimal StringAngle { get; set; } /// /// Gets or Sets StringBorders /// - [JsonPropertyName("StringBorders")] + [DataMember(Name = "StringBorders", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates StringBorders { get; set; } /// /// Gets or Sets SymbolsCount /// - [JsonPropertyName("SymbolsCount")] + [DataMember(Name = "SymbolsCount", IsRequired = true, EmitDefaultValue = true)] public int SymbolsCount { get; set; } /// /// Gets or Sets SymbolsEstimations /// - [JsonPropertyName("SymbolsEstimations")] + [DataMember(Name = "SymbolsEstimations", IsRequired = true, EmitDefaultValue = true)] public List SymbolsEstimations { get; set; } /// @@ -206,6 +229,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -217,310 +249,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class StringItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override StringItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option aLIGNMENTSYMBOLSINSTRING = default; - Option cHECKSUMS = default; - Option errorPOSITION = default; - Option fieldCount = default; - Option?> fields = default; - Option sTRINGSDISTANCE = default; - Option sTRINGSINTERVAL = default; - Option sTRINGFILLING = default; - Option sTRINGPOSITION = default; - Option sYMBOLSPARAM = default; - Option sizeErrorALIGNMENT = default; - Option sizeErrorDISTANCE = default; - Option sizeErrorINTERVAL = default; - Option stringAngle = default; - Option stringBorders = default; - Option symbolsCount = default; - Option?> symbolsEstimations = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ALIGNMENT_SYMBOLS_IN_STRING": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - aLIGNMENTSYMBOLSINSTRING = new Option(utf8JsonReader.GetInt32()); - break; - case "CHECK_SUMS": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - cHECKSUMS = new Option(utf8JsonReader.GetInt32()); - break; - case "ErrorPOSITION": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - errorPOSITION = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "FieldCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldCount = new Option(utf8JsonReader.GetInt32()); - break; - case "Fields": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fields = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "STRINGS_DISTANCE": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sTRINGSDISTANCE = new Option(utf8JsonReader.GetInt32()); - break; - case "STRINGS_INTERVAL": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sTRINGSINTERVAL = new Option(utf8JsonReader.GetInt32()); - break; - case "STRING_FILLING": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sTRINGFILLING = new Option(utf8JsonReader.GetInt32()); - break; - case "STRING_POSITION": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sTRINGPOSITION = new Option(utf8JsonReader.GetInt32()); - break; - case "SYMBOLS_PARAM": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sYMBOLSPARAM = new Option(utf8JsonReader.GetInt32()); - break; - case "SizeError_ALIGNMENT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorALIGNMENT = new Option(utf8JsonReader.GetDecimal()); - break; - case "SizeError_DISTANCE": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorDISTANCE = new Option(utf8JsonReader.GetDecimal()); - break; - case "SizeError_INTERVAL": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorINTERVAL = new Option(utf8JsonReader.GetDecimal()); - break; - case "StringAngle": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringAngle = new Option(utf8JsonReader.GetDecimal()); - break; - case "StringBorders": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringBorders = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SymbolsCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - symbolsCount = new Option(utf8JsonReader.GetInt32()); - break; - case "SymbolsEstimations": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - symbolsEstimations = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!aLIGNMENTSYMBOLSINSTRING.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(aLIGNMENTSYMBOLSINSTRING)); - - if (!cHECKSUMS.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(cHECKSUMS)); - - if (!errorPOSITION.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(errorPOSITION)); - - if (!fieldCount.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(fieldCount)); - - if (!fields.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(fields)); - - if (!sTRINGSDISTANCE.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(sTRINGSDISTANCE)); - - if (!sTRINGSINTERVAL.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(sTRINGSINTERVAL)); - - if (!sTRINGFILLING.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(sTRINGFILLING)); - - if (!sTRINGPOSITION.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(sTRINGPOSITION)); - - if (!sYMBOLSPARAM.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(sYMBOLSPARAM)); - - if (!sizeErrorALIGNMENT.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(sizeErrorALIGNMENT)); - - if (!sizeErrorDISTANCE.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(sizeErrorDISTANCE)); - - if (!sizeErrorINTERVAL.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(sizeErrorINTERVAL)); - - if (!stringAngle.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(stringAngle)); - - if (!stringBorders.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(stringBorders)); - - if (!symbolsCount.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(symbolsCount)); - - if (!symbolsEstimations.IsSet) - throw new ArgumentException("Property is required for class StringItem.", nameof(symbolsEstimations)); - - if (aLIGNMENTSYMBOLSINSTRING.IsSet && aLIGNMENTSYMBOLSINSTRING.Value == null) - throw new ArgumentNullException(nameof(aLIGNMENTSYMBOLSINSTRING), "Property is not nullable for class StringItem."); - - if (cHECKSUMS.IsSet && cHECKSUMS.Value == null) - throw new ArgumentNullException(nameof(cHECKSUMS), "Property is not nullable for class StringItem."); - - if (errorPOSITION.IsSet && errorPOSITION.Value == null) - throw new ArgumentNullException(nameof(errorPOSITION), "Property is not nullable for class StringItem."); - - if (fieldCount.IsSet && fieldCount.Value == null) - throw new ArgumentNullException(nameof(fieldCount), "Property is not nullable for class StringItem."); - - if (fields.IsSet && fields.Value == null) - throw new ArgumentNullException(nameof(fields), "Property is not nullable for class StringItem."); - - if (sTRINGSDISTANCE.IsSet && sTRINGSDISTANCE.Value == null) - throw new ArgumentNullException(nameof(sTRINGSDISTANCE), "Property is not nullable for class StringItem."); - - if (sTRINGSINTERVAL.IsSet && sTRINGSINTERVAL.Value == null) - throw new ArgumentNullException(nameof(sTRINGSINTERVAL), "Property is not nullable for class StringItem."); - - if (sTRINGFILLING.IsSet && sTRINGFILLING.Value == null) - throw new ArgumentNullException(nameof(sTRINGFILLING), "Property is not nullable for class StringItem."); - - if (sTRINGPOSITION.IsSet && sTRINGPOSITION.Value == null) - throw new ArgumentNullException(nameof(sTRINGPOSITION), "Property is not nullable for class StringItem."); - - if (sYMBOLSPARAM.IsSet && sYMBOLSPARAM.Value == null) - throw new ArgumentNullException(nameof(sYMBOLSPARAM), "Property is not nullable for class StringItem."); - - if (sizeErrorALIGNMENT.IsSet && sizeErrorALIGNMENT.Value == null) - throw new ArgumentNullException(nameof(sizeErrorALIGNMENT), "Property is not nullable for class StringItem."); - - if (sizeErrorDISTANCE.IsSet && sizeErrorDISTANCE.Value == null) - throw new ArgumentNullException(nameof(sizeErrorDISTANCE), "Property is not nullable for class StringItem."); - - if (sizeErrorINTERVAL.IsSet && sizeErrorINTERVAL.Value == null) - throw new ArgumentNullException(nameof(sizeErrorINTERVAL), "Property is not nullable for class StringItem."); - - if (stringAngle.IsSet && stringAngle.Value == null) - throw new ArgumentNullException(nameof(stringAngle), "Property is not nullable for class StringItem."); - - if (stringBorders.IsSet && stringBorders.Value == null) - throw new ArgumentNullException(nameof(stringBorders), "Property is not nullable for class StringItem."); - - if (symbolsCount.IsSet && symbolsCount.Value == null) - throw new ArgumentNullException(nameof(symbolsCount), "Property is not nullable for class StringItem."); - - if (symbolsEstimations.IsSet && symbolsEstimations.Value == null) - throw new ArgumentNullException(nameof(symbolsEstimations), "Property is not nullable for class StringItem."); - - return new StringItem(aLIGNMENTSYMBOLSINSTRING.Value!.Value!, cHECKSUMS.Value!.Value!, errorPOSITION.Value!, fieldCount.Value!.Value!, fields.Value!, sTRINGSDISTANCE.Value!.Value!, sTRINGSINTERVAL.Value!.Value!, sTRINGFILLING.Value!.Value!, sTRINGPOSITION.Value!.Value!, sYMBOLSPARAM.Value!.Value!, sizeErrorALIGNMENT.Value!.Value!, sizeErrorDISTANCE.Value!.Value!, sizeErrorINTERVAL.Value!.Value!, stringAngle.Value!.Value!, stringBorders.Value!, symbolsCount.Value!.Value!, symbolsEstimations.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, StringItem stringItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, stringItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, StringItem stringItem, JsonSerializerOptions jsonSerializerOptions) - { - if (stringItem.ErrorPOSITION == null) - throw new ArgumentNullException(nameof(stringItem.ErrorPOSITION), "Property is required for class StringItem."); - - if (stringItem.Fields == null) - throw new ArgumentNullException(nameof(stringItem.Fields), "Property is required for class StringItem."); - - if (stringItem.StringBorders == null) - throw new ArgumentNullException(nameof(stringItem.StringBorders), "Property is required for class StringItem."); - - if (stringItem.SymbolsEstimations == null) - throw new ArgumentNullException(nameof(stringItem.SymbolsEstimations), "Property is required for class StringItem."); - - writer.WriteNumber("ALIGNMENT_SYMBOLS_IN_STRING", stringItem.ALIGNMENT_SYMBOLS_IN_STRING); - - writer.WriteNumber("CHECK_SUMS", stringItem.CHECK_SUMS); - - writer.WritePropertyName("ErrorPOSITION"); - JsonSerializer.Serialize(writer, stringItem.ErrorPOSITION, jsonSerializerOptions); - writer.WriteNumber("FieldCount", stringItem.FieldCount); - - writer.WritePropertyName("Fields"); - JsonSerializer.Serialize(writer, stringItem.Fields, jsonSerializerOptions); - writer.WriteNumber("STRINGS_DISTANCE", stringItem.STRINGS_DISTANCE); - - writer.WriteNumber("STRINGS_INTERVAL", stringItem.STRINGS_INTERVAL); - - writer.WriteNumber("STRING_FILLING", stringItem.STRING_FILLING); - - writer.WriteNumber("STRING_POSITION", stringItem.STRING_POSITION); - - writer.WriteNumber("SYMBOLS_PARAM", stringItem.SYMBOLS_PARAM); - - writer.WriteNumber("SizeError_ALIGNMENT", stringItem.SizeErrorALIGNMENT); - - writer.WriteNumber("SizeError_DISTANCE", stringItem.SizeErrorDISTANCE); - - writer.WriteNumber("SizeError_INTERVAL", stringItem.SizeErrorINTERVAL); - - writer.WriteNumber("StringAngle", stringItem.StringAngle); - - writer.WritePropertyName("StringBorders"); - JsonSerializer.Serialize(writer, stringItem.StringBorders, jsonSerializerOptions); - writer.WriteNumber("SymbolsCount", stringItem.SymbolsCount); - - writer.WritePropertyName("SymbolsEstimations"); - JsonSerializer.Serialize(writer, stringItem.SymbolsEstimations, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs index a053f91..33cc73e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,95 +14,84 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Describes single row recognition results in multi-line text field of a document /// + [DataContract(Name = "StringRecognitionResult")] public partial class StringRecognitionResult : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Number of StringResult array elements - /// Array of recognition results for individual characters of a string - /// Buf_Text text string length - /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' - /// reserved - [JsonConstructor] - public StringRecognitionResult(decimal symbolsCount, List stringResult, Option bufLength = default, Option bufText = default, Option reserved = default) + [JsonConstructorAttribute] + protected StringRecognitionResult() { } + /// + /// Initializes a new instance of the class. + /// + /// Number of StringResult array elements (required). + /// Array of recognition results for individual characters of a string (required). + /// Buf_Text text string length. + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^'. + /// reserved. + public StringRecognitionResult(decimal symbolsCount = default(decimal), List stringResult = default(List), decimal bufLength = default(decimal), string bufText = default(string), int reserved = default(int)) { - SymbolsCount = symbolsCount; - StringResult = stringResult; - BufLengthOption = bufLength; - BufTextOption = bufText; - ReservedOption = reserved; - OnCreated(); + this.SymbolsCount = symbolsCount; + // to ensure "stringResult" is required (not null) + if (stringResult == null) + { + throw new ArgumentNullException("stringResult is a required property for StringRecognitionResult and cannot be null"); + } + this.StringResult = stringResult; + this.BufLength = bufLength; + this.BufText = bufText; + this.Reserved = reserved; } - partial void OnCreated(); - /// /// Number of StringResult array elements /// /// Number of StringResult array elements - [JsonPropertyName("SymbolsCount")] + [DataMember(Name = "SymbolsCount", IsRequired = true, EmitDefaultValue = true)] public decimal SymbolsCount { get; set; } /// /// Array of recognition results for individual characters of a string /// /// Array of recognition results for individual characters of a string - [JsonPropertyName("StringResult")] + [DataMember(Name = "StringResult", IsRequired = true, EmitDefaultValue = true)] public List StringResult { get; set; } - /// - /// Used to track the state of BufLength - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BufLengthOption { get; private set; } - /// /// Buf_Text text string length /// /// Buf_Text text string length - [JsonPropertyName("Buf_Length")] - public decimal? BufLength { get { return this.BufLengthOption; } set { this.BufLengthOption = new(value); } } - - /// - /// Used to track the state of BufText - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BufTextOption { get; private set; } + [DataMember(Name = "Buf_Length", EmitDefaultValue = false)] + public decimal BufLength { get; set; } /// /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' /// /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' - [JsonPropertyName("Buf_Text")] - public string? BufText { get { return this.BufTextOption; } set { this.BufTextOption = new(value); } } - - /// - /// Used to track the state of Reserved - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ReservedOption { get; private set; } + [DataMember(Name = "Buf_Text", EmitDefaultValue = false)] + public string BufText { get; set; } /// /// Gets or Sets Reserved /// - [JsonPropertyName("Reserved")] - public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new(value); } } + [DataMember(Name = "Reserved", EmitDefaultValue = false)] + public int Reserved { get; set; } /// /// Returns the string presentation of the object @@ -123,6 +110,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -134,140 +130,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class StringRecognitionResultJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override StringRecognitionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option symbolsCount = default; - Option?> stringResult = default; - Option bufLength = default; - Option bufText = default; - Option reserved = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "SymbolsCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - symbolsCount = new Option(utf8JsonReader.GetDecimal()); - break; - case "StringResult": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringResult = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Buf_Length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetDecimal()); - break; - case "Buf_Text": - bufText = new Option(utf8JsonReader.GetString()!); - break; - case "Reserved": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!symbolsCount.IsSet) - throw new ArgumentException("Property is required for class StringRecognitionResult.", nameof(symbolsCount)); - - if (!stringResult.IsSet) - throw new ArgumentException("Property is required for class StringRecognitionResult.", nameof(stringResult)); - - if (symbolsCount.IsSet && symbolsCount.Value == null) - throw new ArgumentNullException(nameof(symbolsCount), "Property is not nullable for class StringRecognitionResult."); - - if (stringResult.IsSet && stringResult.Value == null) - throw new ArgumentNullException(nameof(stringResult), "Property is not nullable for class StringRecognitionResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class StringRecognitionResult."); - - if (bufText.IsSet && bufText.Value == null) - throw new ArgumentNullException(nameof(bufText), "Property is not nullable for class StringRecognitionResult."); - - if (reserved.IsSet && reserved.Value == null) - throw new ArgumentNullException(nameof(reserved), "Property is not nullable for class StringRecognitionResult."); - - return new StringRecognitionResult(symbolsCount.Value!.Value!, stringResult.Value!, bufLength, bufText, reserved); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, StringRecognitionResult stringRecognitionResult, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, stringRecognitionResult, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, StringRecognitionResult stringRecognitionResult, JsonSerializerOptions jsonSerializerOptions) - { - if (stringRecognitionResult.StringResult == null) - throw new ArgumentNullException(nameof(stringRecognitionResult.StringResult), "Property is required for class StringRecognitionResult."); - - if (stringRecognitionResult.BufTextOption.IsSet && stringRecognitionResult.BufText == null) - throw new ArgumentNullException(nameof(stringRecognitionResult.BufText), "Property is required for class StringRecognitionResult."); - - writer.WriteNumber("SymbolsCount", stringRecognitionResult.SymbolsCount); - - writer.WritePropertyName("StringResult"); - JsonSerializer.Serialize(writer, stringRecognitionResult.StringResult, jsonSerializerOptions); - if (stringRecognitionResult.BufLengthOption.IsSet) - writer.WriteNumber("Buf_Length", stringRecognitionResult.BufLengthOption.Value!.Value); - - if (stringRecognitionResult.BufTextOption.IsSet) - writer.WriteString("Buf_Text", stringRecognitionResult.BufText); - - if (stringRecognitionResult.ReservedOption.IsSet) - writer.WriteNumber("Reserved", stringRecognitionResult.ReservedOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Symbol.cs b/src/Regula.DocumentReader.WebClient/Model/Symbol.cs index 18dab18..df6c8bb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Symbol.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Symbol.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Symbol /// + [DataContract(Name = "Symbol")] public partial class Symbol : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// boundingRect - [JsonConstructor] - public Symbol(List boundingRect) + [JsonConstructorAttribute] + protected Symbol() { } + /// + /// Initializes a new instance of the class. + /// + /// boundingRect (required). + public Symbol(List boundingRect = default(List)) { - BoundingRect = boundingRect; - OnCreated(); + // to ensure "boundingRect" is required (not null) + if (boundingRect == null) + { + throw new ArgumentNullException("boundingRect is a required property for Symbol and cannot be null"); + } + this.BoundingRect = boundingRect; } - partial void OnCreated(); - /// /// Gets or Sets BoundingRect /// - [JsonPropertyName("boundingRect")] + [DataMember(Name = "boundingRect", IsRequired = true, EmitDefaultValue = true)] public List BoundingRect { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class SymbolJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override Symbol Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> boundingRect = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "boundingRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - boundingRect = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!boundingRect.IsSet) - throw new ArgumentException("Property is required for class Symbol.", nameof(boundingRect)); - - if (boundingRect.IsSet && boundingRect.Value == null) - throw new ArgumentNullException(nameof(boundingRect), "Property is not nullable for class Symbol."); - - return new Symbol(boundingRect.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Symbol symbol, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, symbol, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, Symbol symbol, JsonSerializerOptions jsonSerializerOptions) - { - if (symbol.BoundingRect == null) - throw new ArgumentNullException(nameof(symbol.BoundingRect), "Property is required for class Symbol."); - - writer.WritePropertyName("boundingRect"); - JsonSerializer.Serialize(writer, symbol.BoundingRect, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs index c96b981..873d8b0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,78 +14,69 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Describes an individual character recognition candidate /// + [DataContract(Name = "SymbolCandidate")] public partial class SymbolCandidate : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Unicode symbol code - /// character recognition probability (0–100,%) - /// class - /// subClass - [JsonConstructor] - public SymbolCandidate(int symbolCode, int symbolProbability, Option @class = default, Option subClass = default) + [JsonConstructorAttribute] + protected SymbolCandidate() { } + /// + /// Initializes a new instance of the class. + /// + /// Unicode symbol code (required). + /// character recognition probability (0–100,%) (required). + /// varClass. + /// subClass. + public SymbolCandidate(int symbolCode = default(int), int symbolProbability = default(int), int varClass = default(int), int subClass = default(int)) { - SymbolCode = symbolCode; - SymbolProbability = symbolProbability; - ClassOption = @class; - SubClassOption = subClass; - OnCreated(); + this.SymbolCode = symbolCode; + this.SymbolProbability = symbolProbability; + this.Class = varClass; + this.SubClass = subClass; } - partial void OnCreated(); - /// /// Unicode symbol code /// /// Unicode symbol code - [JsonPropertyName("SymbolCode")] + [DataMember(Name = "SymbolCode", IsRequired = true, EmitDefaultValue = true)] public int SymbolCode { get; set; } /// /// character recognition probability (0–100,%) /// /// character recognition probability (0–100,%) - [JsonPropertyName("SymbolProbability")] + [DataMember(Name = "SymbolProbability", IsRequired = true, EmitDefaultValue = true)] public int SymbolProbability { get; set; } - /// - /// Used to track the state of Class - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ClassOption { get; private set; } - /// /// Gets or Sets Class /// - [JsonPropertyName("Class")] - public int? Class { get { return this.ClassOption; } set { this.ClassOption = new(value); } } - - /// - /// Used to track the state of SubClass - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SubClassOption { get; private set; } + [DataMember(Name = "Class", EmitDefaultValue = false)] + public int Class { get; set; } /// /// Gets or Sets SubClass /// - [JsonPropertyName("SubClass")] - public int? SubClass { get { return this.SubClassOption; } set { this.SubClassOption = new(value); } } + [DataMember(Name = "SubClass", EmitDefaultValue = false)] + public int SubClass { get; set; } /// /// Returns the string presentation of the object @@ -105,6 +94,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -128,124 +126,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class SymbolCandidateJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override SymbolCandidate Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option symbolCode = default; - Option symbolProbability = default; - Option varClass = default; - Option subClass = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "SymbolCode": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - symbolCode = new Option(utf8JsonReader.GetInt32()); - break; - case "SymbolProbability": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - symbolProbability = new Option(utf8JsonReader.GetInt32()); - break; - case "Class": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - varClass = new Option(utf8JsonReader.GetInt32()); - break; - case "SubClass": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - subClass = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!symbolCode.IsSet) - throw new ArgumentException("Property is required for class SymbolCandidate.", nameof(symbolCode)); - - if (!symbolProbability.IsSet) - throw new ArgumentException("Property is required for class SymbolCandidate.", nameof(symbolProbability)); - - if (symbolCode.IsSet && symbolCode.Value == null) - throw new ArgumentNullException(nameof(symbolCode), "Property is not nullable for class SymbolCandidate."); - - if (symbolProbability.IsSet && symbolProbability.Value == null) - throw new ArgumentNullException(nameof(symbolProbability), "Property is not nullable for class SymbolCandidate."); - - if (varClass.IsSet && varClass.Value == null) - throw new ArgumentNullException(nameof(varClass), "Property is not nullable for class SymbolCandidate."); - - if (subClass.IsSet && subClass.Value == null) - throw new ArgumentNullException(nameof(subClass), "Property is not nullable for class SymbolCandidate."); - - return new SymbolCandidate(symbolCode.Value!.Value!, symbolProbability.Value!.Value!, varClass, subClass); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SymbolCandidate symbolCandidate, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, symbolCandidate, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, SymbolCandidate symbolCandidate, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("SymbolCode", symbolCandidate.SymbolCode); - - writer.WriteNumber("SymbolProbability", symbolCandidate.SymbolProbability); - - if (symbolCandidate.ClassOption.IsSet) - writer.WriteNumber("Class", symbolCandidate.ClassOption.Value!.Value); - - if (symbolCandidate.SubClassOption.IsSet) - writer.WriteNumber("SubClass", symbolCandidate.SubClassOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs index f135e4a..a320328 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolEstimationItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,165 +14,175 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// SymbolEstimationItem /// + [DataContract(Name = "SymbolEstimationItem")] public partial class SymbolEstimationItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// aLIGNMENTNEARESTSYMBOLS - /// cONTRASTPRINT - /// cONTRASTSYMBOL - /// charSymbol - /// eDGE - /// eMPTINESS - /// sTAIN - /// sYMBOLSINTERVAL - /// sYMBOLPARAM - /// sYMBOLSIZE - /// sizeErrorAlignWithNext - /// sizeErrorAlignWithPrev - /// sizeErrorIntervWithNext - /// sizeErrorIntervWithPrev - /// sizeErrorSymbolHeight - /// sizeErrorSymbolWidth - /// symbolBounds - [JsonConstructor] - public SymbolEstimationItem(int aLIGNMENTNEARESTSYMBOLS, int cONTRASTPRINT, int cONTRASTSYMBOL, int charSymbol, int eDGE, int eMPTINESS, int sTAIN, int sYMBOLSINTERVAL, int sYMBOLPARAM, int sYMBOLSIZE, decimal sizeErrorAlignWithNext, decimal sizeErrorAlignWithPrev, decimal sizeErrorIntervWithNext, decimal sizeErrorIntervWithPrev, decimal sizeErrorSymbolHeight, decimal sizeErrorSymbolWidth, RectangleCoordinates symbolBounds) + [JsonConstructorAttribute] + protected SymbolEstimationItem() { } + /// + /// Initializes a new instance of the class. + /// + /// aLIGNMENTNEARESTSYMBOLS (required). + /// cONTRASTPRINT (required). + /// cONTRASTSYMBOL (required). + /// charSymbol (required). + /// eDGE (required). + /// eMPTINESS (required). + /// sTAIN (required). + /// sYMBOLSINTERVAL (required). + /// sYMBOLPARAM (required). + /// sYMBOLSIZE (required). + /// sizeErrorAlignWithNext (required). + /// sizeErrorAlignWithPrev (required). + /// sizeErrorIntervWithNext (required). + /// sizeErrorIntervWithPrev (required). + /// sizeErrorSymbolHeight (required). + /// sizeErrorSymbolWidth (required). + /// symbolBounds (required). + public SymbolEstimationItem(int aLIGNMENTNEARESTSYMBOLS = default(int), int cONTRASTPRINT = default(int), int cONTRASTSYMBOL = default(int), int charSymbol = default(int), int eDGE = default(int), int eMPTINESS = default(int), int sTAIN = default(int), int sYMBOLSINTERVAL = default(int), int sYMBOLPARAM = default(int), int sYMBOLSIZE = default(int), decimal sizeErrorAlignWithNext = default(decimal), decimal sizeErrorAlignWithPrev = default(decimal), decimal sizeErrorIntervWithNext = default(decimal), decimal sizeErrorIntervWithPrev = default(decimal), decimal sizeErrorSymbolHeight = default(decimal), decimal sizeErrorSymbolWidth = default(decimal), RectangleCoordinates symbolBounds = default(RectangleCoordinates)) { - ALIGNMENT_NEAREST_SYMBOLS = aLIGNMENTNEARESTSYMBOLS; - CONTRAST_PRINT = cONTRASTPRINT; - CONTRAST_SYMBOL = cONTRASTSYMBOL; - CharSymbol = charSymbol; - EDGE = eDGE; - EMPTINESS = eMPTINESS; - STAIN = sTAIN; - SYMBOLS_INTERVAL = sYMBOLSINTERVAL; - SYMBOL_PARAM = sYMBOLPARAM; - SYMBOL_SIZE = sYMBOLSIZE; - SizeErrorAlignWithNext = sizeErrorAlignWithNext; - SizeErrorAlignWithPrev = sizeErrorAlignWithPrev; - SizeErrorIntervWithNext = sizeErrorIntervWithNext; - SizeErrorIntervWithPrev = sizeErrorIntervWithPrev; - SizeErrorSymbolHeight = sizeErrorSymbolHeight; - SizeErrorSymbolWidth = sizeErrorSymbolWidth; - SymbolBounds = symbolBounds; - OnCreated(); + this.ALIGNMENT_NEAREST_SYMBOLS = aLIGNMENTNEARESTSYMBOLS; + this.CONTRAST_PRINT = cONTRASTPRINT; + this.CONTRAST_SYMBOL = cONTRASTSYMBOL; + this.CharSymbol = charSymbol; + this.EDGE = eDGE; + this.EMPTINESS = eMPTINESS; + this.STAIN = sTAIN; + this.SYMBOLS_INTERVAL = sYMBOLSINTERVAL; + this.SYMBOL_PARAM = sYMBOLPARAM; + this.SYMBOL_SIZE = sYMBOLSIZE; + this.SizeErrorAlignWithNext = sizeErrorAlignWithNext; + this.SizeErrorAlignWithPrev = sizeErrorAlignWithPrev; + this.SizeErrorIntervWithNext = sizeErrorIntervWithNext; + this.SizeErrorIntervWithPrev = sizeErrorIntervWithPrev; + this.SizeErrorSymbolHeight = sizeErrorSymbolHeight; + this.SizeErrorSymbolWidth = sizeErrorSymbolWidth; + // to ensure "symbolBounds" is required (not null) + if (symbolBounds == null) + { + throw new ArgumentNullException("symbolBounds is a required property for SymbolEstimationItem and cannot be null"); + } + this.SymbolBounds = symbolBounds; } - partial void OnCreated(); - /// /// Gets or Sets ALIGNMENT_NEAREST_SYMBOLS /// - [JsonPropertyName("ALIGNMENT_NEAREST_SYMBOLS")] + [DataMember(Name = "ALIGNMENT_NEAREST_SYMBOLS", IsRequired = true, EmitDefaultValue = true)] public int ALIGNMENT_NEAREST_SYMBOLS { get; set; } /// /// Gets or Sets CONTRAST_PRINT /// - [JsonPropertyName("CONTRAST_PRINT")] + [DataMember(Name = "CONTRAST_PRINT", IsRequired = true, EmitDefaultValue = true)] public int CONTRAST_PRINT { get; set; } /// /// Gets or Sets CONTRAST_SYMBOL /// - [JsonPropertyName("CONTRAST_SYMBOL")] + [DataMember(Name = "CONTRAST_SYMBOL", IsRequired = true, EmitDefaultValue = true)] public int CONTRAST_SYMBOL { get; set; } /// /// Gets or Sets CharSymbol /// - [JsonPropertyName("CharSymbol")] + [DataMember(Name = "CharSymbol", IsRequired = true, EmitDefaultValue = true)] public int CharSymbol { get; set; } /// /// Gets or Sets EDGE /// - [JsonPropertyName("EDGE")] + [DataMember(Name = "EDGE", IsRequired = true, EmitDefaultValue = true)] public int EDGE { get; set; } /// /// Gets or Sets EMPTINESS /// - [JsonPropertyName("EMPTINESS")] + [DataMember(Name = "EMPTINESS", IsRequired = true, EmitDefaultValue = true)] public int EMPTINESS { get; set; } /// /// Gets or Sets STAIN /// - [JsonPropertyName("STAIN")] + [DataMember(Name = "STAIN", IsRequired = true, EmitDefaultValue = true)] public int STAIN { get; set; } /// /// Gets or Sets SYMBOLS_INTERVAL /// - [JsonPropertyName("SYMBOLS_INTERVAL")] + [DataMember(Name = "SYMBOLS_INTERVAL", IsRequired = true, EmitDefaultValue = true)] public int SYMBOLS_INTERVAL { get; set; } /// /// Gets or Sets SYMBOL_PARAM /// - [JsonPropertyName("SYMBOL_PARAM")] + [DataMember(Name = "SYMBOL_PARAM", IsRequired = true, EmitDefaultValue = true)] public int SYMBOL_PARAM { get; set; } /// /// Gets or Sets SYMBOL_SIZE /// - [JsonPropertyName("SYMBOL_SIZE")] + [DataMember(Name = "SYMBOL_SIZE", IsRequired = true, EmitDefaultValue = true)] public int SYMBOL_SIZE { get; set; } /// /// Gets or Sets SizeErrorAlignWithNext /// - [JsonPropertyName("SizeErrorAlignWithNext")] + [DataMember(Name = "SizeErrorAlignWithNext", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorAlignWithNext { get; set; } /// /// Gets or Sets SizeErrorAlignWithPrev /// - [JsonPropertyName("SizeErrorAlignWithPrev")] + [DataMember(Name = "SizeErrorAlignWithPrev", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorAlignWithPrev { get; set; } /// /// Gets or Sets SizeErrorIntervWithNext /// - [JsonPropertyName("SizeErrorIntervWithNext")] + [DataMember(Name = "SizeErrorIntervWithNext", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorIntervWithNext { get; set; } /// /// Gets or Sets SizeErrorIntervWithPrev /// - [JsonPropertyName("SizeErrorIntervWithPrev")] + [DataMember(Name = "SizeErrorIntervWithPrev", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorIntervWithPrev { get; set; } /// /// Gets or Sets SizeErrorSymbolHeight /// - [JsonPropertyName("SizeErrorSymbolHeight")] + [DataMember(Name = "SizeErrorSymbolHeight", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorSymbolHeight { get; set; } /// /// Gets or Sets SizeErrorSymbolWidth /// - [JsonPropertyName("SizeErrorSymbolWidth")] + [DataMember(Name = "SizeErrorSymbolWidth", IsRequired = true, EmitDefaultValue = true)] public decimal SizeErrorSymbolWidth { get; set; } /// /// Gets or Sets SymbolBounds /// - [JsonPropertyName("SymbolBounds")] + [DataMember(Name = "SymbolBounds", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates SymbolBounds { get; set; } /// @@ -206,6 +214,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -217,301 +234,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class SymbolEstimationItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override SymbolEstimationItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option aLIGNMENTNEARESTSYMBOLS = default; - Option cONTRASTPRINT = default; - Option cONTRASTSYMBOL = default; - Option charSymbol = default; - Option eDGE = default; - Option eMPTINESS = default; - Option sTAIN = default; - Option sYMBOLSINTERVAL = default; - Option sYMBOLPARAM = default; - Option sYMBOLSIZE = default; - Option sizeErrorAlignWithNext = default; - Option sizeErrorAlignWithPrev = default; - Option sizeErrorIntervWithNext = default; - Option sizeErrorIntervWithPrev = default; - Option sizeErrorSymbolHeight = default; - Option sizeErrorSymbolWidth = default; - Option symbolBounds = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ALIGNMENT_NEAREST_SYMBOLS": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - aLIGNMENTNEARESTSYMBOLS = new Option(utf8JsonReader.GetInt32()); - break; - case "CONTRAST_PRINT": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - cONTRASTPRINT = new Option(utf8JsonReader.GetInt32()); - break; - case "CONTRAST_SYMBOL": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - cONTRASTSYMBOL = new Option(utf8JsonReader.GetInt32()); - break; - case "CharSymbol": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - charSymbol = new Option(utf8JsonReader.GetInt32()); - break; - case "EDGE": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eDGE = new Option(utf8JsonReader.GetInt32()); - break; - case "EMPTINESS": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - eMPTINESS = new Option(utf8JsonReader.GetInt32()); - break; - case "STAIN": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sTAIN = new Option(utf8JsonReader.GetInt32()); - break; - case "SYMBOLS_INTERVAL": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sYMBOLSINTERVAL = new Option(utf8JsonReader.GetInt32()); - break; - case "SYMBOL_PARAM": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sYMBOLPARAM = new Option(utf8JsonReader.GetInt32()); - break; - case "SYMBOL_SIZE": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sYMBOLSIZE = new Option(utf8JsonReader.GetInt32()); - break; - case "SizeErrorAlignWithNext": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorAlignWithNext = new Option(utf8JsonReader.GetDecimal()); - break; - case "SizeErrorAlignWithPrev": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorAlignWithPrev = new Option(utf8JsonReader.GetDecimal()); - break; - case "SizeErrorIntervWithNext": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorIntervWithNext = new Option(utf8JsonReader.GetDecimal()); - break; - case "SizeErrorIntervWithPrev": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorIntervWithPrev = new Option(utf8JsonReader.GetDecimal()); - break; - case "SizeErrorSymbolHeight": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorSymbolHeight = new Option(utf8JsonReader.GetDecimal()); - break; - case "SizeErrorSymbolWidth": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - sizeErrorSymbolWidth = new Option(utf8JsonReader.GetDecimal()); - break; - case "SymbolBounds": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - symbolBounds = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!aLIGNMENTNEARESTSYMBOLS.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(aLIGNMENTNEARESTSYMBOLS)); - - if (!cONTRASTPRINT.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(cONTRASTPRINT)); - - if (!cONTRASTSYMBOL.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(cONTRASTSYMBOL)); - - if (!charSymbol.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(charSymbol)); - - if (!eDGE.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(eDGE)); - - if (!eMPTINESS.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(eMPTINESS)); - - if (!sTAIN.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sTAIN)); - - if (!sYMBOLSINTERVAL.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sYMBOLSINTERVAL)); - - if (!sYMBOLPARAM.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sYMBOLPARAM)); - - if (!sYMBOLSIZE.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sYMBOLSIZE)); - - if (!sizeErrorAlignWithNext.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorAlignWithNext)); - - if (!sizeErrorAlignWithPrev.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorAlignWithPrev)); - - if (!sizeErrorIntervWithNext.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorIntervWithNext)); - - if (!sizeErrorIntervWithPrev.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorIntervWithPrev)); - - if (!sizeErrorSymbolHeight.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorSymbolHeight)); - - if (!sizeErrorSymbolWidth.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(sizeErrorSymbolWidth)); - - if (!symbolBounds.IsSet) - throw new ArgumentException("Property is required for class SymbolEstimationItem.", nameof(symbolBounds)); - - if (aLIGNMENTNEARESTSYMBOLS.IsSet && aLIGNMENTNEARESTSYMBOLS.Value == null) - throw new ArgumentNullException(nameof(aLIGNMENTNEARESTSYMBOLS), "Property is not nullable for class SymbolEstimationItem."); - - if (cONTRASTPRINT.IsSet && cONTRASTPRINT.Value == null) - throw new ArgumentNullException(nameof(cONTRASTPRINT), "Property is not nullable for class SymbolEstimationItem."); - - if (cONTRASTSYMBOL.IsSet && cONTRASTSYMBOL.Value == null) - throw new ArgumentNullException(nameof(cONTRASTSYMBOL), "Property is not nullable for class SymbolEstimationItem."); - - if (charSymbol.IsSet && charSymbol.Value == null) - throw new ArgumentNullException(nameof(charSymbol), "Property is not nullable for class SymbolEstimationItem."); - - if (eDGE.IsSet && eDGE.Value == null) - throw new ArgumentNullException(nameof(eDGE), "Property is not nullable for class SymbolEstimationItem."); - - if (eMPTINESS.IsSet && eMPTINESS.Value == null) - throw new ArgumentNullException(nameof(eMPTINESS), "Property is not nullable for class SymbolEstimationItem."); - - if (sTAIN.IsSet && sTAIN.Value == null) - throw new ArgumentNullException(nameof(sTAIN), "Property is not nullable for class SymbolEstimationItem."); - - if (sYMBOLSINTERVAL.IsSet && sYMBOLSINTERVAL.Value == null) - throw new ArgumentNullException(nameof(sYMBOLSINTERVAL), "Property is not nullable for class SymbolEstimationItem."); - - if (sYMBOLPARAM.IsSet && sYMBOLPARAM.Value == null) - throw new ArgumentNullException(nameof(sYMBOLPARAM), "Property is not nullable for class SymbolEstimationItem."); - - if (sYMBOLSIZE.IsSet && sYMBOLSIZE.Value == null) - throw new ArgumentNullException(nameof(sYMBOLSIZE), "Property is not nullable for class SymbolEstimationItem."); - - if (sizeErrorAlignWithNext.IsSet && sizeErrorAlignWithNext.Value == null) - throw new ArgumentNullException(nameof(sizeErrorAlignWithNext), "Property is not nullable for class SymbolEstimationItem."); - - if (sizeErrorAlignWithPrev.IsSet && sizeErrorAlignWithPrev.Value == null) - throw new ArgumentNullException(nameof(sizeErrorAlignWithPrev), "Property is not nullable for class SymbolEstimationItem."); - - if (sizeErrorIntervWithNext.IsSet && sizeErrorIntervWithNext.Value == null) - throw new ArgumentNullException(nameof(sizeErrorIntervWithNext), "Property is not nullable for class SymbolEstimationItem."); - - if (sizeErrorIntervWithPrev.IsSet && sizeErrorIntervWithPrev.Value == null) - throw new ArgumentNullException(nameof(sizeErrorIntervWithPrev), "Property is not nullable for class SymbolEstimationItem."); - - if (sizeErrorSymbolHeight.IsSet && sizeErrorSymbolHeight.Value == null) - throw new ArgumentNullException(nameof(sizeErrorSymbolHeight), "Property is not nullable for class SymbolEstimationItem."); - - if (sizeErrorSymbolWidth.IsSet && sizeErrorSymbolWidth.Value == null) - throw new ArgumentNullException(nameof(sizeErrorSymbolWidth), "Property is not nullable for class SymbolEstimationItem."); - - if (symbolBounds.IsSet && symbolBounds.Value == null) - throw new ArgumentNullException(nameof(symbolBounds), "Property is not nullable for class SymbolEstimationItem."); - - return new SymbolEstimationItem(aLIGNMENTNEARESTSYMBOLS.Value!.Value!, cONTRASTPRINT.Value!.Value!, cONTRASTSYMBOL.Value!.Value!, charSymbol.Value!.Value!, eDGE.Value!.Value!, eMPTINESS.Value!.Value!, sTAIN.Value!.Value!, sYMBOLSINTERVAL.Value!.Value!, sYMBOLPARAM.Value!.Value!, sYMBOLSIZE.Value!.Value!, sizeErrorAlignWithNext.Value!.Value!, sizeErrorAlignWithPrev.Value!.Value!, sizeErrorIntervWithNext.Value!.Value!, sizeErrorIntervWithPrev.Value!.Value!, sizeErrorSymbolHeight.Value!.Value!, sizeErrorSymbolWidth.Value!.Value!, symbolBounds.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SymbolEstimationItem symbolEstimationItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, symbolEstimationItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, SymbolEstimationItem symbolEstimationItem, JsonSerializerOptions jsonSerializerOptions) - { - if (symbolEstimationItem.SymbolBounds == null) - throw new ArgumentNullException(nameof(symbolEstimationItem.SymbolBounds), "Property is required for class SymbolEstimationItem."); - - writer.WriteNumber("ALIGNMENT_NEAREST_SYMBOLS", symbolEstimationItem.ALIGNMENT_NEAREST_SYMBOLS); - - writer.WriteNumber("CONTRAST_PRINT", symbolEstimationItem.CONTRAST_PRINT); - - writer.WriteNumber("CONTRAST_SYMBOL", symbolEstimationItem.CONTRAST_SYMBOL); - - writer.WriteNumber("CharSymbol", symbolEstimationItem.CharSymbol); - - writer.WriteNumber("EDGE", symbolEstimationItem.EDGE); - - writer.WriteNumber("EMPTINESS", symbolEstimationItem.EMPTINESS); - - writer.WriteNumber("STAIN", symbolEstimationItem.STAIN); - - writer.WriteNumber("SYMBOLS_INTERVAL", symbolEstimationItem.SYMBOLS_INTERVAL); - - writer.WriteNumber("SYMBOL_PARAM", symbolEstimationItem.SYMBOL_PARAM); - - writer.WriteNumber("SYMBOL_SIZE", symbolEstimationItem.SYMBOL_SIZE); - - writer.WriteNumber("SizeErrorAlignWithNext", symbolEstimationItem.SizeErrorAlignWithNext); - - writer.WriteNumber("SizeErrorAlignWithPrev", symbolEstimationItem.SizeErrorAlignWithPrev); - - writer.WriteNumber("SizeErrorIntervWithNext", symbolEstimationItem.SizeErrorIntervWithNext); - - writer.WriteNumber("SizeErrorIntervWithPrev", symbolEstimationItem.SizeErrorIntervWithPrev); - - writer.WriteNumber("SizeErrorSymbolHeight", symbolEstimationItem.SizeErrorSymbolHeight); - - writer.WriteNumber("SizeErrorSymbolWidth", symbolEstimationItem.SizeErrorSymbolWidth); - - writer.WritePropertyName("SymbolBounds"); - JsonSerializer.Serialize(writer, symbolEstimationItem.SymbolBounds, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs index 516f5ac..273a3da 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,101 +14,95 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Describes a single character recognition results in the text field line /// + [DataContract(Name = "SymbolRecognitionResult")] public partial class SymbolRecognitionResult : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// symbolRect - /// Number of significant elements of ListOfCandidates array - /// Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) - /// baseLineBottom - /// baseLineTop - /// reserved - [JsonConstructor] - public SymbolRecognitionResult(RectangleCoordinates symbolRect, decimal candidatesCount, List listOfCandidates, Option baseLineBottom = default, Option baseLineTop = default, Option reserved = default) + [JsonConstructorAttribute] + protected SymbolRecognitionResult() { } + /// + /// Initializes a new instance of the class. + /// + /// symbolRect (required). + /// Number of significant elements of ListOfCandidates array (required). + /// Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) (required). + /// baseLineBottom. + /// baseLineTop. + /// reserved. + public SymbolRecognitionResult(RectangleCoordinates symbolRect = default(RectangleCoordinates), decimal candidatesCount = default(decimal), List listOfCandidates = default(List), int baseLineBottom = default(int), int baseLineTop = default(int), int reserved = default(int)) { - SymbolRect = symbolRect; - CandidatesCount = candidatesCount; - ListOfCandidates = listOfCandidates; - BaseLineBottomOption = baseLineBottom; - BaseLineTopOption = baseLineTop; - ReservedOption = reserved; - OnCreated(); + // to ensure "symbolRect" is required (not null) + if (symbolRect == null) + { + throw new ArgumentNullException("symbolRect is a required property for SymbolRecognitionResult and cannot be null"); + } + this.SymbolRect = symbolRect; + this.CandidatesCount = candidatesCount; + // to ensure "listOfCandidates" is required (not null) + if (listOfCandidates == null) + { + throw new ArgumentNullException("listOfCandidates is a required property for SymbolRecognitionResult and cannot be null"); + } + this.ListOfCandidates = listOfCandidates; + this.BaseLineBottom = baseLineBottom; + this.BaseLineTop = baseLineTop; + this.Reserved = reserved; } - partial void OnCreated(); - /// /// Gets or Sets SymbolRect /// - [JsonPropertyName("SymbolRect")] + [DataMember(Name = "SymbolRect", IsRequired = true, EmitDefaultValue = true)] public RectangleCoordinates SymbolRect { get; set; } /// /// Number of significant elements of ListOfCandidates array /// /// Number of significant elements of ListOfCandidates array - [JsonPropertyName("CandidatesCount")] + [DataMember(Name = "CandidatesCount", IsRequired = true, EmitDefaultValue = true)] public decimal CandidatesCount { get; set; } /// /// Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) /// /// Array of candidate characters. Sorted in descending order of recognition probabilities (the first element has highest probability) - [JsonPropertyName("ListOfCandidates")] + [DataMember(Name = "ListOfCandidates", IsRequired = true, EmitDefaultValue = true)] public List ListOfCandidates { get; set; } - /// - /// Used to track the state of BaseLineBottom - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BaseLineBottomOption { get; private set; } - /// /// Gets or Sets BaseLineBottom /// - [JsonPropertyName("BaseLineBottom")] - public int? BaseLineBottom { get { return this.BaseLineBottomOption; } set { this.BaseLineBottomOption = new(value); } } - - /// - /// Used to track the state of BaseLineTop - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option BaseLineTopOption { get; private set; } + [DataMember(Name = "BaseLineBottom", EmitDefaultValue = false)] + public int BaseLineBottom { get; set; } /// /// Gets or Sets BaseLineTop /// - [JsonPropertyName("BaseLineTop")] - public int? BaseLineTop { get { return this.BaseLineTopOption; } set { this.BaseLineTopOption = new(value); } } - - /// - /// Used to track the state of Reserved - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ReservedOption { get; private set; } + [DataMember(Name = "BaseLineTop", EmitDefaultValue = false)] + public int BaseLineTop { get; set; } /// /// Gets or Sets Reserved /// - [JsonPropertyName("Reserved")] - public int? Reserved { get { return this.ReservedOption; } set { this.ReservedOption = new(value); } } + [DataMember(Name = "Reserved", EmitDefaultValue = false)] + public int Reserved { get; set; } /// /// Returns the string presentation of the object @@ -130,6 +122,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -141,154 +142,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class SymbolRecognitionResultJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override SymbolRecognitionResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option symbolRect = default; - Option candidatesCount = default; - Option?> listOfCandidates = default; - Option baseLineBottom = default; - Option baseLineTop = default; - Option reserved = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "SymbolRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - symbolRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "CandidatesCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - candidatesCount = new Option(utf8JsonReader.GetDecimal()); - break; - case "ListOfCandidates": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listOfCandidates = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "BaseLineBottom": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - baseLineBottom = new Option(utf8JsonReader.GetInt32()); - break; - case "BaseLineTop": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - baseLineTop = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!symbolRect.IsSet) - throw new ArgumentException("Property is required for class SymbolRecognitionResult.", nameof(symbolRect)); - - if (!candidatesCount.IsSet) - throw new ArgumentException("Property is required for class SymbolRecognitionResult.", nameof(candidatesCount)); - - if (!listOfCandidates.IsSet) - throw new ArgumentException("Property is required for class SymbolRecognitionResult.", nameof(listOfCandidates)); - - if (symbolRect.IsSet && symbolRect.Value == null) - throw new ArgumentNullException(nameof(symbolRect), "Property is not nullable for class SymbolRecognitionResult."); - - if (candidatesCount.IsSet && candidatesCount.Value == null) - throw new ArgumentNullException(nameof(candidatesCount), "Property is not nullable for class SymbolRecognitionResult."); - - if (listOfCandidates.IsSet && listOfCandidates.Value == null) - throw new ArgumentNullException(nameof(listOfCandidates), "Property is not nullable for class SymbolRecognitionResult."); - - if (baseLineBottom.IsSet && baseLineBottom.Value == null) - throw new ArgumentNullException(nameof(baseLineBottom), "Property is not nullable for class SymbolRecognitionResult."); - - if (baseLineTop.IsSet && baseLineTop.Value == null) - throw new ArgumentNullException(nameof(baseLineTop), "Property is not nullable for class SymbolRecognitionResult."); - - if (reserved.IsSet && reserved.Value == null) - throw new ArgumentNullException(nameof(reserved), "Property is not nullable for class SymbolRecognitionResult."); - - return new SymbolRecognitionResult(symbolRect.Value!, candidatesCount.Value!.Value!, listOfCandidates.Value!, baseLineBottom, baseLineTop, reserved); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, SymbolRecognitionResult symbolRecognitionResult, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, symbolRecognitionResult, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, SymbolRecognitionResult symbolRecognitionResult, JsonSerializerOptions jsonSerializerOptions) - { - if (symbolRecognitionResult.SymbolRect == null) - throw new ArgumentNullException(nameof(symbolRecognitionResult.SymbolRect), "Property is required for class SymbolRecognitionResult."); - - if (symbolRecognitionResult.ListOfCandidates == null) - throw new ArgumentNullException(nameof(symbolRecognitionResult.ListOfCandidates), "Property is required for class SymbolRecognitionResult."); - - writer.WritePropertyName("SymbolRect"); - JsonSerializer.Serialize(writer, symbolRecognitionResult.SymbolRect, jsonSerializerOptions); - writer.WriteNumber("CandidatesCount", symbolRecognitionResult.CandidatesCount); - - writer.WritePropertyName("ListOfCandidates"); - JsonSerializer.Serialize(writer, symbolRecognitionResult.ListOfCandidates, jsonSerializerOptions); - if (symbolRecognitionResult.BaseLineBottomOption.IsSet) - writer.WriteNumber("BaseLineBottom", symbolRecognitionResult.BaseLineBottomOption.Value!.Value); - - if (symbolRecognitionResult.BaseLineTopOption.IsSet) - writer.WriteNumber("BaseLineTop", symbolRecognitionResult.BaseLineTopOption.Value!.Value); - - if (symbolRecognitionResult.ReservedOption.IsSet) - writer.WriteNumber("Reserved", symbolRecognitionResult.ReservedOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs index f41a0fc..826f635 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,60 +14,46 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TDocBinaryInfo /// + [DataContract(Name = "TDocBinaryInfo")] public partial class TDocBinaryInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// rFIDBINARYDATA - /// rFIDRAWDATA - [JsonConstructor] - public TDocBinaryInfo(Option rFIDBINARYDATA = default, Option?> rFIDRAWDATA = default) + /// rFIDBINARYDATA. + /// rFIDRAWDATA. + public TDocBinaryInfo(BinaryData rFIDBINARYDATA = default(BinaryData), List rFIDRAWDATA = default(List)) { - RFID_BINARY_DATAOption = rFIDBINARYDATA; - RFID_RAW_DATAOption = rFIDRAWDATA; - OnCreated(); + this.RFID_BINARY_DATA = rFIDBINARYDATA; + this.RFID_RAW_DATA = rFIDRAWDATA; } - partial void OnCreated(); - - /// - /// Used to track the state of RFID_BINARY_DATA - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RFID_BINARY_DATAOption { get; private set; } - /// /// Gets or Sets RFID_BINARY_DATA /// - [JsonPropertyName("RFID_BINARY_DATA")] - public BinaryData? RFID_BINARY_DATA { get { return this.RFID_BINARY_DATAOption; } set { this.RFID_BINARY_DATAOption = new(value); } } - - /// - /// Used to track the state of RFID_RAW_DATA - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> RFID_RAW_DATAOption { get; private set; } + [DataMember(Name = "RFID_BINARY_DATA", EmitDefaultValue = false)] + public BinaryData RFID_BINARY_DATA { get; set; } /// /// Gets or Sets RFID_RAW_DATA /// - [JsonPropertyName("RFID_RAW_DATA")] - public List? RFID_RAW_DATA { get { return this.RFID_RAW_DATAOption; } set { this.RFID_RAW_DATAOption = new(value); } } + [DataMember(Name = "RFID_RAW_DATA", EmitDefaultValue = false)] + public List RFID_RAW_DATA { get; set; } /// /// Returns the string presentation of the object @@ -85,6 +69,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -96,109 +89,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TDocBinaryInfoJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TDocBinaryInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option rFIDBINARYDATA = default; - Option?> rFIDRAWDATA = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RFID_BINARY_DATA": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDBINARYDATA = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "RFID_RAW_DATA": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDRAWDATA = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (rFIDBINARYDATA.IsSet && rFIDBINARYDATA.Value == null) - throw new ArgumentNullException(nameof(rFIDBINARYDATA), "Property is not nullable for class TDocBinaryInfo."); - - if (rFIDRAWDATA.IsSet && rFIDRAWDATA.Value == null) - throw new ArgumentNullException(nameof(rFIDRAWDATA), "Property is not nullable for class TDocBinaryInfo."); - - return new TDocBinaryInfo(rFIDBINARYDATA, rFIDRAWDATA); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TDocBinaryInfo tDocBinaryInfo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, tDocBinaryInfo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TDocBinaryInfo tDocBinaryInfo, JsonSerializerOptions jsonSerializerOptions) - { - if (tDocBinaryInfo.RFID_BINARY_DATAOption.IsSet && tDocBinaryInfo.RFID_BINARY_DATA == null) - throw new ArgumentNullException(nameof(tDocBinaryInfo.RFID_BINARY_DATA), "Property is required for class TDocBinaryInfo."); - - if (tDocBinaryInfo.RFID_RAW_DATAOption.IsSet && tDocBinaryInfo.RFID_RAW_DATA == null) - throw new ArgumentNullException(nameof(tDocBinaryInfo.RFID_RAW_DATA), "Property is required for class TDocBinaryInfo."); - - if (tDocBinaryInfo.RFID_BINARY_DATAOption.IsSet) - { - writer.WritePropertyName("RFID_BINARY_DATA"); - JsonSerializer.Serialize(writer, tDocBinaryInfo.RFID_BINARY_DATA, jsonSerializerOptions); - } - if (tDocBinaryInfo.RFID_RAW_DATAOption.IsSet) - { - writer.WritePropertyName("RFID_RAW_DATA"); - JsonSerializer.Serialize(writer, tDocBinaryInfo.RFID_RAW_DATA, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs index 0ba7b12..583e448 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfoItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TDocBinaryInfoItem /// + [DataContract(Name = "TDocBinaryInfoItem")] public partial class TDocBinaryInfoItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// tDocBinaryInfo - [JsonConstructor] - public TDocBinaryInfoItem(TDocBinaryInfo tDocBinaryInfo) + [JsonConstructorAttribute] + protected TDocBinaryInfoItem() { } + /// + /// Initializes a new instance of the class. + /// + /// tDocBinaryInfo (required). + public TDocBinaryInfoItem(TDocBinaryInfo tDocBinaryInfo = default(TDocBinaryInfo)) { - TDocBinaryInfo = tDocBinaryInfo; - OnCreated(); + // to ensure "tDocBinaryInfo" is required (not null) + if (tDocBinaryInfo == null) + { + throw new ArgumentNullException("tDocBinaryInfo is a required property for TDocBinaryInfoItem and cannot be null"); + } + this.TDocBinaryInfo = tDocBinaryInfo; } - partial void OnCreated(); - /// /// Gets or Sets TDocBinaryInfo /// - [JsonPropertyName("TDocBinaryInfo")] + [DataMember(Name = "TDocBinaryInfo", IsRequired = true, EmitDefaultValue = true)] public TDocBinaryInfo TDocBinaryInfo { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TDocBinaryInfoItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TDocBinaryInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option tDocBinaryInfo = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "TDocBinaryInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - tDocBinaryInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!tDocBinaryInfo.IsSet) - throw new ArgumentException("Property is required for class TDocBinaryInfoItem.", nameof(tDocBinaryInfo)); - - if (tDocBinaryInfo.IsSet && tDocBinaryInfo.Value == null) - throw new ArgumentNullException(nameof(tDocBinaryInfo), "Property is not nullable for class TDocBinaryInfoItem."); - - return new TDocBinaryInfoItem(tDocBinaryInfo.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TDocBinaryInfoItem tDocBinaryInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, tDocBinaryInfoItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TDocBinaryInfoItem tDocBinaryInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - if (tDocBinaryInfoItem.TDocBinaryInfo == null) - throw new ArgumentNullException(nameof(tDocBinaryInfoItem.TDocBinaryInfo), "Property is required for class TDocBinaryInfoItem."); - - writer.WritePropertyName("TDocBinaryInfo"); - JsonSerializer.Serialize(writer, tDocBinaryInfoItem.TDocBinaryInfo, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs index 4b5d25c..ffbb0f6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TOriginalRFIDGraphicsInfo /// + [DataContract(Name = "TOriginalRFIDGraphicsInfo")] public partial class TOriginalRFIDGraphicsInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// rFIDORIGINALGRAPHDATA - [JsonConstructor] - public TOriginalRFIDGraphicsInfo(List rFIDORIGINALGRAPHDATA) + [JsonConstructorAttribute] + protected TOriginalRFIDGraphicsInfo() { } + /// + /// Initializes a new instance of the class. + /// + /// rFIDORIGINALGRAPHDATA (required). + public TOriginalRFIDGraphicsInfo(List rFIDORIGINALGRAPHDATA = default(List)) { - RFID_ORIGINAL_GRAPH_DATA = rFIDORIGINALGRAPHDATA; - OnCreated(); + // to ensure "rFIDORIGINALGRAPHDATA" is required (not null) + if (rFIDORIGINALGRAPHDATA == null) + { + throw new ArgumentNullException("rFIDORIGINALGRAPHDATA is a required property for TOriginalRFIDGraphicsInfo and cannot be null"); + } + this.RFID_ORIGINAL_GRAPH_DATA = rFIDORIGINALGRAPHDATA; } - partial void OnCreated(); - /// /// Gets or Sets RFID_ORIGINAL_GRAPH_DATA /// - [JsonPropertyName("RFID_ORIGINAL_GRAPH_DATA")] + [DataMember(Name = "RFID_ORIGINAL_GRAPH_DATA", IsRequired = true, EmitDefaultValue = true)] public List RFID_ORIGINAL_GRAPH_DATA { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TOriginalRFIDGraphicsInfoJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TOriginalRFIDGraphicsInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option?> rFIDORIGINALGRAPHDATA = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "RFID_ORIGINAL_GRAPH_DATA": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rFIDORIGINALGRAPHDATA = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!rFIDORIGINALGRAPHDATA.IsSet) - throw new ArgumentException("Property is required for class TOriginalRFIDGraphicsInfo.", nameof(rFIDORIGINALGRAPHDATA)); - - if (rFIDORIGINALGRAPHDATA.IsSet && rFIDORIGINALGRAPHDATA.Value == null) - throw new ArgumentNullException(nameof(rFIDORIGINALGRAPHDATA), "Property is not nullable for class TOriginalRFIDGraphicsInfo."); - - return new TOriginalRFIDGraphicsInfo(rFIDORIGINALGRAPHDATA.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, tOriginalRFIDGraphicsInfo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo, JsonSerializerOptions jsonSerializerOptions) - { - if (tOriginalRFIDGraphicsInfo.RFID_ORIGINAL_GRAPH_DATA == null) - throw new ArgumentNullException(nameof(tOriginalRFIDGraphicsInfo.RFID_ORIGINAL_GRAPH_DATA), "Property is required for class TOriginalRFIDGraphicsInfo."); - - writer.WritePropertyName("RFID_ORIGINAL_GRAPH_DATA"); - JsonSerializer.Serialize(writer, tOriginalRFIDGraphicsInfo.RFID_ORIGINAL_GRAPH_DATA, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs index 1e3cfca..d86c6fd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TOriginalRFIDGraphicsInfoItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TOriginalRFIDGraphicsInfoItem /// + [DataContract(Name = "TOriginalRFIDGraphicsInfoItem")] public partial class TOriginalRFIDGraphicsInfoItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// tOriginalRFIDGraphicsInfo - [JsonConstructor] - public TOriginalRFIDGraphicsInfoItem(TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo) + [JsonConstructorAttribute] + protected TOriginalRFIDGraphicsInfoItem() { } + /// + /// Initializes a new instance of the class. + /// + /// tOriginalRFIDGraphicsInfo (required). + public TOriginalRFIDGraphicsInfoItem(TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo = default(TOriginalRFIDGraphicsInfo)) { - TOriginalRFIDGraphicsInfo = tOriginalRFIDGraphicsInfo; - OnCreated(); + // to ensure "tOriginalRFIDGraphicsInfo" is required (not null) + if (tOriginalRFIDGraphicsInfo == null) + { + throw new ArgumentNullException("tOriginalRFIDGraphicsInfo is a required property for TOriginalRFIDGraphicsInfoItem and cannot be null"); + } + this.TOriginalRFIDGraphicsInfo = tOriginalRFIDGraphicsInfo; } - partial void OnCreated(); - /// /// Gets or Sets TOriginalRFIDGraphicsInfo /// - [JsonPropertyName("TOriginalRFIDGraphicsInfo")] + [DataMember(Name = "TOriginalRFIDGraphicsInfo", IsRequired = true, EmitDefaultValue = true)] public TOriginalRFIDGraphicsInfo TOriginalRFIDGraphicsInfo { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TOriginalRFIDGraphicsInfoItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TOriginalRFIDGraphicsInfoItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option tOriginalRFIDGraphicsInfo = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "TOriginalRFIDGraphicsInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - tOriginalRFIDGraphicsInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!tOriginalRFIDGraphicsInfo.IsSet) - throw new ArgumentException("Property is required for class TOriginalRFIDGraphicsInfoItem.", nameof(tOriginalRFIDGraphicsInfo)); - - if (tOriginalRFIDGraphicsInfo.IsSet && tOriginalRFIDGraphicsInfo.Value == null) - throw new ArgumentNullException(nameof(tOriginalRFIDGraphicsInfo), "Property is not nullable for class TOriginalRFIDGraphicsInfoItem."); - - return new TOriginalRFIDGraphicsInfoItem(tOriginalRFIDGraphicsInfo.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TOriginalRFIDGraphicsInfoItem tOriginalRFIDGraphicsInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, tOriginalRFIDGraphicsInfoItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TOriginalRFIDGraphicsInfoItem tOriginalRFIDGraphicsInfoItem, JsonSerializerOptions jsonSerializerOptions) - { - if (tOriginalRFIDGraphicsInfoItem.TOriginalRFIDGraphicsInfo == null) - throw new ArgumentNullException(nameof(tOriginalRFIDGraphicsInfoItem.TOriginalRFIDGraphicsInfo), "Property is required for class TOriginalRFIDGraphicsInfoItem."); - - writer.WritePropertyName("TOriginalRFIDGraphicsInfo"); - JsonSerializer.Serialize(writer, tOriginalRFIDGraphicsInfoItem.TOriginalRFIDGraphicsInfo, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Text.cs b/src/Regula.DocumentReader.WebClient/Model/Text.cs index eac2aef..9d12009 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Text.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Text.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,78 +14,98 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Contains all document text fields data with validity and cross-source compare checks /// + [DataContract(Name = "Text")] public partial class Text : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// status - /// validityStatus - /// comparisonStatus - /// Date format - /// fieldList - /// availableSourceList - [JsonConstructor] - public Text(CheckResult status, CheckResult validityStatus, CheckResult comparisonStatus, string dateFormat, List fieldList, List availableSourceList) - { - Status = status; - ValidityStatus = validityStatus; - ComparisonStatus = comparisonStatus; - DateFormat = dateFormat; - FieldList = fieldList; - AvailableSourceList = availableSourceList; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Status /// - [JsonPropertyName("status")] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] public CheckResult Status { get; set; } /// /// Gets or Sets ValidityStatus /// - [JsonPropertyName("validityStatus")] + [DataMember(Name = "validityStatus", IsRequired = true, EmitDefaultValue = true)] public CheckResult ValidityStatus { get; set; } /// /// Gets or Sets ComparisonStatus /// - [JsonPropertyName("comparisonStatus")] + [DataMember(Name = "comparisonStatus", IsRequired = true, EmitDefaultValue = true)] public CheckResult ComparisonStatus { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected Text() { } + /// + /// Initializes a new instance of the class. + /// + /// status (required). + /// validityStatus (required). + /// comparisonStatus (required). + /// Date format (required). + /// fieldList (required). + /// availableSourceList (required). + public Text(CheckResult status = default(CheckResult), CheckResult validityStatus = default(CheckResult), CheckResult comparisonStatus = default(CheckResult), string dateFormat = default(string), List fieldList = default(List), List availableSourceList = default(List)) + { + this.Status = status; + this.ValidityStatus = validityStatus; + this.ComparisonStatus = comparisonStatus; + // to ensure "dateFormat" is required (not null) + if (dateFormat == null) + { + throw new ArgumentNullException("dateFormat is a required property for Text and cannot be null"); + } + this.DateFormat = dateFormat; + // to ensure "fieldList" is required (not null) + if (fieldList == null) + { + throw new ArgumentNullException("fieldList is a required property for Text and cannot be null"); + } + this.FieldList = fieldList; + // to ensure "availableSourceList" is required (not null) + if (availableSourceList == null) + { + throw new ArgumentNullException("availableSourceList is a required property for Text and cannot be null"); + } + this.AvailableSourceList = availableSourceList; + } /// /// Date format /// /// Date format - [JsonPropertyName("dateFormat")] + [DataMember(Name = "dateFormat", IsRequired = true, EmitDefaultValue = true)] public string DateFormat { get; set; } /// /// Gets or Sets FieldList /// - [JsonPropertyName("fieldList")] + [DataMember(Name = "fieldList", IsRequired = true, EmitDefaultValue = true)] public List FieldList { get; set; } /// /// Gets or Sets AvailableSourceList /// - [JsonPropertyName("availableSourceList")] + [DataMember(Name = "availableSourceList", IsRequired = true, EmitDefaultValue = true)] public List AvailableSourceList { get; set; } /// @@ -108,6 +126,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -119,169 +146,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TextJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override Text Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option status = default; - Option validityStatus = default; - Option comparisonStatus = default; - Option dateFormat = default; - Option?> fieldList = default; - Option?> availableSourceList = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "status": - string? statusRawValue = utf8JsonReader.GetString(); - if (statusRawValue != null) - status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); - break; - case "validityStatus": - string? validityStatusRawValue = utf8JsonReader.GetString(); - if (validityStatusRawValue != null) - validityStatus = new Option(CheckResultValueConverter.FromStringOrDefault(validityStatusRawValue)); - break; - case "comparisonStatus": - string? comparisonStatusRawValue = utf8JsonReader.GetString(); - if (comparisonStatusRawValue != null) - comparisonStatus = new Option(CheckResultValueConverter.FromStringOrDefault(comparisonStatusRawValue)); - break; - case "dateFormat": - dateFormat = new Option(utf8JsonReader.GetString()!); - break; - case "fieldList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "availableSourceList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - availableSourceList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!status.IsSet) - throw new ArgumentException("Property is required for class Text.", nameof(status)); - - if (!validityStatus.IsSet) - throw new ArgumentException("Property is required for class Text.", nameof(validityStatus)); - - if (!comparisonStatus.IsSet) - throw new ArgumentException("Property is required for class Text.", nameof(comparisonStatus)); - - if (!dateFormat.IsSet) - throw new ArgumentException("Property is required for class Text.", nameof(dateFormat)); - - if (!fieldList.IsSet) - throw new ArgumentException("Property is required for class Text.", nameof(fieldList)); - - if (!availableSourceList.IsSet) - throw new ArgumentException("Property is required for class Text.", nameof(availableSourceList)); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class Text."); - - if (validityStatus.IsSet && validityStatus.Value == null) - throw new ArgumentNullException(nameof(validityStatus), "Property is not nullable for class Text."); - - if (comparisonStatus.IsSet && comparisonStatus.Value == null) - throw new ArgumentNullException(nameof(comparisonStatus), "Property is not nullable for class Text."); - - if (dateFormat.IsSet && dateFormat.Value == null) - throw new ArgumentNullException(nameof(dateFormat), "Property is not nullable for class Text."); - - if (fieldList.IsSet && fieldList.Value == null) - throw new ArgumentNullException(nameof(fieldList), "Property is not nullable for class Text."); - - if (availableSourceList.IsSet && availableSourceList.Value == null) - throw new ArgumentNullException(nameof(availableSourceList), "Property is not nullable for class Text."); - - return new Text(status.Value!.Value!, validityStatus.Value!.Value!, comparisonStatus.Value!.Value!, dateFormat.Value!, fieldList.Value!, availableSourceList.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Text text, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, text, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, Text text, JsonSerializerOptions jsonSerializerOptions) - { - if (text.DateFormat == null) - throw new ArgumentNullException(nameof(text.DateFormat), "Property is required for class Text."); - - if (text.FieldList == null) - throw new ArgumentNullException(nameof(text.FieldList), "Property is required for class Text."); - - if (text.AvailableSourceList == null) - throw new ArgumentNullException(nameof(text.AvailableSourceList), "Property is required for class Text."); - - var statusRawValue = CheckResultValueConverter.ToJsonValue(text.Status); - writer.WriteNumber("status", statusRawValue); - - var validityStatusRawValue = CheckResultValueConverter.ToJsonValue(text.ValidityStatus); - writer.WriteNumber("validityStatus", validityStatusRawValue); - - var comparisonStatusRawValue = CheckResultValueConverter.ToJsonValue(text.ComparisonStatus); - writer.WriteNumber("comparisonStatus", comparisonStatusRawValue); - - writer.WriteString("dateFormat", text.DateFormat); - - writer.WritePropertyName("fieldList"); - JsonSerializer.Serialize(writer, text.FieldList, jsonSerializerOptions); - writer.WritePropertyName("availableSourceList"); - JsonSerializer.Serialize(writer, text.AvailableSourceList, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs index 33f7046..6c54b3c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,62 +14,60 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TextAvailableSource /// + [DataContract(Name = "TextAvailableSource")] public partial class TextAvailableSource : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// source - /// validityStatus - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0) - [JsonConstructor] - public TextAvailableSource(Source source, CheckResult validityStatus, Option containerType = default) - { - Source = source; - ValidityStatus = validityStatus; - ContainerTypeOption = containerType; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Source /// - [JsonPropertyName("source")] + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)] public Source Source { get; set; } /// /// Gets or Sets ValidityStatus /// - [JsonPropertyName("validityStatus")] + [DataMember(Name = "validityStatus", IsRequired = true, EmitDefaultValue = true)] public CheckResult ValidityStatus { get; set; } - /// - /// Used to track the state of ContainerType + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TextAvailableSource() { } + /// + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ContainerTypeOption { get; private set; } + /// source (required). + /// validityStatus (required). + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0). + public TextAvailableSource(Source source = default(Source), CheckResult validityStatus = default(CheckResult), int containerType = 0) + { + this.Source = source; + this.ValidityStatus = validityStatus; + this.ContainerType = containerType; + } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [JsonPropertyName("containerType")] - public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new(value); } } + [DataMember(Name = "containerType", EmitDefaultValue = false)] + public int ContainerType { get; set; } /// /// Returns the string presentation of the object @@ -88,6 +84,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -99,117 +104,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TextAvailableSourceJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TextAvailableSource Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option source = default; - Option validityStatus = default; - Option containerType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "source": - string? sourceRawValue = utf8JsonReader.GetString(); - if (sourceRawValue != null) - source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); - break; - case "validityStatus": - string? validityStatusRawValue = utf8JsonReader.GetString(); - if (validityStatusRawValue != null) - validityStatus = new Option(CheckResultValueConverter.FromStringOrDefault(validityStatusRawValue)); - break; - case "containerType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - containerType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!source.IsSet) - throw new ArgumentException("Property is required for class TextAvailableSource.", nameof(source)); - - if (!validityStatus.IsSet) - throw new ArgumentException("Property is required for class TextAvailableSource.", nameof(validityStatus)); - - if (source.IsSet && source.Value == null) - throw new ArgumentNullException(nameof(source), "Property is not nullable for class TextAvailableSource."); - - if (validityStatus.IsSet && validityStatus.Value == null) - throw new ArgumentNullException(nameof(validityStatus), "Property is not nullable for class TextAvailableSource."); - - if (containerType.IsSet && containerType.Value == null) - throw new ArgumentNullException(nameof(containerType), "Property is not nullable for class TextAvailableSource."); - - return new TextAvailableSource(source.Value!.Value!, validityStatus.Value!.Value!, containerType); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextAvailableSource textAvailableSource, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, textAvailableSource, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TextAvailableSource textAvailableSource, JsonSerializerOptions jsonSerializerOptions) - { - var sourceRawValue = SourceValueConverter.ToJsonValue(textAvailableSource.Source); - writer.WriteString("source", sourceRawValue); - - var validityStatusRawValue = CheckResultValueConverter.ToJsonValue(textAvailableSource.ValidityStatus); - writer.WriteNumber("validityStatus", validityStatusRawValue); - - if (textAvailableSource.ContainerTypeOption.IsSet) - writer.WriteNumber("containerType", textAvailableSource.ContainerTypeOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs index c6bf688..b424e33 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Text fields extracted from one document source. Contains results of specific source for each provided page. /// + [DataContract(Name = "TextDataResult")] public partial class TextDataResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// docVisualExtendedInfo - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public TextDataResult(DocVisualExtendedInfo docVisualExtendedInfo, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected TextDataResult() { } + /// + /// Initializes a new instance of the class. + /// + /// docVisualExtendedInfo (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public TextDataResult(DocVisualExtendedInfo docVisualExtendedInfo = default(DocVisualExtendedInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - DocVisualExtendedInfo = docVisualExtendedInfo; - OnCreated(); + // to ensure "docVisualExtendedInfo" is required (not null) + if (docVisualExtendedInfo == null) + { + throw new ArgumentNullException("docVisualExtendedInfo is a required property for TextDataResult and cannot be null"); + } + this.DocVisualExtendedInfo = docVisualExtendedInfo; } - partial void OnCreated(); - /// /// Gets or Sets DocVisualExtendedInfo /// - [JsonPropertyName("DocVisualExtendedInfo")] + [DataMember(Name = "DocVisualExtendedInfo", IsRequired = true, EmitDefaultValue = true)] public DocVisualExtendedInfo DocVisualExtendedInfo { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TextDataResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" DocVisualExtendedInfo: ").Append(DocVisualExtendedInfo).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class TextDataResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override TextDataResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option docVisualExtendedInfo = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "DocVisualExtendedInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - docVisualExtendedInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!docVisualExtendedInfo.IsSet) - throw new ArgumentException("Property is required for class TextDataResult.", nameof(docVisualExtendedInfo)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class TextDataResult.", nameof(resultType)); - - if (docVisualExtendedInfo.IsSet && docVisualExtendedInfo.Value == null) - throw new ArgumentNullException(nameof(docVisualExtendedInfo), "Property is not nullable for class TextDataResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class TextDataResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class TextDataResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class TextDataResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class TextDataResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class TextDataResult."); - - return new TextDataResult(docVisualExtendedInfo.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextDataResult textDataResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, textDataResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TextDataResult textDataResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (textDataResult.DocVisualExtendedInfo == null) - throw new ArgumentNullException(nameof(textDataResult.DocVisualExtendedInfo), "Property is required for class TextDataResult."); - - writer.WritePropertyName("DocVisualExtendedInfo"); - JsonSerializer.Serialize(writer, textDataResult.DocVisualExtendedInfo, jsonSerializerOptions); - if (textDataResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", textDataResult.BufLengthOption.Value!.Value); - - if (textDataResult.LightOption.IsSet) - writer.WriteNumber("light", textDataResult.LightOption.Value!.Value); - - if (textDataResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", textDataResult.ListIdxOption.Value!.Value); - - if (textDataResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", textDataResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", textDataResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextField.cs b/src/Regula.DocumentReader.WebClient/Model/TextField.cs index a013eb5..483bfcc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextField.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,130 +14,153 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TextField /// + [DataContract(Name = "TextField")] public partial class TextField : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// fieldType - /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. - /// lcid - /// status - /// validityStatus - /// comparisonStatus - /// The most confidence value, selected from valueList - /// valueList - /// Validity of all field values for given source. If there are two values on different pages for one field-source pair, then validity also will include logical match checking. If such values do not match, validity will return error. - /// comparisonList - /// LCID name - [JsonConstructor] - public TextField(TextFieldType fieldType, string fieldName, LCID lcid, CheckResult status, CheckResult validityStatus, CheckResult comparisonStatus, string value, List valueList, List validityList, List comparisonList, Option lcidName = default) - { - FieldType = fieldType; - FieldName = fieldName; - Lcid = lcid; - Status = status; - ValidityStatus = validityStatus; - ComparisonStatus = comparisonStatus; - Value = value; - ValueList = valueList; - ValidityList = validityList; - ComparisonList = comparisonList; - LcidNameOption = lcidName; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets FieldType /// - [JsonPropertyName("fieldType")] + [DataMember(Name = "fieldType", IsRequired = true, EmitDefaultValue = true)] public TextFieldType FieldType { get; set; } /// /// Gets or Sets Lcid /// - [JsonPropertyName("lcid")] + [DataMember(Name = "lcid", IsRequired = true, EmitDefaultValue = true)] public LCID Lcid { get; set; } /// /// Gets or Sets Status /// - [JsonPropertyName("status")] + [DataMember(Name = "status", IsRequired = true, EmitDefaultValue = true)] public CheckResult Status { get; set; } /// /// Gets or Sets ValidityStatus /// - [JsonPropertyName("validityStatus")] + [DataMember(Name = "validityStatus", IsRequired = true, EmitDefaultValue = true)] public CheckResult ValidityStatus { get; set; } /// /// Gets or Sets ComparisonStatus /// - [JsonPropertyName("comparisonStatus")] + [DataMember(Name = "comparisonStatus", IsRequired = true, EmitDefaultValue = true)] public CheckResult ComparisonStatus { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected TextField() { } + /// + /// Initializes a new instance of the class. + /// + /// fieldType (required). + /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. (required). + /// lcid (required). + /// LCID name. + /// status (required). + /// validityStatus (required). + /// comparisonStatus (required). + /// The most confidence value, selected from valueList (required). + /// valueList (required). + /// Validity of all field values for given source. If there are two values on different pages for one field-source pair, then validity also will include logical match checking. If such values do not match, validity will return error. (required). + /// comparisonList (required). + public TextField(TextFieldType fieldType = default(TextFieldType), string fieldName = default(string), LCID lcid = default(LCID), string lcidName = default(string), CheckResult status = default(CheckResult), CheckResult validityStatus = default(CheckResult), CheckResult comparisonStatus = default(CheckResult), string value = default(string), List valueList = default(List), List validityList = default(List), List comparisonList = default(List)) + { + this.FieldType = fieldType; + // to ensure "fieldName" is required (not null) + if (fieldName == null) + { + throw new ArgumentNullException("fieldName is a required property for TextField and cannot be null"); + } + this.FieldName = fieldName; + this.Lcid = lcid; + this.Status = status; + this.ValidityStatus = validityStatus; + this.ComparisonStatus = comparisonStatus; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for TextField and cannot be null"); + } + this.Value = value; + // to ensure "valueList" is required (not null) + if (valueList == null) + { + throw new ArgumentNullException("valueList is a required property for TextField and cannot be null"); + } + this.ValueList = valueList; + // to ensure "validityList" is required (not null) + if (validityList == null) + { + throw new ArgumentNullException("validityList is a required property for TextField and cannot be null"); + } + this.ValidityList = validityList; + // to ensure "comparisonList" is required (not null) + if (comparisonList == null) + { + throw new ArgumentNullException("comparisonList is a required property for TextField and cannot be null"); + } + this.ComparisonList = comparisonList; + this.LcidName = lcidName; + } /// /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. /// /// Field name. Only use to search values for fields with fieldType=50(other). In general, use fieldType for lookup. - [JsonPropertyName("fieldName")] + [DataMember(Name = "fieldName", IsRequired = true, EmitDefaultValue = true)] public string FieldName { get; set; } + /// + /// LCID name + /// + /// LCID name + [DataMember(Name = "lcidName", EmitDefaultValue = false)] + public string LcidName { get; set; } + /// /// The most confidence value, selected from valueList /// /// The most confidence value, selected from valueList - [JsonPropertyName("value")] + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] public string Value { get; set; } /// /// Gets or Sets ValueList /// - [JsonPropertyName("valueList")] + [DataMember(Name = "valueList", IsRequired = true, EmitDefaultValue = true)] public List ValueList { get; set; } /// /// Validity of all field values for given source. If there are two values on different pages for one field-source pair, then validity also will include logical match checking. If such values do not match, validity will return error. /// /// Validity of all field values for given source. If there are two values on different pages for one field-source pair, then validity also will include logical match checking. If such values do not match, validity will return error. - [JsonPropertyName("validityList")] + [DataMember(Name = "validityList", IsRequired = true, EmitDefaultValue = true)] public List ValidityList { get; set; } /// /// Gets or Sets ComparisonList /// - [JsonPropertyName("comparisonList")] + [DataMember(Name = "comparisonList", IsRequired = true, EmitDefaultValue = true)] public List ComparisonList { get; set; } - /// - /// Used to track the state of LcidName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LcidNameOption { get; private set; } - - /// - /// LCID name - /// - /// LCID name - [JsonPropertyName("lcidName")] - public string? LcidName { get { return this.LcidNameOption; } set { this.LcidNameOption = new(value); } } - /// /// Returns the string presentation of the object /// @@ -151,6 +172,7 @@ public override string ToString() sb.Append(" FieldType: ").Append(FieldType).Append("\n"); sb.Append(" FieldName: ").Append(FieldName).Append("\n"); sb.Append(" Lcid: ").Append(Lcid).Append("\n"); + sb.Append(" LcidName: ").Append(LcidName).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" ValidityStatus: ").Append(ValidityStatus).Append("\n"); sb.Append(" ComparisonStatus: ").Append(ComparisonStatus).Append("\n"); @@ -158,11 +180,19 @@ public override string ToString() sb.Append(" ValueList: ").Append(ValueList).Append("\n"); sb.Append(" ValidityList: ").Append(ValidityList).Append("\n"); sb.Append(" ComparisonList: ").Append(ComparisonList).Append("\n"); - sb.Append(" LcidName: ").Append(LcidName).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -174,242 +204,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TextFieldJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TextField Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldType = default; - Option fieldName = default; - Option lcid = default; - Option status = default; - Option validityStatus = default; - Option comparisonStatus = default; - Option value = default; - Option?> valueList = default; - Option?> validityList = default; - Option?> comparisonList = default; - Option lcidName = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "fieldType": - string? fieldTypeRawValue = utf8JsonReader.GetString(); - if (fieldTypeRawValue != null) - fieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(fieldTypeRawValue)); - break; - case "fieldName": - fieldName = new Option(utf8JsonReader.GetString()!); - break; - case "lcid": - string? lcidRawValue = utf8JsonReader.GetString(); - if (lcidRawValue != null) - lcid = new Option(LCIDValueConverter.FromStringOrDefault(lcidRawValue)); - break; - case "status": - string? statusRawValue = utf8JsonReader.GetString(); - if (statusRawValue != null) - status = new Option(CheckResultValueConverter.FromStringOrDefault(statusRawValue)); - break; - case "validityStatus": - string? validityStatusRawValue = utf8JsonReader.GetString(); - if (validityStatusRawValue != null) - validityStatus = new Option(CheckResultValueConverter.FromStringOrDefault(validityStatusRawValue)); - break; - case "comparisonStatus": - string? comparisonStatusRawValue = utf8JsonReader.GetString(); - if (comparisonStatusRawValue != null) - comparisonStatus = new Option(CheckResultValueConverter.FromStringOrDefault(comparisonStatusRawValue)); - break; - case "value": - value = new Option(utf8JsonReader.GetString()!); - break; - case "valueList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - valueList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "validityList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - validityList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "comparisonList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - comparisonList = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "lcidName": - lcidName = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(fieldType)); - - if (!fieldName.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(fieldName)); - - if (!lcid.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(lcid)); - - if (!status.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(status)); - - if (!validityStatus.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(validityStatus)); - - if (!comparisonStatus.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(comparisonStatus)); - - if (!value.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(value)); - - if (!valueList.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(valueList)); - - if (!validityList.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(validityList)); - - if (!comparisonList.IsSet) - throw new ArgumentException("Property is required for class TextField.", nameof(comparisonList)); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class TextField."); - - if (fieldName.IsSet && fieldName.Value == null) - throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class TextField."); - - if (lcid.IsSet && lcid.Value == null) - throw new ArgumentNullException(nameof(lcid), "Property is not nullable for class TextField."); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class TextField."); - - if (validityStatus.IsSet && validityStatus.Value == null) - throw new ArgumentNullException(nameof(validityStatus), "Property is not nullable for class TextField."); - - if (comparisonStatus.IsSet && comparisonStatus.Value == null) - throw new ArgumentNullException(nameof(comparisonStatus), "Property is not nullable for class TextField."); - - if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TextField."); - - if (valueList.IsSet && valueList.Value == null) - throw new ArgumentNullException(nameof(valueList), "Property is not nullable for class TextField."); - - if (validityList.IsSet && validityList.Value == null) - throw new ArgumentNullException(nameof(validityList), "Property is not nullable for class TextField."); - - if (comparisonList.IsSet && comparisonList.Value == null) - throw new ArgumentNullException(nameof(comparisonList), "Property is not nullable for class TextField."); - - if (lcidName.IsSet && lcidName.Value == null) - throw new ArgumentNullException(nameof(lcidName), "Property is not nullable for class TextField."); - - return new TextField(fieldType.Value!.Value!, fieldName.Value!, lcid.Value!.Value!, status.Value!.Value!, validityStatus.Value!.Value!, comparisonStatus.Value!.Value!, value.Value!, valueList.Value!, validityList.Value!, comparisonList.Value!, lcidName); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextField textField, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, textField, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TextField textField, JsonSerializerOptions jsonSerializerOptions) - { - if (textField.FieldName == null) - throw new ArgumentNullException(nameof(textField.FieldName), "Property is required for class TextField."); - - if (textField.Value == null) - throw new ArgumentNullException(nameof(textField.Value), "Property is required for class TextField."); - - if (textField.ValueList == null) - throw new ArgumentNullException(nameof(textField.ValueList), "Property is required for class TextField."); - - if (textField.ValidityList == null) - throw new ArgumentNullException(nameof(textField.ValidityList), "Property is required for class TextField."); - - if (textField.ComparisonList == null) - throw new ArgumentNullException(nameof(textField.ComparisonList), "Property is required for class TextField."); - - if (textField.LcidNameOption.IsSet && textField.LcidName == null) - throw new ArgumentNullException(nameof(textField.LcidName), "Property is required for class TextField."); - - var fieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(textField.FieldType); - writer.WriteNumber("fieldType", fieldTypeRawValue); - - writer.WriteString("fieldName", textField.FieldName); - - var lcidRawValue = LCIDValueConverter.ToJsonValue(textField.Lcid); - writer.WriteNumber("lcid", lcidRawValue); - - var statusRawValue = CheckResultValueConverter.ToJsonValue(textField.Status); - writer.WriteNumber("status", statusRawValue); - - var validityStatusRawValue = CheckResultValueConverter.ToJsonValue(textField.ValidityStatus); - writer.WriteNumber("validityStatus", validityStatusRawValue); - - var comparisonStatusRawValue = CheckResultValueConverter.ToJsonValue(textField.ComparisonStatus); - writer.WriteNumber("comparisonStatus", comparisonStatusRawValue); - - writer.WriteString("value", textField.Value); - - writer.WritePropertyName("valueList"); - JsonSerializer.Serialize(writer, textField.ValueList, jsonSerializerOptions); - writer.WritePropertyName("validityList"); - JsonSerializer.Serialize(writer, textField.ValidityList, jsonSerializerOptions); - writer.WritePropertyName("comparisonList"); - JsonSerializer.Serialize(writer, textField.ComparisonList, jsonSerializerOptions); - if (textField.LcidNameOption.IsSet) - writer.WriteString("lcidName", textField.LcidName); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs index 16a96f3..10397b4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -3251,3981 +3252,4 @@ public enum TextFieldType AIRLINE_CODE = 694 } - /// - /// Converts to and from the JSON value - /// - public static class TextFieldTypeValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static TextFieldType FromString(string value) - { - if (value.Equals((0).ToString())) - return TextFieldType.DOCUMENT_CLASS_CODE; - - if (value.Equals((1).ToString())) - return TextFieldType.ISSUING_STATE_CODE; - - if (value.Equals((2).ToString())) - return TextFieldType.DOCUMENT_NUMBER; - - if (value.Equals((3).ToString())) - return TextFieldType.DATE_OF_EXPIRY; - - if (value.Equals((4).ToString())) - return TextFieldType.DATE_OF_ISSUE; - - if (value.Equals((5).ToString())) - return TextFieldType.DATE_OF_BIRTH; - - if (value.Equals((6).ToString())) - return TextFieldType.PLACE_OF_BIRTH; - - if (value.Equals((7).ToString())) - return TextFieldType.PERSONAL_NUMBER; - - if (value.Equals((8).ToString())) - return TextFieldType.SURNAME; - - if (value.Equals((9).ToString())) - return TextFieldType.GIVEN_NAMES; - - if (value.Equals((10).ToString())) - return TextFieldType.MOTHERS_NAME; - - if (value.Equals((11).ToString())) - return TextFieldType.NATIONALITY; - - if (value.Equals((12).ToString())) - return TextFieldType.SEX; - - if (value.Equals((13).ToString())) - return TextFieldType.HEIGHT; - - if (value.Equals((14).ToString())) - return TextFieldType.WEIGHT; - - if (value.Equals((15).ToString())) - return TextFieldType.EYES_COLOR; - - if (value.Equals((16).ToString())) - return TextFieldType.HAIR_COLOR; - - if (value.Equals((17).ToString())) - return TextFieldType.ADDRESS; - - if (value.Equals((18).ToString())) - return TextFieldType.DONOR; - - if (value.Equals((19).ToString())) - return TextFieldType.SOCIAL_SECURITY_NUMBER; - - if (value.Equals((20).ToString())) - return TextFieldType.DL_CLASS; - - if (value.Equals((21).ToString())) - return TextFieldType.DL_ENDORSED; - - if (value.Equals((22).ToString())) - return TextFieldType.DL_RESTRICTION_CODE; - - if (value.Equals((23).ToString())) - return TextFieldType.DL_UNDER_21_DATE; - - if (value.Equals((24).ToString())) - return TextFieldType.AUTHORITY; - - if (value.Equals((25).ToString())) - return TextFieldType.SURNAME_AND_GIVEN_NAMES; - - if (value.Equals((26).ToString())) - return TextFieldType.NATIONALITY_CODE; - - if (value.Equals((27).ToString())) - return TextFieldType.PASSPORT_NUMBER; - - if (value.Equals((28).ToString())) - return TextFieldType.INVITATION_NUMBER; - - if (value.Equals((29).ToString())) - return TextFieldType.VISA_ID; - - if (value.Equals((30).ToString())) - return TextFieldType.VISA_CLASS; - - if (value.Equals((31).ToString())) - return TextFieldType.VISA_SUBCLASS; - - if (value.Equals((35).ToString())) - return TextFieldType.MRZ_TYPE; - - if (value.Equals((36).ToString())) - return TextFieldType.OPTIONAL_DATA; - - if (value.Equals((37).ToString())) - return TextFieldType.DOCUMENT_CLASS_NAME; - - if (value.Equals((38).ToString())) - return TextFieldType.ISSUING_STATE_NAME; - - if (value.Equals((39).ToString())) - return TextFieldType.PLACE_OF_ISSUE; - - if (value.Equals((40).ToString())) - return TextFieldType.DOCUMENT_NUMBER_CHECKSUM; - - if (value.Equals((41).ToString())) - return TextFieldType.DATE_OF_BIRTH_CHECKSUM; - - if (value.Equals((42).ToString())) - return TextFieldType.DATE_OF_EXPIRY_CHECKSUM; - - if (value.Equals((43).ToString())) - return TextFieldType.PERSONAL_NUMBER_CHECKSUM; - - if (value.Equals((44).ToString())) - return TextFieldType.FINAL_CHECKSUM; - - if (value.Equals((45).ToString())) - return TextFieldType.PASSPORT_NUMBER_CHECKSUM; - - if (value.Equals((46).ToString())) - return TextFieldType.INVITATION_NUMBER_CHECKSUM; - - if (value.Equals((47).ToString())) - return TextFieldType.VISA_ID_CHECKSUM; - - if (value.Equals((48).ToString())) - return TextFieldType.SURNAME_AND_GIVEN_NAMES_CHECKSUM; - - if (value.Equals((49).ToString())) - return TextFieldType.VISA_VALID_UNTIL_CHECKSUM; - - if (value.Equals((50).ToString())) - return TextFieldType.OTHER; - - if (value.Equals((51).ToString())) - return TextFieldType.MRZ_STRINGS; - - if (value.Equals((52).ToString())) - return TextFieldType.NAME_SUFFIX; - - if (value.Equals((53).ToString())) - return TextFieldType.NAME_PREFIX; - - if (value.Equals((54).ToString())) - return TextFieldType.DATE_OF_ISSUE_CHECKSUM; - - if (value.Equals((55).ToString())) - return TextFieldType.DATE_OF_ISSUE_CHECK_DIGIT; - - if (value.Equals((56).ToString())) - return TextFieldType.DOCUMENT_SERIES; - - if (value.Equals((57).ToString())) - return TextFieldType.REG_CERT_REG_NUMBER; - - if (value.Equals((58).ToString())) - return TextFieldType.REG_CERT_CAR_MODEL; - - if (value.Equals((59).ToString())) - return TextFieldType.REG_CERT_CAR_COLOR; - - if (value.Equals((60).ToString())) - return TextFieldType.REG_CERT_BODY_NUMBER; - - if (value.Equals((61).ToString())) - return TextFieldType.REG_CERT_CAR_TYPE; - - if (value.Equals((62).ToString())) - return TextFieldType.REG_CERT_MAX_WEIGHT; - - if (value.Equals((63).ToString())) - return TextFieldType.REG_CERT_WEIGHT; - - if (value.Equals((64).ToString())) - return TextFieldType.ADDRESS_AREA; - - if (value.Equals((65).ToString())) - return TextFieldType.ADDRESS_STATE; - - if (value.Equals((66).ToString())) - return TextFieldType.ADDRESS_BUILDING; - - if (value.Equals((67).ToString())) - return TextFieldType.ADDRESS_HOUSE; - - if (value.Equals((68).ToString())) - return TextFieldType.ADDRESS_FLAT; - - if (value.Equals((69).ToString())) - return TextFieldType.PLACE_OF_REGISTRATION; - - if (value.Equals((70).ToString())) - return TextFieldType.DATE_OF_REGISTRATION; - - if (value.Equals((71).ToString())) - return TextFieldType.RESIDENT_FROM; - - if (value.Equals((72).ToString())) - return TextFieldType.RESIDENT_UNTIL; - - if (value.Equals((73).ToString())) - return TextFieldType.AUTHORITY_CODE; - - if (value.Equals((74).ToString())) - return TextFieldType.PLACE_OF_BIRTH_AREA; - - if (value.Equals((75).ToString())) - return TextFieldType.PLACE_OF_BIRTH_STATE_CODE; - - if (value.Equals((76).ToString())) - return TextFieldType.ADDRESS_STREET; - - if (value.Equals((77).ToString())) - return TextFieldType.ADDRESS_CITY; - - if (value.Equals((78).ToString())) - return TextFieldType.ADDRESS_JURISDICTION_CODE; - - if (value.Equals((79).ToString())) - return TextFieldType.ADDRESS_POSTAL_CODE; - - if (value.Equals((80).ToString())) - return TextFieldType.DOCUMENT_NUMBER_CHECK_DIGIT; - - if (value.Equals((81).ToString())) - return TextFieldType.DATE_OF_BIRTH_CHECK_DIGIT; - - if (value.Equals((82).ToString())) - return TextFieldType.DATE_OF_EXPIRY_CHECK_DIGIT; - - if (value.Equals((83).ToString())) - return TextFieldType.PERSONAL_NUMBER_CHECK_DIGIT; - - if (value.Equals((84).ToString())) - return TextFieldType.FINAL_CHECK_DIGIT; - - if (value.Equals((85).ToString())) - return TextFieldType.PASSPORT_NUMBER_CHECK_DIGIT; - - if (value.Equals((86).ToString())) - return TextFieldType.INVITATION_NUMBER_CHECK_DIGIT; - - if (value.Equals((87).ToString())) - return TextFieldType.VISA_ID_CHECK_DIGIT; - - if (value.Equals((88).ToString())) - return TextFieldType.SURNAME_AND_GIVEN_NAMES_CHECK_DIGIT; - - if (value.Equals((89).ToString())) - return TextFieldType.VISA_VALID_UNTIL_CHECK_DIGIT; - - if (value.Equals((90).ToString())) - return TextFieldType.PERMIT_DL_CLASS; - - if (value.Equals((91).ToString())) - return TextFieldType.PERMIT_DATE_OF_EXPIRY; - - if (value.Equals((92).ToString())) - return TextFieldType.PERMIT_IDENTIFIER; - - if (value.Equals((93).ToString())) - return TextFieldType.PERMIT_DATE_OF_ISSUE; - - if (value.Equals((94).ToString())) - return TextFieldType.PERMIT_RESTRICTION_CODE; - - if (value.Equals((95).ToString())) - return TextFieldType.PERMIT_ENDORSED; - - if (value.Equals((96).ToString())) - return TextFieldType.ISSUE_TIMESTAMP; - - if (value.Equals((97).ToString())) - return TextFieldType.NUMBER_OF_DUPLICATES; - - if (value.Equals((98).ToString())) - return TextFieldType.MEDICAL_INDICATOR_CODES; - - if (value.Equals((99).ToString())) - return TextFieldType.NON_RESIDENT_INDICATOR; - - if (value.Equals((100).ToString())) - return TextFieldType.VISA_TYPE; - - if (value.Equals((101).ToString())) - return TextFieldType.VISA_VALID_FROM; - - if (value.Equals((102).ToString())) - return TextFieldType.VISA_VALID_UNTIL; - - if (value.Equals((103).ToString())) - return TextFieldType.DURATION_OF_STAY; - - if (value.Equals((104).ToString())) - return TextFieldType.NUMBER_OF_ENTRIES; - - if (value.Equals((105).ToString())) - return TextFieldType.DAY; - - if (value.Equals((106).ToString())) - return TextFieldType.MONTH; - - if (value.Equals((107).ToString())) - return TextFieldType.YEAR; - - if (value.Equals((108).ToString())) - return TextFieldType.UNIQUE_CUSTOMER_IDENTIFIER; - - if (value.Equals((109).ToString())) - return TextFieldType.COMMERCIAL_VEHICLE_CODES; - - if (value.Equals((110).ToString())) - return TextFieldType.AKA_DATE_OF_BIRTH; - - if (value.Equals((111).ToString())) - return TextFieldType.AKA_SOCIAL_SECURITY_NUMBER; - - if (value.Equals((112).ToString())) - return TextFieldType.AKA_SURNAME; - - if (value.Equals((113).ToString())) - return TextFieldType.AKA_GIVEN_NAMES; - - if (value.Equals((114).ToString())) - return TextFieldType.AKA_NAME_SUFFIX; - - if (value.Equals((115).ToString())) - return TextFieldType.AKA_NAME_PREFIX; - - if (value.Equals((116).ToString())) - return TextFieldType.MAILING_ADDRESS_STREET; - - if (value.Equals((117).ToString())) - return TextFieldType.MAILING_ADDRESS_CITY; - - if (value.Equals((118).ToString())) - return TextFieldType.MAILING_ADDRESS_JURISDICTION_CODE; - - if (value.Equals((119).ToString())) - return TextFieldType.MAILING_ADDRESS_POSTAL_CODE; - - if (value.Equals((120).ToString())) - return TextFieldType.AUDIT_INFORMATION; - - if (value.Equals((121).ToString())) - return TextFieldType.INVENTORY_NUMBER; - - if (value.Equals((122).ToString())) - return TextFieldType.RACE_ETHNICITY; - - if (value.Equals((123).ToString())) - return TextFieldType.JURISDICTION_VEHICLE_CLASS; - - if (value.Equals((124).ToString())) - return TextFieldType.JURISDICTION_ENDORSEMENT_CODE; - - if (value.Equals((125).ToString())) - return TextFieldType.JURISDICTION_RESTRICTION_CODE; - - if (value.Equals((126).ToString())) - return TextFieldType.FAMILY_NAME; - - if (value.Equals((127).ToString())) - return TextFieldType.GIVEN_NAMES_RUS; - - if (value.Equals((128).ToString())) - return TextFieldType.VISA_ID_RUS; - - if (value.Equals((129).ToString())) - return TextFieldType.FATHERS_NAME; - - if (value.Equals((130).ToString())) - return TextFieldType.FATHERS_NAME_RUS; - - if (value.Equals((131).ToString())) - return TextFieldType.SURNAME_AND_GIVEN_NAMES_RUS; - - if (value.Equals((132).ToString())) - return TextFieldType.PLACE_OF_BIRTH_RUS; - - if (value.Equals((133).ToString())) - return TextFieldType.AUTHORITY_RUS; - - if (value.Equals((134).ToString())) - return TextFieldType.ISSUING_STATE_CODE_NUMERIC; - - if (value.Equals((135).ToString())) - return TextFieldType.NATIONALITY_CODE_NUMERIC; - - if (value.Equals((136).ToString())) - return TextFieldType.ENGINE_POWER; - - if (value.Equals((137).ToString())) - return TextFieldType.ENGINE_VOLUME; - - if (value.Equals((138).ToString())) - return TextFieldType.CHASSIS_NUMBER; - - if (value.Equals((139).ToString())) - return TextFieldType.ENGINE_NUMBER; - - if (value.Equals((140).ToString())) - return TextFieldType.ENGINE_MODEL; - - if (value.Equals((141).ToString())) - return TextFieldType.VEHICLE_CATEGORY; - - if (value.Equals((142).ToString())) - return TextFieldType.IDENTITY_CARD_NUMBER; - - if (value.Equals((143).ToString())) - return TextFieldType.CONTROL_NUMBER; - - if (value.Equals((144).ToString())) - return TextFieldType.PARENTS_GIVEN_NAMES; - - if (value.Equals((145).ToString())) - return TextFieldType.SECOND_SURNAME; - - if (value.Equals((146).ToString())) - return TextFieldType.MIDDLE_NAME; - - if (value.Equals((147).ToString())) - return TextFieldType.REG_CERT_VIN; - - if (value.Equals((148).ToString())) - return TextFieldType.REG_CERT_VIN_CHECK_DIGIT; - - if (value.Equals((149).ToString())) - return TextFieldType.REG_CERT_VIN_CHECKSUM; - - if (value.Equals((150).ToString())) - return TextFieldType.LINE_1_CHECK_DIGIT; - - if (value.Equals((151).ToString())) - return TextFieldType.LINE_2_CHECK_DIGIT; - - if (value.Equals((152).ToString())) - return TextFieldType.LINE_3_CHECK_DIGIT; - - if (value.Equals((153).ToString())) - return TextFieldType.LINE_1_CHECKSUM; - - if (value.Equals((154).ToString())) - return TextFieldType.LINE_2_CHECKSUM; - - if (value.Equals((155).ToString())) - return TextFieldType.LINE_3_CHECKSUM; - - if (value.Equals((156).ToString())) - return TextFieldType.REG_CERT_REG_NUMBER_CHECK_DIGIT; - - if (value.Equals((157).ToString())) - return TextFieldType.REG_CERT_REG_NUMBER_CHECKSUM; - - if (value.Equals((158).ToString())) - return TextFieldType.REG_CERT_VEHICLE_ITS_CODE; - - if (value.Equals((159).ToString())) - return TextFieldType.CARD_ACCESS_NUMBER; - - if (value.Equals((160).ToString())) - return TextFieldType.MARITAL_STATUS; - - if (value.Equals((161).ToString())) - return TextFieldType.COMPANY_NAME; - - if (value.Equals((162).ToString())) - return TextFieldType.SPECIAL_NOTES; - - if (value.Equals((163).ToString())) - return TextFieldType.SURNAME_OF_SPOUSE; - - if (value.Equals((164).ToString())) - return TextFieldType.TRACKING_NUMBER; - - if (value.Equals((165).ToString())) - return TextFieldType.BOOKLET_NUMBER; - - if (value.Equals((166).ToString())) - return TextFieldType.CHILDREN; - - if (value.Equals((167).ToString())) - return TextFieldType.COPY; - - if (value.Equals((168).ToString())) - return TextFieldType.SERIAL_NUMBER; - - if (value.Equals((169).ToString())) - return TextFieldType.DOSSIER_NUMBER; - - if (value.Equals((170).ToString())) - return TextFieldType.AKA_SURNAME_AND_GIVEN_NAMES; - - if (value.Equals((171).ToString())) - return TextFieldType.TERRITORIAL_VALIDITY; - - if (value.Equals((172).ToString())) - return TextFieldType.MRZ_STRINGS_WITH_CORRECT_CHECK_SUMS; - - if (value.Equals((173).ToString())) - return TextFieldType.DL_CDL_RESTRICTION_CODE; - - if (value.Equals((174).ToString())) - return TextFieldType.DL_UNDER_18_DATE; - - if (value.Equals((175).ToString())) - return TextFieldType.DL_RECORD_CREATED; - - if (value.Equals((176).ToString())) - return TextFieldType.DL_DUPLICATE_DATE; - - if (value.Equals((177).ToString())) - return TextFieldType.DL_ISSUE_TYPE; - - if (value.Equals((178).ToString())) - return TextFieldType.MILITARY_BOOK_NUMBER; - - if (value.Equals((179).ToString())) - return TextFieldType.DESTINATION; - - if (value.Equals((180).ToString())) - return TextFieldType.BLOOD_GROUP; - - if (value.Equals((181).ToString())) - return TextFieldType.SEQUENCE_NUMBER; - - if (value.Equals((182).ToString())) - return TextFieldType.REG_CERT_BODY_TYPE; - - if (value.Equals((183).ToString())) - return TextFieldType.REG_CERT_CAR_MARK; - - if (value.Equals((184).ToString())) - return TextFieldType.TRANSACTION_NUMBER; - - if (value.Equals((185).ToString())) - return TextFieldType.AGE; - - if (value.Equals((186).ToString())) - return TextFieldType.FOLIO_NUMBER; - - if (value.Equals((187).ToString())) - return TextFieldType.VOTER_KEY; - - if (value.Equals((188).ToString())) - return TextFieldType.ADDRESS_MUNICIPALITY; - - if (value.Equals((189).ToString())) - return TextFieldType.ADDRESS_LOCATION; - - if (value.Equals((190).ToString())) - return TextFieldType.SECTION; - - if (value.Equals((191).ToString())) - return TextFieldType.OCR_NUMBER; - - if (value.Equals((192).ToString())) - return TextFieldType.FEDERAL_ELECTIONS; - - if (value.Equals((193).ToString())) - return TextFieldType.REFERENCE_NUMBER; - - if (value.Equals((194).ToString())) - return TextFieldType.OPTIONAL_DATA_CHECKSUM; - - if (value.Equals((195).ToString())) - return TextFieldType.OPTIONAL_DATA_CHECK_DIGIT; - - if (value.Equals((196).ToString())) - return TextFieldType.VISA_NUMBER; - - if (value.Equals((197).ToString())) - return TextFieldType.VISA_NUMBER_CHECKSUM; - - if (value.Equals((198).ToString())) - return TextFieldType.VISA_NUMBER_CHECK_DIGIT; - - if (value.Equals((199).ToString())) - return TextFieldType.VOTER; - - if (value.Equals((200).ToString())) - return TextFieldType.PREVIOUS_TYPE; - - if (value.Equals((220).ToString())) - return TextFieldType.FIELD_FROM_MRZ; - - if (value.Equals((221).ToString())) - return TextFieldType.CURRENT_DATE; - - if (value.Equals((251).ToString())) - return TextFieldType.STATUS_DATE_OF_EXPIRY; - - if (value.Equals((252).ToString())) - return TextFieldType.BANKNOTE_NUMBER; - - if (value.Equals((253).ToString())) - return TextFieldType.CSC_CODE; - - if (value.Equals((254).ToString())) - return TextFieldType.ARTISTIC_NAME; - - if (value.Equals((255).ToString())) - return TextFieldType.ACADEMIC_TITLE; - - if (value.Equals((256).ToString())) - return TextFieldType.ADDRESS_COUNTRY; - - if (value.Equals((257).ToString())) - return TextFieldType.ADDRESS_ZIP_CODE; - - if (value.Equals((258).ToString())) - return TextFieldType.E_ID_RESIDENCE_PERMIT_1; - - if (value.Equals((259).ToString())) - return TextFieldType.E_ID_RESIDENCE_PERMIT_2; - - if (value.Equals((260).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_STREET; - - if (value.Equals((261).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_CITY; - - if (value.Equals((262).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_STATE; - - if (value.Equals((263).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_COUNTRY; - - if (value.Equals((264).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_ZIP_CODE; - - if (value.Equals((265).ToString())) - return TextFieldType.CDL_CLASS; - - if (value.Equals((266).ToString())) - return TextFieldType.DL_UNDER_19_DATE; - - if (value.Equals((267).ToString())) - return TextFieldType.WEIGHT_POUNDS; - - if (value.Equals((268).ToString())) - return TextFieldType.LIMITED_DURATION_DOCUMENT_INDICATOR; - - if (value.Equals((269).ToString())) - return TextFieldType.ENDORSEMENT_EXPIRATION_DATE; - - if (value.Equals((270).ToString())) - return TextFieldType.REVISION_DATE; - - if (value.Equals((271).ToString())) - return TextFieldType.COMPLIANCE_TYPE; - - if (value.Equals((272).ToString())) - return TextFieldType.FAMILY_NAME_TRUNCATION; - - if (value.Equals((273).ToString())) - return TextFieldType.FIRST_NAME_TRUNCATION; - - if (value.Equals((274).ToString())) - return TextFieldType.MIDDLE_NAME_TRUNCATION; - - if (value.Equals((275).ToString())) - return TextFieldType.EXAM_DATE; - - if (value.Equals((276).ToString())) - return TextFieldType.ORGANIZATION; - - if (value.Equals((277).ToString())) - return TextFieldType.DEPARTMENT; - - if (value.Equals((278).ToString())) - return TextFieldType.PAY_GRADE; - - if (value.Equals((279).ToString())) - return TextFieldType.RANK; - - if (value.Equals((280).ToString())) - return TextFieldType.BENEFITS_NUMBER; - - if (value.Equals((281).ToString())) - return TextFieldType.SPONSOR_SERVICE; - - if (value.Equals((282).ToString())) - return TextFieldType.SPONSOR_STATUS; - - if (value.Equals((283).ToString())) - return TextFieldType.SPONSOR; - - if (value.Equals((284).ToString())) - return TextFieldType.RELATIONSHIP; - - if (value.Equals((285).ToString())) - return TextFieldType.USCIS; - - if (value.Equals((286).ToString())) - return TextFieldType.CATEGORY; - - if (value.Equals((287).ToString())) - return TextFieldType.CONDITIONS; - - if (value.Equals((288).ToString())) - return TextFieldType.IDENTIFIER; - - if (value.Equals((289).ToString())) - return TextFieldType.CONFIGURATION; - - if (value.Equals((290).ToString())) - return TextFieldType.DISCRETIONARY_DATA; - - if (value.Equals((291).ToString())) - return TextFieldType.LINE_1_OPTIONAL_DATA; - - if (value.Equals((292).ToString())) - return TextFieldType.LINE_2_OPTIONAL_DATA; - - if (value.Equals((293).ToString())) - return TextFieldType.LINE_3_OPTIONAL_DATA; - - if (value.Equals((294).ToString())) - return TextFieldType.EQV_CODE; - - if (value.Equals((295).ToString())) - return TextFieldType.ALT_CODE; - - if (value.Equals((296).ToString())) - return TextFieldType.BINARY_CODE; - - if (value.Equals((297).ToString())) - return TextFieldType.PSEUDO_CODE; - - if (value.Equals((298).ToString())) - return TextFieldType.FEE; - - if (value.Equals((299).ToString())) - return TextFieldType.STAMP_NUMBER; - - if (value.Equals((300).ToString())) - return TextFieldType.SBH_SECURITY_OPTIONS; - - if (value.Equals((301).ToString())) - return TextFieldType.SBH_INTEGRITY_OPTIONS; - - if (value.Equals((302).ToString())) - return TextFieldType.DATE_OF_CREATION; - - if (value.Equals((303).ToString())) - return TextFieldType.VALIDITY_PERIOD; - - if (value.Equals((304).ToString())) - return TextFieldType.PATRON_HEADER_VERSION; - - if (value.Equals((305).ToString())) - return TextFieldType.BDB_TYPE; - - if (value.Equals((306).ToString())) - return TextFieldType.BIOMETRIC_TYPE; - - if (value.Equals((307).ToString())) - return TextFieldType.BIOMETRIC_SUBTYPE; - - if (value.Equals((308).ToString())) - return TextFieldType.BIOMETRIC_PRODUCT_ID; - - if (value.Equals((309).ToString())) - return TextFieldType.BIOMETRIC_FORMAT_OWNER; - - if (value.Equals((310).ToString())) - return TextFieldType.BIOMETRIC_FORMAT_TYPE; - - if (value.Equals((311).ToString())) - return TextFieldType.PHONE; - - if (value.Equals((312).ToString())) - return TextFieldType.PROFESSION; - - if (value.Equals((313).ToString())) - return TextFieldType.TITLE; - - if (value.Equals((314).ToString())) - return TextFieldType.PERSONAL_SUMMARY; - - if (value.Equals((315).ToString())) - return TextFieldType.OTHER_VALID_ID; - - if (value.Equals((316).ToString())) - return TextFieldType.CUSTODY_INFO; - - if (value.Equals((317).ToString())) - return TextFieldType.OTHER_NAME; - - if (value.Equals((318).ToString())) - return TextFieldType.OBSERVATIONS; - - if (value.Equals((319).ToString())) - return TextFieldType.TAX; - - if (value.Equals((320).ToString())) - return TextFieldType.DATE_OF_PERSONALIZATION; - - if (value.Equals((321).ToString())) - return TextFieldType.PERSONALIZATION_SN; - - if (value.Equals((322).ToString())) - return TextFieldType.OTHER_PERSON_NAME; - - if (value.Equals((323).ToString())) - return TextFieldType.PERSON_TO_NOTIFY_DATE_OF_RECORD; - - if (value.Equals((324).ToString())) - return TextFieldType.PERSON_TO_NOTIFY_NAME; - - if (value.Equals((325).ToString())) - return TextFieldType.PERSON_TO_NOTIFY_PHONE; - - if (value.Equals((326).ToString())) - return TextFieldType.PERSON_TO_NOTIFY_ADDRESS; - - if (value.Equals((327).ToString())) - return TextFieldType.DS_CERTIFICATE_ISSUER; - - if (value.Equals((328).ToString())) - return TextFieldType.DS_CERTIFICATE_SUBJECT; - - if (value.Equals((329).ToString())) - return TextFieldType.DS_CERTIFICATE_VALID_FROM; - - if (value.Equals((330).ToString())) - return TextFieldType.DS_CERTIFICATE_VALID_TO; - - if (value.Equals((331).ToString())) - return TextFieldType.VRC_DATA_OBJECT_ENTRY; - - if (value.Equals((332).ToString())) - return TextFieldType.TYPE_APPROVAL_NUMBER; - - if (value.Equals((333).ToString())) - return TextFieldType.ADMINISTRATIVE_NUMBER; - - if (value.Equals((334).ToString())) - return TextFieldType.DOCUMENT_DISCRIMINATOR; - - if (value.Equals((335).ToString())) - return TextFieldType.DATA_DISCRIMINATOR; - - if (value.Equals((336).ToString())) - return TextFieldType.ISO_ISSUER_ID_NUMBER; - - if (value.Equals((337).ToString())) - return TextFieldType.DTC_VERSION; - - if (value.Equals((338).ToString())) - return TextFieldType.DTC_ID; - - if (value.Equals((339).ToString())) - return TextFieldType.DTC_DATE_OF_EXPIRY; - - if (value.Equals((340).ToString())) - return TextFieldType.GNIB_NUMBER; - - if (value.Equals((341).ToString())) - return TextFieldType.DEPT_NUMBER; - - if (value.Equals((342).ToString())) - return TextFieldType.TELEX_CODE; - - if (value.Equals((343).ToString())) - return TextFieldType.ALLERGIES; - - if (value.Equals((344).ToString())) - return TextFieldType.SP_CODE; - - if (value.Equals((345).ToString())) - return TextFieldType.COURT_CODE; - - if (value.Equals((346).ToString())) - return TextFieldType.CTY; - - if (value.Equals((347).ToString())) - return TextFieldType.SPONSOR_SSN; - - if (value.Equals((348).ToString())) - return TextFieldType.DOD_NUMBER; - - if (value.Equals((349).ToString())) - return TextFieldType.MC_NOVICE_DATE; - - if (value.Equals((350).ToString())) - return TextFieldType.DUF_NUMBER; - - if (value.Equals((351).ToString())) - return TextFieldType.AGY; - - if (value.Equals((352).ToString())) - return TextFieldType.PNR_CODE; - - if (value.Equals((353).ToString())) - return TextFieldType.FROM_AIRPORT_CODE; - - if (value.Equals((354).ToString())) - return TextFieldType.TO_AIRPORT_CODE; - - if (value.Equals((355).ToString())) - return TextFieldType.FLIGHT_NUMBER; - - if (value.Equals((356).ToString())) - return TextFieldType.DATE_OF_FLIGHT; - - if (value.Equals((357).ToString())) - return TextFieldType.SEAT_NUMBER; - - if (value.Equals((358).ToString())) - return TextFieldType.DATE_OF_ISSUE_BOARDING_PASS; - - if (value.Equals((359).ToString())) - return TextFieldType.CCW_UNTIL; - - if (value.Equals((360).ToString())) - return TextFieldType.REFERENCE_NUMBER_CHECKSUM; - - if (value.Equals((361).ToString())) - return TextFieldType.REFERENCE_NUMBER_CHECK_DIGIT; - - if (value.Equals((362).ToString())) - return TextFieldType.ROOM_NUMBER; - - if (value.Equals((363).ToString())) - return TextFieldType.RELIGION; - - if (value.Equals((364).ToString())) - return TextFieldType.REMAINDER_TERM; - - if (value.Equals((365).ToString())) - return TextFieldType.ELECTRONIC_TICKET_INDICATOR; - - if (value.Equals((366).ToString())) - return TextFieldType.COMPARTMENT_CODE; - - if (value.Equals((367).ToString())) - return TextFieldType.CHECK_IN_SEQUENCE_NUMBER; - - if (value.Equals((368).ToString())) - return TextFieldType.AIRLINE_DESIGNATOR_OF_BOARDING_PASS_ISSUER; - - if (value.Equals((369).ToString())) - return TextFieldType.AIRLINE_NUMERIC_CODE; - - if (value.Equals((370).ToString())) - return TextFieldType.TICKET_NUMBER; - - if (value.Equals((371).ToString())) - return TextFieldType.FREQUENT_FLYER_AIRLINE_DESIGNATOR; - - if (value.Equals((372).ToString())) - return TextFieldType.FREQUENT_FLYER_NUMBER; - - if (value.Equals((373).ToString())) - return TextFieldType.FREE_BAGGAGE_ALLOWANCE; - - if (value.Equals((374).ToString())) - return TextFieldType.PDF417_CODEC; - - if (value.Equals((375).ToString())) - return TextFieldType.IDENTITY_CARD_NUMBER_CHECKSUM; - - if (value.Equals((376).ToString())) - return TextFieldType.IDENTITY_CARD_NUMBER_CHECK_DIGIT; - - if (value.Equals((377).ToString())) - return TextFieldType.VETERAN; - - if (value.Equals((378).ToString())) - return TextFieldType.DL_CLASS_CODE_A1_FROM; - - if (value.Equals((379).ToString())) - return TextFieldType.DL_CLASS_CODE_A1_TO; - - if (value.Equals((380).ToString())) - return TextFieldType.DL_CLASS_CODE_A1_NOTES; - - if (value.Equals((381).ToString())) - return TextFieldType.DL_CLASS_CODE_A_FROM; - - if (value.Equals((382).ToString())) - return TextFieldType.DL_CLASS_CODE_A_TO; - - if (value.Equals((383).ToString())) - return TextFieldType.DL_CLASS_CODE_A_NOTES; - - if (value.Equals((384).ToString())) - return TextFieldType.DL_CLASS_CODE_B_FROM; - - if (value.Equals((385).ToString())) - return TextFieldType.DL_CLASS_CODE_B_TO; - - if (value.Equals((386).ToString())) - return TextFieldType.DL_CLASS_CODE_B_NOTES; - - if (value.Equals((387).ToString())) - return TextFieldType.DL_CLASS_CODE_C1_FROM; - - if (value.Equals((388).ToString())) - return TextFieldType.DL_CLASS_CODE_C1_TO; - - if (value.Equals((389).ToString())) - return TextFieldType.DL_CLASS_CODE_C1_NOTES; - - if (value.Equals((390).ToString())) - return TextFieldType.DL_CLASS_CODE_C_FROM; - - if (value.Equals((391).ToString())) - return TextFieldType.DL_CLASS_CODE_C_TO; - - if (value.Equals((392).ToString())) - return TextFieldType.DL_CLASS_CODE_C_NOTES; - - if (value.Equals((393).ToString())) - return TextFieldType.DL_CLASS_CODE_D1_FROM; - - if (value.Equals((394).ToString())) - return TextFieldType.DL_CLASS_CODE_D1_TO; - - if (value.Equals((395).ToString())) - return TextFieldType.DL_CLASS_CODE_D1_NOTES; - - if (value.Equals((396).ToString())) - return TextFieldType.DL_CLASS_CODE_D_FROM; - - if (value.Equals((397).ToString())) - return TextFieldType.DL_CLASS_CODE_D_TO; - - if (value.Equals((398).ToString())) - return TextFieldType.DL_CLASS_CODE_D_NOTES; - - if (value.Equals((399).ToString())) - return TextFieldType.DL_CLASS_CODE_BE_FROM; - - if (value.Equals((400).ToString())) - return TextFieldType.DL_CLASS_CODE_BE_TO; - - if (value.Equals((401).ToString())) - return TextFieldType.DL_CLASS_CODE_BE_NOTES; - - if (value.Equals((402).ToString())) - return TextFieldType.DL_CLASS_CODE_C1E_FROM; - - if (value.Equals((403).ToString())) - return TextFieldType.DL_CLASS_CODE_C1E_TO; - - if (value.Equals((404).ToString())) - return TextFieldType.DL_CLASS_CODE_C1E_NOTES; - - if (value.Equals((405).ToString())) - return TextFieldType.DL_CLASS_CODE_CE_FROM; - - if (value.Equals((406).ToString())) - return TextFieldType.DL_CLASS_CODE_CE_TO; - - if (value.Equals((407).ToString())) - return TextFieldType.DL_CLASS_CODE_CE_NOTES; - - if (value.Equals((408).ToString())) - return TextFieldType.DL_CLASS_CODE_D1E_FROM; - - if (value.Equals((409).ToString())) - return TextFieldType.DL_CLASS_CODE_D1E_TO; - - if (value.Equals((410).ToString())) - return TextFieldType.DL_CLASS_CODE_D1E_NOTES; - - if (value.Equals((411).ToString())) - return TextFieldType.DL_CLASS_CODE_DE_FROM; - - if (value.Equals((412).ToString())) - return TextFieldType.DL_CLASS_CODE_DE_TO; - - if (value.Equals((413).ToString())) - return TextFieldType.DL_CLASS_CODE_DE_NOTES; - - if (value.Equals((414).ToString())) - return TextFieldType.DL_CLASS_CODE_M_FROM; - - if (value.Equals((415).ToString())) - return TextFieldType.DL_CLASS_CODE_M_TO; - - if (value.Equals((416).ToString())) - return TextFieldType.DL_CLASS_CODE_M_NOTES; - - if (value.Equals((417).ToString())) - return TextFieldType.DL_CLASS_CODE_L_FROM; - - if (value.Equals((418).ToString())) - return TextFieldType.DL_CLASS_CODE_L_TO; - - if (value.Equals((419).ToString())) - return TextFieldType.DL_CLASS_CODE_L_NOTES; - - if (value.Equals((420).ToString())) - return TextFieldType.DL_CLASS_CODE_T_FROM; - - if (value.Equals((421).ToString())) - return TextFieldType.DL_CLASS_CODE_T_TO; - - if (value.Equals((422).ToString())) - return TextFieldType.DL_CLASS_CODE_T_NOTES; - - if (value.Equals((423).ToString())) - return TextFieldType.DL_CLASS_CODE_AM_FROM; - - if (value.Equals((424).ToString())) - return TextFieldType.DL_CLASS_CODE_AM_TO; - - if (value.Equals((425).ToString())) - return TextFieldType.DL_CLASS_CODE_AM_NOTES; - - if (value.Equals((426).ToString())) - return TextFieldType.DL_CLASS_CODE_A2_FROM; - - if (value.Equals((427).ToString())) - return TextFieldType.DL_CLASS_CODE_A2_TO; - - if (value.Equals((428).ToString())) - return TextFieldType.DL_CLASS_CODE_A2_NOTES; - - if (value.Equals((429).ToString())) - return TextFieldType.DL_CLASS_CODE_B1_FROM; - - if (value.Equals((430).ToString())) - return TextFieldType.DL_CLASS_CODE_B1_TO; - - if (value.Equals((431).ToString())) - return TextFieldType.DL_CLASS_CODE_B1_NOTES; - - if (value.Equals((432).ToString())) - return TextFieldType.SURNAME_AT_BIRTH; - - if (value.Equals((433).ToString())) - return TextFieldType.CIVIL_STATUS; - - if (value.Equals((434).ToString())) - return TextFieldType.NUMBER_OF_SEATS; - - if (value.Equals((435).ToString())) - return TextFieldType.NUMBER_OF_STANDING_PLACES; - - if (value.Equals((436).ToString())) - return TextFieldType.MAX_SPEED; - - if (value.Equals((437).ToString())) - return TextFieldType.FUEL_TYPE; - - if (value.Equals((438).ToString())) - return TextFieldType.EC_ENVIRONMENTAL_TYPE; - - if (value.Equals((439).ToString())) - return TextFieldType.POWER_WEIGHT_RATIO; - - if (value.Equals((440).ToString())) - return TextFieldType.MAX_MASS_OF_TRAILER_BRAKED; - - if (value.Equals((441).ToString())) - return TextFieldType.MAX_MASS_OF_TRAILER_UNBRAKED; - - if (value.Equals((442).ToString())) - return TextFieldType.TRANSMISSION_TYPE; - - if (value.Equals((443).ToString())) - return TextFieldType.TRAILER_HITCH; - - if (value.Equals((444).ToString())) - return TextFieldType.ACCOMPANIED_BY; - - if (value.Equals((445).ToString())) - return TextFieldType.POLICE_DISTRICT; - - if (value.Equals((446).ToString())) - return TextFieldType.FIRST_ISSUE_DATE; - - if (value.Equals((447).ToString())) - return TextFieldType.PAYLOAD_CAPACITY; - - if (value.Equals((448).ToString())) - return TextFieldType.NUMBER_OF_AXLES; - - if (value.Equals((449).ToString())) - return TextFieldType.PERMISSIBLE_AXLE_LOAD; - - if (value.Equals((450).ToString())) - return TextFieldType.PRECINCT; - - if (value.Equals((451).ToString())) - return TextFieldType.INVITED_BY; - - if (value.Equals((452).ToString())) - return TextFieldType.PURPOSE_OF_ENTRY; - - if (value.Equals((453).ToString())) - return TextFieldType.SKIN_COLOR; - - if (value.Equals((454).ToString())) - return TextFieldType.COMPLEXION; - - if (value.Equals((455).ToString())) - return TextFieldType.AIRPORT_FROM; - - if (value.Equals((456).ToString())) - return TextFieldType.AIRPORT_TO; - - if (value.Equals((457).ToString())) - return TextFieldType.AIRLINE_NAME; - - if (value.Equals((458).ToString())) - return TextFieldType.AIRLINE_NAME_FREQUENT_FLYER; - - if (value.Equals((459).ToString())) - return TextFieldType.LICENSE_NUMBER; - - if (value.Equals((460).ToString())) - return TextFieldType.IN_TANKS; - - if (value.Equals((461).ToString())) - return TextFieldType.EXCEPT_IN_TANKS; - - if (value.Equals((462).ToString())) - return TextFieldType.FAST_TRACK; - - if (value.Equals((463).ToString())) - return TextFieldType.OWNER; - - if (value.Equals((464).ToString())) - return TextFieldType.MRZ_STRINGS_ICAO_RFID; - - if (value.Equals((465).ToString())) - return TextFieldType.NUMBER_OF_CARD_ISSUANCE; - - if (value.Equals((466).ToString())) - return TextFieldType.NUMBER_OF_CARD_ISSUANCE_CHECKSUM; - - if (value.Equals((467).ToString())) - return TextFieldType.NUMBER_OF_CARD_ISSUANCE_CHECK_DIGIT; - - if (value.Equals((468).ToString())) - return TextFieldType.CENTURY_DATE_OF_BIRTH; - - if (value.Equals((469).ToString())) - return TextFieldType.DL_CLASS_CODE_A3_FROM; - - if (value.Equals((470).ToString())) - return TextFieldType.DL_CLASS_CODE_A3_TO; - - if (value.Equals((471).ToString())) - return TextFieldType.DL_CLASS_CODE_A3_NOTES; - - if (value.Equals((472).ToString())) - return TextFieldType.DL_CLASS_CODE_C2_FROM; - - if (value.Equals((473).ToString())) - return TextFieldType.DL_CLASS_CODE_C2_TO; - - if (value.Equals((474).ToString())) - return TextFieldType.DL_CLASS_CODE_C2_NOTES; - - if (value.Equals((475).ToString())) - return TextFieldType.DL_CLASS_CODE_B2_FROM; - - if (value.Equals((476).ToString())) - return TextFieldType.DL_CLASS_CODE_B2_TO; - - if (value.Equals((477).ToString())) - return TextFieldType.DL_CLASS_CODE_B2_NOTES; - - if (value.Equals((478).ToString())) - return TextFieldType.DL_CLASS_CODE_D2_FROM; - - if (value.Equals((479).ToString())) - return TextFieldType.DL_CLASS_CODE_D2_TO; - - if (value.Equals((480).ToString())) - return TextFieldType.DL_CLASS_CODE_D2_NOTES; - - if (value.Equals((481).ToString())) - return TextFieldType.DL_CLASS_CODE_B2E_FROM; - - if (value.Equals((482).ToString())) - return TextFieldType.DL_CLASS_CODE_B2E_TO; - - if (value.Equals((483).ToString())) - return TextFieldType.DL_CLASS_CODE_B2E_NOTES; - - if (value.Equals((484).ToString())) - return TextFieldType.DL_CLASS_CODE_G_FROM; - - if (value.Equals((485).ToString())) - return TextFieldType.DL_CLASS_CODE_G_TO; - - if (value.Equals((486).ToString())) - return TextFieldType.DL_CLASS_CODE_G_NOTES; - - if (value.Equals((487).ToString())) - return TextFieldType.DL_CLASS_CODE_J_FROM; - - if (value.Equals((488).ToString())) - return TextFieldType.DL_CLASS_CODE_J_TO; - - if (value.Equals((489).ToString())) - return TextFieldType.DL_CLASS_CODE_J_NOTES; - - if (value.Equals((490).ToString())) - return TextFieldType.DL_CLASS_CODE_LC_FROM; - - if (value.Equals((491).ToString())) - return TextFieldType.DL_CLASS_CODE_LC_TO; - - if (value.Equals((492).ToString())) - return TextFieldType.DL_CLASS_CODE_LC_NOTES; - - if (value.Equals((493).ToString())) - return TextFieldType.BANK_CARD_NUMBER; - - if (value.Equals((494).ToString())) - return TextFieldType.BANK_CARD_VALID_THRU; - - if (value.Equals((495).ToString())) - return TextFieldType.TAX_NUMBER; - - if (value.Equals((496).ToString())) - return TextFieldType.HEALTH_NUMBER; - - if (value.Equals((497).ToString())) - return TextFieldType.GRANDFATHER_NAME; - - if (value.Equals((498).ToString())) - return TextFieldType.SELECTEE_INDICATOR; - - if (value.Equals((499).ToString())) - return TextFieldType.MOTHER_SURNAME; - - if (value.Equals((500).ToString())) - return TextFieldType.MOTHER_GIVEN_NAME; - - if (value.Equals((501).ToString())) - return TextFieldType.FATHER_SURNAME; - - if (value.Equals((502).ToString())) - return TextFieldType.FATHER_GIVEN_NAME; - - if (value.Equals((503).ToString())) - return TextFieldType.MOTHER_DATE_OF_BIRTH; - - if (value.Equals((504).ToString())) - return TextFieldType.FATHER_DATE_OF_BIRTH; - - if (value.Equals((505).ToString())) - return TextFieldType.MOTHER_PERSONAL_NUMBER; - - if (value.Equals((506).ToString())) - return TextFieldType.FATHER_PERSONAL_NUMBER; - - if (value.Equals((507).ToString())) - return TextFieldType.MOTHER_PLACE_OF_BIRTH; - - if (value.Equals((508).ToString())) - return TextFieldType.FATHER_PLACE_OF_BIRTH; - - if (value.Equals((509).ToString())) - return TextFieldType.MOTHER_COUNTRY_OF_BIRTH; - - if (value.Equals((510).ToString())) - return TextFieldType.FATHER_COUNTRY_OF_BIRTH; - - if (value.Equals((511).ToString())) - return TextFieldType.DATE_FIRST_RENEWAL; - - if (value.Equals((512).ToString())) - return TextFieldType.DATE_SECOND_RENEWAL; - - if (value.Equals((513).ToString())) - return TextFieldType.PLACE_OF_EXAMINATION; - - if (value.Equals((514).ToString())) - return TextFieldType.APPLICATION_NUMBER; - - if (value.Equals((515).ToString())) - return TextFieldType.VOUCHER_NUMBER; - - if (value.Equals((516).ToString())) - return TextFieldType.AUTHORIZATION_NUMBER; - - if (value.Equals((517).ToString())) - return TextFieldType.FACULTY; - - if (value.Equals((518).ToString())) - return TextFieldType.FORM_OF_EDUCATION; - - if (value.Equals((519).ToString())) - return TextFieldType.DNI_NUMBER; - - if (value.Equals((520).ToString())) - return TextFieldType.RETIREMENT_NUMBER; - - if (value.Equals((521).ToString())) - return TextFieldType.PROFESSIONAL_ID_NUMBER; - - if (value.Equals((522).ToString())) - return TextFieldType.AGE_AT_ISSUE; - - if (value.Equals((523).ToString())) - return TextFieldType.YEARS_SINCE_ISSUE; - - if (value.Equals((524).ToString())) - return TextFieldType.DL_CLASS_CODE_BTP_FROM; - - if (value.Equals((525).ToString())) - return TextFieldType.DL_CLASS_CODE_BTP_NOTES; - - if (value.Equals((526).ToString())) - return TextFieldType.DL_CLASS_CODE_BTP_TO; - - if (value.Equals((527).ToString())) - return TextFieldType.DL_CLASS_CODE_C3_FROM; - - if (value.Equals((528).ToString())) - return TextFieldType.DL_CLASS_CODE_C3_NOTES; - - if (value.Equals((529).ToString())) - return TextFieldType.DL_CLASS_CODE_C3_TO; - - if (value.Equals((530).ToString())) - return TextFieldType.DL_CLASS_CODE_E_FROM; - - if (value.Equals((531).ToString())) - return TextFieldType.DL_CLASS_CODE_E_NOTES; - - if (value.Equals((532).ToString())) - return TextFieldType.DL_CLASS_CODE_E_TO; - - if (value.Equals((533).ToString())) - return TextFieldType.DL_CLASS_CODE_F_FROM; - - if (value.Equals((534).ToString())) - return TextFieldType.DL_CLASS_CODE_F_NOTES; - - if (value.Equals((535).ToString())) - return TextFieldType.DL_CLASS_CODE_F_TO; - - if (value.Equals((536).ToString())) - return TextFieldType.DL_CLASS_CODE_FA_FROM; - - if (value.Equals((537).ToString())) - return TextFieldType.DL_CLASS_CODE_FA_NOTES; - - if (value.Equals((538).ToString())) - return TextFieldType.DL_CLASS_CODE_FA_TO; - - if (value.Equals((539).ToString())) - return TextFieldType.DL_CLASS_CODE_FA1_FROM; - - if (value.Equals((540).ToString())) - return TextFieldType.DL_CLASS_CODE_FA1_NOTES; - - if (value.Equals((541).ToString())) - return TextFieldType.DL_CLASS_CODE_FA1_TO; - - if (value.Equals((542).ToString())) - return TextFieldType.DL_CLASS_CODE_FB_FROM; - - if (value.Equals((543).ToString())) - return TextFieldType.DL_CLASS_CODE_FB_NOTES; - - if (value.Equals((544).ToString())) - return TextFieldType.DL_CLASS_CODE_FB_TO; - - if (value.Equals((545).ToString())) - return TextFieldType.DL_CLASS_CODE_G1_FROM; - - if (value.Equals((546).ToString())) - return TextFieldType.DL_CLASS_CODE_G1_NOTES; - - if (value.Equals((547).ToString())) - return TextFieldType.DL_CLASS_CODE_G1_TO; - - if (value.Equals((548).ToString())) - return TextFieldType.DL_CLASS_CODE_H_FROM; - - if (value.Equals((549).ToString())) - return TextFieldType.DL_CLASS_CODE_H_NOTES; - - if (value.Equals((550).ToString())) - return TextFieldType.DL_CLASS_CODE_H_TO; - - if (value.Equals((551).ToString())) - return TextFieldType.DL_CLASS_CODE_I_FROM; - - if (value.Equals((552).ToString())) - return TextFieldType.DL_CLASS_CODE_I_NOTES; - - if (value.Equals((553).ToString())) - return TextFieldType.DL_CLASS_CODE_I_TO; - - if (value.Equals((554).ToString())) - return TextFieldType.DL_CLASS_CODE_K_FROM; - - if (value.Equals((555).ToString())) - return TextFieldType.DL_CLASS_CODE_K_NOTES; - - if (value.Equals((556).ToString())) - return TextFieldType.DL_CLASS_CODE_K_TO; - - if (value.Equals((557).ToString())) - return TextFieldType.DL_CLASS_CODE_LK_FROM; - - if (value.Equals((558).ToString())) - return TextFieldType.DL_CLASS_CODE_LK_NOTES; - - if (value.Equals((559).ToString())) - return TextFieldType.DL_CLASS_CODE_LK_TO; - - if (value.Equals((560).ToString())) - return TextFieldType.DL_CLASS_CODE_N_FROM; - - if (value.Equals((561).ToString())) - return TextFieldType.DL_CLASS_CODE_N_NOTES; - - if (value.Equals((562).ToString())) - return TextFieldType.DL_CLASS_CODE_N_TO; - - if (value.Equals((563).ToString())) - return TextFieldType.DL_CLASS_CODE_S_FROM; - - if (value.Equals((564).ToString())) - return TextFieldType.DL_CLASS_CODE_S_NOTES; - - if (value.Equals((565).ToString())) - return TextFieldType.DL_CLASS_CODE_S_TO; - - if (value.Equals((566).ToString())) - return TextFieldType.DL_CLASS_CODE_TB_FROM; - - if (value.Equals((567).ToString())) - return TextFieldType.DL_CLASS_CODE_TB_NOTES; - - if (value.Equals((568).ToString())) - return TextFieldType.DL_CLASS_CODE_TB_TO; - - if (value.Equals((569).ToString())) - return TextFieldType.DL_CLASS_CODE_TM_FROM; - - if (value.Equals((570).ToString())) - return TextFieldType.DL_CLASS_CODE_TM_NOTES; - - if (value.Equals((571).ToString())) - return TextFieldType.DL_CLASS_CODE_TM_TO; - - if (value.Equals((572).ToString())) - return TextFieldType.DL_CLASS_CODE_TR_FROM; - - if (value.Equals((573).ToString())) - return TextFieldType.DL_CLASS_CODE_TR_NOTES; - - if (value.Equals((574).ToString())) - return TextFieldType.DL_CLASS_CODE_TR_TO; - - if (value.Equals((575).ToString())) - return TextFieldType.DL_CLASS_CODE_TV_FROM; - - if (value.Equals((576).ToString())) - return TextFieldType.DL_CLASS_CODE_TV_NOTES; - - if (value.Equals((577).ToString())) - return TextFieldType.DL_CLASS_CODE_TV_TO; - - if (value.Equals((578).ToString())) - return TextFieldType.DL_CLASS_CODE_V_FROM; - - if (value.Equals((579).ToString())) - return TextFieldType.DL_CLASS_CODE_V_NOTES; - - if (value.Equals((580).ToString())) - return TextFieldType.DL_CLASS_CODE_V_TO; - - if (value.Equals((581).ToString())) - return TextFieldType.DL_CLASS_CODE_W_FROM; - - if (value.Equals((582).ToString())) - return TextFieldType.DL_CLASS_CODE_W_NOTES; - - if (value.Equals((583).ToString())) - return TextFieldType.DL_CLASS_CODE_W_TO; - - if (value.Equals((584).ToString())) - return TextFieldType.URL; - - if (value.Equals((585).ToString())) - return TextFieldType.CALIBER; - - if (value.Equals((586).ToString())) - return TextFieldType.MODEL; - - if (value.Equals((587).ToString())) - return TextFieldType.MAKE; - - if (value.Equals((588).ToString())) - return TextFieldType.NUMBER_OF_CYLINDERS; - - if (value.Equals((589).ToString())) - return TextFieldType.SURNAME_OF_HUSBAND_AFTER_REGISTRATION; - - if (value.Equals((590).ToString())) - return TextFieldType.SURNAME_OF_WIFE_AFTER_REGISTRATION; - - if (value.Equals((591).ToString())) - return TextFieldType.DATE_OF_BIRTH_OF_WIFE; - - if (value.Equals((592).ToString())) - return TextFieldType.DATE_OF_BIRTH_OF_HUSBAND; - - if (value.Equals((593).ToString())) - return TextFieldType.CITIZENSHIP_OF_FIRST_PERSON; - - if (value.Equals((594).ToString())) - return TextFieldType.CITIZENSHIP_OF_SECOND_PERSON; - - if (value.Equals((595).ToString())) - return TextFieldType.CVV; - - if (value.Equals((596).ToString())) - return TextFieldType.DATE_OF_INSURANCE_EXPIRY; - - if (value.Equals((597).ToString())) - return TextFieldType.MORTGAGE_BY; - - if (value.Equals((598).ToString())) - return TextFieldType.OLD_DOCUMENT_NUMBER; - - if (value.Equals((599).ToString())) - return TextFieldType.OLD_DATE_OF_ISSUE; - - if (value.Equals((600).ToString())) - return TextFieldType.OLD_PLACE_OF_ISSUE; - - if (value.Equals((601).ToString())) - return TextFieldType.DL_CLASS_CODE_LR_FROM; - - if (value.Equals((602).ToString())) - return TextFieldType.DL_CLASS_CODE_LR_TO; - - if (value.Equals((603).ToString())) - return TextFieldType.DL_CLASS_CODE_LR_NOTES; - - if (value.Equals((604).ToString())) - return TextFieldType.DL_CLASS_CODE_MR_FROM; - - if (value.Equals((605).ToString())) - return TextFieldType.DL_CLASS_CODE_MR_TO; - - if (value.Equals((606).ToString())) - return TextFieldType.DL_CLASS_CODE_MR_NOTES; - - if (value.Equals((607).ToString())) - return TextFieldType.DL_CLASS_CODE_HR_FROM; - - if (value.Equals((608).ToString())) - return TextFieldType.DL_CLASS_CODE_HR_TO; - - if (value.Equals((609).ToString())) - return TextFieldType.DL_CLASS_CODE_HR_NOTES; - - if (value.Equals((610).ToString())) - return TextFieldType.DL_CLASS_CODE_HC_FROM; - - if (value.Equals((611).ToString())) - return TextFieldType.DL_CLASS_CODE_HC_TO; - - if (value.Equals((612).ToString())) - return TextFieldType.DL_CLASS_CODE_HC_NOTES; - - if (value.Equals((613).ToString())) - return TextFieldType.DL_CLASS_CODE_MC_FROM; - - if (value.Equals((614).ToString())) - return TextFieldType.DL_CLASS_CODE_MC_TO; - - if (value.Equals((615).ToString())) - return TextFieldType.DL_CLASS_CODE_MC_NOTES; - - if (value.Equals((616).ToString())) - return TextFieldType.DL_CLASS_CODE_RE_FROM; - - if (value.Equals((617).ToString())) - return TextFieldType.DL_CLASS_CODE_RE_TO; - - if (value.Equals((618).ToString())) - return TextFieldType.DL_CLASS_CODE_RE_NOTES; - - if (value.Equals((619).ToString())) - return TextFieldType.DL_CLASS_CODE_R_FROM; - - if (value.Equals((620).ToString())) - return TextFieldType.DL_CLASS_CODE_R_TO; - - if (value.Equals((621).ToString())) - return TextFieldType.DL_CLASS_CODE_R_NOTES; - - if (value.Equals((622).ToString())) - return TextFieldType.DL_CLASS_CODE_CA_FROM; - - if (value.Equals((623).ToString())) - return TextFieldType.DL_CLASS_CODE_CA_TO; - - if (value.Equals((624).ToString())) - return TextFieldType.DL_CLASS_CODE_CA_NOTES; - - if (value.Equals((625).ToString())) - return TextFieldType.CITIZENSHIP_STATUS; - - if (value.Equals((626).ToString())) - return TextFieldType.MILITARY_SERVICE_FROM; - - if (value.Equals((627).ToString())) - return TextFieldType.MILITARY_SERVICE_TO; - - if (value.Equals((628).ToString())) - return TextFieldType.DL_CLASS_CODE_NT_FROM; - - if (value.Equals((629).ToString())) - return TextFieldType.DL_CLASS_CODE_NT_TO; - - if (value.Equals((630).ToString())) - return TextFieldType.DL_CLASS_CODE_NT_NOTES; - - if (value.Equals((631).ToString())) - return TextFieldType.DL_CLASS_CODE_TN_FROM; - - if (value.Equals((632).ToString())) - return TextFieldType.DL_CLASS_CODE_TN_TO; - - if (value.Equals((633).ToString())) - return TextFieldType.DL_CLASS_CODE_TN_NOTES; - - if (value.Equals((634).ToString())) - return TextFieldType.DL_CLASS_CODE_D3_FROM; - - if (value.Equals((635).ToString())) - return TextFieldType.DL_CLASS_CODE_D3_TO; - - if (value.Equals((636).ToString())) - return TextFieldType.DL_CLASS_CODE_D3_NOTES; - - if (value.Equals((637).ToString())) - return TextFieldType.ALT_DATE_OF_EXPIRY; - - if (value.Equals((638).ToString())) - return TextFieldType.DL_CLASS_CODE_CD_FROM; - - if (value.Equals((639).ToString())) - return TextFieldType.DL_CLASS_CODE_CD_TO; - - if (value.Equals((640).ToString())) - return TextFieldType.DL_CLASS_CODE_CD_NOTES; - - if (value.Equals((641).ToString())) - return TextFieldType.ISSUER_IDENTIFICATION_NUMBER; - - if (value.Equals((642).ToString())) - return TextFieldType.PAYMENT_PERIOD_FROM; - - if (value.Equals((643).ToString())) - return TextFieldType.PAYMENT_PERIOD_TO; - - if (value.Equals((644).ToString())) - return TextFieldType.VACCINATION_CERTIFICATE_IDENTIFIER; - - if (value.Equals((645).ToString())) - return TextFieldType.FIRST_NAME; - - if (value.Equals((646).ToString())) - return TextFieldType.DATE_OF_ARRIVAL; - - if (value.Equals((647).ToString())) - return TextFieldType.SECOND_NAME; - - if (value.Equals((648).ToString())) - return TextFieldType.THIRD_NAME; - - if (value.Equals((649).ToString())) - return TextFieldType.FOURTH_NAME; - - if (value.Equals((650).ToString())) - return TextFieldType.LAST_NAME; - - if (value.Equals((651).ToString())) - return TextFieldType.DL_CLASS_CODE_RM_FROM; - - if (value.Equals((652).ToString())) - return TextFieldType.DL_CLASS_CODE_RM_NOTES; - - if (value.Equals((653).ToString())) - return TextFieldType.DL_CLASS_CODE_RM_TO; - - if (value.Equals((654).ToString())) - return TextFieldType.DL_CLASS_CODE_PW_FROM; - - if (value.Equals((655).ToString())) - return TextFieldType.DL_CLASS_CODE_PW_NOTES; - - if (value.Equals((656).ToString())) - return TextFieldType.DL_CLASS_CODE_PW_TO; - - if (value.Equals((657).ToString())) - return TextFieldType.DL_CLASS_CODE_EB_FROM; - - if (value.Equals((658).ToString())) - return TextFieldType.DL_CLASS_CODE_EB_NOTES; - - if (value.Equals((659).ToString())) - return TextFieldType.DL_CLASS_CODE_EB_TO; - - if (value.Equals((660).ToString())) - return TextFieldType.DL_CLASS_CODE_EC_FROM; - - if (value.Equals((661).ToString())) - return TextFieldType.DL_CLASS_CODE_EC_NOTES; - - if (value.Equals((662).ToString())) - return TextFieldType.DL_CLASS_CODE_EC_TO; - - if (value.Equals((663).ToString())) - return TextFieldType.DL_CLASS_CODE_EC1_FROM; - - if (value.Equals((664).ToString())) - return TextFieldType.DL_CLASS_CODE_EC1_NOTES; - - if (value.Equals((665).ToString())) - return TextFieldType.DL_CLASS_CODE_EC1_TO; - - if (value.Equals((666).ToString())) - return TextFieldType.PLACE_OF_BIRTH_CITY; - - if (value.Equals((667).ToString())) - return TextFieldType.YEAR_OF_BIRTH; - - if (value.Equals((668).ToString())) - return TextFieldType.YEAR_OF_EXPIRY; - - if (value.Equals((669).ToString())) - return TextFieldType.GRANDFATHER_NAME_MATERNAL; - - if (value.Equals((670).ToString())) - return TextFieldType.FIRST_SURNAME; - - if (value.Equals((671).ToString())) - return TextFieldType.MONTH_OF_BIRTH; - - if (value.Equals((672).ToString())) - return TextFieldType.ADDRESS_FLOOR_NUMBER; - - if (value.Equals((673).ToString())) - return TextFieldType.ADDRESS_ENTRANCE; - - if (value.Equals((674).ToString())) - return TextFieldType.ADDRESS_BLOCK_NUMBER; - - if (value.Equals((675).ToString())) - return TextFieldType.ADDRESS_STREET_NUMBER; - - if (value.Equals((676).ToString())) - return TextFieldType.ADDRESS_STREET_TYPE; - - if (value.Equals((677).ToString())) - return TextFieldType.ADDRESS_CITY_SECTOR; - - if (value.Equals((678).ToString())) - return TextFieldType.ADDRESS_COUNTY_TYPE; - - if (value.Equals((679).ToString())) - return TextFieldType.ADDRESS_CITY_TYPE; - - if (value.Equals((680).ToString())) - return TextFieldType.ADDRESS_BUILDING_TYPE; - - if (value.Equals((681).ToString())) - return TextFieldType.DATE_OF_RETIREMENT; - - if (value.Equals((682).ToString())) - return TextFieldType.DOCUMENT_STATUS; - - if (value.Equals((683).ToString())) - return TextFieldType.SIGNATURE; - - if (value.Equals((684).ToString())) - return TextFieldType.FT_UNIQUE_CERTIFICATE_IDENTIFIER; - - if (value.Equals((685).ToString())) - return TextFieldType.FT_EMAIL; - - if (value.Equals((686).ToString())) - return TextFieldType.FT_DATE_OF_SPECIMEN_COLLECTION; - - if (value.Equals((687).ToString())) - return TextFieldType.FT_TYPE_OF_TESTING; - - if (value.Equals((688).ToString())) - return TextFieldType.FT_RESULT_OF_TESTING; - - if (value.Equals((689).ToString())) - return TextFieldType.FT_METHOD_OF_TESTING; - - if (value.Equals((690).ToString())) - return TextFieldType.FT_DIGITAL_TRAVEL_AUTHORIZATION_NUMBER; - - if (value.Equals((691).ToString())) - return TextFieldType.FT_DATE_OF_FIRST_POSITIVE_TEST_RESULT; - - if (value.Equals((692).ToString())) - return TextFieldType.EF_CARD_ACCESS; - - if (value.Equals((693).ToString())) - return TextFieldType.SHORT_FLIGHT_NUMBER; - - if (value.Equals((694).ToString())) - return TextFieldType.AIRLINE_CODE; - - throw new NotImplementedException($"Could not convert value to type TextFieldType: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static TextFieldType? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return TextFieldType.DOCUMENT_CLASS_CODE; - - if (value.Equals((1).ToString())) - return TextFieldType.ISSUING_STATE_CODE; - - if (value.Equals((2).ToString())) - return TextFieldType.DOCUMENT_NUMBER; - - if (value.Equals((3).ToString())) - return TextFieldType.DATE_OF_EXPIRY; - - if (value.Equals((4).ToString())) - return TextFieldType.DATE_OF_ISSUE; - - if (value.Equals((5).ToString())) - return TextFieldType.DATE_OF_BIRTH; - - if (value.Equals((6).ToString())) - return TextFieldType.PLACE_OF_BIRTH; - - if (value.Equals((7).ToString())) - return TextFieldType.PERSONAL_NUMBER; - - if (value.Equals((8).ToString())) - return TextFieldType.SURNAME; - - if (value.Equals((9).ToString())) - return TextFieldType.GIVEN_NAMES; - - if (value.Equals((10).ToString())) - return TextFieldType.MOTHERS_NAME; - - if (value.Equals((11).ToString())) - return TextFieldType.NATIONALITY; - - if (value.Equals((12).ToString())) - return TextFieldType.SEX; - - if (value.Equals((13).ToString())) - return TextFieldType.HEIGHT; - - if (value.Equals((14).ToString())) - return TextFieldType.WEIGHT; - - if (value.Equals((15).ToString())) - return TextFieldType.EYES_COLOR; - - if (value.Equals((16).ToString())) - return TextFieldType.HAIR_COLOR; - - if (value.Equals((17).ToString())) - return TextFieldType.ADDRESS; - - if (value.Equals((18).ToString())) - return TextFieldType.DONOR; - - if (value.Equals((19).ToString())) - return TextFieldType.SOCIAL_SECURITY_NUMBER; - - if (value.Equals((20).ToString())) - return TextFieldType.DL_CLASS; - - if (value.Equals((21).ToString())) - return TextFieldType.DL_ENDORSED; - - if (value.Equals((22).ToString())) - return TextFieldType.DL_RESTRICTION_CODE; - - if (value.Equals((23).ToString())) - return TextFieldType.DL_UNDER_21_DATE; - - if (value.Equals((24).ToString())) - return TextFieldType.AUTHORITY; - - if (value.Equals((25).ToString())) - return TextFieldType.SURNAME_AND_GIVEN_NAMES; - - if (value.Equals((26).ToString())) - return TextFieldType.NATIONALITY_CODE; - - if (value.Equals((27).ToString())) - return TextFieldType.PASSPORT_NUMBER; - - if (value.Equals((28).ToString())) - return TextFieldType.INVITATION_NUMBER; - - if (value.Equals((29).ToString())) - return TextFieldType.VISA_ID; - - if (value.Equals((30).ToString())) - return TextFieldType.VISA_CLASS; - - if (value.Equals((31).ToString())) - return TextFieldType.VISA_SUBCLASS; - - if (value.Equals((35).ToString())) - return TextFieldType.MRZ_TYPE; - - if (value.Equals((36).ToString())) - return TextFieldType.OPTIONAL_DATA; - - if (value.Equals((37).ToString())) - return TextFieldType.DOCUMENT_CLASS_NAME; - - if (value.Equals((38).ToString())) - return TextFieldType.ISSUING_STATE_NAME; - - if (value.Equals((39).ToString())) - return TextFieldType.PLACE_OF_ISSUE; - - if (value.Equals((40).ToString())) - return TextFieldType.DOCUMENT_NUMBER_CHECKSUM; - - if (value.Equals((41).ToString())) - return TextFieldType.DATE_OF_BIRTH_CHECKSUM; - - if (value.Equals((42).ToString())) - return TextFieldType.DATE_OF_EXPIRY_CHECKSUM; - - if (value.Equals((43).ToString())) - return TextFieldType.PERSONAL_NUMBER_CHECKSUM; - - if (value.Equals((44).ToString())) - return TextFieldType.FINAL_CHECKSUM; - - if (value.Equals((45).ToString())) - return TextFieldType.PASSPORT_NUMBER_CHECKSUM; - - if (value.Equals((46).ToString())) - return TextFieldType.INVITATION_NUMBER_CHECKSUM; - - if (value.Equals((47).ToString())) - return TextFieldType.VISA_ID_CHECKSUM; - - if (value.Equals((48).ToString())) - return TextFieldType.SURNAME_AND_GIVEN_NAMES_CHECKSUM; - - if (value.Equals((49).ToString())) - return TextFieldType.VISA_VALID_UNTIL_CHECKSUM; - - if (value.Equals((50).ToString())) - return TextFieldType.OTHER; - - if (value.Equals((51).ToString())) - return TextFieldType.MRZ_STRINGS; - - if (value.Equals((52).ToString())) - return TextFieldType.NAME_SUFFIX; - - if (value.Equals((53).ToString())) - return TextFieldType.NAME_PREFIX; - - if (value.Equals((54).ToString())) - return TextFieldType.DATE_OF_ISSUE_CHECKSUM; - - if (value.Equals((55).ToString())) - return TextFieldType.DATE_OF_ISSUE_CHECK_DIGIT; - - if (value.Equals((56).ToString())) - return TextFieldType.DOCUMENT_SERIES; - - if (value.Equals((57).ToString())) - return TextFieldType.REG_CERT_REG_NUMBER; - - if (value.Equals((58).ToString())) - return TextFieldType.REG_CERT_CAR_MODEL; - - if (value.Equals((59).ToString())) - return TextFieldType.REG_CERT_CAR_COLOR; - - if (value.Equals((60).ToString())) - return TextFieldType.REG_CERT_BODY_NUMBER; - - if (value.Equals((61).ToString())) - return TextFieldType.REG_CERT_CAR_TYPE; - - if (value.Equals((62).ToString())) - return TextFieldType.REG_CERT_MAX_WEIGHT; - - if (value.Equals((63).ToString())) - return TextFieldType.REG_CERT_WEIGHT; - - if (value.Equals((64).ToString())) - return TextFieldType.ADDRESS_AREA; - - if (value.Equals((65).ToString())) - return TextFieldType.ADDRESS_STATE; - - if (value.Equals((66).ToString())) - return TextFieldType.ADDRESS_BUILDING; - - if (value.Equals((67).ToString())) - return TextFieldType.ADDRESS_HOUSE; - - if (value.Equals((68).ToString())) - return TextFieldType.ADDRESS_FLAT; - - if (value.Equals((69).ToString())) - return TextFieldType.PLACE_OF_REGISTRATION; - - if (value.Equals((70).ToString())) - return TextFieldType.DATE_OF_REGISTRATION; - - if (value.Equals((71).ToString())) - return TextFieldType.RESIDENT_FROM; - - if (value.Equals((72).ToString())) - return TextFieldType.RESIDENT_UNTIL; - - if (value.Equals((73).ToString())) - return TextFieldType.AUTHORITY_CODE; - - if (value.Equals((74).ToString())) - return TextFieldType.PLACE_OF_BIRTH_AREA; - - if (value.Equals((75).ToString())) - return TextFieldType.PLACE_OF_BIRTH_STATE_CODE; - - if (value.Equals((76).ToString())) - return TextFieldType.ADDRESS_STREET; - - if (value.Equals((77).ToString())) - return TextFieldType.ADDRESS_CITY; - - if (value.Equals((78).ToString())) - return TextFieldType.ADDRESS_JURISDICTION_CODE; - - if (value.Equals((79).ToString())) - return TextFieldType.ADDRESS_POSTAL_CODE; - - if (value.Equals((80).ToString())) - return TextFieldType.DOCUMENT_NUMBER_CHECK_DIGIT; - - if (value.Equals((81).ToString())) - return TextFieldType.DATE_OF_BIRTH_CHECK_DIGIT; - - if (value.Equals((82).ToString())) - return TextFieldType.DATE_OF_EXPIRY_CHECK_DIGIT; - - if (value.Equals((83).ToString())) - return TextFieldType.PERSONAL_NUMBER_CHECK_DIGIT; - - if (value.Equals((84).ToString())) - return TextFieldType.FINAL_CHECK_DIGIT; - - if (value.Equals((85).ToString())) - return TextFieldType.PASSPORT_NUMBER_CHECK_DIGIT; - - if (value.Equals((86).ToString())) - return TextFieldType.INVITATION_NUMBER_CHECK_DIGIT; - - if (value.Equals((87).ToString())) - return TextFieldType.VISA_ID_CHECK_DIGIT; - - if (value.Equals((88).ToString())) - return TextFieldType.SURNAME_AND_GIVEN_NAMES_CHECK_DIGIT; - - if (value.Equals((89).ToString())) - return TextFieldType.VISA_VALID_UNTIL_CHECK_DIGIT; - - if (value.Equals((90).ToString())) - return TextFieldType.PERMIT_DL_CLASS; - - if (value.Equals((91).ToString())) - return TextFieldType.PERMIT_DATE_OF_EXPIRY; - - if (value.Equals((92).ToString())) - return TextFieldType.PERMIT_IDENTIFIER; - - if (value.Equals((93).ToString())) - return TextFieldType.PERMIT_DATE_OF_ISSUE; - - if (value.Equals((94).ToString())) - return TextFieldType.PERMIT_RESTRICTION_CODE; - - if (value.Equals((95).ToString())) - return TextFieldType.PERMIT_ENDORSED; - - if (value.Equals((96).ToString())) - return TextFieldType.ISSUE_TIMESTAMP; - - if (value.Equals((97).ToString())) - return TextFieldType.NUMBER_OF_DUPLICATES; - - if (value.Equals((98).ToString())) - return TextFieldType.MEDICAL_INDICATOR_CODES; - - if (value.Equals((99).ToString())) - return TextFieldType.NON_RESIDENT_INDICATOR; - - if (value.Equals((100).ToString())) - return TextFieldType.VISA_TYPE; - - if (value.Equals((101).ToString())) - return TextFieldType.VISA_VALID_FROM; - - if (value.Equals((102).ToString())) - return TextFieldType.VISA_VALID_UNTIL; - - if (value.Equals((103).ToString())) - return TextFieldType.DURATION_OF_STAY; - - if (value.Equals((104).ToString())) - return TextFieldType.NUMBER_OF_ENTRIES; - - if (value.Equals((105).ToString())) - return TextFieldType.DAY; - - if (value.Equals((106).ToString())) - return TextFieldType.MONTH; - - if (value.Equals((107).ToString())) - return TextFieldType.YEAR; - - if (value.Equals((108).ToString())) - return TextFieldType.UNIQUE_CUSTOMER_IDENTIFIER; - - if (value.Equals((109).ToString())) - return TextFieldType.COMMERCIAL_VEHICLE_CODES; - - if (value.Equals((110).ToString())) - return TextFieldType.AKA_DATE_OF_BIRTH; - - if (value.Equals((111).ToString())) - return TextFieldType.AKA_SOCIAL_SECURITY_NUMBER; - - if (value.Equals((112).ToString())) - return TextFieldType.AKA_SURNAME; - - if (value.Equals((113).ToString())) - return TextFieldType.AKA_GIVEN_NAMES; - - if (value.Equals((114).ToString())) - return TextFieldType.AKA_NAME_SUFFIX; - - if (value.Equals((115).ToString())) - return TextFieldType.AKA_NAME_PREFIX; - - if (value.Equals((116).ToString())) - return TextFieldType.MAILING_ADDRESS_STREET; - - if (value.Equals((117).ToString())) - return TextFieldType.MAILING_ADDRESS_CITY; - - if (value.Equals((118).ToString())) - return TextFieldType.MAILING_ADDRESS_JURISDICTION_CODE; - - if (value.Equals((119).ToString())) - return TextFieldType.MAILING_ADDRESS_POSTAL_CODE; - - if (value.Equals((120).ToString())) - return TextFieldType.AUDIT_INFORMATION; - - if (value.Equals((121).ToString())) - return TextFieldType.INVENTORY_NUMBER; - - if (value.Equals((122).ToString())) - return TextFieldType.RACE_ETHNICITY; - - if (value.Equals((123).ToString())) - return TextFieldType.JURISDICTION_VEHICLE_CLASS; - - if (value.Equals((124).ToString())) - return TextFieldType.JURISDICTION_ENDORSEMENT_CODE; - - if (value.Equals((125).ToString())) - return TextFieldType.JURISDICTION_RESTRICTION_CODE; - - if (value.Equals((126).ToString())) - return TextFieldType.FAMILY_NAME; - - if (value.Equals((127).ToString())) - return TextFieldType.GIVEN_NAMES_RUS; - - if (value.Equals((128).ToString())) - return TextFieldType.VISA_ID_RUS; - - if (value.Equals((129).ToString())) - return TextFieldType.FATHERS_NAME; - - if (value.Equals((130).ToString())) - return TextFieldType.FATHERS_NAME_RUS; - - if (value.Equals((131).ToString())) - return TextFieldType.SURNAME_AND_GIVEN_NAMES_RUS; - - if (value.Equals((132).ToString())) - return TextFieldType.PLACE_OF_BIRTH_RUS; - - if (value.Equals((133).ToString())) - return TextFieldType.AUTHORITY_RUS; - - if (value.Equals((134).ToString())) - return TextFieldType.ISSUING_STATE_CODE_NUMERIC; - - if (value.Equals((135).ToString())) - return TextFieldType.NATIONALITY_CODE_NUMERIC; - - if (value.Equals((136).ToString())) - return TextFieldType.ENGINE_POWER; - - if (value.Equals((137).ToString())) - return TextFieldType.ENGINE_VOLUME; - - if (value.Equals((138).ToString())) - return TextFieldType.CHASSIS_NUMBER; - - if (value.Equals((139).ToString())) - return TextFieldType.ENGINE_NUMBER; - - if (value.Equals((140).ToString())) - return TextFieldType.ENGINE_MODEL; - - if (value.Equals((141).ToString())) - return TextFieldType.VEHICLE_CATEGORY; - - if (value.Equals((142).ToString())) - return TextFieldType.IDENTITY_CARD_NUMBER; - - if (value.Equals((143).ToString())) - return TextFieldType.CONTROL_NUMBER; - - if (value.Equals((144).ToString())) - return TextFieldType.PARENTS_GIVEN_NAMES; - - if (value.Equals((145).ToString())) - return TextFieldType.SECOND_SURNAME; - - if (value.Equals((146).ToString())) - return TextFieldType.MIDDLE_NAME; - - if (value.Equals((147).ToString())) - return TextFieldType.REG_CERT_VIN; - - if (value.Equals((148).ToString())) - return TextFieldType.REG_CERT_VIN_CHECK_DIGIT; - - if (value.Equals((149).ToString())) - return TextFieldType.REG_CERT_VIN_CHECKSUM; - - if (value.Equals((150).ToString())) - return TextFieldType.LINE_1_CHECK_DIGIT; - - if (value.Equals((151).ToString())) - return TextFieldType.LINE_2_CHECK_DIGIT; - - if (value.Equals((152).ToString())) - return TextFieldType.LINE_3_CHECK_DIGIT; - - if (value.Equals((153).ToString())) - return TextFieldType.LINE_1_CHECKSUM; - - if (value.Equals((154).ToString())) - return TextFieldType.LINE_2_CHECKSUM; - - if (value.Equals((155).ToString())) - return TextFieldType.LINE_3_CHECKSUM; - - if (value.Equals((156).ToString())) - return TextFieldType.REG_CERT_REG_NUMBER_CHECK_DIGIT; - - if (value.Equals((157).ToString())) - return TextFieldType.REG_CERT_REG_NUMBER_CHECKSUM; - - if (value.Equals((158).ToString())) - return TextFieldType.REG_CERT_VEHICLE_ITS_CODE; - - if (value.Equals((159).ToString())) - return TextFieldType.CARD_ACCESS_NUMBER; - - if (value.Equals((160).ToString())) - return TextFieldType.MARITAL_STATUS; - - if (value.Equals((161).ToString())) - return TextFieldType.COMPANY_NAME; - - if (value.Equals((162).ToString())) - return TextFieldType.SPECIAL_NOTES; - - if (value.Equals((163).ToString())) - return TextFieldType.SURNAME_OF_SPOUSE; - - if (value.Equals((164).ToString())) - return TextFieldType.TRACKING_NUMBER; - - if (value.Equals((165).ToString())) - return TextFieldType.BOOKLET_NUMBER; - - if (value.Equals((166).ToString())) - return TextFieldType.CHILDREN; - - if (value.Equals((167).ToString())) - return TextFieldType.COPY; - - if (value.Equals((168).ToString())) - return TextFieldType.SERIAL_NUMBER; - - if (value.Equals((169).ToString())) - return TextFieldType.DOSSIER_NUMBER; - - if (value.Equals((170).ToString())) - return TextFieldType.AKA_SURNAME_AND_GIVEN_NAMES; - - if (value.Equals((171).ToString())) - return TextFieldType.TERRITORIAL_VALIDITY; - - if (value.Equals((172).ToString())) - return TextFieldType.MRZ_STRINGS_WITH_CORRECT_CHECK_SUMS; - - if (value.Equals((173).ToString())) - return TextFieldType.DL_CDL_RESTRICTION_CODE; - - if (value.Equals((174).ToString())) - return TextFieldType.DL_UNDER_18_DATE; - - if (value.Equals((175).ToString())) - return TextFieldType.DL_RECORD_CREATED; - - if (value.Equals((176).ToString())) - return TextFieldType.DL_DUPLICATE_DATE; - - if (value.Equals((177).ToString())) - return TextFieldType.DL_ISSUE_TYPE; - - if (value.Equals((178).ToString())) - return TextFieldType.MILITARY_BOOK_NUMBER; - - if (value.Equals((179).ToString())) - return TextFieldType.DESTINATION; - - if (value.Equals((180).ToString())) - return TextFieldType.BLOOD_GROUP; - - if (value.Equals((181).ToString())) - return TextFieldType.SEQUENCE_NUMBER; - - if (value.Equals((182).ToString())) - return TextFieldType.REG_CERT_BODY_TYPE; - - if (value.Equals((183).ToString())) - return TextFieldType.REG_CERT_CAR_MARK; - - if (value.Equals((184).ToString())) - return TextFieldType.TRANSACTION_NUMBER; - - if (value.Equals((185).ToString())) - return TextFieldType.AGE; - - if (value.Equals((186).ToString())) - return TextFieldType.FOLIO_NUMBER; - - if (value.Equals((187).ToString())) - return TextFieldType.VOTER_KEY; - - if (value.Equals((188).ToString())) - return TextFieldType.ADDRESS_MUNICIPALITY; - - if (value.Equals((189).ToString())) - return TextFieldType.ADDRESS_LOCATION; - - if (value.Equals((190).ToString())) - return TextFieldType.SECTION; - - if (value.Equals((191).ToString())) - return TextFieldType.OCR_NUMBER; - - if (value.Equals((192).ToString())) - return TextFieldType.FEDERAL_ELECTIONS; - - if (value.Equals((193).ToString())) - return TextFieldType.REFERENCE_NUMBER; - - if (value.Equals((194).ToString())) - return TextFieldType.OPTIONAL_DATA_CHECKSUM; - - if (value.Equals((195).ToString())) - return TextFieldType.OPTIONAL_DATA_CHECK_DIGIT; - - if (value.Equals((196).ToString())) - return TextFieldType.VISA_NUMBER; - - if (value.Equals((197).ToString())) - return TextFieldType.VISA_NUMBER_CHECKSUM; - - if (value.Equals((198).ToString())) - return TextFieldType.VISA_NUMBER_CHECK_DIGIT; - - if (value.Equals((199).ToString())) - return TextFieldType.VOTER; - - if (value.Equals((200).ToString())) - return TextFieldType.PREVIOUS_TYPE; - - if (value.Equals((220).ToString())) - return TextFieldType.FIELD_FROM_MRZ; - - if (value.Equals((221).ToString())) - return TextFieldType.CURRENT_DATE; - - if (value.Equals((251).ToString())) - return TextFieldType.STATUS_DATE_OF_EXPIRY; - - if (value.Equals((252).ToString())) - return TextFieldType.BANKNOTE_NUMBER; - - if (value.Equals((253).ToString())) - return TextFieldType.CSC_CODE; - - if (value.Equals((254).ToString())) - return TextFieldType.ARTISTIC_NAME; - - if (value.Equals((255).ToString())) - return TextFieldType.ACADEMIC_TITLE; - - if (value.Equals((256).ToString())) - return TextFieldType.ADDRESS_COUNTRY; - - if (value.Equals((257).ToString())) - return TextFieldType.ADDRESS_ZIP_CODE; - - if (value.Equals((258).ToString())) - return TextFieldType.E_ID_RESIDENCE_PERMIT_1; - - if (value.Equals((259).ToString())) - return TextFieldType.E_ID_RESIDENCE_PERMIT_2; - - if (value.Equals((260).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_STREET; - - if (value.Equals((261).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_CITY; - - if (value.Equals((262).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_STATE; - - if (value.Equals((263).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_COUNTRY; - - if (value.Equals((264).ToString())) - return TextFieldType.E_ID_PLACE_OF_BIRTH_ZIP_CODE; - - if (value.Equals((265).ToString())) - return TextFieldType.CDL_CLASS; - - if (value.Equals((266).ToString())) - return TextFieldType.DL_UNDER_19_DATE; - - if (value.Equals((267).ToString())) - return TextFieldType.WEIGHT_POUNDS; - - if (value.Equals((268).ToString())) - return TextFieldType.LIMITED_DURATION_DOCUMENT_INDICATOR; - - if (value.Equals((269).ToString())) - return TextFieldType.ENDORSEMENT_EXPIRATION_DATE; - - if (value.Equals((270).ToString())) - return TextFieldType.REVISION_DATE; - - if (value.Equals((271).ToString())) - return TextFieldType.COMPLIANCE_TYPE; - - if (value.Equals((272).ToString())) - return TextFieldType.FAMILY_NAME_TRUNCATION; - - if (value.Equals((273).ToString())) - return TextFieldType.FIRST_NAME_TRUNCATION; - - if (value.Equals((274).ToString())) - return TextFieldType.MIDDLE_NAME_TRUNCATION; - - if (value.Equals((275).ToString())) - return TextFieldType.EXAM_DATE; - - if (value.Equals((276).ToString())) - return TextFieldType.ORGANIZATION; - - if (value.Equals((277).ToString())) - return TextFieldType.DEPARTMENT; - - if (value.Equals((278).ToString())) - return TextFieldType.PAY_GRADE; - - if (value.Equals((279).ToString())) - return TextFieldType.RANK; - - if (value.Equals((280).ToString())) - return TextFieldType.BENEFITS_NUMBER; - - if (value.Equals((281).ToString())) - return TextFieldType.SPONSOR_SERVICE; - - if (value.Equals((282).ToString())) - return TextFieldType.SPONSOR_STATUS; - - if (value.Equals((283).ToString())) - return TextFieldType.SPONSOR; - - if (value.Equals((284).ToString())) - return TextFieldType.RELATIONSHIP; - - if (value.Equals((285).ToString())) - return TextFieldType.USCIS; - - if (value.Equals((286).ToString())) - return TextFieldType.CATEGORY; - - if (value.Equals((287).ToString())) - return TextFieldType.CONDITIONS; - - if (value.Equals((288).ToString())) - return TextFieldType.IDENTIFIER; - - if (value.Equals((289).ToString())) - return TextFieldType.CONFIGURATION; - - if (value.Equals((290).ToString())) - return TextFieldType.DISCRETIONARY_DATA; - - if (value.Equals((291).ToString())) - return TextFieldType.LINE_1_OPTIONAL_DATA; - - if (value.Equals((292).ToString())) - return TextFieldType.LINE_2_OPTIONAL_DATA; - - if (value.Equals((293).ToString())) - return TextFieldType.LINE_3_OPTIONAL_DATA; - - if (value.Equals((294).ToString())) - return TextFieldType.EQV_CODE; - - if (value.Equals((295).ToString())) - return TextFieldType.ALT_CODE; - - if (value.Equals((296).ToString())) - return TextFieldType.BINARY_CODE; - - if (value.Equals((297).ToString())) - return TextFieldType.PSEUDO_CODE; - - if (value.Equals((298).ToString())) - return TextFieldType.FEE; - - if (value.Equals((299).ToString())) - return TextFieldType.STAMP_NUMBER; - - if (value.Equals((300).ToString())) - return TextFieldType.SBH_SECURITY_OPTIONS; - - if (value.Equals((301).ToString())) - return TextFieldType.SBH_INTEGRITY_OPTIONS; - - if (value.Equals((302).ToString())) - return TextFieldType.DATE_OF_CREATION; - - if (value.Equals((303).ToString())) - return TextFieldType.VALIDITY_PERIOD; - - if (value.Equals((304).ToString())) - return TextFieldType.PATRON_HEADER_VERSION; - - if (value.Equals((305).ToString())) - return TextFieldType.BDB_TYPE; - - if (value.Equals((306).ToString())) - return TextFieldType.BIOMETRIC_TYPE; - - if (value.Equals((307).ToString())) - return TextFieldType.BIOMETRIC_SUBTYPE; - - if (value.Equals((308).ToString())) - return TextFieldType.BIOMETRIC_PRODUCT_ID; - - if (value.Equals((309).ToString())) - return TextFieldType.BIOMETRIC_FORMAT_OWNER; - - if (value.Equals((310).ToString())) - return TextFieldType.BIOMETRIC_FORMAT_TYPE; - - if (value.Equals((311).ToString())) - return TextFieldType.PHONE; - - if (value.Equals((312).ToString())) - return TextFieldType.PROFESSION; - - if (value.Equals((313).ToString())) - return TextFieldType.TITLE; - - if (value.Equals((314).ToString())) - return TextFieldType.PERSONAL_SUMMARY; - - if (value.Equals((315).ToString())) - return TextFieldType.OTHER_VALID_ID; - - if (value.Equals((316).ToString())) - return TextFieldType.CUSTODY_INFO; - - if (value.Equals((317).ToString())) - return TextFieldType.OTHER_NAME; - - if (value.Equals((318).ToString())) - return TextFieldType.OBSERVATIONS; - - if (value.Equals((319).ToString())) - return TextFieldType.TAX; - - if (value.Equals((320).ToString())) - return TextFieldType.DATE_OF_PERSONALIZATION; - - if (value.Equals((321).ToString())) - return TextFieldType.PERSONALIZATION_SN; - - if (value.Equals((322).ToString())) - return TextFieldType.OTHER_PERSON_NAME; - - if (value.Equals((323).ToString())) - return TextFieldType.PERSON_TO_NOTIFY_DATE_OF_RECORD; - - if (value.Equals((324).ToString())) - return TextFieldType.PERSON_TO_NOTIFY_NAME; - - if (value.Equals((325).ToString())) - return TextFieldType.PERSON_TO_NOTIFY_PHONE; - - if (value.Equals((326).ToString())) - return TextFieldType.PERSON_TO_NOTIFY_ADDRESS; - - if (value.Equals((327).ToString())) - return TextFieldType.DS_CERTIFICATE_ISSUER; - - if (value.Equals((328).ToString())) - return TextFieldType.DS_CERTIFICATE_SUBJECT; - - if (value.Equals((329).ToString())) - return TextFieldType.DS_CERTIFICATE_VALID_FROM; - - if (value.Equals((330).ToString())) - return TextFieldType.DS_CERTIFICATE_VALID_TO; - - if (value.Equals((331).ToString())) - return TextFieldType.VRC_DATA_OBJECT_ENTRY; - - if (value.Equals((332).ToString())) - return TextFieldType.TYPE_APPROVAL_NUMBER; - - if (value.Equals((333).ToString())) - return TextFieldType.ADMINISTRATIVE_NUMBER; - - if (value.Equals((334).ToString())) - return TextFieldType.DOCUMENT_DISCRIMINATOR; - - if (value.Equals((335).ToString())) - return TextFieldType.DATA_DISCRIMINATOR; - - if (value.Equals((336).ToString())) - return TextFieldType.ISO_ISSUER_ID_NUMBER; - - if (value.Equals((337).ToString())) - return TextFieldType.DTC_VERSION; - - if (value.Equals((338).ToString())) - return TextFieldType.DTC_ID; - - if (value.Equals((339).ToString())) - return TextFieldType.DTC_DATE_OF_EXPIRY; - - if (value.Equals((340).ToString())) - return TextFieldType.GNIB_NUMBER; - - if (value.Equals((341).ToString())) - return TextFieldType.DEPT_NUMBER; - - if (value.Equals((342).ToString())) - return TextFieldType.TELEX_CODE; - - if (value.Equals((343).ToString())) - return TextFieldType.ALLERGIES; - - if (value.Equals((344).ToString())) - return TextFieldType.SP_CODE; - - if (value.Equals((345).ToString())) - return TextFieldType.COURT_CODE; - - if (value.Equals((346).ToString())) - return TextFieldType.CTY; - - if (value.Equals((347).ToString())) - return TextFieldType.SPONSOR_SSN; - - if (value.Equals((348).ToString())) - return TextFieldType.DOD_NUMBER; - - if (value.Equals((349).ToString())) - return TextFieldType.MC_NOVICE_DATE; - - if (value.Equals((350).ToString())) - return TextFieldType.DUF_NUMBER; - - if (value.Equals((351).ToString())) - return TextFieldType.AGY; - - if (value.Equals((352).ToString())) - return TextFieldType.PNR_CODE; - - if (value.Equals((353).ToString())) - return TextFieldType.FROM_AIRPORT_CODE; - - if (value.Equals((354).ToString())) - return TextFieldType.TO_AIRPORT_CODE; - - if (value.Equals((355).ToString())) - return TextFieldType.FLIGHT_NUMBER; - - if (value.Equals((356).ToString())) - return TextFieldType.DATE_OF_FLIGHT; - - if (value.Equals((357).ToString())) - return TextFieldType.SEAT_NUMBER; - - if (value.Equals((358).ToString())) - return TextFieldType.DATE_OF_ISSUE_BOARDING_PASS; - - if (value.Equals((359).ToString())) - return TextFieldType.CCW_UNTIL; - - if (value.Equals((360).ToString())) - return TextFieldType.REFERENCE_NUMBER_CHECKSUM; - - if (value.Equals((361).ToString())) - return TextFieldType.REFERENCE_NUMBER_CHECK_DIGIT; - - if (value.Equals((362).ToString())) - return TextFieldType.ROOM_NUMBER; - - if (value.Equals((363).ToString())) - return TextFieldType.RELIGION; - - if (value.Equals((364).ToString())) - return TextFieldType.REMAINDER_TERM; - - if (value.Equals((365).ToString())) - return TextFieldType.ELECTRONIC_TICKET_INDICATOR; - - if (value.Equals((366).ToString())) - return TextFieldType.COMPARTMENT_CODE; - - if (value.Equals((367).ToString())) - return TextFieldType.CHECK_IN_SEQUENCE_NUMBER; - - if (value.Equals((368).ToString())) - return TextFieldType.AIRLINE_DESIGNATOR_OF_BOARDING_PASS_ISSUER; - - if (value.Equals((369).ToString())) - return TextFieldType.AIRLINE_NUMERIC_CODE; - - if (value.Equals((370).ToString())) - return TextFieldType.TICKET_NUMBER; - - if (value.Equals((371).ToString())) - return TextFieldType.FREQUENT_FLYER_AIRLINE_DESIGNATOR; - - if (value.Equals((372).ToString())) - return TextFieldType.FREQUENT_FLYER_NUMBER; - - if (value.Equals((373).ToString())) - return TextFieldType.FREE_BAGGAGE_ALLOWANCE; - - if (value.Equals((374).ToString())) - return TextFieldType.PDF417_CODEC; - - if (value.Equals((375).ToString())) - return TextFieldType.IDENTITY_CARD_NUMBER_CHECKSUM; - - if (value.Equals((376).ToString())) - return TextFieldType.IDENTITY_CARD_NUMBER_CHECK_DIGIT; - - if (value.Equals((377).ToString())) - return TextFieldType.VETERAN; - - if (value.Equals((378).ToString())) - return TextFieldType.DL_CLASS_CODE_A1_FROM; - - if (value.Equals((379).ToString())) - return TextFieldType.DL_CLASS_CODE_A1_TO; - - if (value.Equals((380).ToString())) - return TextFieldType.DL_CLASS_CODE_A1_NOTES; - - if (value.Equals((381).ToString())) - return TextFieldType.DL_CLASS_CODE_A_FROM; - - if (value.Equals((382).ToString())) - return TextFieldType.DL_CLASS_CODE_A_TO; - - if (value.Equals((383).ToString())) - return TextFieldType.DL_CLASS_CODE_A_NOTES; - - if (value.Equals((384).ToString())) - return TextFieldType.DL_CLASS_CODE_B_FROM; - - if (value.Equals((385).ToString())) - return TextFieldType.DL_CLASS_CODE_B_TO; - - if (value.Equals((386).ToString())) - return TextFieldType.DL_CLASS_CODE_B_NOTES; - - if (value.Equals((387).ToString())) - return TextFieldType.DL_CLASS_CODE_C1_FROM; - - if (value.Equals((388).ToString())) - return TextFieldType.DL_CLASS_CODE_C1_TO; - - if (value.Equals((389).ToString())) - return TextFieldType.DL_CLASS_CODE_C1_NOTES; - - if (value.Equals((390).ToString())) - return TextFieldType.DL_CLASS_CODE_C_FROM; - - if (value.Equals((391).ToString())) - return TextFieldType.DL_CLASS_CODE_C_TO; - - if (value.Equals((392).ToString())) - return TextFieldType.DL_CLASS_CODE_C_NOTES; - - if (value.Equals((393).ToString())) - return TextFieldType.DL_CLASS_CODE_D1_FROM; - - if (value.Equals((394).ToString())) - return TextFieldType.DL_CLASS_CODE_D1_TO; - - if (value.Equals((395).ToString())) - return TextFieldType.DL_CLASS_CODE_D1_NOTES; - - if (value.Equals((396).ToString())) - return TextFieldType.DL_CLASS_CODE_D_FROM; - - if (value.Equals((397).ToString())) - return TextFieldType.DL_CLASS_CODE_D_TO; - - if (value.Equals((398).ToString())) - return TextFieldType.DL_CLASS_CODE_D_NOTES; - - if (value.Equals((399).ToString())) - return TextFieldType.DL_CLASS_CODE_BE_FROM; - - if (value.Equals((400).ToString())) - return TextFieldType.DL_CLASS_CODE_BE_TO; - - if (value.Equals((401).ToString())) - return TextFieldType.DL_CLASS_CODE_BE_NOTES; - - if (value.Equals((402).ToString())) - return TextFieldType.DL_CLASS_CODE_C1E_FROM; - - if (value.Equals((403).ToString())) - return TextFieldType.DL_CLASS_CODE_C1E_TO; - - if (value.Equals((404).ToString())) - return TextFieldType.DL_CLASS_CODE_C1E_NOTES; - - if (value.Equals((405).ToString())) - return TextFieldType.DL_CLASS_CODE_CE_FROM; - - if (value.Equals((406).ToString())) - return TextFieldType.DL_CLASS_CODE_CE_TO; - - if (value.Equals((407).ToString())) - return TextFieldType.DL_CLASS_CODE_CE_NOTES; - - if (value.Equals((408).ToString())) - return TextFieldType.DL_CLASS_CODE_D1E_FROM; - - if (value.Equals((409).ToString())) - return TextFieldType.DL_CLASS_CODE_D1E_TO; - - if (value.Equals((410).ToString())) - return TextFieldType.DL_CLASS_CODE_D1E_NOTES; - - if (value.Equals((411).ToString())) - return TextFieldType.DL_CLASS_CODE_DE_FROM; - - if (value.Equals((412).ToString())) - return TextFieldType.DL_CLASS_CODE_DE_TO; - - if (value.Equals((413).ToString())) - return TextFieldType.DL_CLASS_CODE_DE_NOTES; - - if (value.Equals((414).ToString())) - return TextFieldType.DL_CLASS_CODE_M_FROM; - - if (value.Equals((415).ToString())) - return TextFieldType.DL_CLASS_CODE_M_TO; - - if (value.Equals((416).ToString())) - return TextFieldType.DL_CLASS_CODE_M_NOTES; - - if (value.Equals((417).ToString())) - return TextFieldType.DL_CLASS_CODE_L_FROM; - - if (value.Equals((418).ToString())) - return TextFieldType.DL_CLASS_CODE_L_TO; - - if (value.Equals((419).ToString())) - return TextFieldType.DL_CLASS_CODE_L_NOTES; - - if (value.Equals((420).ToString())) - return TextFieldType.DL_CLASS_CODE_T_FROM; - - if (value.Equals((421).ToString())) - return TextFieldType.DL_CLASS_CODE_T_TO; - - if (value.Equals((422).ToString())) - return TextFieldType.DL_CLASS_CODE_T_NOTES; - - if (value.Equals((423).ToString())) - return TextFieldType.DL_CLASS_CODE_AM_FROM; - - if (value.Equals((424).ToString())) - return TextFieldType.DL_CLASS_CODE_AM_TO; - - if (value.Equals((425).ToString())) - return TextFieldType.DL_CLASS_CODE_AM_NOTES; - - if (value.Equals((426).ToString())) - return TextFieldType.DL_CLASS_CODE_A2_FROM; - - if (value.Equals((427).ToString())) - return TextFieldType.DL_CLASS_CODE_A2_TO; - - if (value.Equals((428).ToString())) - return TextFieldType.DL_CLASS_CODE_A2_NOTES; - - if (value.Equals((429).ToString())) - return TextFieldType.DL_CLASS_CODE_B1_FROM; - - if (value.Equals((430).ToString())) - return TextFieldType.DL_CLASS_CODE_B1_TO; - - if (value.Equals((431).ToString())) - return TextFieldType.DL_CLASS_CODE_B1_NOTES; - - if (value.Equals((432).ToString())) - return TextFieldType.SURNAME_AT_BIRTH; - - if (value.Equals((433).ToString())) - return TextFieldType.CIVIL_STATUS; - - if (value.Equals((434).ToString())) - return TextFieldType.NUMBER_OF_SEATS; - - if (value.Equals((435).ToString())) - return TextFieldType.NUMBER_OF_STANDING_PLACES; - - if (value.Equals((436).ToString())) - return TextFieldType.MAX_SPEED; - - if (value.Equals((437).ToString())) - return TextFieldType.FUEL_TYPE; - - if (value.Equals((438).ToString())) - return TextFieldType.EC_ENVIRONMENTAL_TYPE; - - if (value.Equals((439).ToString())) - return TextFieldType.POWER_WEIGHT_RATIO; - - if (value.Equals((440).ToString())) - return TextFieldType.MAX_MASS_OF_TRAILER_BRAKED; - - if (value.Equals((441).ToString())) - return TextFieldType.MAX_MASS_OF_TRAILER_UNBRAKED; - - if (value.Equals((442).ToString())) - return TextFieldType.TRANSMISSION_TYPE; - - if (value.Equals((443).ToString())) - return TextFieldType.TRAILER_HITCH; - - if (value.Equals((444).ToString())) - return TextFieldType.ACCOMPANIED_BY; - - if (value.Equals((445).ToString())) - return TextFieldType.POLICE_DISTRICT; - - if (value.Equals((446).ToString())) - return TextFieldType.FIRST_ISSUE_DATE; - - if (value.Equals((447).ToString())) - return TextFieldType.PAYLOAD_CAPACITY; - - if (value.Equals((448).ToString())) - return TextFieldType.NUMBER_OF_AXLES; - - if (value.Equals((449).ToString())) - return TextFieldType.PERMISSIBLE_AXLE_LOAD; - - if (value.Equals((450).ToString())) - return TextFieldType.PRECINCT; - - if (value.Equals((451).ToString())) - return TextFieldType.INVITED_BY; - - if (value.Equals((452).ToString())) - return TextFieldType.PURPOSE_OF_ENTRY; - - if (value.Equals((453).ToString())) - return TextFieldType.SKIN_COLOR; - - if (value.Equals((454).ToString())) - return TextFieldType.COMPLEXION; - - if (value.Equals((455).ToString())) - return TextFieldType.AIRPORT_FROM; - - if (value.Equals((456).ToString())) - return TextFieldType.AIRPORT_TO; - - if (value.Equals((457).ToString())) - return TextFieldType.AIRLINE_NAME; - - if (value.Equals((458).ToString())) - return TextFieldType.AIRLINE_NAME_FREQUENT_FLYER; - - if (value.Equals((459).ToString())) - return TextFieldType.LICENSE_NUMBER; - - if (value.Equals((460).ToString())) - return TextFieldType.IN_TANKS; - - if (value.Equals((461).ToString())) - return TextFieldType.EXCEPT_IN_TANKS; - - if (value.Equals((462).ToString())) - return TextFieldType.FAST_TRACK; - - if (value.Equals((463).ToString())) - return TextFieldType.OWNER; - - if (value.Equals((464).ToString())) - return TextFieldType.MRZ_STRINGS_ICAO_RFID; - - if (value.Equals((465).ToString())) - return TextFieldType.NUMBER_OF_CARD_ISSUANCE; - - if (value.Equals((466).ToString())) - return TextFieldType.NUMBER_OF_CARD_ISSUANCE_CHECKSUM; - - if (value.Equals((467).ToString())) - return TextFieldType.NUMBER_OF_CARD_ISSUANCE_CHECK_DIGIT; - - if (value.Equals((468).ToString())) - return TextFieldType.CENTURY_DATE_OF_BIRTH; - - if (value.Equals((469).ToString())) - return TextFieldType.DL_CLASS_CODE_A3_FROM; - - if (value.Equals((470).ToString())) - return TextFieldType.DL_CLASS_CODE_A3_TO; - - if (value.Equals((471).ToString())) - return TextFieldType.DL_CLASS_CODE_A3_NOTES; - - if (value.Equals((472).ToString())) - return TextFieldType.DL_CLASS_CODE_C2_FROM; - - if (value.Equals((473).ToString())) - return TextFieldType.DL_CLASS_CODE_C2_TO; - - if (value.Equals((474).ToString())) - return TextFieldType.DL_CLASS_CODE_C2_NOTES; - - if (value.Equals((475).ToString())) - return TextFieldType.DL_CLASS_CODE_B2_FROM; - - if (value.Equals((476).ToString())) - return TextFieldType.DL_CLASS_CODE_B2_TO; - - if (value.Equals((477).ToString())) - return TextFieldType.DL_CLASS_CODE_B2_NOTES; - - if (value.Equals((478).ToString())) - return TextFieldType.DL_CLASS_CODE_D2_FROM; - - if (value.Equals((479).ToString())) - return TextFieldType.DL_CLASS_CODE_D2_TO; - - if (value.Equals((480).ToString())) - return TextFieldType.DL_CLASS_CODE_D2_NOTES; - - if (value.Equals((481).ToString())) - return TextFieldType.DL_CLASS_CODE_B2E_FROM; - - if (value.Equals((482).ToString())) - return TextFieldType.DL_CLASS_CODE_B2E_TO; - - if (value.Equals((483).ToString())) - return TextFieldType.DL_CLASS_CODE_B2E_NOTES; - - if (value.Equals((484).ToString())) - return TextFieldType.DL_CLASS_CODE_G_FROM; - - if (value.Equals((485).ToString())) - return TextFieldType.DL_CLASS_CODE_G_TO; - - if (value.Equals((486).ToString())) - return TextFieldType.DL_CLASS_CODE_G_NOTES; - - if (value.Equals((487).ToString())) - return TextFieldType.DL_CLASS_CODE_J_FROM; - - if (value.Equals((488).ToString())) - return TextFieldType.DL_CLASS_CODE_J_TO; - - if (value.Equals((489).ToString())) - return TextFieldType.DL_CLASS_CODE_J_NOTES; - - if (value.Equals((490).ToString())) - return TextFieldType.DL_CLASS_CODE_LC_FROM; - - if (value.Equals((491).ToString())) - return TextFieldType.DL_CLASS_CODE_LC_TO; - - if (value.Equals((492).ToString())) - return TextFieldType.DL_CLASS_CODE_LC_NOTES; - - if (value.Equals((493).ToString())) - return TextFieldType.BANK_CARD_NUMBER; - - if (value.Equals((494).ToString())) - return TextFieldType.BANK_CARD_VALID_THRU; - - if (value.Equals((495).ToString())) - return TextFieldType.TAX_NUMBER; - - if (value.Equals((496).ToString())) - return TextFieldType.HEALTH_NUMBER; - - if (value.Equals((497).ToString())) - return TextFieldType.GRANDFATHER_NAME; - - if (value.Equals((498).ToString())) - return TextFieldType.SELECTEE_INDICATOR; - - if (value.Equals((499).ToString())) - return TextFieldType.MOTHER_SURNAME; - - if (value.Equals((500).ToString())) - return TextFieldType.MOTHER_GIVEN_NAME; - - if (value.Equals((501).ToString())) - return TextFieldType.FATHER_SURNAME; - - if (value.Equals((502).ToString())) - return TextFieldType.FATHER_GIVEN_NAME; - - if (value.Equals((503).ToString())) - return TextFieldType.MOTHER_DATE_OF_BIRTH; - - if (value.Equals((504).ToString())) - return TextFieldType.FATHER_DATE_OF_BIRTH; - - if (value.Equals((505).ToString())) - return TextFieldType.MOTHER_PERSONAL_NUMBER; - - if (value.Equals((506).ToString())) - return TextFieldType.FATHER_PERSONAL_NUMBER; - - if (value.Equals((507).ToString())) - return TextFieldType.MOTHER_PLACE_OF_BIRTH; - - if (value.Equals((508).ToString())) - return TextFieldType.FATHER_PLACE_OF_BIRTH; - - if (value.Equals((509).ToString())) - return TextFieldType.MOTHER_COUNTRY_OF_BIRTH; - - if (value.Equals((510).ToString())) - return TextFieldType.FATHER_COUNTRY_OF_BIRTH; - - if (value.Equals((511).ToString())) - return TextFieldType.DATE_FIRST_RENEWAL; - - if (value.Equals((512).ToString())) - return TextFieldType.DATE_SECOND_RENEWAL; - - if (value.Equals((513).ToString())) - return TextFieldType.PLACE_OF_EXAMINATION; - - if (value.Equals((514).ToString())) - return TextFieldType.APPLICATION_NUMBER; - - if (value.Equals((515).ToString())) - return TextFieldType.VOUCHER_NUMBER; - - if (value.Equals((516).ToString())) - return TextFieldType.AUTHORIZATION_NUMBER; - - if (value.Equals((517).ToString())) - return TextFieldType.FACULTY; - - if (value.Equals((518).ToString())) - return TextFieldType.FORM_OF_EDUCATION; - - if (value.Equals((519).ToString())) - return TextFieldType.DNI_NUMBER; - - if (value.Equals((520).ToString())) - return TextFieldType.RETIREMENT_NUMBER; - - if (value.Equals((521).ToString())) - return TextFieldType.PROFESSIONAL_ID_NUMBER; - - if (value.Equals((522).ToString())) - return TextFieldType.AGE_AT_ISSUE; - - if (value.Equals((523).ToString())) - return TextFieldType.YEARS_SINCE_ISSUE; - - if (value.Equals((524).ToString())) - return TextFieldType.DL_CLASS_CODE_BTP_FROM; - - if (value.Equals((525).ToString())) - return TextFieldType.DL_CLASS_CODE_BTP_NOTES; - - if (value.Equals((526).ToString())) - return TextFieldType.DL_CLASS_CODE_BTP_TO; - - if (value.Equals((527).ToString())) - return TextFieldType.DL_CLASS_CODE_C3_FROM; - - if (value.Equals((528).ToString())) - return TextFieldType.DL_CLASS_CODE_C3_NOTES; - - if (value.Equals((529).ToString())) - return TextFieldType.DL_CLASS_CODE_C3_TO; - - if (value.Equals((530).ToString())) - return TextFieldType.DL_CLASS_CODE_E_FROM; - - if (value.Equals((531).ToString())) - return TextFieldType.DL_CLASS_CODE_E_NOTES; - - if (value.Equals((532).ToString())) - return TextFieldType.DL_CLASS_CODE_E_TO; - - if (value.Equals((533).ToString())) - return TextFieldType.DL_CLASS_CODE_F_FROM; - - if (value.Equals((534).ToString())) - return TextFieldType.DL_CLASS_CODE_F_NOTES; - - if (value.Equals((535).ToString())) - return TextFieldType.DL_CLASS_CODE_F_TO; - - if (value.Equals((536).ToString())) - return TextFieldType.DL_CLASS_CODE_FA_FROM; - - if (value.Equals((537).ToString())) - return TextFieldType.DL_CLASS_CODE_FA_NOTES; - - if (value.Equals((538).ToString())) - return TextFieldType.DL_CLASS_CODE_FA_TO; - - if (value.Equals((539).ToString())) - return TextFieldType.DL_CLASS_CODE_FA1_FROM; - - if (value.Equals((540).ToString())) - return TextFieldType.DL_CLASS_CODE_FA1_NOTES; - - if (value.Equals((541).ToString())) - return TextFieldType.DL_CLASS_CODE_FA1_TO; - - if (value.Equals((542).ToString())) - return TextFieldType.DL_CLASS_CODE_FB_FROM; - - if (value.Equals((543).ToString())) - return TextFieldType.DL_CLASS_CODE_FB_NOTES; - - if (value.Equals((544).ToString())) - return TextFieldType.DL_CLASS_CODE_FB_TO; - - if (value.Equals((545).ToString())) - return TextFieldType.DL_CLASS_CODE_G1_FROM; - - if (value.Equals((546).ToString())) - return TextFieldType.DL_CLASS_CODE_G1_NOTES; - - if (value.Equals((547).ToString())) - return TextFieldType.DL_CLASS_CODE_G1_TO; - - if (value.Equals((548).ToString())) - return TextFieldType.DL_CLASS_CODE_H_FROM; - - if (value.Equals((549).ToString())) - return TextFieldType.DL_CLASS_CODE_H_NOTES; - - if (value.Equals((550).ToString())) - return TextFieldType.DL_CLASS_CODE_H_TO; - - if (value.Equals((551).ToString())) - return TextFieldType.DL_CLASS_CODE_I_FROM; - - if (value.Equals((552).ToString())) - return TextFieldType.DL_CLASS_CODE_I_NOTES; - - if (value.Equals((553).ToString())) - return TextFieldType.DL_CLASS_CODE_I_TO; - - if (value.Equals((554).ToString())) - return TextFieldType.DL_CLASS_CODE_K_FROM; - - if (value.Equals((555).ToString())) - return TextFieldType.DL_CLASS_CODE_K_NOTES; - - if (value.Equals((556).ToString())) - return TextFieldType.DL_CLASS_CODE_K_TO; - - if (value.Equals((557).ToString())) - return TextFieldType.DL_CLASS_CODE_LK_FROM; - - if (value.Equals((558).ToString())) - return TextFieldType.DL_CLASS_CODE_LK_NOTES; - - if (value.Equals((559).ToString())) - return TextFieldType.DL_CLASS_CODE_LK_TO; - - if (value.Equals((560).ToString())) - return TextFieldType.DL_CLASS_CODE_N_FROM; - - if (value.Equals((561).ToString())) - return TextFieldType.DL_CLASS_CODE_N_NOTES; - - if (value.Equals((562).ToString())) - return TextFieldType.DL_CLASS_CODE_N_TO; - - if (value.Equals((563).ToString())) - return TextFieldType.DL_CLASS_CODE_S_FROM; - - if (value.Equals((564).ToString())) - return TextFieldType.DL_CLASS_CODE_S_NOTES; - - if (value.Equals((565).ToString())) - return TextFieldType.DL_CLASS_CODE_S_TO; - - if (value.Equals((566).ToString())) - return TextFieldType.DL_CLASS_CODE_TB_FROM; - - if (value.Equals((567).ToString())) - return TextFieldType.DL_CLASS_CODE_TB_NOTES; - - if (value.Equals((568).ToString())) - return TextFieldType.DL_CLASS_CODE_TB_TO; - - if (value.Equals((569).ToString())) - return TextFieldType.DL_CLASS_CODE_TM_FROM; - - if (value.Equals((570).ToString())) - return TextFieldType.DL_CLASS_CODE_TM_NOTES; - - if (value.Equals((571).ToString())) - return TextFieldType.DL_CLASS_CODE_TM_TO; - - if (value.Equals((572).ToString())) - return TextFieldType.DL_CLASS_CODE_TR_FROM; - - if (value.Equals((573).ToString())) - return TextFieldType.DL_CLASS_CODE_TR_NOTES; - - if (value.Equals((574).ToString())) - return TextFieldType.DL_CLASS_CODE_TR_TO; - - if (value.Equals((575).ToString())) - return TextFieldType.DL_CLASS_CODE_TV_FROM; - - if (value.Equals((576).ToString())) - return TextFieldType.DL_CLASS_CODE_TV_NOTES; - - if (value.Equals((577).ToString())) - return TextFieldType.DL_CLASS_CODE_TV_TO; - - if (value.Equals((578).ToString())) - return TextFieldType.DL_CLASS_CODE_V_FROM; - - if (value.Equals((579).ToString())) - return TextFieldType.DL_CLASS_CODE_V_NOTES; - - if (value.Equals((580).ToString())) - return TextFieldType.DL_CLASS_CODE_V_TO; - - if (value.Equals((581).ToString())) - return TextFieldType.DL_CLASS_CODE_W_FROM; - - if (value.Equals((582).ToString())) - return TextFieldType.DL_CLASS_CODE_W_NOTES; - - if (value.Equals((583).ToString())) - return TextFieldType.DL_CLASS_CODE_W_TO; - - if (value.Equals((584).ToString())) - return TextFieldType.URL; - - if (value.Equals((585).ToString())) - return TextFieldType.CALIBER; - - if (value.Equals((586).ToString())) - return TextFieldType.MODEL; - - if (value.Equals((587).ToString())) - return TextFieldType.MAKE; - - if (value.Equals((588).ToString())) - return TextFieldType.NUMBER_OF_CYLINDERS; - - if (value.Equals((589).ToString())) - return TextFieldType.SURNAME_OF_HUSBAND_AFTER_REGISTRATION; - - if (value.Equals((590).ToString())) - return TextFieldType.SURNAME_OF_WIFE_AFTER_REGISTRATION; - - if (value.Equals((591).ToString())) - return TextFieldType.DATE_OF_BIRTH_OF_WIFE; - - if (value.Equals((592).ToString())) - return TextFieldType.DATE_OF_BIRTH_OF_HUSBAND; - - if (value.Equals((593).ToString())) - return TextFieldType.CITIZENSHIP_OF_FIRST_PERSON; - - if (value.Equals((594).ToString())) - return TextFieldType.CITIZENSHIP_OF_SECOND_PERSON; - - if (value.Equals((595).ToString())) - return TextFieldType.CVV; - - if (value.Equals((596).ToString())) - return TextFieldType.DATE_OF_INSURANCE_EXPIRY; - - if (value.Equals((597).ToString())) - return TextFieldType.MORTGAGE_BY; - - if (value.Equals((598).ToString())) - return TextFieldType.OLD_DOCUMENT_NUMBER; - - if (value.Equals((599).ToString())) - return TextFieldType.OLD_DATE_OF_ISSUE; - - if (value.Equals((600).ToString())) - return TextFieldType.OLD_PLACE_OF_ISSUE; - - if (value.Equals((601).ToString())) - return TextFieldType.DL_CLASS_CODE_LR_FROM; - - if (value.Equals((602).ToString())) - return TextFieldType.DL_CLASS_CODE_LR_TO; - - if (value.Equals((603).ToString())) - return TextFieldType.DL_CLASS_CODE_LR_NOTES; - - if (value.Equals((604).ToString())) - return TextFieldType.DL_CLASS_CODE_MR_FROM; - - if (value.Equals((605).ToString())) - return TextFieldType.DL_CLASS_CODE_MR_TO; - - if (value.Equals((606).ToString())) - return TextFieldType.DL_CLASS_CODE_MR_NOTES; - - if (value.Equals((607).ToString())) - return TextFieldType.DL_CLASS_CODE_HR_FROM; - - if (value.Equals((608).ToString())) - return TextFieldType.DL_CLASS_CODE_HR_TO; - - if (value.Equals((609).ToString())) - return TextFieldType.DL_CLASS_CODE_HR_NOTES; - - if (value.Equals((610).ToString())) - return TextFieldType.DL_CLASS_CODE_HC_FROM; - - if (value.Equals((611).ToString())) - return TextFieldType.DL_CLASS_CODE_HC_TO; - - if (value.Equals((612).ToString())) - return TextFieldType.DL_CLASS_CODE_HC_NOTES; - - if (value.Equals((613).ToString())) - return TextFieldType.DL_CLASS_CODE_MC_FROM; - - if (value.Equals((614).ToString())) - return TextFieldType.DL_CLASS_CODE_MC_TO; - - if (value.Equals((615).ToString())) - return TextFieldType.DL_CLASS_CODE_MC_NOTES; - - if (value.Equals((616).ToString())) - return TextFieldType.DL_CLASS_CODE_RE_FROM; - - if (value.Equals((617).ToString())) - return TextFieldType.DL_CLASS_CODE_RE_TO; - - if (value.Equals((618).ToString())) - return TextFieldType.DL_CLASS_CODE_RE_NOTES; - - if (value.Equals((619).ToString())) - return TextFieldType.DL_CLASS_CODE_R_FROM; - - if (value.Equals((620).ToString())) - return TextFieldType.DL_CLASS_CODE_R_TO; - - if (value.Equals((621).ToString())) - return TextFieldType.DL_CLASS_CODE_R_NOTES; - - if (value.Equals((622).ToString())) - return TextFieldType.DL_CLASS_CODE_CA_FROM; - - if (value.Equals((623).ToString())) - return TextFieldType.DL_CLASS_CODE_CA_TO; - - if (value.Equals((624).ToString())) - return TextFieldType.DL_CLASS_CODE_CA_NOTES; - - if (value.Equals((625).ToString())) - return TextFieldType.CITIZENSHIP_STATUS; - - if (value.Equals((626).ToString())) - return TextFieldType.MILITARY_SERVICE_FROM; - - if (value.Equals((627).ToString())) - return TextFieldType.MILITARY_SERVICE_TO; - - if (value.Equals((628).ToString())) - return TextFieldType.DL_CLASS_CODE_NT_FROM; - - if (value.Equals((629).ToString())) - return TextFieldType.DL_CLASS_CODE_NT_TO; - - if (value.Equals((630).ToString())) - return TextFieldType.DL_CLASS_CODE_NT_NOTES; - - if (value.Equals((631).ToString())) - return TextFieldType.DL_CLASS_CODE_TN_FROM; - - if (value.Equals((632).ToString())) - return TextFieldType.DL_CLASS_CODE_TN_TO; - - if (value.Equals((633).ToString())) - return TextFieldType.DL_CLASS_CODE_TN_NOTES; - - if (value.Equals((634).ToString())) - return TextFieldType.DL_CLASS_CODE_D3_FROM; - - if (value.Equals((635).ToString())) - return TextFieldType.DL_CLASS_CODE_D3_TO; - - if (value.Equals((636).ToString())) - return TextFieldType.DL_CLASS_CODE_D3_NOTES; - - if (value.Equals((637).ToString())) - return TextFieldType.ALT_DATE_OF_EXPIRY; - - if (value.Equals((638).ToString())) - return TextFieldType.DL_CLASS_CODE_CD_FROM; - - if (value.Equals((639).ToString())) - return TextFieldType.DL_CLASS_CODE_CD_TO; - - if (value.Equals((640).ToString())) - return TextFieldType.DL_CLASS_CODE_CD_NOTES; - - if (value.Equals((641).ToString())) - return TextFieldType.ISSUER_IDENTIFICATION_NUMBER; - - if (value.Equals((642).ToString())) - return TextFieldType.PAYMENT_PERIOD_FROM; - - if (value.Equals((643).ToString())) - return TextFieldType.PAYMENT_PERIOD_TO; - - if (value.Equals((644).ToString())) - return TextFieldType.VACCINATION_CERTIFICATE_IDENTIFIER; - - if (value.Equals((645).ToString())) - return TextFieldType.FIRST_NAME; - - if (value.Equals((646).ToString())) - return TextFieldType.DATE_OF_ARRIVAL; - - if (value.Equals((647).ToString())) - return TextFieldType.SECOND_NAME; - - if (value.Equals((648).ToString())) - return TextFieldType.THIRD_NAME; - - if (value.Equals((649).ToString())) - return TextFieldType.FOURTH_NAME; - - if (value.Equals((650).ToString())) - return TextFieldType.LAST_NAME; - - if (value.Equals((651).ToString())) - return TextFieldType.DL_CLASS_CODE_RM_FROM; - - if (value.Equals((652).ToString())) - return TextFieldType.DL_CLASS_CODE_RM_NOTES; - - if (value.Equals((653).ToString())) - return TextFieldType.DL_CLASS_CODE_RM_TO; - - if (value.Equals((654).ToString())) - return TextFieldType.DL_CLASS_CODE_PW_FROM; - - if (value.Equals((655).ToString())) - return TextFieldType.DL_CLASS_CODE_PW_NOTES; - - if (value.Equals((656).ToString())) - return TextFieldType.DL_CLASS_CODE_PW_TO; - - if (value.Equals((657).ToString())) - return TextFieldType.DL_CLASS_CODE_EB_FROM; - - if (value.Equals((658).ToString())) - return TextFieldType.DL_CLASS_CODE_EB_NOTES; - - if (value.Equals((659).ToString())) - return TextFieldType.DL_CLASS_CODE_EB_TO; - - if (value.Equals((660).ToString())) - return TextFieldType.DL_CLASS_CODE_EC_FROM; - - if (value.Equals((661).ToString())) - return TextFieldType.DL_CLASS_CODE_EC_NOTES; - - if (value.Equals((662).ToString())) - return TextFieldType.DL_CLASS_CODE_EC_TO; - - if (value.Equals((663).ToString())) - return TextFieldType.DL_CLASS_CODE_EC1_FROM; - - if (value.Equals((664).ToString())) - return TextFieldType.DL_CLASS_CODE_EC1_NOTES; - - if (value.Equals((665).ToString())) - return TextFieldType.DL_CLASS_CODE_EC1_TO; - - if (value.Equals((666).ToString())) - return TextFieldType.PLACE_OF_BIRTH_CITY; - - if (value.Equals((667).ToString())) - return TextFieldType.YEAR_OF_BIRTH; - - if (value.Equals((668).ToString())) - return TextFieldType.YEAR_OF_EXPIRY; - - if (value.Equals((669).ToString())) - return TextFieldType.GRANDFATHER_NAME_MATERNAL; - - if (value.Equals((670).ToString())) - return TextFieldType.FIRST_SURNAME; - - if (value.Equals((671).ToString())) - return TextFieldType.MONTH_OF_BIRTH; - - if (value.Equals((672).ToString())) - return TextFieldType.ADDRESS_FLOOR_NUMBER; - - if (value.Equals((673).ToString())) - return TextFieldType.ADDRESS_ENTRANCE; - - if (value.Equals((674).ToString())) - return TextFieldType.ADDRESS_BLOCK_NUMBER; - - if (value.Equals((675).ToString())) - return TextFieldType.ADDRESS_STREET_NUMBER; - - if (value.Equals((676).ToString())) - return TextFieldType.ADDRESS_STREET_TYPE; - - if (value.Equals((677).ToString())) - return TextFieldType.ADDRESS_CITY_SECTOR; - - if (value.Equals((678).ToString())) - return TextFieldType.ADDRESS_COUNTY_TYPE; - - if (value.Equals((679).ToString())) - return TextFieldType.ADDRESS_CITY_TYPE; - - if (value.Equals((680).ToString())) - return TextFieldType.ADDRESS_BUILDING_TYPE; - - if (value.Equals((681).ToString())) - return TextFieldType.DATE_OF_RETIREMENT; - - if (value.Equals((682).ToString())) - return TextFieldType.DOCUMENT_STATUS; - - if (value.Equals((683).ToString())) - return TextFieldType.SIGNATURE; - - if (value.Equals((684).ToString())) - return TextFieldType.FT_UNIQUE_CERTIFICATE_IDENTIFIER; - - if (value.Equals((685).ToString())) - return TextFieldType.FT_EMAIL; - - if (value.Equals((686).ToString())) - return TextFieldType.FT_DATE_OF_SPECIMEN_COLLECTION; - - if (value.Equals((687).ToString())) - return TextFieldType.FT_TYPE_OF_TESTING; - - if (value.Equals((688).ToString())) - return TextFieldType.FT_RESULT_OF_TESTING; - - if (value.Equals((689).ToString())) - return TextFieldType.FT_METHOD_OF_TESTING; - - if (value.Equals((690).ToString())) - return TextFieldType.FT_DIGITAL_TRAVEL_AUTHORIZATION_NUMBER; - - if (value.Equals((691).ToString())) - return TextFieldType.FT_DATE_OF_FIRST_POSITIVE_TEST_RESULT; - - if (value.Equals((692).ToString())) - return TextFieldType.EF_CARD_ACCESS; - - if (value.Equals((693).ToString())) - return TextFieldType.SHORT_FLIGHT_NUMBER; - - if (value.Equals((694).ToString())) - return TextFieldType.AIRLINE_CODE; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(TextFieldType value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class TextFieldTypeJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override TextFieldType Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - TextFieldType? result = rawValue == null - ? null - : TextFieldTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the TextFieldType to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextFieldType textFieldType, JsonSerializerOptions options) - { - writer.WriteStringValue(textFieldType.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class TextFieldTypeNullableJsonConverter : JsonConverter - { - /// - /// Returns a TextFieldType from the Json object - /// - /// - /// - /// - /// - public override TextFieldType? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - TextFieldType? result = rawValue == null - ? null - : TextFieldTypeValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextFieldType? textFieldType, JsonSerializerOptions options) - { - writer.WriteStringValue(textFieldType?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs index a65d57f..7fda81a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,150 +14,125 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TextFieldValue /// + [DataContract(Name = "TextFieldValue")] public partial class TextFieldValue : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// source - /// Parsed/processed value. Date format converted for output, delimiters removed - /// originalValidity - /// Page index of the image from input list - /// Min recognition probability. Combined minimum probability from single characters probabilities - /// Original value as seen in the document - /// originalSymbols - /// fieldRect - /// rfidOrigin - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0) - [JsonConstructor] - public TextFieldValue(Source source, string value, CheckResult originalValidity, int pageIndex, int probability, Option originalValue = default, Option?> originalSymbols = default, Option fieldRect = default, Option rfidOrigin = default, Option containerType = default) - { - Source = source; - Value = value; - OriginalValidity = originalValidity; - PageIndex = pageIndex; - Probability = probability; - OriginalValueOption = originalValue; - OriginalSymbolsOption = originalSymbols; - FieldRectOption = fieldRect; - RfidOriginOption = rfidOrigin; - ContainerTypeOption = containerType; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets Source /// - [JsonPropertyName("source")] + [DataMember(Name = "source", IsRequired = true, EmitDefaultValue = true)] public Source Source { get; set; } /// /// Gets or Sets OriginalValidity /// - [JsonPropertyName("originalValidity")] + [DataMember(Name = "originalValidity", IsRequired = true, EmitDefaultValue = true)] public CheckResult OriginalValidity { get; set; } - /// - /// Parsed/processed value. Date format converted for output, delimiters removed + /// Initializes a new instance of the class. /// - /// Parsed/processed value. Date format converted for output, delimiters removed - [JsonPropertyName("value")] - public string Value { get; set; } - + [JsonConstructorAttribute] + protected TextFieldValue() { } /// - /// Page index of the image from input list - /// - /// Page index of the image from input list - [JsonPropertyName("pageIndex")] - public int PageIndex { get; set; } - - /// - /// Min recognition probability. Combined minimum probability from single characters probabilities + /// Initializes a new instance of the class. /// - /// Min recognition probability. Combined minimum probability from single characters probabilities - [JsonPropertyName("probability")] - public int Probability { get; set; } + /// source (required). + /// Parsed/processed value. Date format converted for output, delimiters removed (required). + /// Original value as seen in the document. + /// originalValidity (required). + /// originalSymbols. + /// Page index of the image from input list (required). + /// Min recognition probability. Combined minimum probability from single characters probabilities (required). + /// fieldRect. + /// rfidOrigin. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (default to 0). + public TextFieldValue(Source source = default(Source), string value = default(string), string originalValue = default(string), CheckResult originalValidity = default(CheckResult), List originalSymbols = default(List), int pageIndex = default(int), int probability = default(int), RectangleCoordinates fieldRect = default(RectangleCoordinates), RfidOrigin rfidOrigin = default(RfidOrigin), int containerType = 0) + { + this.Source = source; + // to ensure "value" is required (not null) + if (value == null) + { + throw new ArgumentNullException("value is a required property for TextFieldValue and cannot be null"); + } + this.Value = value; + this.OriginalValidity = originalValidity; + this.PageIndex = pageIndex; + this.Probability = probability; + this.OriginalValue = originalValue; + this.OriginalSymbols = originalSymbols; + this.FieldRect = fieldRect; + this.RfidOrigin = rfidOrigin; + this.ContainerType = containerType; + } /// - /// Used to track the state of OriginalValue + /// Parsed/processed value. Date format converted for output, delimiters removed /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OriginalValueOption { get; private set; } + /// Parsed/processed value. Date format converted for output, delimiters removed + [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] + public string Value { get; set; } /// /// Original value as seen in the document /// /// Original value as seen in the document - [JsonPropertyName("originalValue")] - public string? OriginalValue { get { return this.OriginalValueOption; } set { this.OriginalValueOption = new(value); } } - - /// - /// Used to track the state of OriginalSymbols - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> OriginalSymbolsOption { get; private set; } + [DataMember(Name = "originalValue", EmitDefaultValue = false)] + public string OriginalValue { get; set; } /// /// Gets or Sets OriginalSymbols /// - [JsonPropertyName("originalSymbols")] - public List? OriginalSymbols { get { return this.OriginalSymbolsOption; } set { this.OriginalSymbolsOption = new(value); } } + [DataMember(Name = "originalSymbols", EmitDefaultValue = false)] + public List OriginalSymbols { get; set; } /// - /// Used to track the state of FieldRect + /// Page index of the image from input list /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldRectOption { get; private set; } + /// Page index of the image from input list + [DataMember(Name = "pageIndex", IsRequired = true, EmitDefaultValue = true)] + public int PageIndex { get; set; } /// - /// Gets or Sets FieldRect + /// Min recognition probability. Combined minimum probability from single characters probabilities /// - [JsonPropertyName("fieldRect")] - public RectangleCoordinates? FieldRect { get { return this.FieldRectOption; } set { this.FieldRectOption = new(value); } } + /// Min recognition probability. Combined minimum probability from single characters probabilities + [DataMember(Name = "probability", IsRequired = true, EmitDefaultValue = true)] + public int Probability { get; set; } /// - /// Used to track the state of RfidOrigin + /// Gets or Sets FieldRect /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option RfidOriginOption { get; private set; } + [DataMember(Name = "fieldRect", EmitDefaultValue = false)] + public RectangleCoordinates FieldRect { get; set; } /// /// Gets or Sets RfidOrigin /// - [JsonPropertyName("rfidOrigin")] - public RfidOrigin? RfidOrigin { get { return this.RfidOriginOption; } set { this.RfidOriginOption = new(value); } } - - /// - /// Used to track the state of ContainerType - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ContainerTypeOption { get; private set; } + [DataMember(Name = "rfidOrigin", EmitDefaultValue = false)] + public RfidOrigin RfidOrigin { get; set; } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [JsonPropertyName("containerType")] - public int? ContainerType { get { return this.ContainerTypeOption; } set { this.ContainerTypeOption = new(value); } } + [DataMember(Name = "containerType", EmitDefaultValue = false)] + public int ContainerType { get; set; } /// /// Returns the string presentation of the object @@ -171,11 +144,11 @@ public override string ToString() sb.Append("class TextFieldValue {\n"); sb.Append(" Source: ").Append(Source).Append("\n"); sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" OriginalValue: ").Append(OriginalValue).Append("\n"); sb.Append(" OriginalValidity: ").Append(OriginalValidity).Append("\n"); + sb.Append(" OriginalSymbols: ").Append(OriginalSymbols).Append("\n"); sb.Append(" PageIndex: ").Append(PageIndex).Append("\n"); sb.Append(" Probability: ").Append(Probability).Append("\n"); - sb.Append(" OriginalValue: ").Append(OriginalValue).Append("\n"); - sb.Append(" OriginalSymbols: ").Append(OriginalSymbols).Append("\n"); sb.Append(" FieldRect: ").Append(FieldRect).Append("\n"); sb.Append(" RfidOrigin: ").Append(RfidOrigin).Append("\n"); sb.Append(" ContainerType: ").Append(ContainerType).Append("\n"); @@ -183,6 +156,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -206,219 +188,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TextFieldValueJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TextFieldValue Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option source = default; - Option value = default; - Option originalValidity = default; - Option pageIndex = default; - Option probability = default; - Option originalValue = default; - Option?> originalSymbols = default; - Option fieldRect = default; - Option rfidOrigin = default; - Option containerType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "source": - string? sourceRawValue = utf8JsonReader.GetString(); - if (sourceRawValue != null) - source = new Option(SourceValueConverter.FromStringOrDefault(sourceRawValue)); - break; - case "value": - value = new Option(utf8JsonReader.GetString()!); - break; - case "originalValidity": - string? originalValidityRawValue = utf8JsonReader.GetString(); - if (originalValidityRawValue != null) - originalValidity = new Option(CheckResultValueConverter.FromStringOrDefault(originalValidityRawValue)); - break; - case "pageIndex": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIndex = new Option(utf8JsonReader.GetInt32()); - break; - case "probability": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - probability = new Option(utf8JsonReader.GetInt32()); - break; - case "originalValue": - originalValue = new Option(utf8JsonReader.GetString()!); - break; - case "originalSymbols": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - originalSymbols = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "fieldRect": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldRect = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "rfidOrigin": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - rfidOrigin = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "containerType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - containerType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!source.IsSet) - throw new ArgumentException("Property is required for class TextFieldValue.", nameof(source)); - - if (!value.IsSet) - throw new ArgumentException("Property is required for class TextFieldValue.", nameof(value)); - - if (!originalValidity.IsSet) - throw new ArgumentException("Property is required for class TextFieldValue.", nameof(originalValidity)); - - if (!pageIndex.IsSet) - throw new ArgumentException("Property is required for class TextFieldValue.", nameof(pageIndex)); - - if (!probability.IsSet) - throw new ArgumentException("Property is required for class TextFieldValue.", nameof(probability)); - - if (source.IsSet && source.Value == null) - throw new ArgumentNullException(nameof(source), "Property is not nullable for class TextFieldValue."); - - if (value.IsSet && value.Value == null) - throw new ArgumentNullException(nameof(value), "Property is not nullable for class TextFieldValue."); - - if (originalValidity.IsSet && originalValidity.Value == null) - throw new ArgumentNullException(nameof(originalValidity), "Property is not nullable for class TextFieldValue."); - - if (pageIndex.IsSet && pageIndex.Value == null) - throw new ArgumentNullException(nameof(pageIndex), "Property is not nullable for class TextFieldValue."); - - if (probability.IsSet && probability.Value == null) - throw new ArgumentNullException(nameof(probability), "Property is not nullable for class TextFieldValue."); - - if (originalValue.IsSet && originalValue.Value == null) - throw new ArgumentNullException(nameof(originalValue), "Property is not nullable for class TextFieldValue."); - - if (originalSymbols.IsSet && originalSymbols.Value == null) - throw new ArgumentNullException(nameof(originalSymbols), "Property is not nullable for class TextFieldValue."); - - if (fieldRect.IsSet && fieldRect.Value == null) - throw new ArgumentNullException(nameof(fieldRect), "Property is not nullable for class TextFieldValue."); - - if (rfidOrigin.IsSet && rfidOrigin.Value == null) - throw new ArgumentNullException(nameof(rfidOrigin), "Property is not nullable for class TextFieldValue."); - - if (containerType.IsSet && containerType.Value == null) - throw new ArgumentNullException(nameof(containerType), "Property is not nullable for class TextFieldValue."); - - return new TextFieldValue(source.Value!.Value!, value.Value!, originalValidity.Value!.Value!, pageIndex.Value!.Value!, probability.Value!.Value!, originalValue, originalSymbols, fieldRect, rfidOrigin, containerType); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextFieldValue textFieldValue, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, textFieldValue, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TextFieldValue textFieldValue, JsonSerializerOptions jsonSerializerOptions) - { - if (textFieldValue.Value == null) - throw new ArgumentNullException(nameof(textFieldValue.Value), "Property is required for class TextFieldValue."); - - if (textFieldValue.OriginalValueOption.IsSet && textFieldValue.OriginalValue == null) - throw new ArgumentNullException(nameof(textFieldValue.OriginalValue), "Property is required for class TextFieldValue."); - - if (textFieldValue.OriginalSymbolsOption.IsSet && textFieldValue.OriginalSymbols == null) - throw new ArgumentNullException(nameof(textFieldValue.OriginalSymbols), "Property is required for class TextFieldValue."); - - if (textFieldValue.FieldRectOption.IsSet && textFieldValue.FieldRect == null) - throw new ArgumentNullException(nameof(textFieldValue.FieldRect), "Property is required for class TextFieldValue."); - - if (textFieldValue.RfidOriginOption.IsSet && textFieldValue.RfidOrigin == null) - throw new ArgumentNullException(nameof(textFieldValue.RfidOrigin), "Property is required for class TextFieldValue."); - - var sourceRawValue = SourceValueConverter.ToJsonValue(textFieldValue.Source); - writer.WriteString("source", sourceRawValue); - - writer.WriteString("value", textFieldValue.Value); - - var originalValidityRawValue = CheckResultValueConverter.ToJsonValue(textFieldValue.OriginalValidity); - writer.WriteNumber("originalValidity", originalValidityRawValue); - - writer.WriteNumber("pageIndex", textFieldValue.PageIndex); - - writer.WriteNumber("probability", textFieldValue.Probability); - - if (textFieldValue.OriginalValueOption.IsSet) - writer.WriteString("originalValue", textFieldValue.OriginalValue); - - if (textFieldValue.OriginalSymbolsOption.IsSet) - { - writer.WritePropertyName("originalSymbols"); - JsonSerializer.Serialize(writer, textFieldValue.OriginalSymbols, jsonSerializerOptions); - } - if (textFieldValue.FieldRectOption.IsSet) - { - writer.WritePropertyName("fieldRect"); - JsonSerializer.Serialize(writer, textFieldValue.FieldRect, jsonSerializerOptions); - } - if (textFieldValue.RfidOriginOption.IsSet) - { - writer.WritePropertyName("rfidOrigin"); - JsonSerializer.Serialize(writer, textFieldValue.RfidOrigin, jsonSerializerOptions); - } - if (textFieldValue.ContainerTypeOption.IsSet) - writer.WriteNumber("containerType", textFieldValue.ContainerTypeOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextItem.cs b/src/Regula.DocumentReader.WebClient/Model/TextItem.cs index cb055ad..6579e1c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,37 +14,47 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TextItem /// + [DataContract(Name = "TextItem")] public partial class TextItem : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// text - [JsonConstructor] - public TextItem(Text text) + [JsonConstructorAttribute] + protected TextItem() { } + /// + /// Initializes a new instance of the class. + /// + /// text (required). + public TextItem(Text text = default(Text)) { - Text = text; - OnCreated(); + // to ensure "text" is required (not null) + if (text == null) + { + throw new ArgumentNullException("text is a required property for TextItem and cannot be null"); + } + this.Text = text; } - partial void OnCreated(); - /// /// Gets or Sets Text /// - [JsonPropertyName("Text")] + [DataMember(Name = "Text", IsRequired = true, EmitDefaultValue = true)] public Text Text { get; set; } /// @@ -62,6 +70,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -73,93 +90,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TextItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TextItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option text = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Text": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - text = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (!text.IsSet) - throw new ArgumentException("Property is required for class TextItem.", nameof(text)); - - if (text.IsSet && text.Value == null) - throw new ArgumentNullException(nameof(text), "Property is not nullable for class TextItem."); - - return new TextItem(text.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextItem textItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, textItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TextItem textItem, JsonSerializerOptions jsonSerializerOptions) - { - if (textItem.Text == null) - throw new ArgumentNullException(nameof(textItem.Text), "Property is required for class TextItem."); - - writer.WritePropertyName("Text"); - JsonSerializer.Serialize(writer, textItem.Text, jsonSerializerOptions); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs b/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs index 7e2d66f..11ffb75 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextPostProcessing.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -51,141 +52,4 @@ public enum TextPostProcessing CAPITAL = 3 } - /// - /// Converts to and from the JSON value - /// - public static class TextPostProcessingValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static TextPostProcessing FromString(string value) - { - if (value.Equals((0).ToString())) - return TextPostProcessing.NO_CHANGE; - - if (value.Equals((1).ToString())) - return TextPostProcessing.UPPERCASE; - - if (value.Equals((2).ToString())) - return TextPostProcessing.LOWERCASE; - - if (value.Equals((3).ToString())) - return TextPostProcessing.CAPITAL; - - throw new NotImplementedException($"Could not convert value to type TextPostProcessing: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static TextPostProcessing? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return TextPostProcessing.NO_CHANGE; - - if (value.Equals((1).ToString())) - return TextPostProcessing.UPPERCASE; - - if (value.Equals((2).ToString())) - return TextPostProcessing.LOWERCASE; - - if (value.Equals((3).ToString())) - return TextPostProcessing.CAPITAL; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(TextPostProcessing value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class TextPostProcessingJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override TextPostProcessing Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - TextPostProcessing? result = rawValue == null - ? null - : TextPostProcessingValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the TextPostProcessing to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextPostProcessing textPostProcessing, JsonSerializerOptions options) - { - writer.WriteStringValue(textPostProcessing.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class TextPostProcessingNullableJsonConverter : JsonConverter - { - /// - /// Returns a TextPostProcessing from the Json object - /// - /// - /// - /// - /// - public override TextPostProcessing? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - TextPostProcessing? result = rawValue == null - ? null - : TextPostProcessingValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextPostProcessing? textPostProcessing, JsonSerializerOptions options) - { - writer.WriteStringValue(textPostProcessing?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs index 053ffef..b574494 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,41 +14,53 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using JsonSubTypes; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TextResult /// + [DataContract(Name = "TextResult")] public partial class TextResult : ResultItem, IValidatableObject { /// /// Initializes a new instance of the class. /// - /// text - /// bufLength - /// light - /// listIdx - /// pageIdx - [JsonConstructor] - public TextResult(Text text, Option bufLength = default, Option light = default, Option listIdx = default, Option pageIdx = default) : base(bufLength, light, listIdx, pageIdx) + [JsonConstructorAttribute] + protected TextResult() { } + /// + /// Initializes a new instance of the class. + /// + /// text (required). + /// bufLength. + /// light. + /// listIdx. + /// pageIdx. + /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). + public TextResult(Text text = default(Text), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) { - Text = text; - OnCreated(); + // to ensure "text" is required (not null) + if (text == null) + { + throw new ArgumentNullException("text is a required property for TextResult and cannot be null"); + } + this.Text = text; } - partial void OnCreated(); - /// /// Gets or Sets Text /// - [JsonPropertyName("Text")] + [DataMember(Name = "Text", IsRequired = true, EmitDefaultValue = true)] public Text Text { get; set; } /// @@ -61,156 +71,44 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TextResult {\n"); - sb.Append(" ").Append(base.ToString()?.Replace("\n", "\n ")).Append("\n"); + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); sb.Append(" Text: ").Append(Text).Append("\n"); sb.Append("}\n"); return sb.ToString(); } - } - /// - /// A Json converter for type - /// - public class TextResultJsonConverter : JsonConverter - { /// - /// Deserializes json to + /// Returns the JSON string presentation of the object /// - /// - /// - /// - /// - /// - public override TextResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) + /// JSON string presentation of the object + public override string ToJson() { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option text = default; - Option bufLength = default; - Option light = default; - Option listIdx = default; - Option pageIdx = default; - Option resultType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Text": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - text = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "buf_length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetInt32()); - break; - case "light": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - light = new Option(utf8JsonReader.GetInt32()); - break; - case "list_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - listIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "page_idx": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - pageIdx = new Option(utf8JsonReader.GetInt32()); - break; - case "result_type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - resultType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!text.IsSet) - throw new ArgumentException("Property is required for class TextResult.", nameof(text)); - - if (!resultType.IsSet) - throw new ArgumentException("Property is required for class TextResult.", nameof(resultType)); - - if (text.IsSet && text.Value == null) - throw new ArgumentNullException(nameof(text), "Property is not nullable for class TextResult."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class TextResult."); - - if (light.IsSet && light.Value == null) - throw new ArgumentNullException(nameof(light), "Property is not nullable for class TextResult."); - - if (listIdx.IsSet && listIdx.Value == null) - throw new ArgumentNullException(nameof(listIdx), "Property is not nullable for class TextResult."); - - if (pageIdx.IsSet && pageIdx.Value == null) - throw new ArgumentNullException(nameof(pageIdx), "Property is not nullable for class TextResult."); - - if (resultType.IsSet && resultType.Value == null) - throw new ArgumentNullException(nameof(resultType), "Property is not nullable for class TextResult."); - - return new TextResult(text.Value!, bufLength, light, listIdx, pageIdx); + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); } /// - /// Serializes a + /// To validate all properties of the instance /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TextResult textResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) { - writer.WriteStartObject(); - - WriteProperties(writer, textResult, jsonSerializerOptions); - writer.WriteEndObject(); + return this.BaseValidate(validationContext); } /// - /// Serializes the properties of + /// To validate all properties of the instance /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TextResult textResult, JsonSerializerOptions jsonSerializerOptions) + /// Validation context + /// Validation Result + protected IEnumerable BaseValidate(ValidationContext validationContext) { - if (textResult.Text == null) - throw new ArgumentNullException(nameof(textResult.Text), "Property is required for class TextResult."); - - writer.WritePropertyName("Text"); - JsonSerializer.Serialize(writer, textResult.Text, jsonSerializerOptions); - if (textResult.BufLengthOption.IsSet) - writer.WriteNumber("buf_length", textResult.BufLengthOption.Value!.Value); - - if (textResult.LightOption.IsSet) - writer.WriteNumber("light", textResult.LightOption.Value!.Value); - - if (textResult.ListIdxOption.IsSet) - writer.WriteNumber("list_idx", textResult.ListIdxOption.Value!.Value); - - if (textResult.PageIdxOption.IsSet) - writer.WriteNumber("page_idx", textResult.PageIdxOption.Value!.Value); - - writer.WriteNumber("result_type", textResult.ResultType); + foreach (var x in base.BaseValidate(validationContext)) + { + yield return x; + } + yield break; } } + } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs index 50df3c5..3c81ac9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,45 +14,38 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionImage /// + [DataContract(Name = "TransactionImage")] public partial class TransactionImage : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// image - [JsonConstructor] - public TransactionImage(Option image = default) + /// image. + public TransactionImage(ImagesFieldValue image = default(ImagesFieldValue)) { - ImageOption = image; - OnCreated(); + this.Image = image; } - partial void OnCreated(); - - /// - /// Used to track the state of Image - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ImageOption { get; private set; } - /// /// Gets or Sets Image /// - [JsonPropertyName("image")] - public ImagesFieldValue? Image { get { return this.ImageOption; } set { this.ImageOption = new(value); } } + [DataMember(Name = "image", EmitDefaultValue = false)] + public ImagesFieldValue Image { get; set; } /// /// Returns the string presentation of the object @@ -69,6 +60,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -80,93 +80,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TransactionImageJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TransactionImage Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option image = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "image": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - image = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (image.IsSet && image.Value == null) - throw new ArgumentNullException(nameof(image), "Property is not nullable for class TransactionImage."); - - return new TransactionImage(image); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TransactionImage transactionImage, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, transactionImage, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TransactionImage transactionImage, JsonSerializerOptions jsonSerializerOptions) - { - if (transactionImage.ImageOption.IsSet && transactionImage.Image == null) - throw new ArgumentNullException(nameof(transactionImage.Image), "Property is required for class TransactionImage."); - - if (transactionImage.ImageOption.IsSet) - { - writer.WritePropertyName("image"); - JsonSerializer.Serialize(writer, transactionImage.Image, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs index 0402e4f..77edee6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,157 +14,101 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionInfo /// + [DataContract(Name = "TransactionInfo")] public partial class TransactionInfo : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Computer name - /// Date and time - /// documentsDatabase - /// System information - /// Transaction tag - /// Transaction identifier - /// User name - /// SDK version - [JsonConstructor] - public TransactionInfo(Option computerName = default, Option dateTime = default, Option documentsDatabase = default, Option systemInfo = default, Option tag = default, Option transactionID = default, Option userName = default, Option varVersion = default) + /// Computer name. + /// Date and time. + /// documentsDatabase. + /// System information. + /// Transaction tag. + /// Transaction identifier. + /// User name. + /// SDK version. + public TransactionInfo(string computerName = default(string), string dateTime = default(string), DocumentsDatabase documentsDatabase = default(DocumentsDatabase), string systemInfo = default(string), string tag = default(string), string transactionID = default(string), string userName = default(string), string varVersion = default(string)) { - ComputerNameOption = computerName; - DateTimeOption = dateTime; - DocumentsDatabaseOption = documentsDatabase; - SystemInfoOption = systemInfo; - TagOption = tag; - TransactionIDOption = transactionID; - UserNameOption = userName; - VarVersionOption = varVersion; - OnCreated(); + this.ComputerName = computerName; + this.DateTime = dateTime; + this.DocumentsDatabase = documentsDatabase; + this.SystemInfo = systemInfo; + this.Tag = tag; + this.TransactionID = transactionID; + this.UserName = userName; + this.VarVersion = varVersion; } - partial void OnCreated(); - - /// - /// Used to track the state of ComputerName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ComputerNameOption { get; private set; } - /// /// Computer name /// /// Computer name - [JsonPropertyName("ComputerName")] - public string? ComputerName { get { return this.ComputerNameOption; } set { this.ComputerNameOption = new(value); } } - - /// - /// Used to track the state of DateTime - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DateTimeOption { get; private set; } + [DataMember(Name = "ComputerName", EmitDefaultValue = false)] + public string ComputerName { get; set; } /// /// Date and time /// /// Date and time - [JsonPropertyName("DateTime")] - public string? DateTime { get { return this.DateTimeOption; } set { this.DateTimeOption = new(value); } } - - /// - /// Used to track the state of DocumentsDatabase - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DocumentsDatabaseOption { get; private set; } + [DataMember(Name = "DateTime", EmitDefaultValue = false)] + public string DateTime { get; set; } /// /// Gets or Sets DocumentsDatabase /// - [JsonPropertyName("DocumentsDatabase")] - public DocumentsDatabase? DocumentsDatabase { get { return this.DocumentsDatabaseOption; } set { this.DocumentsDatabaseOption = new(value); } } - - /// - /// Used to track the state of SystemInfo - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SystemInfoOption { get; private set; } + [DataMember(Name = "DocumentsDatabase", EmitDefaultValue = false)] + public DocumentsDatabase DocumentsDatabase { get; set; } /// /// System information /// /// System information - [JsonPropertyName("SystemInfo")] - public string? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } - - /// - /// Used to track the state of Tag - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TagOption { get; private set; } + [DataMember(Name = "SystemInfo", EmitDefaultValue = false)] + public string SystemInfo { get; set; } /// /// Transaction tag /// /// Transaction tag - [JsonPropertyName("Tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } - - /// - /// Used to track the state of TransactionID - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TransactionIDOption { get; private set; } + [DataMember(Name = "Tag", EmitDefaultValue = false)] + public string Tag { get; set; } /// /// Transaction identifier /// /// Transaction identifier - [JsonPropertyName("TransactionID")] - public string? TransactionID { get { return this.TransactionIDOption; } set { this.TransactionIDOption = new(value); } } - - /// - /// Used to track the state of UserName - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option UserNameOption { get; private set; } + [DataMember(Name = "TransactionID", EmitDefaultValue = false)] + public string TransactionID { get; set; } /// /// User name /// /// User name - [JsonPropertyName("UserName")] - public string? UserName { get { return this.UserNameOption; } set { this.UserNameOption = new(value); } } - - /// - /// Used to track the state of VarVersion - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option VarVersionOption { get; private set; } + [DataMember(Name = "UserName", EmitDefaultValue = false)] + public string UserName { get; set; } /// /// SDK version /// /// SDK version - [JsonPropertyName("Version")] - public string? VarVersion { get { return this.VarVersionOption; } set { this.VarVersionOption = new(value); } } + [DataMember(Name = "Version", EmitDefaultValue = false)] + public string VarVersion { get; set; } /// /// Returns the string presentation of the object @@ -188,6 +130,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -199,183 +150,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TransactionInfoJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TransactionInfo Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option computerName = default; - Option dateTime = default; - Option documentsDatabase = default; - Option systemInfo = default; - Option tag = default; - Option transactionID = default; - Option userName = default; - Option varVersion = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "ComputerName": - computerName = new Option(utf8JsonReader.GetString()!); - break; - case "DateTime": - dateTime = new Option(utf8JsonReader.GetString()!); - break; - case "DocumentsDatabase": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - documentsDatabase = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "SystemInfo": - systemInfo = new Option(utf8JsonReader.GetString()!); - break; - case "Tag": - tag = new Option(utf8JsonReader.GetString()!); - break; - case "TransactionID": - transactionID = new Option(utf8JsonReader.GetString()!); - break; - case "UserName": - userName = new Option(utf8JsonReader.GetString()!); - break; - case "Version": - varVersion = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (computerName.IsSet && computerName.Value == null) - throw new ArgumentNullException(nameof(computerName), "Property is not nullable for class TransactionInfo."); - - if (dateTime.IsSet && dateTime.Value == null) - throw new ArgumentNullException(nameof(dateTime), "Property is not nullable for class TransactionInfo."); - - if (documentsDatabase.IsSet && documentsDatabase.Value == null) - throw new ArgumentNullException(nameof(documentsDatabase), "Property is not nullable for class TransactionInfo."); - - if (systemInfo.IsSet && systemInfo.Value == null) - throw new ArgumentNullException(nameof(systemInfo), "Property is not nullable for class TransactionInfo."); - - if (tag.IsSet && tag.Value == null) - throw new ArgumentNullException(nameof(tag), "Property is not nullable for class TransactionInfo."); - - if (transactionID.IsSet && transactionID.Value == null) - throw new ArgumentNullException(nameof(transactionID), "Property is not nullable for class TransactionInfo."); - - if (userName.IsSet && userName.Value == null) - throw new ArgumentNullException(nameof(userName), "Property is not nullable for class TransactionInfo."); - - if (varVersion.IsSet && varVersion.Value == null) - throw new ArgumentNullException(nameof(varVersion), "Property is not nullable for class TransactionInfo."); - - return new TransactionInfo(computerName, dateTime, documentsDatabase, systemInfo, tag, transactionID, userName, varVersion); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TransactionInfo transactionInfo, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, transactionInfo, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TransactionInfo transactionInfo, JsonSerializerOptions jsonSerializerOptions) - { - if (transactionInfo.ComputerNameOption.IsSet && transactionInfo.ComputerName == null) - throw new ArgumentNullException(nameof(transactionInfo.ComputerName), "Property is required for class TransactionInfo."); - - if (transactionInfo.DateTimeOption.IsSet && transactionInfo.DateTime == null) - throw new ArgumentNullException(nameof(transactionInfo.DateTime), "Property is required for class TransactionInfo."); - - if (transactionInfo.DocumentsDatabaseOption.IsSet && transactionInfo.DocumentsDatabase == null) - throw new ArgumentNullException(nameof(transactionInfo.DocumentsDatabase), "Property is required for class TransactionInfo."); - - if (transactionInfo.SystemInfoOption.IsSet && transactionInfo.SystemInfo == null) - throw new ArgumentNullException(nameof(transactionInfo.SystemInfo), "Property is required for class TransactionInfo."); - - if (transactionInfo.TagOption.IsSet && transactionInfo.Tag == null) - throw new ArgumentNullException(nameof(transactionInfo.Tag), "Property is required for class TransactionInfo."); - - if (transactionInfo.TransactionIDOption.IsSet && transactionInfo.TransactionID == null) - throw new ArgumentNullException(nameof(transactionInfo.TransactionID), "Property is required for class TransactionInfo."); - - if (transactionInfo.UserNameOption.IsSet && transactionInfo.UserName == null) - throw new ArgumentNullException(nameof(transactionInfo.UserName), "Property is required for class TransactionInfo."); - - if (transactionInfo.VarVersionOption.IsSet && transactionInfo.VarVersion == null) - throw new ArgumentNullException(nameof(transactionInfo.VarVersion), "Property is required for class TransactionInfo."); - - if (transactionInfo.ComputerNameOption.IsSet) - writer.WriteString("ComputerName", transactionInfo.ComputerName); - - if (transactionInfo.DateTimeOption.IsSet) - writer.WriteString("DateTime", transactionInfo.DateTime); - - if (transactionInfo.DocumentsDatabaseOption.IsSet) - { - writer.WritePropertyName("DocumentsDatabase"); - JsonSerializer.Serialize(writer, transactionInfo.DocumentsDatabase, jsonSerializerOptions); - } - if (transactionInfo.SystemInfoOption.IsSet) - writer.WriteString("SystemInfo", transactionInfo.SystemInfo); - - if (transactionInfo.TagOption.IsSet) - writer.WriteString("Tag", transactionInfo.Tag); - - if (transactionInfo.TransactionIDOption.IsSet) - writer.WriteString("TransactionID", transactionInfo.TransactionID); - - if (transactionInfo.UserNameOption.IsSet) - writer.WriteString("UserName", transactionInfo.UserName); - - if (transactionInfo.VarVersionOption.IsSet) - writer.WriteString("Version", transactionInfo.VarVersion); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs index 2e6c560..68154de 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,90 +14,62 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionProcessGetResponse /// + [DataContract(Name = "TransactionProcessGetResponse")] public partial class TransactionProcessGetResponse : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// transactionId - /// tag - /// outData - /// inData - [JsonConstructor] - public TransactionProcessGetResponse(Option transactionId = default, Option tag = default, Option outData = default, Option inData = default) + /// transactionId. + /// tag. + /// outData. + /// inData. + public TransactionProcessGetResponse(Guid transactionId = default(Guid), string tag = default(string), OutData outData = default(OutData), InData inData = default(InData)) { - TransactionIdOption = transactionId; - TagOption = tag; - OutDataOption = outData; - InDataOption = inData; - OnCreated(); + this.TransactionId = transactionId; + this.Tag = tag; + this.OutData = outData; + this.InData = inData; } - partial void OnCreated(); - - /// - /// Used to track the state of TransactionId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TransactionIdOption { get; private set; } - /// /// Gets or Sets TransactionId /// - [JsonPropertyName("transactionId")] - public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new(value); } } - - /// - /// Used to track the state of Tag - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TagOption { get; private set; } + [DataMember(Name = "transactionId", EmitDefaultValue = false)] + public Guid TransactionId { get; set; } /// /// Gets or Sets Tag /// - [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } - - /// - /// Used to track the state of OutData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OutDataOption { get; private set; } + [DataMember(Name = "tag", EmitDefaultValue = false)] + public string Tag { get; set; } /// /// Gets or Sets OutData /// - [JsonPropertyName("outData")] - public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new(value); } } - - /// - /// Used to track the state of InData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option InDataOption { get; private set; } + [DataMember(Name = "outData", EmitDefaultValue = false)] + public OutData OutData { get; set; } /// /// Gets or Sets InData /// - [JsonPropertyName("inData")] - public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new(value); } } + [DataMember(Name = "inData", EmitDefaultValue = false)] + public InData InData { get; set; } /// /// Returns the string presentation of the object @@ -117,6 +87,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -128,133 +107,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TransactionProcessGetResponseJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TransactionProcessGetResponse Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option transactionId = default; - Option tag = default; - Option outData = default; - Option inData = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "transactionId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - transactionId = new Option(utf8JsonReader.GetGuid()); - break; - case "tag": - tag = new Option(utf8JsonReader.GetString()!); - break; - case "outData": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - outData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "inData": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - inData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - default: - break; - } - } - } - - if (transactionId.IsSet && transactionId.Value == null) - throw new ArgumentNullException(nameof(transactionId), "Property is not nullable for class TransactionProcessGetResponse."); - - if (tag.IsSet && tag.Value == null) - throw new ArgumentNullException(nameof(tag), "Property is not nullable for class TransactionProcessGetResponse."); - - if (outData.IsSet && outData.Value == null) - throw new ArgumentNullException(nameof(outData), "Property is not nullable for class TransactionProcessGetResponse."); - - if (inData.IsSet && inData.Value == null) - throw new ArgumentNullException(nameof(inData), "Property is not nullable for class TransactionProcessGetResponse."); - - return new TransactionProcessGetResponse(transactionId, tag, outData, inData); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TransactionProcessGetResponse transactionProcessGetResponse, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, transactionProcessGetResponse, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TransactionProcessGetResponse transactionProcessGetResponse, JsonSerializerOptions jsonSerializerOptions) - { - if (transactionProcessGetResponse.TagOption.IsSet && transactionProcessGetResponse.Tag == null) - throw new ArgumentNullException(nameof(transactionProcessGetResponse.Tag), "Property is required for class TransactionProcessGetResponse."); - - if (transactionProcessGetResponse.OutDataOption.IsSet && transactionProcessGetResponse.OutData == null) - throw new ArgumentNullException(nameof(transactionProcessGetResponse.OutData), "Property is required for class TransactionProcessGetResponse."); - - if (transactionProcessGetResponse.InDataOption.IsSet && transactionProcessGetResponse.InData == null) - throw new ArgumentNullException(nameof(transactionProcessGetResponse.InData), "Property is required for class TransactionProcessGetResponse."); - - if (transactionProcessGetResponse.TransactionIdOption.IsSet) - writer.WriteString("transactionId", transactionProcessGetResponse.TransactionIdOption.Value!.Value); - - if (transactionProcessGetResponse.TagOption.IsSet) - writer.WriteString("tag", transactionProcessGetResponse.Tag); - - if (transactionProcessGetResponse.OutDataOption.IsSet) - { - writer.WritePropertyName("outData"); - JsonSerializer.Serialize(writer, transactionProcessGetResponse.OutData, jsonSerializerOptions); - } - if (transactionProcessGetResponse.InDataOption.IsSet) - { - writer.WritePropertyName("inData"); - JsonSerializer.Serialize(writer, transactionProcessGetResponse.InData, jsonSerializerOptions); - } - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs index 382d6cc..4b28a50 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,149 +14,114 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionProcessRequest /// + [DataContract(Name = "TransactionProcessRequest")] public partial class TransactionProcessRequest : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// processParam - /// list - /// Live portrait photo - /// Portrait photo from an external source - /// containerList - /// systemInfo - /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. - /// Digital Travel Credential (DTC-VC) data in base64 format for processing - [JsonConstructor] - public TransactionProcessRequest(ProcessParams processParam, Option?> list = default, Option livePortrait = default, Option extPortrait = default, Option containerList = default, Option systemInfo = default, Option?> passBackObject = default, Option dtc = default) + [JsonConstructorAttribute] + protected TransactionProcessRequest() { } + /// + /// Initializes a new instance of the class. + /// + /// processParam (required). + /// list. + /// Live portrait photo. + /// Portrait photo from an external source. + /// containerList. + /// systemInfo. + /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs.. + /// Digital Travel Credential (DTC-VC) data in base64 format for processing. + public TransactionProcessRequest(ProcessParams processParam = default(ProcessParams), List list = default(List), string livePortrait = default(string), string extPortrait = default(string), ContainerList containerList = default(ContainerList), ProcessSystemInfo systemInfo = default(ProcessSystemInfo), Dictionary passBackObject = default(Dictionary), string dtc = default(string)) { - ProcessParam = processParam; - ListOption = list; - LivePortraitOption = livePortrait; - ExtPortraitOption = extPortrait; - ContainerListOption = containerList; - SystemInfoOption = systemInfo; - PassBackObjectOption = passBackObject; - DtcOption = dtc; - OnCreated(); + // to ensure "processParam" is required (not null) + if (processParam == null) + { + throw new ArgumentNullException("processParam is a required property for TransactionProcessRequest and cannot be null"); + } + this.ProcessParam = processParam; + this.List = list; + this.LivePortrait = livePortrait; + this.ExtPortrait = extPortrait; + this.ContainerList = containerList; + this.SystemInfo = systemInfo; + this.PassBackObject = passBackObject; + this.Dtc = dtc; } - partial void OnCreated(); - /// /// Gets or Sets ProcessParam /// - [JsonPropertyName("processParam")] + [DataMember(Name = "processParam", IsRequired = true, EmitDefaultValue = true)] public ProcessParams ProcessParam { get; set; } - /// - /// Used to track the state of List - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> ListOption { get; private set; } - /// /// Gets or Sets List /// - [JsonPropertyName("List")] - public List? List { get { return this.ListOption; } set { this.ListOption = new(value); } } - - /// - /// Used to track the state of LivePortrait - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option LivePortraitOption { get; private set; } + [DataMember(Name = "List", EmitDefaultValue = false)] + public List List { get; set; } /// /// Live portrait photo /// /// Live portrait photo - /* Base64 encoded data */ - [JsonPropertyName("livePortrait")] - public string? LivePortrait { get { return this.LivePortraitOption; } set { this.LivePortraitOption = new(value); } } - - /// - /// Used to track the state of ExtPortrait - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ExtPortraitOption { get; private set; } + /* + Base64 encoded data + */ + [DataMember(Name = "livePortrait", EmitDefaultValue = false)] + public string LivePortrait { get; set; } /// /// Portrait photo from an external source /// /// Portrait photo from an external source - /* Base64 encoded data */ - [JsonPropertyName("extPortrait")] - public string? ExtPortrait { get { return this.ExtPortraitOption; } set { this.ExtPortraitOption = new(value); } } - - /// - /// Used to track the state of ContainerList - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ContainerListOption { get; private set; } + /* + Base64 encoded data + */ + [DataMember(Name = "extPortrait", EmitDefaultValue = false)] + public string ExtPortrait { get; set; } /// /// Gets or Sets ContainerList /// - [JsonPropertyName("ContainerList")] - public ContainerList? ContainerList { get { return this.ContainerListOption; } set { this.ContainerListOption = new(value); } } - - /// - /// Used to track the state of SystemInfo - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option SystemInfoOption { get; private set; } + [DataMember(Name = "ContainerList", EmitDefaultValue = false)] + public ContainerList ContainerList { get; set; } /// /// Gets or Sets SystemInfo /// - [JsonPropertyName("systemInfo")] - public ProcessSystemInfo? SystemInfo { get { return this.SystemInfoOption; } set { this.SystemInfoOption = new(value); } } - - /// - /// Used to track the state of PassBackObject - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option?> PassBackObjectOption { get; private set; } + [DataMember(Name = "systemInfo", EmitDefaultValue = false)] + public ProcessSystemInfo SystemInfo { get; set; } /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. - [JsonPropertyName("passBackObject")] - public Dictionary? PassBackObject { get { return this.PassBackObjectOption; } set { this.PassBackObjectOption = new(value); } } - - /// - /// Used to track the state of Dtc - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option DtcOption { get; private set; } + [DataMember(Name = "passBackObject", EmitDefaultValue = false)] + public Dictionary PassBackObject { get; set; } /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing - [JsonPropertyName("dtc")] - public string? Dtc { get { return this.DtcOption; } set { this.DtcOption = new(value); } } + [DataMember(Name = "dtc", EmitDefaultValue = false)] + public string Dtc { get; set; } /// /// Returns the string presentation of the object @@ -180,6 +143,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -191,195 +163,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TransactionProcessRequestJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TransactionProcessRequest Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option processParam = default; - Option?> list = default; - Option livePortrait = default; - Option extPortrait = default; - Option containerList = default; - Option systemInfo = default; - Option?> passBackObject = default; - Option dtc = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "processParam": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - processParam = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "List": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - list = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "livePortrait": - livePortrait = new Option(utf8JsonReader.GetString()!); - break; - case "extPortrait": - extPortrait = new Option(utf8JsonReader.GetString()!); - break; - case "ContainerList": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - containerList = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "systemInfo": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - systemInfo = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "passBackObject": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - passBackObject = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "dtc": - dtc = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!processParam.IsSet) - throw new ArgumentException("Property is required for class TransactionProcessRequest.", nameof(processParam)); - - if (processParam.IsSet && processParam.Value == null) - throw new ArgumentNullException(nameof(processParam), "Property is not nullable for class TransactionProcessRequest."); - - if (list.IsSet && list.Value == null) - throw new ArgumentNullException(nameof(list), "Property is not nullable for class TransactionProcessRequest."); - - if (livePortrait.IsSet && livePortrait.Value == null) - throw new ArgumentNullException(nameof(livePortrait), "Property is not nullable for class TransactionProcessRequest."); - - if (extPortrait.IsSet && extPortrait.Value == null) - throw new ArgumentNullException(nameof(extPortrait), "Property is not nullable for class TransactionProcessRequest."); - - if (containerList.IsSet && containerList.Value == null) - throw new ArgumentNullException(nameof(containerList), "Property is not nullable for class TransactionProcessRequest."); - - if (systemInfo.IsSet && systemInfo.Value == null) - throw new ArgumentNullException(nameof(systemInfo), "Property is not nullable for class TransactionProcessRequest."); - - if (passBackObject.IsSet && passBackObject.Value == null) - throw new ArgumentNullException(nameof(passBackObject), "Property is not nullable for class TransactionProcessRequest."); - - if (dtc.IsSet && dtc.Value == null) - throw new ArgumentNullException(nameof(dtc), "Property is not nullable for class TransactionProcessRequest."); - - return new TransactionProcessRequest(processParam.Value!, list, livePortrait, extPortrait, containerList, systemInfo, passBackObject, dtc); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TransactionProcessRequest transactionProcessRequest, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, transactionProcessRequest, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TransactionProcessRequest transactionProcessRequest, JsonSerializerOptions jsonSerializerOptions) - { - if (transactionProcessRequest.ProcessParam == null) - throw new ArgumentNullException(nameof(transactionProcessRequest.ProcessParam), "Property is required for class TransactionProcessRequest."); - - if (transactionProcessRequest.ListOption.IsSet && transactionProcessRequest.List == null) - throw new ArgumentNullException(nameof(transactionProcessRequest.List), "Property is required for class TransactionProcessRequest."); - - if (transactionProcessRequest.LivePortraitOption.IsSet && transactionProcessRequest.LivePortrait == null) - throw new ArgumentNullException(nameof(transactionProcessRequest.LivePortrait), "Property is required for class TransactionProcessRequest."); - - if (transactionProcessRequest.ExtPortraitOption.IsSet && transactionProcessRequest.ExtPortrait == null) - throw new ArgumentNullException(nameof(transactionProcessRequest.ExtPortrait), "Property is required for class TransactionProcessRequest."); - - if (transactionProcessRequest.ContainerListOption.IsSet && transactionProcessRequest.ContainerList == null) - throw new ArgumentNullException(nameof(transactionProcessRequest.ContainerList), "Property is required for class TransactionProcessRequest."); - - if (transactionProcessRequest.SystemInfoOption.IsSet && transactionProcessRequest.SystemInfo == null) - throw new ArgumentNullException(nameof(transactionProcessRequest.SystemInfo), "Property is required for class TransactionProcessRequest."); - - if (transactionProcessRequest.PassBackObjectOption.IsSet && transactionProcessRequest.PassBackObject == null) - throw new ArgumentNullException(nameof(transactionProcessRequest.PassBackObject), "Property is required for class TransactionProcessRequest."); - - if (transactionProcessRequest.DtcOption.IsSet && transactionProcessRequest.Dtc == null) - throw new ArgumentNullException(nameof(transactionProcessRequest.Dtc), "Property is required for class TransactionProcessRequest."); - - writer.WritePropertyName("processParam"); - JsonSerializer.Serialize(writer, transactionProcessRequest.ProcessParam, jsonSerializerOptions); - if (transactionProcessRequest.ListOption.IsSet) - { - writer.WritePropertyName("List"); - JsonSerializer.Serialize(writer, transactionProcessRequest.List, jsonSerializerOptions); - } - if (transactionProcessRequest.LivePortraitOption.IsSet) - writer.WriteString("livePortrait", transactionProcessRequest.LivePortrait); - - if (transactionProcessRequest.ExtPortraitOption.IsSet) - writer.WriteString("extPortrait", transactionProcessRequest.ExtPortrait); - - if (transactionProcessRequest.ContainerListOption.IsSet) - { - writer.WritePropertyName("ContainerList"); - JsonSerializer.Serialize(writer, transactionProcessRequest.ContainerList, jsonSerializerOptions); - } - if (transactionProcessRequest.SystemInfoOption.IsSet) - { - writer.WritePropertyName("systemInfo"); - JsonSerializer.Serialize(writer, transactionProcessRequest.SystemInfo, jsonSerializerOptions); - } - if (transactionProcessRequest.PassBackObjectOption.IsSet) - { - writer.WritePropertyName("passBackObject"); - JsonSerializer.Serialize(writer, transactionProcessRequest.PassBackObject, jsonSerializerOptions); - } - if (transactionProcessRequest.DtcOption.IsSet) - writer.WriteString("dtc", transactionProcessRequest.Dtc); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs index b331490..7c4ddfd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,90 +14,62 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// TransactionProcessResult /// + [DataContract(Name = "TransactionProcessResult")] public partial class TransactionProcessResult : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// outData - /// inData - /// tag - /// transactionId - [JsonConstructor] - public TransactionProcessResult(Option outData = default, Option inData = default, Option tag = default, Option transactionId = default) + /// outData. + /// inData. + /// tag. + /// transactionId. + public TransactionProcessResult(OutData outData = default(OutData), InData inData = default(InData), string tag = default(string), Guid transactionId = default(Guid)) { - OutDataOption = outData; - InDataOption = inData; - TagOption = tag; - TransactionIdOption = transactionId; - OnCreated(); + this.OutData = outData; + this.InData = inData; + this.Tag = tag; + this.TransactionId = transactionId; } - partial void OnCreated(); - - /// - /// Used to track the state of OutData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option OutDataOption { get; private set; } - /// /// Gets or Sets OutData /// - [JsonPropertyName("OutData")] - public OutData? OutData { get { return this.OutDataOption; } set { this.OutDataOption = new(value); } } - - /// - /// Used to track the state of InData - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option InDataOption { get; private set; } + [DataMember(Name = "OutData", EmitDefaultValue = false)] + public OutData OutData { get; set; } /// /// Gets or Sets InData /// - [JsonPropertyName("InData")] - public InData? InData { get { return this.InDataOption; } set { this.InDataOption = new(value); } } - - /// - /// Used to track the state of Tag - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TagOption { get; private set; } + [DataMember(Name = "InData", EmitDefaultValue = false)] + public InData InData { get; set; } /// /// Gets or Sets Tag /// - [JsonPropertyName("tag")] - public string? Tag { get { return this.TagOption; } set { this.TagOption = new(value); } } - - /// - /// Used to track the state of TransactionId - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TransactionIdOption { get; private set; } + [DataMember(Name = "tag", EmitDefaultValue = false)] + public string Tag { get; set; } /// /// Gets or Sets TransactionId /// - [JsonPropertyName("transactionId")] - public Guid? TransactionId { get { return this.TransactionIdOption; } set { this.TransactionIdOption = new(value); } } + [DataMember(Name = "transactionId", EmitDefaultValue = false)] + public Guid TransactionId { get; set; } /// /// Returns the string presentation of the object @@ -117,6 +87,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -128,132 +107,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TransactionProcessResultJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TransactionProcessResult Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option outData = default; - Option inData = default; - Option tag = default; - Option transactionId = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "OutData": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - outData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "InData": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - inData = new Option(JsonSerializer.Deserialize(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "tag": - tag = new Option(utf8JsonReader.GetString()!); - break; - case "transactionId": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - transactionId = new Option(utf8JsonReader.GetGuid()); - break; - default: - break; - } - } - } - - if (outData.IsSet && outData.Value == null) - throw new ArgumentNullException(nameof(outData), "Property is not nullable for class TransactionProcessResult."); - - if (inData.IsSet && inData.Value == null) - throw new ArgumentNullException(nameof(inData), "Property is not nullable for class TransactionProcessResult."); - - if (tag.IsSet && tag.Value == null) - throw new ArgumentNullException(nameof(tag), "Property is not nullable for class TransactionProcessResult."); - - if (transactionId.IsSet && transactionId.Value == null) - throw new ArgumentNullException(nameof(transactionId), "Property is not nullable for class TransactionProcessResult."); - - return new TransactionProcessResult(outData, inData, tag, transactionId); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TransactionProcessResult transactionProcessResult, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, transactionProcessResult, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TransactionProcessResult transactionProcessResult, JsonSerializerOptions jsonSerializerOptions) - { - if (transactionProcessResult.OutDataOption.IsSet && transactionProcessResult.OutData == null) - throw new ArgumentNullException(nameof(transactionProcessResult.OutData), "Property is required for class TransactionProcessResult."); - - if (transactionProcessResult.InDataOption.IsSet && transactionProcessResult.InData == null) - throw new ArgumentNullException(nameof(transactionProcessResult.InData), "Property is required for class TransactionProcessResult."); - - if (transactionProcessResult.TagOption.IsSet && transactionProcessResult.Tag == null) - throw new ArgumentNullException(nameof(transactionProcessResult.Tag), "Property is required for class TransactionProcessResult."); - - if (transactionProcessResult.OutDataOption.IsSet) - { - writer.WritePropertyName("OutData"); - JsonSerializer.Serialize(writer, transactionProcessResult.OutData, jsonSerializerOptions); - } - if (transactionProcessResult.InDataOption.IsSet) - { - writer.WritePropertyName("InData"); - JsonSerializer.Serialize(writer, transactionProcessResult.InData, jsonSerializerOptions); - } - if (transactionProcessResult.TagOption.IsSet) - writer.WriteString("tag", transactionProcessResult.Tag); - - if (transactionProcessResult.TransactionIdOption.IsSet) - writer.WriteString("transactionId", transactionProcessResult.TransactionIdOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs index edc95a2..ae86b06 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtBytes.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,66 +14,76 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to store an array of binary information that is a part of one of the informational data groups /// + [DataContract(Name = "TrfFtBytes")] public partial class TrfFtBytes : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Logical type of the field - /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification - /// Length of Data array - /// Binary data array. Base64 encoded. - [JsonConstructor] - public TrfFtBytes(int type, decimal status, decimal length, string? data = default) + [JsonConstructorAttribute] + protected TrfFtBytes() { } + /// + /// Initializes a new instance of the class. + /// + /// Logical type of the field (required). + /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification (required). + /// Length of Data array (required). + /// Binary data array. Base64 encoded. (required). + public TrfFtBytes(int type = default(int), decimal status = default(decimal), decimal length = default(decimal), string data = default(string)) { - Type = type; - Status = status; - Length = length; - Data = data; - OnCreated(); + this.Type = type; + this.Status = status; + this.Length = length; + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for TrfFtBytes and cannot be null"); + } + this.Data = data; } - partial void OnCreated(); - /// /// Logical type of the field /// /// Logical type of the field - [JsonPropertyName("Type")] + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] public int Type { get; set; } /// /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification /// /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification - [JsonPropertyName("Status")] + [DataMember(Name = "Status", IsRequired = true, EmitDefaultValue = true)] public decimal Status { get; set; } /// /// Length of Data array /// /// Length of Data array - [JsonPropertyName("Length")] + [DataMember(Name = "Length", IsRequired = true, EmitDefaultValue = true)] public decimal Length { get; set; } /// /// Binary data array. Base64 encoded. /// /// Binary data array. Base64 encoded. - [JsonPropertyName("Data")] - public string? Data { get; set; } + [DataMember(Name = "Data", IsRequired = true, EmitDefaultValue = true)] + public string Data { get; set; } /// /// Returns the string presentation of the object @@ -93,6 +101,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -104,127 +121,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TrfFtBytesJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TrfFtBytes Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option type = default; - Option status = default; - Option length = default; - Option data = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - case "Status": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - status = new Option(utf8JsonReader.GetDecimal()); - break; - case "Length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - length = new Option(utf8JsonReader.GetDecimal()); - break; - case "Data": - data = new Option(utf8JsonReader.GetString()); - break; - default: - break; - } - } - } - - if (!type.IsSet) - throw new ArgumentException("Property is required for class TrfFtBytes.", nameof(type)); - - if (!status.IsSet) - throw new ArgumentException("Property is required for class TrfFtBytes.", nameof(status)); - - if (!length.IsSet) - throw new ArgumentException("Property is required for class TrfFtBytes.", nameof(length)); - - if (!data.IsSet) - throw new ArgumentException("Property is required for class TrfFtBytes.", nameof(data)); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class TrfFtBytes."); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class TrfFtBytes."); - - if (length.IsSet && length.Value == null) - throw new ArgumentNullException(nameof(length), "Property is not nullable for class TrfFtBytes."); - - return new TrfFtBytes(type.Value!.Value!, status.Value!.Value!, length.Value!.Value!, data.Value!); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TrfFtBytes trfFtBytes, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, trfFtBytes, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TrfFtBytes trfFtBytes, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteNumber("Type", trfFtBytes.Type); - - writer.WriteNumber("Status", trfFtBytes.Status); - - writer.WriteNumber("Length", trfFtBytes.Length); - - if (trfFtBytes.Data != null) - writer.WriteString("Data", trfFtBytes.Data); - else - writer.WriteNull("Data"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs index 8c702cf..36d9f35 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,86 +14,75 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// Structure is used to store information about the numeric field (4 bytes) that is a part of one of the informational data groups. /// + [DataContract(Name = "TrfFtString")] public partial class TrfFtString : IValidatableObject { /// /// Initializes a new instance of the class. /// - /// Numeric value. - /// type - /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification - /// Mask of format of text information (for example, «YYMMDD» for date of birth) - [JsonConstructor] - public TrfFtString(string data, Option type = default, Option status = default, Option format = default) - { - Data = data; - TypeOption = type; - StatusOption = status; - FormatOption = format; - OnCreated(); - } - - partial void OnCreated(); - - /// - /// Numeric value. - /// - /// Numeric value. - [JsonPropertyName("Data")] - public string Data { get; set; } - + [JsonConstructorAttribute] + protected TrfFtString() { } /// - /// Used to track the state of Type + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option TypeOption { get; private set; } + /// type. + /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification. + /// Mask of format of text information (for example, «YYMMDD» for date of birth). + /// Numeric value. (required). + public TrfFtString(int type = default(int), int status = default(int), string format = default(string), string data = default(string)) + { + // to ensure "data" is required (not null) + if (data == null) + { + throw new ArgumentNullException("data is a required property for TrfFtString and cannot be null"); + } + this.Data = data; + this.Type = type; + this.Status = status; + this.Format = format; + } /// /// Gets or Sets Type /// - [JsonPropertyName("Type")] - public int? Type { get { return this.TypeOption; } set { this.TypeOption = new(value); } } - - /// - /// Used to track the state of Status - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option StatusOption { get; private set; } + [DataMember(Name = "Type", EmitDefaultValue = false)] + public int Type { get; set; } /// /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification /// /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification - [JsonPropertyName("Status")] - public int? Status { get { return this.StatusOption; } set { this.StatusOption = new(value); } } + [DataMember(Name = "Status", EmitDefaultValue = false)] + public int Status { get; set; } /// - /// Used to track the state of Format + /// Mask of format of text information (for example, «YYMMDD» for date of birth) /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FormatOption { get; private set; } + /// Mask of format of text information (for example, «YYMMDD» for date of birth) + [DataMember(Name = "Format", EmitDefaultValue = false)] + public string Format { get; set; } /// - /// Mask of format of text information (for example, «YYMMDD» for date of birth) + /// Numeric value. /// - /// Mask of format of text information (for example, «YYMMDD» for date of birth) - [JsonPropertyName("Format")] - public string? Format { get { return this.FormatOption; } set { this.FormatOption = new(value); } } + /// Numeric value. + [DataMember(Name = "Data", IsRequired = true, EmitDefaultValue = true)] + public string Data { get; set; } /// /// Returns the string presentation of the object @@ -105,14 +92,23 @@ public override string ToString() { StringBuilder sb = new StringBuilder(); sb.Append("class TrfFtString {\n"); - sb.Append(" Data: ").Append(Data).Append("\n"); sb.Append(" Type: ").Append(Type).Append("\n"); sb.Append(" Status: ").Append(Status).Append("\n"); sb.Append(" Format: ").Append(Format).Append("\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -124,126 +120,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class TrfFtStringJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override TrfFtString Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option data = default; - Option type = default; - Option status = default; - Option format = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "Data": - data = new Option(utf8JsonReader.GetString()!); - break; - case "Type": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - type = new Option(utf8JsonReader.GetInt32()); - break; - case "Status": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - status = new Option(utf8JsonReader.GetInt32()); - break; - case "Format": - format = new Option(utf8JsonReader.GetString()!); - break; - default: - break; - } - } - } - - if (!data.IsSet) - throw new ArgumentException("Property is required for class TrfFtString.", nameof(data)); - - if (data.IsSet && data.Value == null) - throw new ArgumentNullException(nameof(data), "Property is not nullable for class TrfFtString."); - - if (type.IsSet && type.Value == null) - throw new ArgumentNullException(nameof(type), "Property is not nullable for class TrfFtString."); - - if (status.IsSet && status.Value == null) - throw new ArgumentNullException(nameof(status), "Property is not nullable for class TrfFtString."); - - if (format.IsSet && format.Value == null) - throw new ArgumentNullException(nameof(format), "Property is not nullable for class TrfFtString."); - - return new TrfFtString(data.Value!, type, status, format); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, TrfFtString trfFtString, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, trfFtString, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, TrfFtString trfFtString, JsonSerializerOptions jsonSerializerOptions) - { - if (trfFtString.Data == null) - throw new ArgumentNullException(nameof(trfFtString.Data), "Property is required for class TrfFtString."); - - if (trfFtString.FormatOption.IsSet && trfFtString.Format == null) - throw new ArgumentNullException(nameof(trfFtString.Format), "Property is required for class TrfFtString."); - - writer.WriteString("Data", trfFtString.Data); - - if (trfFtString.TypeOption.IsSet) - writer.WriteNumber("Type", trfFtString.TypeOption.Value!.Value); - - if (trfFtString.StatusOption.IsSet) - writer.WriteNumber("Status", trfFtString.StatusOption.Value!.Value); - - if (trfFtString.FormatOption.IsSet) - writer.WriteString("Format", trfFtString.Format); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs b/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs index e3c5ad1..fe1ca9b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerificationResult.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -56,147 +57,4 @@ public enum VerificationResult COMPARE_NOT_MATCH = 4 } - /// - /// Converts to and from the JSON value - /// - public static class VerificationResultValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static VerificationResult FromString(string value) - { - if (value.Equals((0).ToString())) - return VerificationResult.DISABLED; - - if (value.Equals((1).ToString())) - return VerificationResult.VERIFIED; - - if (value.Equals((2).ToString())) - return VerificationResult.NOT_VERIFIED; - - if (value.Equals((3).ToString())) - return VerificationResult.COMPARE_MATCH; - - if (value.Equals((4).ToString())) - return VerificationResult.COMPARE_NOT_MATCH; - - throw new NotImplementedException($"Could not convert value to type VerificationResult: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static VerificationResult? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return VerificationResult.DISABLED; - - if (value.Equals((1).ToString())) - return VerificationResult.VERIFIED; - - if (value.Equals((2).ToString())) - return VerificationResult.NOT_VERIFIED; - - if (value.Equals((3).ToString())) - return VerificationResult.COMPARE_MATCH; - - if (value.Equals((4).ToString())) - return VerificationResult.COMPARE_NOT_MATCH; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(VerificationResult value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class VerificationResultJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override VerificationResult Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - VerificationResult? result = rawValue == null - ? null - : VerificationResultValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the VerificationResult to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, VerificationResult verificationResult, JsonSerializerOptions options) - { - writer.WriteStringValue(verificationResult.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class VerificationResultNullableJsonConverter : JsonConverter - { - /// - /// Returns a VerificationResult from the Json object - /// - /// - /// - /// - /// - public override VerificationResult? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - VerificationResult? result = rawValue == null - ? null - : VerificationResultValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, VerificationResult? verificationResult, JsonSerializerOptions options) - { - writer.WriteStringValue(verificationResult?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs index 19b523e..8657e86 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,135 +14,112 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// VerifiedFieldMap /// + [DataContract(Name = "VerifiedFieldMap")] public partial class VerifiedFieldMap : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// wFieldType - /// wLCID - /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. - /// Field data extracted from mrz(machine readable zone) - /// Field data extracted from visual zone - /// Field data extracted from barcode - /// Field data extracted from rfid chip - /// fieldType - [JsonConstructor] - public VerifiedFieldMap(TextFieldType wFieldType, LCID wLCID, List matrix, Option fieldMRZ = default, Option fieldVisual = default, Option fieldBarcode = default, Option fieldRFID = default, Option fieldType = default) - { - WFieldType = wFieldType; - WLCID = wLCID; - Matrix = matrix; - FieldMRZOption = fieldMRZ; - FieldVisualOption = fieldVisual; - FieldBarcodeOption = fieldBarcode; - FieldRFIDOption = fieldRFID; - FieldTypeOption = fieldType; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets WFieldType /// - [JsonPropertyName("wFieldType")] + [DataMember(Name = "wFieldType", IsRequired = true, EmitDefaultValue = true)] public TextFieldType WFieldType { get; set; } /// /// Gets or Sets WLCID /// - [JsonPropertyName("wLCID")] + [DataMember(Name = "wLCID", IsRequired = true, EmitDefaultValue = true)] public LCID WLCID { get; set; } - /// - /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. + /// Initializes a new instance of the class. /// - /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. - /* [1,0,0,0,0,3,0,0,0,0] */ - [JsonPropertyName("Matrix")] - public List Matrix { get; set; } - + [JsonConstructorAttribute] + protected VerifiedFieldMap() { } /// - /// Used to track the state of FieldMRZ + /// Initializes a new instance of the class. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldMRZOption { get; private set; } + /// wFieldType (required). + /// wLCID (required). + /// Field data extracted from mrz(machine readable zone). + /// Field data extracted from visual zone. + /// Field data extracted from barcode. + /// Field data extracted from rfid chip. + /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. (required). + /// fieldType. + public VerifiedFieldMap(TextFieldType wFieldType = default(TextFieldType), LCID wLCID = default(LCID), string fieldMRZ = default(string), string fieldVisual = default(string), string fieldBarcode = default(string), string fieldRFID = default(string), List matrix = default(List), int fieldType = default(int)) + { + this.WFieldType = wFieldType; + this.WLCID = wLCID; + // to ensure "matrix" is required (not null) + if (matrix == null) + { + throw new ArgumentNullException("matrix is a required property for VerifiedFieldMap and cannot be null"); + } + this.Matrix = matrix; + this.FieldMRZ = fieldMRZ; + this.FieldVisual = fieldVisual; + this.FieldBarcode = fieldBarcode; + this.FieldRFID = fieldRFID; + this.FieldType = fieldType; + } /// /// Field data extracted from mrz(machine readable zone) /// /// Field data extracted from mrz(machine readable zone) - [JsonPropertyName("Field_MRZ")] - public string? FieldMRZ { get { return this.FieldMRZOption; } set { this.FieldMRZOption = new(value); } } - - /// - /// Used to track the state of FieldVisual - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldVisualOption { get; private set; } + [DataMember(Name = "Field_MRZ", EmitDefaultValue = false)] + public string FieldMRZ { get; set; } /// /// Field data extracted from visual zone /// /// Field data extracted from visual zone - [JsonPropertyName("Field_Visual")] - public string? FieldVisual { get { return this.FieldVisualOption; } set { this.FieldVisualOption = new(value); } } - - /// - /// Used to track the state of FieldBarcode - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldBarcodeOption { get; private set; } + [DataMember(Name = "Field_Visual", EmitDefaultValue = false)] + public string FieldVisual { get; set; } /// /// Field data extracted from barcode /// /// Field data extracted from barcode - [JsonPropertyName("Field_Barcode")] - public string? FieldBarcode { get { return this.FieldBarcodeOption; } set { this.FieldBarcodeOption = new(value); } } - - /// - /// Used to track the state of FieldRFID - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldRFIDOption { get; private set; } + [DataMember(Name = "Field_Barcode", EmitDefaultValue = false)] + public string FieldBarcode { get; set; } /// /// Field data extracted from rfid chip /// /// Field data extracted from rfid chip - [JsonPropertyName("Field_RFID")] - public string? FieldRFID { get { return this.FieldRFIDOption; } set { this.FieldRFIDOption = new(value); } } + [DataMember(Name = "Field_RFID", EmitDefaultValue = false)] + public string FieldRFID { get; set; } /// - /// Used to track the state of FieldType + /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldTypeOption { get; private set; } + /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. + /* + [1,0,0,0,0,3,0,0,0,0] + */ + [DataMember(Name = "Matrix", IsRequired = true, EmitDefaultValue = true)] + public List Matrix { get; set; } /// /// Gets or Sets FieldType /// - [JsonPropertyName("FieldType")] - public int? FieldType { get { return this.FieldTypeOption; } set { this.FieldTypeOption = new(value); } } + [DataMember(Name = "FieldType", EmitDefaultValue = false)] + public int FieldType { get; set; } /// /// Returns the string presentation of the object @@ -156,16 +131,25 @@ public override string ToString() sb.Append("class VerifiedFieldMap {\n"); sb.Append(" WFieldType: ").Append(WFieldType).Append("\n"); sb.Append(" WLCID: ").Append(WLCID).Append("\n"); - sb.Append(" Matrix: ").Append(Matrix).Append("\n"); sb.Append(" FieldMRZ: ").Append(FieldMRZ).Append("\n"); sb.Append(" FieldVisual: ").Append(FieldVisual).Append("\n"); sb.Append(" FieldBarcode: ").Append(FieldBarcode).Append("\n"); sb.Append(" FieldRFID: ").Append(FieldRFID).Append("\n"); + sb.Append(" Matrix: ").Append(Matrix).Append("\n"); sb.Append(" FieldType: ").Append(FieldType).Append("\n"); sb.Append("}\n"); return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -177,185 +161,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class VerifiedFieldMapJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override VerifiedFieldMap Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option wFieldType = default; - Option wLCID = default; - Option?> matrix = default; - Option fieldMRZ = default; - Option fieldVisual = default; - Option fieldBarcode = default; - Option fieldRFID = default; - Option fieldType = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "wFieldType": - string? wFieldTypeRawValue = utf8JsonReader.GetString(); - if (wFieldTypeRawValue != null) - wFieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(wFieldTypeRawValue)); - break; - case "wLCID": - string? wLCIDRawValue = utf8JsonReader.GetString(); - if (wLCIDRawValue != null) - wLCID = new Option(LCIDValueConverter.FromStringOrDefault(wLCIDRawValue)); - break; - case "Matrix": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - matrix = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Field_MRZ": - fieldMRZ = new Option(utf8JsonReader.GetString()!); - break; - case "Field_Visual": - fieldVisual = new Option(utf8JsonReader.GetString()!); - break; - case "Field_Barcode": - fieldBarcode = new Option(utf8JsonReader.GetString()!); - break; - case "Field_RFID": - fieldRFID = new Option(utf8JsonReader.GetString()!); - break; - case "FieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldType = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!wFieldType.IsSet) - throw new ArgumentException("Property is required for class VerifiedFieldMap.", nameof(wFieldType)); - - if (!wLCID.IsSet) - throw new ArgumentException("Property is required for class VerifiedFieldMap.", nameof(wLCID)); - - if (!matrix.IsSet) - throw new ArgumentException("Property is required for class VerifiedFieldMap.", nameof(matrix)); - - if (wFieldType.IsSet && wFieldType.Value == null) - throw new ArgumentNullException(nameof(wFieldType), "Property is not nullable for class VerifiedFieldMap."); - - if (wLCID.IsSet && wLCID.Value == null) - throw new ArgumentNullException(nameof(wLCID), "Property is not nullable for class VerifiedFieldMap."); - - if (matrix.IsSet && matrix.Value == null) - throw new ArgumentNullException(nameof(matrix), "Property is not nullable for class VerifiedFieldMap."); - - if (fieldMRZ.IsSet && fieldMRZ.Value == null) - throw new ArgumentNullException(nameof(fieldMRZ), "Property is not nullable for class VerifiedFieldMap."); - - if (fieldVisual.IsSet && fieldVisual.Value == null) - throw new ArgumentNullException(nameof(fieldVisual), "Property is not nullable for class VerifiedFieldMap."); - - if (fieldBarcode.IsSet && fieldBarcode.Value == null) - throw new ArgumentNullException(nameof(fieldBarcode), "Property is not nullable for class VerifiedFieldMap."); - - if (fieldRFID.IsSet && fieldRFID.Value == null) - throw new ArgumentNullException(nameof(fieldRFID), "Property is not nullable for class VerifiedFieldMap."); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class VerifiedFieldMap."); - - return new VerifiedFieldMap(wFieldType.Value!.Value!, wLCID.Value!.Value!, matrix.Value!, fieldMRZ, fieldVisual, fieldBarcode, fieldRFID, fieldType); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, VerifiedFieldMap verifiedFieldMap, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, verifiedFieldMap, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, VerifiedFieldMap verifiedFieldMap, JsonSerializerOptions jsonSerializerOptions) - { - if (verifiedFieldMap.Matrix == null) - throw new ArgumentNullException(nameof(verifiedFieldMap.Matrix), "Property is required for class VerifiedFieldMap."); - - if (verifiedFieldMap.FieldMRZOption.IsSet && verifiedFieldMap.FieldMRZ == null) - throw new ArgumentNullException(nameof(verifiedFieldMap.FieldMRZ), "Property is required for class VerifiedFieldMap."); - - if (verifiedFieldMap.FieldVisualOption.IsSet && verifiedFieldMap.FieldVisual == null) - throw new ArgumentNullException(nameof(verifiedFieldMap.FieldVisual), "Property is required for class VerifiedFieldMap."); - - if (verifiedFieldMap.FieldBarcodeOption.IsSet && verifiedFieldMap.FieldBarcode == null) - throw new ArgumentNullException(nameof(verifiedFieldMap.FieldBarcode), "Property is required for class VerifiedFieldMap."); - - if (verifiedFieldMap.FieldRFIDOption.IsSet && verifiedFieldMap.FieldRFID == null) - throw new ArgumentNullException(nameof(verifiedFieldMap.FieldRFID), "Property is required for class VerifiedFieldMap."); - - var wFieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(verifiedFieldMap.WFieldType); - writer.WriteNumber("wFieldType", wFieldTypeRawValue); - - var wLCIDRawValue = LCIDValueConverter.ToJsonValue(verifiedFieldMap.WLCID); - writer.WriteNumber("wLCID", wLCIDRawValue); - - writer.WritePropertyName("Matrix"); - JsonSerializer.Serialize(writer, verifiedFieldMap.Matrix, jsonSerializerOptions); - if (verifiedFieldMap.FieldMRZOption.IsSet) - writer.WriteString("Field_MRZ", verifiedFieldMap.FieldMRZ); - - if (verifiedFieldMap.FieldVisualOption.IsSet) - writer.WriteString("Field_Visual", verifiedFieldMap.FieldVisual); - - if (verifiedFieldMap.FieldBarcodeOption.IsSet) - writer.WriteString("Field_Barcode", verifiedFieldMap.FieldBarcode); - - if (verifiedFieldMap.FieldRFIDOption.IsSet) - writer.WriteString("Field_RFID", verifiedFieldMap.FieldRFID); - - if (verifiedFieldMap.FieldTypeOption.IsSet) - writer.WriteNumber("FieldType", verifiedFieldMap.FieldTypeOption.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Visibility.cs b/src/Regula.DocumentReader.WebClient/Model/Visibility.cs index 80acfb5..d8499bd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Visibility.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Visibility.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,12 +14,15 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { @@ -57,147 +58,4 @@ public enum Visibility WHITE_IR_MATCHING = 8 } - /// - /// Converts to and from the JSON value - /// - public static class VisibilityValueConverter - { - /// - /// Parses a given value to - /// - /// - /// - public static Visibility FromString(string value) - { - if (value.Equals((0).ToString())) - return Visibility.INVISIBLE; - - if (value.Equals((1).ToString())) - return Visibility.VISIBLE; - - if (value.Equals((2).ToString())) - return Visibility.COLORED; - - if (value.Equals((4).ToString())) - return Visibility.GRAYSCALE; - - if (value.Equals((8).ToString())) - return Visibility.WHITE_IR_MATCHING; - - throw new NotImplementedException($"Could not convert value to type Visibility: '{value}'"); - } - - /// - /// Parses a given value to - /// - /// - /// - public static Visibility? FromStringOrDefault(string value) - { - if (value.Equals((0).ToString())) - return Visibility.INVISIBLE; - - if (value.Equals((1).ToString())) - return Visibility.VISIBLE; - - if (value.Equals((2).ToString())) - return Visibility.COLORED; - - if (value.Equals((4).ToString())) - return Visibility.GRAYSCALE; - - if (value.Equals((8).ToString())) - return Visibility.WHITE_IR_MATCHING; - - return null; - } - - /// - /// Converts the to the json value - /// - /// - /// - /// - public static int ToJsonValue(Visibility value) - { - return (int) value; - } - } - - /// - /// A Json converter for type - /// - /// - public class VisibilityJsonConverter : JsonConverter - { - /// - /// Returns a from the Json object - /// - /// - /// - /// - /// - public override Visibility Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Visibility? result = rawValue == null - ? null - : VisibilityValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the Visibility to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Visibility visibility, JsonSerializerOptions options) - { - writer.WriteStringValue(visibility.ToString()); - } - } - - /// - /// A Json converter for type - /// - public class VisibilityNullableJsonConverter : JsonConverter - { - /// - /// Returns a Visibility from the Json object - /// - /// - /// - /// - /// - public override Visibility? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) - { - string? rawValue = reader.GetString(); - - Visibility? result = rawValue == null - ? null - : VisibilityValueConverter.FromStringOrDefault(rawValue); - - if (result != null) - return result.Value; - - throw new JsonException(); - } - - /// - /// Writes the DateTime to the json writer - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, Visibility? visibility, JsonSerializerOptions options) - { - writer.WriteStringValue(visibility?.ToString() ?? "null"); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs index d889cbb..b1883e0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs @@ -1,4 +1,3 @@ -// /* * Regula Document Reader Web API * @@ -8,7 +7,6 @@ * Generated by: https://github.com/openapitools/openapi-generator.git */ -#nullable enable using System; using System.Collections; @@ -16,181 +14,159 @@ using System.Collections.ObjectModel; using System.Linq; using System.IO; +using System.Runtime.Serialization; using System.Text; using System.Text.RegularExpressions; -using System.Text.Json; -using System.Text.Json.Serialization; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; using System.ComponentModel.DataAnnotations; -using Regula.DocumentReader.WebClient.Client; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; namespace Regula.DocumentReader.WebClient.Model { /// /// VisualExtendedFieldItem /// + [DataContract(Name = "VisualExtendedFieldItem")] public partial class VisualExtendedFieldItem : IValidatableObject { - /// - /// Initializes a new instance of the class. - /// - /// fieldType - /// wFieldType - /// Field symbolic name (null-terminated string) - /// Number of StringsResult array elements - /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. - /// Buf_Text text string length - /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' - /// fieldMask - /// validity - /// inComparison - /// wLCID - /// reserved2 - /// reserved3 - [JsonConstructor] - public VisualExtendedFieldItem(int fieldType, TextFieldType wFieldType, string fieldName, decimal stringsCount, List stringsResult, decimal bufLength, string bufText, Option fieldMask = default, Option validity = default, Option inComparison = default, Option wLCID = default, Option reserved2 = default, Option reserved3 = default) - { - FieldType = fieldType; - WFieldType = wFieldType; - FieldName = fieldName; - StringsCount = stringsCount; - StringsResult = stringsResult; - BufLength = bufLength; - BufText = bufText; - FieldMaskOption = fieldMask; - ValidityOption = validity; - InComparisonOption = inComparison; - WLCIDOption = wLCID; - Reserved2Option = reserved2; - Reserved3Option = reserved3; - OnCreated(); - } - - partial void OnCreated(); /// /// Gets or Sets WFieldType /// - [JsonPropertyName("wFieldType")] + [DataMember(Name = "wFieldType", IsRequired = true, EmitDefaultValue = true)] public TextFieldType WFieldType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected VisualExtendedFieldItem() { } + /// + /// Initializes a new instance of the class. + /// + /// fieldType (required). + /// wFieldType (required). + /// Field symbolic name (null-terminated string) (required). + /// Number of StringsResult array elements (required). + /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. (required). + /// Buf_Text text string length (required). + /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' (required). + /// fieldMask. + /// validity. + /// inComparison. + /// wLCID. + /// reserved2. + /// reserved3. + public VisualExtendedFieldItem(int fieldType = default(int), TextFieldType wFieldType = default(TextFieldType), string fieldName = default(string), decimal stringsCount = default(decimal), List stringsResult = default(List), decimal bufLength = default(decimal), string bufText = default(string), string fieldMask = default(string), int validity = default(int), int inComparison = default(int), int wLCID = default(int), int reserved2 = default(int), int reserved3 = default(int)) + { + this.FieldType = fieldType; + this.WFieldType = wFieldType; + // to ensure "fieldName" is required (not null) + if (fieldName == null) + { + throw new ArgumentNullException("fieldName is a required property for VisualExtendedFieldItem and cannot be null"); + } + this.FieldName = fieldName; + this.StringsCount = stringsCount; + // to ensure "stringsResult" is required (not null) + if (stringsResult == null) + { + throw new ArgumentNullException("stringsResult is a required property for VisualExtendedFieldItem and cannot be null"); + } + this.StringsResult = stringsResult; + this.BufLength = bufLength; + // to ensure "bufText" is required (not null) + if (bufText == null) + { + throw new ArgumentNullException("bufText is a required property for VisualExtendedFieldItem and cannot be null"); + } + this.BufText = bufText; + this.FieldMask = fieldMask; + this.Validity = validity; + this.InComparison = inComparison; + this.WLCID = wLCID; + this.Reserved2 = reserved2; + this.Reserved3 = reserved3; + } /// /// Gets or Sets FieldType /// - [JsonPropertyName("FieldType")] + [DataMember(Name = "FieldType", IsRequired = true, EmitDefaultValue = true)] public int FieldType { get; set; } /// /// Field symbolic name (null-terminated string) /// /// Field symbolic name (null-terminated string) - [JsonPropertyName("FieldName")] + [DataMember(Name = "FieldName", IsRequired = true, EmitDefaultValue = true)] public string FieldName { get; set; } /// /// Number of StringsResult array elements /// /// Number of StringsResult array elements - [JsonPropertyName("StringsCount")] + [DataMember(Name = "StringsCount", IsRequired = true, EmitDefaultValue = true)] public decimal StringsCount { get; set; } /// /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. /// /// Array of recognizing probabilities for a each line of text field. Only for Result.VISUAL_TEXT and Result.MRZ_TEXT results. - [JsonPropertyName("StringsResult")] + [DataMember(Name = "StringsResult", IsRequired = true, EmitDefaultValue = true)] public List StringsResult { get; set; } /// /// Buf_Text text string length /// /// Buf_Text text string length - [JsonPropertyName("Buf_Length")] + [DataMember(Name = "Buf_Length", IsRequired = true, EmitDefaultValue = true)] public decimal BufLength { get; set; } /// /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' /// /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' - [JsonPropertyName("Buf_Text")] + [DataMember(Name = "Buf_Text", IsRequired = true, EmitDefaultValue = true)] public string BufText { get; set; } - /// - /// Used to track the state of FieldMask - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option FieldMaskOption { get; private set; } - /// /// Gets or Sets FieldMask /// - [JsonPropertyName("FieldMask")] - public string? FieldMask { get { return this.FieldMaskOption; } set { this.FieldMaskOption = new(value); } } - - /// - /// Used to track the state of Validity - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option ValidityOption { get; private set; } + [DataMember(Name = "FieldMask", EmitDefaultValue = false)] + public string FieldMask { get; set; } /// /// Gets or Sets Validity /// - [JsonPropertyName("Validity")] - public int? Validity { get { return this.ValidityOption; } set { this.ValidityOption = new(value); } } - - /// - /// Used to track the state of InComparison - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option InComparisonOption { get; private set; } + [DataMember(Name = "Validity", EmitDefaultValue = false)] + public int Validity { get; set; } /// /// Gets or Sets InComparison /// - [JsonPropertyName("InComparison")] - public int? InComparison { get { return this.InComparisonOption; } set { this.InComparisonOption = new(value); } } - - /// - /// Used to track the state of WLCID - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option WLCIDOption { get; private set; } + [DataMember(Name = "InComparison", EmitDefaultValue = false)] + public int InComparison { get; set; } /// /// Gets or Sets WLCID /// - [JsonPropertyName("wLCID")] - public int? WLCID { get { return this.WLCIDOption; } set { this.WLCIDOption = new(value); } } - - /// - /// Used to track the state of Reserved2 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved2Option { get; private set; } + [DataMember(Name = "wLCID", EmitDefaultValue = false)] + public int WLCID { get; set; } /// /// Gets or Sets Reserved2 /// - [JsonPropertyName("Reserved2")] - public int? Reserved2 { get { return this.Reserved2Option; } set { this.Reserved2Option = new(value); } } - - /// - /// Used to track the state of Reserved3 - /// - [JsonIgnore] - [global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Never)] - public Option Reserved3Option { get; private set; } + [DataMember(Name = "Reserved2", EmitDefaultValue = false)] + public int Reserved2 { get; set; } /// /// Gets or Sets Reserved3 /// - [JsonPropertyName("Reserved3")] - public int? Reserved3 { get { return this.Reserved3Option; } set { this.Reserved3Option = new(value); } } + [DataMember(Name = "Reserved3", EmitDefaultValue = false)] + public int Reserved3 { get; set; } /// /// Returns the string presentation of the object @@ -217,6 +193,15 @@ public override string ToString() return sb.ToString(); } + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public virtual string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + /// /// To validate all properties of the instance /// @@ -228,244 +213,4 @@ IEnumerable IValidatableObject.Validate(ValidationContext vali } } - /// - /// A Json converter for type - /// - public class VisualExtendedFieldItemJsonConverter : JsonConverter - { - /// - /// Deserializes json to - /// - /// - /// - /// - /// - /// - public override VisualExtendedFieldItem Read(ref Utf8JsonReader utf8JsonReader, Type typeToConvert, JsonSerializerOptions jsonSerializerOptions) - { - int currentDepth = utf8JsonReader.CurrentDepth; - - if (utf8JsonReader.TokenType != JsonTokenType.StartObject && utf8JsonReader.TokenType != JsonTokenType.StartArray) - throw new JsonException(); - - JsonTokenType startingTokenType = utf8JsonReader.TokenType; - - Option fieldType = default; - Option wFieldType = default; - Option fieldName = default; - Option stringsCount = default; - Option?> stringsResult = default; - Option bufLength = default; - Option bufText = default; - Option fieldMask = default; - Option validity = default; - Option inComparison = default; - Option wLCID = default; - Option reserved2 = default; - Option reserved3 = default; - - while (utf8JsonReader.Read()) - { - if (startingTokenType == JsonTokenType.StartObject && utf8JsonReader.TokenType == JsonTokenType.EndObject && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (startingTokenType == JsonTokenType.StartArray && utf8JsonReader.TokenType == JsonTokenType.EndArray && currentDepth == utf8JsonReader.CurrentDepth) - break; - - if (utf8JsonReader.TokenType == JsonTokenType.PropertyName && currentDepth == utf8JsonReader.CurrentDepth - 1) - { - string? localVarJsonPropertyName = utf8JsonReader.GetString(); - utf8JsonReader.Read(); - - switch (localVarJsonPropertyName) - { - case "FieldType": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - fieldType = new Option(utf8JsonReader.GetInt32()); - break; - case "wFieldType": - string? wFieldTypeRawValue = utf8JsonReader.GetString(); - if (wFieldTypeRawValue != null) - wFieldType = new Option(TextFieldTypeValueConverter.FromStringOrDefault(wFieldTypeRawValue)); - break; - case "FieldName": - fieldName = new Option(utf8JsonReader.GetString()!); - break; - case "StringsCount": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringsCount = new Option(utf8JsonReader.GetDecimal()); - break; - case "StringsResult": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - stringsResult = new Option?>(JsonSerializer.Deserialize>(ref utf8JsonReader, jsonSerializerOptions)!); - break; - case "Buf_Length": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - bufLength = new Option(utf8JsonReader.GetDecimal()); - break; - case "Buf_Text": - bufText = new Option(utf8JsonReader.GetString()!); - break; - case "FieldMask": - fieldMask = new Option(utf8JsonReader.GetString()!); - break; - case "Validity": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - validity = new Option(utf8JsonReader.GetInt32()); - break; - case "InComparison": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - inComparison = new Option(utf8JsonReader.GetInt32()); - break; - case "wLCID": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - wLCID = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved2": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved2 = new Option(utf8JsonReader.GetInt32()); - break; - case "Reserved3": - if (utf8JsonReader.TokenType != JsonTokenType.Null) - reserved3 = new Option(utf8JsonReader.GetInt32()); - break; - default: - break; - } - } - } - - if (!fieldType.IsSet) - throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(fieldType)); - - if (!wFieldType.IsSet) - throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(wFieldType)); - - if (!fieldName.IsSet) - throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(fieldName)); - - if (!stringsCount.IsSet) - throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(stringsCount)); - - if (!stringsResult.IsSet) - throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(stringsResult)); - - if (!bufLength.IsSet) - throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(bufLength)); - - if (!bufText.IsSet) - throw new ArgumentException("Property is required for class VisualExtendedFieldItem.", nameof(bufText)); - - if (fieldType.IsSet && fieldType.Value == null) - throw new ArgumentNullException(nameof(fieldType), "Property is not nullable for class VisualExtendedFieldItem."); - - if (wFieldType.IsSet && wFieldType.Value == null) - throw new ArgumentNullException(nameof(wFieldType), "Property is not nullable for class VisualExtendedFieldItem."); - - if (fieldName.IsSet && fieldName.Value == null) - throw new ArgumentNullException(nameof(fieldName), "Property is not nullable for class VisualExtendedFieldItem."); - - if (stringsCount.IsSet && stringsCount.Value == null) - throw new ArgumentNullException(nameof(stringsCount), "Property is not nullable for class VisualExtendedFieldItem."); - - if (stringsResult.IsSet && stringsResult.Value == null) - throw new ArgumentNullException(nameof(stringsResult), "Property is not nullable for class VisualExtendedFieldItem."); - - if (bufLength.IsSet && bufLength.Value == null) - throw new ArgumentNullException(nameof(bufLength), "Property is not nullable for class VisualExtendedFieldItem."); - - if (bufText.IsSet && bufText.Value == null) - throw new ArgumentNullException(nameof(bufText), "Property is not nullable for class VisualExtendedFieldItem."); - - if (fieldMask.IsSet && fieldMask.Value == null) - throw new ArgumentNullException(nameof(fieldMask), "Property is not nullable for class VisualExtendedFieldItem."); - - if (validity.IsSet && validity.Value == null) - throw new ArgumentNullException(nameof(validity), "Property is not nullable for class VisualExtendedFieldItem."); - - if (inComparison.IsSet && inComparison.Value == null) - throw new ArgumentNullException(nameof(inComparison), "Property is not nullable for class VisualExtendedFieldItem."); - - if (wLCID.IsSet && wLCID.Value == null) - throw new ArgumentNullException(nameof(wLCID), "Property is not nullable for class VisualExtendedFieldItem."); - - if (reserved2.IsSet && reserved2.Value == null) - throw new ArgumentNullException(nameof(reserved2), "Property is not nullable for class VisualExtendedFieldItem."); - - if (reserved3.IsSet && reserved3.Value == null) - throw new ArgumentNullException(nameof(reserved3), "Property is not nullable for class VisualExtendedFieldItem."); - - return new VisualExtendedFieldItem(fieldType.Value!.Value!, wFieldType.Value!.Value!, fieldName.Value!, stringsCount.Value!.Value!, stringsResult.Value!, bufLength.Value!.Value!, bufText.Value!, fieldMask, validity, inComparison, wLCID, reserved2, reserved3); - } - - /// - /// Serializes a - /// - /// - /// - /// - /// - public override void Write(Utf8JsonWriter writer, VisualExtendedFieldItem visualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) - { - writer.WriteStartObject(); - - WriteProperties(writer, visualExtendedFieldItem, jsonSerializerOptions); - writer.WriteEndObject(); - } - - /// - /// Serializes the properties of - /// - /// - /// - /// - /// - public void WriteProperties(Utf8JsonWriter writer, VisualExtendedFieldItem visualExtendedFieldItem, JsonSerializerOptions jsonSerializerOptions) - { - if (visualExtendedFieldItem.FieldName == null) - throw new ArgumentNullException(nameof(visualExtendedFieldItem.FieldName), "Property is required for class VisualExtendedFieldItem."); - - if (visualExtendedFieldItem.StringsResult == null) - throw new ArgumentNullException(nameof(visualExtendedFieldItem.StringsResult), "Property is required for class VisualExtendedFieldItem."); - - if (visualExtendedFieldItem.BufText == null) - throw new ArgumentNullException(nameof(visualExtendedFieldItem.BufText), "Property is required for class VisualExtendedFieldItem."); - - if (visualExtendedFieldItem.FieldMaskOption.IsSet && visualExtendedFieldItem.FieldMask == null) - throw new ArgumentNullException(nameof(visualExtendedFieldItem.FieldMask), "Property is required for class VisualExtendedFieldItem."); - - writer.WriteNumber("FieldType", visualExtendedFieldItem.FieldType); - - var wFieldTypeRawValue = TextFieldTypeValueConverter.ToJsonValue(visualExtendedFieldItem.WFieldType); - writer.WriteNumber("wFieldType", wFieldTypeRawValue); - - writer.WriteString("FieldName", visualExtendedFieldItem.FieldName); - - writer.WriteNumber("StringsCount", visualExtendedFieldItem.StringsCount); - - writer.WritePropertyName("StringsResult"); - JsonSerializer.Serialize(writer, visualExtendedFieldItem.StringsResult, jsonSerializerOptions); - writer.WriteNumber("Buf_Length", visualExtendedFieldItem.BufLength); - - writer.WriteString("Buf_Text", visualExtendedFieldItem.BufText); - - if (visualExtendedFieldItem.FieldMaskOption.IsSet) - writer.WriteString("FieldMask", visualExtendedFieldItem.FieldMask); - - if (visualExtendedFieldItem.ValidityOption.IsSet) - writer.WriteNumber("Validity", visualExtendedFieldItem.ValidityOption.Value!.Value); - - if (visualExtendedFieldItem.InComparisonOption.IsSet) - writer.WriteNumber("InComparison", visualExtendedFieldItem.InComparisonOption.Value!.Value); - - if (visualExtendedFieldItem.WLCIDOption.IsSet) - writer.WriteNumber("wLCID", visualExtendedFieldItem.WLCIDOption.Value!.Value); - - if (visualExtendedFieldItem.Reserved2Option.IsSet) - writer.WriteNumber("Reserved2", visualExtendedFieldItem.Reserved2Option.Value!.Value); - - if (visualExtendedFieldItem.Reserved3Option.IsSet) - writer.WriteNumber("Reserved3", visualExtendedFieldItem.Reserved3Option.Value!.Value); - } - } } diff --git a/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj b/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj index d711bb2..01ca3eb 100644 --- a/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj +++ b/src/Regula.DocumentReader.WebClient/Regula.DocumentReader.WebClient.csproj @@ -1,27 +1,24 @@ - - - true - net8.0 - Alexander Satsukevich - Regula Ltd. - DocumentReader WebClient - Regula document processing ID card RFID OCR barcode IPI - Regula.DocumentReader.WebClient - Regula.DocumentReader.WebClient - 5.8.3 - 5.8.3 - true - regula_web_client.snk - 10 - enable - - - - - - - - - - - \ No newline at end of file + + + false + net8.0 + Regula.DocumentReader.WebClient + Alexander Satsukevich + Regula Ltd. + DocumentReader WebClient + Regula document processing ID card RFID OCR barcode IPI + Regula.DocumentReader.WebClient + 5.8.3 + 5.8.3 + true + regula_web_client.snk + 10 + annotations + + + + + + + + From afb96aa3dc83dd3ba387a1dffb43fbf65fc399a5 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Thu, 27 Mar 2025 13:00:05 +0300 Subject: [PATCH 08/12] Fix examples --- generator-templates/modelGeneric.mustache | 432 ++++++++++++++++++ .../Program.cs | 14 +- .../Program.cs | 5 +- .../Program.cs | 158 +++---- .../Model/AuthParams.cs | 62 +-- .../Model/AuthenticityCheckResult.cs | 2 +- .../Model/AuthenticityCheckResultItem.cs | 19 +- .../Model/AuthenticityResult.cs | 4 +- .../Model/BinaryData.cs | 128 +++--- .../Model/ByteArrayResult.cs | 4 +- .../Model/CandidatesListItem.cs | 2 +- .../Model/ChosenDocumentType.cs | 2 +- .../Model/ChosenDocumentTypeResult.cs | 6 +- .../Model/ContainerList.cs | 2 +- .../Model/DataModule.cs | 4 +- .../Model/DetailsOptical.cs | 2 +- .../Model/DeviceInfo.cs | 12 +- .../Model/DocBarCodeInfo.cs | 4 +- .../Model/DocumentBinaryInfoResult.cs | 4 +- .../Model/DocumentImage.cs | 2 +- .../Model/DocumentImageResult.cs | 4 +- .../Model/DocumentPosition.cs | 10 +- .../Model/DocumentPositionResult.cs | 4 +- .../Model/DocumentTypesCandidates.cs | 2 +- .../Model/DocumentTypesCandidatesList.cs | 2 +- .../Model/DocumentTypesCandidatesResult.cs | 6 +- .../Model/DocumentsDatabase.cs | 8 +- .../Model/EncryptedRCLItem.cs | 2 +- .../Model/EncryptedRCLResult.cs | 6 +- .../Model/ErrorCoordinates.cs | 8 +- .../Model/Ext/Autheticity/IdentChecks.cs | 4 +- .../Ext/Autheticity/SecurityFeatureChecks.cs | 4 +- .../Model/Ext/RecognitionParams.cs | 2 +- .../Model/Ext/RecognitionResponse.cs | 4 +- .../Model/FDSIDList.cs | 6 +- .../Model/FaceApi.cs | 20 +- .../Model/FaceApiSearch.cs | 6 +- .../Model/FaceDetection.cs | 4 +- .../Model/FaceDetectionResult.cs | 4 +- .../Model/FiberItem.cs | 2 +- .../Model/FiberResult.cs | 6 +- .../Model/GetTransactionsByTagResponse.cs | 6 +- .../Model/GraphicsResult.cs | 4 +- .../Model/Healthcheck.cs | 4 +- .../Model/IdentItem.cs | 4 +- .../Model/IdentResult.cs | 8 +- .../Model/ImageData.cs | 2 +- .../Model/ImageQA.cs | 26 +- .../Model/ImageQualityCheck.cs | 2 +- .../Model/ImageQualityResult.cs | 4 +- .../Model/ImageTransactionData.cs | 2 +- .../Model/Images.cs | 4 +- .../Model/ImagesField.cs | 2 +- .../Model/ImagesFieldValue.cs | 10 +- .../Model/ImagesResult.cs | 4 +- .../Model/InData.cs | 4 +- .../InDataTransactionImagesFieldValue.cs | 6 +- .../Model/InDataVideo.cs | 4 +- .../Model/LexicalAnalysisResult.cs | 4 +- .../Model/LicenseItem.cs | 2 +- .../Model/LicenseResult.cs | 6 +- .../Model/ListTransactionsByTagResponse.cs | 4 +- .../Model/ListVerifiedFields.cs | 2 +- .../Model/LivenessParams.cs | 24 +- .../Model/MRZDetectorResult.cs | 4 +- .../Model/MRZPositionResult.cs | 4 +- .../Model/MRZTestQualityResult.cs | 4 +- .../Model/MrzPosition.cs | 10 +- .../Model/OCRSecurityTextItem.cs | 4 +- .../Model/OCRSecurityTextResult.cs | 8 +- .../Model/OneCandidate.cs | 2 +- .../Model/OneCandidateItem.cs | 2 +- .../Model/OriginalSymbol.cs | 2 +- .../Model/OutData.cs | 4 +- .../OutDataTransactionImagesFieldValue.cs | 6 +- .../Model/PArrayField.cs | 6 +- .../Model/ParsedData.cs | 2 +- .../Model/PerDocumentConfig.cs | 4 +- .../Model/PhotoIdentItem.cs | 14 +- .../Model/PhotoIdentResult.cs | 18 +- .../Model/PointsContainer.cs | 2 +- .../Model/ProcessParams.cs | 181 ++++---- .../Model/ProcessParamsRfid.cs | 2 +- .../Model/ProcessRequest.cs | 24 +- .../Model/ProcessRequestImage.cs | 4 +- .../Model/ProcessResponse.cs | 8 +- .../Model/ProcessSystemInfo.cs | 4 +- .../Model/RFIDDocVisualExtendedField.cs | 4 +- .../Model/RFIDDocVisualExtendedFieldItem.cs | 4 +- .../Model/RFIDGraphicsInfoResult.cs | 4 +- .../Model/RFIDTextDataResult.cs | 4 +- .../Model/ResultItem.cs | 27 +- .../Model/RfidAccessControlInfo.cs | 4 +- .../Model/RfidDataFile.cs | 18 +- .../Model/RfidSessionData.cs | 8 +- .../Model/SecurityFeatureItem.cs | 4 +- .../Model/SecurityFeatureResult.cs | 8 +- .../Model/SecurityObjectCertificates.cs | 2 +- .../Model/Status.cs | 2 +- .../Model/StatusResult.cs | 4 +- .../Model/StringRecognitionResult.cs | 6 +- .../Model/SymbolCandidate.cs | 4 +- .../Model/SymbolRecognitionResult.cs | 6 +- .../Model/TDocBinaryInfo.cs | 4 +- .../Model/TextAvailableSource.cs | 2 +- .../Model/TextDataResult.cs | 4 +- .../Model/TextField.cs | 2 +- .../Model/TextFieldValue.cs | 10 +- .../Model/TextResult.cs | 4 +- .../Model/TransactionImage.cs | 2 +- .../Model/TransactionInfo.cs | 16 +- .../Model/TransactionProcessGetResponse.cs | 8 +- .../Model/TransactionProcessRequest.cs | 14 +- .../Model/TransactionProcessResult.cs | 8 +- .../Model/TrfFtString.cs | 6 +- .../Model/VerifiedFieldMap.cs | 10 +- .../Model/VisualExtendedFieldItem.cs | 12 +- 117 files changed, 1038 insertions(+), 612 deletions(-) create mode 100644 generator-templates/modelGeneric.mustache diff --git a/generator-templates/modelGeneric.mustache b/generator-templates/modelGeneric.mustache new file mode 100644 index 0000000..7ff12a4 --- /dev/null +++ b/generator-templates/modelGeneric.mustache @@ -0,0 +1,432 @@ + /// + /// {{description}}{{^description}}{{classname}}{{/description}} + /// + {{#vendorExtensions.x-cls-compliant}} + [CLSCompliant({{{vendorExtensions.x-cls-compliant}}})] + {{/vendorExtensions.x-cls-compliant}} + {{#vendorExtensions.x-com-visible}} + [ComVisible({{{vendorExtensions.x-com-visible}}})] + {{/vendorExtensions.x-com-visible}} + [DataContract(Name = "{{{name}}}")] + {{^useUnityWebRequest}} + {{#discriminator}} + {{#mappedModels.size}} + [JsonConverter(typeof(JsonSubtypes), "{{{discriminator.propertyBaseName}}}")] + {{/mappedModels.size}} + {{#mappedModels}} + [JsonSubtypes.KnownSubType(typeof({{{modelName}}}), "{{^vendorExtensions.x-discriminator-value}}{{{mappingName}}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{.}}}{{/vendorExtensions.x-discriminator-value}}")] + {{/mappedModels}} + {{/discriminator}} + {{/useUnityWebRequest}} + {{>visibility}} partial class {{classname}}{{#lambda.firstDot}}{{#parent}} : .{{/parent}}{{#validatable}} : .{{/validatable}}{{#equatable}} : .{{/equatable}}{{/lambda.firstDot}}{{#lambda.joinWithComma}}{{#parent}}{{{.}}} {{/parent}}{{#equatable}}IEquatable<{{classname}}> {{/equatable}}{{#validatable}}IValidatableObject {{/validatable}}{{/lambda.joinWithComma}} + { + {{#vars}} + {{#items.isEnum}} + {{#items}} + {{^complexType}} +{{>modelInnerEnum}} + {{/complexType}} + {{/items}} + {{/items.isEnum}} + {{#isEnum}} + {{^complexType}} +{{>modelInnerEnum}} + {{/complexType}} + {{/isEnum}} + {{#isEnum}} + + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// + {{#description}} + /// {{.}} + {{/description}} + {{#example}} + /* + {{.}} + */ + {{/example}} + {{^conditionalSerialization}} + [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } + {{#isReadOnly}} + + /// + /// Returns false as {{name}} should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerialize{{name}}() + { + return false; + } + {{/isReadOnly}} + {{/conditionalSerialization}} + {{#conditionalSerialization}} + {{#isReadOnly}} + [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } + + + /// + /// Returns false as {{name}} should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerialize{{name}}() + { + return false; + } + {{/isReadOnly}} + + {{^isReadOnly}} + [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} + { + get{ return _{{name}};} + set + { + _{{name}} = value; + _flag{{name}} = true; + } + } + private {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} _{{name}}; + private bool _flag{{name}}; + + /// + /// Returns false as {{name}} should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerialize{{name}}() + { + return _flag{{name}}; + } + {{/isReadOnly}} + {{/conditionalSerialization}} + {{/isEnum}} + {{/vars}} + {{#hasRequired}} + {{^hasOnlyReadOnly}} + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + {{^isAdditionalPropertiesTrue}} + protected {{classname}}() { } + {{/isAdditionalPropertiesTrue}} + {{#isAdditionalPropertiesTrue}} + protected {{classname}}() + { + this.AdditionalProperties = new Dictionary(); + } + {{/isAdditionalPropertiesTrue}} + {{/hasOnlyReadOnly}} + {{/hasRequired}} + /// + /// Initializes a new instance of the class. + /// + {{#readWriteVars}} + /// {{description}}{{^description}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. + {{/readWriteVars}} + {{#hasOnlyReadOnly}} + [JsonConstructorAttribute] + {{/hasOnlyReadOnly}} + public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} = {{#defaultValue}}{{^isDateTime}}{{#isString}}{{^isEnum}}@{{/isEnum}}{{/isString}}{{{defaultValue}}}{{/isDateTime}}{{#isDateTime}}default({{{datatypeWithEnum}}}){{/isDateTime}}{{/defaultValue}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} + { + {{#vars}} + {{^isInherited}} + {{^isReadOnly}} + {{#required}} + {{^conditionalSerialization}} + {{^vendorExtensions.x-csharp-value-type}} + // to ensure "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" is required (not null) + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null) + { + throw new ArgumentNullException("{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} is a required property for {{classname}} and cannot be null"); + } + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + {{/vendorExtensions.x-csharp-value-type}} + {{/conditionalSerialization}} + {{#conditionalSerialization}} + {{^vendorExtensions.x-csharp-value-type}} + // to ensure "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" is required (not null) + if ({{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} == null) + { + throw new ArgumentNullException("{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} is a required property for {{classname}} and cannot be null"); + } + this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + {{/vendorExtensions.x-csharp-value-type}} + {{/conditionalSerialization}} + {{/required}} + {{/isReadOnly}} + {{/isInherited}} + {{/vars}} + {{#vars}} + {{^isInherited}} + {{^isReadOnly}} + {{^required}} + {{#defaultValue}} + {{^conditionalSerialization}} + {{^vendorExtensions.x-csharp-value-type}} + // use default value if no "{{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}" provided + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}} ?? {{#isString}}@{{/isString}}{{{defaultValue}}}; + {{/vendorExtensions.x-csharp-value-type}} + {{#vendorExtensions.x-csharp-value-type}} + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + {{/vendorExtensions.x-csharp-value-type}} + {{/conditionalSerialization}} + {{/defaultValue}} + {{^defaultValue}} + {{^conditionalSerialization}} + this.{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + {{/conditionalSerialization}} + {{#conditionalSerialization}} + this._{{name}} = {{#lambda.camelcase_sanitize_param}}{{name}}{{/lambda.camelcase_sanitize_param}}; + if (this.{{name}} != null) + { + this._flag{{name}} = true; + } + {{/conditionalSerialization}} + {{/defaultValue}} + {{/required}} + {{/isReadOnly}} + {{/isInherited}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + this.AdditionalProperties = new Dictionary(); + {{/isAdditionalPropertiesTrue}} + } + + {{#vars}} + {{^isInherited}} + {{^isEnum}} + /// + /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} + /// {{#description}} + /// {{.}}{{/description}} + {{#example}} + /* + {{.}} + */ + {{/example}} + {{^conditionalSerialization}} + [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}false{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] + {{#isDate}} + {{^supportsDateOnly}} + [JsonConverter(typeof(OpenAPIDateConverter))] + {{/supportsDateOnly}} + {{/isDate}} + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{dataType}}}{{^required}}?{{/required}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } + + {{#isReadOnly}} + /// + /// Returns false as {{name}} should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerialize{{name}}() + { + return false; + } + {{/isReadOnly}} + {{/conditionalSerialization}} + {{#conditionalSerialization}} + {{#isReadOnly}} + [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] + {{#isDate}} + [JsonConverter(typeof(OpenAPIDateConverter))] + {{/isDate}} + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{dataType}}} {{name}} { get; private set; } + + /// + /// Returns false as {{name}} should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerialize{{name}}() + { + return false; + } + {{/isReadOnly}} + {{^isReadOnly}} + {{#isDate}} + [JsonConverter(typeof(OpenAPIDateConverter))] + {{/isDate}} + [DataMember(Name = "{{baseName}}"{{#required}}, IsRequired = true{{/required}}, EmitDefaultValue = {{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#required}}true{{/required}}{{^required}}{{#isBoolean}}true{{/isBoolean}}{{^isBoolean}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}false{{/isNullable}}{{/isBoolean}}{{/required}}{{/vendorExtensions.x-emit-default-value}})] + {{#deprecated}} + [Obsolete] + {{/deprecated}} + public {{{dataType}}} {{name}} + { + get{ return _{{name}};} + set + { + _{{name}} = value; + _flag{{name}} = true; + } + } + private {{{dataType}}} _{{name}}; + private bool _flag{{name}}; + + /// + /// Returns false as {{name}} should not be serialized given that it's read-only. + /// + /// false (boolean) + public bool ShouldSerialize{{name}}() + { + return _flag{{name}}; + } + {{/isReadOnly}} + {{/conditionalSerialization}} + {{/isEnum}} + {{/isInherited}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + /// + /// Gets or Sets additional properties + /// + [JsonExtensionData] + public IDictionary AdditionalProperties { get; set; } + + {{/isAdditionalPropertiesTrue}} + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + StringBuilder sb = new StringBuilder(); + sb.Append("class {{classname}} {\n"); + {{#parent}} + sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); + {{/parent}} + {{#vars}} + sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); + {{/vars}} + {{#isAdditionalPropertiesTrue}} + sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n"); + {{/isAdditionalPropertiesTrue}} + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public {{#parent}}{{^isArray}}{{^isMap}}override {{/isMap}}{{/isArray}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson() + { + return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); + } + {{#equatable}} + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input as {{classname}}).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + return this.Equals(input as {{classname}}); + {{/useCompareNetObjects}} + } + + /// + /// Returns true if {{classname}} instances are equal + /// + /// Instance of {{classname}} to be compared + /// Boolean + public bool Equals({{classname}} input) + { + {{#useCompareNetObjects}} + return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual; + {{/useCompareNetObjects}} + {{^useCompareNetObjects}} + if (input == null) + { + return false; + } + return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}} + ( + this.{{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}} + (this.{{name}} != null && + this.{{name}}.Equals(input.{{name}})) + {{/vendorExtensions.x-is-value-type}} + {{#vendorExtensions.x-is-value-type}} + this.{{name}}.Equals(input.{{name}}) + {{/vendorExtensions.x-is-value-type}} + ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} + ( + this.{{name}} == input.{{name}} || + {{^vendorExtensions.x-is-value-type}}this.{{name}} != null && + input.{{name}} != null && + {{/vendorExtensions.x-is-value-type}}this.{{name}}.SequenceEqual(input.{{name}}) + ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}{{^isAdditionalPropertiesTrue}};{{/isAdditionalPropertiesTrue}} + {{#isAdditionalPropertiesTrue}} + && (this.AdditionalProperties.Count == input.AdditionalProperties.Count && !this.AdditionalProperties.Except(input.AdditionalProperties).Any()); + {{/isAdditionalPropertiesTrue}} + {{/useCompareNetObjects}} + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + unchecked // Overflow is fine, just wrap + { + {{#parent}} + int hashCode = base.GetHashCode(); + {{/parent}} + {{^parent}} + int hashCode = 41; + {{/parent}} + {{#vars}} + {{^vendorExtensions.x-is-value-type}} + if (this.{{name}} != null) + { + hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); + } + {{/vendorExtensions.x-is-value-type}} + {{#vendorExtensions.x-is-value-type}} + hashCode = (hashCode * 59) + this.{{name}}.GetHashCode(); + {{/vendorExtensions.x-is-value-type}} + {{/vars}} + {{#isAdditionalPropertiesTrue}} + if (this.AdditionalProperties != null) + { + hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode(); + } + {{/isAdditionalPropertiesTrue}} + return hashCode; + } + } + {{/equatable}} + +{{#validatable}} +{{>validatable}} +{{/validatable}} + } diff --git a/src/Regula.DocumentReader.NetCoreExample/Program.cs b/src/Regula.DocumentReader.NetCoreExample/Program.cs index fce6c3c..d7827e4 100644 --- a/src/Regula.DocumentReader.NetCoreExample/Program.cs +++ b/src/Regula.DocumentReader.NetCoreExample/Program.cs @@ -31,7 +31,7 @@ public static void Main() var requestParams = new RecognitionParams { AlreadyCropped = true } .WithScenario(Scenario.FULL_PROCESS) - // .WithResultTypeOutput(new List + // .WithResultTypeOutput(new List // { // // actual results // Result.STATUS, Result.AUTHENTICITY, Result.TEXT, Result.IMAGES, @@ -56,11 +56,7 @@ public static void Main() var response = api.Process(request); - // var authHeaders = new Dictionary() - // { - // { "Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}" } - // }; - // var response = api.Process(request, headers: authHeaders); + // api.Configuration.DefaultHeaders.Add("Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}"); Console.WriteLine(response.Log()); @@ -69,11 +65,11 @@ public static void Main() var docOverallStatus = status.OverallStatus == CheckResult.OK ? "valid" : "not valid"; var docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid"; - var docType = response.DocumentType(); var info = api.Ping(); - // var info = api.Ping(headers: authHeaders); + var docType = response.DocumentType(); + var info = api.Ping(); Console.WriteLine("-----------------------------------------------------------------"); - Console.WriteLine($" API Version: {info.Version}"); + Console.WriteLine($" API Version: {info.VarVersion}"); Console.WriteLine("-----------------------------------------------------------------"); Console.WriteLine($" Document Overall Status: {docOverallStatus}"); Console.WriteLine($" Document Optical Text Status: {docOpticalTextStatus}"); diff --git a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs index d5dfdfd..db44ca3 100644 --- a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs +++ b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs @@ -19,7 +19,7 @@ public static void Main() var requestParams = new RecognitionParams() .WithScenario(Scenario.FULL_PROCESS) - .WithResultTypeOutput(new List + .WithResultTypeOutput(new List { // actual results Result.STATUS, Result.AUTHENTICITY, Result.TEXT, Result.IMAGES, @@ -53,6 +53,7 @@ public static void Main() // text results var docNumberField = response.Text().GetField(TextFieldType.DOCUMENT_NUMBER); + Console.WriteLine(docNumberField); var docNumberVisual = docNumberField.GetValue(Source.VISUAL); var docNumberMrz = docNumberField.GetValue(Source.MRZ); var docNumberVisualValidity = docNumberField.SourceValidity(Source.VISUAL); @@ -70,7 +71,7 @@ public static void Main() var info = api.Ping(); Console.WriteLine("-----------------------------------------------------------------"); - Console.WriteLine($" API Version: {info.Version}"); + Console.WriteLine($" API Version: {info.VarVersion}"); Console.WriteLine("-----------------------------------------------------------------"); Console.WriteLine($" Document Overall Status: {docOverallStatus}"); Console.WriteLine($" Document Optical Text Status: {docOpticalTextStatus}"); diff --git a/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs b/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs index 9098539..445df8a 100644 --- a/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs +++ b/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs @@ -13,86 +13,86 @@ internal static class Program public static void Main() { - // ************************************************************************************************ - // * This example demonstrates how to perform a full document processing with portrait comparison * - // * using FaceAPI Web Server * - // ************************************************************************************************ - - var apiBaseUrl = Environment.GetEnvironmentVariable(API_BASE_PATH) ?? "https://api.regulaforensics.com"; - - var licenseFromEnv = - Environment.GetEnvironmentVariable(TEST_LICENSE); // optional, used here only for smoke test purposes - var licenseFromFile = File.Exists(LICENSE_FILE_NAME) - ? File.ReadAllBytes(LICENSE_FILE_NAME) - : null; - - var whitePage0 = File.ReadAllBytes("WHITE.jpg"); - - var requestParams = new RecognitionParams { AlreadyCropped = true } - .WithScenario(Scenario.FULL_PROCESS) - // .WithResultTypeOutput(new List - // { - // // actual results - // Result.STATUS, Result.AUTHENTICITY, Result.TEXT, Result.IMAGES, - // Result.DOCUMENT_TYPE, Result.DOCUMENT_TYPE_CANDIDATES, Result.DOCUMENT_POSITION, - // // Portrait comparison - // Result.PORTRAIT_COMPARISON - // }) - .WithFaceApi("https://faceapi.regulaforensics.com") - .WithAuthParam(new AuthParams(checkPhotoComparison: true)) - .WithLog(false); - - - var api = licenseFromEnv != null - ? new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromEnv) - : new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromFile); - - var request = new RecognitionRequest(requestParams, new List - { - new ProcessRequestImage(new ImageDataExt(whitePage0), Light.WHITE), - }); - request.ExtPortrait = Convert.ToBase64String(File.ReadAllBytes("portrait.png")); - - var response = api.Process(request); - // var authHeaders = new Dictionary() + // // ************************************************************************************************ + // // * This example demonstrates how to perform a full document processing with portrait comparison * + // // * using FaceAPI Web Server * + // // ************************************************************************************************ + // + // var apiBaseUrl = Environment.GetEnvironmentVariable(API_BASE_PATH) ?? "https://api.regulaforensics.com"; + // + // var licenseFromEnv = + // Environment.GetEnvironmentVariable(TEST_LICENSE); // optional, used here only for smoke test purposes + // var licenseFromFile = File.Exists(LICENSE_FILE_NAME) + // ? File.ReadAllBytes(LICENSE_FILE_NAME) + // : null; + // + // var whitePage0 = File.ReadAllBytes("WHITE.jpg"); + // + // var requestParams = new RecognitionParams { AlreadyCropped = true } + // .WithScenario(Scenario.FULL_PROCESS) + // // .WithResultTypeOutput(new List + // // { + // // // actual results + // // Result.STATUS, Result.AUTHENTICITY, Result.TEXT, Result.IMAGES, + // // Result.DOCUMENT_TYPE, Result.DOCUMENT_TYPE_CANDIDATES, Result.DOCUMENT_POSITION, + // // // Portrait comparison + // // Result.PORTRAIT_COMPARISON + // // }) + // .WithFaceApi("https://faceapi.regulaforensics.com") + // .WithAuthParam(new AuthParams(checkPhotoComparison: true)) + // .WithLog(false); + // + // + // var api = licenseFromEnv != null + // ? new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromEnv) + // : new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromFile); + // + // var request = new RecognitionRequest(requestParams, new List // { - // { "Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}" } - // }; - var comparison = response.PortraitComparison(); - - Console.WriteLine(response.Log()); - - // overall status results - var status = response.Status(); - var docOverallStatus = status.OverallStatus == CheckResult.OK ? "valid" : "not valid"; - var docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid"; - - var docType = response.DocumentType(); - var info = api.Ping(); - // var info = api.Ping(headers: authHeaders); - - Console.WriteLine("-----------------------------------------------------------------"); - Console.WriteLine($" API Version: {info.Version}"); - Console.WriteLine("-----------------------------------------------------------------"); - Console.WriteLine($" Document Overall Status: {docOverallStatus}"); - Console.WriteLine($" Document Optical Text Status: {docOpticalTextStatus}"); - Console.WriteLine($" Document Name: {docType.DocumentName}"); - Console.WriteLine($" Portrait Comparison Percents: {comparison.AuthenticityCheckList.List[0].List[0].PercentValue}"); - Console.WriteLine("-----------------------All Text Fields------------------------"); - foreach (var field in response.Text().FieldList) - { - Console.WriteLine($"Source: {field.FieldName}, Value: {field.Value}"); - } - Console.WriteLine("-----------------------------------------------------------------"); - - - // images results - var documentImage = response.Images().GetField(GraphicFieldType.DOCUMENT_FRONT).GetValue(); - var portraitField = response.Images().GetField(GraphicFieldType.PORTRAIT); - var portraitFromVisual = portraitField.GetValue(Source.VISUAL); - - File.WriteAllBytes("document-image.jpg", documentImage); - File.WriteAllBytes("portrait.jpg", portraitFromVisual); + // new ProcessRequestImage(new ImageDataExt(whitePage0), Light.WHITE), + // }); + // request.ExtPortrait = Convert.ToBase64String(File.ReadAllBytes("portrait.png")); + // + // var response = api.Process(request); + // // var authHeaders = new Dictionary() + // // { + // // { "Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}" } + // // }; + // var comparison = response.PortraitComparison(); + // + // Console.WriteLine(response.Log()); + // + // // overall status results + // var status = response.Status(); + // var docOverallStatus = status.OverallStatus == CheckResult.OK ? "valid" : "not valid"; + // var docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid"; + // + // var docType = response.DocumentType(); + // var info = api.Ping(); + // // var info = api.Ping(headers: authHeaders); + // + // Console.WriteLine("-----------------------------------------------------------------"); + // Console.WriteLine($" API Version: {info.Version}"); + // Console.WriteLine("-----------------------------------------------------------------"); + // Console.WriteLine($" Document Overall Status: {docOverallStatus}"); + // Console.WriteLine($" Document Optical Text Status: {docOpticalTextStatus}"); + // Console.WriteLine($" Document Name: {docType.DocumentName}"); + // Console.WriteLine($" Portrait Comparison Percents: {comparison.AuthenticityCheckList.List[0].List[0].PercentValue}"); + // Console.WriteLine("-----------------------All Text Fields------------------------"); + // foreach (var field in response.Text().FieldList) + // { + // Console.WriteLine($"Source: {field.FieldName}, Value: {field.Value}"); + // } + // Console.WriteLine("-----------------------------------------------------------------"); + // + // + // // images results + // var documentImage = response.Images().GetField(GraphicFieldType.DOCUMENT_FRONT).GetValue(); + // var portraitField = response.Images().GetField(GraphicFieldType.PORTRAIT); + // var portraitFromVisual = portraitField.GetValue(Source.VISUAL); + // + // File.WriteAllBytes("document-image.jpg", documentImage); + // File.WriteAllBytes("portrait.jpg", portraitFromVisual); } } diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs index f9dc837..73563dd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthParams.cs @@ -75,112 +75,112 @@ public partial class AuthParams : IValidatableObject /// This parameter is used to enable document liveness check /// /// This parameter is used to enable document liveness check - [DataMember(Name = "checkLiveness", EmitDefaultValue = true)] - public bool CheckLiveness { get; set; } + [DataMember(Name = "checkLiveness", EmitDefaultValue = false)] + public bool? CheckLiveness { get; set; } /// /// Gets or Sets LivenessParams /// [DataMember(Name = "livenessParams", EmitDefaultValue = false)] - public LivenessParams LivenessParams { get; set; } + public LivenessParams? LivenessParams { get; set; } /// /// This parameter is used to enable Document luminescence check in UV light /// /// This parameter is used to enable Document luminescence check in UV light - [DataMember(Name = "checkUVLuminiscence", EmitDefaultValue = true)] - public bool CheckUVLuminiscence { get; set; } + [DataMember(Name = "checkUVLuminiscence", EmitDefaultValue = false)] + public bool? CheckUVLuminiscence { get; set; } /// /// This parameter is used to enable B900 ink MRZ contrast check in IR light /// /// This parameter is used to enable B900 ink MRZ contrast check in IR light - [DataMember(Name = "checkIRB900", EmitDefaultValue = true)] - public bool CheckIRB900 { get; set; } + [DataMember(Name = "checkIRB900", EmitDefaultValue = false)] + public bool? CheckIRB900 { get; set; } /// /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) /// /// This parameter is used to enable Image patterns presence/absence check (position, shape, color) - [DataMember(Name = "checkImagePatterns", EmitDefaultValue = true)] - public bool CheckImagePatterns { get; set; } + [DataMember(Name = "checkImagePatterns", EmitDefaultValue = false)] + public bool? CheckImagePatterns { get; set; } /// /// This parameter is used to enable Fibers detection /// /// This parameter is used to enable Fibers detection - [DataMember(Name = "checkFibers", EmitDefaultValue = true)] - public bool CheckFibers { get; set; } + [DataMember(Name = "checkFibers", EmitDefaultValue = false)] + public bool? CheckFibers { get; set; } /// /// This parameter is used to enable Extended MRZ Check /// /// This parameter is used to enable Extended MRZ Check - [DataMember(Name = "checkExtMRZ", EmitDefaultValue = true)] - public bool CheckExtMRZ { get; set; } + [DataMember(Name = "checkExtMRZ", EmitDefaultValue = false)] + public bool? CheckExtMRZ { get; set; } /// /// This parameter is used to enable Extended OCR Check /// /// This parameter is used to enable Extended OCR Check - [DataMember(Name = "checkExtOCR", EmitDefaultValue = true)] - public bool CheckExtOCR { get; set; } + [DataMember(Name = "checkExtOCR", EmitDefaultValue = false)] + public bool? CheckExtOCR { get; set; } /// /// This parameter is used to enable laminate integrity check in axial light /// /// This parameter is used to enable laminate integrity check in axial light - [DataMember(Name = "checkAxial", EmitDefaultValue = true)] - public bool CheckAxial { get; set; } + [DataMember(Name = "checkAxial", EmitDefaultValue = false)] + public bool? CheckAxial { get; set; } /// /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) /// /// This parameter is used to enable Barcode format check (code metadata, data format, contents format, etc.) - [DataMember(Name = "checkBarcodeFormat", EmitDefaultValue = true)] - public bool CheckBarcodeFormat { get; set; } + [DataMember(Name = "checkBarcodeFormat", EmitDefaultValue = false)] + public bool? CheckBarcodeFormat { get; set; } /// /// This parameter is used to enable Document elements visibility check in IR light /// /// This parameter is used to enable Document elements visibility check in IR light - [DataMember(Name = "checkIRVisibility", EmitDefaultValue = true)] - public bool CheckIRVisibility { get; set; } + [DataMember(Name = "checkIRVisibility", EmitDefaultValue = false)] + public bool? CheckIRVisibility { get; set; } /// /// This parameter is used to enable Invisible Personal Information (IPI) check /// /// This parameter is used to enable Invisible Personal Information (IPI) check - [DataMember(Name = "checkIPI", EmitDefaultValue = true)] - public bool CheckIPI { get; set; } + [DataMember(Name = "checkIPI", EmitDefaultValue = false)] + public bool? CheckIPI { get; set; } /// /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) /// /// This parameter is used to enable Owner's photo embedding check (is photo printed or sticked) - [DataMember(Name = "checkPhotoEmbedding", EmitDefaultValue = true)] - public bool CheckPhotoEmbedding { get; set; } + [DataMember(Name = "checkPhotoEmbedding", EmitDefaultValue = false)] + public bool? CheckPhotoEmbedding { get; set; } /// /// This parameter is used to enable Portrait comparison check /// /// This parameter is used to enable Portrait comparison check - [DataMember(Name = "checkPhotoComparison", EmitDefaultValue = true)] - public bool CheckPhotoComparison { get; set; } + [DataMember(Name = "checkPhotoComparison", EmitDefaultValue = false)] + public bool? CheckPhotoComparison { get; set; } /// /// This parameter is used to enable LetterScreen check /// /// This parameter is used to enable LetterScreen check - [DataMember(Name = "checkLetterScreen", EmitDefaultValue = true)] - public bool CheckLetterScreen { get; set; } + [DataMember(Name = "checkLetterScreen", EmitDefaultValue = false)] + public bool? CheckLetterScreen { get; set; } /// /// This parameter is used to enable Security text check /// /// This parameter is used to enable Security text check - [DataMember(Name = "checkSecurityText", EmitDefaultValue = true)] - public bool CheckSecurityText { get; set; } + [DataMember(Name = "checkSecurityText", EmitDefaultValue = false)] + public bool? CheckSecurityText { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs index 98a82fc..bfdbd6e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResult.cs @@ -74,7 +74,7 @@ protected AuthenticityCheckResult() { } /// /// Count of items in List [DataMember(Name = "Count", EmitDefaultValue = false)] - public int Count { get; set; } + public int? Count { get; set; } /// /// Gets or Sets List diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs index 1bd7284..0e8104f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityCheckResultItem.cs @@ -57,6 +57,12 @@ namespace Regula.DocumentReader.WebClient.Model public partial class AuthenticityCheckResultItem : IValidatableObject { + /// + /// Gets or Sets Type + /// + [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] + public AuthenticityResultType Type { get; set; } + /// /// Gets or Sets ElementResult /// @@ -76,11 +82,11 @@ protected AuthenticityCheckResultItem() { } /// /// Initializes a new instance of the class. /// - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// type (required). /// elementResult. /// elementDiagnose. /// percentValue. - public AuthenticityCheckResultItem(int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) + public AuthenticityCheckResultItem(AuthenticityResultType type = default(AuthenticityResultType), CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) { this.Type = type; this.ElementResult = elementResult; @@ -88,18 +94,11 @@ protected AuthenticityCheckResultItem() { } this.PercentValue = percentValue; } - /// - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ - /// - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ - [DataMember(Name = "Type", IsRequired = true, EmitDefaultValue = true)] - public int Type { get; set; } - /// /// Gets or Sets PercentValue /// [DataMember(Name = "PercentValue", EmitDefaultValue = false)] - public int PercentValue { get; set; } + public int? PercentValue { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs index f8ccfe2..0b08344 100644 --- a/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/AuthenticityResult.cs @@ -46,8 +46,8 @@ protected AuthenticityResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public AuthenticityResult(AuthenticityCheckList authenticityCheckList = default(AuthenticityCheckList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.AUTHENTICITY). + public AuthenticityResult(AuthenticityCheckList authenticityCheckList = default(AuthenticityCheckList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.AUTHENTICITY) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "authenticityCheckList" is required (not null) if (authenticityCheckList == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs index b8c3bf9..00e040b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/BinaryData.cs @@ -171,386 +171,386 @@ public partial class BinaryData : IValidatableObject /// Gets or Sets RFIDAuthenticationInfo /// [DataMember(Name = "RFID_Authentication_Info", EmitDefaultValue = false)] - public Dictionary RFIDAuthenticationInfo { get; set; } + public Dictionary? RFIDAuthenticationInfo { get; set; } /// /// Gets or Sets RFIDMIFAREDataValidity /// [DataMember(Name = "RFID_MIFARE_Data_Validity", EmitDefaultValue = false)] - public Dictionary RFIDMIFAREDataValidity { get; set; } + public Dictionary? RFIDMIFAREDataValidity { get; set; } /// /// Gets or Sets RFIDMIFAREData /// [DataMember(Name = "RFID_MIFARE_Data", EmitDefaultValue = false)] - public Dictionary RFIDMIFAREData { get; set; } + public Dictionary? RFIDMIFAREData { get; set; } /// /// Gets or Sets RFID_EF_COM /// [DataMember(Name = "RFID_EF_COM", EmitDefaultValue = false)] - public Dictionary RFID_EF_COM { get; set; } + public Dictionary? RFID_EF_COM { get; set; } /// /// Gets or Sets RFIDDG1 /// [DataMember(Name = "RFID_DG1", EmitDefaultValue = false)] - public RfidDG1 RFIDDG1 { get; set; } + public RfidDG1? RFIDDG1 { get; set; } /// /// Gets or Sets RFIDDG2 /// [DataMember(Name = "RFID_DG2", EmitDefaultValue = false)] - public Dictionary RFIDDG2 { get; set; } + public Dictionary? RFIDDG2 { get; set; } /// /// Gets or Sets RFIDDG3 /// [DataMember(Name = "RFID_DG3", EmitDefaultValue = false)] - public Dictionary RFIDDG3 { get; set; } + public Dictionary? RFIDDG3 { get; set; } /// /// Gets or Sets RFIDDG4 /// [DataMember(Name = "RFID_DG4", EmitDefaultValue = false)] - public Dictionary RFIDDG4 { get; set; } + public Dictionary? RFIDDG4 { get; set; } /// /// Gets or Sets RFIDDG5 /// [DataMember(Name = "RFID_DG5", EmitDefaultValue = false)] - public Dictionary RFIDDG5 { get; set; } + public Dictionary? RFIDDG5 { get; set; } /// /// Gets or Sets RFIDDG6 /// [DataMember(Name = "RFID_DG6", EmitDefaultValue = false)] - public Dictionary RFIDDG6 { get; set; } + public Dictionary? RFIDDG6 { get; set; } /// /// Gets or Sets RFIDDG7 /// [DataMember(Name = "RFID_DG7", EmitDefaultValue = false)] - public Dictionary RFIDDG7 { get; set; } + public Dictionary? RFIDDG7 { get; set; } /// /// Gets or Sets RFIDDG8 /// [DataMember(Name = "RFID_DG8", EmitDefaultValue = false)] - public Dictionary RFIDDG8 { get; set; } + public Dictionary? RFIDDG8 { get; set; } /// /// Gets or Sets RFIDDG9 /// [DataMember(Name = "RFID_DG9", EmitDefaultValue = false)] - public Dictionary RFIDDG9 { get; set; } + public Dictionary? RFIDDG9 { get; set; } /// /// Gets or Sets RFIDDG10 /// [DataMember(Name = "RFID_DG10", EmitDefaultValue = false)] - public Dictionary RFIDDG10 { get; set; } + public Dictionary? RFIDDG10 { get; set; } /// /// Gets or Sets RFIDDG11 /// [DataMember(Name = "RFID_DG11", EmitDefaultValue = false)] - public Dictionary RFIDDG11 { get; set; } + public Dictionary? RFIDDG11 { get; set; } /// /// Gets or Sets RFIDDG12 /// [DataMember(Name = "RFID_DG12", EmitDefaultValue = false)] - public Dictionary RFIDDG12 { get; set; } + public Dictionary? RFIDDG12 { get; set; } /// /// Gets or Sets RFIDDG13 /// [DataMember(Name = "RFID_DG13", EmitDefaultValue = false)] - public Dictionary RFIDDG13 { get; set; } + public Dictionary? RFIDDG13 { get; set; } /// /// Gets or Sets RFIDDG14 /// [DataMember(Name = "RFID_DG14", EmitDefaultValue = false)] - public Dictionary RFIDDG14 { get; set; } + public Dictionary? RFIDDG14 { get; set; } /// /// Gets or Sets RFIDDG15 /// [DataMember(Name = "RFID_DG15", EmitDefaultValue = false)] - public Dictionary RFIDDG15 { get; set; } + public Dictionary? RFIDDG15 { get; set; } /// /// Gets or Sets RFIDDG16 /// [DataMember(Name = "RFID_DG16", EmitDefaultValue = false)] - public Dictionary RFIDDG16 { get; set; } + public Dictionary? RFIDDG16 { get; set; } /// /// Gets or Sets RFID_EF_SOD /// [DataMember(Name = "RFID_EF_SOD", EmitDefaultValue = false)] - public Dictionary RFID_EF_SOD { get; set; } + public Dictionary? RFID_EF_SOD { get; set; } /// /// Gets or Sets EIDDG1 /// [DataMember(Name = "eID_DG1", EmitDefaultValue = false)] - public Dictionary EIDDG1 { get; set; } + public Dictionary? EIDDG1 { get; set; } /// /// Gets or Sets EIDDG2 /// [DataMember(Name = "eID_DG2", EmitDefaultValue = false)] - public Dictionary EIDDG2 { get; set; } + public Dictionary? EIDDG2 { get; set; } /// /// Gets or Sets EIDDG3 /// [DataMember(Name = "eID_DG3", EmitDefaultValue = false)] - public Dictionary EIDDG3 { get; set; } + public Dictionary? EIDDG3 { get; set; } /// /// Gets or Sets EIDDG4 /// [DataMember(Name = "eID_DG4", EmitDefaultValue = false)] - public Dictionary EIDDG4 { get; set; } + public Dictionary? EIDDG4 { get; set; } /// /// Gets or Sets EIDDG5 /// [DataMember(Name = "eID_DG5", EmitDefaultValue = false)] - public Dictionary EIDDG5 { get; set; } + public Dictionary? EIDDG5 { get; set; } /// /// Gets or Sets EIDDG6 /// [DataMember(Name = "eID_DG6", EmitDefaultValue = false)] - public Dictionary EIDDG6 { get; set; } + public Dictionary? EIDDG6 { get; set; } /// /// Gets or Sets EIDDG7 /// [DataMember(Name = "eID_DG7", EmitDefaultValue = false)] - public Dictionary EIDDG7 { get; set; } + public Dictionary? EIDDG7 { get; set; } /// /// Gets or Sets EIDDG8 /// [DataMember(Name = "eID_DG8", EmitDefaultValue = false)] - public Dictionary EIDDG8 { get; set; } + public Dictionary? EIDDG8 { get; set; } /// /// Gets or Sets EIDDG9 /// [DataMember(Name = "eID_DG9", EmitDefaultValue = false)] - public Dictionary EIDDG9 { get; set; } + public Dictionary? EIDDG9 { get; set; } /// /// Gets or Sets EIDDG10 /// [DataMember(Name = "eID_DG10", EmitDefaultValue = false)] - public Dictionary EIDDG10 { get; set; } + public Dictionary? EIDDG10 { get; set; } /// /// Gets or Sets EIDDG11 /// [DataMember(Name = "eID_DG11", EmitDefaultValue = false)] - public Dictionary EIDDG11 { get; set; } + public Dictionary? EIDDG11 { get; set; } /// /// Gets or Sets EIDDG12 /// [DataMember(Name = "eID_DG12", EmitDefaultValue = false)] - public Dictionary EIDDG12 { get; set; } + public Dictionary? EIDDG12 { get; set; } /// /// Gets or Sets EIDDG13 /// [DataMember(Name = "eID_DG13", EmitDefaultValue = false)] - public Dictionary EIDDG13 { get; set; } + public Dictionary? EIDDG13 { get; set; } /// /// Gets or Sets EIDDG14 /// [DataMember(Name = "eID_DG14", EmitDefaultValue = false)] - public Dictionary EIDDG14 { get; set; } + public Dictionary? EIDDG14 { get; set; } /// /// Gets or Sets EIDDG15 /// [DataMember(Name = "eID_DG15", EmitDefaultValue = false)] - public Dictionary EIDDG15 { get; set; } + public Dictionary? EIDDG15 { get; set; } /// /// Gets or Sets EIDDG16 /// [DataMember(Name = "eID_DG16", EmitDefaultValue = false)] - public Dictionary EIDDG16 { get; set; } + public Dictionary? EIDDG16 { get; set; } /// /// Gets or Sets EIDDG17 /// [DataMember(Name = "eID_DG17", EmitDefaultValue = false)] - public Dictionary EIDDG17 { get; set; } + public Dictionary? EIDDG17 { get; set; } /// /// Gets or Sets EIDDG18 /// [DataMember(Name = "eID_DG18", EmitDefaultValue = false)] - public Dictionary EIDDG18 { get; set; } + public Dictionary? EIDDG18 { get; set; } /// /// Gets or Sets EIDDG19 /// [DataMember(Name = "eID_DG19", EmitDefaultValue = false)] - public Dictionary EIDDG19 { get; set; } + public Dictionary? EIDDG19 { get; set; } /// /// Gets or Sets EIDDG20 /// [DataMember(Name = "eID_DG20", EmitDefaultValue = false)] - public Dictionary EIDDG20 { get; set; } + public Dictionary? EIDDG20 { get; set; } /// /// Gets or Sets EIDDG21 /// [DataMember(Name = "eID_DG21", EmitDefaultValue = false)] - public Dictionary EIDDG21 { get; set; } + public Dictionary? EIDDG21 { get; set; } /// /// Gets or Sets EDLCOM /// [DataMember(Name = "eDL_COM", EmitDefaultValue = false)] - public Dictionary EDLCOM { get; set; } + public Dictionary? EDLCOM { get; set; } /// /// Gets or Sets EDLSOD /// [DataMember(Name = "eDL_SOD", EmitDefaultValue = false)] - public Dictionary EDLSOD { get; set; } + public Dictionary? EDLSOD { get; set; } /// /// Gets or Sets EDLDG1 /// [DataMember(Name = "eDL_DG1", EmitDefaultValue = false)] - public Dictionary EDLDG1 { get; set; } + public Dictionary? EDLDG1 { get; set; } /// /// Gets or Sets EDLDG2 /// [DataMember(Name = "eDL_DG2", EmitDefaultValue = false)] - public Dictionary EDLDG2 { get; set; } + public Dictionary? EDLDG2 { get; set; } /// /// Gets or Sets EDLDG3 /// [DataMember(Name = "eDL_DG3", EmitDefaultValue = false)] - public Dictionary EDLDG3 { get; set; } + public Dictionary? EDLDG3 { get; set; } /// /// Gets or Sets EDLDG4 /// [DataMember(Name = "eDL_DG4", EmitDefaultValue = false)] - public Dictionary EDLDG4 { get; set; } + public Dictionary? EDLDG4 { get; set; } /// /// Gets or Sets EDLDG5 /// [DataMember(Name = "eDL_DG5", EmitDefaultValue = false)] - public Dictionary EDLDG5 { get; set; } + public Dictionary? EDLDG5 { get; set; } /// /// Gets or Sets EDLDG6 /// [DataMember(Name = "eDL_DG6", EmitDefaultValue = false)] - public Dictionary EDLDG6 { get; set; } + public Dictionary? EDLDG6 { get; set; } /// /// Gets or Sets EDLDG7 /// [DataMember(Name = "eDL_DG7", EmitDefaultValue = false)] - public Dictionary EDLDG7 { get; set; } + public Dictionary? EDLDG7 { get; set; } /// /// Gets or Sets EDLDG8 /// [DataMember(Name = "eDL_DG8", EmitDefaultValue = false)] - public Dictionary EDLDG8 { get; set; } + public Dictionary? EDLDG8 { get; set; } /// /// Gets or Sets EDLDG9 /// [DataMember(Name = "eDL_DG9", EmitDefaultValue = false)] - public Dictionary EDLDG9 { get; set; } + public Dictionary? EDLDG9 { get; set; } /// /// Gets or Sets EDLDG10 /// [DataMember(Name = "eDL_DG10", EmitDefaultValue = false)] - public Dictionary EDLDG10 { get; set; } + public Dictionary? EDLDG10 { get; set; } /// /// Gets or Sets EDLDG11 /// [DataMember(Name = "eDL_DG11", EmitDefaultValue = false)] - public Dictionary EDLDG11 { get; set; } + public Dictionary? EDLDG11 { get; set; } /// /// Gets or Sets EDLDG12 /// [DataMember(Name = "eDL_DG12", EmitDefaultValue = false)] - public Dictionary EDLDG12 { get; set; } + public Dictionary? EDLDG12 { get; set; } /// /// Gets or Sets EDLDG13 /// [DataMember(Name = "eDL_DG13", EmitDefaultValue = false)] - public Dictionary EDLDG13 { get; set; } + public Dictionary? EDLDG13 { get; set; } /// /// Gets or Sets EDLDG14 /// [DataMember(Name = "eDL_DG14", EmitDefaultValue = false)] - public Dictionary EDLDG14 { get; set; } + public Dictionary? EDLDG14 { get; set; } /// /// Gets or Sets VisibleDigitalSeal /// [DataMember(Name = "Visible_Digital_Seal", EmitDefaultValue = false)] - public Dictionary VisibleDigitalSeal { get; set; } + public Dictionary? VisibleDigitalSeal { get; set; } /// /// Gets or Sets VisibleDigitalSealNC /// [DataMember(Name = "Visible_Digital_Seal_NC", EmitDefaultValue = false)] - public Dictionary VisibleDigitalSealNC { get; set; } + public Dictionary? VisibleDigitalSealNC { get; set; } /// /// Gets or Sets DigitalSignature /// [DataMember(Name = "Digital_Signature", EmitDefaultValue = false)] - public Dictionary DigitalSignature { get; set; } + public Dictionary? DigitalSignature { get; set; } /// /// Gets or Sets RFIDSessionData /// [DataMember(Name = "RFID_Session_Data", EmitDefaultValue = false)] - public RfidSessionData RFIDSessionData { get; set; } + public RfidSessionData? RFIDSessionData { get; set; } /// /// Gets or Sets RFIDSessionDataStatus /// [DataMember(Name = "RFID_Session_Data_Status", EmitDefaultValue = false)] - public DetailsRFID RFIDSessionDataStatus { get; set; } + public DetailsRFID? RFIDSessionDataStatus { get; set; } /// /// Indexes of groups that aren't read /// /// Indexes of groups that aren't read [DataMember(Name = "RFID_ePassp_Directory", EmitDefaultValue = false)] - public List RFIDEPasspDirectory { get; set; } + public List? RFIDEPasspDirectory { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs index 5dc1ee7..d6ea24c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ByteArrayResult.cs @@ -46,8 +46,8 @@ protected ByteArrayResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public ByteArrayResult(string byteArray = default(string), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.DTC_VC). + public ByteArrayResult(string byteArray = default(string), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.DTC_VC) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "byteArray" is required (not null) if (byteArray == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs index 885670b..45da33f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/CandidatesListItem.cs @@ -45,7 +45,7 @@ public partial class CandidatesListItem : IValidatableObject /// Gets or Sets CandidatesList /// [DataMember(Name = "CandidatesList", EmitDefaultValue = false)] - public DocumentTypesCandidatesList CandidatesList { get; set; } + public DocumentTypesCandidatesList? CandidatesList { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs index 409e8e0..92c416d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs @@ -160,7 +160,7 @@ protected ChosenDocumentType() { } /// Gets or Sets RotationAngle /// [DataMember(Name = "RotationAngle", EmitDefaultValue = false)] - public int RotationAngle { get; set; } + public int? RotationAngle { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs index b8a3322..19ebd9b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ChosenDocumentTypeResult.cs @@ -46,8 +46,8 @@ protected ChosenDocumentTypeResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public ChosenDocumentTypeResult(OneCandidate oneCandidate = default(OneCandidate), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.DOCUMENT_TYPE). + public ChosenDocumentTypeResult(OneCandidate oneCandidate = default(OneCandidate), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.DOCUMENT_TYPE) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "oneCandidate" is required (not null) if (oneCandidate == null) @@ -67,7 +67,7 @@ protected ChosenDocumentTypeResult() { } /// Gets or Sets XMLBuffer /// [DataMember(Name = "XML_buffer", EmitDefaultValue = false)] - public string XMLBuffer { get; private set; } + public string? XMLBuffer { get; private set; } /// /// Returns false as XMLBuffer should not be serialized given that it's read-only. diff --git a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs index 514ead6..16134c1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ContainerList.cs @@ -58,7 +58,7 @@ protected ContainerList() { } /// /// Length of list (Count for items) [DataMember(Name = "Count", EmitDefaultValue = false)] - public int Count { get; set; } + public int? Count { get; set; } /// /// Gets or Sets List diff --git a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs index ae18954..c658d73 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DataModule.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DataModule.cs @@ -81,13 +81,13 @@ protected DataModule() { } /// Gets or Sets MReserved1 /// [DataMember(Name = "mReserved1", EmitDefaultValue = false)] - public int MReserved1 { get; set; } + public int? MReserved1 { get; set; } /// /// Gets or Sets MReserver2 /// [DataMember(Name = "mReserver2", EmitDefaultValue = false)] - public int MReserver2 { get; set; } + public int? MReserver2 { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs index a839854..3b0e07d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs @@ -115,7 +115,7 @@ protected DetailsOptical() { } /// Gets or Sets Vds /// [DataMember(Name = "vds", EmitDefaultValue = false)] - public int Vds { get; set; } + public int? Vds { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs index 2497b1b..db794e5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs @@ -55,37 +55,37 @@ public partial class DeviceInfo : IValidatableObject /// Gets or Sets AppName /// [DataMember(Name = "app-name", EmitDefaultValue = false)] - public string AppName { get; set; } + public string? AppName { get; set; } /// /// Gets or Sets VarVersion /// [DataMember(Name = "version", EmitDefaultValue = false)] - public string VarVersion { get; set; } + public string? VarVersion { get; set; } /// /// Gets or Sets LicenseId /// [DataMember(Name = "license-id", EmitDefaultValue = false)] - public string LicenseId { get; set; } + public string? LicenseId { get; set; } /// /// Gets or Sets LicenseSerial /// [DataMember(Name = "license-serial", EmitDefaultValue = false)] - public string LicenseSerial { get; set; } + public string? LicenseSerial { get; set; } /// /// Gets or Sets ValidUntil /// [DataMember(Name = "valid-until", EmitDefaultValue = false)] - public DateTime ValidUntil { get; set; } + public DateTime? ValidUntil { get; set; } /// /// Gets or Sets ServerTime /// [DataMember(Name = "server-time", EmitDefaultValue = false)] - public DateTime ServerTime { get; set; } + public DateTime? ServerTime { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs index c12053d..90c07b1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocBarCodeInfo.cs @@ -46,8 +46,8 @@ protected DocBarCodeInfo() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public DocBarCodeInfo(DocBarCodeInfoFieldsList varDocBarCodeInfo = default(DocBarCodeInfoFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.BARCODES). + public DocBarCodeInfo(DocBarCodeInfoFieldsList varDocBarCodeInfo = default(DocBarCodeInfoFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.BARCODES) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "varDocBarCodeInfo" is required (not null) if (varDocBarCodeInfo == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs index 63e347c..435c36b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentBinaryInfoResult.cs @@ -46,8 +46,8 @@ protected DocumentBinaryInfoResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public DocumentBinaryInfoResult(TDocBinaryInfo tDocBinaryInfo = default(TDocBinaryInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.RFID_RAW_DATA). + public DocumentBinaryInfoResult(TDocBinaryInfo tDocBinaryInfo = default(TDocBinaryInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.RFID_RAW_DATA) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "tDocBinaryInfo" is required (not null) if (tDocBinaryInfo == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs index 2c5c800..fa4845a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImage.cs @@ -68,7 +68,7 @@ protected DocumentImage() { } /// /// Image format [DataMember(Name = "format", EmitDefaultValue = false)] - public string Format { get; set; } + public string? Format { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs index a9f8224..84bf361 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentImageResult.cs @@ -46,8 +46,8 @@ protected DocumentImageResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public DocumentImageResult(ImageData rawImageContainer = default(ImageData), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.DOCUMENT_IMAGE). + public DocumentImageResult(ImageData rawImageContainer = default(ImageData), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.DOCUMENT_IMAGE) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "rawImageContainer" is required (not null) if (rawImageContainer == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs index 4d62a02..5264a0c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPosition.cs @@ -166,31 +166,31 @@ protected DocumentPosition() { } /// Gets or Sets Inverse /// [DataMember(Name = "Inverse", EmitDefaultValue = false)] - public int Inverse { get; set; } + public int? Inverse { get; set; } /// /// Gets or Sets ObjArea /// [DataMember(Name = "ObjArea", EmitDefaultValue = false)] - public int ObjArea { get; set; } + public int? ObjArea { get; set; } /// /// Gets or Sets ObjIntAngleDev /// [DataMember(Name = "ObjIntAngleDev", EmitDefaultValue = false)] - public int ObjIntAngleDev { get; set; } + public int? ObjIntAngleDev { get; set; } /// /// Gets or Sets PerspectiveTr /// [DataMember(Name = "PerspectiveTr", EmitDefaultValue = false)] - public int PerspectiveTr { get; set; } + public int? PerspectiveTr { get; set; } /// /// Gets or Sets ResultStatus /// [DataMember(Name = "ResultStatus", EmitDefaultValue = false)] - public int ResultStatus { get; set; } + public int? ResultStatus { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs index fc6c770..68c87c3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentPositionResult.cs @@ -46,8 +46,8 @@ protected DocumentPositionResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public DocumentPositionResult(DocumentPosition documentPosition = default(DocumentPosition), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.BARCODE_POSITION). + public DocumentPositionResult(DocumentPosition documentPosition = default(DocumentPosition), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.BARCODE_POSITION) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "documentPosition" is required (not null) if (documentPosition == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs index 5b4109f..3049e9e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidates.cs @@ -53,7 +53,7 @@ public partial class DocumentTypesCandidates : IValidatableObject /// Gets or Sets Candidates /// [DataMember(Name = "Candidates", EmitDefaultValue = false)] - public List Candidates { get; set; } + public List? Candidates { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs index 7631127..8c84816 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesList.cs @@ -53,7 +53,7 @@ public partial class DocumentTypesCandidatesList : IValidatableObject /// Gets or Sets Candidates /// [DataMember(Name = "Candidates", EmitDefaultValue = false)] - public List Candidates { get; set; } + public List? Candidates { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs index 6497f44..0ef47c4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentTypesCandidatesResult.cs @@ -46,8 +46,8 @@ protected DocumentTypesCandidatesResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public DocumentTypesCandidatesResult(DocumentTypesCandidatesList candidatesList = default(DocumentTypesCandidatesList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.DOCUMENT_TYPE_CANDIDATES). + public DocumentTypesCandidatesResult(DocumentTypesCandidatesList candidatesList = default(DocumentTypesCandidatesList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.DOCUMENT_TYPE_CANDIDATES) : base(bufLength, light, listIdx, pageIdx, resultType) { this.CandidatesList = candidatesList; } @@ -56,7 +56,7 @@ protected DocumentTypesCandidatesResult() { } /// Gets or Sets CandidatesList /// [DataMember(Name = "CandidatesList", EmitDefaultValue = false)] - public DocumentTypesCandidatesList CandidatesList { get; set; } + public DocumentTypesCandidatesList? CandidatesList { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs index 66658aa..ca0dafb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DocumentsDatabase.cs @@ -52,28 +52,28 @@ public partial class DocumentsDatabase : IValidatableObject /// /// Document database description [DataMember(Name = "Description", EmitDefaultValue = false)] - public string Description { get; set; } + public string? Description { get; set; } /// /// Date the document database was created /// /// Date the document database was created [DataMember(Name = "ExportDate", EmitDefaultValue = false)] - public string ExportDate { get; set; } + public string? ExportDate { get; set; } /// /// Document database identifier /// /// Document database identifier [DataMember(Name = "ID", EmitDefaultValue = false)] - public string ID { get; set; } + public string? ID { get; set; } /// /// Document database version /// /// Document database version [DataMember(Name = "Version", EmitDefaultValue = false)] - public string VarVersion { get; set; } + public string? VarVersion { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index 0cf7fa2..c40e0ab 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs @@ -56,7 +56,7 @@ protected EncryptedRCLItem() { } /// /// Base64 encoded data /* - [B@4949a73a + [B@5af2ea19 */ [DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs index 0f5fa4a..58bb95a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs @@ -46,8 +46,8 @@ protected EncryptedRCLResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public EncryptedRCLResult(byte[] encryptedRCL = default(byte[]), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.ENCRYPTED_RCL). + public EncryptedRCLResult(byte[] encryptedRCL = default(byte[]), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.ENCRYPTED_RCL) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "encryptedRCL" is required (not null) if (encryptedRCL == null) @@ -62,7 +62,7 @@ protected EncryptedRCLResult() { } /// /// Base64 encoded data /* - [B@4949a73a + [B@5af2ea19 */ [DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs index 5652ec5..d40275d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ErrorCoordinates.cs @@ -51,25 +51,25 @@ public partial class ErrorCoordinates : IValidatableObject /// Gets or Sets Left /// [DataMember(Name = "Left", EmitDefaultValue = false)] - public decimal Left { get; set; } + public decimal? Left { get; set; } /// /// Gets or Sets Top /// [DataMember(Name = "Top", EmitDefaultValue = false)] - public decimal Top { get; set; } + public decimal? Top { get; set; } /// /// Gets or Sets Right /// [DataMember(Name = "Right", EmitDefaultValue = false)] - public decimal Right { get; set; } + public decimal? Right { get; set; } /// /// Gets or Sets Bottom /// [DataMember(Name = "Bottom", EmitDefaultValue = false)] - public decimal Bottom { get; set; } + public decimal? Bottom { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/IdentChecks.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/IdentChecks.cs index ef71321..9713681 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/IdentChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/IdentChecks.cs @@ -7,9 +7,9 @@ public class IdentChecks : AuthenticityResult public IdentChecks(AuthenticityCheckResult authenticityCheckResult) : base(authenticityCheckResult) { } - public IdentResult ChecksByElement(int type) + public IdentResult ChecksByElement(SecurityFeatureType type) { - return this.Items()?.FirstOrDefault(t => t.Type == type); + return this.Items()?.FirstOrDefault(t => t.ElementType == type); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/SecurityFeatureChecks.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/SecurityFeatureChecks.cs index bd4a8a1..eac62c8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/SecurityFeatureChecks.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/Autheticity/SecurityFeatureChecks.cs @@ -7,9 +7,9 @@ public class SecurityFeatureChecks : AuthenticityResult public SecurityFeatureChecks(AuthenticityCheckResult authenticityResult) : base(authenticityResult) { } - public SecurityFeatureResult ChecksByElement(int type) + public SecurityFeatureResult ChecksByElement(SecurityFeatureType type) { - return this.Items()?.FirstOrDefault(t => t.Type == type); + return this.Items()?.FirstOrDefault(t => t.ElementType == type); } } } diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs index 35ce135..2c12226 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionParams.cs @@ -36,7 +36,7 @@ public RecognitionParams WithLog(bool log) return this; } - public RecognitionParams WithProcessAuth(int processAuth) + public RecognitionParams WithProcessAuth(AuthenticityResultType processAuth) { ProcessAuth = processAuth; return this; diff --git a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs index 73ffb3e..b784eb5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Ext/RecognitionResponse.cs @@ -84,7 +84,7 @@ public T ResultByType(Result type, int? pageIdx=0) where T: ResultItem { foreach(var item in OriginalResponse.ContainerList.List) { - if (item.ResultType == (int)type) { + if (item.ResultType == type) { if (pageIdx == null) return (T) item; @@ -102,7 +102,7 @@ public List ResultsByType(Result type) where T: ResultItem var results = new List(); foreach(var item in OriginalResponse.ContainerList.List) { - if (item.ResultType == (int)type) { + if (item.ResultType == type) { results.Add((T)item); } } diff --git a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs index 4349cae..4ea76ad 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FDSIDList.cs @@ -133,7 +133,7 @@ protected FDSIDList() { } /// /// Document description [DataMember(Name = "dDescription", EmitDefaultValue = false)] - public string DDescription { get; set; } + public string? DDescription { get; set; } /// /// Year of publication of the document @@ -154,14 +154,14 @@ protected FDSIDList() { } /// /// Issuing state code [DataMember(Name = "dStateCode", EmitDefaultValue = false)] - public string DStateCode { get; set; } + public string? DStateCode { get; set; } /// /// Issuing state name /// /// Issuing state name [DataMember(Name = "dStateName", EmitDefaultValue = false)] - public string DStateName { get; set; } + public string? DStateName { get; set; } /// /// Whether the document is deprecated diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs index 1737289..8d31f4c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApi.cs @@ -67,7 +67,7 @@ public partial class FaceApi : IValidatableObject https://faceapi.regulaforensics.com */ [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } + public string? Url { get; set; } /// /// The processing mode: \"match\" or \"match+search\". @@ -77,13 +77,13 @@ public partial class FaceApi : IValidatableObject match */ [DataMember(Name = "mode", EmitDefaultValue = false)] - public string Mode { get; set; } + public string? Mode { get; set; } /// /// Gets or Sets Search /// [DataMember(Name = "search", EmitDefaultValue = false)] - public FaceApiSearch Search { get; set; } + public FaceApiSearch? Search { get; set; } /// /// The similarity threshold, 0-100. Above 75 means that the faces' similarity is verified, below 75 is not. @@ -93,7 +93,7 @@ public partial class FaceApi : IValidatableObject 75 */ [DataMember(Name = "threshold", EmitDefaultValue = false)] - public int Threshold { get; set; } + public int? Threshold { get; set; } /// /// The Regula Face Web service requests timeout, ms. @@ -103,7 +103,7 @@ public partial class FaceApi : IValidatableObject 3000 */ [DataMember(Name = "serviceTimeout", EmitDefaultValue = false)] - public int ServiceTimeout { get; set; } + public int? ServiceTimeout { get; set; } /// /// Proxy to use, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXY.html\" target=\"_blank\">cURL standard</a>. @@ -113,7 +113,7 @@ public partial class FaceApi : IValidatableObject http://localhost:8080 */ [DataMember(Name = "proxy", EmitDefaultValue = false)] - public string Proxy { get; set; } + public string? Proxy { get; set; } /// /// Username and password to use for proxy authentication, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYUSERPWD.html\" target=\"_blank\">cURL standard</a>. @@ -123,7 +123,7 @@ public partial class FaceApi : IValidatableObject user:pass */ [DataMember(Name = "proxy_userpwd", EmitDefaultValue = false)] - public string ProxyUserpwd { get; set; } + public string? ProxyUserpwd { get; set; } /// /// Proxy protocol type, should be set according to the <a href=\"https://curl.se/libcurl/c/CURLOPT_PROXYTYPE.html\" target=\"_blank\">cURL standard</a>. @@ -133,7 +133,7 @@ public partial class FaceApi : IValidatableObject 0 */ [DataMember(Name = "proxy_type", EmitDefaultValue = false)] - public int ProxyType { get; set; } + public int? ProxyType { get; set; } /// /// The age threshold for the portrait comparison. Default: 13. @@ -143,7 +143,7 @@ public partial class FaceApi : IValidatableObject 13 */ [DataMember(Name = "childAgeThreshold", EmitDefaultValue = false)] - public int ChildAgeThreshold { get; set; } + public int? ChildAgeThreshold { get; set; } /// /// Estimated duration of validity for a child's passport, years. Default: 5. @@ -153,7 +153,7 @@ public partial class FaceApi : IValidatableObject 5 */ [DataMember(Name = "childDocValidityYears", EmitDefaultValue = false)] - public int ChildDocValidityYears { get; set; } + public int? ChildDocValidityYears { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs index 69c050e..bc625dd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceApiSearch.cs @@ -50,21 +50,21 @@ public partial class FaceApiSearch : IValidatableObject /// /// The maximum number of results to be returned. [DataMember(Name = "limit", EmitDefaultValue = false)] - public int Limit { get; set; } + public int? Limit { get; set; } /// /// The similarity threshold. /// /// The similarity threshold. [DataMember(Name = "threshold", EmitDefaultValue = false)] - public float Threshold { get; set; } + public float? Threshold { get; set; } /// /// The groups where to conduct the search. /// /// The groups where to conduct the search. [DataMember(Name = "group_ids", EmitDefaultValue = false)] - public List GroupIds { get; set; } + public List? GroupIds { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs index b935368..d72a452 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetection.cs @@ -81,13 +81,13 @@ protected FaceDetection() { } /// Gets or Sets Reserved1 /// [DataMember(Name = "Reserved1", EmitDefaultValue = false)] - public int Reserved1 { get; set; } + public int? Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// [DataMember(Name = "Reserved2", EmitDefaultValue = false)] - public int Reserved2 { get; set; } + public int? Reserved2 { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs index 1be11f7..aee7740 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs @@ -46,8 +46,8 @@ protected FaceDetectionResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public FaceDetectionResult(FaceDetection faceDetection = default(FaceDetection), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.FACE_DETECTION). + public FaceDetectionResult(FaceDetection faceDetection = default(FaceDetection), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.FACE_DETECTION) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "faceDetection" is required (not null) if (faceDetection == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs index 5704843..5ed4523 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberItem.cs @@ -112,7 +112,7 @@ protected FiberItem() { } /// /// For UV_Background authentication result type [DataMember(Name = "LightDisp", EmitDefaultValue = false)] - public int LightDisp { get; set; } + public int? LightDisp { get; set; } /// /// Coordinates of located areas for defined fibers type diff --git a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs index 037a229..2835e2f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FiberResult.cs @@ -56,11 +56,11 @@ protected FiberResult() { } /// Fibers length value for located areas (in pixels) (required). /// Fibers value for areas (in pixels) (required). /// Fibers color value (required). - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// type (required) (default to AuthenticityResultType.UV_FIBERS). /// elementResult. /// elementDiagnose. /// percentValue. - public FiberResult(int rectCount = default(int), int expectedCount = default(int), Light? lightValue = default(Light?), int lightDisp = default(int), List rectArray = default(List), List width = default(List), List length = default(List), List area = default(List), List colorValues = default(List), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + public FiberResult(int rectCount = default(int), int expectedCount = default(int), Light? lightValue = default(Light?), int lightDisp = default(int), List rectArray = default(List), List width = default(List), List length = default(List), List area = default(List), List colorValues = default(List), AuthenticityResultType type = AuthenticityResultType.UV_FIBERS, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) { this.RectCount = rectCount; this.ExpectedCount = expectedCount; @@ -117,7 +117,7 @@ protected FiberResult() { } /// /// For UV_Background authentication result type [DataMember(Name = "LightDisp", EmitDefaultValue = false)] - public int LightDisp { get; set; } + public int? LightDisp { get; set; } /// /// Coordinates of located areas for defined fibers type diff --git a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs index 148c61a..09bc224 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GetTransactionsByTagResponse.cs @@ -50,21 +50,21 @@ public partial class GetTransactionsByTagResponse : IValidatableObject /// /// Transaction id [DataMember(Name = "id", EmitDefaultValue = false)] - public Guid Id { get; set; } + public Guid? Id { get; set; } /// /// Transaction status /// /// Transaction status [DataMember(Name = "state", EmitDefaultValue = false)] - public int State { get; set; } + public int? State { get; set; } /// /// Last time updated /// /// Last time updated [DataMember(Name = "updatedAt", EmitDefaultValue = false)] - public DateTime UpdatedAt { get; set; } + public DateTime? UpdatedAt { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs index 788801a..24b76ef 100644 --- a/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/GraphicsResult.cs @@ -46,8 +46,8 @@ protected GraphicsResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public GraphicsResult(GraphicFieldsList docGraphicsInfo = default(GraphicFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.VISUAL_GRAPHICS). + public GraphicsResult(GraphicFieldsList docGraphicsInfo = default(GraphicFieldsList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.VISUAL_GRAPHICS) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "docGraphicsInfo" is required (not null) if (docGraphicsInfo == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs index 52f25a5..2f654fc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Healthcheck.cs @@ -150,13 +150,13 @@ protected Healthcheck() { } /// Gets or Sets Metadata /// [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } + public Dictionary? Metadata { get; set; } /// /// Gets or Sets DocumentsDatabase /// [DataMember(Name = "documentsDatabase", EmitDefaultValue = false)] - public HealthcheckDocumentsDatabase DocumentsDatabase { get; set; } + public HealthcheckDocumentsDatabase? DocumentsDatabase { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs index 4fa8c47..ae75b0c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentItem.cs @@ -82,7 +82,7 @@ protected IdentItem() { } /// Gets or Sets Area /// [DataMember(Name = "Area", EmitDefaultValue = false)] - public RectangleCoordinates Area { get; set; } + public RectangleCoordinates? Area { get; set; } /// /// Gets or Sets Image @@ -100,7 +100,7 @@ protected IdentItem() { } /// Gets or Sets AreaList /// [DataMember(Name = "AreaList", EmitDefaultValue = false)] - public AreaContainer AreaList { get; set; } + public AreaContainer? AreaList { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs index d83fa76..ee9c4d5 100644 --- a/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/IdentResult.cs @@ -59,11 +59,11 @@ protected IdentResult() { } /// image (required). /// etalonImage (required). /// areaList. - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// type (required) (default to AuthenticityResultType.IMAGE_PATTERN). /// elementResult. /// elementDiagnose. /// percentValue. - public IdentResult(SecurityFeatureType elementType = default(SecurityFeatureType), Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData image = default(ImageData), ImageData etalonImage = default(ImageData), AreaContainer areaList = default(AreaContainer), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + public IdentResult(SecurityFeatureType elementType = default(SecurityFeatureType), Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData image = default(ImageData), ImageData etalonImage = default(ImageData), AreaContainer areaList = default(AreaContainer), AuthenticityResultType type = AuthenticityResultType.IMAGE_PATTERN, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) { this.ElementType = elementType; this.LightIndex = lightIndex; @@ -87,7 +87,7 @@ protected IdentResult() { } /// Gets or Sets Area /// [DataMember(Name = "Area", EmitDefaultValue = false)] - public RectangleCoordinates Area { get; set; } + public RectangleCoordinates? Area { get; set; } /// /// Gets or Sets Image @@ -105,7 +105,7 @@ protected IdentResult() { } /// Gets or Sets AreaList /// [DataMember(Name = "AreaList", EmitDefaultValue = false)] - public AreaContainer AreaList { get; set; } + public AreaContainer? AreaList { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs index 7d409b9..2af365f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageData.cs @@ -68,7 +68,7 @@ protected ImageData() { } /// /// Image format [DataMember(Name = "format", EmitDefaultValue = false)] - public string Format { get; set; } + public string? Format { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs index b511822..f3f56fc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQA.cs @@ -62,63 +62,63 @@ public partial class ImageQA : IValidatableObject /// /// Set the threshold for an actual document brightness below which the check fails [DataMember(Name = "brightnessThreshold", EmitDefaultValue = false)] - public double BrightnessThreshold { get; set; } + public double? BrightnessThreshold { get; set; } /// /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. /// /// This parameter sets threshold for Image QA check of the presented document physical dpi. If actual document dpi is below this threshold, check will fail. [DataMember(Name = "dpiThreshold", EmitDefaultValue = false)] - public int DpiThreshold { get; set; } + public int? DpiThreshold { get; set; } /// /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. /// /// This parameter sets threshold for Image QA check of the presented document perspective angle in degrees. If actual document perspective angle is above this threshold, check will fail. [DataMember(Name = "angleThreshold", EmitDefaultValue = false)] - public int AngleThreshold { get; set; } + public int? AngleThreshold { get; set; } /// /// This option enables focus check while performing image quality validation. /// /// This option enables focus check while performing image quality validation. - [DataMember(Name = "focusCheck", EmitDefaultValue = true)] - public bool FocusCheck { get; set; } + [DataMember(Name = "focusCheck", EmitDefaultValue = false)] + public bool? FocusCheck { get; set; } /// /// This option enables glares check while performing image quality validation. /// /// This option enables glares check while performing image quality validation. - [DataMember(Name = "glaresCheck", EmitDefaultValue = true)] - public bool GlaresCheck { get; set; } + [DataMember(Name = "glaresCheck", EmitDefaultValue = false)] + public bool? GlaresCheck { get; set; } /// /// This option enables colorness check while performing image quality validation. /// /// This option enables colorness check while performing image quality validation. - [DataMember(Name = "colornessCheck", EmitDefaultValue = true)] - public bool ColornessCheck { get; set; } + [DataMember(Name = "colornessCheck", EmitDefaultValue = false)] + public bool? ColornessCheck { get; set; } /// /// This option enables screen capture (moire patterns) check while performing image quality validation. /// /// This option enables screen capture (moire patterns) check while performing image quality validation. - [DataMember(Name = "moireCheck", EmitDefaultValue = true)] - public bool MoireCheck { get; set; } + [DataMember(Name = "moireCheck", EmitDefaultValue = false)] + public bool? MoireCheck { get; set; } /// /// This parameter specifies the necessary margin. Default 0. /// /// This parameter specifies the necessary margin. Default 0. [DataMember(Name = "documentPositionIndent", EmitDefaultValue = false)] - public int DocumentPositionIndent { get; set; } + public int? DocumentPositionIndent { get; set; } /// /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. /// /// This parameter controls the quality checks that the image should pass to be considered a valid input during the scanning process. [DataMember(Name = "expectedPass", EmitDefaultValue = false)] - public List ExpectedPass { get; set; } + public List? ExpectedPass { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs index 7c334d6..ec52ccb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityCheck.cs @@ -80,7 +80,7 @@ protected ImageQualityCheck() { } /// Gets or Sets Areas /// [DataMember(Name = "areas", EmitDefaultValue = false)] - public AreaArray Areas { get; set; } + public AreaArray? Areas { get; set; } /// /// Check mean value diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs index 66c6883..01758dc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageQualityResult.cs @@ -46,8 +46,8 @@ protected ImageQualityResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public ImageQualityResult(ImageQualityCheckList imageQualityCheckList = default(ImageQualityCheckList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.IMAGE_QUALITY). + public ImageQualityResult(ImageQualityCheckList imageQualityCheckList = default(ImageQualityCheckList), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.IMAGE_QUALITY) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "imageQualityCheckList" is required (not null) if (imageQualityCheckList == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs index 59b3ad2..ba2f288 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImageTransactionData.cs @@ -45,7 +45,7 @@ public partial class ImageTransactionData : IValidatableObject /// Gets or Sets Image /// [DataMember(Name = "image", EmitDefaultValue = false)] - public ImagesFieldValue Image { get; set; } + public ImagesFieldValue? Image { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Images.cs b/src/Regula.DocumentReader.WebClient/Model/Images.cs index a55a2d2..6e26f7f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Images.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Images.cs @@ -67,14 +67,14 @@ protected Images() { } /// /// Fields count [DataMember(Name = "fieldCount", EmitDefaultValue = false)] - public int FieldCount { get; set; } + public int? FieldCount { get; set; } /// /// Available sources count /// /// Available sources count [DataMember(Name = "availableSourceCount", EmitDefaultValue = false)] - public int AvailableSourceCount { get; set; } + public int? AvailableSourceCount { get; set; } /// /// Gets or Sets AvailableSourceList diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs index f79587f..3b6cf6a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesField.cs @@ -86,7 +86,7 @@ protected ImagesField() { } /// /// Field value count [DataMember(Name = "valueCount", EmitDefaultValue = false)] - public decimal ValueCount { get; set; } + public decimal? ValueCount { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs index 1b14be2..9ce835b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesFieldValue.cs @@ -82,7 +82,7 @@ protected ImagesFieldValue() { } Base64 encoded image */ [DataMember(Name = "value", EmitDefaultValue = false)] - public string Value { get; set; } + public string? Value { get; set; } /// /// Base64 encoded image @@ -92,14 +92,14 @@ protected ImagesFieldValue() { } Base64 encoded image */ [DataMember(Name = "originalValue", EmitDefaultValue = false)] - public string OriginalValue { get; set; } + public string? OriginalValue { get; set; } /// /// Original page index /// /// Original page index [DataMember(Name = "originalPageIndex", EmitDefaultValue = false)] - public int OriginalPageIndex { get; set; } + public int? OriginalPageIndex { get; set; } /// /// Page index of the image from input list @@ -119,13 +119,13 @@ protected ImagesFieldValue() { } /// Gets or Sets FieldRect /// [DataMember(Name = "fieldRect", EmitDefaultValue = false)] - public RectangleCoordinates FieldRect { get; set; } + public RectangleCoordinates? FieldRect { get; set; } /// /// Gets or Sets RfidOrigin /// [DataMember(Name = "rfidOrigin", EmitDefaultValue = false)] - public RfidOrigin RfidOrigin { get; set; } + public RfidOrigin? RfidOrigin { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs index 082c791..f47b00b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ImagesResult.cs @@ -46,8 +46,8 @@ protected ImagesResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public ImagesResult(Images images = default(Images), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.IMAGES). + public ImagesResult(Images images = default(Images), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.IMAGES) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "images" is required (not null) if (images == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/InData.cs b/src/Regula.DocumentReader.WebClient/Model/InData.cs index d49c009..d7096f8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InData.cs @@ -47,13 +47,13 @@ public partial class InData : IValidatableObject /// Gets or Sets Video /// [DataMember(Name = "video", EmitDefaultValue = false)] - public InDataVideo Video { get; set; } + public InDataVideo? Video { get; set; } /// /// Gets or Sets Images /// [DataMember(Name = "images", EmitDefaultValue = false)] - public List Images { get; set; } + public List? Images { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs index 92d8592..d60cb73 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataTransactionImagesFieldValue.cs @@ -57,21 +57,21 @@ public partial class InDataTransactionImagesFieldValue : IValidatableObject /// Gets or Sets ListIdx /// [DataMember(Name = "listIdx", EmitDefaultValue = false)] - public int ListIdx { get; set; } + public int? ListIdx { get; set; } /// /// Page index of the image from input list /// /// Page index of the image from input list [DataMember(Name = "pageIdx", EmitDefaultValue = false)] - public int PageIdx { get; set; } + public int? PageIdx { get; set; } /// /// Image url /// /// Image url [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } + public string? Url { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs index 084fa2c..dcd4cad 100644 --- a/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/InDataVideo.cs @@ -48,14 +48,14 @@ public partial class InDataVideo : IValidatableObject /// /// A free-form object containing video's extended attributes. [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } + public Dictionary? Metadata { get; set; } /// /// Video url /// /// Video url [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } + public string? Url { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs index 4d9dc8f..60c3c43 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LexicalAnalysisResult.cs @@ -46,8 +46,8 @@ protected LexicalAnalysisResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public LexicalAnalysisResult(ListVerifiedFields listVerifiedFields = default(ListVerifiedFields), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.LEXICAL_ANALYSIS). + public LexicalAnalysisResult(ListVerifiedFields listVerifiedFields = default(ListVerifiedFields), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.LEXICAL_ANALYSIS) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "listVerifiedFields" is required (not null) if (listVerifiedFields == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs index cb03ab5..4d278eb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs @@ -56,7 +56,7 @@ protected LicenseItem() { } /// /// Base64 encoded data /* - [B@5f6febe8 + [B@5f6fcce4 */ [DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs index 63b85d1..2b3c871 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs @@ -46,8 +46,8 @@ protected LicenseResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public LicenseResult(byte[] license = default(byte[]), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.LICENSE). + public LicenseResult(byte[] license = default(byte[]), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.LICENSE) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "license" is required (not null) if (license == null) @@ -62,7 +62,7 @@ protected LicenseResult() { } /// /// Base64 encoded data /* - [B@5f6febe8 + [B@5f6fcce4 */ [DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs index 4bfd0e0..db209bc 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListTransactionsByTagResponse.cs @@ -47,13 +47,13 @@ public partial class ListTransactionsByTagResponse : IValidatableObject /// Gets or Sets Items /// [DataMember(Name = "items", EmitDefaultValue = false)] - public List Items { get; set; } + public List? Items { get; set; } /// /// Gets or Sets Metadata /// [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } + public Dictionary? Metadata { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs index 6458848..2d8894b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ListVerifiedFields.cs @@ -72,7 +72,7 @@ protected ListVerifiedFields() { } /// Gets or Sets PDateFormat /// [DataMember(Name = "pDateFormat", EmitDefaultValue = false)] - public string PDateFormat { get; set; } + public string? PDateFormat { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs index 7697d21..d99297f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LivenessParams.cs @@ -55,43 +55,43 @@ public partial class LivenessParams : IValidatableObject /// This parameter is used to enable OVI check /// /// This parameter is used to enable OVI check - [DataMember(Name = "checkOVI", EmitDefaultValue = true)] - public bool CheckOVI { get; set; } + [DataMember(Name = "checkOVI", EmitDefaultValue = false)] + public bool? CheckOVI { get; set; } /// /// This parameter is used to enable MLI check /// /// This parameter is used to enable MLI check - [DataMember(Name = "checkMLI", EmitDefaultValue = true)] - public bool CheckMLI { get; set; } + [DataMember(Name = "checkMLI", EmitDefaultValue = false)] + public bool? CheckMLI { get; set; } /// /// This parameter is used to enable Hologram detection /// /// This parameter is used to enable Hologram detection - [DataMember(Name = "checkHolo", EmitDefaultValue = true)] - public bool CheckHolo { get; set; } + [DataMember(Name = "checkHolo", EmitDefaultValue = false)] + public bool? CheckHolo { get; set; } /// /// This parameter is used to enable Electronic device detection /// /// This parameter is used to enable Electronic device detection - [DataMember(Name = "checkED", EmitDefaultValue = true)] - public bool CheckED { get; set; } + [DataMember(Name = "checkED", EmitDefaultValue = false)] + public bool? CheckED { get; set; } /// /// This parameter is used to enable Black and white copy check /// /// This parameter is used to enable Black and white copy check - [DataMember(Name = "checkBlackAndWhiteCopy", EmitDefaultValue = true)] - public bool CheckBlackAndWhiteCopy { get; set; } + [DataMember(Name = "checkBlackAndWhiteCopy", EmitDefaultValue = false)] + public bool? CheckBlackAndWhiteCopy { get; set; } /// /// This parameter is used to enable Dynaprint check /// /// This parameter is used to enable Dynaprint check - [DataMember(Name = "checkDynaprint", EmitDefaultValue = true)] - public bool CheckDynaprint { get; set; } + [DataMember(Name = "checkDynaprint", EmitDefaultValue = false)] + public bool? CheckDynaprint { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs index c42cb60..f2867f9 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZDetectorResult.cs @@ -46,8 +46,8 @@ protected MRZDetectorResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public MRZDetectorResult(ResultMRZDetector resultMRZDetector = default(ResultMRZDetector), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.MRZ_DETECTOR). + public MRZDetectorResult(ResultMRZDetector resultMRZDetector = default(ResultMRZDetector), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.MRZ_DETECTOR) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "resultMRZDetector" is required (not null) if (resultMRZDetector == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs index 867ded0..f30ba79 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZPositionResult.cs @@ -46,8 +46,8 @@ protected MRZPositionResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public MRZPositionResult(MrzPosition mrzPosition = default(MrzPosition), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.MRZ_POSITION). + public MRZPositionResult(MrzPosition mrzPosition = default(MrzPosition), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.MRZ_POSITION) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "mrzPosition" is required (not null) if (mrzPosition == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs index e2b594e..5269e7e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MRZTestQualityResult.cs @@ -46,8 +46,8 @@ protected MRZTestQualityResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public MRZTestQualityResult(MRZTestQuality mRZTestQuality = default(MRZTestQuality), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.MRZ_TEST_QUALITY). + public MRZTestQualityResult(MRZTestQuality mRZTestQuality = default(MRZTestQuality), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.MRZ_TEST_QUALITY) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "mRZTestQuality" is required (not null) if (mRZTestQuality == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs index 14b7bc0..0bf8b87 100644 --- a/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs +++ b/src/Regula.DocumentReader.WebClient/Model/MrzPosition.cs @@ -166,31 +166,31 @@ protected MrzPosition() { } /// Gets or Sets Inverse /// [DataMember(Name = "Inverse", EmitDefaultValue = false)] - public int Inverse { get; set; } + public int? Inverse { get; set; } /// /// Gets or Sets ObjArea /// [DataMember(Name = "ObjArea", EmitDefaultValue = false)] - public int ObjArea { get; set; } + public int? ObjArea { get; set; } /// /// Gets or Sets ObjIntAngleDev /// [DataMember(Name = "ObjIntAngleDev", EmitDefaultValue = false)] - public int ObjIntAngleDev { get; set; } + public int? ObjIntAngleDev { get; set; } /// /// Gets or Sets PerspectiveTr /// [DataMember(Name = "PerspectiveTr", EmitDefaultValue = false)] - public int PerspectiveTr { get; set; } + public int? PerspectiveTr { get; set; } /// /// Gets or Sets ResultStatus /// [DataMember(Name = "ResultStatus", EmitDefaultValue = false)] - public int ResultStatus { get; set; } + public int? ResultStatus { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs index d28f29c..50eb7b0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextItem.cs @@ -144,13 +144,13 @@ protected OCRSecurityTextItem() { } /// Gets or Sets Reserved1 /// [DataMember(Name = "Reserved1", EmitDefaultValue = false)] - public int Reserved1 { get; set; } + public int? Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// [DataMember(Name = "Reserved2", EmitDefaultValue = false)] - public int Reserved2 { get; set; } + public int? Reserved2 { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs index 0ece855..196f7a4 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OCRSecurityTextResult.cs @@ -64,11 +64,11 @@ protected OCRSecurityTextResult() { } /// etalonResultOCR (required). /// reserved1. /// reserved2. - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// type (required) (default to AuthenticityResultType.OCR_SECURITY_TEXT). /// elementResult. /// elementDiagnose. /// percentValue. - public OCRSecurityTextResult(Critical criticalFlag = default(Critical), Light lightType = default(Light), RectangleCoordinates fieldRect = default(RectangleCoordinates), int etalonResultType = default(int), int etalonFieldType = default(int), int etalonLightType = default(int), RectangleCoordinates etalonFieldRect = default(RectangleCoordinates), string securityTextResultOCR = default(string), string etalonResultOCR = default(string), int reserved1 = default(int), int reserved2 = default(int), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + public OCRSecurityTextResult(Critical criticalFlag = default(Critical), Light lightType = default(Light), RectangleCoordinates fieldRect = default(RectangleCoordinates), int etalonResultType = default(int), int etalonFieldType = default(int), int etalonLightType = default(int), RectangleCoordinates etalonFieldRect = default(RectangleCoordinates), string securityTextResultOCR = default(string), string etalonResultOCR = default(string), int reserved1 = default(int), int reserved2 = default(int), AuthenticityResultType type = AuthenticityResultType.OCR_SECURITY_TEXT, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) { this.CriticalFlag = criticalFlag; this.LightType = lightType; @@ -149,13 +149,13 @@ protected OCRSecurityTextResult() { } /// Gets or Sets Reserved1 /// [DataMember(Name = "Reserved1", EmitDefaultValue = false)] - public int Reserved1 { get; set; } + public int? Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// [DataMember(Name = "Reserved2", EmitDefaultValue = false)] - public int Reserved2 { get; set; } + public int? Reserved2 { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs index 45299b5..3819e35 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs @@ -160,7 +160,7 @@ protected OneCandidate() { } /// Gets or Sets RotationAngle /// [DataMember(Name = "RotationAngle", EmitDefaultValue = false)] - public int RotationAngle { get; set; } + public int? RotationAngle { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs b/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs index 53b3d07..87bd49e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OneCandidateItem.cs @@ -61,7 +61,7 @@ protected OneCandidateItem() { } /// Gets or Sets XMLBuffer /// [DataMember(Name = "XML_buffer", EmitDefaultValue = false)] - public string XMLBuffer { get; private set; } + public string? XMLBuffer { get; private set; } /// /// Returns false as XMLBuffer should not be serialized given that it's read-only. diff --git a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs index 51867b1..42ace8d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OriginalSymbol.cs @@ -68,7 +68,7 @@ protected OriginalSymbol() { } /// Gets or Sets Rect /// [DataMember(Name = "rect", EmitDefaultValue = false)] - public RectangleCoordinates Rect { get; set; } + public RectangleCoordinates? Rect { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OutData.cs b/src/Regula.DocumentReader.WebClient/Model/OutData.cs index ab5255c..24966af 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutData.cs @@ -48,13 +48,13 @@ public partial class OutData : IValidatableObject /// /// Response url [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } + public string? Url { get; set; } /// /// Gets or Sets Images /// [DataMember(Name = "images", EmitDefaultValue = false)] - public List Images { get; set; } + public List? Images { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs index 9351918..f99d250 100644 --- a/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/OutDataTransactionImagesFieldValue.cs @@ -65,21 +65,21 @@ public partial class OutDataTransactionImagesFieldValue : IValidatableObject /// Gets or Sets ListIdx /// [DataMember(Name = "listIdx", EmitDefaultValue = false)] - public int ListIdx { get; set; } + public int? ListIdx { get; set; } /// /// Page index of the image from input list /// /// Page index of the image from input list [DataMember(Name = "pageIdx", EmitDefaultValue = false)] - public int PageIdx { get; set; } + public int? PageIdx { get; set; } /// /// Image url /// /// Image url [DataMember(Name = "url", EmitDefaultValue = false)] - public string Url { get; set; } + public string? Url { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs index 47344b0..700946c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PArrayField.cs @@ -108,7 +108,7 @@ protected PArrayField() { } /// Gets or Sets BcPDF417INFO /// [DataMember(Name = "bcPDF417INFO", EmitDefaultValue = false)] - public BcPDF417INFO BcPDF417INFO { get; set; } + public BcPDF417INFO? BcPDF417INFO { get; set; } /// /// Gets or Sets BcROIDETECT @@ -120,13 +120,13 @@ protected PArrayField() { } /// Gets or Sets BcTextDecoderTypes /// [DataMember(Name = "bcTextDecoderTypes", EmitDefaultValue = false)] - public int BcTextDecoderTypes { get; set; } + public int? BcTextDecoderTypes { get; set; } /// /// Gets or Sets BcTextFieldType /// [DataMember(Name = "bcTextFieldType", EmitDefaultValue = false)] - public int BcTextFieldType { get; set; } + public int? BcTextFieldType { get; set; } /// /// Gets or Sets BcTypeDETECT diff --git a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs index 57cd437..53fd280 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ParsedData.cs @@ -45,7 +45,7 @@ public partial class ParsedData : IValidatableObject /// Gets or Sets ParsingNotifications /// [DataMember(Name = "ParsingNotifications", EmitDefaultValue = false)] - public List ParsingNotifications { get; set; } + public List? ParsingNotifications { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs index 6166ed7..1622303 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PerDocumentConfig.cs @@ -48,7 +48,7 @@ public partial class PerDocumentConfig : IValidatableObject /// /// Specific template IDs, for which apply current custom configuration [DataMember(Name = "docID", EmitDefaultValue = false)] - public List DocID { get; set; } + public List? DocID { get; set; } /// /// Contains items from AuthenticityResultType as sum via OR operation @@ -58,7 +58,7 @@ public partial class PerDocumentConfig : IValidatableObject 2 */ [DataMember(Name = "excludeAuthChecks", EmitDefaultValue = false)] - public int ExcludeAuthChecks { get; set; } + public int? ExcludeAuthChecks { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs index 2e484c0..796d0d6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentItem.cs @@ -109,43 +109,43 @@ protected PhotoIdentItem() { } /// Gets or Sets FieldTypesCount /// [DataMember(Name = "FieldTypesCount", EmitDefaultValue = false)] - public int FieldTypesCount { get; set; } + public int? FieldTypesCount { get; set; } /// /// Gets or Sets FieldTypesList /// [DataMember(Name = "FieldTypesList", EmitDefaultValue = false)] - public List FieldTypesList { get; set; } + public List? FieldTypesList { get; set; } /// /// Gets or Sets Step /// [DataMember(Name = "Step", EmitDefaultValue = false)] - public int Step { get; set; } + public int? Step { get; set; } /// /// Gets or Sets Angle /// [DataMember(Name = "Angle", EmitDefaultValue = false)] - public int Angle { get; set; } + public int? Angle { get; set; } /// /// Gets or Sets Reserved1 /// [DataMember(Name = "Reserved1", EmitDefaultValue = false)] - public int Reserved1 { get; set; } + public int? Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// [DataMember(Name = "Reserved2", EmitDefaultValue = false)] - public int Reserved2 { get; set; } + public int? Reserved2 { get; set; } /// /// Gets or Sets Reserved3 /// [DataMember(Name = "Reserved3", EmitDefaultValue = false)] - public int Reserved3 { get; set; } + public int? Reserved3 { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs index 5a1b3e5..a6b9d10 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PhotoIdentResult.cs @@ -58,11 +58,11 @@ protected PhotoIdentResult() { } /// reserved1. /// reserved2. /// reserved3. - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// type (required) (default to AuthenticityResultType.IPI). /// elementResult. /// elementDiagnose. /// percentValue. - public PhotoIdentResult(Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData sourceImage = default(ImageData), RawImageContainerList resultImages = default(RawImageContainerList), int fieldTypesCount = default(int), List fieldTypesList = default(List), int step = default(int), int angle = default(int), int reserved1 = default(int), int reserved2 = default(int), int reserved3 = default(int), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + public PhotoIdentResult(Light lightIndex = default(Light), RectangleCoordinates area = default(RectangleCoordinates), ImageData sourceImage = default(ImageData), RawImageContainerList resultImages = default(RawImageContainerList), int fieldTypesCount = default(int), List fieldTypesList = default(List), int step = default(int), int angle = default(int), int reserved1 = default(int), int reserved2 = default(int), int reserved3 = default(int), AuthenticityResultType type = AuthenticityResultType.IPI, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) { this.LightIndex = lightIndex; // to ensure "area" is required (not null) @@ -114,43 +114,43 @@ protected PhotoIdentResult() { } /// Gets or Sets FieldTypesCount /// [DataMember(Name = "FieldTypesCount", EmitDefaultValue = false)] - public int FieldTypesCount { get; set; } + public int? FieldTypesCount { get; set; } /// /// Gets or Sets FieldTypesList /// [DataMember(Name = "FieldTypesList", EmitDefaultValue = false)] - public List FieldTypesList { get; set; } + public List? FieldTypesList { get; set; } /// /// Gets or Sets Step /// [DataMember(Name = "Step", EmitDefaultValue = false)] - public int Step { get; set; } + public int? Step { get; set; } /// /// Gets or Sets Angle /// [DataMember(Name = "Angle", EmitDefaultValue = false)] - public int Angle { get; set; } + public int? Angle { get; set; } /// /// Gets or Sets Reserved1 /// [DataMember(Name = "Reserved1", EmitDefaultValue = false)] - public int Reserved1 { get; set; } + public int? Reserved1 { get; set; } /// /// Gets or Sets Reserved2 /// [DataMember(Name = "Reserved2", EmitDefaultValue = false)] - public int Reserved2 { get; set; } + public int? Reserved2 { get; set; } /// /// Gets or Sets Reserved3 /// [DataMember(Name = "Reserved3", EmitDefaultValue = false)] - public int Reserved3 { get; set; } + public int? Reserved3 { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs index 037adb0..43d7809 100644 --- a/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs +++ b/src/Regula.DocumentReader.WebClient/Model/PointsContainer.cs @@ -57,7 +57,7 @@ protected PointsContainer() { } /// Gets or Sets PointCount /// [DataMember(Name = "PointCount", EmitDefaultValue = false)] - public int PointCount { get; set; } + public int? PointCount { get; set; } /// /// Gets or Sets PointsList diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index 8a32499..fa94fe7 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -63,6 +63,12 @@ public partial class ProcessParams : IValidatableObject [DataMember(Name = "convertCase", EmitDefaultValue = false)] public TextPostProcessing? ConvertCase { get; set; } + /// + /// Gets or Sets ProcessAuth + /// + [DataMember(Name = "processAuth", EmitDefaultValue = false)] + public AuthenticityResultType? ProcessAuth { get; set; } + /// /// Gets or Sets MrzDetectMode /// @@ -122,7 +128,7 @@ protected ProcessParams() { } /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default.. /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default.. /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default.. - /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. . + /// processAuth. /// This parameter is used to specify the document reader device type from which input images were captured. Default 0.. /// This parameter is used to specify the document reader device type from which input images were captured. Default 0.. /// This parameter is used to specify the document reader device type from which input images were captured. @@ -136,7 +142,7 @@ protected ProcessParams() { } /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed.. /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc.. /// Set the types of barcodes to process.. - public ProcessParams(bool generateDTCVC = default(bool), List lcidFilter = default(List), bool checkLiveness = default(bool), List lcidIgnoreFilter = default(List), bool oneShotIdentification = default(bool), bool useFaceApi = default(bool), FaceApi faceApi = default(FaceApi), bool doDetectCan = default(bool), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), Scenario scenario = default(Scenario), List resultTypeOutput = default(List), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List fieldTypesFilter = default(List), string dateFormat = default(string), MeasureSystem? measureSystem = default(MeasureSystem?), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary customParams = default(Dictionary), List config = default(List), bool log = default(bool), LogLevel? logLevel = default(LogLevel?), int forceDocID = default(int), bool matchTextFieldMask = default(bool), bool fastDocDetect = default(bool), bool updateOCRValidityByGlare = default(bool), bool checkRequiredTextFields = default(bool), bool returnCroppedBarcode = default(bool), ImageQA imageQa = default(ImageQA), bool strictImageQuality = default(bool), bool respectImageQuality = default(bool), DocumentFormat? forceDocFormat = default(DocumentFormat?), bool noGraphics = default(bool), bool depersonalizeLog = default(bool), bool multiDocOnImage = default(bool), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool returnUncroppedImage = default(bool), List mrzFormatsFilter = default(List), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), TextPostProcessing? convertCase = default(TextPostProcessing?), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List documentGroupFilter = default(List), long processAuth = default(long), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List documentIdList = default(List), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool checkAuth = default(bool), AuthParams authParams = default(AuthParams), MrzDetectModeEnum? mrzDetectMode = default(MrzDetectModeEnum?), bool generateNumericCodes = default(bool), bool strictBarcodeDigitalSignatureCheck = default(bool), bool selectLongestNames = default(bool), List doBarcodes = default(List)) + public ProcessParams(bool generateDTCVC = default(bool), List lcidFilter = default(List), bool checkLiveness = default(bool), List lcidIgnoreFilter = default(List), bool oneShotIdentification = default(bool), bool useFaceApi = default(bool), FaceApi faceApi = default(FaceApi), bool doDetectCan = default(bool), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), Scenario scenario = default(Scenario), List resultTypeOutput = default(List), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List fieldTypesFilter = default(List), string dateFormat = default(string), MeasureSystem? measureSystem = default(MeasureSystem?), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary customParams = default(Dictionary), List config = default(List), bool log = default(bool), LogLevel? logLevel = default(LogLevel?), int forceDocID = default(int), bool matchTextFieldMask = default(bool), bool fastDocDetect = default(bool), bool updateOCRValidityByGlare = default(bool), bool checkRequiredTextFields = default(bool), bool returnCroppedBarcode = default(bool), ImageQA imageQa = default(ImageQA), bool strictImageQuality = default(bool), bool respectImageQuality = default(bool), DocumentFormat? forceDocFormat = default(DocumentFormat?), bool noGraphics = default(bool), bool depersonalizeLog = default(bool), bool multiDocOnImage = default(bool), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool returnUncroppedImage = default(bool), List mrzFormatsFilter = default(List), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), TextPostProcessing? convertCase = default(TextPostProcessing?), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List documentGroupFilter = default(List), AuthenticityResultType? processAuth = default(AuthenticityResultType?), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List documentIdList = default(List), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool checkAuth = default(bool), AuthParams authParams = default(AuthParams), MrzDetectModeEnum? mrzDetectMode = default(MrzDetectModeEnum?), bool generateNumericCodes = default(bool), bool strictBarcodeDigitalSignatureCheck = default(bool), bool selectLongestNames = default(bool), List doBarcodes = default(List)) { this.Scenario = scenario; this.GenerateDTCVC = generateDTCVC; @@ -204,99 +210,99 @@ protected ProcessParams() { } /// This parameter is used to generate separate DTC-VC data container from RFID session data. /// /// This parameter is used to generate separate DTC-VC data container from RFID session data. - [DataMember(Name = "generateDTCVC", EmitDefaultValue = true)] - public bool GenerateDTCVC { get; set; } + [DataMember(Name = "generateDTCVC", EmitDefaultValue = false)] + public bool? GenerateDTCVC { get; set; } /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. [DataMember(Name = "lcidFilter", EmitDefaultValue = false)] - public List LcidFilter { get; set; } + public List? LcidFilter { get; set; } /// /// This parameter is used to enable document liveness check. /// /// This parameter is used to enable document liveness check. - [DataMember(Name = "checkLiveness", EmitDefaultValue = true)] - public bool CheckLiveness { get; set; } + [DataMember(Name = "checkLiveness", EmitDefaultValue = false)] + public bool? CheckLiveness { get; set; } /// /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. /// /// The list of LCID types to ignore during the recognition. If empty, values with all LCID types will be extracted. Narrowing down the list can reduce processing time. Empty by default. [DataMember(Name = "lcidIgnoreFilter", EmitDefaultValue = false)] - public List LcidIgnoreFilter { get; set; } + public List? LcidIgnoreFilter { get; set; } /// /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face /// /// This parameter allows processing an image that contains a person and a document and compare the portrait photo from the document with the person's face - [DataMember(Name = "oneShotIdentification", EmitDefaultValue = true)] - public bool OneShotIdentification { get; set; } + [DataMember(Name = "oneShotIdentification", EmitDefaultValue = false)] + public bool? OneShotIdentification { get; set; } /// /// This parameter allows comparing faces on Regula Face Web Service /// /// This parameter allows comparing faces on Regula Face Web Service - [DataMember(Name = "useFaceApi", EmitDefaultValue = true)] - public bool UseFaceApi { get; set; } + [DataMember(Name = "useFaceApi", EmitDefaultValue = false)] + public bool? UseFaceApi { get; set; } /// /// Gets or Sets FaceApi /// [DataMember(Name = "faceApi", EmitDefaultValue = false)] - public FaceApi FaceApi { get; set; } + public FaceApi? FaceApi { get; set; } /// /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. /// /// This parameter allows enabling the CAN (Card Access Number) detection and recognition when using scenarios with document location and MRZ reading, such as the MrzAndLocate scenario. - [DataMember(Name = "doDetectCan", EmitDefaultValue = true)] - public bool DoDetectCan { get; set; } + [DataMember(Name = "doDetectCan", EmitDefaultValue = false)] + public bool? DoDetectCan { get; set; } /// /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. /// /// This parameter allows setting maximum height in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. [DataMember(Name = "imageOutputMaxHeight", EmitDefaultValue = false)] - public int ImageOutputMaxHeight { get; set; } + public int? ImageOutputMaxHeight { get; set; } /// /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. /// /// This parameter allows setting maximum width in pixels of output images and thus reducing image size to desired. Does not change the aspect ratio. Changes disabled if equals to 0. Default 0. [DataMember(Name = "imageOutputMaxWidth", EmitDefaultValue = false)] - public int ImageOutputMaxWidth { get; set; } + public int? ImageOutputMaxWidth { get; set; } /// /// Types of results to return in response. See 'Result' enum for available options /// /// Types of results to return in response. See 'Result' enum for available options [DataMember(Name = "resultTypeOutput", EmitDefaultValue = false)] - public List ResultTypeOutput { get; set; } + public List? ResultTypeOutput { get; set; } /// /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. /// /// Enable this option if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. Disabled by default. - [DataMember(Name = "doublePageSpread", EmitDefaultValue = true)] + [DataMember(Name = "doublePageSpread", EmitDefaultValue = false)] [Obsolete] - public bool DoublePageSpread { get; set; } + public bool? DoublePageSpread { get; set; } /// /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. /// /// When enabled together with \"doublePageSpread\" and there is a passport with two pages spread in the image, pages will be cropped, straightened and aligned together, as if the document was captured on a flatbed scanner. Disabled by default. - [DataMember(Name = "generateDoublePageSpreadImage", EmitDefaultValue = true)] - public bool GenerateDoublePageSpreadImage { get; set; } + [DataMember(Name = "generateDoublePageSpreadImage", EmitDefaultValue = false)] + public bool? GenerateDoublePageSpreadImage { get; set; } /// /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. /// /// List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. Empty by default. [DataMember(Name = "fieldTypesFilter", EmitDefaultValue = false)] - public List FieldTypesFilter { get; set; } + public List? FieldTypesFilter { get; set; } /// /// This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running). @@ -306,279 +312,272 @@ protected ProcessParams() { } MM/dd/yyyy */ [DataMember(Name = "dateFormat", EmitDefaultValue = false)] - public string DateFormat { get; set; } + public string? DateFormat { get; set; } /// /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. /// /// This parameter controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi for all scenarios except FullAuth. In FullAuth scenario this limit is 1000 dpi by default. [DataMember(Name = "imageDpiOutMax", EmitDefaultValue = false)] - public int ImageDpiOutMax { get; set; } + public int? ImageDpiOutMax { get; set; } /// /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. /// /// This option can be enabled if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. Disabled by default. - [DataMember(Name = "alreadyCropped", EmitDefaultValue = true)] - public bool AlreadyCropped { get; set; } + [DataMember(Name = "alreadyCropped", EmitDefaultValue = false)] + public bool? AlreadyCropped { get; set; } /// /// This option allows passing custom processing parameters that can be implemented in future without changing API. /// /// This option allows passing custom processing parameters that can be implemented in future without changing API. [DataMember(Name = "customParams", EmitDefaultValue = false)] - public Dictionary CustomParams { get; set; } + public Dictionary? CustomParams { get; set; } /// /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. /// /// This option allows setting additional custom configuration per document type. If recognized document has ID specified in config, processing adjusts according to designated configuration. [DataMember(Name = "config", EmitDefaultValue = false)] - public List Config { get; set; } + public List? Config { get; set; } /// /// When enabled, results will contain transaction processing log. Disabled by default /// /// When enabled, results will contain transaction processing log. Disabled by default - [DataMember(Name = "log", EmitDefaultValue = true)] - public bool Log { get; set; } + [DataMember(Name = "log", EmitDefaultValue = false)] + public bool? Log { get; set; } /// /// Force use of specific template ID and skip document type identification step. /// /// Force use of specific template ID and skip document type identification step. [DataMember(Name = "forceDocID", EmitDefaultValue = false)] - public int ForceDocID { get; set; } + public int? ForceDocID { get; set; } /// /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. /// /// When disabled, text field OCR will be done as is and then the recognized value will be matched to the field mask for validity. If enabled, we are trying to read a field value with maximum efforts to match the mask and provide a correctly formatted value, making assumptions based on the provided field mask in the template. Enabled by default. - [DataMember(Name = "matchTextFieldMask", EmitDefaultValue = true)] - public bool MatchTextFieldMask { get; set; } + [DataMember(Name = "matchTextFieldMask", EmitDefaultValue = false)] + public bool? MatchTextFieldMask { get; set; } /// /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. /// /// When enabled, shorten the list of candidates to process during document detection in a single image process mode. Reduces processing time for specific backgrounds. Enabled by default. - [DataMember(Name = "fastDocDetect", EmitDefaultValue = true)] + [DataMember(Name = "fastDocDetect", EmitDefaultValue = false)] [Obsolete] - public bool FastDocDetect { get; set; } + public bool? FastDocDetect { get; set; } /// /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. /// /// When enabled, fail OCR field validity, if there is a glare over the text field on the image. Disabled by default. - [DataMember(Name = "updateOCRValidityByGlare", EmitDefaultValue = true)] - public bool UpdateOCRValidityByGlare { get; set; } + [DataMember(Name = "updateOCRValidityByGlare", EmitDefaultValue = false)] + public bool? UpdateOCRValidityByGlare { get; set; } /// /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. /// /// When enabled, each field in template will be checked for value presence and if the field is marked as required, but has no value, it will have 'error' in validity status. Disabled by default. - [DataMember(Name = "checkRequiredTextFields", EmitDefaultValue = true)] - public bool CheckRequiredTextFields { get; set; } + [DataMember(Name = "checkRequiredTextFields", EmitDefaultValue = false)] + public bool? CheckRequiredTextFields { get; set; } /// /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. /// /// When enabled, returns cropped barcode images for unknown documents. Disabled by default. - [DataMember(Name = "returnCroppedBarcode", EmitDefaultValue = true)] - public bool ReturnCroppedBarcode { get; set; } + [DataMember(Name = "returnCroppedBarcode", EmitDefaultValue = false)] + public bool? ReturnCroppedBarcode { get; set; } /// /// Gets or Sets ImageQa /// [DataMember(Name = "imageQa", EmitDefaultValue = false)] - public ImageQA ImageQa { get; set; } + public ImageQA? ImageQa { get; set; } /// /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. /// /// When enabled, the image quality check status affects the document optical and overall status. Disabled by default. - [DataMember(Name = "strictImageQuality", EmitDefaultValue = true)] - public bool StrictImageQuality { get; set; } + [DataMember(Name = "strictImageQuality", EmitDefaultValue = false)] + public bool? StrictImageQuality { get; set; } /// /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. /// /// Deprecated. Please use strictImageQuality instead. When enabled, image quality checks status affects document optical and overall status. Disabled by default. - [DataMember(Name = "respectImageQuality", EmitDefaultValue = true)] + [DataMember(Name = "respectImageQuality", EmitDefaultValue = false)] [Obsolete] - public bool RespectImageQuality { get; set; } + public bool? RespectImageQuality { get; set; } /// /// When enabled, no graphic fields will be cropped from document image. Disabled by default. /// /// When enabled, no graphic fields will be cropped from document image. Disabled by default. - [DataMember(Name = "noGraphics", EmitDefaultValue = true)] - public bool NoGraphics { get; set; } + [DataMember(Name = "noGraphics", EmitDefaultValue = false)] + public bool? NoGraphics { get; set; } /// /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. /// /// When enabled, all personal data will be forcibly removed from the logs. Disabled by default. - [DataMember(Name = "depersonalizeLog", EmitDefaultValue = true)] - public bool DepersonalizeLog { get; set; } + [DataMember(Name = "depersonalizeLog", EmitDefaultValue = false)] + public bool? DepersonalizeLog { get; set; } /// /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. /// /// This option allows locating and cropping multiple documents from one image if enabled. Disabled by default. - [DataMember(Name = "multiDocOnImage", EmitDefaultValue = true)] - public bool MultiDocOnImage { get; set; } + [DataMember(Name = "multiDocOnImage", EmitDefaultValue = false)] + public bool? MultiDocOnImage { get; set; } /// /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default /// /// This option allows shifting the date of expiry into the future or past for number of months specified. This is useful, for example, in some cases when document might be still valid for some period after original expiration date to prevent negative validity status for such documents. Or by shifting the date to the past will set negative validity for the documents that is about to expire in a specified number of months. 0 by default [DataMember(Name = "shiftExpiryDate", EmitDefaultValue = false)] - public int ShiftExpiryDate { get; set; } + public int? ShiftExpiryDate { get; set; } /// /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. /// /// This options allows specifying the minimal age in years of the document holder for the document to be considered valid. [DataMember(Name = "minimalHolderAge", EmitDefaultValue = false)] - public int MinimalHolderAge { get; set; } + public int? MinimalHolderAge { get; set; } /// /// When enabled, returns input images in output. Disabled by default. /// /// When enabled, returns input images in output. Disabled by default. - [DataMember(Name = "returnUncroppedImage", EmitDefaultValue = true)] - public bool ReturnUncroppedImage { get; set; } + [DataMember(Name = "returnUncroppedImage", EmitDefaultValue = false)] + public bool? ReturnUncroppedImage { get; set; } /// /// This option allows limiting MRZ formats to be recognized by specifying them in array. /// /// This option allows limiting MRZ formats to be recognized by specifying them in array. [DataMember(Name = "mrzFormatsFilter", EmitDefaultValue = false)] - public List MrzFormatsFilter { get; set; } + public List? MrzFormatsFilter { get; set; } /// /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. /// /// When enabled, make sure that in series processing MRZ is located fully inside the result document image, if present on the document. Enabling this option may add extra processing time, by disabling optimizations, but allows more stability in output image quality. Disabled by default. - [DataMember(Name = "forceReadMrzBeforeLocate", EmitDefaultValue = true)] - public bool ForceReadMrzBeforeLocate { get; set; } + [DataMember(Name = "forceReadMrzBeforeLocate", EmitDefaultValue = false)] + public bool? ForceReadMrzBeforeLocate { get; set; } /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. /// /// This option can be disabled to stop parsing after barcode is read. Enabled by default. - [DataMember(Name = "parseBarcodes", EmitDefaultValue = true)] - public bool ParseBarcodes { get; set; } + [DataMember(Name = "parseBarcodes", EmitDefaultValue = false)] + public bool? ParseBarcodes { get; set; } /// /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. /// /// When enabled, the Surname and GivenNames fields from MRZ will be divided into ft_First_Name, ft_Second_Name, ft_Third_Name, ft_Fourth_Name, ft_Last_Name fields. Disabled by default. - [DataMember(Name = "splitNames", EmitDefaultValue = true)] - public bool SplitNames { get; set; } + [DataMember(Name = "splitNames", EmitDefaultValue = false)] + public bool? SplitNames { get; set; } /// /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. /// /// When enabled, OCR of perforated fields in the document template will not be performed. Disabled by default. - [DataMember(Name = "disablePerforationOCR", EmitDefaultValue = true)] - public bool DisablePerforationOCR { get; set; } + [DataMember(Name = "disablePerforationOCR", EmitDefaultValue = false)] + public bool? DisablePerforationOCR { get; set; } /// /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. /// /// List of specific eligible document types from DocumentType enum to recognize from. You may, for example, specify only passports to be recognized by setting this property. Empty by default. [DataMember(Name = "documentGroupFilter", EmitDefaultValue = false)] - public List DocumentGroupFilter { get; set; } - - /// - /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. - /// - /// Authenticity checks that should be performed regardless of the document type. The available checks are listed in the eRPRM_Authenticity enum. Note that only supported by your license checks can be added. - [DataMember(Name = "processAuth", EmitDefaultValue = false)] - public long ProcessAuth { get; set; } + public List? DocumentGroupFilter { get; set; } /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. [DataMember(Name = "deviceId", EmitDefaultValue = false)] - public int DeviceId { get; set; } + public int? DeviceId { get; set; } /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. /// /// This parameter is used to specify the document reader device type from which input images were captured. Default 0. [DataMember(Name = "deviceType", EmitDefaultValue = false)] - public int DeviceType { get; set; } + public int? DeviceType { get; set; } /// /// This parameter is used to specify the document reader device type from which input images were captured /// /// This parameter is used to specify the document reader device type from which input images were captured [DataMember(Name = "deviceTypeHex", EmitDefaultValue = false)] - public string DeviceTypeHex { get; set; } + public string? DeviceTypeHex { get; set; } /// /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false /// /// This parameter is used to tell the processing engine to ignore any parameters saved in the image when scanned from the document reader device. Default false - [DataMember(Name = "ignoreDeviceIdFromImage", EmitDefaultValue = true)] - public bool IgnoreDeviceIdFromImage { get; set; } + [DataMember(Name = "ignoreDeviceIdFromImage", EmitDefaultValue = false)] + public bool? IgnoreDeviceIdFromImage { get; set; } /// /// List of the document ID's to process. All documents will be processed, if empty. /// /// List of the document ID's to process. All documents will be processed, if empty. [DataMember(Name = "documentIdList", EmitDefaultValue = false)] - public List DocumentIdList { get; set; } + public List? DocumentIdList { get; set; } /// /// Gets or Sets Rfid /// [DataMember(Name = "rfid", EmitDefaultValue = false)] - public ProcessParamsRfid Rfid { get; set; } + public ProcessParamsRfid? Rfid { get; set; } /// /// This parameter is used to enable authenticity checks /// /// This parameter is used to enable authenticity checks - [DataMember(Name = "checkAuth", EmitDefaultValue = true)] - public bool CheckAuth { get; set; } + [DataMember(Name = "checkAuth", EmitDefaultValue = false)] + public bool? CheckAuth { get; set; } /// /// Gets or Sets AuthParams /// [DataMember(Name = "authParams", EmitDefaultValue = false)] - public AuthParams AuthParams { get; set; } + public AuthParams? AuthParams { get; set; } /// /// This parameter is used to generate numeric representation for issuing state and nationality codes /// /// This parameter is used to generate numeric representation for issuing state and nationality codes - [DataMember(Name = "generateNumericCodes", EmitDefaultValue = true)] - public bool GenerateNumericCodes { get; set; } + [DataMember(Name = "generateNumericCodes", EmitDefaultValue = false)] + public bool? GenerateNumericCodes { get; set; } /// /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. /// /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed. - [DataMember(Name = "strictBarcodeDigitalSignatureCheck", EmitDefaultValue = true)] - public bool StrictBarcodeDigitalSignatureCheck { get; set; } + [DataMember(Name = "strictBarcodeDigitalSignatureCheck", EmitDefaultValue = false)] + public bool? StrictBarcodeDigitalSignatureCheck { get; set; } /// /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. /// /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc. - [DataMember(Name = "selectLongestNames", EmitDefaultValue = true)] - public bool SelectLongestNames { get; set; } + [DataMember(Name = "selectLongestNames", EmitDefaultValue = false)] + public bool? SelectLongestNames { get; set; } /// /// Set the types of barcodes to process. /// /// Set the types of barcodes to process. [DataMember(Name = "doBarcodes", EmitDefaultValue = false)] - public List DoBarcodes { get; set; } + public List? DoBarcodes { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs index c21c584..615c1a1 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParamsRfid.cs @@ -46,7 +46,7 @@ public partial class ProcessParamsRfid : IValidatableObject /// /// A list of notification codes that should be ignored during passive authentication (PA) [DataMember(Name = "paSensitiveCodesDisable", EmitDefaultValue = false)] - public List PaSensitiveCodesDisable { get; set; } + public List? PaSensitiveCodesDisable { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs index 2cfb19b..c8ccca2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequest.cs @@ -85,28 +85,28 @@ protected ProcessRequest() { } /// Gets or Sets List /// [DataMember(Name = "List", EmitDefaultValue = false)] - public List List { get; set; } + public List? List { get; set; } /// /// Session ID /// /// Session ID [DataMember(Name = "tag", EmitDefaultValue = false)] - public string Tag { get; set; } + public string? Tag { get; set; } /// /// Customer name /// /// Customer name [DataMember(Name = "tenant", EmitDefaultValue = false)] - public string Tenant { get; set; } + public string? Tenant { get; set; } /// /// Environment type /// /// Environment type [DataMember(Name = "env", EmitDefaultValue = false)] - public string Env { get; set; } + public string? Env { get; set; } /// /// Live portrait photo @@ -116,7 +116,7 @@ protected ProcessRequest() { } Base64 encoded data */ [DataMember(Name = "livePortrait", EmitDefaultValue = false)] - public string LivePortrait { get; set; } + public string? LivePortrait { get; set; } /// /// Portrait photo from an external source @@ -126,47 +126,47 @@ protected ProcessRequest() { } Base64 encoded data */ [DataMember(Name = "extPortrait", EmitDefaultValue = false)] - public string ExtPortrait { get; set; } + public string? ExtPortrait { get; set; } /// /// Gets or Sets ContainerList /// [DataMember(Name = "ContainerList", EmitDefaultValue = false)] - public ContainerList ContainerList { get; set; } + public ContainerList? ContainerList { get; set; } /// /// Gets or Sets SystemInfo /// [DataMember(Name = "systemInfo", EmitDefaultValue = false)] - public ProcessSystemInfo SystemInfo { get; set; } + public ProcessSystemInfo? SystemInfo { get; set; } /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. [DataMember(Name = "passBackObject", EmitDefaultValue = false)] - public Dictionary PassBackObject { get; set; } + public Dictionary? PassBackObject { get; set; } /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing [DataMember(Name = "dtc", EmitDefaultValue = false)] - public string Dtc { get; set; } + public string? Dtc { get; set; } /// /// URLs to the document images for processing. /// /// URLs to the document images for processing. [DataMember(Name = "ImageUrls", EmitDefaultValue = false)] - public List ImageUrls { get; set; } + public List? ImageUrls { get; set; } /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. /// /// The list of LCID types to recognize. If empty, values with all LCID types will be extracted. Empty by default. [DataMember(Name = "lcidFilter", EmitDefaultValue = false)] - public List LcidFilter { get; set; } + public List? LcidFilter { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs index ed47f9b..db3418d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessRequestImage.cs @@ -55,14 +55,14 @@ public partial class ProcessRequestImage : IValidatableObject /// Gets or Sets ImageData /// [DataMember(Name = "ImageData", EmitDefaultValue = false)] - public ImageData ImageData { get; set; } + public ImageData? ImageData { get; set; } /// /// page/image number /// /// page/image number [DataMember(Name = "page_idx", EmitDefaultValue = false)] - public int PageIdx { get; set; } + public int? PageIdx { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs index ece138c..8c7cbef 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessResponse.cs @@ -90,7 +90,7 @@ protected ProcessResponse() { } /// Gets or Sets CoreLibResultCode /// [DataMember(Name = "CoreLibResultCode", EmitDefaultValue = false)] - public int CoreLibResultCode { get; set; } + public int? CoreLibResultCode { get; set; } /// /// Gets or Sets ContainerList @@ -109,14 +109,14 @@ protected ProcessResponse() { } /// /// Base64 encoded transaction processing log [DataMember(Name = "log", EmitDefaultValue = false)] - public string Log { get; set; } + public string? Log { get; set; } /// /// Free-form object provided in request. See passBackObject property of ProcessRequest. /// /// Free-form object provided in request. See passBackObject property of ProcessRequest. [DataMember(Name = "passBackObject", EmitDefaultValue = false)] - public Dictionary PassBackObject { get; set; } + public Dictionary? PassBackObject { get; set; } /// /// Gets or Sets MorePagesAvailable @@ -135,7 +135,7 @@ protected ProcessResponse() { } /// Gets or Sets Metadata /// [DataMember(Name = "metadata", EmitDefaultValue = false)] - public Dictionary Metadata { get; set; } + public Dictionary? Metadata { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs index 2d60a4f..6f03b82 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessSystemInfo.cs @@ -48,14 +48,14 @@ public partial class ProcessSystemInfo : IValidatableObject /// /// Base64 encoded license file [DataMember(Name = "license", EmitDefaultValue = false)] - public string License { get; set; } + public string? License { get; set; } /// /// For internal use. Demo-sites recaptcha token. /// /// For internal use. Demo-sites recaptcha token. [DataMember(Name = "recaptcha_token", EmitDefaultValue = false)] - public string RecaptchaToken { get; set; } + public string? RecaptchaToken { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs index 5f07a96..9b59e80 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedField.cs @@ -75,7 +75,7 @@ protected RFIDDocVisualExtendedField() { } /// Gets or Sets OriginDGTag /// [DataMember(Name = "OriginDGTag", EmitDefaultValue = false)] - public int OriginDGTag { get; set; } + public int? OriginDGTag { get; set; } /// /// Record index of the text field source in the data group @@ -88,7 +88,7 @@ protected RFIDDocVisualExtendedField() { } /// Gets or Sets OriginEntryView /// [DataMember(Name = "OriginEntryView", EmitDefaultValue = false)] - public int OriginEntryView { get; set; } + public int? OriginEntryView { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs index 6fea30b..43e3a07 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDDocVisualExtendedFieldItem.cs @@ -62,7 +62,7 @@ protected RFIDDocVisualExtendedFieldItem() { } /// Gets or Sets OriginDGTag /// [DataMember(Name = "OriginDGTag", EmitDefaultValue = false)] - public int OriginDGTag { get; set; } + public int? OriginDGTag { get; set; } /// /// Record index of the text field source in the data group @@ -75,7 +75,7 @@ protected RFIDDocVisualExtendedFieldItem() { } /// Gets or Sets OriginEntryView /// [DataMember(Name = "OriginEntryView", EmitDefaultValue = false)] - public int OriginEntryView { get; set; } + public int? OriginEntryView { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs index 325d652..1d184e3 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDGraphicsInfoResult.cs @@ -46,8 +46,8 @@ protected RFIDGraphicsInfoResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public RFIDGraphicsInfoResult(TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo = default(TOriginalRFIDGraphicsInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.RFID_ORIGINAL_GRAPHICS). + public RFIDGraphicsInfoResult(TOriginalRFIDGraphicsInfo tOriginalRFIDGraphicsInfo = default(TOriginalRFIDGraphicsInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.RFID_ORIGINAL_GRAPHICS) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "tOriginalRFIDGraphicsInfo" is required (not null) if (tOriginalRFIDGraphicsInfo == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs index 28e410f..65b790a 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RFIDTextDataResult.cs @@ -46,8 +46,8 @@ protected RFIDTextDataResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public RFIDTextDataResult(RFIDDocVisualExtendedInfo docVisualExtendedInfo = default(RFIDDocVisualExtendedInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.RFID_TEXT). + public RFIDTextDataResult(RFIDDocVisualExtendedInfo docVisualExtendedInfo = default(RFIDDocVisualExtendedInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.RFID_TEXT) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "docVisualExtendedInfo" is required (not null) if (docVisualExtendedInfo == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs index 272b652..7958b2c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ResultItem.cs @@ -31,7 +31,7 @@ namespace Regula.DocumentReader.WebClient.Model /// Common fields for all result objects /// [DataContract(Name = "ResultItem")] - [JsonConverter(typeof(JsonSubtypes), "ResultType")] + [JsonConverter(typeof(JsonSubtypes), "result_type")] [JsonSubtypes.KnownSubType(typeof(DocumentImageResult), "1")] [JsonSubtypes.KnownSubType(typeof(DocumentBinaryInfoResult), "101")] [JsonSubtypes.KnownSubType(typeof(RFIDTextDataResult), "102")] @@ -70,6 +70,12 @@ namespace Regula.DocumentReader.WebClient.Model [JsonSubtypes.KnownSubType(typeof(FaceDetectionResult), "97")] public partial class ResultItem : IValidatableObject { + + /// + /// Gets or Sets ResultType + /// + [DataMember(Name = "result_type", IsRequired = true, EmitDefaultValue = true)] + public Result ResultType { get; set; } /// /// Initializes a new instance of the class. /// @@ -82,8 +88,8 @@ protected ResultItem() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public ResultItem(int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) + /// resultType (required). + public ResultItem(int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = default(Result)) { this.ResultType = resultType; this.BufLength = bufLength; @@ -96,32 +102,25 @@ protected ResultItem() { } /// Gets or Sets BufLength /// [DataMember(Name = "buf_length", EmitDefaultValue = false)] - public int BufLength { get; set; } + public int? BufLength { get; set; } /// /// Gets or Sets Light /// [DataMember(Name = "light", EmitDefaultValue = false)] - public int Light { get; set; } + public int? Light { get; set; } /// /// Gets or Sets ListIdx /// [DataMember(Name = "list_idx", EmitDefaultValue = false)] - public int ListIdx { get; set; } + public int? ListIdx { get; set; } /// /// Gets or Sets PageIdx /// [DataMember(Name = "page_idx", EmitDefaultValue = false)] - public int PageIdx { get; set; } - - /// - /// Same as Result type, but used for safe parsing of not-described values. See Result type. - /// - /// Same as Result type, but used for safe parsing of not-described values. See Result type. - [DataMember(Name = "result_type", IsRequired = true, EmitDefaultValue = true)] - public int ResultType { get; set; } + public int? PageIdx { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs index 2193ea1..ed52128 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidAccessControlInfo.cs @@ -76,7 +76,7 @@ protected RfidAccessControlInfo() { } /// /// Index of the active variant of the procedure [DataMember(Name = "ActiveOptionIdx", EmitDefaultValue = false)] - public decimal ActiveOptionIdx { get; set; } + public decimal? ActiveOptionIdx { get; set; } /// /// List of remarks arisen during the procedure. @@ -90,7 +90,7 @@ protected RfidAccessControlInfo() { } /// /// List of structures with are used to describe the variants of the authentication or secure data access procedure performance within the context of the communication session with electronic document [DataMember(Name = "AccessControlOptions", EmitDefaultValue = false)] - public List AccessControlOptions { get; set; } + public List? AccessControlOptions { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs index 5c91862..9418f78 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidDataFile.cs @@ -91,60 +91,60 @@ protected RfidDataFile() { } /// /// File identifier. Each byte of FileID represented by its hexadecimal value. The individual bytes are separated by spaces (e.g. 01 1E) [DataMember(Name = "FileID", EmitDefaultValue = false)] - public string FileID { get; set; } + public string? FileID { get; set; } /// /// Gets or Sets FileData /// [DataMember(Name = "FileData", EmitDefaultValue = false)] - public TrfFtBytes FileData { get; set; } + public TrfFtBytes? FileData { get; set; } /// /// Time of reading, milliseconds /// /// Time of reading, milliseconds [DataMember(Name = "ReadingTime", EmitDefaultValue = false)] - public decimal ReadingTime { get; set; } + public decimal? ReadingTime { get; set; } /// /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. /// /// List of remarks arisen when reading data from the memory of the chip and analysing their ASN.1-structure. [DataMember(Name = "Notifications", EmitDefaultValue = false)] - public List Notifications { get; set; } + public List? Notifications { get; set; } /// /// List of document text fields formed on the basis of the file contents /// /// List of document text fields formed on the basis of the file contents [DataMember(Name = "DocFields_Text", EmitDefaultValue = false)] - public List DocFieldsText { get; set; } + public List? DocFieldsText { get; set; } /// /// List of document graphic fields formed on the basis of the file contents /// /// List of document graphic fields formed on the basis of the file contents [DataMember(Name = "DocFields_Graphics", EmitDefaultValue = false)] - public List DocFieldsGraphics { get; set; } + public List? DocFieldsGraphics { get; set; } /// /// List of the original binary representation of graphic document fields formed on the basis of the file contents /// /// List of the original binary representation of graphic document fields formed on the basis of the file contents [DataMember(Name = "DocFields_Originals", EmitDefaultValue = false)] - public List DocFieldsOriginals { get; set; } + public List? DocFieldsOriginals { get; set; } /// /// Gets or Sets ParsedData /// [DataMember(Name = "ParsedData", EmitDefaultValue = false)] - public ParsedData ParsedData { get; set; } + public ParsedData? ParsedData { get; set; } /// /// Gets or Sets SecurityObjectCertificates /// [DataMember(Name = "SecurityObject_Certificates", EmitDefaultValue = false)] - public SecurityObjectCertificates SecurityObjectCertificates { get; set; } + public SecurityObjectCertificates? SecurityObjectCertificates { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs index 6fbf2ff..d4e11bf 100644 --- a/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs +++ b/src/Regula.DocumentReader.WebClient/Model/RfidSessionData.cs @@ -136,28 +136,28 @@ protected RfidSessionData() { } /// /// Sign of virtual session when working with loaded data from a previous communication session with the electronic document [DataMember(Name = "VirtualMode", EmitDefaultValue = false)] - public string VirtualMode { get; set; } + public string? VirtualMode { get; set; } /// /// Text SDKVersion value in format A.B (e.g. 3.1) /// /// Text SDKVersion value in format A.B (e.g. 3.1) [DataMember(Name = "SDKVersion", EmitDefaultValue = false)] - public string SDKVersion { get; set; } + public string? SDKVersion { get; set; } /// /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) /// /// Text DriverVersion value in format A.B.C.D (e.g. 6.2.5.4) [DataMember(Name = "DriverVersion", EmitDefaultValue = false)] - public string DriverVersion { get; set; } + public string? DriverVersion { get; set; } /// /// Text FirmwareVersion value in format A.B (e.g. 5.19) /// /// Text FirmwareVersion value in format A.B (e.g. 5.19) [DataMember(Name = "FirmwareVersion", EmitDefaultValue = false)] - public string FirmwareVersion { get; set; } + public string? FirmwareVersion { get; set; } /// /// List of containers to store information about the involved applications of electronic document diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs index 40d735d..8d51880 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureItem.cs @@ -89,13 +89,13 @@ protected SecurityFeatureItem() { } /// Gets or Sets AreaList /// [DataMember(Name = "AreaList", EmitDefaultValue = false)] - public AreaContainer AreaList { get; set; } + public AreaContainer? AreaList { get; set; } /// /// Gets or Sets Reserved2 /// [DataMember(Name = "Reserved2", EmitDefaultValue = false)] - public int Reserved2 { get; set; } + public int? Reserved2 { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs index d1ba436..de74740 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityFeatureResult.cs @@ -65,11 +65,11 @@ protected SecurityFeatureResult() { } /// criticalFlag (required). /// areaList. /// reserved2. - /// Same as authenticity result type, but used for safe parsing of not-described values: https://docs.regulaforensics.com/develop/doc-reader-sdk/web-service/development/enums/authenticity-result-type/ (required) (default to 0). + /// type (required) (default to AuthenticityResultType.UV_LUMINESCENCE). /// elementResult. /// elementDiagnose. /// percentValue. - public SecurityFeatureResult(SecurityFeatureType elementType = default(SecurityFeatureType), RectangleCoordinates elementRect = default(RectangleCoordinates), Visibility visibility = default(Visibility), Critical criticalFlag = default(Critical), AreaContainer areaList = default(AreaContainer), int reserved2 = default(int), int type = 0, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) + public SecurityFeatureResult(SecurityFeatureType elementType = default(SecurityFeatureType), RectangleCoordinates elementRect = default(RectangleCoordinates), Visibility visibility = default(Visibility), Critical criticalFlag = default(Critical), AreaContainer areaList = default(AreaContainer), int reserved2 = default(int), AuthenticityResultType type = AuthenticityResultType.UV_LUMINESCENCE, CheckResult? elementResult = default(CheckResult?), CheckDiagnose? elementDiagnose = default(CheckDiagnose?), int percentValue = default(int)) : base(type, elementResult, elementDiagnose, percentValue) { this.ElementType = elementType; // to ensure "elementRect" is required (not null) @@ -94,13 +94,13 @@ protected SecurityFeatureResult() { } /// Gets or Sets AreaList /// [DataMember(Name = "AreaList", EmitDefaultValue = false)] - public AreaContainer AreaList { get; set; } + public AreaContainer? AreaList { get; set; } /// /// Gets or Sets Reserved2 /// [DataMember(Name = "Reserved2", EmitDefaultValue = false)] - public int Reserved2 { get; set; } + public int? Reserved2 { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs index fc5cdcb..4bf97fd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SecurityObjectCertificates.cs @@ -45,7 +45,7 @@ public partial class SecurityObjectCertificates : IValidatableObject /// Gets or Sets CertificateData /// [DataMember(Name = "Certificate_Data", EmitDefaultValue = false)] - public CertificateData CertificateData { get; set; } + public CertificateData? CertificateData { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/Status.cs b/src/Regula.DocumentReader.WebClient/Model/Status.cs index 8c11e91..5db1bfa 100644 --- a/src/Regula.DocumentReader.WebClient/Model/Status.cs +++ b/src/Regula.DocumentReader.WebClient/Model/Status.cs @@ -97,7 +97,7 @@ protected Status() { } /// Gets or Sets DetailsRFID /// [DataMember(Name = "detailsRFID", EmitDefaultValue = false)] - public DetailsRFID DetailsRFID { get; set; } + public DetailsRFID? DetailsRFID { get; set; } /// /// Gets or Sets DetailsOptical diff --git a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs index 63d3269..4345356 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StatusResult.cs @@ -46,8 +46,8 @@ protected StatusResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public StatusResult(Status status = default(Status), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.STATUS). + public StatusResult(Status status = default(Status), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.STATUS) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "status" is required (not null) if (status == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs index 33cc73e..df59a8f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/StringRecognitionResult.cs @@ -78,20 +78,20 @@ protected StringRecognitionResult() { } /// /// Buf_Text text string length [DataMember(Name = "Buf_Length", EmitDefaultValue = false)] - public decimal BufLength { get; set; } + public decimal? BufLength { get; set; } /// /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' /// /// Text field data in UTF8 format. Results of reading different lines of a multi-line field are separated by '^' [DataMember(Name = "Buf_Text", EmitDefaultValue = false)] - public string BufText { get; set; } + public string? BufText { get; set; } /// /// Gets or Sets Reserved /// [DataMember(Name = "Reserved", EmitDefaultValue = false)] - public int Reserved { get; set; } + public int? Reserved { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs index 873d8b0..4ecd251 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolCandidate.cs @@ -70,13 +70,13 @@ protected SymbolCandidate() { } /// Gets or Sets Class /// [DataMember(Name = "Class", EmitDefaultValue = false)] - public int Class { get; set; } + public int? Class { get; set; } /// /// Gets or Sets SubClass /// [DataMember(Name = "SubClass", EmitDefaultValue = false)] - public int SubClass { get; set; } + public int? SubClass { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs index 273a3da..87033dd 100644 --- a/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/SymbolRecognitionResult.cs @@ -90,19 +90,19 @@ protected SymbolRecognitionResult() { } /// Gets or Sets BaseLineBottom /// [DataMember(Name = "BaseLineBottom", EmitDefaultValue = false)] - public int BaseLineBottom { get; set; } + public int? BaseLineBottom { get; set; } /// /// Gets or Sets BaseLineTop /// [DataMember(Name = "BaseLineTop", EmitDefaultValue = false)] - public int BaseLineTop { get; set; } + public int? BaseLineTop { get; set; } /// /// Gets or Sets Reserved /// [DataMember(Name = "Reserved", EmitDefaultValue = false)] - public int Reserved { get; set; } + public int? Reserved { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs index 826f635..acc6557 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TDocBinaryInfo.cs @@ -47,13 +47,13 @@ public partial class TDocBinaryInfo : IValidatableObject /// Gets or Sets RFID_BINARY_DATA /// [DataMember(Name = "RFID_BINARY_DATA", EmitDefaultValue = false)] - public BinaryData RFID_BINARY_DATA { get; set; } + public BinaryData? RFID_BINARY_DATA { get; set; } /// /// Gets or Sets RFID_RAW_DATA /// [DataMember(Name = "RFID_RAW_DATA", EmitDefaultValue = false)] - public List RFID_RAW_DATA { get; set; } + public List? RFID_RAW_DATA { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs index 6c54b3c..3fa500d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextAvailableSource.cs @@ -67,7 +67,7 @@ protected TextAvailableSource() { } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. [DataMember(Name = "containerType", EmitDefaultValue = false)] - public int ContainerType { get; set; } + public int? ContainerType { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs index b424e33..2b834c0 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextDataResult.cs @@ -46,8 +46,8 @@ protected TextDataResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public TextDataResult(DocVisualExtendedInfo docVisualExtendedInfo = default(DocVisualExtendedInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.MRZ_TEXT). + public TextDataResult(DocVisualExtendedInfo docVisualExtendedInfo = default(DocVisualExtendedInfo), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.MRZ_TEXT) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "docVisualExtendedInfo" is required (not null) if (docVisualExtendedInfo == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/TextField.cs b/src/Regula.DocumentReader.WebClient/Model/TextField.cs index 483bfcc..70c7f7e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextField.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextField.cs @@ -133,7 +133,7 @@ protected TextField() { } /// /// LCID name [DataMember(Name = "lcidName", EmitDefaultValue = false)] - public string LcidName { get; set; } + public string? LcidName { get; set; } /// /// The most confidence value, selected from valueList diff --git a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs index 7fda81a..596baa8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextFieldValue.cs @@ -93,13 +93,13 @@ protected TextFieldValue() { } /// /// Original value as seen in the document [DataMember(Name = "originalValue", EmitDefaultValue = false)] - public string OriginalValue { get; set; } + public string? OriginalValue { get; set; } /// /// Gets or Sets OriginalSymbols /// [DataMember(Name = "originalSymbols", EmitDefaultValue = false)] - public List OriginalSymbols { get; set; } + public List? OriginalSymbols { get; set; } /// /// Page index of the image from input list @@ -119,20 +119,20 @@ protected TextFieldValue() { } /// Gets or Sets FieldRect /// [DataMember(Name = "fieldRect", EmitDefaultValue = false)] - public RectangleCoordinates FieldRect { get; set; } + public RectangleCoordinates? FieldRect { get; set; } /// /// Gets or Sets RfidOrigin /// [DataMember(Name = "rfidOrigin", EmitDefaultValue = false)] - public RfidOrigin RfidOrigin { get; set; } + public RfidOrigin? RfidOrigin { get; set; } /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. /// /// Same as Result type, but used for safe parsing of not-described values. See Result type. [DataMember(Name = "containerType", EmitDefaultValue = false)] - public int ContainerType { get; set; } + public int? ContainerType { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs index b574494..15f189f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TextResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TextResult.cs @@ -46,8 +46,8 @@ protected TextResult() { } /// light. /// listIdx. /// pageIdx. - /// Same as Result type, but used for safe parsing of not-described values. See Result type. (required) (default to 0). - public TextResult(Text text = default(Text), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), int resultType = 0) : base(bufLength, light, listIdx, pageIdx, resultType) + /// resultType (required) (default to Result.TEXT). + public TextResult(Text text = default(Text), int bufLength = default(int), int light = default(int), int listIdx = default(int), int pageIdx = default(int), Result resultType = Result.TEXT) : base(bufLength, light, listIdx, pageIdx, resultType) { // to ensure "text" is required (not null) if (text == null) diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs index 3c81ac9..481831e 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionImage.cs @@ -45,7 +45,7 @@ public partial class TransactionImage : IValidatableObject /// Gets or Sets Image /// [DataMember(Name = "image", EmitDefaultValue = false)] - public ImagesFieldValue Image { get; set; } + public ImagesFieldValue? Image { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs index 77edee6..6e388eb 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionInfo.cs @@ -60,55 +60,55 @@ public partial class TransactionInfo : IValidatableObject /// /// Computer name [DataMember(Name = "ComputerName", EmitDefaultValue = false)] - public string ComputerName { get; set; } + public string? ComputerName { get; set; } /// /// Date and time /// /// Date and time [DataMember(Name = "DateTime", EmitDefaultValue = false)] - public string DateTime { get; set; } + public string? DateTime { get; set; } /// /// Gets or Sets DocumentsDatabase /// [DataMember(Name = "DocumentsDatabase", EmitDefaultValue = false)] - public DocumentsDatabase DocumentsDatabase { get; set; } + public DocumentsDatabase? DocumentsDatabase { get; set; } /// /// System information /// /// System information [DataMember(Name = "SystemInfo", EmitDefaultValue = false)] - public string SystemInfo { get; set; } + public string? SystemInfo { get; set; } /// /// Transaction tag /// /// Transaction tag [DataMember(Name = "Tag", EmitDefaultValue = false)] - public string Tag { get; set; } + public string? Tag { get; set; } /// /// Transaction identifier /// /// Transaction identifier [DataMember(Name = "TransactionID", EmitDefaultValue = false)] - public string TransactionID { get; set; } + public string? TransactionID { get; set; } /// /// User name /// /// User name [DataMember(Name = "UserName", EmitDefaultValue = false)] - public string UserName { get; set; } + public string? UserName { get; set; } /// /// SDK version /// /// SDK version [DataMember(Name = "Version", EmitDefaultValue = false)] - public string VarVersion { get; set; } + public string? VarVersion { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs index 68154de..f1edc38 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessGetResponse.cs @@ -51,25 +51,25 @@ public partial class TransactionProcessGetResponse : IValidatableObject /// Gets or Sets TransactionId /// [DataMember(Name = "transactionId", EmitDefaultValue = false)] - public Guid TransactionId { get; set; } + public Guid? TransactionId { get; set; } /// /// Gets or Sets Tag /// [DataMember(Name = "tag", EmitDefaultValue = false)] - public string Tag { get; set; } + public string? Tag { get; set; } /// /// Gets or Sets OutData /// [DataMember(Name = "outData", EmitDefaultValue = false)] - public OutData OutData { get; set; } + public OutData? OutData { get; set; } /// /// Gets or Sets InData /// [DataMember(Name = "inData", EmitDefaultValue = false)] - public InData InData { get; set; } + public InData? InData { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs index 4b28a50..7c60965 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessRequest.cs @@ -75,7 +75,7 @@ protected TransactionProcessRequest() { } /// Gets or Sets List /// [DataMember(Name = "List", EmitDefaultValue = false)] - public List List { get; set; } + public List? List { get; set; } /// /// Live portrait photo @@ -85,7 +85,7 @@ protected TransactionProcessRequest() { } Base64 encoded data */ [DataMember(Name = "livePortrait", EmitDefaultValue = false)] - public string LivePortrait { get; set; } + public string? LivePortrait { get; set; } /// /// Portrait photo from an external source @@ -95,33 +95,33 @@ protected TransactionProcessRequest() { } Base64 encoded data */ [DataMember(Name = "extPortrait", EmitDefaultValue = false)] - public string ExtPortrait { get; set; } + public string? ExtPortrait { get; set; } /// /// Gets or Sets ContainerList /// [DataMember(Name = "ContainerList", EmitDefaultValue = false)] - public ContainerList ContainerList { get; set; } + public ContainerList? ContainerList { get; set; } /// /// Gets or Sets SystemInfo /// [DataMember(Name = "systemInfo", EmitDefaultValue = false)] - public ProcessSystemInfo SystemInfo { get; set; } + public ProcessSystemInfo? SystemInfo { get; set; } /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. /// /// Free-form object to be included in response. Must be object, not list or simple value. Do not affect document processing. Use it freely to pass your app params. Stored in process logs. [DataMember(Name = "passBackObject", EmitDefaultValue = false)] - public Dictionary PassBackObject { get; set; } + public Dictionary? PassBackObject { get; set; } /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing /// /// Digital Travel Credential (DTC-VC) data in base64 format for processing [DataMember(Name = "dtc", EmitDefaultValue = false)] - public string Dtc { get; set; } + public string? Dtc { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs index 7c4ddfd..b6d627b 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TransactionProcessResult.cs @@ -51,25 +51,25 @@ public partial class TransactionProcessResult : IValidatableObject /// Gets or Sets OutData /// [DataMember(Name = "OutData", EmitDefaultValue = false)] - public OutData OutData { get; set; } + public OutData? OutData { get; set; } /// /// Gets or Sets InData /// [DataMember(Name = "InData", EmitDefaultValue = false)] - public InData InData { get; set; } + public InData? InData { get; set; } /// /// Gets or Sets Tag /// [DataMember(Name = "tag", EmitDefaultValue = false)] - public string Tag { get; set; } + public string? Tag { get; set; } /// /// Gets or Sets TransactionId /// [DataMember(Name = "transactionId", EmitDefaultValue = false)] - public Guid TransactionId { get; set; } + public Guid? TransactionId { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs index 36d9f35..7dfc23c 100644 --- a/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs +++ b/src/Regula.DocumentReader.WebClient/Model/TrfFtString.cs @@ -61,21 +61,21 @@ protected TrfFtString() { } /// Gets or Sets Type /// [DataMember(Name = "Type", EmitDefaultValue = false)] - public int Type { get; set; } + public int? Type { get; set; } /// /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification /// /// Result of logical analysis of compliance of the contents of the field with the requirements of the specification [DataMember(Name = "Status", EmitDefaultValue = false)] - public int Status { get; set; } + public int? Status { get; set; } /// /// Mask of format of text information (for example, «YYMMDD» for date of birth) /// /// Mask of format of text information (for example, «YYMMDD» for date of birth) [DataMember(Name = "Format", EmitDefaultValue = false)] - public string Format { get; set; } + public string? Format { get; set; } /// /// Numeric value. diff --git a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs index 8657e86..47d74f6 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VerifiedFieldMap.cs @@ -82,28 +82,28 @@ protected VerifiedFieldMap() { } /// /// Field data extracted from mrz(machine readable zone) [DataMember(Name = "Field_MRZ", EmitDefaultValue = false)] - public string FieldMRZ { get; set; } + public string? FieldMRZ { get; set; } /// /// Field data extracted from visual zone /// /// Field data extracted from visual zone [DataMember(Name = "Field_Visual", EmitDefaultValue = false)] - public string FieldVisual { get; set; } + public string? FieldVisual { get; set; } /// /// Field data extracted from barcode /// /// Field data extracted from barcode [DataMember(Name = "Field_Barcode", EmitDefaultValue = false)] - public string FieldBarcode { get; set; } + public string? FieldBarcode { get; set; } /// /// Field data extracted from rfid chip /// /// Field data extracted from rfid chip [DataMember(Name = "Field_RFID", EmitDefaultValue = false)] - public string FieldRFID { get; set; } + public string? FieldRFID { get; set; } /// /// results comparison matrix. Elements of the matrix with indices 0, 1, 2, 3 take one of the values Disabled(0), Verified(1) or Not_Verified(2), elements with indices 4, 5, 6, 7, 8 are one of the values Disabled(0), Compare_Match(3) or Compare_Not_Match(4). Elements of the Matrix matrix have the following semantic meaning: - element with index 0 –– the result of verification of data from the MRZ; - 1 –– the result of verification of data from the RFID microcircuit; - 2 –– the result of verification of data from text areas of the document; - 3 –– the result of verification data from barcodes; - 4 - the result of comparing MRZ data and RFID microcircuits; - 5 - the result of comparing MRZ data and text areas of document filling; - 6 - the result of comparing MRZ data and bar codes; - 7 - the result of comparing the data of text areas of the document and the RFID chip; - 8 - the result of comparing the data of the text areas of the document and barcodes; - 9 - the result of comparing the data of the RFID chip and barcodes. @@ -119,7 +119,7 @@ protected VerifiedFieldMap() { } /// Gets or Sets FieldType /// [DataMember(Name = "FieldType", EmitDefaultValue = false)] - public int FieldType { get; set; } + public int? FieldType { get; set; } /// /// Returns the string presentation of the object diff --git a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs index b1883e0..2bcbe3d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/VisualExtendedFieldItem.cs @@ -136,37 +136,37 @@ protected VisualExtendedFieldItem() { } /// Gets or Sets FieldMask /// [DataMember(Name = "FieldMask", EmitDefaultValue = false)] - public string FieldMask { get; set; } + public string? FieldMask { get; set; } /// /// Gets or Sets Validity /// [DataMember(Name = "Validity", EmitDefaultValue = false)] - public int Validity { get; set; } + public int? Validity { get; set; } /// /// Gets or Sets InComparison /// [DataMember(Name = "InComparison", EmitDefaultValue = false)] - public int InComparison { get; set; } + public int? InComparison { get; set; } /// /// Gets or Sets WLCID /// [DataMember(Name = "wLCID", EmitDefaultValue = false)] - public int WLCID { get; set; } + public int? WLCID { get; set; } /// /// Gets or Sets Reserved2 /// [DataMember(Name = "Reserved2", EmitDefaultValue = false)] - public int Reserved2 { get; set; } + public int? Reserved2 { get; set; } /// /// Gets or Sets Reserved3 /// [DataMember(Name = "Reserved3", EmitDefaultValue = false)] - public int Reserved3 { get; set; } + public int? Reserved3 { get; set; } /// /// Returns the string presentation of the object From b3f72d0efe66670bbffaa225e8f59efa312a7b37 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Thu, 27 Mar 2025 13:02:35 +0300 Subject: [PATCH 09/12] Update examples --- .../Program.cs | 158 +++++++++--------- 1 file changed, 79 insertions(+), 79 deletions(-) diff --git a/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs b/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs index 445df8a..fd6693b 100644 --- a/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs +++ b/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs @@ -13,86 +13,86 @@ internal static class Program public static void Main() { - // // ************************************************************************************************ - // // * This example demonstrates how to perform a full document processing with portrait comparison * - // // * using FaceAPI Web Server * - // // ************************************************************************************************ - // - // var apiBaseUrl = Environment.GetEnvironmentVariable(API_BASE_PATH) ?? "https://api.regulaforensics.com"; - // - // var licenseFromEnv = - // Environment.GetEnvironmentVariable(TEST_LICENSE); // optional, used here only for smoke test purposes - // var licenseFromFile = File.Exists(LICENSE_FILE_NAME) - // ? File.ReadAllBytes(LICENSE_FILE_NAME) - // : null; - // - // var whitePage0 = File.ReadAllBytes("WHITE.jpg"); - // - // var requestParams = new RecognitionParams { AlreadyCropped = true } - // .WithScenario(Scenario.FULL_PROCESS) - // // .WithResultTypeOutput(new List - // // { - // // // actual results - // // Result.STATUS, Result.AUTHENTICITY, Result.TEXT, Result.IMAGES, - // // Result.DOCUMENT_TYPE, Result.DOCUMENT_TYPE_CANDIDATES, Result.DOCUMENT_POSITION, - // // // Portrait comparison - // // Result.PORTRAIT_COMPARISON - // // }) - // .WithFaceApi("https://faceapi.regulaforensics.com") - // .WithAuthParam(new AuthParams(checkPhotoComparison: true)) - // .WithLog(false); - // - // - // var api = licenseFromEnv != null - // ? new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromEnv) - // : new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromFile); - // - // var request = new RecognitionRequest(requestParams, new List - // { - // new ProcessRequestImage(new ImageDataExt(whitePage0), Light.WHITE), - // }); - // request.ExtPortrait = Convert.ToBase64String(File.ReadAllBytes("portrait.png")); - // - // var response = api.Process(request); - // // var authHeaders = new Dictionary() - // // { - // // { "Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}" } - // // }; - // var comparison = response.PortraitComparison(); - // - // Console.WriteLine(response.Log()); - // - // // overall status results - // var status = response.Status(); - // var docOverallStatus = status.OverallStatus == CheckResult.OK ? "valid" : "not valid"; - // var docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid"; - // - // var docType = response.DocumentType(); - // var info = api.Ping(); - // // var info = api.Ping(headers: authHeaders); - // - // Console.WriteLine("-----------------------------------------------------------------"); - // Console.WriteLine($" API Version: {info.Version}"); - // Console.WriteLine("-----------------------------------------------------------------"); - // Console.WriteLine($" Document Overall Status: {docOverallStatus}"); - // Console.WriteLine($" Document Optical Text Status: {docOpticalTextStatus}"); - // Console.WriteLine($" Document Name: {docType.DocumentName}"); - // Console.WriteLine($" Portrait Comparison Percents: {comparison.AuthenticityCheckList.List[0].List[0].PercentValue}"); - // Console.WriteLine("-----------------------All Text Fields------------------------"); - // foreach (var field in response.Text().FieldList) + // ************************************************************************************************ + // * This example demonstrates how to perform a full document processing with portrait comparison * + // * using FaceAPI Web Server * + // ************************************************************************************************ + + var apiBaseUrl = Environment.GetEnvironmentVariable(API_BASE_PATH) ?? "https://api.regulaforensics.com"; + + var licenseFromEnv = + Environment.GetEnvironmentVariable(TEST_LICENSE); // optional, used here only for smoke test purposes + var licenseFromFile = File.Exists(LICENSE_FILE_NAME) + ? File.ReadAllBytes(LICENSE_FILE_NAME) + : null; + + var whitePage0 = File.ReadAllBytes("WHITE.jpg"); + + var requestParams = new RecognitionParams { AlreadyCropped = true } + .WithScenario(Scenario.FULL_PROCESS) + // .WithResultTypeOutput(new List + // { + // // actual results + // Result.STATUS, Result.AUTHENTICITY, Result.TEXT, Result.IMAGES, + // Result.DOCUMENT_TYPE, Result.DOCUMENT_TYPE_CANDIDATES, Result.DOCUMENT_POSITION, + // // Portrait comparison + // Result.PORTRAIT_COMPARISON + // }) + .WithFaceApi("https://faceapi.regulaforensics.com") + .WithAuthParam(new AuthParams(checkPhotoComparison: true)) + .WithLog(false); + + + var api = licenseFromEnv != null + ? new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromEnv) + : new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromFile); + + var request = new RecognitionRequest(requestParams, new List + { + new ProcessRequestImage(new ImageDataExt(whitePage0), Light.WHITE), + }); + request.ExtPortrait = Convert.ToBase64String(File.ReadAllBytes("portrait.png")); + + var response = api.Process(request); + // var authHeaders = new Dictionary() // { - // Console.WriteLine($"Source: {field.FieldName}, Value: {field.Value}"); - // } - // Console.WriteLine("-----------------------------------------------------------------"); - // - // - // // images results - // var documentImage = response.Images().GetField(GraphicFieldType.DOCUMENT_FRONT).GetValue(); - // var portraitField = response.Images().GetField(GraphicFieldType.PORTRAIT); - // var portraitFromVisual = portraitField.GetValue(Source.VISUAL); - // - // File.WriteAllBytes("document-image.jpg", documentImage); - // File.WriteAllBytes("portrait.jpg", portraitFromVisual); + // { "Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}" } + // }; + var comparison = response.PortraitComparison(); + + Console.WriteLine(response.Log()); + + // overall status results + var status = response.Status(); + var docOverallStatus = status.OverallStatus == CheckResult.OK ? "valid" : "not valid"; + var docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid"; + + var docType = response.DocumentType(); + var info = api.Ping(); + // var info = api.Ping(headers: authHeaders); + + Console.WriteLine("-----------------------------------------------------------------"); + Console.WriteLine($" API Version: {info.VarVersion}"); + Console.WriteLine("-----------------------------------------------------------------"); + Console.WriteLine($" Document Overall Status: {docOverallStatus}"); + Console.WriteLine($" Document Optical Text Status: {docOpticalTextStatus}"); + Console.WriteLine($" Document Name: {docType.DocumentName}"); + Console.WriteLine($" Portrait Comparison Percents: {comparison.AuthenticityCheckList.List[0].List[0].PercentValue}"); + Console.WriteLine("-----------------------All Text Fields------------------------"); + foreach (var field in response.Text().FieldList) + { + Console.WriteLine($"Source: {field.FieldName}, Value: {field.Value}"); + } + Console.WriteLine("-----------------------------------------------------------------"); + + + // images results + var documentImage = response.Images().GetField(GraphicFieldType.DOCUMENT_FRONT).GetValue(); + var portraitField = response.Images().GetField(GraphicFieldType.PORTRAIT); + var portraitFromVisual = portraitField.GetValue(Source.VISUAL); + + File.WriteAllBytes("document-image.jpg", documentImage); + File.WriteAllBytes("portrait.jpg", portraitFromVisual); } } From 7daaac308be55156cf4583637a8da86f8cdbb13d Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Thu, 27 Mar 2025 17:30:33 +0300 Subject: [PATCH 10/12] Update documentation, code refactor --- dev.md | 32 ++++++++++++++----- .../Program.cs | 19 +++++++---- .../Program.cs | 3 +- .../Program.cs | 24 +++++++------- .../Api/DocumentReaderApi.cs | 14 ++++++-- 5 files changed, 62 insertions(+), 30 deletions(-) diff --git a/dev.md b/dev.md index 12f90d4..68d3c98 100644 --- a/dev.md +++ b/dev.md @@ -1,14 +1,8 @@ # Development -Models generation based on [openapi spec](https://github.com/regulaforensics/DocumentReader-api-openapi). - -## Enums -Instead of using enums, generator produces static constants. - -## 2-cycle generation -1. Generate enums as constants -2. Generate normal models with substituted by primitive values enums +Models generation based on [openapi spec](https://github.com/regulaforensics/DocumentReader-api-openapi). +## Generation To regenerate models from openapi definition, clone [latest open api definitions](https://github.com/regulaforensics/DocumentReader-api-openapi) @@ -16,3 +10,25 @@ and use next command from the project root. ```bash ./update-models.sh ``` + +## Generator configuration Features + +1. The generator does not generate long enums, the problem +is solved by adding the edited template modelEnum.mustache. +2. When generating oneOf schemas, the generator creates its +own abstract class, which does not look like it would like. +The problem was solved by replacing the abstract generator +class with ours using typeMappings in the generator config. +3. The generator sets the discriminator name incorrectly, the problem +is solved by adding and editing the modelGeneric.mustache template. +4. Changes have also been made to modelsGeneric.mustache to exclude +unspecified fields from JSON when serializing a class. + +## Problem solving + +To solve new problems, use the generator +settings ([csharp](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/generators/csharp.md), +[common](https://github.com/OpenAPITools/openapi-generator/blob/master/docs/customization.md)) +and [templates](https://github.com/OpenAPITools/openapi-generator/tree/master/modules/openapi-generator/src/main/resources/csharp). + +**Do not edit the generated files! They will be overwritten after generation!** \ No newline at end of file diff --git a/src/Regula.DocumentReader.NetCoreExample/Program.cs b/src/Regula.DocumentReader.NetCoreExample/Program.cs index d7827e4..1847fb8 100644 --- a/src/Regula.DocumentReader.NetCoreExample/Program.cs +++ b/src/Regula.DocumentReader.NetCoreExample/Program.cs @@ -3,9 +3,9 @@ using System.IO; using System.Text; using Regula.DocumentReader.WebClient.Api; +using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; using Regula.DocumentReader.WebClient.Model.Ext; -using Regula.DocumentReader.WebClient.Model.Ext.Autheticity; namespace Regula.DocumentReader.NetCoreExample { @@ -50,14 +50,21 @@ public static void Main() // new ProcessRequestImage(new ImageDataExt(irPage0), Light.IR), // new ProcessRequestImage(new ImageDataExt(uvPage0), Light.UV) }); + + var configuration = new Configuration + { + BasePath = apiBaseUrl, + // DefaultHeaders = new Dictionary + // { + // { "Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}" }, + // } + }; var api = licenseFromEnv != null - ? new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromEnv) - : new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromFile); + ? new DocumentReaderApi(configuration).WithLicense(licenseFromEnv) + : new DocumentReaderApi(configuration).WithLicense(licenseFromFile); var response = api.Process(request); - // api.Configuration.DefaultHeaders.Add("Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}"); - Console.WriteLine(response.Log()); // overall status results @@ -66,7 +73,7 @@ public static void Main() var docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid"; var docType = response.DocumentType(); - var info = api.Ping(); + var info = api.Health(); Console.WriteLine("-----------------------------------------------------------------"); Console.WriteLine($" API Version: {info.VarVersion}"); diff --git a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs index db44ca3..c6e01e5 100644 --- a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs +++ b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs @@ -53,7 +53,6 @@ public static void Main() // text results var docNumberField = response.Text().GetField(TextFieldType.DOCUMENT_NUMBER); - Console.WriteLine(docNumberField); var docNumberVisual = docNumberField.GetValue(Source.VISUAL); var docNumberMrz = docNumberField.GetValue(Source.MRZ); var docNumberVisualValidity = docNumberField.SourceValidity(Source.VISUAL); @@ -69,7 +68,7 @@ public static void Main() var docImageQuality = response.ImageQualityChecks(); - var info = api.Ping(); + var info = api.Health(); Console.WriteLine("-----------------------------------------------------------------"); Console.WriteLine($" API Version: {info.VarVersion}"); Console.WriteLine("-----------------------------------------------------------------"); diff --git a/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs b/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs index fd6693b..fe3c248 100644 --- a/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs +++ b/src/Regula.DocumentReader.NetCoreExamplePortraitComparison/Program.cs @@ -1,7 +1,8 @@ using Regula.DocumentReader.WebClient.Api; +using Regula.DocumentReader.WebClient.Client; using Regula.DocumentReader.WebClient.Model; using Regula.DocumentReader.WebClient.Model.Ext; -using Regula.DocumentReader.WebClient.Model.Ext.Autheticity; +using System.Text; namespace Regula.DocumentReader.NetCoreExamplePortraitComparison { @@ -42,10 +43,17 @@ public static void Main() .WithAuthParam(new AuthParams(checkPhotoComparison: true)) .WithLog(false); - + var configuration = new Configuration + { + BasePath = apiBaseUrl, + // DefaultHeaders = new Dictionary + // { + // { "Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}" }, + // } + }; var api = licenseFromEnv != null - ? new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromEnv) - : new DocumentReaderApi(apiBaseUrl).WithLicense(licenseFromFile); + ? new DocumentReaderApi(configuration).WithLicense(licenseFromEnv) + : new DocumentReaderApi(configuration).WithLicense(licenseFromFile); var request = new RecognitionRequest(requestParams, new List { @@ -54,10 +62,6 @@ public static void Main() request.ExtPortrait = Convert.ToBase64String(File.ReadAllBytes("portrait.png")); var response = api.Process(request); - // var authHeaders = new Dictionary() - // { - // { "Authorization", $"Basic {Convert.ToBase64String(Encoding.UTF8.GetBytes("USER:PASSWORD"))}" } - // }; var comparison = response.PortraitComparison(); Console.WriteLine(response.Log()); @@ -68,8 +72,7 @@ public static void Main() var docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid"; var docType = response.DocumentType(); - var info = api.Ping(); - // var info = api.Ping(headers: authHeaders); + var info = api.Health(); Console.WriteLine("-----------------------------------------------------------------"); Console.WriteLine($" API Version: {info.VarVersion}"); @@ -93,7 +96,6 @@ public static void Main() File.WriteAllBytes("document-image.jpg", documentImage); File.WriteAllBytes("portrait.jpg", portraitFromVisual); - } } } \ No newline at end of file diff --git a/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs b/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs index a40e0ba..f7a3482 100644 --- a/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs @@ -18,17 +18,25 @@ public DocumentReaderApi(string basePath) this._healthcheckApi = new HealthcheckApi(basePath); this._processApi = new ProcessApi(basePath); } + + public DocumentReaderApi(Configuration configuration) + { + this._healthcheckApi = new HealthcheckApi(configuration); + this._processApi = new ProcessApi(configuration); + } public IReadableConfiguration Configuration { get => this._processApi.Configuration; - set => this._processApi.Configuration = value; + set + { + this._healthcheckApi.Configuration = value; + this._processApi.Configuration = value; + } } private string License { get; set; } - - public RecognitionResponse Process(ProcessRequest processRequest) { return Process(processRequest, new Dictionary(), default(string)); From f644ebc6430cf548ee0c0e726f54168534f252a9 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Fri, 28 Mar 2025 13:13:28 +0300 Subject: [PATCH 11/12] Update models --- .../Model/EncryptedRCLItem.cs | 2 +- .../Model/EncryptedRCLResult.cs | 2 +- .../Model/LicenseItem.cs | 2 +- .../Model/LicenseResult.cs | 2 +- .../Model/ProcessParams.cs | 12 +++++++++++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index c40e0ab..6a77666 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs @@ -56,7 +56,7 @@ protected EncryptedRCLItem() { } /// /// Base64 encoded data /* - [B@5af2ea19 + [B@73041dc1 */ [DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs index 58bb95a..82b3fc8 100644 --- a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs @@ -62,7 +62,7 @@ protected EncryptedRCLResult() { } /// /// Base64 encoded data /* - [B@5af2ea19 + [B@73041dc1 */ [DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs index 4d278eb..a9e0bc2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs @@ -56,7 +56,7 @@ protected LicenseItem() { } /// /// Base64 encoded data /* - [B@5f6fcce4 + [B@37672764 */ [DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs index 2b3c871..236ed4d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs @@ -62,7 +62,7 @@ protected LicenseResult() { } /// /// Base64 encoded data /* - [B@5f6fcce4 + [B@37672764 */ [DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)] public byte[] License { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs index fa94fe7..eec7e6d 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -142,7 +142,8 @@ protected ProcessParams() { } /// This parameter if enabled will require all necessary certificates to verify digital signature in barcode data to be present in order for the Barcode format check to succeed.. /// Select the longest value from the different value sources and write it to the value field if comparison is done successfully. The parameter applies this logic to the personal names, such as given name, surname, surname and given name, middle name and etc.. /// Set the types of barcodes to process.. - public ProcessParams(bool generateDTCVC = default(bool), List lcidFilter = default(List), bool checkLiveness = default(bool), List lcidIgnoreFilter = default(List), bool oneShotIdentification = default(bool), bool useFaceApi = default(bool), FaceApi faceApi = default(FaceApi), bool doDetectCan = default(bool), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), Scenario scenario = default(Scenario), List resultTypeOutput = default(List), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List fieldTypesFilter = default(List), string dateFormat = default(string), MeasureSystem? measureSystem = default(MeasureSystem?), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary customParams = default(Dictionary), List config = default(List), bool log = default(bool), LogLevel? logLevel = default(LogLevel?), int forceDocID = default(int), bool matchTextFieldMask = default(bool), bool fastDocDetect = default(bool), bool updateOCRValidityByGlare = default(bool), bool checkRequiredTextFields = default(bool), bool returnCroppedBarcode = default(bool), ImageQA imageQa = default(ImageQA), bool strictImageQuality = default(bool), bool respectImageQuality = default(bool), DocumentFormat? forceDocFormat = default(DocumentFormat?), bool noGraphics = default(bool), bool depersonalizeLog = default(bool), bool multiDocOnImage = default(bool), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool returnUncroppedImage = default(bool), List mrzFormatsFilter = default(List), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), TextPostProcessing? convertCase = default(TextPostProcessing?), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List documentGroupFilter = default(List), AuthenticityResultType? processAuth = default(AuthenticityResultType?), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List documentIdList = default(List), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool checkAuth = default(bool), AuthParams authParams = default(AuthParams), MrzDetectModeEnum? mrzDetectMode = default(MrzDetectModeEnum?), bool generateNumericCodes = default(bool), bool strictBarcodeDigitalSignatureCheck = default(bool), bool selectLongestNames = default(bool), List doBarcodes = default(List)) + /// Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases.. + public ProcessParams(bool generateDTCVC = default(bool), List lcidFilter = default(List), bool checkLiveness = default(bool), List lcidIgnoreFilter = default(List), bool oneShotIdentification = default(bool), bool useFaceApi = default(bool), FaceApi faceApi = default(FaceApi), bool doDetectCan = default(bool), int imageOutputMaxHeight = default(int), int imageOutputMaxWidth = default(int), Scenario scenario = default(Scenario), List resultTypeOutput = default(List), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List fieldTypesFilter = default(List), string dateFormat = default(string), MeasureSystem? measureSystem = default(MeasureSystem?), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary customParams = default(Dictionary), List config = default(List), bool log = default(bool), LogLevel? logLevel = default(LogLevel?), int forceDocID = default(int), bool matchTextFieldMask = default(bool), bool fastDocDetect = default(bool), bool updateOCRValidityByGlare = default(bool), bool checkRequiredTextFields = default(bool), bool returnCroppedBarcode = default(bool), ImageQA imageQa = default(ImageQA), bool strictImageQuality = default(bool), bool respectImageQuality = default(bool), DocumentFormat? forceDocFormat = default(DocumentFormat?), bool noGraphics = default(bool), bool depersonalizeLog = default(bool), bool multiDocOnImage = default(bool), int shiftExpiryDate = default(int), int minimalHolderAge = default(int), bool returnUncroppedImage = default(bool), List mrzFormatsFilter = default(List), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), TextPostProcessing? convertCase = default(TextPostProcessing?), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List documentGroupFilter = default(List), AuthenticityResultType? processAuth = default(AuthenticityResultType?), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List documentIdList = default(List), ProcessParamsRfid rfid = default(ProcessParamsRfid), bool checkAuth = default(bool), AuthParams authParams = default(AuthParams), MrzDetectModeEnum? mrzDetectMode = default(MrzDetectModeEnum?), bool generateNumericCodes = default(bool), bool strictBarcodeDigitalSignatureCheck = default(bool), bool selectLongestNames = default(bool), List doBarcodes = default(List), bool strictDLCategoryExpiry = default(bool)) { this.Scenario = scenario; this.GenerateDTCVC = generateDTCVC; @@ -204,6 +205,7 @@ protected ProcessParams() { } this.StrictBarcodeDigitalSignatureCheck = strictBarcodeDigitalSignatureCheck; this.SelectLongestNames = selectLongestNames; this.DoBarcodes = doBarcodes; + this.StrictDLCategoryExpiry = strictDLCategoryExpiry; } /// @@ -579,6 +581,13 @@ protected ProcessParams() { } [DataMember(Name = "doBarcodes", EmitDefaultValue = false)] public List? DoBarcodes { get; set; } + /// + /// Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases. + /// + /// Set to force DL categories expiry date to affect the overall status or not. As documents usually have their own date of expiry, which might be less or greater than category expiry date, this might be handy for specific cases. + [DataMember(Name = "strictDLCategoryExpiry", EmitDefaultValue = false)] + public bool? StrictDLCategoryExpiry { get; set; } + /// /// Returns the string presentation of the object /// @@ -647,6 +656,7 @@ public override string ToString() sb.Append(" StrictBarcodeDigitalSignatureCheck: ").Append(StrictBarcodeDigitalSignatureCheck).Append("\n"); sb.Append(" SelectLongestNames: ").Append(SelectLongestNames).Append("\n"); sb.Append(" DoBarcodes: ").Append(DoBarcodes).Append("\n"); + sb.Append(" StrictDLCategoryExpiry: ").Append(StrictDLCategoryExpiry).Append("\n"); sb.Append("}\n"); return sb.ToString(); } From 1fdabd1688eaa7070e3352a359c0ebf69b1fe702 Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Fri, 28 Mar 2025 16:45:42 +0300 Subject: [PATCH 12/12] Remove encrypted example --- Regula.DocumentReader.sln | 6 -- .../Program.cs | 96 ------------------- ...ntReader.NetCoreExampleEncryptedRcl.csproj | 20 ---- .../encrypted-rcl.txt | 1 - .../license.txt | 1 - 5 files changed, 124 deletions(-) delete mode 100644 src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs delete mode 100644 src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj delete mode 100644 src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/encrypted-rcl.txt delete mode 100644 src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/license.txt diff --git a/Regula.DocumentReader.sln b/Regula.DocumentReader.sln index bd7bd4a..7e47418 100644 --- a/Regula.DocumentReader.sln +++ b/Regula.DocumentReader.sln @@ -6,8 +6,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Regula.DocumentReader.WebCl EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Regula.DocumentReader.NetCoreExample", "src\Regula.DocumentReader.NetCoreExample\Regula.DocumentReader.NetCoreExample.csproj", "{EA417402-2843-4CA5-B712-4CD9425C02E4}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Regula.DocumentReader.NetCoreExampleEncryptedRcl", "src\Regula.DocumentReader.NetCoreExampleEncryptedRcl\Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj", "{1A61741A-298F-4722-8626-00DF9787C683}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Regula.DocumentReader.NetCoreExamplePortraitComparison", "src\Regula.DocumentReader.NetCoreExamplePortraitComparison\Regula.DocumentReader.NetCoreExamplePortraitComparison.csproj", "{DC05980A-7291-4BD2-B9E6-AA0EAADD6198}" EndProject Global @@ -24,10 +22,6 @@ Global {EA417402-2843-4CA5-B712-4CD9425C02E4}.Debug|Any CPU.Build.0 = Debug|Any CPU {EA417402-2843-4CA5-B712-4CD9425C02E4}.Release|Any CPU.ActiveCfg = Release|Any CPU {EA417402-2843-4CA5-B712-4CD9425C02E4}.Release|Any CPU.Build.0 = Release|Any CPU - {1A61741A-298F-4722-8626-00DF9787C683}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1A61741A-298F-4722-8626-00DF9787C683}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1A61741A-298F-4722-8626-00DF9787C683}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1A61741A-298F-4722-8626-00DF9787C683}.Release|Any CPU.Build.0 = Release|Any CPU {DC05980A-7291-4BD2-B9E6-AA0EAADD6198}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {DC05980A-7291-4BD2-B9E6-AA0EAADD6198}.Debug|Any CPU.Build.0 = Debug|Any CPU {DC05980A-7291-4BD2-B9E6-AA0EAADD6198}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs deleted file mode 100644 index c6e01e5..0000000 --- a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Program.cs +++ /dev/null @@ -1,96 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using Regula.DocumentReader.WebClient.Api; -using Regula.DocumentReader.WebClient.Model; -using Regula.DocumentReader.WebClient.Model.Ext; -using Regula.DocumentReader.WebClient.Model.Ext.Autheticity; - -namespace Regula.DocumentReader.NetCoreExampleEncryptedRcl -{ - internal static class Program - { - private const string API_BASE_PATH = "API_BASE_PATH"; - - public static void Main() - { - var apiBaseUrl = Environment.GetEnvironmentVariable(API_BASE_PATH) - ?? "https://api.regulaforensics.com"; - - var requestParams = new RecognitionParams() - .WithScenario(Scenario.FULL_PROCESS) - .WithResultTypeOutput(new List - { - // actual results - Result.STATUS, Result.AUTHENTICITY, Result.TEXT, Result.IMAGES, - Result.DOCUMENT_TYPE, Result.DOCUMENT_TYPE_CANDIDATES, Result.DOCUMENT_POSITION, - // legacy results - Result.MRZ_TEXT, Result.VISUAL_TEXT, Result.BARCODE_TEXT, Result.RFID_TEXT, - Result.VISUAL_GRAPHICS, Result.BARCODE_GRAPHICS, Result.RFID_GRAPHICS, - Result.LEXICAL_ANALYSIS, Result.IMAGE_QUALITY - }); - - var licenseString = File.ReadAllText("license.txt"); - var encryptedRclString = File.ReadAllText("encrypted-rcl.txt"); - - var licenseData = Convert.FromBase64String(licenseString); - var encryptedRclData = Convert.FromBase64String(encryptedRclString); - - var request = new RecognitionRequest(requestParams, new ContainerList(list: new List() - { - new LicenseResult(licenseData, licenseData.Length, 0, 0, 0, Result.LICENSE), - new EncryptedRCLResult(encryptedRclData, encryptedRclData.Length, 0, 0, 0, Result.ENCRYPTED_RCL) - })); - - var api = new DocumentReaderApi(apiBaseUrl); - - var response = api.Process(request); - - // overall status results - var status = response.Status(); - var docOverallStatus = status.OverallStatus == CheckResult.OK ? "valid" : "not valid"; - var docOpticalTextStatus = status.DetailsOptical.Text == CheckResult.OK ? "valid" : "not valid"; - - // text results - var docNumberField = response.Text().GetField(TextFieldType.DOCUMENT_NUMBER); - var docNumberVisual = docNumberField.GetValue(Source.VISUAL); - var docNumberMrz = docNumberField.GetValue(Source.MRZ); - var docNumberVisualValidity = docNumberField.SourceValidity(Source.VISUAL); - var docNumberMrzValidity = docNumberField.SourceValidity(Source.MRZ); - var docNumberMrzVisualMatching = docNumberField.CrossSourceComparison(Source.MRZ, Source.VISUAL); - - var docAuthenticity = response.Authenticity(); - var docIRB900 = docAuthenticity.IrB900Checks(); - var docIRB900Blank = docIRB900?.ChecksByElement(SecurityFeatureType.BLANK); - - var docImagePattern = docAuthenticity.ImagePatternChecks(); - var docImagePatternBlank = docImagePattern?.ChecksByElement(SecurityFeatureType.BLANK); - - var docImageQuality = response.ImageQualityChecks(); - - var info = api.Health(); - Console.WriteLine("-----------------------------------------------------------------"); - Console.WriteLine($" API Version: {info.VarVersion}"); - Console.WriteLine("-----------------------------------------------------------------"); - Console.WriteLine($" Document Overall Status: {docOverallStatus}"); - Console.WriteLine($" Document Optical Text Status: {docOpticalTextStatus}"); - Console.WriteLine($" Document Number Visual: {docNumberVisual}"); - Console.WriteLine($" Document Number MRZ: {docNumberMrz}", docNumberMrz); - Console.WriteLine($"Validity Of Document Number Visual: {docNumberVisualValidity}"); - Console.WriteLine($" Validity Of Document Number MRZ: {docNumberMrzValidity}"); - Console.WriteLine($" MRZ-Visual values comparison: {docNumberMrzVisualMatching}"); - Console.WriteLine("-----------------------------------------------------------------"); - - // images results - var documentImage = response.Images().GetField(GraphicFieldType.DOCUMENT_FRONT).GetValue(); - var portraitField = response.Images().GetField(GraphicFieldType.PORTRAIT); - var portraitFromVisual = portraitField.GetValue(Source.VISUAL); - - File.WriteAllBytes("document-image.jpg", documentImage); - File.WriteAllBytes("portrait.jpg", portraitFromVisual); - - // how to get low lvl individual results - // var lexResult = response.ResultByType(Result.LEXICAL_ANALYSIS); - } - } -} \ No newline at end of file diff --git a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj deleted file mode 100644 index 84f9fc7..0000000 --- a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/Regula.DocumentReader.NetCoreExampleEncryptedRcl.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - Exe - DocumentReader WebClient Example EncryptedRcl - Regula.DocumentReader.NetCoreExampleEncryptedRcl - net8.0 - - - - - PreserveNewest - - - PreserveNewest - - - - - - diff --git a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/encrypted-rcl.txt b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/encrypted-rcl.txt deleted file mode 100644 index e22b191..0000000 --- a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/encrypted-rcl.txt +++ /dev/null @@ -1 +0,0 @@ -MDAwMXjaHJtnd6Js14YBUexOejSJqZNepqRMvQd7V5BqAQRb7A0FBPGvv3ner3vtdS0W7Ovcx/EBIKLwEVfowHfs31vyPJqAftCBMBZhPYkeiu5WAy5LMLFxcYdF9xwwE6Gj2K9StZIOcduenf0E6eSzoypJRRzw/sEuK5CDCmgdLeyHeyLhvi5hOLCgKyWyyhaFXSESilJ4kfJVNg48RMqjjeui9woJChNlWv/vJDKeXsjqBELC8qw/h9an6YqiiOmbSYSZfX4Xlovx83eHJ2NMJqXri4ij/tCmiSZnZdajCDQ98dPaQuOvMxFmelZOrhazo++OI7uaxZC7FyLZugQjekcLwOhofNGxt3UxbHTOyeW4B6KTeqx8vQe/zMtGer1xnTOq91lZaGTVqklqvkmgVtSyq8R1WuPHx3JRzax9z8/gR81kv+1rlfWhShikKiz3y/OL7kl/xsqI+nnaXqlX+Go2S5/8k+TOZBWd/TppNuSLhqH0G2Nl0Z9faGd9bSLPhyfR5lQHy5Npnbspzo+0aHs6+2WbzJVNw5DLtZm8MD6aP29roiH3T6TWoveEzxvK/CTrulim1hn53+2izJwYY2srF26IJmzR7DXnMsukneq0Wv5ndnledQfPkJ5gXbXOivqcIxqOdq/NF01T3Om/9IbtOhj73Sgti3+GkkDMHe7HdRfEOboA99GpxxhOY2DV4Ln1V/JmOaoCJcUdXvOphyEVgis77n9IOKo1AB/NwZFdbZWrDaZ5X8I8zD5pDnPQPmRLQ1v2EXMHWjxmvzv3UomM0/MVtmOIbbMZsQS8rb6xuTrrF+bKxLiYzJvGhdoZz2YXf9webb6Yxm6vFjR1v3gviwFPe1FqnWhn6dXso/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DocumentReader.NetCoreExampleEncryptedRcl/license.txt b/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/license.txt deleted file mode 100644 index 4225f85..0000000 --- a/src/Regula.DocumentReader.NetCoreExampleEncryptedRcl/license.txt +++ /dev/null @@ -1 +0,0 @@ -AAEAAK/WKOtEs17ikF4B/IKdpwmj9p0KTx2OSFFdNba1eoDT5+8tDMeZEM4ucNYB3zqKknTIxH/7zTNpQtFLtzZlwmtWEgwfLLSdFdWTA63AI7RjRxD9gr2ci++l32k7iJvUnLy1XAMM6sEhij4Ui3s+MpObMhu6/EJWe9y/57uFB4Jzdwx34D9VAS1wj9O6MliCqKs9sIZNwohaddcg8sVYHKd76VqVvrZKN5HcW7nSjWoDDXWsLA3LW6INaU3SuWJJkDD1EqE6lvjWjKlxwe7B5h77csirRjI58HCXrbXL1g84n1FZ3uTgw7KfISxlQ+i99Zj9TbhSEiGPfnZFvk6LHARUBAAAAAAAECcDDWmiV6FtvHfS/mQmG7iPG16AxSAM1CZkciHkBeXKD+P3qYfPPKvOoC+VmgsKy3+YtFZbNtdrzWILttCv9PDHshglkIaC5qIwJCJUwmj7o2LHMtLyVVzLq15v3JULQ89HGa0Mgcjoo4Rporb/ARsRq5f9YaEamP6i2zmc88Fa4a4pxl3bBI3pDlu6qZ2SGRyysrkh19PUf3wNigE5i1kK7CMqi5TuUkuoyboog+bypE5CV8peAnrhcH0O8PzoDz0R8U3K+cy/BuyeP6eZ/0J8mk4QgVcaYDGRIeKPYWtvhdRa2j3ybItNfA2S2piTL6Mf9fEli5mpifBTNNGoZuzwEWxUH0vmco/zAFkH8dmkRQGSe9u8WjbgQHhIUIQ0aifGSJEbNocc/3kQsRTBhMT1By8C2cSJ20A0OnyY9nmWx9vpAeuCdMkTNOjAP/AZuZNZtmmRmBsoXpsAP+TOZ1hbimumcw/QSVUhKDVdLbIH03g45byy8Db1xe2uohSY65p9pRqIzgEMoCs/Is5ga+2jRxNlfGwer2AKxhWpxjqnGQJt9Asr9LI7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