/* 
 * 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>
    /// PartyDO &lt;p&gt;An individual or firm that exchanges information and/or goods and services with the store.&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO :  IEquatable<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="organizationTypeCode">&lt;p&gt;The type code of the organization.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="partyTypeCode">&lt;p&gt;The type code of the party.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="businessDescription1">&lt;p&gt;The 1st line of the description of the business of the customer; this information is e.g. to be printed on invoices in Greece due to tax law requirements.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="businessDescription2">&lt;p&gt;The 2nd line of the description of the business of the customer; this information is e.g. to be printed on invoices in Greece due to tax law requirements.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="partyRoleAssignmentList">&lt;p&gt;List of PartyRoleAssignment&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="partyIdentificationList">&lt;p&gt;List of PartyIdentification&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="partyBankAccountList">&lt;p&gt;List of PartyBankAccount&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 ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO(ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDOKey key = default(ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDOKey), string organizationTypeCode = default(string), string partyTypeCode = default(string), string businessDescription1 = default(string), string businessDescription2 = default(string), List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyRoleAssignment> partyRoleAssignmentList = default(List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyRoleAssignment>), List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyIdentification> partyIdentificationList = default(List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyIdentification>), List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyBankAccount> partyBankAccountList = default(List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyBankAccount>), 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 ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            this.OrganizationTypeCode = organizationTypeCode;
            this.PartyTypeCode = partyTypeCode;
            this.BusinessDescription1 = businessDescription1;
            this.BusinessDescription2 = businessDescription2;
            this.PartyRoleAssignmentList = partyRoleAssignmentList;
            this.PartyIdentificationList = partyIdentificationList;
            this.PartyBankAccountList = partyBankAccountList;
            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 ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDOKey Key { get; set; }

        /// <summary>
        /// &lt;p&gt;The type code of the organization.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The type code of the organization.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="organizationTypeCode", EmitDefaultValue=false)]
        public string OrganizationTypeCode { get; set; }

        /// <summary>
        /// &lt;p&gt;The type code of the party.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The type code of the party.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="partyTypeCode", EmitDefaultValue=false)]
        public string PartyTypeCode { get; set; }

        /// <summary>
        /// &lt;p&gt;The 1st line of the description of the business of the customer; this information is e.g. to be printed on invoices in Greece due to tax law requirements.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The 1st line of the description of the business of the customer; this information is e.g. to be printed on invoices in Greece due to tax law requirements.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="businessDescription1", EmitDefaultValue=false)]
        public string BusinessDescription1 { get; set; }

        /// <summary>
        /// &lt;p&gt;The 2nd line of the description of the business of the customer; this information is e.g. to be printed on invoices in Greece due to tax law requirements.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The 2nd line of the description of the business of the customer; this information is e.g. to be printed on invoices in Greece due to tax law requirements.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="businessDescription2", EmitDefaultValue=false)]
        public string BusinessDescription2 { get; set; }

        /// <summary>
        /// &lt;p&gt;List of PartyRoleAssignment&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;List of PartyRoleAssignment&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="partyRoleAssignmentList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyRoleAssignment> PartyRoleAssignmentList { get; set; }

        /// <summary>
        /// &lt;p&gt;List of PartyIdentification&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;List of PartyIdentification&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="partyIdentificationList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyIdentification> PartyIdentificationList { get; set; }

        /// <summary>
        /// &lt;p&gt;List of PartyBankAccount&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;List of PartyBankAccount&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="partyBankAccountList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiServerMdPartyDtoDomPartyBankAccount> PartyBankAccountList { 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 ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  OrganizationTypeCode: ").Append(OrganizationTypeCode).Append("\n");
            sb.Append("  PartyTypeCode: ").Append(PartyTypeCode).Append("\n");
            sb.Append("  BusinessDescription1: ").Append(BusinessDescription1).Append("\n");
            sb.Append("  BusinessDescription2: ").Append(BusinessDescription2).Append("\n");
            sb.Append("  PartyRoleAssignmentList: ").Append(PartyRoleAssignmentList).Append("\n");
            sb.Append("  PartyIdentificationList: ").Append(PartyIdentificationList).Append("\n");
            sb.Append("  PartyBankAccountList: ").Append(PartyBankAccountList).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 ComGkSoftwareGkrApiServerMdPartyDtoDomPartyDO);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.OrganizationTypeCode == input.OrganizationTypeCode ||
                    (this.OrganizationTypeCode != null &&
                    this.OrganizationTypeCode.Equals(input.OrganizationTypeCode))
                ) && 
                (
                    this.PartyTypeCode == input.PartyTypeCode ||
                    (this.PartyTypeCode != null &&
                    this.PartyTypeCode.Equals(input.PartyTypeCode))
                ) && 
                (
                    this.BusinessDescription1 == input.BusinessDescription1 ||
                    (this.BusinessDescription1 != null &&
                    this.BusinessDescription1.Equals(input.BusinessDescription1))
                ) && 
                (
                    this.BusinessDescription2 == input.BusinessDescription2 ||
                    (this.BusinessDescription2 != null &&
                    this.BusinessDescription2.Equals(input.BusinessDescription2))
                ) && 
                (
                    this.PartyRoleAssignmentList == input.PartyRoleAssignmentList ||
                    this.PartyRoleAssignmentList != null &&
                    this.PartyRoleAssignmentList.SequenceEqual(input.PartyRoleAssignmentList)
                ) && 
                (
                    this.PartyIdentificationList == input.PartyIdentificationList ||
                    this.PartyIdentificationList != null &&
                    this.PartyIdentificationList.SequenceEqual(input.PartyIdentificationList)
                ) && 
                (
                    this.PartyBankAccountList == input.PartyBankAccountList ||
                    this.PartyBankAccountList != null &&
                    this.PartyBankAccountList.SequenceEqual(input.PartyBankAccountList)
                ) && 
                (
                    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.OrganizationTypeCode != null)
                    hashCode = hashCode * 59 + this.OrganizationTypeCode.GetHashCode();
                if (this.PartyTypeCode != null)
                    hashCode = hashCode * 59 + this.PartyTypeCode.GetHashCode();
                if (this.BusinessDescription1 != null)
                    hashCode = hashCode * 59 + this.BusinessDescription1.GetHashCode();
                if (this.BusinessDescription2 != null)
                    hashCode = hashCode * 59 + this.BusinessDescription2.GetHashCode();
                if (this.PartyRoleAssignmentList != null)
                    hashCode = hashCode * 59 + this.PartyRoleAssignmentList.GetHashCode();
                if (this.PartyIdentificationList != null)
                    hashCode = hashCode * 59 + this.PartyIdentificationList.GetHashCode();
                if (this.PartyBankAccountList != null)
                    hashCode = hashCode * 59 + this.PartyBankAccountList.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;
        }
    }

}
