/*
 * 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>
    /// On to one of the more confusing subjects of the API. What is a Destination, and what is the relationship between it, Activities, Locations, and Places?  A \&quot;Destination\&quot; is a specific region/city/area of a larger \&quot;Place\&quot;. For instance, a Place might be Earth where a Destination might be Bellevue, Washington. (Please, pick a more interesting destination if you come to visit Earth).
    /// </summary>
    [DataContract(Name = "Destiny.Definitions.DestinyDestinationDefinition")]
    public partial class DestinyDefinitionsDestinyDestinationDefinition : IEquatable<DestinyDefinitionsDestinyDestinationDefinition>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DestinyDefinitionsDestinyDestinationDefinition" /> class.
        /// </summary>
        /// <param name="displayProperties">displayProperties.</param>
        /// <param name="placeHash">The place that \&quot;owns\&quot; this Destination. Use this hash to look up the DestinyPlaceDefinition..</param>
        /// <param name="defaultFreeroamActivityHash">If this Destination has a default Free-Roam activity, this is the hash for that Activity. Use it to look up the DestinyActivityDefintion..</param>
        /// <param name="activityGraphEntries">If the Destination has default Activity Graphs (i.e. \&quot;Map\&quot;) that should be shown in the director, this is the list of those Graphs. At most, only one should be active at any given time for a Destination: these would represent, for example, different variants on a Map if the Destination is changing on a macro level based on game state..</param>
        /// <param name="bubbleSettings">A Destination may have many \&quot;Bubbles\&quot; zones with human readable properties.  We don&#39;t get as much info as I&#39;d like about them - I&#39;d love to return info like where on the map they are located - but at least this gives you the name of those bubbles. bubbleSettings and bubbles both have the identical number of entries, and you should match up their indexes to provide matching bubble and bubbleSettings data.  DEPRECATED - Just use bubbles, it now has this data..</param>
        /// <param name="bubbles">This provides the unique identifiers for every bubble in the destination (only guaranteed unique within the destination), and any intrinsic properties of the bubble.  bubbleSettings and bubbles both have the identical number of entries, and you should match up their indexes to provide matching bubble and bubbleSettings data..</param>
        /// <param name="hash">The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally.  When entities refer to each other in Destiny content, it is this hash that they are referring to..</param>
        /// <param name="index">The index of the entity as it was found in the investment tables..</param>
        /// <param name="redacted">If this is true, then there is an entity with this identifier/type combination, but BNet is not yet allowed to show it. Sorry!.</param>
        public DestinyDefinitionsDestinyDestinationDefinition(DestinyDefinitionsCommonDestinyDisplayPropertiesDefinition displayProperties = default(DestinyDefinitionsCommonDestinyDisplayPropertiesDefinition), int placeHash = default(int), int defaultFreeroamActivityHash = default(int), List<DestinyDefinitionsDestinyActivityGraphListEntryDefinition> activityGraphEntries = default(List<DestinyDefinitionsDestinyActivityGraphListEntryDefinition>), List<DestinyDefinitionsDestinyDestinationBubbleSettingDefinition> bubbleSettings = default(List<DestinyDefinitionsDestinyDestinationBubbleSettingDefinition>), List<DestinyDefinitionsDestinyBubbleDefinition> bubbles = default(List<DestinyDefinitionsDestinyBubbleDefinition>), int hash = default(int), int index = default(int), bool redacted = default(bool))
        {
            this.DisplayProperties = displayProperties;
            this.PlaceHash = placeHash;
            this.DefaultFreeroamActivityHash = defaultFreeroamActivityHash;
            this.ActivityGraphEntries = activityGraphEntries;
            this.BubbleSettings = bubbleSettings;
            this.Bubbles = bubbles;
            this.Hash = hash;
            this.Index = index;
            this.Redacted = redacted;
        }

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

        /// <summary>
        /// The place that \&quot;owns\&quot; this Destination. Use this hash to look up the DestinyPlaceDefinition.
        /// </summary>
        /// <value>The place that \&quot;owns\&quot; this Destination. Use this hash to look up the DestinyPlaceDefinition.</value>
        [DataMember(Name = "placeHash", EmitDefaultValue = false)]
        public int PlaceHash { get; set; }

        /// <summary>
        /// If this Destination has a default Free-Roam activity, this is the hash for that Activity. Use it to look up the DestinyActivityDefintion.
        /// </summary>
        /// <value>If this Destination has a default Free-Roam activity, this is the hash for that Activity. Use it to look up the DestinyActivityDefintion.</value>
        [DataMember(Name = "defaultFreeroamActivityHash", EmitDefaultValue = false)]
        public int DefaultFreeroamActivityHash { get; set; }

        /// <summary>
        /// If the Destination has default Activity Graphs (i.e. \&quot;Map\&quot;) that should be shown in the director, this is the list of those Graphs. At most, only one should be active at any given time for a Destination: these would represent, for example, different variants on a Map if the Destination is changing on a macro level based on game state.
        /// </summary>
        /// <value>If the Destination has default Activity Graphs (i.e. \&quot;Map\&quot;) that should be shown in the director, this is the list of those Graphs. At most, only one should be active at any given time for a Destination: these would represent, for example, different variants on a Map if the Destination is changing on a macro level based on game state.</value>
        [DataMember(Name = "activityGraphEntries", EmitDefaultValue = false)]
        public List<DestinyDefinitionsDestinyActivityGraphListEntryDefinition> ActivityGraphEntries { get; set; }

        /// <summary>
        /// A Destination may have many \&quot;Bubbles\&quot; zones with human readable properties.  We don&#39;t get as much info as I&#39;d like about them - I&#39;d love to return info like where on the map they are located - but at least this gives you the name of those bubbles. bubbleSettings and bubbles both have the identical number of entries, and you should match up their indexes to provide matching bubble and bubbleSettings data.  DEPRECATED - Just use bubbles, it now has this data.
        /// </summary>
        /// <value>A Destination may have many \&quot;Bubbles\&quot; zones with human readable properties.  We don&#39;t get as much info as I&#39;d like about them - I&#39;d love to return info like where on the map they are located - but at least this gives you the name of those bubbles. bubbleSettings and bubbles both have the identical number of entries, and you should match up their indexes to provide matching bubble and bubbleSettings data.  DEPRECATED - Just use bubbles, it now has this data.</value>
        [DataMember(Name = "bubbleSettings", EmitDefaultValue = false)]
        public List<DestinyDefinitionsDestinyDestinationBubbleSettingDefinition> BubbleSettings { get; set; }

        /// <summary>
        /// This provides the unique identifiers for every bubble in the destination (only guaranteed unique within the destination), and any intrinsic properties of the bubble.  bubbleSettings and bubbles both have the identical number of entries, and you should match up their indexes to provide matching bubble and bubbleSettings data.
        /// </summary>
        /// <value>This provides the unique identifiers for every bubble in the destination (only guaranteed unique within the destination), and any intrinsic properties of the bubble.  bubbleSettings and bubbles both have the identical number of entries, and you should match up their indexes to provide matching bubble and bubbleSettings data.</value>
        [DataMember(Name = "bubbles", EmitDefaultValue = false)]
        public List<DestinyDefinitionsDestinyBubbleDefinition> Bubbles { get; set; }

        /// <summary>
        /// The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally.  When entities refer to each other in Destiny content, it is this hash that they are referring to.
        /// </summary>
        /// <value>The unique identifier for this entity. Guaranteed to be unique for the type of entity, but not globally.  When entities refer to each other in Destiny content, it is this hash that they are referring to.</value>
        [DataMember(Name = "hash", EmitDefaultValue = false)]
        public int Hash { get; set; }

        /// <summary>
        /// The index of the entity as it was found in the investment tables.
        /// </summary>
        /// <value>The index of the entity as it was found in the investment tables.</value>
        [DataMember(Name = "index", EmitDefaultValue = false)]
        public int Index { get; set; }

        /// <summary>
        /// If this is true, then there is an entity with this identifier/type combination, but BNet is not yet allowed to show it. Sorry!
        /// </summary>
        /// <value>If this is true, then there is an entity with this identifier/type combination, but BNet is not yet allowed to show it. Sorry!</value>
        [DataMember(Name = "redacted", EmitDefaultValue = true)]
        public bool Redacted { 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 DestinyDefinitionsDestinyDestinationDefinition {\n");
            sb.Append("  DisplayProperties: ").Append(DisplayProperties).Append("\n");
            sb.Append("  PlaceHash: ").Append(PlaceHash).Append("\n");
            sb.Append("  DefaultFreeroamActivityHash: ").Append(DefaultFreeroamActivityHash).Append("\n");
            sb.Append("  ActivityGraphEntries: ").Append(ActivityGraphEntries).Append("\n");
            sb.Append("  BubbleSettings: ").Append(BubbleSettings).Append("\n");
            sb.Append("  Bubbles: ").Append(Bubbles).Append("\n");
            sb.Append("  Hash: ").Append(Hash).Append("\n");
            sb.Append("  Index: ").Append(Index).Append("\n");
            sb.Append("  Redacted: ").Append(Redacted).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 DestinyDefinitionsDestinyDestinationDefinition);
        }

        /// <summary>
        /// Returns true if DestinyDefinitionsDestinyDestinationDefinition instances are equal
        /// </summary>
        /// <param name="input">Instance of DestinyDefinitionsDestinyDestinationDefinition to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DestinyDefinitionsDestinyDestinationDefinition input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.DisplayProperties == input.DisplayProperties ||
                    (this.DisplayProperties != null &&
                    this.DisplayProperties.Equals(input.DisplayProperties))
                ) && 
                (
                    this.PlaceHash == input.PlaceHash ||
                    this.PlaceHash.Equals(input.PlaceHash)
                ) && 
                (
                    this.DefaultFreeroamActivityHash == input.DefaultFreeroamActivityHash ||
                    this.DefaultFreeroamActivityHash.Equals(input.DefaultFreeroamActivityHash)
                ) && 
                (
                    this.ActivityGraphEntries == input.ActivityGraphEntries ||
                    this.ActivityGraphEntries != null &&
                    input.ActivityGraphEntries != null &&
                    this.ActivityGraphEntries.SequenceEqual(input.ActivityGraphEntries)
                ) && 
                (
                    this.BubbleSettings == input.BubbleSettings ||
                    this.BubbleSettings != null &&
                    input.BubbleSettings != null &&
                    this.BubbleSettings.SequenceEqual(input.BubbleSettings)
                ) && 
                (
                    this.Bubbles == input.Bubbles ||
                    this.Bubbles != null &&
                    input.Bubbles != null &&
                    this.Bubbles.SequenceEqual(input.Bubbles)
                ) && 
                (
                    this.Hash == input.Hash ||
                    this.Hash.Equals(input.Hash)
                ) && 
                (
                    this.Index == input.Index ||
                    this.Index.Equals(input.Index)
                ) && 
                (
                    this.Redacted == input.Redacted ||
                    this.Redacted.Equals(input.Redacted)
                );
        }

        /// <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.DisplayProperties != null)
                {
                    hashCode = (hashCode * 59) + this.DisplayProperties.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.PlaceHash.GetHashCode();
                hashCode = (hashCode * 59) + this.DefaultFreeroamActivityHash.GetHashCode();
                if (this.ActivityGraphEntries != null)
                {
                    hashCode = (hashCode * 59) + this.ActivityGraphEntries.GetHashCode();
                }
                if (this.BubbleSettings != null)
                {
                    hashCode = (hashCode * 59) + this.BubbleSettings.GetHashCode();
                }
                if (this.Bubbles != null)
                {
                    hashCode = (hashCode * 59) + this.Bubbles.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.Hash.GetHashCode();
                hashCode = (hashCode * 59) + this.Index.GetHashCode();
                hashCode = (hashCode * 59) + this.Redacted.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;
        }
    }

}
