/* 
 * TSE Cloud - CO
 *
 * This is Swagger Docs for Document WebApi Teamsystemn Enterprise Cloud, more detail at [https://swagger.io](https://swagger.io).
 *
 * OpenAPI spec version: v2025.3000
 * 
 * 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>
    /// DTO for property validation task
    /// </summary>
    [DataContract]
        public partial class ValidationResultDTO :  IEquatable<ValidationResultDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ValidationResultDTO" /> class.
        /// </summary>
        /// <param name="message">Validation message.</param>
        /// <param name="warningCode">warningCode.</param>
        /// <param name="isWarning">It means the message is a warning.</param>
        /// <param name="isError">It means the message is an error.</param>
        /// <param name="dtoName">the DTO name who the property belong.</param>
        /// <param name="dtoPropertyName">The DTO invalid property name.</param>
        /// <param name="entityPropertyPath">entityPropertyPath.</param>
        public ValidationResultDTO(string message = default(string), long? warningCode = default(long?), bool? isWarning = default(bool?), bool? isError = default(bool?), string dtoName = default(string), string dtoPropertyName = default(string), string entityPropertyPath = default(string))
        {
            this.Message = message;
            this.WarningCode = warningCode;
            this.IsWarning = isWarning;
            this.IsError = isError;
            this.DtoName = dtoName;
            this.DtoPropertyName = dtoPropertyName;
            this.EntityPropertyPath = entityPropertyPath;
        }
        
        /// <summary>
        /// Validation message
        /// </summary>
        /// <value>Validation message</value>
        [DataMember(Name="message", EmitDefaultValue=false)]
        public string Message { get; set; }

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

        /// <summary>
        /// It means the message is a warning
        /// </summary>
        /// <value>It means the message is a warning</value>
        [DataMember(Name="isWarning", EmitDefaultValue=false)]
        public bool? IsWarning { get; set; }

        /// <summary>
        /// It means the message is an error
        /// </summary>
        /// <value>It means the message is an error</value>
        [DataMember(Name="isError", EmitDefaultValue=false)]
        public bool? IsError { get; set; }

        /// <summary>
        /// the DTO name who the property belong
        /// </summary>
        /// <value>the DTO name who the property belong</value>
        [DataMember(Name="dtoName", EmitDefaultValue=false)]
        public string DtoName { get; set; }

        /// <summary>
        /// The DTO invalid property name
        /// </summary>
        /// <value>The DTO invalid property name</value>
        [DataMember(Name="dtoPropertyName", EmitDefaultValue=false)]
        public string DtoPropertyName { get; set; }

        /// <summary>
        /// Gets or Sets EntityPropertyPath
        /// </summary>
        [DataMember(Name="entityPropertyPath", EmitDefaultValue=false)]
        public string EntityPropertyPath { 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 ValidationResultDTO {\n");
            sb.Append("  Message: ").Append(Message).Append("\n");
            sb.Append("  WarningCode: ").Append(WarningCode).Append("\n");
            sb.Append("  IsWarning: ").Append(IsWarning).Append("\n");
            sb.Append("  IsError: ").Append(IsError).Append("\n");
            sb.Append("  DtoName: ").Append(DtoName).Append("\n");
            sb.Append("  DtoPropertyName: ").Append(DtoPropertyName).Append("\n");
            sb.Append("  EntityPropertyPath: ").Append(EntityPropertyPath).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 ValidationResultDTO);
        }

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

            return 
                (
                    this.Message == input.Message ||
                    (this.Message != null &&
                    this.Message.Equals(input.Message))
                ) && 
                (
                    this.WarningCode == input.WarningCode ||
                    (this.WarningCode != null &&
                    this.WarningCode.Equals(input.WarningCode))
                ) && 
                (
                    this.IsWarning == input.IsWarning ||
                    (this.IsWarning != null &&
                    this.IsWarning.Equals(input.IsWarning))
                ) && 
                (
                    this.IsError == input.IsError ||
                    (this.IsError != null &&
                    this.IsError.Equals(input.IsError))
                ) && 
                (
                    this.DtoName == input.DtoName ||
                    (this.DtoName != null &&
                    this.DtoName.Equals(input.DtoName))
                ) && 
                (
                    this.DtoPropertyName == input.DtoPropertyName ||
                    (this.DtoPropertyName != null &&
                    this.DtoPropertyName.Equals(input.DtoPropertyName))
                ) && 
                (
                    this.EntityPropertyPath == input.EntityPropertyPath ||
                    (this.EntityPropertyPath != null &&
                    this.EntityPropertyPath.Equals(input.EntityPropertyPath))
                );
        }

        /// <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.Message != null)
                    hashCode = hashCode * 59 + this.Message.GetHashCode();
                if (this.WarningCode != null)
                    hashCode = hashCode * 59 + this.WarningCode.GetHashCode();
                if (this.IsWarning != null)
                    hashCode = hashCode * 59 + this.IsWarning.GetHashCode();
                if (this.IsError != null)
                    hashCode = hashCode * 59 + this.IsError.GetHashCode();
                if (this.DtoName != null)
                    hashCode = hashCode * 59 + this.DtoName.GetHashCode();
                if (this.DtoPropertyName != null)
                    hashCode = hashCode * 59 + this.DtoPropertyName.GetHashCode();
                if (this.EntityPropertyPath != null)
                    hashCode = hashCode * 59 + this.EntityPropertyPath.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;
        }
    }
}
