/* 
 * 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>
    /// IE21_STRUTTURE - IEStructureTypeCO&lt;br&gt;Proprietà chiave:&lt;ul&gt;&lt;li&gt;&lt;b&gt;CodStructureType&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;
    /// </summary>
    [DataContract]
        public partial class IEStructureTypeCODTO :  IEquatable<IEStructureTypeCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="IEStructureTypeCODTO" /> class.
        /// </summary>
        /// <param name="classExport">IE21_CLSEXPORT - Classe export.</param>
        /// <param name="classImport">IE21_CLSIMPORT - Classe import.</param>
        /// <param name="codStructureType">IE21_STRUTTURA - Struttura (required).</param>
        /// <param name="description">IE21_DESCRIZIONE - Descrizione struttura (required).</param>
        /// <param name="excludeFlag">IE21_FLGESCLUDI - Escludi&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="sortingEnabledFlag">IE21_FLGRICORD - Ordinamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="typeImpExp">IE21_INDIMPEXP - Modalità Import/Export&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Import/Export&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Import&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Export&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="typeProcedure">IE21_INDTIPOPROC - Tipo procedura (required).</param>
        /// <param name="additionalData">additionalData.</param>
        /// <param name="pluginData">pluginData.</param>
        public IEStructureTypeCODTO(string classExport = default(string), string classImport = default(string), int? codStructureType = default(int?), string description = default(string), double? excludeFlag = default(double?), double? sortingEnabledFlag = default(double?), double? typeImpExp = default(double?), double? typeProcedure = default(double?), Dictionary<string, Object> additionalData = default(Dictionary<string, Object>), Dictionary<string, Object> pluginData = default(Dictionary<string, Object>))
        {
            // to ensure "codStructureType" is required (not null)
            if (codStructureType == null)
            {
                throw new InvalidDataException("codStructureType is a required property for IEStructureTypeCODTO and cannot be null");
            }
            else
            {
                this.CodStructureType = codStructureType;
            }
            // to ensure "description" is required (not null)
            if (description == null)
            {
                throw new InvalidDataException("description is a required property for IEStructureTypeCODTO and cannot be null");
            }
            else
            {
                this.Description = description;
            }
            // to ensure "typeProcedure" is required (not null)
            if (typeProcedure == null)
            {
                throw new InvalidDataException("typeProcedure is a required property for IEStructureTypeCODTO and cannot be null");
            }
            else
            {
                this.TypeProcedure = typeProcedure;
            }
            this.ClassExport = classExport;
            this.ClassImport = classImport;
            this.ExcludeFlag = excludeFlag;
            this.SortingEnabledFlag = sortingEnabledFlag;
            this.TypeImpExp = typeImpExp;
            this.AdditionalData = additionalData;
            this.PluginData = pluginData;
        }
        
        /// <summary>
        /// IE21_CLSEXPORT - Classe export
        /// </summary>
        /// <value>IE21_CLSEXPORT - Classe export</value>
        [DataMember(Name="classExport", EmitDefaultValue=false)]
        public string ClassExport { get; set; }

        /// <summary>
        /// IE21_CLSIMPORT - Classe import
        /// </summary>
        /// <value>IE21_CLSIMPORT - Classe import</value>
        [DataMember(Name="classImport", EmitDefaultValue=false)]
        public string ClassImport { get; set; }

        /// <summary>
        /// IE21_STRUTTURA - Struttura
        /// </summary>
        /// <value>IE21_STRUTTURA - Struttura</value>
        [DataMember(Name="codStructureType", EmitDefaultValue=false)]
        public int? CodStructureType { get; set; }

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

        /// <summary>
        /// IE21_FLGESCLUDI - Escludi&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>IE21_FLGESCLUDI - Escludi&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="excludeFlag", EmitDefaultValue=false)]
        public double? ExcludeFlag { get; set; }

        /// <summary>
        /// IE21_FLGRICORD - Ordinamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>IE21_FLGRICORD - Ordinamento&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - No&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Si&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="sortingEnabledFlag", EmitDefaultValue=false)]
        public double? SortingEnabledFlag { get; set; }

        /// <summary>
        /// IE21_INDIMPEXP - Modalità Import/Export&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Import/Export&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Import&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Export&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>IE21_INDIMPEXP - Modalità Import/Export&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Import/Export&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Import&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Export&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="typeImpExp", EmitDefaultValue=false)]
        public double? TypeImpExp { get; set; }

        /// <summary>
        /// IE21_INDTIPOPROC - Tipo procedura
        /// </summary>
        /// <value>IE21_INDTIPOPROC - Tipo procedura</value>
        [DataMember(Name="typeProcedure", EmitDefaultValue=false)]
        public double? TypeProcedure { 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 IEStructureTypeCODTO {\n");
            sb.Append("  ClassExport: ").Append(ClassExport).Append("\n");
            sb.Append("  ClassImport: ").Append(ClassImport).Append("\n");
            sb.Append("  CodStructureType: ").Append(CodStructureType).Append("\n");
            sb.Append("  Description: ").Append(Description).Append("\n");
            sb.Append("  ExcludeFlag: ").Append(ExcludeFlag).Append("\n");
            sb.Append("  SortingEnabledFlag: ").Append(SortingEnabledFlag).Append("\n");
            sb.Append("  TypeImpExp: ").Append(TypeImpExp).Append("\n");
            sb.Append("  TypeProcedure: ").Append(TypeProcedure).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 IEStructureTypeCODTO);
        }

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

            return 
                (
                    this.ClassExport == input.ClassExport ||
                    (this.ClassExport != null &&
                    this.ClassExport.Equals(input.ClassExport))
                ) && 
                (
                    this.ClassImport == input.ClassImport ||
                    (this.ClassImport != null &&
                    this.ClassImport.Equals(input.ClassImport))
                ) && 
                (
                    this.CodStructureType == input.CodStructureType ||
                    (this.CodStructureType != null &&
                    this.CodStructureType.Equals(input.CodStructureType))
                ) && 
                (
                    this.Description == input.Description ||
                    (this.Description != null &&
                    this.Description.Equals(input.Description))
                ) && 
                (
                    this.ExcludeFlag == input.ExcludeFlag ||
                    (this.ExcludeFlag != null &&
                    this.ExcludeFlag.Equals(input.ExcludeFlag))
                ) && 
                (
                    this.SortingEnabledFlag == input.SortingEnabledFlag ||
                    (this.SortingEnabledFlag != null &&
                    this.SortingEnabledFlag.Equals(input.SortingEnabledFlag))
                ) && 
                (
                    this.TypeImpExp == input.TypeImpExp ||
                    (this.TypeImpExp != null &&
                    this.TypeImpExp.Equals(input.TypeImpExp))
                ) && 
                (
                    this.TypeProcedure == input.TypeProcedure ||
                    (this.TypeProcedure != null &&
                    this.TypeProcedure.Equals(input.TypeProcedure))
                ) && 
                (
                    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.ClassExport != null)
                    hashCode = hashCode * 59 + this.ClassExport.GetHashCode();
                if (this.ClassImport != null)
                    hashCode = hashCode * 59 + this.ClassImport.GetHashCode();
                if (this.CodStructureType != null)
                    hashCode = hashCode * 59 + this.CodStructureType.GetHashCode();
                if (this.Description != null)
                    hashCode = hashCode * 59 + this.Description.GetHashCode();
                if (this.ExcludeFlag != null)
                    hashCode = hashCode * 59 + this.ExcludeFlag.GetHashCode();
                if (this.SortingEnabledFlag != null)
                    hashCode = hashCode * 59 + this.SortingEnabledFlag.GetHashCode();
                if (this.TypeImpExp != null)
                    hashCode = hashCode * 59 + this.TypeImpExp.GetHashCode();
                if (this.TypeProcedure != null)
                    hashCode = hashCode * 59 + this.TypeProcedure.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;
        }
    }
}
