/*
 * 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>
    /// ItemShort
    /// </summary>
    [DataContract(Name = "ItemShort")]
    public partial class ItemShort : IEquatable<ItemShort>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ItemShort" /> class.
        /// </summary>
        /// <param name="id">id.</param>
        /// <param name="urlName">urlName.</param>
        /// <param name="thumb">Small icon.</param>
        /// <param name="itemName">depends on you &#x60;Language&#x60; header.</param>
        /// <param name="vaulted">null if not vaulted.</param>
        public ItemShort(string id = default(string), string urlName = default(string), string thumb = default(string), string itemName = default(string), bool? vaulted = default(bool?))
        {
            this.Id = id;
            this.UrlName = urlName;
            this.Thumb = thumb;
            this.ItemName = itemName;
            this.Vaulted = vaulted;
        }

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

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

        /// <summary>
        /// Small icon
        /// </summary>
        /// <value>Small icon</value>
        /// <example>icons/en/thumbs/Mirage_Prime_Set.e7f8f484dd6ae6c35f0767fff35a5109.128x128.png</example>
        [DataMember(Name = "thumb", EmitDefaultValue = false)]
        public string Thumb { get; set; }

        /// <summary>
        /// depends on you &#x60;Language&#x60; header
        /// </summary>
        /// <value>depends on you &#x60;Language&#x60; header</value>
        /// <example>Mirage Prime Systems</example>
        [DataMember(Name = "item_name", EmitDefaultValue = false)]
        public string ItemName { get; set; }

        /// <summary>
        /// null if not vaulted
        /// </summary>
        /// <value>null if not vaulted</value>
        /// <example>true</example>
        [DataMember(Name = "vaulted", EmitDefaultValue = true)]
        public bool? Vaulted { 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 ItemShort {\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  UrlName: ").Append(UrlName).Append("\n");
            sb.Append("  Thumb: ").Append(Thumb).Append("\n");
            sb.Append("  ItemName: ").Append(ItemName).Append("\n");
            sb.Append("  Vaulted: ").Append(Vaulted).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 ItemShort);
        }

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

        /// <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();
                }
                if (this.UrlName != null)
                {
                    hashCode = (hashCode * 59) + this.UrlName.GetHashCode();
                }
                if (this.Thumb != null)
                {
                    hashCode = (hashCode * 59) + this.Thumb.GetHashCode();
                }
                if (this.ItemName != null)
                {
                    hashCode = (hashCode * 59) + this.ItemName.GetHashCode();
                }
                if (this.Vaulted != null)
                {
                    hashCode = (hashCode * 59) + this.Vaulted.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;
        }
    }

}
