/*
 * Warframe.market API
 *
 * ## Documentation is under very slow and heavy development  This document will gradually be supplemented and updated over some extended period of time.  ## Unstable endpoints Endpoint that is not stable and probably will be changed in the future will be marked with exclamation sign -> âš  
 *
 * The version of the OpenAPI document: 1.14.0
 * 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 = WarframeMarket.Client.OpenAPIDateConverter;

namespace WarframeMarket.Model
{
    /// <summary>
    /// item drop from enemy
    /// </summary>
    [DataContract(Name = "Dropsource_npc_inner")]
    public partial class DropsourceNpcInner : IEquatable<DropsourceNpcInner>, IValidatableObject
    {
        /// <summary>
        /// How rare item is
        /// </summary>
        /// <value>How rare item is</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum RarityEnum
        {
            /// <summary>
            /// Enum VeryCommon for value: very_common
            /// </summary>
            [EnumMember(Value = "very_common")]
            VeryCommon = 1,

            /// <summary>
            /// Enum Common for value: common
            /// </summary>
            [EnumMember(Value = "common")]
            Common = 2,

            /// <summary>
            /// Enum Uncommon for value: uncommon
            /// </summary>
            [EnumMember(Value = "uncommon")]
            Uncommon = 3,

            /// <summary>
            /// Enum Rare for value: rare
            /// </summary>
            [EnumMember(Value = "rare")]
            Rare = 4,

            /// <summary>
            /// Enum Legendary for value: legendary
            /// </summary>
            [EnumMember(Value = "legendary")]
            Legendary = 5

        }


        /// <summary>
        /// How rare item is
        /// </summary>
        /// <value>How rare item is</value>
        [DataMember(Name = "rarity", EmitDefaultValue = false)]
        public RarityEnum? Rarity { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="DropsourceNpcInner" /> class.
        /// </summary>
        /// <param name="id">id.</param>
        /// <param name="rarity">How rare item is.</param>
        /// <param name="rate">the droprate of the item being dropped from the enemy&#39;s drop list, the final droprate should be multipled with chance.</param>
        public DropsourceNpcInner(string id = default(string), RarityEnum? rarity = default(RarityEnum?), decimal rate = default(decimal))
        {
            this.Id = id;
            this.Rarity = rarity;
            this.Rate = rate;
        }

        /// <summary>
        /// Gets or Sets Id
        /// </summary>
        /// <example>&quot;5a2feeb1c2c9e90cbdaa23d2&quot;</example>
        [DataMember(Name = "id", EmitDefaultValue = false)]
        public string Id { get; set; }

        /// <summary>
        /// the droprate of the item being dropped from the enemy&#39;s drop list, the final droprate should be multipled with chance
        /// </summary>
        /// <value>the droprate of the item being dropped from the enemy&#39;s drop list, the final droprate should be multipled with chance</value>
        /// <example>4.42</example>
        [DataMember(Name = "rate", EmitDefaultValue = false)]
        public decimal Rate { 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 DropsourceNpcInner {\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  Rarity: ").Append(Rarity).Append("\n");
            sb.Append("  Rate: ").Append(Rate).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 DropsourceNpcInner);
        }

        /// <summary>
        /// Returns true if DropsourceNpcInner instances are equal
        /// </summary>
        /// <param name="input">Instance of DropsourceNpcInner to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DropsourceNpcInner input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Id == input.Id ||
                    (this.Id != null &&
                    this.Id.Equals(input.Id))
                ) && 
                (
                    this.Rarity == input.Rarity ||
                    this.Rarity.Equals(input.Rarity)
                ) && 
                (
                    this.Rate == input.Rate ||
                    this.Rate.Equals(input.Rate)
                );
        }

        /// <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.Id != null)
                {
                    hashCode = (hashCode * 59) + this.Id.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Rarity.GetHashCode();
                hashCode = (hashCode * 59) + this.Rate.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;
        }
    }

}
