/* 
 * bSDD API prototype
 *
 * API to access the buildingSMART Data Dictionary
 *
 * OpenAPI spec version: v1
 * Contact: bsdd_support@buildingsmart.org
 * Generated by: https://github.com/swagger-api/swagger-codegen.git
 */
using System;
using System.Linq;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using System.ComponentModel.DataAnnotations;
using SwaggerDateConverter = IO.Swagger.Client.SwaggerDateConverter;

namespace IO.Swagger.Model
{
    /// <summary>
    /// TextSearchResponseClassificationContractV5
    /// </summary>
    [DataContract]
        public partial class TextSearchResponseClassificationContractV5 :  IEquatable<TextSearchResponseClassificationContractV5>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="TextSearchResponseClassificationContractV5" /> class.
        /// </summary>
        /// <param name="domainNamespaceUri">domainNamespaceUri.</param>
        /// <param name="domainName">domainName.</param>
        /// <param name="name">name.</param>
        /// <param name="namespaceUri">Namespace URI - unique identification of this classification.</param>
        /// <param name="description">description.</param>
        /// <param name="parentClassificationName">parentClassificationName.</param>
        /// <param name="relatedIfcEntityNames">relatedIfcEntityNames.</param>
        public TextSearchResponseClassificationContractV5(string domainNamespaceUri = default(string), string domainName = default(string), string name = default(string), string namespaceUri = default(string), string description = default(string), string parentClassificationName = default(string), List<string> relatedIfcEntityNames = default(List<string>))
        {
            this.DomainNamespaceUri = domainNamespaceUri;
            this.DomainName = domainName;
            this.Name = name;
            this.NamespaceUri = namespaceUri;
            this.Description = description;
            this.ParentClassificationName = parentClassificationName;
            this.RelatedIfcEntityNames = relatedIfcEntityNames;
        }
        
        /// <summary>
        /// Gets or Sets DomainNamespaceUri
        /// </summary>
        [DataMember(Name="domainNamespaceUri", EmitDefaultValue=false)]
        public string DomainNamespaceUri { get; set; }

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

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

        /// <summary>
        /// Namespace URI - unique identification of this classification
        /// </summary>
        /// <value>Namespace URI - unique identification of this classification</value>
        [DataMember(Name="namespaceUri", EmitDefaultValue=false)]
        public string NamespaceUri { get; set; }

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

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

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

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            var sb = new StringBuilder();
            sb.Append("class TextSearchResponseClassificationContractV5 {\n");
            sb.Append("  DomainNamespaceUri: ").Append(DomainNamespaceUri).Append("\n");
            sb.Append("  DomainName: ").Append(DomainName).Append("\n");
            sb.Append("  Name: ").Append(Name).Append("\n");
            sb.Append("  NamespaceUri: ").Append(NamespaceUri).Append("\n");
            sb.Append("  Description: ").Append(Description).Append("\n");
            sb.Append("  ParentClassificationName: ").Append(ParentClassificationName).Append("\n");
            sb.Append("  RelatedIfcEntityNames: ").Append(RelatedIfcEntityNames).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 JsonConvert.SerializeObject(this, 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 TextSearchResponseClassificationContractV5);
        }

        /// <summary>
        /// Returns true if TextSearchResponseClassificationContractV5 instances are equal
        /// </summary>
        /// <param name="input">Instance of TextSearchResponseClassificationContractV5 to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(TextSearchResponseClassificationContractV5 input)
        {
            if (input == null)
                return false;

            return 
                (
                    this.DomainNamespaceUri == input.DomainNamespaceUri ||
                    (this.DomainNamespaceUri != null &&
                    this.DomainNamespaceUri.Equals(input.DomainNamespaceUri))
                ) && 
                (
                    this.DomainName == input.DomainName ||
                    (this.DomainName != null &&
                    this.DomainName.Equals(input.DomainName))
                ) && 
                (
                    this.Name == input.Name ||
                    (this.Name != null &&
                    this.Name.Equals(input.Name))
                ) && 
                (
                    this.NamespaceUri == input.NamespaceUri ||
                    (this.NamespaceUri != null &&
                    this.NamespaceUri.Equals(input.NamespaceUri))
                ) && 
                (
                    this.Description == input.Description ||
                    (this.Description != null &&
                    this.Description.Equals(input.Description))
                ) && 
                (
                    this.ParentClassificationName == input.ParentClassificationName ||
                    (this.ParentClassificationName != null &&
                    this.ParentClassificationName.Equals(input.ParentClassificationName))
                ) && 
                (
                    this.RelatedIfcEntityNames == input.RelatedIfcEntityNames ||
                    this.RelatedIfcEntityNames != null &&
                    input.RelatedIfcEntityNames != null &&
                    this.RelatedIfcEntityNames.SequenceEqual(input.RelatedIfcEntityNames)
                );
        }

        /// <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.DomainNamespaceUri != null)
                    hashCode = hashCode * 59 + this.DomainNamespaceUri.GetHashCode();
                if (this.DomainName != null)
                    hashCode = hashCode * 59 + this.DomainName.GetHashCode();
                if (this.Name != null)
                    hashCode = hashCode * 59 + this.Name.GetHashCode();
                if (this.NamespaceUri != null)
                    hashCode = hashCode * 59 + this.NamespaceUri.GetHashCode();
                if (this.Description != null)
                    hashCode = hashCode * 59 + this.Description.GetHashCode();
                if (this.ParentClassificationName != null)
                    hashCode = hashCode * 59 + this.ParentClassificationName.GetHashCode();
                if (this.RelatedIfcEntityNames != null)
                    hashCode = hashCode * 59 + this.RelatedIfcEntityNames.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;
        }
    }
}
