/*
 * Bungie.Net API
 *
 * These endpoints constitute the functionality exposed by Bungie.net, both for more traditional website functionality and for connectivity to Bungie video games and their related functionality.
 *
 * The version of the OpenAPI document: 2.18.0
 * Contact: support@bungie.com
 * Generated by: https://github.com/openapitools/openapi-generator.git
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Destiny.Client.OpenAPIDateConverter;

namespace Destiny.Model
{
    /// <summary>
    /// DestinyHistoricalStatsDestinyHistoricalStatsByPeriod
    /// </summary>
    [DataContract(Name = "Destiny.HistoricalStats.DestinyHistoricalStatsByPeriod")]
    public partial class DestinyHistoricalStatsDestinyHistoricalStatsByPeriod : IEquatable<DestinyHistoricalStatsDestinyHistoricalStatsByPeriod>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DestinyHistoricalStatsDestinyHistoricalStatsByPeriod" /> class.
        /// </summary>
        /// <param name="allTime">allTime.</param>
        /// <param name="allTimeTier1">allTimeTier1.</param>
        /// <param name="allTimeTier2">allTimeTier2.</param>
        /// <param name="allTimeTier3">allTimeTier3.</param>
        /// <param name="daily">daily.</param>
        /// <param name="monthly">monthly.</param>
        public DestinyHistoricalStatsDestinyHistoricalStatsByPeriod(Dictionary<string, DestinyHistoricalStatsDestinyHistoricalStatsValue> allTime = default(Dictionary<string, DestinyHistoricalStatsDestinyHistoricalStatsValue>), Dictionary<string, DestinyHistoricalStatsDestinyHistoricalStatsValue> allTimeTier1 = default(Dictionary<string, DestinyHistoricalStatsDestinyHistoricalStatsValue>), Dictionary<string, DestinyHistoricalStatsDestinyHistoricalStatsValue> allTimeTier2 = default(Dictionary<string, DestinyHistoricalStatsDestinyHistoricalStatsValue>), Dictionary<string, DestinyHistoricalStatsDestinyHistoricalStatsValue> allTimeTier3 = default(Dictionary<string, DestinyHistoricalStatsDestinyHistoricalStatsValue>), List<DestinyHistoricalStatsDestinyHistoricalStatsPeriodGroup> daily = default(List<DestinyHistoricalStatsDestinyHistoricalStatsPeriodGroup>), List<DestinyHistoricalStatsDestinyHistoricalStatsPeriodGroup> monthly = default(List<DestinyHistoricalStatsDestinyHistoricalStatsPeriodGroup>))
        {
            this.AllTime = allTime;
            this.AllTimeTier1 = allTimeTier1;
            this.AllTimeTier2 = allTimeTier2;
            this.AllTimeTier3 = allTimeTier3;
            this.Daily = daily;
            this.Monthly = monthly;
        }

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

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

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

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

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

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

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class DestinyHistoricalStatsDestinyHistoricalStatsByPeriod {\n");
            sb.Append("  AllTime: ").Append(AllTime).Append("\n");
            sb.Append("  AllTimeTier1: ").Append(AllTimeTier1).Append("\n");
            sb.Append("  AllTimeTier2: ").Append(AllTimeTier2).Append("\n");
            sb.Append("  AllTimeTier3: ").Append(AllTimeTier3).Append("\n");
            sb.Append("  Daily: ").Append(Daily).Append("\n");
            sb.Append("  Monthly: ").Append(Monthly).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 DestinyHistoricalStatsDestinyHistoricalStatsByPeriod);
        }

        /// <summary>
        /// Returns true if DestinyHistoricalStatsDestinyHistoricalStatsByPeriod instances are equal
        /// </summary>
        /// <param name="input">Instance of DestinyHistoricalStatsDestinyHistoricalStatsByPeriod to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DestinyHistoricalStatsDestinyHistoricalStatsByPeriod input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.AllTime == input.AllTime ||
                    this.AllTime != null &&
                    input.AllTime != null &&
                    this.AllTime.SequenceEqual(input.AllTime)
                ) && 
                (
                    this.AllTimeTier1 == input.AllTimeTier1 ||
                    this.AllTimeTier1 != null &&
                    input.AllTimeTier1 != null &&
                    this.AllTimeTier1.SequenceEqual(input.AllTimeTier1)
                ) && 
                (
                    this.AllTimeTier2 == input.AllTimeTier2 ||
                    this.AllTimeTier2 != null &&
                    input.AllTimeTier2 != null &&
                    this.AllTimeTier2.SequenceEqual(input.AllTimeTier2)
                ) && 
                (
                    this.AllTimeTier3 == input.AllTimeTier3 ||
                    this.AllTimeTier3 != null &&
                    input.AllTimeTier3 != null &&
                    this.AllTimeTier3.SequenceEqual(input.AllTimeTier3)
                ) && 
                (
                    this.Daily == input.Daily ||
                    this.Daily != null &&
                    input.Daily != null &&
                    this.Daily.SequenceEqual(input.Daily)
                ) && 
                (
                    this.Monthly == input.Monthly ||
                    this.Monthly != null &&
                    input.Monthly != null &&
                    this.Monthly.SequenceEqual(input.Monthly)
                );
        }

        /// <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.AllTime != null)
                {
                    hashCode = (hashCode * 59) + this.AllTime.GetHashCode();
                }
                if (this.AllTimeTier1 != null)
                {
                    hashCode = (hashCode * 59) + this.AllTimeTier1.GetHashCode();
                }
                if (this.AllTimeTier2 != null)
                {
                    hashCode = (hashCode * 59) + this.AllTimeTier2.GetHashCode();
                }
                if (this.AllTimeTier3 != null)
                {
                    hashCode = (hashCode * 59) + this.AllTimeTier3.GetHashCode();
                }
                if (this.Daily != null)
                {
                    hashCode = (hashCode * 59) + this.Daily.GetHashCode();
                }
                if (this.Monthly != null)
                {
                    hashCode = (hashCode * 59) + this.Monthly.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;
        }
    }

}
