/* 
 * GK application - OmniPOS Service API
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 5.21.1-b03
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.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 SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;

namespace IO.Swagger.Model
{
    /// <summary>
    /// PersonDO &lt;p&gt;A individual of interest to the retail store or retail enterprise.&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO :  IEquatable<ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="languageID">&lt;p&gt;A combination of ISO-639-1 and ISO-3661-1 to denote a language as spoken in a particular country. &lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="salutation">&lt;p&gt;Extra words that don&#39;t form part of the person&#39;s name but are normally printed before the FirstName as a courtesy title. For instance, Mr. Ms., Miss, Dr., Prof. etc. This represents the primary salutation for this Person.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="firstName">&lt;p&gt;A person&#39;s first name. In western cultures, this is the given name, in other cultures it may be the family name.&lt;br /&gt;&lt;/p&gt; (required).</param>
        /// <param name="lastName">&lt;p&gt;A person&#39;s last name. In western cultures, this is the family (or patronymic) name, in other cultures it may be the given name.&lt;br /&gt;&lt;/p&gt; (required).</param>
        /// <param name="birthYearNumber">&lt;p&gt;The year part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="birthMonthNumber">&lt;p&gt;A number in the range 1-12 denoting the month part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="birthDayNumber">&lt;p&gt;A number in the range 1-31denoting the day of the month part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="genderType">&lt;p&gt;A code for specifying a person&#39;s gender.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom05">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom03">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom02">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom04">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom01">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        public ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO(ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDOKey key = default(ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDOKey), string languageID = default(string), string salutation = default(string), string firstName = default(string), string lastName = default(string), int? birthYearNumber = default(int?), int? birthMonthNumber = default(int?), int? birthDayNumber = default(int?), string genderType = default(string), string xxcustom05 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), string xxcustom01 = default(string))
        {
            // to ensure "key" is required (not null)
            if (key == null)
            {
                throw new InvalidDataException("key is a required property for ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            // to ensure "firstName" is required (not null)
            if (firstName == null)
            {
                throw new InvalidDataException("firstName is a required property for ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO and cannot be null");
            }
            else
            {
                this.FirstName = firstName;
            }
            // to ensure "lastName" is required (not null)
            if (lastName == null)
            {
                throw new InvalidDataException("lastName is a required property for ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO and cannot be null");
            }
            else
            {
                this.LastName = lastName;
            }
            this.LanguageID = languageID;
            this.Salutation = salutation;
            this.BirthYearNumber = birthYearNumber;
            this.BirthMonthNumber = birthMonthNumber;
            this.BirthDayNumber = birthDayNumber;
            this.GenderType = genderType;
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            this.Xxcustom01 = xxcustom01;
        }
        
        /// <summary>
        /// &lt;p&gt;Getter for inner key class.&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Getter for inner key class.&lt;/p&gt;</value>
        [DataMember(Name="key", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDOKey Key { get; set; }

        /// <summary>
        /// &lt;p&gt;A combination of ISO-639-1 and ISO-3661-1 to denote a language as spoken in a particular country. &lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A combination of ISO-639-1 and ISO-3661-1 to denote a language as spoken in a particular country. &lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="languageID", EmitDefaultValue=false)]
        public string LanguageID { get; set; }

        /// <summary>
        /// &lt;p&gt;Extra words that don&#39;t form part of the person&#39;s name but are normally printed before the FirstName as a courtesy title. For instance, Mr. Ms., Miss, Dr., Prof. etc. This represents the primary salutation for this Person.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Extra words that don&#39;t form part of the person&#39;s name but are normally printed before the FirstName as a courtesy title. For instance, Mr. Ms., Miss, Dr., Prof. etc. This represents the primary salutation for this Person.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="salutation", EmitDefaultValue=false)]
        public string Salutation { get; set; }

        /// <summary>
        /// &lt;p&gt;A person&#39;s first name. In western cultures, this is the given name, in other cultures it may be the family name.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A person&#39;s first name. In western cultures, this is the given name, in other cultures it may be the family name.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="firstName", EmitDefaultValue=false)]
        public string FirstName { get; set; }

        /// <summary>
        /// &lt;p&gt;A person&#39;s last name. In western cultures, this is the family (or patronymic) name, in other cultures it may be the given name.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A person&#39;s last name. In western cultures, this is the family (or patronymic) name, in other cultures it may be the given name.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="lastName", EmitDefaultValue=false)]
        public string LastName { get; set; }

        /// <summary>
        /// &lt;p&gt;The year part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The year part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="birthYearNumber", EmitDefaultValue=false)]
        public int? BirthYearNumber { get; set; }

        /// <summary>
        /// &lt;p&gt;A number in the range 1-12 denoting the month part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A number in the range 1-12 denoting the month part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="birthMonthNumber", EmitDefaultValue=false)]
        public int? BirthMonthNumber { get; set; }

        /// <summary>
        /// &lt;p&gt;A number in the range 1-31denoting the day of the month part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A number in the range 1-31denoting the day of the month part of the Person&#39;s date of birth.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="birthDayNumber", EmitDefaultValue=false)]
        public int? BirthDayNumber { get; set; }

        /// <summary>
        /// &lt;p&gt;A code for specifying a person&#39;s gender.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A code for specifying a person&#39;s gender.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="genderType", EmitDefaultValue=false)]
        public string GenderType { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom05", EmitDefaultValue=false)]
        public string Xxcustom05 { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom03", EmitDefaultValue=false)]
        public string Xxcustom03 { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom02", EmitDefaultValue=false)]
        public string Xxcustom02 { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom04", EmitDefaultValue=false)]
        public string Xxcustom04 { get; set; }

        /// <summary>
        /// &lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom01", EmitDefaultValue=false)]
        public string Xxcustom01 { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("class ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  LanguageID: ").Append(LanguageID).Append("\n");
            sb.Append("  Salutation: ").Append(Salutation).Append("\n");
            sb.Append("  FirstName: ").Append(FirstName).Append("\n");
            sb.Append("  LastName: ").Append(LastName).Append("\n");
            sb.Append("  BirthYearNumber: ").Append(BirthYearNumber).Append("\n");
            sb.Append("  BirthMonthNumber: ").Append(BirthMonthNumber).Append("\n");
            sb.Append("  BirthDayNumber: ").Append(BirthDayNumber).Append("\n");
            sb.Append("  GenderType: ").Append(GenderType).Append("\n");
            sb.Append("  Xxcustom05: ").Append(Xxcustom05).Append("\n");
            sb.Append("  Xxcustom03: ").Append(Xxcustom03).Append("\n");
            sb.Append("  Xxcustom02: ").Append(Xxcustom02).Append("\n");
            sb.Append("  Xxcustom04: ").Append(Xxcustom04).Append("\n");
            sb.Append("  Xxcustom01: ").Append(Xxcustom01).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 JsonConvert.SerializeObject(this, 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 ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO);
        }

        /// <summary>
        /// Returns true if ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO instances are equal
        /// </summary>
        /// <param name="input">Instance of ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO input)
        {
            if (input == null)
                return false;

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.LanguageID == input.LanguageID ||
                    (this.LanguageID != null &&
                    this.LanguageID.Equals(input.LanguageID))
                ) && 
                (
                    this.Salutation == input.Salutation ||
                    (this.Salutation != null &&
                    this.Salutation.Equals(input.Salutation))
                ) && 
                (
                    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.BirthYearNumber == input.BirthYearNumber ||
                    (this.BirthYearNumber != null &&
                    this.BirthYearNumber.Equals(input.BirthYearNumber))
                ) && 
                (
                    this.BirthMonthNumber == input.BirthMonthNumber ||
                    (this.BirthMonthNumber != null &&
                    this.BirthMonthNumber.Equals(input.BirthMonthNumber))
                ) && 
                (
                    this.BirthDayNumber == input.BirthDayNumber ||
                    (this.BirthDayNumber != null &&
                    this.BirthDayNumber.Equals(input.BirthDayNumber))
                ) && 
                (
                    this.GenderType == input.GenderType ||
                    (this.GenderType != null &&
                    this.GenderType.Equals(input.GenderType))
                ) && 
                (
                    this.Xxcustom05 == input.Xxcustom05 ||
                    (this.Xxcustom05 != null &&
                    this.Xxcustom05.Equals(input.Xxcustom05))
                ) && 
                (
                    this.Xxcustom03 == input.Xxcustom03 ||
                    (this.Xxcustom03 != null &&
                    this.Xxcustom03.Equals(input.Xxcustom03))
                ) && 
                (
                    this.Xxcustom02 == input.Xxcustom02 ||
                    (this.Xxcustom02 != null &&
                    this.Xxcustom02.Equals(input.Xxcustom02))
                ) && 
                (
                    this.Xxcustom04 == input.Xxcustom04 ||
                    (this.Xxcustom04 != null &&
                    this.Xxcustom04.Equals(input.Xxcustom04))
                ) && 
                (
                    this.Xxcustom01 == input.Xxcustom01 ||
                    (this.Xxcustom01 != null &&
                    this.Xxcustom01.Equals(input.Xxcustom01))
                );
        }

        /// <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.Key != null)
                    hashCode = hashCode * 59 + this.Key.GetHashCode();
                if (this.LanguageID != null)
                    hashCode = hashCode * 59 + this.LanguageID.GetHashCode();
                if (this.Salutation != null)
                    hashCode = hashCode * 59 + this.Salutation.GetHashCode();
                if (this.FirstName != null)
                    hashCode = hashCode * 59 + this.FirstName.GetHashCode();
                if (this.LastName != null)
                    hashCode = hashCode * 59 + this.LastName.GetHashCode();
                if (this.BirthYearNumber != null)
                    hashCode = hashCode * 59 + this.BirthYearNumber.GetHashCode();
                if (this.BirthMonthNumber != null)
                    hashCode = hashCode * 59 + this.BirthMonthNumber.GetHashCode();
                if (this.BirthDayNumber != null)
                    hashCode = hashCode * 59 + this.BirthDayNumber.GetHashCode();
                if (this.GenderType != null)
                    hashCode = hashCode * 59 + this.GenderType.GetHashCode();
                if (this.Xxcustom05 != null)
                    hashCode = hashCode * 59 + this.Xxcustom05.GetHashCode();
                if (this.Xxcustom03 != null)
                    hashCode = hashCode * 59 + this.Xxcustom03.GetHashCode();
                if (this.Xxcustom02 != null)
                    hashCode = hashCode * 59 + this.Xxcustom02.GetHashCode();
                if (this.Xxcustom04 != null)
                    hashCode = hashCode * 59 + this.Xxcustom04.GetHashCode();
                if (this.Xxcustom01 != null)
                    hashCode = hashCode * 59 + this.Xxcustom01.GetHashCode();
                return hashCode;
            }
        }

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

}
