diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 791ef7a..4ffc2c0 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,5 +1,6 @@ src/Regula.DocumentReader.WebClient/Api/HealthcheckApi.cs src/Regula.DocumentReader.WebClient/Api/ProcessApi.cs +src/Regula.DocumentReader.WebClient/Api/ResourcesApi.cs src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs src/Regula.DocumentReader.WebClient/Client/ApiClient.cs src/Regula.DocumentReader.WebClient/Client/ApiException.cs @@ -49,6 +50,8 @@ 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/DatabaseDocument.cs +src/Regula.DocumentReader.WebClient/Model/DatabaseDocumentList.cs src/Regula.DocumentReader.WebClient/Model/DetailsOptical.cs src/Regula.DocumentReader.WebClient/Model/DetailsRFID.cs src/Regula.DocumentReader.WebClient/Model/DeviceInfo.cs diff --git a/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs b/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs index afd57cd..d793348 100644 --- a/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/DocumentReaderApi.cs @@ -12,17 +12,20 @@ public class DocumentReaderApi { private readonly HealthcheckApi _healthcheckApi; private readonly ProcessApi _processApi; + private readonly ResourcesApi _resourcesApi; public DocumentReaderApi(string basePath) { this._healthcheckApi = new HealthcheckApi(basePath); this._processApi = new ProcessApi(basePath); + this._resourcesApi = new ResourcesApi(basePath); } public DocumentReaderApi(Configuration configuration) { this._healthcheckApi = new HealthcheckApi(configuration); this._processApi = new ProcessApi(configuration); + this._resourcesApi = new ResourcesApi(configuration); } public IReadableConfiguration Configuration @@ -32,6 +35,7 @@ public IReadableConfiguration Configuration { this._healthcheckApi.Configuration = value; this._processApi.Configuration = value; + this._resourcesApi.Configuration = value; } } @@ -75,6 +79,21 @@ public async Task ProcessAsync(ProcessRequest processReques return new RecognitionResponse(response); } + public DatabaseDocumentList Doclist() + { + return this._resourcesApi.Doclist(); + } + + public async Task DoclistAsync() + { + return await DoclistAsync(new CancellationToken()); + } + + public async Task DoclistAsync(CancellationToken cancellationToken = default(CancellationToken)) + { + return await this._resourcesApi.DoclistAsync(cancellationToken); + } + public DeviceInfo Ping(string xRequestID) { return this._healthcheckApi.Ping(xRequestID); diff --git a/src/Regula.DocumentReader.WebClient/Api/ResourcesApi.cs b/src/Regula.DocumentReader.WebClient/Api/ResourcesApi.cs new file mode 100644 index 0000000..1d81a24 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Api/ResourcesApi.cs @@ -0,0 +1,391 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 8.1.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.Net; +using System.Net.Http; +using System.Net.Mime; +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 IResourcesApiSync : IApiAccessor + { + #region Synchronous Operations + /// + /// Returns the list of documents stored in the database that the Web Service API is running with. + /// + /// Thrown when fails to make API call + /// DatabaseDocumentList + DatabaseDocumentList Doclist(); + + /// + /// Returns the list of documents stored in the database that the Web Service API is running with. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// ApiResponse of DatabaseDocumentList + ApiResponse DoclistWithHttpInfo(); + #endregion Synchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IResourcesApiAsync : IApiAccessor + { + #region Asynchronous Operations + /// + /// Returns the list of documents stored in the database that the Web Service API is running with. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of DatabaseDocumentList + System.Threading.Tasks.Task DoclistAsync(System.Threading.CancellationToken cancellationToken = default); + + /// + /// Returns the list of documents stored in the database that the Web Service API is running with. + /// + /// + /// + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DatabaseDocumentList) + System.Threading.Tasks.Task> DoclistWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default); + #endregion Asynchronous Operations + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IResourcesApi : IResourcesApiSync, IResourcesApiAsync + { + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public partial class ResourcesApi : IDisposable, IResourcesApi + { + private Regula.DocumentReader.WebClient.Client.ExceptionFactory _exceptionFactory = (name, response) => null; + + /// + /// 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 ResourcesApi() : this((string)null) + { + } + + /// + /// 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. + /// + /// + public ResourcesApi(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; + } + + /// + /// 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. + /// + /// + public ResourcesApi(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; + } + + /// + /// 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 ResourcesApi(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. + /// + /// + /// + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public ResourcesApi(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; + } + + /// + /// 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. + /// + /// + /// + /// Some configuration settings will not be applied without passing an HttpClientHandler. + /// The features affected are: Setting and Retrieving Cookies, Client Certificates, Proxy settings. + /// + public ResourcesApi(HttpClient client, Regula.DocumentReader.WebClient.Client.Configuration configuration, HttpClientHandler handler = null) + { + 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; + } + + /// + /// 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 ResourcesApi(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; + } + + /// + /// Disposes resources if they were created by us + /// + public void Dispose() + { + this.ApiClient?.Dispose(); + } + + /// + /// Holds the ApiClient if created + /// + public Regula.DocumentReader.WebClient.Client.ApiClient ApiClient { get; set; } = null; + + /// + /// The client for accessing this underlying API asynchronously. + /// + 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() + { + return this.Configuration.BasePath; + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Regula.DocumentReader.WebClient.Client.IReadableConfiguration 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; } + } + + /// + /// Returns the list of documents stored in the database that the Web Service API is running with. + /// + /// Thrown when fails to make API call + /// DatabaseDocumentList + public DatabaseDocumentList Doclist() + { + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = DoclistWithHttpInfo(); + return localVarResponse.Data; + } + + /// + /// Returns the list of documents stored in the database that the Web Service API is running with. + /// + /// Thrown when fails to make API call + /// ApiResponse of DatabaseDocumentList + public Regula.DocumentReader.WebClient.Client.ApiResponse DoclistWithHttpInfo() + { + 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); + + + + // make the HTTP request + var localVarResponse = this.Client.Get("/api/doclist", localVarRequestOptions, this.Configuration); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Doclist", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + /// + /// Returns the list of documents stored in the database that the Web Service API is running with. + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of DatabaseDocumentList + public async System.Threading.Tasks.Task DoclistAsync(System.Threading.CancellationToken cancellationToken = default) + { + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await DoclistWithHttpInfoAsync(cancellationToken).ConfigureAwait(false); + return localVarResponse.Data; + } + + /// + /// Returns the list of documents stored in the database that the Web Service API is running with. + /// + /// Thrown when fails to make API call + /// Cancellation Token to cancel the request. + /// Task of ApiResponse (DatabaseDocumentList) + public async System.Threading.Tasks.Task> DoclistWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default) + { + + 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); + + + + // make the HTTP request + + var localVarResponse = await this.AsynchronousClient.GetAsync("/api/doclist", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); + + if (this.ExceptionFactory != null) + { + Exception _exception = this.ExceptionFactory("Doclist", localVarResponse); + if (_exception != null) throw _exception; + } + + return localVarResponse; + } + + } +} diff --git a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs index 2e418bf..dbd8731 100644 --- a/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs +++ b/src/Regula.DocumentReader.WebClient/Api/TransactionApi.cs @@ -107,8 +107,9 @@ public interface ITransactionApiSync : IApiAccessor /// Thrown when fails to make API call /// Transaction id /// + /// Get processed values from storage in case transaction has already processed. (optional, default to false) /// TransactionProcessResult - TransactionProcessResult ApiV2TransactionTransactionIdProcessPost(Guid transactionId, TransactionProcessRequest transactionProcessRequest); + TransactionProcessResult ApiV2TransactionTransactionIdProcessPost(Guid transactionId, TransactionProcessRequest transactionProcessRequest, bool? useCache = default); /// /// Reprocess @@ -119,8 +120,9 @@ public interface ITransactionApiSync : IApiAccessor /// Thrown when fails to make API call /// Transaction id /// + /// Get processed values from storage in case transaction has already processed. (optional, default to false) /// ApiResponse of TransactionProcessResult - ApiResponse ApiV2TransactionTransactionIdProcessPostWithHttpInfo(Guid transactionId, TransactionProcessRequest transactionProcessRequest); + ApiResponse ApiV2TransactionTransactionIdProcessPostWithHttpInfo(Guid transactionId, TransactionProcessRequest transactionProcessRequest, bool? useCache = default); /// /// Get Reprocess transaction result /// @@ -253,9 +255,10 @@ public interface ITransactionApiAsync : IApiAccessor /// Thrown when fails to make API call /// Transaction id /// + /// Get processed values from storage in case transaction has already processed. (optional, default to false) /// Cancellation Token to cancel the request. /// Task of TransactionProcessResult - System.Threading.Tasks.Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, bool? useCache = default, System.Threading.CancellationToken cancellationToken = default); /// /// Reprocess @@ -266,9 +269,10 @@ public interface ITransactionApiAsync : IApiAccessor /// Thrown when fails to make API call /// Transaction id /// + /// Get processed values from storage in case transaction has already processed. (optional, default to false) /// Cancellation Token to cancel the request. /// Task of ApiResponse (TransactionProcessResult) - System.Threading.Tasks.Task> ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default); + System.Threading.Tasks.Task> ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, bool? useCache = default, System.Threading.CancellationToken cancellationToken = default); /// /// Get Reprocess transaction result /// @@ -963,10 +967,11 @@ public async System.Threading.Tasks.Task ApiV2Tra /// Thrown when fails to make API call /// Transaction id /// + /// Get processed values from storage in case transaction has already processed. (optional, default to false) /// TransactionProcessResult - public TransactionProcessResult ApiV2TransactionTransactionIdProcessPost(Guid transactionId, TransactionProcessRequest transactionProcessRequest) + public TransactionProcessResult ApiV2TransactionTransactionIdProcessPost(Guid transactionId, TransactionProcessRequest transactionProcessRequest, bool? useCache = default) { - Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiV2TransactionTransactionIdProcessPostWithHttpInfo(transactionId, transactionProcessRequest); + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = ApiV2TransactionTransactionIdProcessPostWithHttpInfo(transactionId, transactionProcessRequest, useCache); return localVarResponse.Data; } @@ -976,8 +981,9 @@ public TransactionProcessResult ApiV2TransactionTransactionIdProcessPost(Guid tr /// Thrown when fails to make API call /// Transaction id /// + /// Get processed values from storage in case transaction has already processed. (optional, default to false) /// ApiResponse of TransactionProcessResult - public Regula.DocumentReader.WebClient.Client.ApiResponse ApiV2TransactionTransactionIdProcessPostWithHttpInfo(Guid transactionId, TransactionProcessRequest transactionProcessRequest) + public Regula.DocumentReader.WebClient.Client.ApiResponse ApiV2TransactionTransactionIdProcessPostWithHttpInfo(Guid transactionId, TransactionProcessRequest transactionProcessRequest, bool? useCache = default) { // verify the required parameter 'transactionProcessRequest' is set if (transactionProcessRequest == null) @@ -1001,6 +1007,10 @@ public Regula.DocumentReader.WebClient.Client.ApiResponseThrown when fails to make API call /// Transaction id /// + /// Get processed values from storage in case transaction has already processed. (optional, default to false) /// Cancellation Token to cancel the request. /// Task of TransactionProcessResult - public async System.Threading.Tasks.Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default) + public async System.Threading.Tasks.Task ApiV2TransactionTransactionIdProcessPostAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, bool? useCache = default, System.Threading.CancellationToken cancellationToken = default) { - Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(transactionId, transactionProcessRequest, cancellationToken).ConfigureAwait(false); + Regula.DocumentReader.WebClient.Client.ApiResponse localVarResponse = await ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(transactionId, transactionProcessRequest, useCache, cancellationToken).ConfigureAwait(false); return localVarResponse.Data; } @@ -1036,9 +1047,10 @@ public async System.Threading.Tasks.Task ApiV2Transact /// Thrown when fails to make API call /// Transaction id /// + /// Get processed values from storage in case transaction has already processed. (optional, default to false) /// Cancellation Token to cancel the request. /// Task of ApiResponse (TransactionProcessResult) - public async System.Threading.Tasks.Task> ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, System.Threading.CancellationToken cancellationToken = default) + public async System.Threading.Tasks.Task> ApiV2TransactionTransactionIdProcessPostWithHttpInfoAsync(Guid transactionId, TransactionProcessRequest transactionProcessRequest, bool? useCache = default, System.Threading.CancellationToken cancellationToken = default) { // verify the required parameter 'transactionProcessRequest' is set if (transactionProcessRequest == null) @@ -1064,6 +1076,10 @@ public async System.Threading.Tasks.Task ApiV2Transact if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); localVarRequestOptions.PathParameters.Add("transactionId", Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToString(transactionId)); // path parameter + if (useCache != null) + { + localVarRequestOptions.QueryParameters.Add(Regula.DocumentReader.WebClient.Client.ClientUtils.ParameterToMultiMap("", "useCache", useCache)); + } localVarRequestOptions.Data = transactionProcessRequest; diff --git a/src/Regula.DocumentReader.WebClient/Model/DatabaseDocument.cs b/src/Regula.DocumentReader.WebClient/Model/DatabaseDocument.cs new file mode 100644 index 0000000..a16e29f --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DatabaseDocument.cs @@ -0,0 +1,248 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 8.1.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// DatabaseDocument + /// + [DataContract(Name = "DatabaseDocument")] + public partial class DatabaseDocument : IValidatableObject + { + + /// + /// Gets or Sets DocType + /// + [DataMember(Name = "doc_type", IsRequired = true, EmitDefaultValue = true)] + public DocumentType DocType { get; set; } + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DatabaseDocument() { } + /// + /// Initializes a new instance of the class. + /// + /// Whether the document has a barcode. (required). + /// Country name. (required). + /// Date when the document description was created in the database. (required). + /// docType (required). + /// Document name. (required). + /// The presence of graphic fields in the document. (required). + /// Document code. (required). + /// The document has an MRZ. (required). + /// Country region.. + /// The document has an RFID chip. (required). + /// The presence of text fields in the document. (required). + /// Date when the document description was updated in the database. (required). + /// The year when the document was issued.. + /// Guardian country.. + /// Whether the document is no longer in circulation.. + public DatabaseDocument(bool barcodeFields = default(bool), string country = default(string), string createad = default(string), DocumentType docType = default(DocumentType), string document = default(string), bool graphicFields = default(bool), int id = default(int), bool mrz = default(bool), string region = default(string), bool rfidChip = default(bool), bool textFields = default(bool), string updated = default(string), string year = default(string), string sovereignty = default(string), bool deprecated = default(bool)) + { + this.BarcodeFields = barcodeFields; + // to ensure "country" is required (not null) + if (country == null) + { + throw new ArgumentNullException("country is a required property for DatabaseDocument and cannot be null"); + } + this.Country = country; + // to ensure "createad" is required (not null) + if (createad == null) + { + throw new ArgumentNullException("createad is a required property for DatabaseDocument and cannot be null"); + } + this.Createad = createad; + this.DocType = docType; + // to ensure "document" is required (not null) + if (document == null) + { + throw new ArgumentNullException("document is a required property for DatabaseDocument and cannot be null"); + } + this.Document = document; + this.GraphicFields = graphicFields; + this.Id = id; + this.Mrz = mrz; + this.RfidChip = rfidChip; + this.TextFields = textFields; + // to ensure "updated" is required (not null) + if (updated == null) + { + throw new ArgumentNullException("updated is a required property for DatabaseDocument and cannot be null"); + } + this.Updated = updated; + this.Region = region; + this.Year = year; + this.Sovereignty = sovereignty; + this.Deprecated = deprecated; + } + + /// + /// Whether the document has a barcode. + /// + /// Whether the document has a barcode. + [DataMember(Name = "barcode_fields", IsRequired = true, EmitDefaultValue = true)] + public bool BarcodeFields { get; set; } + + /// + /// Country name. + /// + /// Country name. + [DataMember(Name = "country", IsRequired = true, EmitDefaultValue = true)] + public string Country { get; set; } + + /// + /// Date when the document description was created in the database. + /// + /// Date when the document description was created in the database. + [DataMember(Name = "createad", IsRequired = true, EmitDefaultValue = true)] + public string Createad { get; set; } + + /// + /// Document name. + /// + /// Document name. + [DataMember(Name = "document", IsRequired = true, EmitDefaultValue = true)] + public string Document { get; set; } + + /// + /// The presence of graphic fields in the document. + /// + /// The presence of graphic fields in the document. + [DataMember(Name = "graphic_fields", IsRequired = true, EmitDefaultValue = true)] + public bool GraphicFields { get; set; } + + /// + /// Document code. + /// + /// Document code. + [DataMember(Name = "id", IsRequired = true, EmitDefaultValue = true)] + public int Id { get; set; } + + /// + /// The document has an MRZ. + /// + /// The document has an MRZ. + [DataMember(Name = "mrz", IsRequired = true, EmitDefaultValue = true)] + public bool Mrz { get; set; } + + /// + /// Country region. + /// + /// Country region. + [DataMember(Name = "region", EmitDefaultValue = false)] + public string? Region { get; set; } + + /// + /// The document has an RFID chip. + /// + /// The document has an RFID chip. + [DataMember(Name = "rfid_chip", IsRequired = true, EmitDefaultValue = true)] + public bool RfidChip { get; set; } + + /// + /// The presence of text fields in the document. + /// + /// The presence of text fields in the document. + [DataMember(Name = "text_fields", IsRequired = true, EmitDefaultValue = true)] + public bool TextFields { get; set; } + + /// + /// Date when the document description was updated in the database. + /// + /// Date when the document description was updated in the database. + [DataMember(Name = "updated", IsRequired = true, EmitDefaultValue = true)] + public string Updated { get; set; } + + /// + /// The year when the document was issued. + /// + /// The year when the document was issued. + [DataMember(Name = "year", EmitDefaultValue = false)] + public string? Year { get; set; } + + /// + /// Guardian country. + /// + /// Guardian country. + [DataMember(Name = "sovereignty", EmitDefaultValue = false)] + public string? Sovereignty { get; set; } + + /// + /// Whether the document is no longer in circulation. + /// + /// Whether the document is no longer in circulation. + [DataMember(Name = "deprecated", EmitDefaultValue = false)] + public bool? Deprecated { 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 DatabaseDocument {\n"); + sb.Append(" BarcodeFields: ").Append(BarcodeFields).Append("\n"); + sb.Append(" Country: ").Append(Country).Append("\n"); + sb.Append(" Createad: ").Append(Createad).Append("\n"); + sb.Append(" DocType: ").Append(DocType).Append("\n"); + sb.Append(" Document: ").Append(Document).Append("\n"); + sb.Append(" GraphicFields: ").Append(GraphicFields).Append("\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Mrz: ").Append(Mrz).Append("\n"); + sb.Append(" Region: ").Append(Region).Append("\n"); + sb.Append(" RfidChip: ").Append(RfidChip).Append("\n"); + sb.Append(" TextFields: ").Append(TextFields).Append("\n"); + sb.Append(" Updated: ").Append(Updated).Append("\n"); + sb.Append(" Year: ").Append(Year).Append("\n"); + sb.Append(" Sovereignty: ").Append(Sovereignty).Append("\n"); + sb.Append(" Deprecated: ").Append(Deprecated).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 + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Regula.DocumentReader.WebClient/Model/DatabaseDocumentList.cs b/src/Regula.DocumentReader.WebClient/Model/DatabaseDocumentList.cs new file mode 100644 index 0000000..08d41c9 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DatabaseDocumentList.cs @@ -0,0 +1,94 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 3.5+ client * [C#](https://github.com/regulaforensics/DocumentReader-web-csharp-client) client for .NET & .NET Core + * + * The version of the OpenAPI document: 8.1.0 + * Generated by: https://github.com/openapitools/openapi-generator.git + */ + + +using System; +using System.Collections; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using System.IO; +using System.Runtime.Serialization; +using System.Text; +using System.Text.RegularExpressions; +using Newtonsoft.Json; +using Newtonsoft.Json.Converters; +using Newtonsoft.Json.Linq; +using System.ComponentModel.DataAnnotations; +using FileParameter = Regula.DocumentReader.WebClient.Client.FileParameter; +using OpenAPIDateConverter = Regula.DocumentReader.WebClient.Client.OpenAPIDateConverter; + +namespace Regula.DocumentReader.WebClient.Model +{ + /// + /// DatabaseDocumentList + /// + [DataContract(Name = "DatabaseDocumentList")] + public partial class DatabaseDocumentList : IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DatabaseDocumentList() { } + /// + /// Initializes a new instance of the class. + /// + /// The list of documents stored in the database. (required). + public DatabaseDocumentList(List items = default(List)) + { + // to ensure "items" is required (not null) + if (items == null) + { + throw new ArgumentNullException("items is a required property for DatabaseDocumentList and cannot be null"); + } + this.Items = items; + } + + /// + /// The list of documents stored in the database. + /// + /// The list of documents stored in the database. + [DataMember(Name = "items", IsRequired = true, EmitDefaultValue = true)] + public List Items { 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 DatabaseDocumentList {\n"); + sb.Append(" Items: ").Append(Items).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 + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +} diff --git a/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs b/src/Regula.DocumentReader.WebClient/Model/EncryptedRCLItem.cs index ee8439c..970acd0 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@5083a7e + [B@31f29086 */ [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 93c4c2b..6e4a520 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@5083a7e + [B@31f29086 */ [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 38639d9..b2a51e8 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@6f333983 + [B@1a38f94 */ [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 ed75b4d..db6cf7e 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@6f333983 + [B@1a38f94 */ [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 97c982f..53342a2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs +++ b/src/Regula.DocumentReader.WebClient/Model/ProcessParams.cs @@ -141,7 +141,8 @@ protected ProcessParams() { } /// Limits the number of pages to be processed from a PDF file.. /// This parameter if enabled will ignore the minimum barcode resolution needed to start processing.. /// When enabled, this parameter marks security checks that don’t meet minimum requirements as 'Failed' (instead of 'WasNotDone'), which causes the overall security status to be 'Failed'.. - 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), bool strictDLCategoryExpiry = default(bool), bool generateAlpha2Codes = default(bool), int pdfPagesLimit = default(int), bool disableAuthResolutionFilter = default(bool), bool strictSecurityChecks = default(bool)) + /// Allows transliteration to be turned on or off; by default, it is enabled.. + 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), bool strictDLCategoryExpiry = default(bool), bool generateAlpha2Codes = default(bool), int pdfPagesLimit = default(int), bool disableAuthResolutionFilter = default(bool), bool strictSecurityChecks = default(bool), bool returnTransliteratedFields = default(bool)) { this.Scenario = scenario; this.GenerateDTCVC = generateDTCVC; @@ -208,6 +209,7 @@ protected ProcessParams() { } this.PdfPagesLimit = pdfPagesLimit; this.DisableAuthResolutionFilter = disableAuthResolutionFilter; this.StrictSecurityChecks = strictSecurityChecks; + this.ReturnTransliteratedFields = returnTransliteratedFields; } /// @@ -625,6 +627,13 @@ protected ProcessParams() { } [DataMember(Name = "strictSecurityChecks", EmitDefaultValue = false)] public bool? StrictSecurityChecks { get; set; } + /// + /// Allows transliteration to be turned on or off; by default, it is enabled. + /// + /// Allows transliteration to be turned on or off; by default, it is enabled. + [DataMember(Name = "returnTransliteratedFields", EmitDefaultValue = false)] + public bool? ReturnTransliteratedFields { get; set; } + /// /// Returns the string presentation of the object /// @@ -698,6 +707,7 @@ public override string ToString() sb.Append(" PdfPagesLimit: ").Append(PdfPagesLimit).Append("\n"); sb.Append(" DisableAuthResolutionFilter: ").Append(DisableAuthResolutionFilter).Append("\n"); sb.Append(" StrictSecurityChecks: ").Append(StrictSecurityChecks).Append("\n"); + sb.Append(" ReturnTransliteratedFields: ").Append(ReturnTransliteratedFields).Append("\n"); sb.Append("}\n"); return sb.ToString(); }