/*
 * 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>
    /// GetVoterResponseEntity
    /// </summary>
    [DataContract(Name = "GetVoterResponse_entity")]
    public partial class GetVoterResponseEntity : IEquatable<GetVoterResponseEntity>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetVoterResponseEntity" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected GetVoterResponseEntity() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="GetVoterResponseEntity" /> class.
        /// </summary>
        /// <param name="voterNumber">voterNumber (required).</param>
        /// <param name="firstName">firstName (required).</param>
        /// <param name="lastName">lastName (required).</param>
        /// <param name="gender">gender (required).</param>
        /// <param name="village">village (required).</param>
        /// <param name="district">district (required).</param>
        /// <param name="constituency">constituency (required).</param>
        /// <param name="subCounty">subCounty (required).</param>
        /// <param name="parish">parish (required).</param>
        /// <param name="pollingStation">pollingStation (required).</param>
        /// <param name="isFirstNameMatch">isFirstNameMatch (required).</param>
        /// <param name="isLastNameMatch">isLastNameMatch (required).</param>
        public GetVoterResponseEntity(string voterNumber = default(string), string firstName = default(string), string lastName = default(string), string gender = default(string), string village = default(string), string district = default(string), string constituency = default(string), string subCounty = default(string), string parish = default(string), string pollingStation = default(string), bool isFirstNameMatch = default(bool), bool isLastNameMatch = default(bool))
        {
            // to ensure "voterNumber" is required (not null)
            if (voterNumber == null)
            {
                throw new ArgumentNullException("voterNumber is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.VoterNumber = voterNumber;
            // to ensure "firstName" is required (not null)
            if (firstName == null)
            {
                throw new ArgumentNullException("firstName is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.FirstName = firstName;
            // to ensure "lastName" is required (not null)
            if (lastName == null)
            {
                throw new ArgumentNullException("lastName is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.LastName = lastName;
            // to ensure "gender" is required (not null)
            if (gender == null)
            {
                throw new ArgumentNullException("gender is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.Gender = gender;
            // to ensure "village" is required (not null)
            if (village == null)
            {
                throw new ArgumentNullException("village is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.Village = village;
            // to ensure "district" is required (not null)
            if (district == null)
            {
                throw new ArgumentNullException("district is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.District = district;
            // to ensure "constituency" is required (not null)
            if (constituency == null)
            {
                throw new ArgumentNullException("constituency is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.Constituency = constituency;
            // to ensure "subCounty" is required (not null)
            if (subCounty == null)
            {
                throw new ArgumentNullException("subCounty is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.SubCounty = subCounty;
            // to ensure "parish" is required (not null)
            if (parish == null)
            {
                throw new ArgumentNullException("parish is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.Parish = parish;
            // to ensure "pollingStation" is required (not null)
            if (pollingStation == null)
            {
                throw new ArgumentNullException("pollingStation is a required property for GetVoterResponseEntity and cannot be null");
            }
            this.PollingStation = pollingStation;
            this.IsFirstNameMatch = isFirstNameMatch;
            this.IsLastNameMatch = isLastNameMatch;
        }

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

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

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

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

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets IsFirstNameMatch
        /// </summary>
        [DataMember(Name = "is_first_name_match", IsRequired = true, EmitDefaultValue = true)]
        public bool IsFirstNameMatch { get; set; }

        /// <summary>
        /// Gets or Sets IsLastNameMatch
        /// </summary>
        [DataMember(Name = "is_last_name_match", IsRequired = true, EmitDefaultValue = true)]
        public bool IsLastNameMatch { 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 GetVoterResponseEntity {\n");
            sb.Append("  VoterNumber: ").Append(VoterNumber).Append("\n");
            sb.Append("  FirstName: ").Append(FirstName).Append("\n");
            sb.Append("  LastName: ").Append(LastName).Append("\n");
            sb.Append("  Gender: ").Append(Gender).Append("\n");
            sb.Append("  Village: ").Append(Village).Append("\n");
            sb.Append("  District: ").Append(District).Append("\n");
            sb.Append("  Constituency: ").Append(Constituency).Append("\n");
            sb.Append("  SubCounty: ").Append(SubCounty).Append("\n");
            sb.Append("  Parish: ").Append(Parish).Append("\n");
            sb.Append("  PollingStation: ").Append(PollingStation).Append("\n");
            sb.Append("  IsFirstNameMatch: ").Append(IsFirstNameMatch).Append("\n");
            sb.Append("  IsLastNameMatch: ").Append(IsLastNameMatch).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 GetVoterResponseEntity);
        }

        /// <summary>
        /// Returns true if GetVoterResponseEntity instances are equal
        /// </summary>
        /// <param name="input">Instance of GetVoterResponseEntity to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GetVoterResponseEntity input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.VoterNumber == input.VoterNumber ||
                    (this.VoterNumber != null &&
                    this.VoterNumber.Equals(input.VoterNumber))
                ) && 
                (
                    this.FirstName == input.FirstName ||
                    (this.FirstName != null &&
                    this.FirstName.Equals(input.FirstName))
                ) && 
                (
                    this.LastName == input.LastName ||
                    (this.LastName != null &&
                    this.LastName.Equals(input.LastName))
                ) && 
                (
                    this.Gender == input.Gender ||
                    (this.Gender != null &&
                    this.Gender.Equals(input.Gender))
                ) && 
                (
                    this.Village == input.Village ||
                    (this.Village != null &&
                    this.Village.Equals(input.Village))
                ) && 
                (
                    this.District == input.District ||
                    (this.District != null &&
                    this.District.Equals(input.District))
                ) && 
                (
                    this.Constituency == input.Constituency ||
                    (this.Constituency != null &&
                    this.Constituency.Equals(input.Constituency))
                ) && 
                (
                    this.SubCounty == input.SubCounty ||
                    (this.SubCounty != null &&
                    this.SubCounty.Equals(input.SubCounty))
                ) && 
                (
                    this.Parish == input.Parish ||
                    (this.Parish != null &&
                    this.Parish.Equals(input.Parish))
                ) && 
                (
                    this.PollingStation == input.PollingStation ||
                    (this.PollingStation != null &&
                    this.PollingStation.Equals(input.PollingStation))
                ) && 
                (
                    this.IsFirstNameMatch == input.IsFirstNameMatch ||
                    this.IsFirstNameMatch.Equals(input.IsFirstNameMatch)
                ) && 
                (
                    this.IsLastNameMatch == input.IsLastNameMatch ||
                    this.IsLastNameMatch.Equals(input.IsLastNameMatch)
                );
        }

        /// <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.VoterNumber != null)
                {
                    hashCode = (hashCode * 59) + this.VoterNumber.GetHashCode();
                }
                if (this.FirstName != null)
                {
                    hashCode = (hashCode * 59) + this.FirstName.GetHashCode();
                }
                if (this.LastName != null)
                {
                    hashCode = (hashCode * 59) + this.LastName.GetHashCode();
                }
                if (this.Gender != null)
                {
                    hashCode = (hashCode * 59) + this.Gender.GetHashCode();
                }
                if (this.Village != null)
                {
                    hashCode = (hashCode * 59) + this.Village.GetHashCode();
                }
                if (this.District != null)
                {
                    hashCode = (hashCode * 59) + this.District.GetHashCode();
                }
                if (this.Constituency != null)
                {
                    hashCode = (hashCode * 59) + this.Constituency.GetHashCode();
                }
                if (this.SubCounty != null)
                {
                    hashCode = (hashCode * 59) + this.SubCounty.GetHashCode();
                }
                if (this.Parish != null)
                {
                    hashCode = (hashCode * 59) + this.Parish.GetHashCode();
                }
                if (this.PollingStation != null)
                {
                    hashCode = (hashCode * 59) + this.PollingStation.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.IsFirstNameMatch.GetHashCode();
                hashCode = (hashCode * 59) + this.IsLastNameMatch.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;
        }
    }

}
