Skip to content

Commit 490b60f

Browse files
SP-23182 - update models
1 parent e65251c commit 490b60f

File tree

8 files changed

+47
-42
lines changed

8 files changed

+47
-42
lines changed

src/Regula.DocumentReader.WebClient/Model/ChosenDocumentType.cs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ protected ChosenDocumentType() { }
4646
/// <summary>
4747
/// Initializes a new instance of the <see cref="ChosenDocumentType" /> class.
4848
/// </summary>
49-
/// <param name="documentName">Document name (required).</param>
49+
/// <param name="documentName">Document name.</param>
5050
/// <param name="iD">Unique document type template identifier (Regula&#39;s internal numeric code) (required).</param>
5151
/// <param name="p">A measure of the likelihood of correct recognition in the analysis of this type of document (required).</param>
5252
/// <param name="rotated180">true if the document of the given type is rotated by 180 degrees (required).</param>
5353
/// <param name="rFIDPresence">rFIDPresence (required).</param>
54-
/// <param name="fDSIDList">fDSIDList (required).</param>
54+
/// <param name="fDSIDList">fDSIDList.</param>
5555
/// <param name="necessaryLights">Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document (required).</param>
5656
/// <param name="checkAuthenticity">Set of authentication options provided for this type of document (combination of Authenticity enum) (required).</param>
5757
/// <param name="uVExp">The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme (required).</param>
@@ -60,36 +60,26 @@ protected ChosenDocumentType() { }
6060
/// <param name="rotationAngle">rotationAngle.</param>
6161
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))
6262
{
63-
// to ensure "documentName" is required (not null)
64-
if (documentName == null)
65-
{
66-
throw new ArgumentNullException("documentName is a required property for ChosenDocumentType and cannot be null");
67-
}
68-
this.DocumentName = documentName;
6963
this.ID = iD;
7064
this.P = p;
7165
this.Rotated180 = rotated180;
7266
this.RFIDPresence = rFIDPresence;
73-
// to ensure "fDSIDList" is required (not null)
74-
if (fDSIDList == null)
75-
{
76-
throw new ArgumentNullException("fDSIDList is a required property for ChosenDocumentType and cannot be null");
77-
}
78-
this.FDSIDList = fDSIDList;
7967
this.NecessaryLights = necessaryLights;
8068
this.CheckAuthenticity = checkAuthenticity;
8169
this.UVExp = uVExp;
8270
this.AuthenticityNecessaryLights = authenticityNecessaryLights;
8371
this.OVIExp = oVIExp;
72+
this.DocumentName = documentName;
73+
this.FDSIDList = fDSIDList;
8474
this.RotationAngle = rotationAngle;
8575
}
8676

8777
/// <summary>
8878
/// Document name
8979
/// </summary>
9080
/// <value>Document name</value>
91-
[DataMember(Name = "DocumentName", IsRequired = true, EmitDefaultValue = true)]
92-
public string DocumentName { get; set; }
81+
[DataMember(Name = "DocumentName", EmitDefaultValue = false)]
82+
public string? DocumentName { get; set; }
9383

9484
/// <summary>
9585
/// Unique document type template identifier (Regula&#39;s internal numeric code)
@@ -118,8 +108,8 @@ protected ChosenDocumentType() { }
118108
/// <summary>
119109
/// Gets or Sets FDSIDList
120110
/// </summary>
121-
[DataMember(Name = "FDSIDList", IsRequired = true, EmitDefaultValue = true)]
122-
public FDSIDList FDSIDList { get; set; }
111+
[DataMember(Name = "FDSIDList", EmitDefaultValue = false)]
112+
public FDSIDList? FDSIDList { get; set; }
123113

124114
/// <summary>
125115
/// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document

src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected EncryptedRCLItem() { }
5656
/// </summary>
5757
/// <value>Base64 encoded data</value>
5858
/*
59-
<example>[B@4b3f0960</example>
59+
<example>[B@2d970d48</example>
6060
*/
6161
[DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)]
6262
public byte[] EncryptedRCL { get; set; }

src/Regula.DocumentReader.WebClient/Model/EncryptedRCLResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected EncryptedRCLResult() { }
6262
/// </summary>
6363
/// <value>Base64 encoded data</value>
6464
/*
65-
<example>[B@4b3f0960</example>
65+
<example>[B@2d970d48</example>
6666
*/
6767
[DataMember(Name = "EncryptedRCL", IsRequired = true, EmitDefaultValue = true)]
6868
public byte[] EncryptedRCL { get; set; }

src/Regula.DocumentReader.WebClient/Model/LicenseItem.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected LicenseItem() { }
5656
/// </summary>
5757
/// <value>Base64 encoded data</value>
5858
/*
59-
<example>[B@5259b0e4</example>
59+
<example>[B@2065118c</example>
6060
*/
6161
[DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)]
6262
public byte[] License { get; set; }

src/Regula.DocumentReader.WebClient/Model/LicenseResult.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ protected LicenseResult() { }
6262
/// </summary>
6363
/// <value>Base64 encoded data</value>
6464
/*
65-
<example>[B@5259b0e4</example>
65+
<example>[B@2065118c</example>
6666
*/
6767
[DataMember(Name = "License", IsRequired = true, EmitDefaultValue = true)]
6868
public byte[] License { get; set; }

src/Regula.DocumentReader.WebClient/Model/OneCandidate.cs

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ protected OneCandidate() { }
4646
/// <summary>
4747
/// Initializes a new instance of the <see cref="OneCandidate" /> class.
4848
/// </summary>
49-
/// <param name="documentName">Document name (required).</param>
49+
/// <param name="documentName">Document name.</param>
5050
/// <param name="iD">Unique document type template identifier (Regula&#39;s internal numeric code) (required).</param>
5151
/// <param name="p">A measure of the likelihood of correct recognition in the analysis of this type of document (required).</param>
5252
/// <param name="rotated180">true if the document of the given type is rotated by 180 degrees (required).</param>
5353
/// <param name="rFIDPresence">rFIDPresence (required).</param>
54-
/// <param name="fDSIDList">fDSIDList (required).</param>
54+
/// <param name="fDSIDList">fDSIDList.</param>
5555
/// <param name="necessaryLights">Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document (required).</param>
5656
/// <param name="checkAuthenticity">Set of authentication options provided for this type of document (combination of Authenticity enum) (required).</param>
5757
/// <param name="uVExp">The required exposure value of the camera when receiving images of a document of this type for a UV lighting scheme (required).</param>
@@ -60,36 +60,26 @@ protected OneCandidate() { }
6060
/// <param name="rotationAngle">rotationAngle.</param>
6161
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))
6262
{
63-
// to ensure "documentName" is required (not null)
64-
if (documentName == null)
65-
{
66-
throw new ArgumentNullException("documentName is a required property for OneCandidate and cannot be null");
67-
}
68-
this.DocumentName = documentName;
6963
this.ID = iD;
7064
this.P = p;
7165
this.Rotated180 = rotated180;
7266
this.RFIDPresence = rFIDPresence;
73-
// to ensure "fDSIDList" is required (not null)
74-
if (fDSIDList == null)
75-
{
76-
throw new ArgumentNullException("fDSIDList is a required property for OneCandidate and cannot be null");
77-
}
78-
this.FDSIDList = fDSIDList;
7967
this.NecessaryLights = necessaryLights;
8068
this.CheckAuthenticity = checkAuthenticity;
8169
this.UVExp = uVExp;
8270
this.AuthenticityNecessaryLights = authenticityNecessaryLights;
8371
this.OVIExp = oVIExp;
72+
this.DocumentName = documentName;
73+
this.FDSIDList = fDSIDList;
8474
this.RotationAngle = rotationAngle;
8575
}
8676

8777
/// <summary>
8878
/// Document name
8979
/// </summary>
9080
/// <value>Document name</value>
91-
[DataMember(Name = "DocumentName", IsRequired = true, EmitDefaultValue = true)]
92-
public string DocumentName { get; set; }
81+
[DataMember(Name = "DocumentName", EmitDefaultValue = false)]
82+
public string? DocumentName { get; set; }
9383

9484
/// <summary>
9585
/// Unique document type template identifier (Regula&#39;s internal numeric code)
@@ -118,8 +108,8 @@ protected OneCandidate() { }
118108
/// <summary>
119109
/// Gets or Sets FDSIDList
120110
/// </summary>
121-
[DataMember(Name = "FDSIDList", IsRequired = true, EmitDefaultValue = true)]
122-
public FDSIDList FDSIDList { get; set; }
111+
[DataMember(Name = "FDSIDList", EmitDefaultValue = false)]
112+
public FDSIDList? FDSIDList { get; set; }
123113

124114
/// <summary>
125115
/// Combination of lighting scheme identifiers (Light enum) required to conduct OCR for this type of document

src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ protected ProcessParams() { }
144144
/// <param name="doBarcodes">Set the types of barcodes to process..</param>
145145
/// <param name="strictDLCategoryExpiry">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..</param>
146146
/// <param name="generateAlpha2Codes">Set to generate Alpha-2 codes for nationality and issuing state fields..</param>
147-
public ProcessParams(bool generateDTCVC = default(bool), List<LCID> lcidFilter = default(List<LCID>), bool checkLiveness = default(bool), List<LCID> lcidIgnoreFilter = default(List<LCID>), 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<Result> resultTypeOutput = default(List<Result>), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List<TextFieldType> fieldTypesFilter = default(List<TextFieldType>), string dateFormat = default(string), MeasureSystem? measureSystem = default(MeasureSystem?), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary<string, Object> customParams = default(Dictionary<string, Object>), List<PerDocumentConfig> config = default(List<PerDocumentConfig>), 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<MRZFormat> mrzFormatsFilter = default(List<MRZFormat>), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), TextPostProcessing? convertCase = default(TextPostProcessing?), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List<DocumentType> documentGroupFilter = default(List<DocumentType>), AuthenticityResultType? processAuth = default(AuthenticityResultType?), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List<int> documentIdList = default(List<int>), 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<InputBarcodeType> doBarcodes = default(List<InputBarcodeType>), bool strictDLCategoryExpiry = default(bool), bool generateAlpha2Codes = default(bool))
147+
/// <param name="pdfPagesLimit">Limits the number of pages to be processed from a PDF file..</param>
148+
public ProcessParams(bool generateDTCVC = default(bool), List<LCID> lcidFilter = default(List<LCID>), bool checkLiveness = default(bool), List<LCID> lcidIgnoreFilter = default(List<LCID>), 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<Result> resultTypeOutput = default(List<Result>), bool doublePageSpread = default(bool), bool generateDoublePageSpreadImage = default(bool), List<TextFieldType> fieldTypesFilter = default(List<TextFieldType>), string dateFormat = default(string), MeasureSystem? measureSystem = default(MeasureSystem?), int imageDpiOutMax = default(int), bool alreadyCropped = default(bool), Dictionary<string, Object> customParams = default(Dictionary<string, Object>), List<PerDocumentConfig> config = default(List<PerDocumentConfig>), 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<MRZFormat> mrzFormatsFilter = default(List<MRZFormat>), bool forceReadMrzBeforeLocate = default(bool), bool parseBarcodes = default(bool), TextPostProcessing? convertCase = default(TextPostProcessing?), bool splitNames = default(bool), bool disablePerforationOCR = default(bool), List<DocumentType> documentGroupFilter = default(List<DocumentType>), AuthenticityResultType? processAuth = default(AuthenticityResultType?), int deviceId = default(int), int deviceType = default(int), string deviceTypeHex = default(string), bool ignoreDeviceIdFromImage = default(bool), List<int> documentIdList = default(List<int>), 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<InputBarcodeType> doBarcodes = default(List<InputBarcodeType>), bool strictDLCategoryExpiry = default(bool), bool generateAlpha2Codes = default(bool), int pdfPagesLimit = default(int))
148149
{
149150
this.Scenario = scenario;
150151
this.GenerateDTCVC = generateDTCVC;
@@ -208,6 +209,7 @@ protected ProcessParams() { }
208209
this.DoBarcodes = doBarcodes;
209210
this.StrictDLCategoryExpiry = strictDLCategoryExpiry;
210211
this.GenerateAlpha2Codes = generateAlpha2Codes;
212+
this.PdfPagesLimit = pdfPagesLimit;
211213
}
212214

213215
/// <summary>
@@ -597,6 +599,13 @@ protected ProcessParams() { }
597599
[DataMember(Name = "generateAlpha2Codes", EmitDefaultValue = false)]
598600
public bool? GenerateAlpha2Codes { get; set; }
599601

602+
/// <summary>
603+
/// Limits the number of pages to be processed from a PDF file.
604+
/// </summary>
605+
/// <value>Limits the number of pages to be processed from a PDF file.</value>
606+
[DataMember(Name = "pdfPagesLimit", EmitDefaultValue = false)]
607+
public int? PdfPagesLimit { get; set; }
608+
600609
/// <summary>
601610
/// Returns the string presentation of the object
602611
/// </summary>
@@ -667,6 +676,7 @@ public override string ToString()
667676
sb.Append(" DoBarcodes: ").Append(DoBarcodes).Append("\n");
668677
sb.Append(" StrictDLCategoryExpiry: ").Append(StrictDLCategoryExpiry).Append("\n");
669678
sb.Append(" GenerateAlpha2Codes: ").Append(GenerateAlpha2Codes).Append("\n");
679+
sb.Append(" PdfPagesLimit: ").Append(PdfPagesLimit).Append("\n");
670680
sb.Append("}\n");
671681
return sb.ToString();
672682
}

src/Regula.DocumentReader.WebClient/Model/TextFieldType.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3249,7 +3249,22 @@ public enum TextFieldType
32493249
/// <summary>
32503250
/// Enum AIRLINE_CODE for value: 694
32513251
/// </summary>
3252-
AIRLINE_CODE = 694
3252+
AIRLINE_CODE = 694,
3253+
3254+
/// <summary>
3255+
/// Enum FT_MVC_AGENCY for value: 695
3256+
/// </summary>
3257+
FT_MVC_AGENCY = 695,
3258+
3259+
/// <summary>
3260+
/// Enum FT_ISSUING_STATE_CODE_ALPHA2 for value: 696
3261+
/// </summary>
3262+
FT_ISSUING_STATE_CODE_ALPHA2 = 696,
3263+
3264+
/// <summary>
3265+
/// Enum FT_NATIONALITY_CODE_ALPHA2 for value: 697
3266+
/// </summary>
3267+
FT_NATIONALITY_CODE_ALPHA2 = 697
32533268
}
32543269

32553270
}

0 commit comments

Comments
 (0)