/* 
 * 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.Linq;
using System.Text;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;


namespace LeagueClientApi.Model
{
    /// <summary>
    /// LolStoreBundledItem
    /// </summary>
    [DataContract]
    public partial class LolStoreBundledItem :  IEquatable<LolStoreBundledItem>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="LolStoreBundledItem" /> class.
        /// </summary>
        /// <param name="DiscountPrices">DiscountPrices.</param>
        /// <param name="InventoryType">InventoryType.</param>
        /// <param name="ItemId">ItemId.</param>
        /// <param name="Quantity">Quantity.</param>
        public LolStoreBundledItem(List<LolStoreBundledItemCost> DiscountPrices = default(List<LolStoreBundledItemCost>), string InventoryType = default(string), int? ItemId = default(int?), int? Quantity = default(int?))
        {
            this.DiscountPrices = DiscountPrices;
            this.InventoryType = InventoryType;
            this.ItemId = ItemId;
            this.Quantity = Quantity;
        }
        
        /// <summary>
        /// Gets or Sets DiscountPrices
        /// </summary>
        [DataMember(Name="discountPrices", EmitDefaultValue=false)]
        public List<LolStoreBundledItemCost> DiscountPrices { get; set; }

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

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

        /// <summary>
        /// Gets or Sets Quantity
        /// </summary>
        [DataMember(Name="quantity", EmitDefaultValue=false)]
        public int? Quantity { 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 LolStoreBundledItem {\n");
            sb.Append("  DiscountPrices: ").Append(DiscountPrices).Append("\n");
            sb.Append("  InventoryType: ").Append(InventoryType).Append("\n");
            sb.Append("  ItemId: ").Append(ItemId).Append("\n");
            sb.Append("  Quantity: ").Append(Quantity).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 LolStoreBundledItem);
        }

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

            return 
                (
                    this.DiscountPrices == other.DiscountPrices ||
                    this.DiscountPrices != null &&
                    this.DiscountPrices.SequenceEqual(other.DiscountPrices)
                ) && 
                (
                    this.InventoryType == other.InventoryType ||
                    this.InventoryType != null &&
                    this.InventoryType.Equals(other.InventoryType)
                ) && 
                (
                    this.ItemId == other.ItemId ||
                    this.ItemId != null &&
                    this.ItemId.Equals(other.ItemId)
                ) && 
                (
                    this.Quantity == other.Quantity ||
                    this.Quantity != null &&
                    this.Quantity.Equals(other.Quantity)
                );
        }

        /// <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.DiscountPrices != null)
                    hash = hash * 59 + this.DiscountPrices.GetHashCode();
                if (this.InventoryType != null)
                    hash = hash * 59 + this.InventoryType.GetHashCode();
                if (this.ItemId != null)
                    hash = hash * 59 + this.ItemId.GetHashCode();
                if (this.Quantity != null)
                    hash = hash * 59 + this.Quantity.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;
        }
    }

}
