/* 
 * 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>
    /// MG28_CLIFORINT - CSLetterOfIntentCO&lt;br&gt;Proprietà chiave:&lt;ul&gt;&lt;li&gt;&lt;b&gt;ID&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;
    /// </summary>
    [DataContract]
        public partial class CSLetterOfIntentCODTO :  IEquatable<CSLetterOfIntentCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CSLetterOfIntentCODTO" /> class.
        /// </summary>
        /// <param name="alqIvaCg28">MG28_ALQIVA_CG28 - Aliquota IVA (required).</param>
        /// <param name="anno">MG28_ANNO - Anno (required).</param>
        /// <param name="cliForCg44">MG28_CLIFOR_CG44 - Codice Cliente / Fornitore (required).</param>
        /// <param name="dataFineVal">MG28_DATAFINEVAL - Data fine validità (required).</param>
        /// <param name="dataInVal">MG28_DATAINVAL - Data inizio validità (required).</param>
        /// <param name="dataNsReg">MG28_DATANSREG - Data emissione.</param>
        /// <param name="dataProtocollo">MG28_DATAPROTOCOLLO - Data protocollo.</param>
        /// <param name="datarevoca">MG28_DATAREVOCA - Data revoca.</param>
        /// <param name="dataRicez">MG28_DATARICEZ - Data ricezione.</param>
        /// <param name="dittaCg18">MG28_DITTA_CG18 - Ditta (required).</param>
        /// <param name="dogana">MG28_DOGANA - Dogana.</param>
        /// <param name="finoAEuro">MG28_FINOAEURO - Fino a Euro.</param>
        /// <param name="flagDisattiv">MG28_FLGDISATTIV - Non attiva (required).</param>
        /// <param name="flagStDich">MG28_FLGSTDICH - Stampa dichiarazioni di intento (required).</param>
        /// <param name="flagStReg">MG28_FLGSTREG - Reg. st. (required).</param>
        /// <param name="flgScartata">MG28_FLGSCARTATA - Scartata (required).</param>
        /// <param name="id">MG28_ID - ID tabella MG28 (lettera di intento) (Required only in PUT/PATCH).</param>
        /// <param name="indTipoDich">MG28_INDTIPODICH - Tipo Dichiarazione&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - La sola operazione specificata&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Le operazioni effettuate nell&#x27;anno...fino a concorrenza di EURO&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Le operazioni effettuate nell&#x27;anno .... per il&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="note">MG28_NOTE - Note.</param>
        /// <param name="numLetDich">MG28_NUMLETDICH - Numero lettera dichiarante.</param>
        /// <param name="numNsProt">MG28_NUMNSPROT - Num ns Prot..</param>
        /// <param name="numProtocollo">MG28_NUMPROTOCOLLO - Numero protocollo.</param>
        /// <param name="progRinvio">MG28_PROGRINVIO - Progressivo invio.</param>
        /// <param name="rowversion">MG28_ROWVERSION - Rowversion.</param>
        /// <param name="tipoCFCg44">MG28_TIPOCF_CG44 - Tipo cliente fornitore (required).</param>
        /// <param name="vatCodeCO">vatCodeCO (required).</param>
        /// <param name="additionalData">additionalData.</param>
        /// <param name="pluginData">pluginData.</param>
        public CSLetterOfIntentCODTO(string alqIvaCg28 = default(string), double? anno = default(double?), double? cliForCg44 = default(double?), DateTime? dataFineVal = default(DateTime?), DateTime? dataInVal = default(DateTime?), DateTime? dataNsReg = default(DateTime?), DateTime? dataProtocollo = default(DateTime?), DateTime? datarevoca = default(DateTime?), DateTime? dataRicez = default(DateTime?), double? dittaCg18 = default(double?), string dogana = default(string), double? finoAEuro = default(double?), double? flagDisattiv = default(double?), double? flagStDich = default(double?), double? flagStReg = default(double?), int? flgScartata = default(int?), int? id = default(int?), double? indTipoDich = default(double?), string note = default(string), string numLetDich = default(string), double? numNsProt = default(double?), double? numProtocollo = default(double?), double? progRinvio = default(double?), byte[] rowversion = default(byte[]), double? tipoCFCg44 = default(double?), VatCodeCODTO vatCodeCO = default(VatCodeCODTO), Dictionary<string, Object> additionalData = default(Dictionary<string, Object>), Dictionary<string, Object> pluginData = default(Dictionary<string, Object>))
        {
            // to ensure "alqIvaCg28" is required (not null)
            if (alqIvaCg28 == null)
            {
                throw new InvalidDataException("alqIvaCg28 is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.AlqIvaCg28 = alqIvaCg28;
            }
            // to ensure "anno" is required (not null)
            if (anno == null)
            {
                throw new InvalidDataException("anno is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.Anno = anno;
            }
            // to ensure "cliForCg44" is required (not null)
            if (cliForCg44 == null)
            {
                throw new InvalidDataException("cliForCg44 is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.CliForCg44 = cliForCg44;
            }
            // to ensure "dataFineVal" is required (not null)
            if (dataFineVal == null)
            {
                throw new InvalidDataException("dataFineVal is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.DataFineVal = dataFineVal;
            }
            // to ensure "dataInVal" is required (not null)
            if (dataInVal == null)
            {
                throw new InvalidDataException("dataInVal is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.DataInVal = dataInVal;
            }
            // to ensure "dittaCg18" is required (not null)
            if (dittaCg18 == null)
            {
                throw new InvalidDataException("dittaCg18 is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.DittaCg18 = dittaCg18;
            }
            // to ensure "flagDisattiv" is required (not null)
            if (flagDisattiv == null)
            {
                throw new InvalidDataException("flagDisattiv is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.FlagDisattiv = flagDisattiv;
            }
            // to ensure "flagStDich" is required (not null)
            if (flagStDich == null)
            {
                throw new InvalidDataException("flagStDich is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.FlagStDich = flagStDich;
            }
            // to ensure "flagStReg" is required (not null)
            if (flagStReg == null)
            {
                throw new InvalidDataException("flagStReg is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.FlagStReg = flagStReg;
            }
            // to ensure "flgScartata" is required (not null)
            if (flgScartata == null)
            {
                throw new InvalidDataException("flgScartata is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.FlgScartata = flgScartata;
            }
            // to ensure "tipoCFCg44" is required (not null)
            if (tipoCFCg44 == null)
            {
                throw new InvalidDataException("tipoCFCg44 is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.TipoCFCg44 = tipoCFCg44;
            }
            // to ensure "vatCodeCO" is required (not null)
            if (vatCodeCO == null)
            {
                throw new InvalidDataException("vatCodeCO is a required property for CSLetterOfIntentCODTO and cannot be null");
            }
            else
            {
                this.VatCodeCO = vatCodeCO;
            }
            this.DataNsReg = dataNsReg;
            this.DataProtocollo = dataProtocollo;
            this.Datarevoca = datarevoca;
            this.DataRicez = dataRicez;
            this.Dogana = dogana;
            this.FinoAEuro = finoAEuro;
            this.Id = id;
            this.IndTipoDich = indTipoDich;
            this.Note = note;
            this.NumLetDich = numLetDich;
            this.NumNsProt = numNsProt;
            this.NumProtocollo = numProtocollo;
            this.ProgRinvio = progRinvio;
            this.Rowversion = rowversion;
            this.AdditionalData = additionalData;
            this.PluginData = pluginData;
        }
        
        /// <summary>
        /// MG28_ALQIVA_CG28 - Aliquota IVA
        /// </summary>
        /// <value>MG28_ALQIVA_CG28 - Aliquota IVA</value>
        [DataMember(Name="alqIvaCg28", EmitDefaultValue=false)]
        public string AlqIvaCg28 { get; set; }

        /// <summary>
        /// MG28_ANNO - Anno
        /// </summary>
        /// <value>MG28_ANNO - Anno</value>
        [DataMember(Name="anno", EmitDefaultValue=false)]
        public double? Anno { get; set; }

        /// <summary>
        /// MG28_CLIFOR_CG44 - Codice Cliente / Fornitore
        /// </summary>
        /// <value>MG28_CLIFOR_CG44 - Codice Cliente / Fornitore</value>
        [DataMember(Name="cliForCg44", EmitDefaultValue=false)]
        public double? CliForCg44 { get; set; }

        /// <summary>
        /// MG28_DATAFINEVAL - Data fine validità
        /// </summary>
        /// <value>MG28_DATAFINEVAL - Data fine validità</value>
        [DataMember(Name="dataFineVal", EmitDefaultValue=false)]
        public DateTime? DataFineVal { get; set; }

        /// <summary>
        /// MG28_DATAINVAL - Data inizio validità
        /// </summary>
        /// <value>MG28_DATAINVAL - Data inizio validità</value>
        [DataMember(Name="dataInVal", EmitDefaultValue=false)]
        public DateTime? DataInVal { get; set; }

        /// <summary>
        /// MG28_DATANSREG - Data emissione
        /// </summary>
        /// <value>MG28_DATANSREG - Data emissione</value>
        [DataMember(Name="dataNsReg", EmitDefaultValue=false)]
        public DateTime? DataNsReg { get; set; }

        /// <summary>
        /// MG28_DATAPROTOCOLLO - Data protocollo
        /// </summary>
        /// <value>MG28_DATAPROTOCOLLO - Data protocollo</value>
        [DataMember(Name="dataProtocollo", EmitDefaultValue=false)]
        public DateTime? DataProtocollo { get; set; }

        /// <summary>
        /// MG28_DATAREVOCA - Data revoca
        /// </summary>
        /// <value>MG28_DATAREVOCA - Data revoca</value>
        [DataMember(Name="datarevoca", EmitDefaultValue=false)]
        public DateTime? Datarevoca { get; set; }

        /// <summary>
        /// MG28_DATARICEZ - Data ricezione
        /// </summary>
        /// <value>MG28_DATARICEZ - Data ricezione</value>
        [DataMember(Name="dataRicez", EmitDefaultValue=false)]
        public DateTime? DataRicez { get; set; }

        /// <summary>
        /// MG28_DITTA_CG18 - Ditta
        /// </summary>
        /// <value>MG28_DITTA_CG18 - Ditta</value>
        [DataMember(Name="dittaCg18", EmitDefaultValue=false)]
        public double? DittaCg18 { get; set; }

        /// <summary>
        /// MG28_DOGANA - Dogana
        /// </summary>
        /// <value>MG28_DOGANA - Dogana</value>
        [DataMember(Name="dogana", EmitDefaultValue=false)]
        public string Dogana { get; set; }

        /// <summary>
        /// MG28_FINOAEURO - Fino a Euro
        /// </summary>
        /// <value>MG28_FINOAEURO - Fino a Euro</value>
        [DataMember(Name="finoAEuro", EmitDefaultValue=false)]
        public double? FinoAEuro { get; set; }

        /// <summary>
        /// MG28_FLGDISATTIV - Non attiva
        /// </summary>
        /// <value>MG28_FLGDISATTIV - Non attiva</value>
        [DataMember(Name="flagDisattiv", EmitDefaultValue=false)]
        public double? FlagDisattiv { get; set; }

        /// <summary>
        /// MG28_FLGSTDICH - Stampa dichiarazioni di intento
        /// </summary>
        /// <value>MG28_FLGSTDICH - Stampa dichiarazioni di intento</value>
        [DataMember(Name="flagStDich", EmitDefaultValue=false)]
        public double? FlagStDich { get; set; }

        /// <summary>
        /// MG28_FLGSTREG - Reg. st.
        /// </summary>
        /// <value>MG28_FLGSTREG - Reg. st.</value>
        [DataMember(Name="flagStReg", EmitDefaultValue=false)]
        public double? FlagStReg { get; set; }

        /// <summary>
        /// MG28_FLGSCARTATA - Scartata
        /// </summary>
        /// <value>MG28_FLGSCARTATA - Scartata</value>
        [DataMember(Name="flgScartata", EmitDefaultValue=false)]
        public int? FlgScartata { get; set; }

        /// <summary>
        /// MG28_ID - ID tabella MG28 (lettera di intento) (Required only in PUT/PATCH)
        /// </summary>
        /// <value>MG28_ID - ID tabella MG28 (lettera di intento) (Required only in PUT/PATCH)</value>
        [DataMember(Name="id", EmitDefaultValue=false)]
        public int? Id { get; set; }

        /// <summary>
        /// MG28_INDTIPODICH - Tipo Dichiarazione&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - La sola operazione specificata&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Le operazioni effettuate nell&#x27;anno...fino a concorrenza di EURO&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Le operazioni effettuate nell&#x27;anno .... per il&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>MG28_INDTIPODICH - Tipo Dichiarazione&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - La sola operazione specificata&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Le operazioni effettuate nell&#x27;anno...fino a concorrenza di EURO&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Le operazioni effettuate nell&#x27;anno .... per il&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indTipoDich", EmitDefaultValue=false)]
        public double? IndTipoDich { get; set; }

        /// <summary>
        /// MG28_NOTE - Note
        /// </summary>
        /// <value>MG28_NOTE - Note</value>
        [DataMember(Name="note", EmitDefaultValue=false)]
        public string Note { get; set; }

        /// <summary>
        /// MG28_NUMLETDICH - Numero lettera dichiarante
        /// </summary>
        /// <value>MG28_NUMLETDICH - Numero lettera dichiarante</value>
        [DataMember(Name="numLetDich", EmitDefaultValue=false)]
        public string NumLetDich { get; set; }

        /// <summary>
        /// MG28_NUMNSPROT - Num ns Prot.
        /// </summary>
        /// <value>MG28_NUMNSPROT - Num ns Prot.</value>
        [DataMember(Name="numNsProt", EmitDefaultValue=false)]
        public double? NumNsProt { get; set; }

        /// <summary>
        /// MG28_NUMPROTOCOLLO - Numero protocollo
        /// </summary>
        /// <value>MG28_NUMPROTOCOLLO - Numero protocollo</value>
        [DataMember(Name="numProtocollo", EmitDefaultValue=false)]
        public double? NumProtocollo { get; set; }

        /// <summary>
        /// MG28_PROGRINVIO - Progressivo invio
        /// </summary>
        /// <value>MG28_PROGRINVIO - Progressivo invio</value>
        [DataMember(Name="progRinvio", EmitDefaultValue=false)]
        public double? ProgRinvio { get; set; }

        /// <summary>
        /// MG28_ROWVERSION - Rowversion
        /// </summary>
        /// <value>MG28_ROWVERSION - Rowversion</value>
        [DataMember(Name="rowversion", EmitDefaultValue=false)]
        public byte[] Rowversion { get; set; }

        /// <summary>
        /// MG28_TIPOCF_CG44 - Tipo cliente fornitore
        /// </summary>
        /// <value>MG28_TIPOCF_CG44 - Tipo cliente fornitore</value>
        [DataMember(Name="tipoCFCg44", EmitDefaultValue=false)]
        public double? TipoCFCg44 { get; set; }

        /// <summary>
        /// Gets or Sets VatCodeCO
        /// </summary>
        [DataMember(Name="vatCodeCO", EmitDefaultValue=false)]
        public VatCodeCODTO VatCodeCO { 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 CSLetterOfIntentCODTO {\n");
            sb.Append("  AlqIvaCg28: ").Append(AlqIvaCg28).Append("\n");
            sb.Append("  Anno: ").Append(Anno).Append("\n");
            sb.Append("  CliForCg44: ").Append(CliForCg44).Append("\n");
            sb.Append("  DataFineVal: ").Append(DataFineVal).Append("\n");
            sb.Append("  DataInVal: ").Append(DataInVal).Append("\n");
            sb.Append("  DataNsReg: ").Append(DataNsReg).Append("\n");
            sb.Append("  DataProtocollo: ").Append(DataProtocollo).Append("\n");
            sb.Append("  Datarevoca: ").Append(Datarevoca).Append("\n");
            sb.Append("  DataRicez: ").Append(DataRicez).Append("\n");
            sb.Append("  DittaCg18: ").Append(DittaCg18).Append("\n");
            sb.Append("  Dogana: ").Append(Dogana).Append("\n");
            sb.Append("  FinoAEuro: ").Append(FinoAEuro).Append("\n");
            sb.Append("  FlagDisattiv: ").Append(FlagDisattiv).Append("\n");
            sb.Append("  FlagStDich: ").Append(FlagStDich).Append("\n");
            sb.Append("  FlagStReg: ").Append(FlagStReg).Append("\n");
            sb.Append("  FlgScartata: ").Append(FlgScartata).Append("\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  IndTipoDich: ").Append(IndTipoDich).Append("\n");
            sb.Append("  Note: ").Append(Note).Append("\n");
            sb.Append("  NumLetDich: ").Append(NumLetDich).Append("\n");
            sb.Append("  NumNsProt: ").Append(NumNsProt).Append("\n");
            sb.Append("  NumProtocollo: ").Append(NumProtocollo).Append("\n");
            sb.Append("  ProgRinvio: ").Append(ProgRinvio).Append("\n");
            sb.Append("  Rowversion: ").Append(Rowversion).Append("\n");
            sb.Append("  TipoCFCg44: ").Append(TipoCFCg44).Append("\n");
            sb.Append("  VatCodeCO: ").Append(VatCodeCO).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 CSLetterOfIntentCODTO);
        }

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

            return 
                (
                    this.AlqIvaCg28 == input.AlqIvaCg28 ||
                    (this.AlqIvaCg28 != null &&
                    this.AlqIvaCg28.Equals(input.AlqIvaCg28))
                ) && 
                (
                    this.Anno == input.Anno ||
                    (this.Anno != null &&
                    this.Anno.Equals(input.Anno))
                ) && 
                (
                    this.CliForCg44 == input.CliForCg44 ||
                    (this.CliForCg44 != null &&
                    this.CliForCg44.Equals(input.CliForCg44))
                ) && 
                (
                    this.DataFineVal == input.DataFineVal ||
                    (this.DataFineVal != null &&
                    this.DataFineVal.Equals(input.DataFineVal))
                ) && 
                (
                    this.DataInVal == input.DataInVal ||
                    (this.DataInVal != null &&
                    this.DataInVal.Equals(input.DataInVal))
                ) && 
                (
                    this.DataNsReg == input.DataNsReg ||
                    (this.DataNsReg != null &&
                    this.DataNsReg.Equals(input.DataNsReg))
                ) && 
                (
                    this.DataProtocollo == input.DataProtocollo ||
                    (this.DataProtocollo != null &&
                    this.DataProtocollo.Equals(input.DataProtocollo))
                ) && 
                (
                    this.Datarevoca == input.Datarevoca ||
                    (this.Datarevoca != null &&
                    this.Datarevoca.Equals(input.Datarevoca))
                ) && 
                (
                    this.DataRicez == input.DataRicez ||
                    (this.DataRicez != null &&
                    this.DataRicez.Equals(input.DataRicez))
                ) && 
                (
                    this.DittaCg18 == input.DittaCg18 ||
                    (this.DittaCg18 != null &&
                    this.DittaCg18.Equals(input.DittaCg18))
                ) && 
                (
                    this.Dogana == input.Dogana ||
                    (this.Dogana != null &&
                    this.Dogana.Equals(input.Dogana))
                ) && 
                (
                    this.FinoAEuro == input.FinoAEuro ||
                    (this.FinoAEuro != null &&
                    this.FinoAEuro.Equals(input.FinoAEuro))
                ) && 
                (
                    this.FlagDisattiv == input.FlagDisattiv ||
                    (this.FlagDisattiv != null &&
                    this.FlagDisattiv.Equals(input.FlagDisattiv))
                ) && 
                (
                    this.FlagStDich == input.FlagStDich ||
                    (this.FlagStDich != null &&
                    this.FlagStDich.Equals(input.FlagStDich))
                ) && 
                (
                    this.FlagStReg == input.FlagStReg ||
                    (this.FlagStReg != null &&
                    this.FlagStReg.Equals(input.FlagStReg))
                ) && 
                (
                    this.FlgScartata == input.FlgScartata ||
                    (this.FlgScartata != null &&
                    this.FlgScartata.Equals(input.FlgScartata))
                ) && 
                (
                    this.Id == input.Id ||
                    (this.Id != null &&
                    this.Id.Equals(input.Id))
                ) && 
                (
                    this.IndTipoDich == input.IndTipoDich ||
                    (this.IndTipoDich != null &&
                    this.IndTipoDich.Equals(input.IndTipoDich))
                ) && 
                (
                    this.Note == input.Note ||
                    (this.Note != null &&
                    this.Note.Equals(input.Note))
                ) && 
                (
                    this.NumLetDich == input.NumLetDich ||
                    (this.NumLetDich != null &&
                    this.NumLetDich.Equals(input.NumLetDich))
                ) && 
                (
                    this.NumNsProt == input.NumNsProt ||
                    (this.NumNsProt != null &&
                    this.NumNsProt.Equals(input.NumNsProt))
                ) && 
                (
                    this.NumProtocollo == input.NumProtocollo ||
                    (this.NumProtocollo != null &&
                    this.NumProtocollo.Equals(input.NumProtocollo))
                ) && 
                (
                    this.ProgRinvio == input.ProgRinvio ||
                    (this.ProgRinvio != null &&
                    this.ProgRinvio.Equals(input.ProgRinvio))
                ) && 
                (
                    this.Rowversion == input.Rowversion ||
                    (this.Rowversion != null &&
                    this.Rowversion.Equals(input.Rowversion))
                ) && 
                (
                    this.TipoCFCg44 == input.TipoCFCg44 ||
                    (this.TipoCFCg44 != null &&
                    this.TipoCFCg44.Equals(input.TipoCFCg44))
                ) && 
                (
                    this.VatCodeCO == input.VatCodeCO ||
                    (this.VatCodeCO != null &&
                    this.VatCodeCO.Equals(input.VatCodeCO))
                ) && 
                (
                    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.AlqIvaCg28 != null)
                    hashCode = hashCode * 59 + this.AlqIvaCg28.GetHashCode();
                if (this.Anno != null)
                    hashCode = hashCode * 59 + this.Anno.GetHashCode();
                if (this.CliForCg44 != null)
                    hashCode = hashCode * 59 + this.CliForCg44.GetHashCode();
                if (this.DataFineVal != null)
                    hashCode = hashCode * 59 + this.DataFineVal.GetHashCode();
                if (this.DataInVal != null)
                    hashCode = hashCode * 59 + this.DataInVal.GetHashCode();
                if (this.DataNsReg != null)
                    hashCode = hashCode * 59 + this.DataNsReg.GetHashCode();
                if (this.DataProtocollo != null)
                    hashCode = hashCode * 59 + this.DataProtocollo.GetHashCode();
                if (this.Datarevoca != null)
                    hashCode = hashCode * 59 + this.Datarevoca.GetHashCode();
                if (this.DataRicez != null)
                    hashCode = hashCode * 59 + this.DataRicez.GetHashCode();
                if (this.DittaCg18 != null)
                    hashCode = hashCode * 59 + this.DittaCg18.GetHashCode();
                if (this.Dogana != null)
                    hashCode = hashCode * 59 + this.Dogana.GetHashCode();
                if (this.FinoAEuro != null)
                    hashCode = hashCode * 59 + this.FinoAEuro.GetHashCode();
                if (this.FlagDisattiv != null)
                    hashCode = hashCode * 59 + this.FlagDisattiv.GetHashCode();
                if (this.FlagStDich != null)
                    hashCode = hashCode * 59 + this.FlagStDich.GetHashCode();
                if (this.FlagStReg != null)
                    hashCode = hashCode * 59 + this.FlagStReg.GetHashCode();
                if (this.FlgScartata != null)
                    hashCode = hashCode * 59 + this.FlgScartata.GetHashCode();
                if (this.Id != null)
                    hashCode = hashCode * 59 + this.Id.GetHashCode();
                if (this.IndTipoDich != null)
                    hashCode = hashCode * 59 + this.IndTipoDich.GetHashCode();
                if (this.Note != null)
                    hashCode = hashCode * 59 + this.Note.GetHashCode();
                if (this.NumLetDich != null)
                    hashCode = hashCode * 59 + this.NumLetDich.GetHashCode();
                if (this.NumNsProt != null)
                    hashCode = hashCode * 59 + this.NumNsProt.GetHashCode();
                if (this.NumProtocollo != null)
                    hashCode = hashCode * 59 + this.NumProtocollo.GetHashCode();
                if (this.ProgRinvio != null)
                    hashCode = hashCode * 59 + this.ProgRinvio.GetHashCode();
                if (this.Rowversion != null)
                    hashCode = hashCode * 59 + this.Rowversion.GetHashCode();
                if (this.TipoCFCg44 != null)
                    hashCode = hashCode * 59 + this.TipoCFCg44.GetHashCode();
                if (this.VatCodeCO != null)
                    hashCode = hashCode * 59 + this.VatCodeCO.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;
        }
    }
}
