/*
 * 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>
    /// RivenAttribute
    /// </summary>
    [DataContract(Name = "rivenAttribute")]
    public partial class RivenAttribute : IEquatable<RivenAttribute>, IValidatableObject
    {
        /// <summary>
        /// Group of the attribute, like top, melee, etc.   Used for grouping within UI elements. 
        /// </summary>
        /// <value>Group of the attribute, like top, melee, etc.   Used for grouping within UI elements. </value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum GroupEnum
        {
            /// <summary>
            /// Enum Default for value: default
            /// </summary>
            [EnumMember(Value = "default")]
            Default = 1,

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

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


        /// <summary>
        /// Group of the attribute, like top, melee, etc.   Used for grouping within UI elements. 
        /// </summary>
        /// <value>Group of the attribute, like top, melee, etc.   Used for grouping within UI elements. </value>
        /// <example>default</example>
        [DataMember(Name = "group", EmitDefaultValue = false)]
        public GroupEnum? Group { get; set; }
        /// <summary>
        /// This attribute is only available on specific types of items, check item property: &#x60;riven_type&#x60;   If &#x60;null&#x60;, then this attribute can be selected on every item. 
        /// </summary>
        /// <value>This attribute is only available on specific types of items, check item property: &#x60;riven_type&#x60;   If &#x60;null&#x60;, then this attribute can be selected on every item. </value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum ExclusiveToEnum
        {
            /// <summary>
            /// Enum Kitgun for value: kitgun
            /// </summary>
            [EnumMember(Value = "kitgun")]
            Kitgun = 1,

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

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

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

            /// <summary>
            /// Enum Melee for value: melee
            /// </summary>
            [EnumMember(Value = "melee")]
            Melee = 5,

            /// <summary>
            /// Enum Zaw for value: zaw
            /// </summary>
            [EnumMember(Value = "zaw")]
            Zaw = 6,

            /// <summary>
            /// Enum Null for value: null
            /// </summary>
            [EnumMember(Value = "null")]
            Null = 7
        }


        /// <summary>
        /// This attribute is only available on specific types of items, check item property: &#x60;riven_type&#x60;   If &#x60;null&#x60;, then this attribute can be selected on every item. 
        /// </summary>
        /// <value>This attribute is only available on specific types of items, check item property: &#x60;riven_type&#x60;   If &#x60;null&#x60;, then this attribute can be selected on every item. </value>
        [DataMember(Name = "exclusive_to", EmitDefaultValue = true)]
        public ExclusiveToEnum? ExclusiveTo { get; set; }
        /// <summary>
        /// measurement units
        /// </summary>
        /// <value>measurement units</value>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum UnitsEnum
        {
            /// <summary>
            /// Enum Percent for value: percent
            /// </summary>
            [EnumMember(Value = "percent")]
            Percent = 1,

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

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


        /// <summary>
        /// measurement units
        /// </summary>
        /// <value>measurement units</value>
        /// <example>seconds</example>
        [DataMember(Name = "units", EmitDefaultValue = true)]
        public UnitsEnum? Units { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="RivenAttribute" /> class.
        /// </summary>
        /// <param name="id">id.</param>
        /// <param name="urlName">urlName.</param>
        /// <param name="group">Group of the attribute, like top, melee, etc.   Used for grouping within UI elements. .</param>
        /// <param name="prefix">prefix.</param>
        /// <param name="suffix">suffix.</param>
        /// <param name="positiveIsNegative">Negative value of this attribute indicate that attribute is positive, e.g. &#x60;Recoil&#x60;..</param>
        /// <param name="exclusiveTo">This attribute is only available on specific types of items, check item property: &#x60;riven_type&#x60;   If &#x60;null&#x60;, then this attribute can be selected on every item. .</param>
        /// <param name="effect">Name of the attribute, depends on the requested language (headers).</param>
        /// <param name="units">measurement units.</param>
        /// <param name="negativeOnly">This attribute occurs only as a negative..</param>
        /// <param name="searchOnly">used only while searching for auctions.</param>
        public RivenAttribute(string id = default(string), string urlName = default(string), GroupEnum? group = default(GroupEnum?), string prefix = default(string), string suffix = default(string), bool positiveIsNegative = default(bool), ExclusiveToEnum? exclusiveTo = default(ExclusiveToEnum?), string effect = default(string), UnitsEnum? units = default(UnitsEnum?), bool negativeOnly = default(bool), bool searchOnly = default(bool))
        {
            this.Id = id;
            this.UrlName = urlName;
            this.Group = group;
            this.Prefix = prefix;
            this.Suffix = suffix;
            this.PositiveIsNegative = positiveIsNegative;
            this.ExclusiveTo = exclusiveTo;
            this.Effect = effect;
            this.Units = units;
            this.NegativeOnly = negativeOnly;
            this.SearchOnly = searchOnly;
        }

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

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

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

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

        /// <summary>
        /// Negative value of this attribute indicate that attribute is positive, e.g. &#x60;Recoil&#x60;.
        /// </summary>
        /// <value>Negative value of this attribute indicate that attribute is positive, e.g. &#x60;Recoil&#x60;.</value>
        /// <example>false</example>
        [DataMember(Name = "positive_is_negative", EmitDefaultValue = true)]
        public bool PositiveIsNegative { get; set; }

        /// <summary>
        /// Name of the attribute, depends on the requested language (headers)
        /// </summary>
        /// <value>Name of the attribute, depends on the requested language (headers)</value>
        /// <example>Ammo Maximum</example>
        [DataMember(Name = "effect", EmitDefaultValue = false)]
        public string Effect { get; set; }

        /// <summary>
        /// This attribute occurs only as a negative.
        /// </summary>
        /// <value>This attribute occurs only as a negative.</value>
        /// <example>false</example>
        [DataMember(Name = "negative_only", EmitDefaultValue = true)]
        public bool NegativeOnly { get; set; }

        /// <summary>
        /// used only while searching for auctions
        /// </summary>
        /// <value>used only while searching for auctions</value>
        /// <example>true</example>
        [DataMember(Name = "search_only", EmitDefaultValue = true)]
        public bool SearchOnly { 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 RivenAttribute {\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  UrlName: ").Append(UrlName).Append("\n");
            sb.Append("  Group: ").Append(Group).Append("\n");
            sb.Append("  Prefix: ").Append(Prefix).Append("\n");
            sb.Append("  Suffix: ").Append(Suffix).Append("\n");
            sb.Append("  PositiveIsNegative: ").Append(PositiveIsNegative).Append("\n");
            sb.Append("  ExclusiveTo: ").Append(ExclusiveTo).Append("\n");
            sb.Append("  Effect: ").Append(Effect).Append("\n");
            sb.Append("  Units: ").Append(Units).Append("\n");
            sb.Append("  NegativeOnly: ").Append(NegativeOnly).Append("\n");
            sb.Append("  SearchOnly: ").Append(SearchOnly).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 RivenAttribute);
        }

        /// <summary>
        /// Returns true if RivenAttribute instances are equal
        /// </summary>
        /// <param name="input">Instance of RivenAttribute to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(RivenAttribute 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.Group == input.Group ||
                    this.Group.Equals(input.Group)
                ) && 
                (
                    this.Prefix == input.Prefix ||
                    (this.Prefix != null &&
                    this.Prefix.Equals(input.Prefix))
                ) && 
                (
                    this.Suffix == input.Suffix ||
                    (this.Suffix != null &&
                    this.Suffix.Equals(input.Suffix))
                ) && 
                (
                    this.PositiveIsNegative == input.PositiveIsNegative ||
                    this.PositiveIsNegative.Equals(input.PositiveIsNegative)
                ) && 
                (
                    this.ExclusiveTo == input.ExclusiveTo ||
                    this.ExclusiveTo.Equals(input.ExclusiveTo)
                ) && 
                (
                    this.Effect == input.Effect ||
                    (this.Effect != null &&
                    this.Effect.Equals(input.Effect))
                ) && 
                (
                    this.Units == input.Units ||
                    this.Units.Equals(input.Units)
                ) && 
                (
                    this.NegativeOnly == input.NegativeOnly ||
                    this.NegativeOnly.Equals(input.NegativeOnly)
                ) && 
                (
                    this.SearchOnly == input.SearchOnly ||
                    this.SearchOnly.Equals(input.SearchOnly)
                );
        }

        /// <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();
                }
                hashCode = (hashCode * 59) + this.Group.GetHashCode();
                if (this.Prefix != null)
                {
                    hashCode = (hashCode * 59) + this.Prefix.GetHashCode();
                }
                if (this.Suffix != null)
                {
                    hashCode = (hashCode * 59) + this.Suffix.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.PositiveIsNegative.GetHashCode();
                hashCode = (hashCode * 59) + this.ExclusiveTo.GetHashCode();
                if (this.Effect != null)
                {
                    hashCode = (hashCode * 59) + this.Effect.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Units.GetHashCode();
                hashCode = (hashCode * 59) + this.NegativeOnly.GetHashCode();
                hashCode = (hashCode * 59) + this.SearchOnly.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;
        }
    }

}
