/*
 * 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>
    /// CurrentUser
    /// </summary>
    [DataContract(Name = "currentUser")]
    public partial class CurrentUser : IEquatable<CurrentUser>, IValidatableObject
    {
        /// <summary>
        /// Defines Role
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum RoleEnum
        {
            /// <summary>
            /// Enum Anonymous for value: anonymous
            /// </summary>
            [EnumMember(Value = "anonymous")]
            Anonymous = 1,

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

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

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


        /// <summary>
        /// Gets or Sets Role
        /// </summary>
        [DataMember(Name = "role", EmitDefaultValue = false)]
        public RoleEnum? Role { get; set; }
        /// <summary>
        /// Defines Platform
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum PlatformEnum
        {
            /// <summary>
            /// Enum Ps4 for value: ps4
            /// </summary>
            [EnumMember(Value = "ps4")]
            Ps4 = 1,

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

            /// <summary>
            /// Enum Xbox for value: xbox
            /// </summary>
            [EnumMember(Value = "xbox")]
            Xbox = 3
        }


        /// <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="CurrentUser" /> class.
        /// </summary>
        /// <param name="id">id.</param>
        /// <param name="anonymous">anonymous.</param>
        /// <param name="verification">verification.</param>
        /// <param name="ingameName">ingameName.</param>
        /// <param name="checkCode">checkCode.</param>
        /// <param name="role">role.</param>
        /// <param name="patreonProfile">patreonProfile.</param>
        /// <param name="platform">platform.</param>
        /// <param name="region">region.</param>
        /// <param name="banned">banned.</param>
        /// <param name="banReason">banReason.</param>
        /// <param name="avatar">Path to user avatar in static folder..</param>
        /// <param name="background">Path to user background in static folder..</param>
        /// <param name="linkedAccounts">linkedAccounts.</param>
        /// <param name="hasEmail">hasEmail.</param>
        /// <param name="writtenReviews">how much reviews user wrote today..</param>
        /// <param name="unreadMessages">unreadMessages.</param>
        public CurrentUser(string id = default(string), bool anonymous = default(bool), bool verification = default(bool), string ingameName = default(string), string checkCode = default(string), RoleEnum? role = default(RoleEnum?), CurrentUserPatreonProfile patreonProfile = default(CurrentUserPatreonProfile), PlatformEnum? platform = default(PlatformEnum?), string region = default(string), bool banned = default(bool), string banReason = default(string), string avatar = default(string), string background = default(string), CurrentUserLinkedAccounts linkedAccounts = default(CurrentUserLinkedAccounts), bool hasEmail = default(bool), int writtenReviews = default(int), int unreadMessages = default(int))
        {
            this.Id = id;
            this.Anonymous = anonymous;
            this.Verification = verification;
            this.IngameName = ingameName;
            this.CheckCode = checkCode;
            this.Role = role;
            this.PatreonProfile = patreonProfile;
            this.Platform = platform;
            this.Region = region;
            this.Banned = banned;
            this.BanReason = banReason;
            this.Avatar = avatar;
            this.Background = background;
            this.LinkedAccounts = linkedAccounts;
            this.HasEmail = hasEmail;
            this.WrittenReviews = writtenReviews;
            this.UnreadMessages = unreadMessages;
        }

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

        /// <summary>
        /// Gets or Sets Anonymous
        /// </summary>
        [DataMember(Name = "anonymous", EmitDefaultValue = true)]
        public bool Anonymous { get; set; }

        /// <summary>
        /// Gets or Sets Verification
        /// </summary>
        [DataMember(Name = "verification", EmitDefaultValue = true)]
        public bool Verification { get; set; }

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

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

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

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

        /// <summary>
        /// Gets or Sets Banned
        /// </summary>
        [DataMember(Name = "banned", EmitDefaultValue = true)]
        public bool Banned { get; set; }

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

        /// <summary>
        /// Path to user avatar in static folder.
        /// </summary>
        /// <value>Path to user avatar in static folder.</value>
        [DataMember(Name = "avatar", EmitDefaultValue = false)]
        public string Avatar { get; set; }

        /// <summary>
        /// Path to user background in static folder.
        /// </summary>
        /// <value>Path to user background in static folder.</value>
        [DataMember(Name = "background", EmitDefaultValue = false)]
        public string Background { get; set; }

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

        /// <summary>
        /// Gets or Sets HasEmail
        /// </summary>
        [DataMember(Name = "has_email", EmitDefaultValue = true)]
        public bool HasEmail { get; set; }

        /// <summary>
        /// how much reviews user wrote today.
        /// </summary>
        /// <value>how much reviews user wrote today.</value>
        [DataMember(Name = "written_reviews", EmitDefaultValue = false)]
        public int WrittenReviews { get; set; }

        /// <summary>
        /// Gets or Sets UnreadMessages
        /// </summary>
        [DataMember(Name = "unread_messages", EmitDefaultValue = false)]
        public int UnreadMessages { 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 CurrentUser {\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  Anonymous: ").Append(Anonymous).Append("\n");
            sb.Append("  Verification: ").Append(Verification).Append("\n");
            sb.Append("  IngameName: ").Append(IngameName).Append("\n");
            sb.Append("  CheckCode: ").Append(CheckCode).Append("\n");
            sb.Append("  Role: ").Append(Role).Append("\n");
            sb.Append("  PatreonProfile: ").Append(PatreonProfile).Append("\n");
            sb.Append("  Platform: ").Append(Platform).Append("\n");
            sb.Append("  Region: ").Append(Region).Append("\n");
            sb.Append("  Banned: ").Append(Banned).Append("\n");
            sb.Append("  BanReason: ").Append(BanReason).Append("\n");
            sb.Append("  Avatar: ").Append(Avatar).Append("\n");
            sb.Append("  Background: ").Append(Background).Append("\n");
            sb.Append("  LinkedAccounts: ").Append(LinkedAccounts).Append("\n");
            sb.Append("  HasEmail: ").Append(HasEmail).Append("\n");
            sb.Append("  WrittenReviews: ").Append(WrittenReviews).Append("\n");
            sb.Append("  UnreadMessages: ").Append(UnreadMessages).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 CurrentUser);
        }

        /// <summary>
        /// Returns true if CurrentUser instances are equal
        /// </summary>
        /// <param name="input">Instance of CurrentUser to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CurrentUser input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Id == input.Id ||
                    (this.Id != null &&
                    this.Id.Equals(input.Id))
                ) && 
                (
                    this.Anonymous == input.Anonymous ||
                    this.Anonymous.Equals(input.Anonymous)
                ) && 
                (
                    this.Verification == input.Verification ||
                    this.Verification.Equals(input.Verification)
                ) && 
                (
                    this.IngameName == input.IngameName ||
                    (this.IngameName != null &&
                    this.IngameName.Equals(input.IngameName))
                ) && 
                (
                    this.CheckCode == input.CheckCode ||
                    (this.CheckCode != null &&
                    this.CheckCode.Equals(input.CheckCode))
                ) && 
                (
                    this.Role == input.Role ||
                    this.Role.Equals(input.Role)
                ) && 
                (
                    this.PatreonProfile == input.PatreonProfile ||
                    (this.PatreonProfile != null &&
                    this.PatreonProfile.Equals(input.PatreonProfile))
                ) && 
                (
                    this.Platform == input.Platform ||
                    this.Platform.Equals(input.Platform)
                ) && 
                (
                    this.Region == input.Region ||
                    (this.Region != null &&
                    this.Region.Equals(input.Region))
                ) && 
                (
                    this.Banned == input.Banned ||
                    this.Banned.Equals(input.Banned)
                ) && 
                (
                    this.BanReason == input.BanReason ||
                    (this.BanReason != null &&
                    this.BanReason.Equals(input.BanReason))
                ) && 
                (
                    this.Avatar == input.Avatar ||
                    (this.Avatar != null &&
                    this.Avatar.Equals(input.Avatar))
                ) && 
                (
                    this.Background == input.Background ||
                    (this.Background != null &&
                    this.Background.Equals(input.Background))
                ) && 
                (
                    this.LinkedAccounts == input.LinkedAccounts ||
                    (this.LinkedAccounts != null &&
                    this.LinkedAccounts.Equals(input.LinkedAccounts))
                ) && 
                (
                    this.HasEmail == input.HasEmail ||
                    this.HasEmail.Equals(input.HasEmail)
                ) && 
                (
                    this.WrittenReviews == input.WrittenReviews ||
                    this.WrittenReviews.Equals(input.WrittenReviews)
                ) && 
                (
                    this.UnreadMessages == input.UnreadMessages ||
                    this.UnreadMessages.Equals(input.UnreadMessages)
                );
        }

        /// <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.Anonymous.GetHashCode();
                hashCode = (hashCode * 59) + this.Verification.GetHashCode();
                if (this.IngameName != null)
                {
                    hashCode = (hashCode * 59) + this.IngameName.GetHashCode();
                }
                if (this.CheckCode != null)
                {
                    hashCode = (hashCode * 59) + this.CheckCode.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Role.GetHashCode();
                if (this.PatreonProfile != null)
                {
                    hashCode = (hashCode * 59) + this.PatreonProfile.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Platform.GetHashCode();
                if (this.Region != null)
                {
                    hashCode = (hashCode * 59) + this.Region.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Banned.GetHashCode();
                if (this.BanReason != null)
                {
                    hashCode = (hashCode * 59) + this.BanReason.GetHashCode();
                }
                if (this.Avatar != null)
                {
                    hashCode = (hashCode * 59) + this.Avatar.GetHashCode();
                }
                if (this.Background != null)
                {
                    hashCode = (hashCode * 59) + this.Background.GetHashCode();
                }
                if (this.LinkedAccounts != null)
                {
                    hashCode = (hashCode * 59) + this.LinkedAccounts.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.HasEmail.GetHashCode();
                hashCode = (hashCode * 59) + this.WrittenReviews.GetHashCode();
                hashCode = (hashCode * 59) + this.UnreadMessages.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;
        }
    }

}
