/* 
 * LeagueClient
 *
 * 7.23.209.3517
 *
 * OpenAPI spec version: 1.0.0
 * 
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */

using System;
using System.Text;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;


namespace LeagueClientApi.Model
{
    /// <summary>
    /// ChampSelectLcdsPlayerChampionSelectionDTO
    /// </summary>
    [DataContract]
    public partial class ChampSelectLcdsPlayerChampionSelectionDTO :  IEquatable<ChampSelectLcdsPlayerChampionSelectionDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ChampSelectLcdsPlayerChampionSelectionDTO" /> class.
        /// </summary>
        /// <param name="ChampionId">ChampionId.</param>
        /// <param name="SelectedSkinIndex">SelectedSkinIndex.</param>
        /// <param name="Spell1Id">Spell1Id.</param>
        /// <param name="Spell2Id">Spell2Id.</param>
        /// <param name="SummonerInternalName">SummonerInternalName.</param>
        public ChampSelectLcdsPlayerChampionSelectionDTO(int? ChampionId = default(int?), int? SelectedSkinIndex = default(int?), int? Spell1Id = default(int?), int? Spell2Id = default(int?), string SummonerInternalName = default(string))
        {
            this.ChampionId = ChampionId;
            this.SelectedSkinIndex = SelectedSkinIndex;
            this.Spell1Id = Spell1Id;
            this.Spell2Id = Spell2Id;
            this.SummonerInternalName = SummonerInternalName;
        }
        
        /// <summary>
        /// Gets or Sets ChampionId
        /// </summary>
        [DataMember(Name="championId", EmitDefaultValue=false)]
        public int? ChampionId { get; set; }

        /// <summary>
        /// Gets or Sets SelectedSkinIndex
        /// </summary>
        [DataMember(Name="selectedSkinIndex", EmitDefaultValue=false)]
        public int? SelectedSkinIndex { get; set; }

        /// <summary>
        /// Gets or Sets Spell1Id
        /// </summary>
        [DataMember(Name="spell1Id", EmitDefaultValue=false)]
        public int? Spell1Id { get; set; }

        /// <summary>
        /// Gets or Sets Spell2Id
        /// </summary>
        [DataMember(Name="spell2Id", EmitDefaultValue=false)]
        public int? Spell2Id { get; set; }

        /// <summary>
        /// Gets or Sets SummonerInternalName
        /// </summary>
        [DataMember(Name="summonerInternalName", EmitDefaultValue=false)]
        public string SummonerInternalName { 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 ChampSelectLcdsPlayerChampionSelectionDTO {\n");
            sb.Append("  ChampionId: ").Append(ChampionId).Append("\n");
            sb.Append("  SelectedSkinIndex: ").Append(SelectedSkinIndex).Append("\n");
            sb.Append("  Spell1Id: ").Append(Spell1Id).Append("\n");
            sb.Append("  Spell2Id: ").Append(Spell2Id).Append("\n");
            sb.Append("  SummonerInternalName: ").Append(SummonerInternalName).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 string ToJson()
        {
            return JsonConvert.SerializeObject(this, Formatting.Indented);
        }

        /// <summary>
        /// Returns true if objects are equal
        /// </summary>
        /// <param name="obj">Object to be compared</param>
        /// <returns>Boolean</returns>
        public override bool Equals(object obj)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            return this.Equals(obj as ChampSelectLcdsPlayerChampionSelectionDTO);
        }

        /// <summary>
        /// Returns true if ChampSelectLcdsPlayerChampionSelectionDTO instances are equal
        /// </summary>
        /// <param name="other">Instance of ChampSelectLcdsPlayerChampionSelectionDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ChampSelectLcdsPlayerChampionSelectionDTO other)
        {
            // credit: http://stackoverflow.com/a/10454552/677735
            if (other == null)
                return false;

            return 
                (
                    this.ChampionId == other.ChampionId ||
                    this.ChampionId != null &&
                    this.ChampionId.Equals(other.ChampionId)
                ) && 
                (
                    this.SelectedSkinIndex == other.SelectedSkinIndex ||
                    this.SelectedSkinIndex != null &&
                    this.SelectedSkinIndex.Equals(other.SelectedSkinIndex)
                ) && 
                (
                    this.Spell1Id == other.Spell1Id ||
                    this.Spell1Id != null &&
                    this.Spell1Id.Equals(other.Spell1Id)
                ) && 
                (
                    this.Spell2Id == other.Spell2Id ||
                    this.Spell2Id != null &&
                    this.Spell2Id.Equals(other.Spell2Id)
                ) && 
                (
                    this.SummonerInternalName == other.SummonerInternalName ||
                    this.SummonerInternalName != null &&
                    this.SummonerInternalName.Equals(other.SummonerInternalName)
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            // credit: http://stackoverflow.com/a/263416/677735
            unchecked // Overflow is fine, just wrap
            {
                int hash = 41;
                // Suitable nullity checks etc, of course :)
                if (this.ChampionId != null)
                    hash = hash * 59 + this.ChampionId.GetHashCode();
                if (this.SelectedSkinIndex != null)
                    hash = hash * 59 + this.SelectedSkinIndex.GetHashCode();
                if (this.Spell1Id != null)
                    hash = hash * 59 + this.Spell1Id.GetHashCode();
                if (this.Spell2Id != null)
                    hash = hash * 59 + this.Spell2Id.GetHashCode();
                if (this.SummonerInternalName != null)
                    hash = hash * 59 + this.SummonerInternalName.GetHashCode();
                return hash;
            }
        }

        /// <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;
        }
    }

}
