/*
 * 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>
    /// ProfileOrdersPost200ResponsePayloadOrder
    /// </summary>
    [DataContract(Name = "_profile_orders_post_200_response_payload_order")]
    public partial class ProfileOrdersPost200ResponsePayloadOrder : IEquatable<ProfileOrdersPost200ResponsePayloadOrder>, IValidatableObject
    {
        /// <summary>
        /// Defines OrderType
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum OrderTypeEnum
        {
            /// <summary>
            /// Enum Sell for value: sell
            /// </summary>
            [EnumMember(Value = "sell")]
            Sell = 1,

            /// <summary>
            /// Enum Buy for value: buy
            /// </summary>
            [EnumMember(Value = "buy")]
            Buy = 2
        }


        /// <summary>
        /// Gets or Sets OrderType
        /// </summary>
        [DataMember(Name = "order_type", EmitDefaultValue = false)]
        public OrderTypeEnum? OrderType { get; set; }
        /// <summary>
        /// Defines Platform
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum PlatformEnum
        {
            /// <summary>
            /// Enum Xbox for value: xbox
            /// </summary>
            [EnumMember(Value = "xbox")]
            Xbox = 1,

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

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

            /// <summary>
            /// Enum Switch for value: switch
            /// </summary>
            [EnumMember(Value = "switch")]
            Switch = 4
        }


        /// <summary>
        /// Gets or Sets Platform
        /// </summary>
        [DataMember(Name = "platform", EmitDefaultValue = false)]
        public PlatformEnum? Platform { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="ProfileOrdersPost200ResponsePayloadOrder" /> class.
        /// </summary>
        /// <param name="id">id.</param>
        /// <param name="platinum">platinum.</param>
        /// <param name="quantity">quantity.</param>
        /// <param name="orderType">orderType.</param>
        /// <param name="platform">platform.</param>
        /// <param name="region">will be deprecated eventually.</param>
        /// <param name="creationDate">creationDate.</param>
        /// <param name="lastUpdate">lastUpdate.</param>
        /// <param name="subtype">subtyppe oof an item, all valid subtypes defined inside Item model &#x60;subtypes&#x60; field.</param>
        /// <param name="visible">Is this order visible? All public orders will be visible, and only orders in your profile could be invisible. .</param>
        /// <param name="item">item.</param>
        public ProfileOrdersPost200ResponsePayloadOrder(string id = default(string), int platinum = default(int), int quantity = default(int), OrderTypeEnum? orderType = default(OrderTypeEnum?), PlatformEnum? platform = default(PlatformEnum?), string region = default(string), DateTime creationDate = default(DateTime), DateTime lastUpdate = default(DateTime), string subtype = default(string), bool visible = default(bool), ItemInOrder item = default(ItemInOrder))
        {
            this.Id = id;
            this.Platinum = platinum;
            this.Quantity = quantity;
            this.OrderType = orderType;
            this.Platform = platform;
            this.Region = region;
            this.CreationDate = creationDate;
            this.LastUpdate = lastUpdate;
            this.Subtype = subtype;
            this.Visible = visible;
            this.Item = item;
        }

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

        /// <summary>
        /// Gets or Sets Platinum
        /// </summary>
        /// <example>2</example>
        [DataMember(Name = "platinum", EmitDefaultValue = false)]
        public int Platinum { get; set; }

        /// <summary>
        /// Gets or Sets Quantity
        /// </summary>
        /// <example>12</example>
        [DataMember(Name = "quantity", EmitDefaultValue = false)]
        public int Quantity { get; set; }

        /// <summary>
        /// will be deprecated eventually
        /// </summary>
        /// <value>will be deprecated eventually</value>
        [DataMember(Name = "region", EmitDefaultValue = false)]
        public string Region { get; set; }

        /// <summary>
        /// Gets or Sets CreationDate
        /// </summary>
        /// <example>2021-03-15T15:53:38Z</example>
        [DataMember(Name = "creation_date", EmitDefaultValue = false)]
        public DateTime CreationDate { get; set; }

        /// <summary>
        /// Gets or Sets LastUpdate
        /// </summary>
        /// <example>2021-03-15T15:53:38Z</example>
        [DataMember(Name = "last_update", EmitDefaultValue = false)]
        public DateTime LastUpdate { get; set; }

        /// <summary>
        /// subtyppe oof an item, all valid subtypes defined inside Item model &#x60;subtypes&#x60; field
        /// </summary>
        /// <value>subtyppe oof an item, all valid subtypes defined inside Item model &#x60;subtypes&#x60; field</value>
        /// <example>exceptional</example>
        [DataMember(Name = "subtype", EmitDefaultValue = false)]
        public string Subtype { get; set; }

        /// <summary>
        /// Is this order visible? All public orders will be visible, and only orders in your profile could be invisible. 
        /// </summary>
        /// <value>Is this order visible? All public orders will be visible, and only orders in your profile could be invisible. </value>
        /// <example>true</example>
        [DataMember(Name = "visible", EmitDefaultValue = true)]
        public bool Visible { get; set; }

        /// <summary>
        /// Gets or Sets Item
        /// </summary>
        [DataMember(Name = "item", EmitDefaultValue = false)]
        public ItemInOrder Item { 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 ProfileOrdersPost200ResponsePayloadOrder {\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  Platinum: ").Append(Platinum).Append("\n");
            sb.Append("  Quantity: ").Append(Quantity).Append("\n");
            sb.Append("  OrderType: ").Append(OrderType).Append("\n");
            sb.Append("  Platform: ").Append(Platform).Append("\n");
            sb.Append("  Region: ").Append(Region).Append("\n");
            sb.Append("  CreationDate: ").Append(CreationDate).Append("\n");
            sb.Append("  LastUpdate: ").Append(LastUpdate).Append("\n");
            sb.Append("  Subtype: ").Append(Subtype).Append("\n");
            sb.Append("  Visible: ").Append(Visible).Append("\n");
            sb.Append("  Item: ").Append(Item).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 ProfileOrdersPost200ResponsePayloadOrder);
        }

        /// <summary>
        /// Returns true if ProfileOrdersPost200ResponsePayloadOrder instances are equal
        /// </summary>
        /// <param name="input">Instance of ProfileOrdersPost200ResponsePayloadOrder to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ProfileOrdersPost200ResponsePayloadOrder input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Id == input.Id ||
                    (this.Id != null &&
                    this.Id.Equals(input.Id))
                ) && 
                (
                    this.Platinum == input.Platinum ||
                    this.Platinum.Equals(input.Platinum)
                ) && 
                (
                    this.Quantity == input.Quantity ||
                    this.Quantity.Equals(input.Quantity)
                ) && 
                (
                    this.OrderType == input.OrderType ||
                    this.OrderType.Equals(input.OrderType)
                ) && 
                (
                    this.Platform == input.Platform ||
                    this.Platform.Equals(input.Platform)
                ) && 
                (
                    this.Region == input.Region ||
                    (this.Region != null &&
                    this.Region.Equals(input.Region))
                ) && 
                (
                    this.CreationDate == input.CreationDate ||
                    (this.CreationDate != null &&
                    this.CreationDate.Equals(input.CreationDate))
                ) && 
                (
                    this.LastUpdate == input.LastUpdate ||
                    (this.LastUpdate != null &&
                    this.LastUpdate.Equals(input.LastUpdate))
                ) && 
                (
                    this.Subtype == input.Subtype ||
                    (this.Subtype != null &&
                    this.Subtype.Equals(input.Subtype))
                ) && 
                (
                    this.Visible == input.Visible ||
                    this.Visible.Equals(input.Visible)
                ) && 
                (
                    this.Item == input.Item ||
                    (this.Item != null &&
                    this.Item.Equals(input.Item))
                );
        }

        /// <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.Platinum.GetHashCode();
                hashCode = (hashCode * 59) + this.Quantity.GetHashCode();
                hashCode = (hashCode * 59) + this.OrderType.GetHashCode();
                hashCode = (hashCode * 59) + this.Platform.GetHashCode();
                if (this.Region != null)
                {
                    hashCode = (hashCode * 59) + this.Region.GetHashCode();
                }
                if (this.CreationDate != null)
                {
                    hashCode = (hashCode * 59) + this.CreationDate.GetHashCode();
                }
                if (this.LastUpdate != null)
                {
                    hashCode = (hashCode * 59) + this.LastUpdate.GetHashCode();
                }
                if (this.Subtype != null)
                {
                    hashCode = (hashCode * 59) + this.Subtype.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Visible.GetHashCode();
                if (this.Item != null)
                {
                    hashCode = (hashCode * 59) + this.Item.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;
        }
    }

}
