/* 
 * 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>
    /// TransactionResourceOverride &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="resourceID">A unqiue system assigned identifier for the action to which access may be granted.  .</param>
        /// <param name="operatorID">A unique, automatically assigned number used to identify a workstation OPERATOR.  (required).</param>
        /// <param name="overrideTimestamp">The date and time that a transaction line item is being overridden. ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone).</param>
        /// <param name="entryMethodCode">A code denoting how the overriding Operator was entered. e.g. Keyed, Scanned, MCR, etc... .</param>
        /// <param name="approverName">The name of the person assigned to the WorkerID that was used to approve this TransactionResourceOverride .</param>
        /// <param name="approverFirstName">The first name of the person assigned to the WorkerID that was used to approve this transaction resource override .</param>
        /// <param name="workGroupID">A unqiue system assigned identifier for a set of Operators with similar resource access control permissions. .</param>
        /// <param name="workerID">A unique system-assigned identifier for the Person who is a particular Worker..</param>
        /// <param name="overrideTimestampUTC0">The UTC0 date and time that a transaction line item is being overridden. ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone).</param>
        /// <param name="xxcustom05">Customizable information.</param>
        /// <param name="xxcustom03">Customizable information.</param>
        /// <param name="xxcustom02">Customizable information.</param>
        /// <param name="xxcustom04">Customizable information.</param>
        /// <param name="xxcustom01">Customizable information.</param>
        public ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride(ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverrideKey key = default(ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverrideKey), string resourceID = default(string), string operatorID = default(string), string overrideTimestamp = default(string), string entryMethodCode = default(string), string approverName = default(string), string approverFirstName = default(string), string workGroupID = default(string), string workerID = default(string), DateTime? overrideTimestampUTC0 = default(DateTime?), 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 ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            // to ensure "operatorID" is required (not null)
            if (operatorID == null)
            {
                throw new InvalidDataException("operatorID is a required property for ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride and cannot be null");
            }
            else
            {
                this.OperatorID = operatorID;
            }
            this.ResourceID = resourceID;
            this.OverrideTimestamp = overrideTimestamp;
            this.EntryMethodCode = entryMethodCode;
            this.ApproverName = approverName;
            this.ApproverFirstName = approverFirstName;
            this.WorkGroupID = workGroupID;
            this.WorkerID = workerID;
            this.OverrideTimestampUTC0 = overrideTimestampUTC0;
            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 ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverrideKey Key { get; set; }

        /// <summary>
        /// A unqiue system assigned identifier for the action to which access may be granted.  
        /// </summary>
        /// <value>A unqiue system assigned identifier for the action to which access may be granted.  </value>
        [DataMember(Name="resourceID", EmitDefaultValue=false)]
        public string ResourceID { get; set; }

        /// <summary>
        /// A unique, automatically assigned number used to identify a workstation OPERATOR. 
        /// </summary>
        /// <value>A unique, automatically assigned number used to identify a workstation OPERATOR. </value>
        [DataMember(Name="operatorID", EmitDefaultValue=false)]
        public string OperatorID { get; set; }

        /// <summary>
        /// The date and time that a transaction line item is being overridden. ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>The date and time that a transaction line item is being overridden. ; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="overrideTimestamp", EmitDefaultValue=false)]
        public string OverrideTimestamp { get; set; }

        /// <summary>
        /// A code denoting how the overriding Operator was entered. e.g. Keyed, Scanned, MCR, etc... 
        /// </summary>
        /// <value>A code denoting how the overriding Operator was entered. e.g. Keyed, Scanned, MCR, etc... </value>
        [DataMember(Name="entryMethodCode", EmitDefaultValue=false)]
        public string EntryMethodCode { get; set; }

        /// <summary>
        /// The name of the person assigned to the WorkerID that was used to approve this TransactionResourceOverride 
        /// </summary>
        /// <value>The name of the person assigned to the WorkerID that was used to approve this TransactionResourceOverride </value>
        [DataMember(Name="approverName", EmitDefaultValue=false)]
        public string ApproverName { get; set; }

        /// <summary>
        /// The first name of the person assigned to the WorkerID that was used to approve this transaction resource override 
        /// </summary>
        /// <value>The first name of the person assigned to the WorkerID that was used to approve this transaction resource override </value>
        [DataMember(Name="approverFirstName", EmitDefaultValue=false)]
        public string ApproverFirstName { get; set; }

        /// <summary>
        /// A unqiue system assigned identifier for a set of Operators with similar resource access control permissions. 
        /// </summary>
        /// <value>A unqiue system assigned identifier for a set of Operators with similar resource access control permissions. </value>
        [DataMember(Name="workGroupID", EmitDefaultValue=false)]
        public string WorkGroupID { get; set; }

        /// <summary>
        /// A unique system-assigned identifier for the Person who is a particular Worker.
        /// </summary>
        /// <value>A unique system-assigned identifier for the Person who is a particular Worker.</value>
        [DataMember(Name="workerID", EmitDefaultValue=false)]
        public string WorkerID { get; set; }

        /// <summary>
        /// The UTC0 date and time that a transaction line item is being overridden. ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)
        /// </summary>
        /// <value>The UTC0 date and time that a transaction line item is being overridden. ; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)</value>
        [DataMember(Name="overrideTimestampUTC0", EmitDefaultValue=false)]
        public DateTime? OverrideTimestampUTC0 { 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>
        /// 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 ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  ResourceID: ").Append(ResourceID).Append("\n");
            sb.Append("  OperatorID: ").Append(OperatorID).Append("\n");
            sb.Append("  OverrideTimestamp: ").Append(OverrideTimestamp).Append("\n");
            sb.Append("  EntryMethodCode: ").Append(EntryMethodCode).Append("\n");
            sb.Append("  ApproverName: ").Append(ApproverName).Append("\n");
            sb.Append("  ApproverFirstName: ").Append(ApproverFirstName).Append("\n");
            sb.Append("  WorkGroupID: ").Append(WorkGroupID).Append("\n");
            sb.Append("  WorkerID: ").Append(WorkerID).Append("\n");
            sb.Append("  OverrideTimestampUTC0: ").Append(OverrideTimestampUTC0).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 ComGkSoftwareGkrApiTxpoolDtoTransactionResourceOverride);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.ResourceID == input.ResourceID ||
                    (this.ResourceID != null &&
                    this.ResourceID.Equals(input.ResourceID))
                ) && 
                (
                    this.OperatorID == input.OperatorID ||
                    (this.OperatorID != null &&
                    this.OperatorID.Equals(input.OperatorID))
                ) && 
                (
                    this.OverrideTimestamp == input.OverrideTimestamp ||
                    (this.OverrideTimestamp != null &&
                    this.OverrideTimestamp.Equals(input.OverrideTimestamp))
                ) && 
                (
                    this.EntryMethodCode == input.EntryMethodCode ||
                    (this.EntryMethodCode != null &&
                    this.EntryMethodCode.Equals(input.EntryMethodCode))
                ) && 
                (
                    this.ApproverName == input.ApproverName ||
                    (this.ApproverName != null &&
                    this.ApproverName.Equals(input.ApproverName))
                ) && 
                (
                    this.ApproverFirstName == input.ApproverFirstName ||
                    (this.ApproverFirstName != null &&
                    this.ApproverFirstName.Equals(input.ApproverFirstName))
                ) && 
                (
                    this.WorkGroupID == input.WorkGroupID ||
                    (this.WorkGroupID != null &&
                    this.WorkGroupID.Equals(input.WorkGroupID))
                ) && 
                (
                    this.WorkerID == input.WorkerID ||
                    (this.WorkerID != null &&
                    this.WorkerID.Equals(input.WorkerID))
                ) && 
                (
                    this.OverrideTimestampUTC0 == input.OverrideTimestampUTC0 ||
                    (this.OverrideTimestampUTC0 != null &&
                    this.OverrideTimestampUTC0.Equals(input.OverrideTimestampUTC0))
                ) && 
                (
                    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.ResourceID != null)
                    hashCode = hashCode * 59 + this.ResourceID.GetHashCode();
                if (this.OperatorID != null)
                    hashCode = hashCode * 59 + this.OperatorID.GetHashCode();
                if (this.OverrideTimestamp != null)
                    hashCode = hashCode * 59 + this.OverrideTimestamp.GetHashCode();
                if (this.EntryMethodCode != null)
                    hashCode = hashCode * 59 + this.EntryMethodCode.GetHashCode();
                if (this.ApproverName != null)
                    hashCode = hashCode * 59 + this.ApproverName.GetHashCode();
                if (this.ApproverFirstName != null)
                    hashCode = hashCode * 59 + this.ApproverFirstName.GetHashCode();
                if (this.WorkGroupID != null)
                    hashCode = hashCode * 59 + this.WorkGroupID.GetHashCode();
                if (this.WorkerID != null)
                    hashCode = hashCode * 59 + this.WorkerID.GetHashCode();
                if (this.OverrideTimestampUTC0 != null)
                    hashCode = hashCode * 59 + this.OverrideTimestampUTC0.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;
        }
    }

}
