/* 
 * 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>
    /// FilterPerTenderResult
    /// </summary>
    [DataContract]
    public partial class FilterPerTenderResult :  IEquatable<FilterPerTenderResult>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="FilterPerTenderResult" /> class.
        /// </summary>
        /// <param name="allowedTender">allowedTender.</param>
        /// <param name="allowedTenderAmounts">allowedTenderAmounts.</param>
        /// <param name="forbiddenTender">forbiddenTender.</param>
        /// <param name="authorizationNeededTender">authorizationNeededTender.</param>
        /// <param name="tenderErrorCodeMap">tenderErrorCodeMap.</param>
        public FilterPerTenderResult(List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO> allowedTender = default(List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO>), Dictionary<string, decimal?> allowedTenderAmounts = default(Dictionary<string, decimal?>), List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO> forbiddenTender = default(List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO>), List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO> authorizationNeededTender = default(List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO>), Dictionary<string, ErrorCode> tenderErrorCodeMap = default(Dictionary<string, ErrorCode>))
        {
            this.AllowedTender = allowedTender;
            this.AllowedTenderAmounts = allowedTenderAmounts;
            this.ForbiddenTender = forbiddenTender;
            this.AuthorizationNeededTender = authorizationNeededTender;
            this.TenderErrorCodeMap = tenderErrorCodeMap;
        }
        
        /// <summary>
        /// Gets or Sets AllowedTender
        /// </summary>
        [DataMember(Name="allowedTender", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO> AllowedTender { get; set; }

        /// <summary>
        /// Gets or Sets AllowedTenderAmounts
        /// </summary>
        [DataMember(Name="allowedTenderAmounts", EmitDefaultValue=false)]
        public Dictionary<string, decimal?> AllowedTenderAmounts { get; set; }

        /// <summary>
        /// Gets or Sets ForbiddenTender
        /// </summary>
        [DataMember(Name="forbiddenTender", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO> ForbiddenTender { get; set; }

        /// <summary>
        /// Gets or Sets AuthorizationNeededTender
        /// </summary>
        [DataMember(Name="authorizationNeededTender", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiServerMdTenderDtoDomTenderDO> AuthorizationNeededTender { get; set; }

        /// <summary>
        /// Gets or Sets TenderErrorCodeMap
        /// </summary>
        [DataMember(Name="tenderErrorCodeMap", EmitDefaultValue=false)]
        public Dictionary<string, ErrorCode> TenderErrorCodeMap { 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 FilterPerTenderResult {\n");
            sb.Append("  AllowedTender: ").Append(AllowedTender).Append("\n");
            sb.Append("  AllowedTenderAmounts: ").Append(AllowedTenderAmounts).Append("\n");
            sb.Append("  ForbiddenTender: ").Append(ForbiddenTender).Append("\n");
            sb.Append("  AuthorizationNeededTender: ").Append(AuthorizationNeededTender).Append("\n");
            sb.Append("  TenderErrorCodeMap: ").Append(TenderErrorCodeMap).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 FilterPerTenderResult);
        }

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

            return 
                (
                    this.AllowedTender == input.AllowedTender ||
                    this.AllowedTender != null &&
                    this.AllowedTender.SequenceEqual(input.AllowedTender)
                ) && 
                (
                    this.AllowedTenderAmounts == input.AllowedTenderAmounts ||
                    this.AllowedTenderAmounts != null &&
                    this.AllowedTenderAmounts.SequenceEqual(input.AllowedTenderAmounts)
                ) && 
                (
                    this.ForbiddenTender == input.ForbiddenTender ||
                    this.ForbiddenTender != null &&
                    this.ForbiddenTender.SequenceEqual(input.ForbiddenTender)
                ) && 
                (
                    this.AuthorizationNeededTender == input.AuthorizationNeededTender ||
                    this.AuthorizationNeededTender != null &&
                    this.AuthorizationNeededTender.SequenceEqual(input.AuthorizationNeededTender)
                ) && 
                (
                    this.TenderErrorCodeMap == input.TenderErrorCodeMap ||
                    this.TenderErrorCodeMap != null &&
                    this.TenderErrorCodeMap.SequenceEqual(input.TenderErrorCodeMap)
                );
        }

        /// <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.AllowedTender != null)
                    hashCode = hashCode * 59 + this.AllowedTender.GetHashCode();
                if (this.AllowedTenderAmounts != null)
                    hashCode = hashCode * 59 + this.AllowedTenderAmounts.GetHashCode();
                if (this.ForbiddenTender != null)
                    hashCode = hashCode * 59 + this.ForbiddenTender.GetHashCode();
                if (this.AuthorizationNeededTender != null)
                    hashCode = hashCode * 59 + this.AuthorizationNeededTender.GetHashCode();
                if (this.TenderErrorCodeMap != null)
                    hashCode = hashCode * 59 + this.TenderErrorCodeMap.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;
        }
    }

}
