/* 
 * 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>
    /// Historical state
    /// </summary>
    [DataContract]
        public partial class HistoryStateCODTO :  IEquatable<HistoryStateCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="HistoryStateCODTO" /> class.
        /// </summary>
        /// <param name="idHistory">Id History.</param>
        /// <param name="idStatus">Id History Status.</param>
        /// <param name="validityDate">History Validity Date.</param>
        /// <param name="updateDate">History Update Date.</param>
        /// <param name="historyAuto">History Auto.</param>
        /// <param name="statusDescription">History Status Description.</param>
        /// <param name="flowDescription">History Flow Description.</param>
        /// <param name="userDescription">History User Description.</param>
        /// <param name="historyDelete">History Delete.</param>
        public HistoryStateCODTO(long? idHistory = default(long?), int? idStatus = default(int?), DateTime? validityDate = default(DateTime?), DateTime? updateDate = default(DateTime?), int? historyAuto = default(int?), string statusDescription = default(string), string flowDescription = default(string), string userDescription = default(string), int? historyDelete = default(int?))
        {
            this.IdHistory = idHistory;
            this.IdStatus = idStatus;
            this.ValidityDate = validityDate;
            this.UpdateDate = updateDate;
            this.HistoryAuto = historyAuto;
            this.StatusDescription = statusDescription;
            this.FlowDescription = flowDescription;
            this.UserDescription = userDescription;
            this.HistoryDelete = historyDelete;
        }
        
        /// <summary>
        /// Id History
        /// </summary>
        /// <value>Id History</value>
        [DataMember(Name="idHistory", EmitDefaultValue=false)]
        public long? IdHistory { get; set; }

        /// <summary>
        /// Id History Status
        /// </summary>
        /// <value>Id History Status</value>
        [DataMember(Name="idStatus", EmitDefaultValue=false)]
        public int? IdStatus { get; set; }

        /// <summary>
        /// History Validity Date
        /// </summary>
        /// <value>History Validity Date</value>
        [DataMember(Name="validityDate", EmitDefaultValue=false)]
        public DateTime? ValidityDate { get; set; }

        /// <summary>
        /// History Update Date
        /// </summary>
        /// <value>History Update Date</value>
        [DataMember(Name="updateDate", EmitDefaultValue=false)]
        public DateTime? UpdateDate { get; set; }

        /// <summary>
        /// History Auto
        /// </summary>
        /// <value>History Auto</value>
        [DataMember(Name="historyAuto", EmitDefaultValue=false)]
        public int? HistoryAuto { get; set; }

        /// <summary>
        /// History Status Description
        /// </summary>
        /// <value>History Status Description</value>
        [DataMember(Name="statusDescription", EmitDefaultValue=false)]
        public string StatusDescription { get; set; }

        /// <summary>
        /// History Flow Description
        /// </summary>
        /// <value>History Flow Description</value>
        [DataMember(Name="flowDescription", EmitDefaultValue=false)]
        public string FlowDescription { get; set; }

        /// <summary>
        /// History User Description
        /// </summary>
        /// <value>History User Description</value>
        [DataMember(Name="userDescription", EmitDefaultValue=false)]
        public string UserDescription { get; set; }

        /// <summary>
        /// History Delete
        /// </summary>
        /// <value>History Delete</value>
        [DataMember(Name="historyDelete", EmitDefaultValue=false)]
        public int? HistoryDelete { 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 HistoryStateCODTO {\n");
            sb.Append("  IdHistory: ").Append(IdHistory).Append("\n");
            sb.Append("  IdStatus: ").Append(IdStatus).Append("\n");
            sb.Append("  ValidityDate: ").Append(ValidityDate).Append("\n");
            sb.Append("  UpdateDate: ").Append(UpdateDate).Append("\n");
            sb.Append("  HistoryAuto: ").Append(HistoryAuto).Append("\n");
            sb.Append("  StatusDescription: ").Append(StatusDescription).Append("\n");
            sb.Append("  FlowDescription: ").Append(FlowDescription).Append("\n");
            sb.Append("  UserDescription: ").Append(UserDescription).Append("\n");
            sb.Append("  HistoryDelete: ").Append(HistoryDelete).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 HistoryStateCODTO);
        }

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

            return 
                (
                    this.IdHistory == input.IdHistory ||
                    (this.IdHistory != null &&
                    this.IdHistory.Equals(input.IdHistory))
                ) && 
                (
                    this.IdStatus == input.IdStatus ||
                    (this.IdStatus != null &&
                    this.IdStatus.Equals(input.IdStatus))
                ) && 
                (
                    this.ValidityDate == input.ValidityDate ||
                    (this.ValidityDate != null &&
                    this.ValidityDate.Equals(input.ValidityDate))
                ) && 
                (
                    this.UpdateDate == input.UpdateDate ||
                    (this.UpdateDate != null &&
                    this.UpdateDate.Equals(input.UpdateDate))
                ) && 
                (
                    this.HistoryAuto == input.HistoryAuto ||
                    (this.HistoryAuto != null &&
                    this.HistoryAuto.Equals(input.HistoryAuto))
                ) && 
                (
                    this.StatusDescription == input.StatusDescription ||
                    (this.StatusDescription != null &&
                    this.StatusDescription.Equals(input.StatusDescription))
                ) && 
                (
                    this.FlowDescription == input.FlowDescription ||
                    (this.FlowDescription != null &&
                    this.FlowDescription.Equals(input.FlowDescription))
                ) && 
                (
                    this.UserDescription == input.UserDescription ||
                    (this.UserDescription != null &&
                    this.UserDescription.Equals(input.UserDescription))
                ) && 
                (
                    this.HistoryDelete == input.HistoryDelete ||
                    (this.HistoryDelete != null &&
                    this.HistoryDelete.Equals(input.HistoryDelete))
                );
        }

        /// <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.IdHistory != null)
                    hashCode = hashCode * 59 + this.IdHistory.GetHashCode();
                if (this.IdStatus != null)
                    hashCode = hashCode * 59 + this.IdStatus.GetHashCode();
                if (this.ValidityDate != null)
                    hashCode = hashCode * 59 + this.ValidityDate.GetHashCode();
                if (this.UpdateDate != null)
                    hashCode = hashCode * 59 + this.UpdateDate.GetHashCode();
                if (this.HistoryAuto != null)
                    hashCode = hashCode * 59 + this.HistoryAuto.GetHashCode();
                if (this.StatusDescription != null)
                    hashCode = hashCode * 59 + this.StatusDescription.GetHashCode();
                if (this.FlowDescription != null)
                    hashCode = hashCode * 59 + this.FlowDescription.GetHashCode();
                if (this.UserDescription != null)
                    hashCode = hashCode * 59 + this.UserDescription.GetHashCode();
                if (this.HistoryDelete != null)
                    hashCode = hashCode * 59 + this.HistoryDelete.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;
        }
    }
}
