From 5fc38346316684a5362374eb3bef5fd154fa2b7f Mon Sep 17 00:00:00 2001 From: Artem Tsybulko Date: Wed, 30 Apr 2025 11:12:19 +0300 Subject: [PATCH] SP-22886 - optional FaceDetection --- .../Model/EncryptedRCLItem.cs | 2 +- .../Model/EncryptedRCLResult.cs | 2 +- .../Model/FaceDetectionItem.cs | 16 +++------------- .../Model/FaceDetectionResult.cs | 11 +++-------- .../Model/LicenseItem.cs | 2 +- .../Model/LicenseResult.cs | 2 +- 6 files changed, 10 insertions(+), 25 deletions(-) diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index e4bb7c9..64686d7 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@22e6ed8b + [B@4b3f0960 */ [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 0c90267..8251a01 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@22e6ed8b + [B@4b3f0960 */ [DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)] public byte[] EncryptedRCL { get; set; } diff --git a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs index 1343ce8..6bb727f 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionItem.cs @@ -35,27 +35,17 @@ public partial class FaceDetectionItem : IValidatableObject /// /// Initializes a new instance of the class. /// - [JsonConstructorAttribute] - protected FaceDetectionItem() { } - /// - /// Initializes a new instance of the class. - /// - /// faceDetection (required). + /// faceDetection. public FaceDetectionItem(FaceDetection faceDetection = default(FaceDetection)) { - // 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; } /// /// Gets or Sets FaceDetection /// - [DataMember(Name = "FaceDetection", IsRequired = true, EmitDefaultValue = true)] - public FaceDetection FaceDetection { get; set; } + [DataMember(Name = "FaceDetection", EmitDefaultValue = false)] + public FaceDetection? FaceDetection { 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 c0305f1..7ba0f61 100644 --- a/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs +++ b/src/Regula.DocumentReader.WebClient/Model/FaceDetectionResult.cs @@ -41,7 +41,7 @@ protected FaceDetectionResult() { } /// /// Initializes a new instance of the class. /// - /// faceDetection (required). + /// faceDetection. /// bufLength. /// light. /// listIdx. @@ -49,19 +49,14 @@ protected FaceDetectionResult() { } /// 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) - { - throw new ArgumentNullException("faceDetection is a required property for FaceDetectionResult and cannot be null"); - } this.FaceDetection = faceDetection; } /// /// Gets or Sets FaceDetection /// - [DataMember(Name = "FaceDetection", IsRequired = true, EmitDefaultValue = true)] - public FaceDetection FaceDetection { get; set; } + [DataMember(Name = "FaceDetection", EmitDefaultValue = false)] + public FaceDetection? FaceDetection { get; set; } /// /// 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 0728511..56e93fd 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@158096b5 + [B@5259b0e4 */ [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 c8ce8b2..db3f14c 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@158096b5 + [B@5259b0e4 */ [DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)] public byte[] License { get; set; }