/* 
 * 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>
    /// ContactAddress &lt;p&gt;List of addresses&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress :  IEquatable<ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="city">&lt;p&gt;The city, town or village component of the address.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="postalCode">&lt;p&gt;The postal or zip code of the address.&lt;br /&gt; Used also for postalCodeOfPOBox.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="isoCountryCode">&lt;p&gt;The country code of the company or the person.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="subTerritoryName">&lt;p&gt;Name of the region.&lt;br /&gt; Used also for district.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="territoryName">&lt;p&gt;Name of federal state.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="addressLine1">&lt;p&gt;The first line of the address, normally the street name and number.&lt;br /&gt; Used also for poBox.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="addressLine2">&lt;p&gt;The second line of an address, normally the Flat or Building Suite number.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="addressLine3">&lt;p&gt;The third line of the address&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="addressLine4">&lt;p&gt;The fourth line of the address.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="addressLine5">&lt;p&gt;The fifth line of the address.&lt;br /&gt; Also used for salutation.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="postalCodeExtension">&lt;p&gt;The extension of the postal or zip code that further specifies a particular postal district.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="territory">&lt;p&gt;A state, province, or other region within a country.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="marketingAllowedFlag">&lt;p&gt;Denotes if the contact address data can be used for marketing purposes.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="taxHandlingCode">&lt;p&gt;Tax handling code  defined within the customer address (region) is used for the tax calculation.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom08">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom10">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom09">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom07">&lt;p&gt;Additional field for custom development.&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="xxcustom06">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom11">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom12">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom13">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom14">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom15">&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="xxcustom16">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom17">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom18">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom19">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom20">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom21">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom22">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom23">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom24">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom25">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom26">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom27">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom28">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom29">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom30">&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 ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress(ComGkSoftwareGkrApiServerMdContactDtoDomContactAddressKey key = default(ComGkSoftwareGkrApiServerMdContactDtoDomContactAddressKey), string city = default(string), string postalCode = default(string), string isoCountryCode = default(string), string subTerritoryName = default(string), string territoryName = default(string), string addressLine1 = default(string), string addressLine2 = default(string), string addressLine3 = default(string), string addressLine4 = default(string), string addressLine5 = default(string), string postalCodeExtension = default(string), string territory = default(string), bool? marketingAllowedFlag = default(bool?), string taxHandlingCode = default(string), string xxcustom08 = default(string), string xxcustom10 = default(string), string xxcustom09 = default(string), string xxcustom07 = default(string), string xxcustom05 = default(string), string xxcustom06 = default(string), string xxcustom11 = default(string), string xxcustom12 = default(string), string xxcustom13 = default(string), string xxcustom14 = default(string), string xxcustom15 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), string xxcustom16 = default(string), string xxcustom17 = default(string), string xxcustom18 = default(string), string xxcustom19 = default(string), string xxcustom20 = default(string), string xxcustom21 = default(string), string xxcustom22 = default(string), string xxcustom23 = default(string), string xxcustom24 = default(string), string xxcustom25 = default(string), string xxcustom26 = default(string), string xxcustom27 = default(string), string xxcustom28 = default(string), string xxcustom29 = default(string), string xxcustom30 = 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 ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            this.City = city;
            this.PostalCode = postalCode;
            this.IsoCountryCode = isoCountryCode;
            this.SubTerritoryName = subTerritoryName;
            this.TerritoryName = territoryName;
            this.AddressLine1 = addressLine1;
            this.AddressLine2 = addressLine2;
            this.AddressLine3 = addressLine3;
            this.AddressLine4 = addressLine4;
            this.AddressLine5 = addressLine5;
            this.PostalCodeExtension = postalCodeExtension;
            this.Territory = territory;
            this.MarketingAllowedFlag = marketingAllowedFlag;
            this.TaxHandlingCode = taxHandlingCode;
            this.Xxcustom08 = xxcustom08;
            this.Xxcustom10 = xxcustom10;
            this.Xxcustom09 = xxcustom09;
            this.Xxcustom07 = xxcustom07;
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom06 = xxcustom06;
            this.Xxcustom11 = xxcustom11;
            this.Xxcustom12 = xxcustom12;
            this.Xxcustom13 = xxcustom13;
            this.Xxcustom14 = xxcustom14;
            this.Xxcustom15 = xxcustom15;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            this.Xxcustom16 = xxcustom16;
            this.Xxcustom17 = xxcustom17;
            this.Xxcustom18 = xxcustom18;
            this.Xxcustom19 = xxcustom19;
            this.Xxcustom20 = xxcustom20;
            this.Xxcustom21 = xxcustom21;
            this.Xxcustom22 = xxcustom22;
            this.Xxcustom23 = xxcustom23;
            this.Xxcustom24 = xxcustom24;
            this.Xxcustom25 = xxcustom25;
            this.Xxcustom26 = xxcustom26;
            this.Xxcustom27 = xxcustom27;
            this.Xxcustom28 = xxcustom28;
            this.Xxcustom29 = xxcustom29;
            this.Xxcustom30 = xxcustom30;
            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 ComGkSoftwareGkrApiServerMdContactDtoDomContactAddressKey Key { get; set; }

        /// <summary>
        /// &lt;p&gt;The city, town or village component of the address.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The city, town or village component of the address.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="city", EmitDefaultValue=false)]
        public string City { get; set; }

        /// <summary>
        /// &lt;p&gt;The postal or zip code of the address.&lt;br /&gt; Used also for postalCodeOfPOBox.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The postal or zip code of the address.&lt;br /&gt; Used also for postalCodeOfPOBox.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="postalCode", EmitDefaultValue=false)]
        public string PostalCode { get; set; }

        /// <summary>
        /// &lt;p&gt;The country code of the company or the person.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The country code of the company or the person.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="isoCountryCode", EmitDefaultValue=false)]
        public string IsoCountryCode { get; set; }

        /// <summary>
        /// &lt;p&gt;Name of the region.&lt;br /&gt; Used also for district.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Name of the region.&lt;br /&gt; Used also for district.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="subTerritoryName", EmitDefaultValue=false)]
        public string SubTerritoryName { get; set; }

        /// <summary>
        /// &lt;p&gt;Name of federal state.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Name of federal state.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="territoryName", EmitDefaultValue=false)]
        public string TerritoryName { get; set; }

        /// <summary>
        /// &lt;p&gt;The first line of the address, normally the street name and number.&lt;br /&gt; Used also for poBox.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The first line of the address, normally the street name and number.&lt;br /&gt; Used also for poBox.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="addressLine1", EmitDefaultValue=false)]
        public string AddressLine1 { get; set; }

        /// <summary>
        /// &lt;p&gt;The second line of an address, normally the Flat or Building Suite number.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The second line of an address, normally the Flat or Building Suite number.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="addressLine2", EmitDefaultValue=false)]
        public string AddressLine2 { get; set; }

        /// <summary>
        /// &lt;p&gt;The third line of the address&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The third line of the address&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="addressLine3", EmitDefaultValue=false)]
        public string AddressLine3 { get; set; }

        /// <summary>
        /// &lt;p&gt;The fourth line of the address.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The fourth line of the address.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="addressLine4", EmitDefaultValue=false)]
        public string AddressLine4 { get; set; }

        /// <summary>
        /// &lt;p&gt;The fifth line of the address.&lt;br /&gt; Also used for salutation.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The fifth line of the address.&lt;br /&gt; Also used for salutation.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="addressLine5", EmitDefaultValue=false)]
        public string AddressLine5 { get; set; }

        /// <summary>
        /// &lt;p&gt;The extension of the postal or zip code that further specifies a particular postal district.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The extension of the postal or zip code that further specifies a particular postal district.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="postalCodeExtension", EmitDefaultValue=false)]
        public string PostalCodeExtension { get; set; }

        /// <summary>
        /// &lt;p&gt;A state, province, or other region within a country.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A state, province, or other region within a country.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="territory", EmitDefaultValue=false)]
        public string Territory { get; set; }

        /// <summary>
        /// &lt;p&gt;Denotes if the contact address data can be used for marketing purposes.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Denotes if the contact address data can be used for marketing purposes.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="marketingAllowedFlag", EmitDefaultValue=false)]
        public bool? MarketingAllowedFlag { get; set; }

        /// <summary>
        /// &lt;p&gt;Tax handling code  defined within the customer address (region) is used for the tax calculation.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Tax handling code  defined within the customer address (region) is used for the tax calculation.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="taxHandlingCode", EmitDefaultValue=false)]
        public string TaxHandlingCode { 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="xxcustom08", EmitDefaultValue=false)]
        public string Xxcustom08 { 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="xxcustom10", EmitDefaultValue=false)]
        public string Xxcustom10 { 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="xxcustom09", EmitDefaultValue=false)]
        public string Xxcustom09 { 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="xxcustom07", EmitDefaultValue=false)]
        public string Xxcustom07 { 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="xxcustom06", EmitDefaultValue=false)]
        public string Xxcustom06 { 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="xxcustom11", EmitDefaultValue=false)]
        public string Xxcustom11 { 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="xxcustom12", EmitDefaultValue=false)]
        public string Xxcustom12 { 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="xxcustom13", EmitDefaultValue=false)]
        public string Xxcustom13 { 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="xxcustom14", EmitDefaultValue=false)]
        public string Xxcustom14 { 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="xxcustom15", EmitDefaultValue=false)]
        public string Xxcustom15 { 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="xxcustom16", EmitDefaultValue=false)]
        public string Xxcustom16 { 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="xxcustom17", EmitDefaultValue=false)]
        public string Xxcustom17 { 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="xxcustom18", EmitDefaultValue=false)]
        public string Xxcustom18 { 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="xxcustom19", EmitDefaultValue=false)]
        public string Xxcustom19 { 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="xxcustom20", EmitDefaultValue=false)]
        public string Xxcustom20 { 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="xxcustom21", EmitDefaultValue=false)]
        public string Xxcustom21 { 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="xxcustom22", EmitDefaultValue=false)]
        public string Xxcustom22 { 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="xxcustom23", EmitDefaultValue=false)]
        public string Xxcustom23 { 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="xxcustom24", EmitDefaultValue=false)]
        public string Xxcustom24 { 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="xxcustom25", EmitDefaultValue=false)]
        public string Xxcustom25 { 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="xxcustom26", EmitDefaultValue=false)]
        public string Xxcustom26 { 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="xxcustom27", EmitDefaultValue=false)]
        public string Xxcustom27 { 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="xxcustom28", EmitDefaultValue=false)]
        public string Xxcustom28 { 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="xxcustom29", EmitDefaultValue=false)]
        public string Xxcustom29 { 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="xxcustom30", EmitDefaultValue=false)]
        public string Xxcustom30 { 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 ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  City: ").Append(City).Append("\n");
            sb.Append("  PostalCode: ").Append(PostalCode).Append("\n");
            sb.Append("  IsoCountryCode: ").Append(IsoCountryCode).Append("\n");
            sb.Append("  SubTerritoryName: ").Append(SubTerritoryName).Append("\n");
            sb.Append("  TerritoryName: ").Append(TerritoryName).Append("\n");
            sb.Append("  AddressLine1: ").Append(AddressLine1).Append("\n");
            sb.Append("  AddressLine2: ").Append(AddressLine2).Append("\n");
            sb.Append("  AddressLine3: ").Append(AddressLine3).Append("\n");
            sb.Append("  AddressLine4: ").Append(AddressLine4).Append("\n");
            sb.Append("  AddressLine5: ").Append(AddressLine5).Append("\n");
            sb.Append("  PostalCodeExtension: ").Append(PostalCodeExtension).Append("\n");
            sb.Append("  Territory: ").Append(Territory).Append("\n");
            sb.Append("  MarketingAllowedFlag: ").Append(MarketingAllowedFlag).Append("\n");
            sb.Append("  TaxHandlingCode: ").Append(TaxHandlingCode).Append("\n");
            sb.Append("  Xxcustom08: ").Append(Xxcustom08).Append("\n");
            sb.Append("  Xxcustom10: ").Append(Xxcustom10).Append("\n");
            sb.Append("  Xxcustom09: ").Append(Xxcustom09).Append("\n");
            sb.Append("  Xxcustom07: ").Append(Xxcustom07).Append("\n");
            sb.Append("  Xxcustom05: ").Append(Xxcustom05).Append("\n");
            sb.Append("  Xxcustom06: ").Append(Xxcustom06).Append("\n");
            sb.Append("  Xxcustom11: ").Append(Xxcustom11).Append("\n");
            sb.Append("  Xxcustom12: ").Append(Xxcustom12).Append("\n");
            sb.Append("  Xxcustom13: ").Append(Xxcustom13).Append("\n");
            sb.Append("  Xxcustom14: ").Append(Xxcustom14).Append("\n");
            sb.Append("  Xxcustom15: ").Append(Xxcustom15).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("  Xxcustom16: ").Append(Xxcustom16).Append("\n");
            sb.Append("  Xxcustom17: ").Append(Xxcustom17).Append("\n");
            sb.Append("  Xxcustom18: ").Append(Xxcustom18).Append("\n");
            sb.Append("  Xxcustom19: ").Append(Xxcustom19).Append("\n");
            sb.Append("  Xxcustom20: ").Append(Xxcustom20).Append("\n");
            sb.Append("  Xxcustom21: ").Append(Xxcustom21).Append("\n");
            sb.Append("  Xxcustom22: ").Append(Xxcustom22).Append("\n");
            sb.Append("  Xxcustom23: ").Append(Xxcustom23).Append("\n");
            sb.Append("  Xxcustom24: ").Append(Xxcustom24).Append("\n");
            sb.Append("  Xxcustom25: ").Append(Xxcustom25).Append("\n");
            sb.Append("  Xxcustom26: ").Append(Xxcustom26).Append("\n");
            sb.Append("  Xxcustom27: ").Append(Xxcustom27).Append("\n");
            sb.Append("  Xxcustom28: ").Append(Xxcustom28).Append("\n");
            sb.Append("  Xxcustom29: ").Append(Xxcustom29).Append("\n");
            sb.Append("  Xxcustom30: ").Append(Xxcustom30).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 ComGkSoftwareGkrApiServerMdContactDtoDomContactAddress);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.City == input.City ||
                    (this.City != null &&
                    this.City.Equals(input.City))
                ) && 
                (
                    this.PostalCode == input.PostalCode ||
                    (this.PostalCode != null &&
                    this.PostalCode.Equals(input.PostalCode))
                ) && 
                (
                    this.IsoCountryCode == input.IsoCountryCode ||
                    (this.IsoCountryCode != null &&
                    this.IsoCountryCode.Equals(input.IsoCountryCode))
                ) && 
                (
                    this.SubTerritoryName == input.SubTerritoryName ||
                    (this.SubTerritoryName != null &&
                    this.SubTerritoryName.Equals(input.SubTerritoryName))
                ) && 
                (
                    this.TerritoryName == input.TerritoryName ||
                    (this.TerritoryName != null &&
                    this.TerritoryName.Equals(input.TerritoryName))
                ) && 
                (
                    this.AddressLine1 == input.AddressLine1 ||
                    (this.AddressLine1 != null &&
                    this.AddressLine1.Equals(input.AddressLine1))
                ) && 
                (
                    this.AddressLine2 == input.AddressLine2 ||
                    (this.AddressLine2 != null &&
                    this.AddressLine2.Equals(input.AddressLine2))
                ) && 
                (
                    this.AddressLine3 == input.AddressLine3 ||
                    (this.AddressLine3 != null &&
                    this.AddressLine3.Equals(input.AddressLine3))
                ) && 
                (
                    this.AddressLine4 == input.AddressLine4 ||
                    (this.AddressLine4 != null &&
                    this.AddressLine4.Equals(input.AddressLine4))
                ) && 
                (
                    this.AddressLine5 == input.AddressLine5 ||
                    (this.AddressLine5 != null &&
                    this.AddressLine5.Equals(input.AddressLine5))
                ) && 
                (
                    this.PostalCodeExtension == input.PostalCodeExtension ||
                    (this.PostalCodeExtension != null &&
                    this.PostalCodeExtension.Equals(input.PostalCodeExtension))
                ) && 
                (
                    this.Territory == input.Territory ||
                    (this.Territory != null &&
                    this.Territory.Equals(input.Territory))
                ) && 
                (
                    this.MarketingAllowedFlag == input.MarketingAllowedFlag ||
                    (this.MarketingAllowedFlag != null &&
                    this.MarketingAllowedFlag.Equals(input.MarketingAllowedFlag))
                ) && 
                (
                    this.TaxHandlingCode == input.TaxHandlingCode ||
                    (this.TaxHandlingCode != null &&
                    this.TaxHandlingCode.Equals(input.TaxHandlingCode))
                ) && 
                (
                    this.Xxcustom08 == input.Xxcustom08 ||
                    (this.Xxcustom08 != null &&
                    this.Xxcustom08.Equals(input.Xxcustom08))
                ) && 
                (
                    this.Xxcustom10 == input.Xxcustom10 ||
                    (this.Xxcustom10 != null &&
                    this.Xxcustom10.Equals(input.Xxcustom10))
                ) && 
                (
                    this.Xxcustom09 == input.Xxcustom09 ||
                    (this.Xxcustom09 != null &&
                    this.Xxcustom09.Equals(input.Xxcustom09))
                ) && 
                (
                    this.Xxcustom07 == input.Xxcustom07 ||
                    (this.Xxcustom07 != null &&
                    this.Xxcustom07.Equals(input.Xxcustom07))
                ) && 
                (
                    this.Xxcustom05 == input.Xxcustom05 ||
                    (this.Xxcustom05 != null &&
                    this.Xxcustom05.Equals(input.Xxcustom05))
                ) && 
                (
                    this.Xxcustom06 == input.Xxcustom06 ||
                    (this.Xxcustom06 != null &&
                    this.Xxcustom06.Equals(input.Xxcustom06))
                ) && 
                (
                    this.Xxcustom11 == input.Xxcustom11 ||
                    (this.Xxcustom11 != null &&
                    this.Xxcustom11.Equals(input.Xxcustom11))
                ) && 
                (
                    this.Xxcustom12 == input.Xxcustom12 ||
                    (this.Xxcustom12 != null &&
                    this.Xxcustom12.Equals(input.Xxcustom12))
                ) && 
                (
                    this.Xxcustom13 == input.Xxcustom13 ||
                    (this.Xxcustom13 != null &&
                    this.Xxcustom13.Equals(input.Xxcustom13))
                ) && 
                (
                    this.Xxcustom14 == input.Xxcustom14 ||
                    (this.Xxcustom14 != null &&
                    this.Xxcustom14.Equals(input.Xxcustom14))
                ) && 
                (
                    this.Xxcustom15 == input.Xxcustom15 ||
                    (this.Xxcustom15 != null &&
                    this.Xxcustom15.Equals(input.Xxcustom15))
                ) && 
                (
                    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.Xxcustom16 == input.Xxcustom16 ||
                    (this.Xxcustom16 != null &&
                    this.Xxcustom16.Equals(input.Xxcustom16))
                ) && 
                (
                    this.Xxcustom17 == input.Xxcustom17 ||
                    (this.Xxcustom17 != null &&
                    this.Xxcustom17.Equals(input.Xxcustom17))
                ) && 
                (
                    this.Xxcustom18 == input.Xxcustom18 ||
                    (this.Xxcustom18 != null &&
                    this.Xxcustom18.Equals(input.Xxcustom18))
                ) && 
                (
                    this.Xxcustom19 == input.Xxcustom19 ||
                    (this.Xxcustom19 != null &&
                    this.Xxcustom19.Equals(input.Xxcustom19))
                ) && 
                (
                    this.Xxcustom20 == input.Xxcustom20 ||
                    (this.Xxcustom20 != null &&
                    this.Xxcustom20.Equals(input.Xxcustom20))
                ) && 
                (
                    this.Xxcustom21 == input.Xxcustom21 ||
                    (this.Xxcustom21 != null &&
                    this.Xxcustom21.Equals(input.Xxcustom21))
                ) && 
                (
                    this.Xxcustom22 == input.Xxcustom22 ||
                    (this.Xxcustom22 != null &&
                    this.Xxcustom22.Equals(input.Xxcustom22))
                ) && 
                (
                    this.Xxcustom23 == input.Xxcustom23 ||
                    (this.Xxcustom23 != null &&
                    this.Xxcustom23.Equals(input.Xxcustom23))
                ) && 
                (
                    this.Xxcustom24 == input.Xxcustom24 ||
                    (this.Xxcustom24 != null &&
                    this.Xxcustom24.Equals(input.Xxcustom24))
                ) && 
                (
                    this.Xxcustom25 == input.Xxcustom25 ||
                    (this.Xxcustom25 != null &&
                    this.Xxcustom25.Equals(input.Xxcustom25))
                ) && 
                (
                    this.Xxcustom26 == input.Xxcustom26 ||
                    (this.Xxcustom26 != null &&
                    this.Xxcustom26.Equals(input.Xxcustom26))
                ) && 
                (
                    this.Xxcustom27 == input.Xxcustom27 ||
                    (this.Xxcustom27 != null &&
                    this.Xxcustom27.Equals(input.Xxcustom27))
                ) && 
                (
                    this.Xxcustom28 == input.Xxcustom28 ||
                    (this.Xxcustom28 != null &&
                    this.Xxcustom28.Equals(input.Xxcustom28))
                ) && 
                (
                    this.Xxcustom29 == input.Xxcustom29 ||
                    (this.Xxcustom29 != null &&
                    this.Xxcustom29.Equals(input.Xxcustom29))
                ) && 
                (
                    this.Xxcustom30 == input.Xxcustom30 ||
                    (this.Xxcustom30 != null &&
                    this.Xxcustom30.Equals(input.Xxcustom30))
                ) && 
                (
                    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.City != null)
                    hashCode = hashCode * 59 + this.City.GetHashCode();
                if (this.PostalCode != null)
                    hashCode = hashCode * 59 + this.PostalCode.GetHashCode();
                if (this.IsoCountryCode != null)
                    hashCode = hashCode * 59 + this.IsoCountryCode.GetHashCode();
                if (this.SubTerritoryName != null)
                    hashCode = hashCode * 59 + this.SubTerritoryName.GetHashCode();
                if (this.TerritoryName != null)
                    hashCode = hashCode * 59 + this.TerritoryName.GetHashCode();
                if (this.AddressLine1 != null)
                    hashCode = hashCode * 59 + this.AddressLine1.GetHashCode();
                if (this.AddressLine2 != null)
                    hashCode = hashCode * 59 + this.AddressLine2.GetHashCode();
                if (this.AddressLine3 != null)
                    hashCode = hashCode * 59 + this.AddressLine3.GetHashCode();
                if (this.AddressLine4 != null)
                    hashCode = hashCode * 59 + this.AddressLine4.GetHashCode();
                if (this.AddressLine5 != null)
                    hashCode = hashCode * 59 + this.AddressLine5.GetHashCode();
                if (this.PostalCodeExtension != null)
                    hashCode = hashCode * 59 + this.PostalCodeExtension.GetHashCode();
                if (this.Territory != null)
                    hashCode = hashCode * 59 + this.Territory.GetHashCode();
                if (this.MarketingAllowedFlag != null)
                    hashCode = hashCode * 59 + this.MarketingAllowedFlag.GetHashCode();
                if (this.TaxHandlingCode != null)
                    hashCode = hashCode * 59 + this.TaxHandlingCode.GetHashCode();
                if (this.Xxcustom08 != null)
                    hashCode = hashCode * 59 + this.Xxcustom08.GetHashCode();
                if (this.Xxcustom10 != null)
                    hashCode = hashCode * 59 + this.Xxcustom10.GetHashCode();
                if (this.Xxcustom09 != null)
                    hashCode = hashCode * 59 + this.Xxcustom09.GetHashCode();
                if (this.Xxcustom07 != null)
                    hashCode = hashCode * 59 + this.Xxcustom07.GetHashCode();
                if (this.Xxcustom05 != null)
                    hashCode = hashCode * 59 + this.Xxcustom05.GetHashCode();
                if (this.Xxcustom06 != null)
                    hashCode = hashCode * 59 + this.Xxcustom06.GetHashCode();
                if (this.Xxcustom11 != null)
                    hashCode = hashCode * 59 + this.Xxcustom11.GetHashCode();
                if (this.Xxcustom12 != null)
                    hashCode = hashCode * 59 + this.Xxcustom12.GetHashCode();
                if (this.Xxcustom13 != null)
                    hashCode = hashCode * 59 + this.Xxcustom13.GetHashCode();
                if (this.Xxcustom14 != null)
                    hashCode = hashCode * 59 + this.Xxcustom14.GetHashCode();
                if (this.Xxcustom15 != null)
                    hashCode = hashCode * 59 + this.Xxcustom15.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.Xxcustom16 != null)
                    hashCode = hashCode * 59 + this.Xxcustom16.GetHashCode();
                if (this.Xxcustom17 != null)
                    hashCode = hashCode * 59 + this.Xxcustom17.GetHashCode();
                if (this.Xxcustom18 != null)
                    hashCode = hashCode * 59 + this.Xxcustom18.GetHashCode();
                if (this.Xxcustom19 != null)
                    hashCode = hashCode * 59 + this.Xxcustom19.GetHashCode();
                if (this.Xxcustom20 != null)
                    hashCode = hashCode * 59 + this.Xxcustom20.GetHashCode();
                if (this.Xxcustom21 != null)
                    hashCode = hashCode * 59 + this.Xxcustom21.GetHashCode();
                if (this.Xxcustom22 != null)
                    hashCode = hashCode * 59 + this.Xxcustom22.GetHashCode();
                if (this.Xxcustom23 != null)
                    hashCode = hashCode * 59 + this.Xxcustom23.GetHashCode();
                if (this.Xxcustom24 != null)
                    hashCode = hashCode * 59 + this.Xxcustom24.GetHashCode();
                if (this.Xxcustom25 != null)
                    hashCode = hashCode * 59 + this.Xxcustom25.GetHashCode();
                if (this.Xxcustom26 != null)
                    hashCode = hashCode * 59 + this.Xxcustom26.GetHashCode();
                if (this.Xxcustom27 != null)
                    hashCode = hashCode * 59 + this.Xxcustom27.GetHashCode();
                if (this.Xxcustom28 != null)
                    hashCode = hashCode * 59 + this.Xxcustom28.GetHashCode();
                if (this.Xxcustom29 != null)
                    hashCode = hashCode * 59 + this.Xxcustom29.GetHashCode();
                if (this.Xxcustom30 != null)
                    hashCode = hashCode * 59 + this.Xxcustom30.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;
        }
    }

}
