/*
 * 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>
    /// GetTinResponseEntity
    /// </summary>
    [DataContract(Name = "GetTinResponse_entity")]
    public partial class GetTinResponseEntity : IEquatable<GetTinResponseEntity>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetTinResponseEntity" /> class.
        /// </summary>
        /// <param name="search">search.</param>
        /// <param name="taxpayerName">taxpayerName.</param>
        /// <param name="cACRegNo">cACRegNo.</param>
        /// <param name="fIRSTIN">fIRSTIN.</param>
        /// <param name="jITTIN">jITTIN.</param>
        /// <param name="taxOffice">taxOffice.</param>
        /// <param name="phoneNo">phoneNo.</param>
        /// <param name="email">email.</param>
        public GetTinResponseEntity(string search = default(string), string taxpayerName = default(string), string cACRegNo = default(string), string fIRSTIN = default(string), string jITTIN = default(string), string taxOffice = default(string), string phoneNo = default(string), string email = default(string))
        {
            this.Search = search;
            this.TaxpayerName = taxpayerName;
            this.CACRegNo = cACRegNo;
            this.FIRSTIN = fIRSTIN;
            this.JITTIN = jITTIN;
            this.TaxOffice = taxOffice;
            this.PhoneNo = phoneNo;
            this.Email = email;
        }

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

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets Email
        /// </summary>
        [DataMember(Name = "Email", EmitDefaultValue = false)]
        public string Email { 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 GetTinResponseEntity {\n");
            sb.Append("  Search: ").Append(Search).Append("\n");
            sb.Append("  TaxpayerName: ").Append(TaxpayerName).Append("\n");
            sb.Append("  CACRegNo: ").Append(CACRegNo).Append("\n");
            sb.Append("  FIRSTIN: ").Append(FIRSTIN).Append("\n");
            sb.Append("  JITTIN: ").Append(JITTIN).Append("\n");
            sb.Append("  TaxOffice: ").Append(TaxOffice).Append("\n");
            sb.Append("  PhoneNo: ").Append(PhoneNo).Append("\n");
            sb.Append("  Email: ").Append(Email).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 GetTinResponseEntity);
        }

        /// <summary>
        /// Returns true if GetTinResponseEntity instances are equal
        /// </summary>
        /// <param name="input">Instance of GetTinResponseEntity to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GetTinResponseEntity input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Search == input.Search ||
                    (this.Search != null &&
                    this.Search.Equals(input.Search))
                ) && 
                (
                    this.TaxpayerName == input.TaxpayerName ||
                    (this.TaxpayerName != null &&
                    this.TaxpayerName.Equals(input.TaxpayerName))
                ) && 
                (
                    this.CACRegNo == input.CACRegNo ||
                    (this.CACRegNo != null &&
                    this.CACRegNo.Equals(input.CACRegNo))
                ) && 
                (
                    this.FIRSTIN == input.FIRSTIN ||
                    (this.FIRSTIN != null &&
                    this.FIRSTIN.Equals(input.FIRSTIN))
                ) && 
                (
                    this.JITTIN == input.JITTIN ||
                    (this.JITTIN != null &&
                    this.JITTIN.Equals(input.JITTIN))
                ) && 
                (
                    this.TaxOffice == input.TaxOffice ||
                    (this.TaxOffice != null &&
                    this.TaxOffice.Equals(input.TaxOffice))
                ) && 
                (
                    this.PhoneNo == input.PhoneNo ||
                    (this.PhoneNo != null &&
                    this.PhoneNo.Equals(input.PhoneNo))
                ) && 
                (
                    this.Email == input.Email ||
                    (this.Email != null &&
                    this.Email.Equals(input.Email))
                );
        }

        /// <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.Search != null)
                {
                    hashCode = (hashCode * 59) + this.Search.GetHashCode();
                }
                if (this.TaxpayerName != null)
                {
                    hashCode = (hashCode * 59) + this.TaxpayerName.GetHashCode();
                }
                if (this.CACRegNo != null)
                {
                    hashCode = (hashCode * 59) + this.CACRegNo.GetHashCode();
                }
                if (this.FIRSTIN != null)
                {
                    hashCode = (hashCode * 59) + this.FIRSTIN.GetHashCode();
                }
                if (this.JITTIN != null)
                {
                    hashCode = (hashCode * 59) + this.JITTIN.GetHashCode();
                }
                if (this.TaxOffice != null)
                {
                    hashCode = (hashCode * 59) + this.TaxOffice.GetHashCode();
                }
                if (this.PhoneNo != null)
                {
                    hashCode = (hashCode * 59) + this.PhoneNo.GetHashCode();
                }
                if (this.Email != null)
                {
                    hashCode = (hashCode * 59) + this.Email.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;
        }
    }

}
