/* 
 * 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>
    /// State registry
    /// </summary>
    [DataContract]
        public partial class StateCODTO :  IEquatable<StateCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="StateCODTO" /> class.
        /// </summary>
        /// <param name="idStato">Stete code.</param>
        /// <param name="description">Description state.</param>
        /// <param name="seq">State sequence number.</param>
        /// <param name="indTipoStato">Status type indicator: 0 - standard status, 1 - decision status, 2 - authorized status, 3 - unauthorized status.</param>
        /// <param name="additionalData">additionalData.</param>
        /// <param name="pluginData">pluginData.</param>
        public StateCODTO(int? idStato = default(int?), string description = default(string), int? seq = default(int?), int? indTipoStato = default(int?), Dictionary<string, Object> additionalData = default(Dictionary<string, Object>), Dictionary<string, Object> pluginData = default(Dictionary<string, Object>))
        {
            this.IdStato = idStato;
            this.Description = description;
            this.Seq = seq;
            this.IndTipoStato = indTipoStato;
            this.AdditionalData = additionalData;
            this.PluginData = pluginData;
        }
        
        /// <summary>
        /// Stete code
        /// </summary>
        /// <value>Stete code</value>
        [DataMember(Name="idStato", EmitDefaultValue=false)]
        public int? IdStato { get; set; }

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

        /// <summary>
        /// State sequence number
        /// </summary>
        /// <value>State sequence number</value>
        [DataMember(Name="seq", EmitDefaultValue=false)]
        public int? Seq { get; set; }

        /// <summary>
        /// Status type indicator: 0 - standard status, 1 - decision status, 2 - authorized status, 3 - unauthorized status
        /// </summary>
        /// <value>Status type indicator: 0 - standard status, 1 - decision status, 2 - authorized status, 3 - unauthorized status</value>
        [DataMember(Name="indTipoStato", EmitDefaultValue=false)]
        public int? IndTipoStato { get; set; }

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

        /// <summary>
        /// Gets or Sets PluginData
        /// </summary>
        [DataMember(Name="pluginData", EmitDefaultValue=false)]
        public Dictionary<string, Object> PluginData { 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 StateCODTO {\n");
            sb.Append("  IdStato: ").Append(IdStato).Append("\n");
            sb.Append("  Description: ").Append(Description).Append("\n");
            sb.Append("  Seq: ").Append(Seq).Append("\n");
            sb.Append("  IndTipoStato: ").Append(IndTipoStato).Append("\n");
            sb.Append("  AdditionalData: ").Append(AdditionalData).Append("\n");
            sb.Append("  PluginData: ").Append(PluginData).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 StateCODTO);
        }

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

            return 
                (
                    this.IdStato == input.IdStato ||
                    (this.IdStato != null &&
                    this.IdStato.Equals(input.IdStato))
                ) && 
                (
                    this.Description == input.Description ||
                    (this.Description != null &&
                    this.Description.Equals(input.Description))
                ) && 
                (
                    this.Seq == input.Seq ||
                    (this.Seq != null &&
                    this.Seq.Equals(input.Seq))
                ) && 
                (
                    this.IndTipoStato == input.IndTipoStato ||
                    (this.IndTipoStato != null &&
                    this.IndTipoStato.Equals(input.IndTipoStato))
                ) && 
                (
                    this.AdditionalData == input.AdditionalData ||
                    this.AdditionalData != null &&
                    input.AdditionalData != null &&
                    this.AdditionalData.SequenceEqual(input.AdditionalData)
                ) && 
                (
                    this.PluginData == input.PluginData ||
                    this.PluginData != null &&
                    input.PluginData != null &&
                    this.PluginData.SequenceEqual(input.PluginData)
                );
        }

        /// <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.IdStato != null)
                    hashCode = hashCode * 59 + this.IdStato.GetHashCode();
                if (this.Description != null)
                    hashCode = hashCode * 59 + this.Description.GetHashCode();
                if (this.Seq != null)
                    hashCode = hashCode * 59 + this.Seq.GetHashCode();
                if (this.IndTipoStato != null)
                    hashCode = hashCode * 59 + this.IndTipoStato.GetHashCode();
                if (this.AdditionalData != null)
                    hashCode = hashCode * 59 + this.AdditionalData.GetHashCode();
                if (this.PluginData != null)
                    hashCode = hashCode * 59 + this.PluginData.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;
        }
    }
}
