/* 
 * 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>
    /// WorkerDO &lt;p&gt;A person who provides services to a retail store. May be either an employee or a contractor.&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO :  IEquatable<ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO>, IValidatableObject
    {
        /// <summary>
        /// &lt;p&gt;Origin of the import&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;00 - IMPORT&lt;/li&gt;&lt;br /&gt; &lt;li&gt;01 - MANUAL&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>&lt;p&gt;Origin of the import&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;00 - IMPORT&lt;/li&gt;&lt;br /&gt; &lt;li&gt;01 - MANUAL&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum OriginEnum
        {
            
            /// <summary>
            /// Enum IMPORT for value: IMPORT
            /// </summary>
            [EnumMember(Value = "IMPORT")]
            IMPORT = 1,
            
            /// <summary>
            /// Enum MANUAL for value: MANUAL
            /// </summary>
            [EnumMember(Value = "MANUAL")]
            MANUAL = 2
        }

        /// <summary>
        /// &lt;p&gt;Origin of the import&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;00 - IMPORT&lt;/li&gt;&lt;br /&gt; &lt;li&gt;01 - MANUAL&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>&lt;p&gt;Origin of the import&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;00 - IMPORT&lt;/li&gt;&lt;br /&gt; &lt;li&gt;01 - MANUAL&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;</value>
        [DataMember(Name="origin", EmitDefaultValue=false)]
        public OriginEnum? Origin { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="partyID">&lt;p&gt;A unique, system assigned identity for a party.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="person">&lt;p&gt;Personal information&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="contact">&lt;p&gt;Contact&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="workerDiscountGroupAssignmentList">&lt;p&gt;List of the discount groups assigned to the employee.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="origin">&lt;p&gt;Origin of the import&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;00 - IMPORT&lt;/li&gt;&lt;br /&gt; &lt;li&gt;01 - MANUAL&lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;.</param>
        /// <param name="packageID">&lt;p&gt;Internal identification of the import package (e.g. IDoc file). The identification is used for monitoring purposes.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="taxNumber">&lt;p&gt;TaxID of the sales representative&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="workerLevel">&lt;p&gt;The worker level in worker hierarchy. Used for security purposes - if a worker can maintain or see (GDPR) another user. &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>
        /// <param name="xxcustom05">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom03">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom02">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom04">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="xxcustom01">&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;.</param>
        public ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO(ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDOKey key = default(ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDOKey), string partyID = default(string), ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO person = default(ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO), ComGkSoftwareGkrApiServerMdContactDtoDomContactDO contact = default(ComGkSoftwareGkrApiServerMdContactDtoDomContactDO), List<ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDiscountGroupAssignment> workerDiscountGroupAssignmentList = default(List<ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDiscountGroupAssignment>), OriginEnum? origin = default(OriginEnum?), string packageID = default(string), string taxNumber = default(string), int? workerLevel = default(int?), string dataProtectCode = default(string), string xxcustom05 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), string xxcustom01 = default(string))
        {
            // to ensure "key" is required (not null)
            if (key == null)
            {
                throw new InvalidDataException("key is a required property for ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            this.PartyID = partyID;
            this.Person = person;
            this.Contact = contact;
            this.WorkerDiscountGroupAssignmentList = workerDiscountGroupAssignmentList;
            this.Origin = origin;
            this.PackageID = packageID;
            this.TaxNumber = taxNumber;
            this.WorkerLevel = workerLevel;
            this.DataProtectCode = dataProtectCode;
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            this.Xxcustom01 = xxcustom01;
        }
        
        /// <summary>
        /// &lt;p&gt;Getter for inner key class.&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Getter for inner key class.&lt;/p&gt;</value>
        [DataMember(Name="key", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDOKey Key { get; set; }

        /// <summary>
        /// &lt;p&gt;A unique, system assigned identity for a party.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A unique, system assigned identity for a party.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="partyID", EmitDefaultValue=false)]
        public string PartyID { get; set; }

        /// <summary>
        /// &lt;p&gt;Personal information&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Personal information&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="person", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiServerMdPersonDtoDomPersonDO Person { get; set; }

        /// <summary>
        /// &lt;p&gt;Contact&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Contact&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="contact", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiServerMdContactDtoDomContactDO Contact { get; set; }

        /// <summary>
        /// &lt;p&gt;List of the discount groups assigned to the employee.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;List of the discount groups assigned to the employee.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="workerDiscountGroupAssignmentList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDiscountGroupAssignment> WorkerDiscountGroupAssignmentList { get; set; }


        /// <summary>
        /// &lt;p&gt;Internal identification of the import package (e.g. IDoc file). The identification is used for monitoring purposes.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Internal identification of the import package (e.g. IDoc file). The identification is used for monitoring purposes.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="packageID", EmitDefaultValue=false)]
        public string PackageID { get; set; }

        /// <summary>
        /// &lt;p&gt;TaxID of the sales representative&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;TaxID of the sales representative&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="taxNumber", EmitDefaultValue=false)]
        public string TaxNumber { get; set; }

        /// <summary>
        /// &lt;p&gt;The worker level in worker hierarchy. Used for security purposes - if a worker can maintain or see (GDPR) another user. &lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The worker level in worker hierarchy. Used for security purposes - if a worker can maintain or see (GDPR) another user. &lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="workerLevel", EmitDefaultValue=false)]
        public int? WorkerLevel { 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>
        /// &lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Additional field for custom development.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="xxcustom05", EmitDefaultValue=false)]
        public string Xxcustom05 { get; set; }

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

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

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

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

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("class ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  PartyID: ").Append(PartyID).Append("\n");
            sb.Append("  Person: ").Append(Person).Append("\n");
            sb.Append("  Contact: ").Append(Contact).Append("\n");
            sb.Append("  WorkerDiscountGroupAssignmentList: ").Append(WorkerDiscountGroupAssignmentList).Append("\n");
            sb.Append("  Origin: ").Append(Origin).Append("\n");
            sb.Append("  PackageID: ").Append(PackageID).Append("\n");
            sb.Append("  TaxNumber: ").Append(TaxNumber).Append("\n");
            sb.Append("  WorkerLevel: ").Append(WorkerLevel).Append("\n");
            sb.Append("  DataProtectCode: ").Append(DataProtectCode).Append("\n");
            sb.Append("  Xxcustom05: ").Append(Xxcustom05).Append("\n");
            sb.Append("  Xxcustom03: ").Append(Xxcustom03).Append("\n");
            sb.Append("  Xxcustom02: ").Append(Xxcustom02).Append("\n");
            sb.Append("  Xxcustom04: ").Append(Xxcustom04).Append("\n");
            sb.Append("  Xxcustom01: ").Append(Xxcustom01).Append("\n");
            sb.Append("}\n");
            return sb.ToString();
        }
  
        /// <summary>
        /// Returns the JSON string presentation of the object
        /// </summary>
        /// <returns>JSON string presentation of the object</returns>
        public virtual string ToJson()
        {
            return JsonConvert.SerializeObject(this, Formatting.Indented);
        }

        /// <summary>
        /// Returns true if objects are equal
        /// </summary>
        /// <param name="input">Object to be compared</param>
        /// <returns>Boolean</returns>
        public override bool Equals(object input)
        {
            return this.Equals(input as ComGkSoftwareGkrApiServerMdWorkerDtoDomWorkerDO);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.PartyID == input.PartyID ||
                    (this.PartyID != null &&
                    this.PartyID.Equals(input.PartyID))
                ) && 
                (
                    this.Person == input.Person ||
                    (this.Person != null &&
                    this.Person.Equals(input.Person))
                ) && 
                (
                    this.Contact == input.Contact ||
                    (this.Contact != null &&
                    this.Contact.Equals(input.Contact))
                ) && 
                (
                    this.WorkerDiscountGroupAssignmentList == input.WorkerDiscountGroupAssignmentList ||
                    this.WorkerDiscountGroupAssignmentList != null &&
                    this.WorkerDiscountGroupAssignmentList.SequenceEqual(input.WorkerDiscountGroupAssignmentList)
                ) && 
                (
                    this.Origin == input.Origin ||
                    (this.Origin != null &&
                    this.Origin.Equals(input.Origin))
                ) && 
                (
                    this.PackageID == input.PackageID ||
                    (this.PackageID != null &&
                    this.PackageID.Equals(input.PackageID))
                ) && 
                (
                    this.TaxNumber == input.TaxNumber ||
                    (this.TaxNumber != null &&
                    this.TaxNumber.Equals(input.TaxNumber))
                ) && 
                (
                    this.WorkerLevel == input.WorkerLevel ||
                    (this.WorkerLevel != null &&
                    this.WorkerLevel.Equals(input.WorkerLevel))
                ) && 
                (
                    this.DataProtectCode == input.DataProtectCode ||
                    (this.DataProtectCode != null &&
                    this.DataProtectCode.Equals(input.DataProtectCode))
                ) && 
                (
                    this.Xxcustom05 == input.Xxcustom05 ||
                    (this.Xxcustom05 != null &&
                    this.Xxcustom05.Equals(input.Xxcustom05))
                ) && 
                (
                    this.Xxcustom03 == input.Xxcustom03 ||
                    (this.Xxcustom03 != null &&
                    this.Xxcustom03.Equals(input.Xxcustom03))
                ) && 
                (
                    this.Xxcustom02 == input.Xxcustom02 ||
                    (this.Xxcustom02 != null &&
                    this.Xxcustom02.Equals(input.Xxcustom02))
                ) && 
                (
                    this.Xxcustom04 == input.Xxcustom04 ||
                    (this.Xxcustom04 != null &&
                    this.Xxcustom04.Equals(input.Xxcustom04))
                ) && 
                (
                    this.Xxcustom01 == input.Xxcustom01 ||
                    (this.Xxcustom01 != null &&
                    this.Xxcustom01.Equals(input.Xxcustom01))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                if (this.Key != null)
                    hashCode = hashCode * 59 + this.Key.GetHashCode();
                if (this.PartyID != null)
                    hashCode = hashCode * 59 + this.PartyID.GetHashCode();
                if (this.Person != null)
                    hashCode = hashCode * 59 + this.Person.GetHashCode();
                if (this.Contact != null)
                    hashCode = hashCode * 59 + this.Contact.GetHashCode();
                if (this.WorkerDiscountGroupAssignmentList != null)
                    hashCode = hashCode * 59 + this.WorkerDiscountGroupAssignmentList.GetHashCode();
                if (this.Origin != null)
                    hashCode = hashCode * 59 + this.Origin.GetHashCode();
                if (this.PackageID != null)
                    hashCode = hashCode * 59 + this.PackageID.GetHashCode();
                if (this.TaxNumber != null)
                    hashCode = hashCode * 59 + this.TaxNumber.GetHashCode();
                if (this.WorkerLevel != null)
                    hashCode = hashCode * 59 + this.WorkerLevel.GetHashCode();
                if (this.DataProtectCode != null)
                    hashCode = hashCode * 59 + this.DataProtectCode.GetHashCode();
                if (this.Xxcustom05 != null)
                    hashCode = hashCode * 59 + this.Xxcustom05.GetHashCode();
                if (this.Xxcustom03 != null)
                    hashCode = hashCode * 59 + this.Xxcustom03.GetHashCode();
                if (this.Xxcustom02 != null)
                    hashCode = hashCode * 59 + this.Xxcustom02.GetHashCode();
                if (this.Xxcustom04 != null)
                    hashCode = hashCode * 59 + this.Xxcustom04.GetHashCode();
                if (this.Xxcustom01 != null)
                    hashCode = hashCode * 59 + this.Xxcustom01.GetHashCode();
                return hashCode;
            }
        }

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

}
