/* 
 * 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>
    /// CustomerContactView &lt;p&gt;View for displaying customer contact&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiServerMdCustomerDtoDomCustomerContactView :  IEquatable<ComGkSoftwareGkrApiServerMdCustomerDtoDomCustomerContactView>, IValidatableObject
    {
        /// <summary>
        /// &lt;ul&gt;&lt;br /&gt; &lt;li&gt;PERSON - if table person is filled&lt;/li&gt;&lt;br /&gt; &lt;li&gt;ORGANIZATION - if table orgabnization is filled&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>&lt;ul&gt;&lt;br /&gt; &lt;li&gt;PERSON - if table person is filled&lt;/li&gt;&lt;br /&gt; &lt;li&gt;ORGANIZATION - if table orgabnization is filled&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum CustomerTypeEnum
        {
            
            /// <summary>
            /// Enum PERSON for value: PERSON
            /// </summary>
            [EnumMember(Value = "PERSON")]
            PERSON = 1,
            
            /// <summary>
            /// Enum ORGANIZATION for value: ORGANIZATION
            /// </summary>
            [EnumMember(Value = "ORGANIZATION")]
            ORGANIZATION = 2
        }

        /// <summary>
        /// &lt;ul&gt;&lt;br /&gt; &lt;li&gt;PERSON - if table person is filled&lt;/li&gt;&lt;br /&gt; &lt;li&gt;ORGANIZATION - if table orgabnization is filled&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>&lt;ul&gt;&lt;br /&gt; &lt;li&gt;PERSON - if table person is filled&lt;/li&gt;&lt;br /&gt; &lt;li&gt;ORGANIZATION - if table orgabnization is filled&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;</value>
        [DataMember(Name="customerType", EmitDefaultValue=false)]
        public CustomerTypeEnum? CustomerType { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdCustomerDtoDomCustomerContactView" /> class.
        /// </summary>
        /// <param name="businessUnitGroupID">&lt;p&gt;The identifier for a group of business units.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="customerID">&lt;p&gt;The identifier for the customer.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="salutation">salutation.</param>
        /// <param name="name">&lt;p&gt;A customer name.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="street">&lt;p&gt;The street name and number&lt;br /&gt;&lt;/p&gt;.</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 ISO country code&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="territoryName">&lt;p&gt;Name of the region.&lt;br /&gt; Used also for district.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="completeTelephoneNumber">&lt;p&gt;The complete telephone number including the country code, area code, telephone number and extension number.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="customerType">&lt;ul&gt;&lt;br /&gt; &lt;li&gt;PERSON - if table person is filled&lt;/li&gt;&lt;br /&gt; &lt;li&gt;ORGANIZATION - if table orgabnization is filled&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;.</param>
        /// <param name="emailAddress">&lt;p&gt;Email address&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="dataProtectCode">&lt;p&gt;The data protection code being used for the evaluation of the data protection requirements.&lt;br /&gt;&lt;/p&gt;.</param>
        public ComGkSoftwareGkrApiServerMdCustomerDtoDomCustomerContactView(string businessUnitGroupID = default(string), string customerID = default(string), string salutation = default(string), string name = default(string), string street = default(string), string city = default(string), string postalCode = default(string), string isoCountryCode = default(string), string territoryName = default(string), string completeTelephoneNumber = default(string), CustomerTypeEnum? customerType = default(CustomerTypeEnum?), string emailAddress = default(string), string dataProtectCode = default(string))
        {
            this.BusinessUnitGroupID = businessUnitGroupID;
            this.CustomerID = customerID;
            this.Salutation = salutation;
            this.Name = name;
            this.Street = street;
            this.City = city;
            this.PostalCode = postalCode;
            this.IsoCountryCode = isoCountryCode;
            this.TerritoryName = territoryName;
            this.CompleteTelephoneNumber = completeTelephoneNumber;
            this.CustomerType = customerType;
            this.EmailAddress = emailAddress;
            this.DataProtectCode = dataProtectCode;
        }
        
        /// <summary>
        /// &lt;p&gt;The identifier for a group of business units.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The identifier for a group of business units.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="businessUnitGroupID", EmitDefaultValue=false)]
        public string BusinessUnitGroupID { get; set; }

        /// <summary>
        /// &lt;p&gt;The identifier for the customer.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The identifier for the customer.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="customerID", EmitDefaultValue=false)]
        public string CustomerID { get; set; }

        /// <summary>
        /// Gets or Sets Salutation
        /// </summary>
        [DataMember(Name="salutation", EmitDefaultValue=false)]
        public string Salutation { get; set; }

        /// <summary>
        /// &lt;p&gt;A customer name.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A customer name.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="name", EmitDefaultValue=false)]
        public string Name { get; set; }

        /// <summary>
        /// &lt;p&gt;The street name and number&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The street name and number&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="street", EmitDefaultValue=false)]
        public string Street { 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 ISO country code&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The ISO country code&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="territoryName", EmitDefaultValue=false)]
        public string TerritoryName { get; set; }

        /// <summary>
        /// &lt;p&gt;The complete telephone number including the country code, area code, telephone number and extension number.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The complete telephone number including the country code, area code, telephone number and extension number.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="completeTelephoneNumber", EmitDefaultValue=false)]
        public string CompleteTelephoneNumber { get; set; }


        /// <summary>
        /// &lt;p&gt;Email address&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Email address&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="emailAddress", EmitDefaultValue=false)]
        public string EmailAddress { get; set; }

        /// <summary>
        /// &lt;p&gt;The data protection code being used for the evaluation of the data protection requirements.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The data protection code being used for the evaluation of the data protection requirements.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="dataProtectCode", EmitDefaultValue=false)]
        public string DataProtectCode { 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 ComGkSoftwareGkrApiServerMdCustomerDtoDomCustomerContactView {\n");
            sb.Append("  BusinessUnitGroupID: ").Append(BusinessUnitGroupID).Append("\n");
            sb.Append("  CustomerID: ").Append(CustomerID).Append("\n");
            sb.Append("  Salutation: ").Append(Salutation).Append("\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  Street: ").Append(Street).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("  TerritoryName: ").Append(TerritoryName).Append("\n");
            sb.Append("  CompleteTelephoneNumber: ").Append(CompleteTelephoneNumber).Append("\n");
            sb.Append("  CustomerType: ").Append(CustomerType).Append("\n");
            sb.Append("  EmailAddress: ").Append(EmailAddress).Append("\n");
            sb.Append("  DataProtectCode: ").Append(DataProtectCode).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 ComGkSoftwareGkrApiServerMdCustomerDtoDomCustomerContactView);
        }

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

            return 
                (
                    this.BusinessUnitGroupID == input.BusinessUnitGroupID ||
                    (this.BusinessUnitGroupID != null &&
                    this.BusinessUnitGroupID.Equals(input.BusinessUnitGroupID))
                ) && 
                (
                    this.CustomerID == input.CustomerID ||
                    (this.CustomerID != null &&
                    this.CustomerID.Equals(input.CustomerID))
                ) && 
                (
                    this.Salutation == input.Salutation ||
                    (this.Salutation != null &&
                    this.Salutation.Equals(input.Salutation))
                ) && 
                (
                    this.Name == input.Name ||
                    (this.Name != null &&
                    this.Name.Equals(input.Name))
                ) && 
                (
                    this.Street == input.Street ||
                    (this.Street != null &&
                    this.Street.Equals(input.Street))
                ) && 
                (
                    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.TerritoryName == input.TerritoryName ||
                    (this.TerritoryName != null &&
                    this.TerritoryName.Equals(input.TerritoryName))
                ) && 
                (
                    this.CompleteTelephoneNumber == input.CompleteTelephoneNumber ||
                    (this.CompleteTelephoneNumber != null &&
                    this.CompleteTelephoneNumber.Equals(input.CompleteTelephoneNumber))
                ) && 
                (
                    this.CustomerType == input.CustomerType ||
                    (this.CustomerType != null &&
                    this.CustomerType.Equals(input.CustomerType))
                ) && 
                (
                    this.EmailAddress == input.EmailAddress ||
                    (this.EmailAddress != null &&
                    this.EmailAddress.Equals(input.EmailAddress))
                ) && 
                (
                    this.DataProtectCode == input.DataProtectCode ||
                    (this.DataProtectCode != null &&
                    this.DataProtectCode.Equals(input.DataProtectCode))
                );
        }

        /// <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.BusinessUnitGroupID != null)
                    hashCode = hashCode * 59 + this.BusinessUnitGroupID.GetHashCode();
                if (this.CustomerID != null)
                    hashCode = hashCode * 59 + this.CustomerID.GetHashCode();
                if (this.Salutation != null)
                    hashCode = hashCode * 59 + this.Salutation.GetHashCode();
                if (this.Name != null)
                    hashCode = hashCode * 59 + this.Name.GetHashCode();
                if (this.Street != null)
                    hashCode = hashCode * 59 + this.Street.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.TerritoryName != null)
                    hashCode = hashCode * 59 + this.TerritoryName.GetHashCode();
                if (this.CompleteTelephoneNumber != null)
                    hashCode = hashCode * 59 + this.CompleteTelephoneNumber.GetHashCode();
                if (this.CustomerType != null)
                    hashCode = hashCode * 59 + this.CustomerType.GetHashCode();
                if (this.EmailAddress != null)
                    hashCode = hashCode * 59 + this.EmailAddress.GetHashCode();
                if (this.DataProtectCode != null)
                    hashCode = hashCode * 59 + this.DataProtectCode.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;
        }
    }

}
