/* 
 * 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>
    /// TransactionAuditEvent &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="creationTimestamp">Creation timestamp of the audit event; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone) (required).</param>
        /// <param name="creationTimestampUTC0">Creation timestamp in UTC0; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone) (required).</param>
        /// <param name="workstationID">ID of the workstation.</param>
        /// <param name="workstationTypeCode">Type code of the workstation.</param>
        /// <param name="eventTypeCode">Type code of the audit event (required).</param>
        /// <param name="content">Additional event content.</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 ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent(ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEventKey key = default(ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEventKey), string creationTimestamp = default(string), DateTime? creationTimestampUTC0 = default(DateTime?), string workstationID = default(string), string workstationTypeCode = default(string), string eventTypeCode = default(string), Object content = default(Object), 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 ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            // to ensure "creationTimestamp" is required (not null)
            if (creationTimestamp == null)
            {
                throw new InvalidDataException("creationTimestamp is a required property for ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent and cannot be null");
            }
            else
            {
                this.CreationTimestamp = creationTimestamp;
            }
            // to ensure "creationTimestampUTC0" is required (not null)
            if (creationTimestampUTC0 == null)
            {
                throw new InvalidDataException("creationTimestampUTC0 is a required property for ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent and cannot be null");
            }
            else
            {
                this.CreationTimestampUTC0 = creationTimestampUTC0;
            }
            // to ensure "eventTypeCode" is required (not null)
            if (eventTypeCode == null)
            {
                throw new InvalidDataException("eventTypeCode is a required property for ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent and cannot be null");
            }
            else
            {
                this.EventTypeCode = eventTypeCode;
            }
            this.WorkstationID = workstationID;
            this.WorkstationTypeCode = workstationTypeCode;
            this.Content = content;
            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 ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEventKey Key { get; set; }

        /// <summary>
        /// Creation timestamp of the audit event; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>Creation timestamp of the audit event; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="creationTimestamp", EmitDefaultValue=false)]
        public string CreationTimestamp { get; set; }

        /// <summary>
        /// Creation timestamp in UTC0; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)
        /// </summary>
        /// <value>Creation timestamp in UTC0; UTC0 date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSSZ&#39; (with timezone)</value>
        [DataMember(Name="creationTimestampUTC0", EmitDefaultValue=false)]
        public DateTime? CreationTimestampUTC0 { get; set; }

        /// <summary>
        /// ID of the workstation
        /// </summary>
        /// <value>ID of the workstation</value>
        [DataMember(Name="workstationID", EmitDefaultValue=false)]
        public string WorkstationID { get; set; }

        /// <summary>
        /// Type code of the workstation
        /// </summary>
        /// <value>Type code of the workstation</value>
        [DataMember(Name="workstationTypeCode", EmitDefaultValue=false)]
        public string WorkstationTypeCode { get; set; }

        /// <summary>
        /// Type code of the audit event
        /// </summary>
        /// <value>Type code of the audit event</value>
        [DataMember(Name="eventTypeCode", EmitDefaultValue=false)]
        public string EventTypeCode { get; set; }

        /// <summary>
        /// Additional event content
        /// </summary>
        /// <value>Additional event content</value>
        [DataMember(Name="content", EmitDefaultValue=false)]
        public Object Content { 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 ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  CreationTimestamp: ").Append(CreationTimestamp).Append("\n");
            sb.Append("  CreationTimestampUTC0: ").Append(CreationTimestampUTC0).Append("\n");
            sb.Append("  WorkstationID: ").Append(WorkstationID).Append("\n");
            sb.Append("  WorkstationTypeCode: ").Append(WorkstationTypeCode).Append("\n");
            sb.Append("  EventTypeCode: ").Append(EventTypeCode).Append("\n");
            sb.Append("  Content: ").Append(Content).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 ComGkSoftwareGkrApiTxpoolDtoTransactionAuditEvent);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.CreationTimestamp == input.CreationTimestamp ||
                    (this.CreationTimestamp != null &&
                    this.CreationTimestamp.Equals(input.CreationTimestamp))
                ) && 
                (
                    this.CreationTimestampUTC0 == input.CreationTimestampUTC0 ||
                    (this.CreationTimestampUTC0 != null &&
                    this.CreationTimestampUTC0.Equals(input.CreationTimestampUTC0))
                ) && 
                (
                    this.WorkstationID == input.WorkstationID ||
                    (this.WorkstationID != null &&
                    this.WorkstationID.Equals(input.WorkstationID))
                ) && 
                (
                    this.WorkstationTypeCode == input.WorkstationTypeCode ||
                    (this.WorkstationTypeCode != null &&
                    this.WorkstationTypeCode.Equals(input.WorkstationTypeCode))
                ) && 
                (
                    this.EventTypeCode == input.EventTypeCode ||
                    (this.EventTypeCode != null &&
                    this.EventTypeCode.Equals(input.EventTypeCode))
                ) && 
                (
                    this.Content == input.Content ||
                    (this.Content != null &&
                    this.Content.Equals(input.Content))
                ) && 
                (
                    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.CreationTimestamp != null)
                    hashCode = hashCode * 59 + this.CreationTimestamp.GetHashCode();
                if (this.CreationTimestampUTC0 != null)
                    hashCode = hashCode * 59 + this.CreationTimestampUTC0.GetHashCode();
                if (this.WorkstationID != null)
                    hashCode = hashCode * 59 + this.WorkstationID.GetHashCode();
                if (this.WorkstationTypeCode != null)
                    hashCode = hashCode * 59 + this.WorkstationTypeCode.GetHashCode();
                if (this.EventTypeCode != null)
                    hashCode = hashCode * 59 + this.EventTypeCode.GetHashCode();
                if (this.Content != null)
                    hashCode = hashCode * 59 + this.Content.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;
        }
    }

}
