diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs index 4615034..1aef2f2 100644 --- a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2.cs @@ -33,66 +33,155 @@ 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)) + [JsonConstructorAttribute] + protected DeviceInfo2() { } + /// + /// 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 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), DeviceInfo2DocumentsDatabase documentsDatabase = default(DeviceInfo2DocumentsDatabase)) { - this.App = app; + // to ensure "app" is required (not null) + if (app == null) + { + throw new InvalidDataException("app is a required property for DeviceInfo2 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 DeviceInfo2 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 DeviceInfo2 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 DeviceInfo2 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 DeviceInfo2 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 DeviceInfo2 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 DeviceInfo2 and cannot be null"); + } + else + { + this.Version = version; + } + this.Version = version; + this.DocumentsDatabase = documentsDatabase; } /// - /// Gets or Sets App + /// Application name. /// - [DataMember(Name="app", EmitDefaultValue=false)] + /// Application name. + [DataMember(Name="app", EmitDefaultValue=true)] public string App { get; set; } /// - /// Gets or Sets LicenseId + /// Unique license identifier. /// - [DataMember(Name="licenseId", EmitDefaultValue=false)] + /// Unique license identifier. + [DataMember(Name="licenseId", EmitDefaultValue=true)] public string LicenseId { get; set; } /// - /// Gets or Sets LicenseType + /// License type. /// - [DataMember(Name="licenseType", EmitDefaultValue=false)] + /// License type. + [DataMember(Name="licenseType", EmitDefaultValue=true)] public string LicenseType { get; set; } /// - /// Gets or Sets LicenseSerial + /// License serial number. /// - [DataMember(Name="licenseSerial", EmitDefaultValue=false)] + /// License serial number. + [DataMember(Name="licenseSerial", EmitDefaultValue=true)] public string LicenseSerial { get; set; } /// - /// Gets or Sets LicenseValidUntil + /// License validity date. /// - [DataMember(Name="licenseValidUntil", EmitDefaultValue=false)] - public DateTime LicenseValidUntil { get; set; } + /// License validity date. + [DataMember(Name="licenseValidUntil", EmitDefaultValue=true)] + public DateTime? LicenseValidUntil { get; set; } /// - /// Gets or Sets Scenarios + /// List of supported scenarios. /// - [DataMember(Name="scenarios", EmitDefaultValue=false)] + /// List of supported scenarios. + [DataMember(Name="scenarios", EmitDefaultValue=true)] public List Scenarios { get; set; } /// - /// Gets or Sets Version + /// Product version. /// - [DataMember(Name="version", EmitDefaultValue=false)] + /// Product version. + [DataMember(Name="version", EmitDefaultValue=true)] public string Version { get; set; } + /// + /// Gets or Sets DocumentsDatabase + /// + [DataMember(Name="documentsDatabase", EmitDefaultValue=false)] + public DeviceInfo2DocumentsDatabase DocumentsDatabase { get; set; } + /// /// Returns the string presentation of the object /// @@ -108,6 +197,7 @@ public override string ToString() sb.Append(" LicenseValidUntil: ").Append(LicenseValidUntil).Append("\n"); sb.Append(" Scenarios: ").Append(Scenarios).Append("\n"); sb.Append(" Version: ").Append(Version).Append("\n"); + sb.Append(" DocumentsDatabase: ").Append(DocumentsDatabase).Append("\n"); sb.Append("}\n"); return sb.ToString(); } @@ -177,6 +267,11 @@ public bool Equals(DeviceInfo2 input) this.Version == input.Version || (this.Version != null && this.Version.Equals(input.Version)) + ) && + ( + this.DocumentsDatabase == input.DocumentsDatabase || + (this.DocumentsDatabase != null && + this.DocumentsDatabase.Equals(input.DocumentsDatabase)) ); } @@ -203,6 +298,8 @@ public override int GetHashCode() 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; } } diff --git a/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2DocumentsDatabase.cs b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2DocumentsDatabase.cs new file mode 100644 index 0000000..43f1af5 --- /dev/null +++ b/src/Regula.DocumentReader.WebClient/Model/DeviceInfo2DocumentsDatabase.cs @@ -0,0 +1,222 @@ +/* + * Regula Document Reader Web API + * + * Documents recognition as easy as reading two bytes. # Clients: * [JavaScript](https://github.com/regulaforensics/DocumentReader-web-js-client) client for the browser and node.js based on axios * [Java](https://github.com/regulaforensics/DocumentReader-web-java-client) client compatible with jvm and android * [Python](https://github.com/regulaforensics/DocumentReader-web-python-client) 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 +{ + /// + /// Database information. + /// + [DataContract] + public partial class DeviceInfo2DocumentsDatabase : IEquatable, IValidatableObject + { + /// + /// Initializes a new instance of the class. + /// + [JsonConstructorAttribute] + protected DeviceInfo2DocumentsDatabase() { } + /// + /// 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 DeviceInfo2DocumentsDatabase(string id = default(string), string version = default(string), DateTime? exportDate = default(DateTime?), string description = default(string)) + { + // to ensure "id" is required (not null) + if (id == null) + { + throw new InvalidDataException("id is a required property for DeviceInfo2DocumentsDatabase 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 DeviceInfo2DocumentsDatabase 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 DeviceInfo2DocumentsDatabase 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 DeviceInfo2DocumentsDatabase and cannot be null"); + } + else + { + this.Description = description; + } + + this.Description = description; + } + + /// + /// Database identifier. + /// + /// Database identifier. + [DataMember(Name="id", EmitDefaultValue=true)] + public string Id { get; set; } + + /// + /// Database version. + /// + /// Database version. + [DataMember(Name="version", EmitDefaultValue=true)] + public string Version { get; set; } + + /// + /// Date of database creation. + /// + /// Date of database creation. + [DataMember(Name="exportDate", EmitDefaultValue=true)] + [JsonConverter(typeof(OpenAPIDateConverter))] + public DateTime? 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; } + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class DeviceInfo2DocumentsDatabase {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Version: ").Append(Version).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 + /// + /// 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 DeviceInfo2DocumentsDatabase); + } + + /// + /// Returns true if DeviceInfo2DocumentsDatabase instances are equal + /// + /// Instance of DeviceInfo2DocumentsDatabase to be compared + /// Boolean + public bool Equals(DeviceInfo2DocumentsDatabase input) + { + 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)) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + 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; + } + } + + /// + /// To validate all properties of the instance + /// + /// Validation context + /// Validation Result + IEnumerable IValidatableObject.Validate(ValidationContext validationContext) + { + yield break; + } + } + +}