<filename>csharp/src/Dojah.Net/Model/AnalyzeDocumentResponseEntityDocumentType.cs/*
 * DOJAH APIs
 *
 * Use Dojah to verify, onboard and manage user identity across Africa!
 *
 * The version of the OpenAPI document: 1.0.0
 * Generated by: https://konfigthis.com
 */


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 OpenAPIDateConverter = Dojah.Net.Client.OpenAPIDateConverter;

namespace Dojah.Net.Model
{
    /// <summary>
    /// AnalyzeDocumentResponseEntityDocumentType
    /// </summary>
    [DataContract(Name = "AnalyzeDocumentResponse_entity_document_type")]
    public partial class AnalyzeDocumentResponseEntityDocumentType : IEquatable<AnalyzeDocumentResponseEntityDocumentType>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AnalyzeDocumentResponseEntityDocumentType" /> class.
        /// </summary>
        /// <param name="documentName">documentName.</param>
        /// <param name="documentCountryName">documentCountryName.</param>
        /// <param name="documentCountryCode">documentCountryCode.</param>
        /// <param name="documentTypeId">documentTypeId.</param>
        /// <param name="documentYear">documentYear.</param>
        public AnalyzeDocumentResponseEntityDocumentType(string documentName = default(string), string documentCountryName = default(string), string documentCountryCode = default(string), decimal documentTypeId = default(decimal), string documentYear = default(string))
        {
            this.DocumentName = documentName;
            this.DocumentCountryName = documentCountryName;
            this.DocumentCountryCode = documentCountryCode;
            this.DocumentTypeId = documentTypeId;
            this.DocumentYear = documentYear;
        }

        /// <summary>
        /// Gets or Sets DocumentName
        /// </summary>
        [DataMember(Name = "document_name", EmitDefaultValue = false)]
        public string DocumentName { get; set; }

        /// <summary>
        /// Gets or Sets DocumentCountryName
        /// </summary>
        [DataMember(Name = "document_country_name", EmitDefaultValue = false)]
        public string DocumentCountryName { get; set; }

        /// <summary>
        /// Gets or Sets DocumentCountryCode
        /// </summary>
        [DataMember(Name = "document_country_code", EmitDefaultValue = false)]
        public string DocumentCountryCode { get; set; }

        /// <summary>
        /// Gets or Sets DocumentTypeId
        /// </summary>
        [DataMember(Name = "document_type_id", EmitDefaultValue = false)]
        public decimal DocumentTypeId { get; set; }

        /// <summary>
        /// Gets or Sets DocumentYear
        /// </summary>
        [DataMember(Name = "document_year", EmitDefaultValue = false)]
        public string DocumentYear { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class AnalyzeDocumentResponseEntityDocumentType {\n");
            sb.Append("  DocumentName: ").Append(DocumentName).Append("\n");
            sb.Append("  DocumentCountryName: ").Append(DocumentCountryName).Append("\n");
            sb.Append("  DocumentCountryCode: ").Append(DocumentCountryCode).Append("\n");
            sb.Append("  DocumentTypeId: ").Append(DocumentTypeId).Append("\n");
            sb.Append("  DocumentYear: ").Append(DocumentYear).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }

        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
        }

        /// <summary>
        /// Returns true if objects are equal
        /// </summary>
        /// <param name="input">Object to be compared</param>
        /// <returns>Boolean</returns>
        public override bool Equals(object input)
        {
            return this.Equals(input as AnalyzeDocumentResponseEntityDocumentType);
        }

        /// <summary>
        /// Returns true if AnalyzeDocumentResponseEntityDocumentType instances are equal
        /// </summary>
        /// <param name="input">Instance of AnalyzeDocumentResponseEntityDocumentType to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AnalyzeDocumentResponseEntityDocumentType input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.DocumentName == input.DocumentName ||
                    (this.DocumentName != null &&
                    this.DocumentName.Equals(input.DocumentName))
                ) && 
                (
                    this.DocumentCountryName == input.DocumentCountryName ||
                    (this.DocumentCountryName != null &&
                    this.DocumentCountryName.Equals(input.DocumentCountryName))
                ) && 
                (
                    this.DocumentCountryCode == input.DocumentCountryCode ||
                    (this.DocumentCountryCode != null &&
                    this.DocumentCountryCode.Equals(input.DocumentCountryCode))
                ) && 
                (
                    this.DocumentTypeId == input.DocumentTypeId ||
                    this.DocumentTypeId.Equals(input.DocumentTypeId)
                ) && 
                (
                    this.DocumentYear == input.DocumentYear ||
                    (this.DocumentYear != null &&
                    this.DocumentYear.Equals(input.DocumentYear))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                if (this.DocumentName != null)
                {
                    hashCode = (hashCode * 59) + this.DocumentName.GetHashCode();
                }
                if (this.DocumentCountryName != null)
                {
                    hashCode = (hashCode * 59) + this.DocumentCountryName.GetHashCode();
                }
                if (this.DocumentCountryCode != null)
                {
                    hashCode = (hashCode * 59) + this.DocumentCountryCode.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.DocumentTypeId.GetHashCode();
                if (this.DocumentYear != null)
                {
                    hashCode = (hashCode * 59) + this.DocumentYear.GetHashCode();
                }
                return hashCode;
            }
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
