/* 
 * 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>
    /// TransactionOperationFailureResult &lt;p&gt;The transaction operation failure result&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwarePosApiServiceTransactionTransactionOperationFailureResult :  IEquatable<ComGkSoftwarePosApiServiceTransactionTransactionOperationFailureResult>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwarePosApiServiceTransactionTransactionOperationFailureResult" /> class.
        /// </summary>
        /// <param name="errorCode">&lt;p&gt;The error code&lt;/p&gt;.</param>
        /// <param name="errorMessage">&lt;p&gt;The error message&lt;/p&gt;.</param>
        /// <param name="messageKey">&lt;p&gt;The message key&lt;/p&gt;.</param>
        /// <param name="arguments">&lt;p&gt;The arguments&lt;/p&gt;.</param>
        public ComGkSoftwarePosApiServiceTransactionTransactionOperationFailureResult(string errorCode = default(string), string errorMessage = default(string), string messageKey = default(string), List<string> arguments = default(List<string>))
        {
            this.ErrorCode = errorCode;
            this.ErrorMessage = errorMessage;
            this.MessageKey = messageKey;
            this.Arguments = arguments;
        }
        
        /// <summary>
        /// &lt;p&gt;The error code&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The error code&lt;/p&gt;</value>
        [DataMember(Name="errorCode", EmitDefaultValue=false)]
        public string ErrorCode { get; set; }

        /// <summary>
        /// &lt;p&gt;The error message&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The error message&lt;/p&gt;</value>
        [DataMember(Name="errorMessage", EmitDefaultValue=false)]
        public string ErrorMessage { get; set; }

        /// <summary>
        /// &lt;p&gt;The message key&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The message key&lt;/p&gt;</value>
        [DataMember(Name="messageKey", EmitDefaultValue=false)]
        public string MessageKey { get; set; }

        /// <summary>
        /// &lt;p&gt;The arguments&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The arguments&lt;/p&gt;</value>
        [DataMember(Name="arguments", EmitDefaultValue=false)]
        public List<string> Arguments { 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 ComGkSoftwarePosApiServiceTransactionTransactionOperationFailureResult {\n");
            sb.Append("  ErrorCode: ").Append(ErrorCode).Append("\n");
            sb.Append("  ErrorMessage: ").Append(ErrorMessage).Append("\n");
            sb.Append("  MessageKey: ").Append(MessageKey).Append("\n");
            sb.Append("  Arguments: ").Append(Arguments).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 ComGkSoftwarePosApiServiceTransactionTransactionOperationFailureResult);
        }

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

            return 
                (
                    this.ErrorCode == input.ErrorCode ||
                    (this.ErrorCode != null &&
                    this.ErrorCode.Equals(input.ErrorCode))
                ) && 
                (
                    this.ErrorMessage == input.ErrorMessage ||
                    (this.ErrorMessage != null &&
                    this.ErrorMessage.Equals(input.ErrorMessage))
                ) && 
                (
                    this.MessageKey == input.MessageKey ||
                    (this.MessageKey != null &&
                    this.MessageKey.Equals(input.MessageKey))
                ) && 
                (
                    this.Arguments == input.Arguments ||
                    this.Arguments != null &&
                    this.Arguments.SequenceEqual(input.Arguments)
                );
        }

        /// <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.ErrorCode != null)
                    hashCode = hashCode * 59 + this.ErrorCode.GetHashCode();
                if (this.ErrorMessage != null)
                    hashCode = hashCode * 59 + this.ErrorMessage.GetHashCode();
                if (this.MessageKey != null)
                    hashCode = hashCode * 59 + this.MessageKey.GetHashCode();
                if (this.Arguments != null)
                    hashCode = hashCode * 59 + this.Arguments.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;
        }
    }

}
