/*
 * 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>
    /// This Block defines the rendering data associated with the item, if any.
    /// </summary>
    [DataContract(Name = "Destiny.Definitions.DestinyItemTranslationBlockDefinition")]
    public partial class DestinyDefinitionsDestinyItemTranslationBlockDefinition : IEquatable<DestinyDefinitionsDestinyItemTranslationBlockDefinition>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="DestinyDefinitionsDestinyItemTranslationBlockDefinition" /> class.
        /// </summary>
        /// <param name="weaponPatternIdentifier">weaponPatternIdentifier.</param>
        /// <param name="weaponPatternHash">weaponPatternHash.</param>
        /// <param name="defaultDyes">defaultDyes.</param>
        /// <param name="lockedDyes">lockedDyes.</param>
        /// <param name="customDyes">customDyes.</param>
        /// <param name="arrangements">arrangements.</param>
        /// <param name="hasGeometry">hasGeometry.</param>
        public DestinyDefinitionsDestinyItemTranslationBlockDefinition(string weaponPatternIdentifier = default(string), int weaponPatternHash = default(int), List<DestinyDyeReference> defaultDyes = default(List<DestinyDyeReference>), List<DestinyDyeReference> lockedDyes = default(List<DestinyDyeReference>), List<DestinyDyeReference> customDyes = default(List<DestinyDyeReference>), List<DestinyDefinitionsDestinyGearArtArrangementReference> arrangements = default(List<DestinyDefinitionsDestinyGearArtArrangementReference>), bool hasGeometry = default(bool))
        {
            this.WeaponPatternIdentifier = weaponPatternIdentifier;
            this.WeaponPatternHash = weaponPatternHash;
            this.DefaultDyes = defaultDyes;
            this.LockedDyes = lockedDyes;
            this.CustomDyes = customDyes;
            this.Arrangements = arrangements;
            this.HasGeometry = hasGeometry;
        }

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

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

        /// <summary>
        /// Gets or Sets DefaultDyes
        /// </summary>
        [DataMember(Name = "defaultDyes", EmitDefaultValue = false)]
        public List<DestinyDyeReference> DefaultDyes { get; set; }

        /// <summary>
        /// Gets or Sets LockedDyes
        /// </summary>
        [DataMember(Name = "lockedDyes", EmitDefaultValue = false)]
        public List<DestinyDyeReference> LockedDyes { get; set; }

        /// <summary>
        /// Gets or Sets CustomDyes
        /// </summary>
        [DataMember(Name = "customDyes", EmitDefaultValue = false)]
        public List<DestinyDyeReference> CustomDyes { get; set; }

        /// <summary>
        /// Gets or Sets Arrangements
        /// </summary>
        [DataMember(Name = "arrangements", EmitDefaultValue = false)]
        public List<DestinyDefinitionsDestinyGearArtArrangementReference> Arrangements { get; set; }

        /// <summary>
        /// Gets or Sets HasGeometry
        /// </summary>
        [DataMember(Name = "hasGeometry", EmitDefaultValue = true)]
        public bool HasGeometry { 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 DestinyDefinitionsDestinyItemTranslationBlockDefinition {\n");
            sb.Append("  WeaponPatternIdentifier: ").Append(WeaponPatternIdentifier).Append("\n");
            sb.Append("  WeaponPatternHash: ").Append(WeaponPatternHash).Append("\n");
            sb.Append("  DefaultDyes: ").Append(DefaultDyes).Append("\n");
            sb.Append("  LockedDyes: ").Append(LockedDyes).Append("\n");
            sb.Append("  CustomDyes: ").Append(CustomDyes).Append("\n");
            sb.Append("  Arrangements: ").Append(Arrangements).Append("\n");
            sb.Append("  HasGeometry: ").Append(HasGeometry).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 DestinyDefinitionsDestinyItemTranslationBlockDefinition);
        }

        /// <summary>
        /// Returns true if DestinyDefinitionsDestinyItemTranslationBlockDefinition instances are equal
        /// </summary>
        /// <param name="input">Instance of DestinyDefinitionsDestinyItemTranslationBlockDefinition to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(DestinyDefinitionsDestinyItemTranslationBlockDefinition input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.WeaponPatternIdentifier == input.WeaponPatternIdentifier ||
                    (this.WeaponPatternIdentifier != null &&
                    this.WeaponPatternIdentifier.Equals(input.WeaponPatternIdentifier))
                ) && 
                (
                    this.WeaponPatternHash == input.WeaponPatternHash ||
                    this.WeaponPatternHash.Equals(input.WeaponPatternHash)
                ) && 
                (
                    this.DefaultDyes == input.DefaultDyes ||
                    this.DefaultDyes != null &&
                    input.DefaultDyes != null &&
                    this.DefaultDyes.SequenceEqual(input.DefaultDyes)
                ) && 
                (
                    this.LockedDyes == input.LockedDyes ||
                    this.LockedDyes != null &&
                    input.LockedDyes != null &&
                    this.LockedDyes.SequenceEqual(input.LockedDyes)
                ) && 
                (
                    this.CustomDyes == input.CustomDyes ||
                    this.CustomDyes != null &&
                    input.CustomDyes != null &&
                    this.CustomDyes.SequenceEqual(input.CustomDyes)
                ) && 
                (
                    this.Arrangements == input.Arrangements ||
                    this.Arrangements != null &&
                    input.Arrangements != null &&
                    this.Arrangements.SequenceEqual(input.Arrangements)
                ) && 
                (
                    this.HasGeometry == input.HasGeometry ||
                    this.HasGeometry.Equals(input.HasGeometry)
                );
        }

        /// <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.WeaponPatternIdentifier != null)
                {
                    hashCode = (hashCode * 59) + this.WeaponPatternIdentifier.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.WeaponPatternHash.GetHashCode();
                if (this.DefaultDyes != null)
                {
                    hashCode = (hashCode * 59) + this.DefaultDyes.GetHashCode();
                }
                if (this.LockedDyes != null)
                {
                    hashCode = (hashCode * 59) + this.LockedDyes.GetHashCode();
                }
                if (this.CustomDyes != null)
                {
                    hashCode = (hashCode * 59) + this.CustomDyes.GetHashCode();
                }
                if (this.Arrangements != null)
                {
                    hashCode = (hashCode * 59) + this.Arrangements.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.HasGeometry.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;
        }
    }

}
