/*
 * 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>
    /// The results of an Equipping operation performed through the Destiny API.
    /// </summary>
    [DataContract(Name = "Destiny.DestinyEquipItemResult")]
    public partial class DestinyDestinyEquipItemResult : IEquatable<DestinyDestinyEquipItemResult>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DestinyDestinyEquipItemResult" /> class.
        /// </summary>
        /// <param name="itemInstanceId">The instance ID of the item in question (all items that can be equipped must, but definition, be Instanced and thus have an Instance ID that you can use to refer to them).</param>
        /// <param name="equipStatus">A PlatformErrorCodes enum indicating whether it succeeded, and if it failed why..</param>
        public DestinyDestinyEquipItemResult(long itemInstanceId = default(long), int equipStatus = default(int))
        {
            this.ItemInstanceId = itemInstanceId;
            this.EquipStatus = equipStatus;
        }

        /// <summary>
        /// The instance ID of the item in question (all items that can be equipped must, but definition, be Instanced and thus have an Instance ID that you can use to refer to them)
        /// </summary>
        /// <value>The instance ID of the item in question (all items that can be equipped must, but definition, be Instanced and thus have an Instance ID that you can use to refer to them)</value>
        [DataMember(Name = "itemInstanceId", EmitDefaultValue = false)]
        public long ItemInstanceId { get; set; }

        /// <summary>
        /// A PlatformErrorCodes enum indicating whether it succeeded, and if it failed why.
        /// </summary>
        /// <value>A PlatformErrorCodes enum indicating whether it succeeded, and if it failed why.</value>
        [DataMember(Name = "equipStatus", EmitDefaultValue = false)]
        public int EquipStatus { 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 DestinyDestinyEquipItemResult {\n");
            sb.Append("  ItemInstanceId: ").Append(ItemInstanceId).Append("\n");
            sb.Append("  EquipStatus: ").Append(EquipStatus).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 DestinyDestinyEquipItemResult);
        }

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

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                hashCode = (hashCode * 59) + this.ItemInstanceId.GetHashCode();
                hashCode = (hashCode * 59) + this.EquipStatus.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;
        }
    }

}
