/* 
 * 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>
    /// ErrorCode
    /// </summary>
    [DataContract]
    public partial class ErrorCode :  IEquatable<ErrorCode>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ErrorCode" /> class.
        /// </summary>
        /// <param name="errorCode">errorCode.</param>
        /// <param name="message">message.</param>
        /// <param name="messageKey">messageKey.</param>
        /// <param name="arguments">arguments.</param>
        public ErrorCode(string errorCode = default(string), string message = default(string), string messageKey = default(string), List<string> arguments = default(List<string>))
        {
            this._ErrorCode = errorCode;
            this.Message = message;
            this.MessageKey = messageKey;
            this.Arguments = arguments;
        }
        
        /// <summary>
        /// Gets or Sets _ErrorCode
        /// </summary>
        [DataMember(Name="errorCode", EmitDefaultValue=false)]
        public string _ErrorCode { get; set; }

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

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

        /// <summary>
        /// Gets or Sets Arguments
        /// </summary>
        [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 ErrorCode {\n");
            sb.Append("  _ErrorCode: ").Append(_ErrorCode).Append("\n");
            sb.Append("  Message: ").Append(Message).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 ErrorCode);
        }

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

            return 
                (
                    this._ErrorCode == input._ErrorCode ||
                    (this._ErrorCode != null &&
                    this._ErrorCode.Equals(input._ErrorCode))
                ) && 
                (
                    this.Message == input.Message ||
                    (this.Message != null &&
                    this.Message.Equals(input.Message))
                ) && 
                (
                    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.Message != null)
                    hashCode = hashCode * 59 + this.Message.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;
        }
    }

}
