/* 
 * 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>
    /// RetailTransactionCustomerContactMethod &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="contactTypeCode">Describes the type of contact. Possible values include e-mail address, address, telephone, internet URL.  (required).</param>
        /// <param name="emailAddressLocalPart">The local-part portion is a domain-dependent string. In addresses, it is simply interpreted on the particular host as a name of a particular mailbox. .</param>
        /// <param name="emailAddressDomainPart">The domain portion identifies the point to which the mail is delivered. In the dot-atom form, this is interpreted as an Internet domain name (either a host name or a mail exchanger name) as described in [RFC1034], [RFC1035], and [RFC1123]. In the domain-literal form, the domain is interpreted as the literal Internet address of the particular host. In both cases, how addressing is used and how messages are transported to a particular host is covered in separate documents, such as [RFC5321]. .</param>
        /// <param name="completePhoneNumber">The complete telephone number including the CountryCode, AreaCode, Telephone Number and ExtensionNumber. .</param>
        /// <param name="internetURL">The internet URL.</param>
        /// <param name="addressLine1">The first line of the address, normally the street number and name. .</param>
        /// <param name="addressLine2">The second line of an address, normally the Flat or Building Suite number. .</param>
        /// <param name="addressLine3">The third line of the address. .</param>
        /// <param name="addressLine4">The fourth line of the address. .</param>
        /// <param name="addressLine5">The fifth line of the address. It is normally used for the salutation. .</param>
        /// <param name="city">The city, town or village component of the address .</param>
        /// <param name="subTerritoryName">This field is used to specify the territory or city more concrete, for example for storing the district or suburb of a certain city. .</param>
        /// <param name="postalCode">The postal or zip code of the address .</param>
        /// <param name="postalCodeExtension">The extension of the postal or zip code that further specifies a particular postal district. .</param>
        /// <param name="territory">The County, State, Province, Territory etc component of the address .</param>
        /// <param name="territoryName">The name of the County, State, Province, Territory etc. component of the address .</param>
        /// <param name="xxcustom05">Customizable information.</param>
        /// <param name="xxcustom03">Customizable information.</param>
        /// <param name="xxcustom02">Customizable information.</param>
        /// <param name="isocountryCode">The ISO-3166-1 two letter code of the country.</param>
        /// <param name="xxcustom04">Customizable information.</param>
        /// <param name="xxcustom01">Customizable information.</param>
        public ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod(ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethodKey key = default(ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethodKey), string contactTypeCode = default(string), string emailAddressLocalPart = default(string), string emailAddressDomainPart = default(string), string completePhoneNumber = default(string), string internetURL = default(string), string addressLine1 = default(string), string addressLine2 = default(string), string addressLine3 = default(string), string addressLine4 = default(string), string addressLine5 = default(string), string city = default(string), string subTerritoryName = default(string), string postalCode = default(string), string postalCodeExtension = default(string), string territory = default(string), string territoryName = default(string), string xxcustom05 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string isocountryCode = 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 ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            // to ensure "contactTypeCode" is required (not null)
            if (contactTypeCode == null)
            {
                throw new InvalidDataException("contactTypeCode is a required property for ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod and cannot be null");
            }
            else
            {
                this.ContactTypeCode = contactTypeCode;
            }
            this.EmailAddressLocalPart = emailAddressLocalPart;
            this.EmailAddressDomainPart = emailAddressDomainPart;
            this.CompletePhoneNumber = completePhoneNumber;
            this.InternetURL = internetURL;
            this.AddressLine1 = addressLine1;
            this.AddressLine2 = addressLine2;
            this.AddressLine3 = addressLine3;
            this.AddressLine4 = addressLine4;
            this.AddressLine5 = addressLine5;
            this.City = city;
            this.SubTerritoryName = subTerritoryName;
            this.PostalCode = postalCode;
            this.PostalCodeExtension = postalCodeExtension;
            this.Territory = territory;
            this.TerritoryName = territoryName;
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.IsocountryCode = isocountryCode;
            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 ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethodKey Key { get; set; }

        /// <summary>
        /// Describes the type of contact. Possible values include e-mail address, address, telephone, internet URL. 
        /// </summary>
        /// <value>Describes the type of contact. Possible values include e-mail address, address, telephone, internet URL. </value>
        [DataMember(Name="contactTypeCode", EmitDefaultValue=false)]
        public string ContactTypeCode { get; set; }

        /// <summary>
        /// The local-part portion is a domain-dependent string. In addresses, it is simply interpreted on the particular host as a name of a particular mailbox. 
        /// </summary>
        /// <value>The local-part portion is a domain-dependent string. In addresses, it is simply interpreted on the particular host as a name of a particular mailbox. </value>
        [DataMember(Name="emailAddressLocalPart", EmitDefaultValue=false)]
        public string EmailAddressLocalPart { get; set; }

        /// <summary>
        /// The domain portion identifies the point to which the mail is delivered. In the dot-atom form, this is interpreted as an Internet domain name (either a host name or a mail exchanger name) as described in [RFC1034], [RFC1035], and [RFC1123]. In the domain-literal form, the domain is interpreted as the literal Internet address of the particular host. In both cases, how addressing is used and how messages are transported to a particular host is covered in separate documents, such as [RFC5321]. 
        /// </summary>
        /// <value>The domain portion identifies the point to which the mail is delivered. In the dot-atom form, this is interpreted as an Internet domain name (either a host name or a mail exchanger name) as described in [RFC1034], [RFC1035], and [RFC1123]. In the domain-literal form, the domain is interpreted as the literal Internet address of the particular host. In both cases, how addressing is used and how messages are transported to a particular host is covered in separate documents, such as [RFC5321]. </value>
        [DataMember(Name="emailAddressDomainPart", EmitDefaultValue=false)]
        public string EmailAddressDomainPart { get; set; }

        /// <summary>
        /// The complete telephone number including the CountryCode, AreaCode, Telephone Number and ExtensionNumber. 
        /// </summary>
        /// <value>The complete telephone number including the CountryCode, AreaCode, Telephone Number and ExtensionNumber. </value>
        [DataMember(Name="completePhoneNumber", EmitDefaultValue=false)]
        public string CompletePhoneNumber { get; set; }

        /// <summary>
        /// The internet URL
        /// </summary>
        /// <value>The internet URL</value>
        [DataMember(Name="internetURL", EmitDefaultValue=false)]
        public string InternetURL { get; set; }

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

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

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

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

        /// <summary>
        /// The fifth line of the address. It is normally used for the salutation. 
        /// </summary>
        /// <value>The fifth line of the address. It is normally used for the salutation. </value>
        [DataMember(Name="addressLine5", EmitDefaultValue=false)]
        public string AddressLine5 { get; set; }

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

        /// <summary>
        /// This field is used to specify the territory or city more concrete, for example for storing the district or suburb of a certain city. 
        /// </summary>
        /// <value>This field is used to specify the territory or city more concrete, for example for storing the district or suburb of a certain city. </value>
        [DataMember(Name="subTerritoryName", EmitDefaultValue=false)]
        public string SubTerritoryName { get; set; }

        /// <summary>
        /// The postal or zip code of the address 
        /// </summary>
        /// <value>The postal or zip code of the address </value>
        [DataMember(Name="postalCode", EmitDefaultValue=false)]
        public string PostalCode { get; set; }

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

        /// <summary>
        /// The County, State, Province, Territory etc component of the address 
        /// </summary>
        /// <value>The County, State, Province, Territory etc component of the address </value>
        [DataMember(Name="territory", EmitDefaultValue=false)]
        public string Territory { get; set; }

        /// <summary>
        /// The name of the County, State, Province, Territory etc. component of the address 
        /// </summary>
        /// <value>The name of the County, State, Province, Territory etc. component of the address </value>
        [DataMember(Name="territoryName", EmitDefaultValue=false)]
        public string TerritoryName { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom05", EmitDefaultValue=false)]
        public string Xxcustom05 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom03", EmitDefaultValue=false)]
        public string Xxcustom03 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom02", EmitDefaultValue=false)]
        public string Xxcustom02 { get; set; }

        /// <summary>
        /// The ISO-3166-1 two letter code of the country
        /// </summary>
        /// <value>The ISO-3166-1 two letter code of the country</value>
        [DataMember(Name="isocountryCode", EmitDefaultValue=false)]
        public string IsocountryCode { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom04", EmitDefaultValue=false)]
        public string Xxcustom04 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</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 ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  ContactTypeCode: ").Append(ContactTypeCode).Append("\n");
            sb.Append("  EmailAddressLocalPart: ").Append(EmailAddressLocalPart).Append("\n");
            sb.Append("  EmailAddressDomainPart: ").Append(EmailAddressDomainPart).Append("\n");
            sb.Append("  CompletePhoneNumber: ").Append(CompletePhoneNumber).Append("\n");
            sb.Append("  InternetURL: ").Append(InternetURL).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("  City: ").Append(City).Append("\n");
            sb.Append("  SubTerritoryName: ").Append(SubTerritoryName).Append("\n");
            sb.Append("  PostalCode: ").Append(PostalCode).Append("\n");
            sb.Append("  PostalCodeExtension: ").Append(PostalCodeExtension).Append("\n");
            sb.Append("  Territory: ").Append(Territory).Append("\n");
            sb.Append("  TerritoryName: ").Append(TerritoryName).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("  IsocountryCode: ").Append(IsocountryCode).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 ComGkSoftwareGkrApiTxpoolDtoRetailTransactionCustomerContactMethod);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.ContactTypeCode == input.ContactTypeCode ||
                    (this.ContactTypeCode != null &&
                    this.ContactTypeCode.Equals(input.ContactTypeCode))
                ) && 
                (
                    this.EmailAddressLocalPart == input.EmailAddressLocalPart ||
                    (this.EmailAddressLocalPart != null &&
                    this.EmailAddressLocalPart.Equals(input.EmailAddressLocalPart))
                ) && 
                (
                    this.EmailAddressDomainPart == input.EmailAddressDomainPart ||
                    (this.EmailAddressDomainPart != null &&
                    this.EmailAddressDomainPart.Equals(input.EmailAddressDomainPart))
                ) && 
                (
                    this.CompletePhoneNumber == input.CompletePhoneNumber ||
                    (this.CompletePhoneNumber != null &&
                    this.CompletePhoneNumber.Equals(input.CompletePhoneNumber))
                ) && 
                (
                    this.InternetURL == input.InternetURL ||
                    (this.InternetURL != null &&
                    this.InternetURL.Equals(input.InternetURL))
                ) && 
                (
                    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.City == input.City ||
                    (this.City != null &&
                    this.City.Equals(input.City))
                ) && 
                (
                    this.SubTerritoryName == input.SubTerritoryName ||
                    (this.SubTerritoryName != null &&
                    this.SubTerritoryName.Equals(input.SubTerritoryName))
                ) && 
                (
                    this.PostalCode == input.PostalCode ||
                    (this.PostalCode != null &&
                    this.PostalCode.Equals(input.PostalCode))
                ) && 
                (
                    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.TerritoryName == input.TerritoryName ||
                    (this.TerritoryName != null &&
                    this.TerritoryName.Equals(input.TerritoryName))
                ) && 
                (
                    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.IsocountryCode == input.IsocountryCode ||
                    (this.IsocountryCode != null &&
                    this.IsocountryCode.Equals(input.IsocountryCode))
                ) && 
                (
                    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.ContactTypeCode != null)
                    hashCode = hashCode * 59 + this.ContactTypeCode.GetHashCode();
                if (this.EmailAddressLocalPart != null)
                    hashCode = hashCode * 59 + this.EmailAddressLocalPart.GetHashCode();
                if (this.EmailAddressDomainPart != null)
                    hashCode = hashCode * 59 + this.EmailAddressDomainPart.GetHashCode();
                if (this.CompletePhoneNumber != null)
                    hashCode = hashCode * 59 + this.CompletePhoneNumber.GetHashCode();
                if (this.InternetURL != null)
                    hashCode = hashCode * 59 + this.InternetURL.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.City != null)
                    hashCode = hashCode * 59 + this.City.GetHashCode();
                if (this.SubTerritoryName != null)
                    hashCode = hashCode * 59 + this.SubTerritoryName.GetHashCode();
                if (this.PostalCode != null)
                    hashCode = hashCode * 59 + this.PostalCode.GetHashCode();
                if (this.PostalCodeExtension != null)
                    hashCode = hashCode * 59 + this.PostalCodeExtension.GetHashCode();
                if (this.Territory != null)
                    hashCode = hashCode * 59 + this.Territory.GetHashCode();
                if (this.TerritoryName != null)
                    hashCode = hashCode * 59 + this.TerritoryName.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.IsocountryCode != null)
                    hashCode = hashCode * 59 + this.IsocountryCode.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;
        }
    }

}
