/* 
 * 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>
    /// CG63_CONDPAGDET - PaymentTermDetailCO&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 PaymentTermDetailCODTO :  IEquatable<PaymentTermDetailCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PaymentTermDetailCODTO" /> class.
        /// </summary>
        /// <param name="aggfix1">CG63_AGGFIX1 - Aggfix1.</param>
        /// <param name="aggfix2">CG63_AGGFIX2 - Aggfix2.</param>
        /// <param name="codPagCg62">CG63_CODPAG_CG62 - CodPagCg62 (required).</param>
        /// <param name="daggfix1">CG63_DAGGFIX1 - Daggfix1.</param>
        /// <param name="daggfix2">CG63_DAGGFIX2 - Daggfix2.</param>
        /// <param name="el1frimp">CG63_EL1FRIMP -  Num..</param>
        /// <param name="el1friva">CG63_EL1FRIVA -  Num..</param>
        /// <param name="el2frimp">CG63_EL2FRIMP - Den..</param>
        /// <param name="el2friva">CG63_EL2FRIVA - Den..</param>
        /// <param name="flgFrpercimp">CG63_FLGFRPERCIMP - Fr./% imp.&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Percentuale&lt;/li&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Frazione&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="flgFrperciva">CG63_FLGFRPERCIVA - Fr./% iva.&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Percentuale&lt;/li&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Frazione&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="ggdecor">CG63_GGDECOR - gg dec..</param>
        /// <param name="ggmmfix">CG63_GGMMFIX - Ggmmfix.</param>
        /// <param name="ggscadfix1">CG63_GGSCADFIX1 - Ggscadfix1.</param>
        /// <param name="ggscadfix2">CG63_GGSCADFIX2 - Ggscadfix2.</param>
        /// <param name="id">CG63_ID - Id (Required only in PUT/PATCH).</param>
        /// <param name="idCg62">CG63_ID_CG62 - IdCg62 (required).</param>
        /// <param name="idCg64">CG63_ID_CG64 - IdCg64.</param>
        /// <param name="imporfix">CG63_IMPORFIX - Imporfix.</param>
        /// <param name="indDatarif">CG63_INDDATARIF - Rif. decorrenza&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Data fattura&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Data Bolla&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Data consegna&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Data ordine&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Data a richiesta&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Data fattura (+GG |-&gt; fine mese)&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Data fattura (|-&gt; fine mese + GG)&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="indImpfix">CG63_INDIMPFIX - IndImpfix&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Non gestito&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Da condizione di pagamento&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Rich . nel doc. d&#x27;origine&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="indTipocalend">CG63_INDTIPOCALEND - IndTipocalend&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Commerciale&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Civile&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="indTipodecor">CG63_INDTIPODECOR - Tipo decorrenza&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Mese commerciale / civile&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Giorno fisso&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Data fissa&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Giorno fisso per int. di gg&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="percimp">CG63_PERCIMP - % Imp..</param>
        /// <param name="perciva">CG63_PERCIVA - % IVA.</param>
        /// <param name="prog">CG63_PROG - Rata (required).</param>
        /// <param name="rowversion">CG63_ROWVERSION - RowVersion.</param>
        /// <param name="tipoeff">CG63_TIPOEFF - Tipo effetto&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Contanti&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Ricevuta bancaria&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Tratta&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Tratta accettata&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Cessione&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Cambiale&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Carta di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Bancomat&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Contrassegno&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Lettera di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;11&lt;/i&gt; - SDD&lt;/li&gt;&lt;li&gt;&lt;i&gt;12&lt;/i&gt; - Leasing&lt;/li&gt;&lt;li&gt;&lt;i&gt;13&lt;/i&gt; - Rimessa diretta&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bonifico Bancario&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - C/C postale&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="subTypeCO">subTypeCO.</param>
        /// <param name="additionalData">additionalData.</param>
        /// <param name="pluginData">pluginData.</param>
        public PaymentTermDetailCODTO(double? aggfix1 = default(double?), double? aggfix2 = default(double?), string codPagCg62 = default(string), double? daggfix1 = default(double?), double? daggfix2 = default(double?), double? el1frimp = default(double?), double? el1friva = default(double?), double? el2frimp = default(double?), double? el2friva = default(double?), double? flgFrpercimp = default(double?), double? flgFrperciva = default(double?), double? ggdecor = default(double?), double? ggmmfix = default(double?), double? ggscadfix1 = default(double?), double? ggscadfix2 = default(double?), long? id = default(long?), long? idCg62 = default(long?), long? idCg64 = default(long?), double? imporfix = default(double?), double? indDatarif = default(double?), double? indImpfix = default(double?), int? indTipocalend = default(int?), double? indTipodecor = default(double?), double? percimp = default(double?), double? perciva = default(double?), double? prog = default(double?), byte[] rowversion = default(byte[]), double? tipoeff = default(double?), SubTypeCODTO subTypeCO = default(SubTypeCODTO), Dictionary<string, Object> additionalData = default(Dictionary<string, Object>), Dictionary<string, Object> pluginData = default(Dictionary<string, Object>))
        {
            // to ensure "codPagCg62" is required (not null)
            if (codPagCg62 == null)
            {
                throw new InvalidDataException("codPagCg62 is a required property for PaymentTermDetailCODTO and cannot be null");
            }
            else
            {
                this.CodPagCg62 = codPagCg62;
            }
            // to ensure "idCg62" is required (not null)
            if (idCg62 == null)
            {
                throw new InvalidDataException("idCg62 is a required property for PaymentTermDetailCODTO and cannot be null");
            }
            else
            {
                this.IdCg62 = idCg62;
            }
            // to ensure "prog" is required (not null)
            if (prog == null)
            {
                throw new InvalidDataException("prog is a required property for PaymentTermDetailCODTO and cannot be null");
            }
            else
            {
                this.Prog = prog;
            }
            this.Aggfix1 = aggfix1;
            this.Aggfix2 = aggfix2;
            this.Daggfix1 = daggfix1;
            this.Daggfix2 = daggfix2;
            this.El1frimp = el1frimp;
            this.El1friva = el1friva;
            this.El2frimp = el2frimp;
            this.El2friva = el2friva;
            this.FlgFrpercimp = flgFrpercimp;
            this.FlgFrperciva = flgFrperciva;
            this.Ggdecor = ggdecor;
            this.Ggmmfix = ggmmfix;
            this.Ggscadfix1 = ggscadfix1;
            this.Ggscadfix2 = ggscadfix2;
            this.Id = id;
            this.IdCg64 = idCg64;
            this.Imporfix = imporfix;
            this.IndDatarif = indDatarif;
            this.IndImpfix = indImpfix;
            this.IndTipocalend = indTipocalend;
            this.IndTipodecor = indTipodecor;
            this.Percimp = percimp;
            this.Perciva = perciva;
            this.Rowversion = rowversion;
            this.Tipoeff = tipoeff;
            this.SubTypeCO = subTypeCO;
            this.AdditionalData = additionalData;
            this.PluginData = pluginData;
        }
        
        /// <summary>
        /// CG63_AGGFIX1 - Aggfix1
        /// </summary>
        /// <value>CG63_AGGFIX1 - Aggfix1</value>
        [DataMember(Name="aggfix1", EmitDefaultValue=false)]
        public double? Aggfix1 { get; set; }

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

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

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

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

        /// <summary>
        /// CG63_EL1FRIMP -  Num.
        /// </summary>
        /// <value>CG63_EL1FRIMP -  Num.</value>
        [DataMember(Name="el1frimp", EmitDefaultValue=false)]
        public double? El1frimp { get; set; }

        /// <summary>
        /// CG63_EL1FRIVA -  Num.
        /// </summary>
        /// <value>CG63_EL1FRIVA -  Num.</value>
        [DataMember(Name="el1friva", EmitDefaultValue=false)]
        public double? El1friva { get; set; }

        /// <summary>
        /// CG63_EL2FRIMP - Den.
        /// </summary>
        /// <value>CG63_EL2FRIMP - Den.</value>
        [DataMember(Name="el2frimp", EmitDefaultValue=false)]
        public double? El2frimp { get; set; }

        /// <summary>
        /// CG63_EL2FRIVA - Den.
        /// </summary>
        /// <value>CG63_EL2FRIVA - Den.</value>
        [DataMember(Name="el2friva", EmitDefaultValue=false)]
        public double? El2friva { get; set; }

        /// <summary>
        /// CG63_FLGFRPERCIMP - Fr./% imp.&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Percentuale&lt;/li&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Frazione&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG63_FLGFRPERCIMP - Fr./% imp.&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Percentuale&lt;/li&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Frazione&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="flgFrpercimp", EmitDefaultValue=false)]
        public double? FlgFrpercimp { get; set; }

        /// <summary>
        /// CG63_FLGFRPERCIVA - Fr./% iva.&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Percentuale&lt;/li&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Frazione&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG63_FLGFRPERCIVA - Fr./% iva.&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Percentuale&lt;/li&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Frazione&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="flgFrperciva", EmitDefaultValue=false)]
        public double? FlgFrperciva { get; set; }

        /// <summary>
        /// CG63_GGDECOR - gg dec.
        /// </summary>
        /// <value>CG63_GGDECOR - gg dec.</value>
        [DataMember(Name="ggdecor", EmitDefaultValue=false)]
        public double? Ggdecor { get; set; }

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

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

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

        /// <summary>
        /// CG63_ID - Id (Required only in PUT/PATCH)
        /// </summary>
        /// <value>CG63_ID - Id (Required only in PUT/PATCH)</value>
        [DataMember(Name="id", EmitDefaultValue=false)]
        public long? Id { get; set; }

        /// <summary>
        /// CG63_ID_CG62 - IdCg62
        /// </summary>
        /// <value>CG63_ID_CG62 - IdCg62</value>
        [DataMember(Name="idCg62", EmitDefaultValue=false)]
        public long? IdCg62 { get; set; }

        /// <summary>
        /// CG63_ID_CG64 - IdCg64
        /// </summary>
        /// <value>CG63_ID_CG64 - IdCg64</value>
        [DataMember(Name="idCg64", EmitDefaultValue=false)]
        public long? IdCg64 { get; set; }

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

        /// <summary>
        /// CG63_INDDATARIF - Rif. decorrenza&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Data fattura&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Data Bolla&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Data consegna&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Data ordine&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Data a richiesta&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Data fattura (+GG |-&gt; fine mese)&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Data fattura (|-&gt; fine mese + GG)&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG63_INDDATARIF - Rif. decorrenza&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Data fattura&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Data Bolla&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Data consegna&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Data ordine&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Data a richiesta&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Data fattura (+GG |-&gt; fine mese)&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Data fattura (|-&gt; fine mese + GG)&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indDatarif", EmitDefaultValue=false)]
        public double? IndDatarif { get; set; }

        /// <summary>
        /// CG63_INDIMPFIX - IndImpfix&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Non gestito&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Da condizione di pagamento&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Rich . nel doc. d&#x27;origine&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG63_INDIMPFIX - IndImpfix&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Non gestito&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Da condizione di pagamento&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Rich . nel doc. d&#x27;origine&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indImpfix", EmitDefaultValue=false)]
        public double? IndImpfix { get; set; }

        /// <summary>
        /// CG63_INDTIPOCALEND - IndTipocalend&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Commerciale&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Civile&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG63_INDTIPOCALEND - IndTipocalend&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Commerciale&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Civile&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indTipocalend", EmitDefaultValue=false)]
        public int? IndTipocalend { get; set; }

        /// <summary>
        /// CG63_INDTIPODECOR - Tipo decorrenza&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Mese commerciale / civile&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Giorno fisso&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Data fissa&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Giorno fisso per int. di gg&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG63_INDTIPODECOR - Tipo decorrenza&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Mese commerciale / civile&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Giorno fisso&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Data fissa&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Giorno fisso per int. di gg&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indTipodecor", EmitDefaultValue=false)]
        public double? IndTipodecor { get; set; }

        /// <summary>
        /// CG63_PERCIMP - % Imp.
        /// </summary>
        /// <value>CG63_PERCIMP - % Imp.</value>
        [DataMember(Name="percimp", EmitDefaultValue=false)]
        public double? Percimp { get; set; }

        /// <summary>
        /// CG63_PERCIVA - % IVA
        /// </summary>
        /// <value>CG63_PERCIVA - % IVA</value>
        [DataMember(Name="perciva", EmitDefaultValue=false)]
        public double? Perciva { get; set; }

        /// <summary>
        /// CG63_PROG - Rata
        /// </summary>
        /// <value>CG63_PROG - Rata</value>
        [DataMember(Name="prog", EmitDefaultValue=false)]
        public double? Prog { get; set; }

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

        /// <summary>
        /// CG63_TIPOEFF - Tipo effetto&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Contanti&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Ricevuta bancaria&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Tratta&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Tratta accettata&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Cessione&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Cambiale&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Carta di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Bancomat&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Contrassegno&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Lettera di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;11&lt;/i&gt; - SDD&lt;/li&gt;&lt;li&gt;&lt;i&gt;12&lt;/i&gt; - Leasing&lt;/li&gt;&lt;li&gt;&lt;i&gt;13&lt;/i&gt; - Rimessa diretta&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bonifico Bancario&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - C/C postale&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>CG63_TIPOEFF - Tipo effetto&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Contanti&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Ricevuta bancaria&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Tratta&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Tratta accettata&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Cessione&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Cambiale&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Carta di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Bancomat&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Contrassegno&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Lettera di credito&lt;/li&gt;&lt;li&gt;&lt;i&gt;11&lt;/i&gt; - SDD&lt;/li&gt;&lt;li&gt;&lt;i&gt;12&lt;/i&gt; - Leasing&lt;/li&gt;&lt;li&gt;&lt;i&gt;13&lt;/i&gt; - Rimessa diretta&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bonifico Bancario&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - C/C postale&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="tipoeff", EmitDefaultValue=false)]
        public double? Tipoeff { get; set; }

        /// <summary>
        /// Gets or Sets SubTypeCO
        /// </summary>
        [DataMember(Name="subTypeCO", EmitDefaultValue=false)]
        public SubTypeCODTO SubTypeCO { 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 PaymentTermDetailCODTO {\n");
            sb.Append("  Aggfix1: ").Append(Aggfix1).Append("\n");
            sb.Append("  Aggfix2: ").Append(Aggfix2).Append("\n");
            sb.Append("  CodPagCg62: ").Append(CodPagCg62).Append("\n");
            sb.Append("  Daggfix1: ").Append(Daggfix1).Append("\n");
            sb.Append("  Daggfix2: ").Append(Daggfix2).Append("\n");
            sb.Append("  El1frimp: ").Append(El1frimp).Append("\n");
            sb.Append("  El1friva: ").Append(El1friva).Append("\n");
            sb.Append("  El2frimp: ").Append(El2frimp).Append("\n");
            sb.Append("  El2friva: ").Append(El2friva).Append("\n");
            sb.Append("  FlgFrpercimp: ").Append(FlgFrpercimp).Append("\n");
            sb.Append("  FlgFrperciva: ").Append(FlgFrperciva).Append("\n");
            sb.Append("  Ggdecor: ").Append(Ggdecor).Append("\n");
            sb.Append("  Ggmmfix: ").Append(Ggmmfix).Append("\n");
            sb.Append("  Ggscadfix1: ").Append(Ggscadfix1).Append("\n");
            sb.Append("  Ggscadfix2: ").Append(Ggscadfix2).Append("\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  IdCg62: ").Append(IdCg62).Append("\n");
            sb.Append("  IdCg64: ").Append(IdCg64).Append("\n");
            sb.Append("  Imporfix: ").Append(Imporfix).Append("\n");
            sb.Append("  IndDatarif: ").Append(IndDatarif).Append("\n");
            sb.Append("  IndImpfix: ").Append(IndImpfix).Append("\n");
            sb.Append("  IndTipocalend: ").Append(IndTipocalend).Append("\n");
            sb.Append("  IndTipodecor: ").Append(IndTipodecor).Append("\n");
            sb.Append("  Percimp: ").Append(Percimp).Append("\n");
            sb.Append("  Perciva: ").Append(Perciva).Append("\n");
            sb.Append("  Prog: ").Append(Prog).Append("\n");
            sb.Append("  Rowversion: ").Append(Rowversion).Append("\n");
            sb.Append("  Tipoeff: ").Append(Tipoeff).Append("\n");
            sb.Append("  SubTypeCO: ").Append(SubTypeCO).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 PaymentTermDetailCODTO);
        }

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

            return 
                (
                    this.Aggfix1 == input.Aggfix1 ||
                    (this.Aggfix1 != null &&
                    this.Aggfix1.Equals(input.Aggfix1))
                ) && 
                (
                    this.Aggfix2 == input.Aggfix2 ||
                    (this.Aggfix2 != null &&
                    this.Aggfix2.Equals(input.Aggfix2))
                ) && 
                (
                    this.CodPagCg62 == input.CodPagCg62 ||
                    (this.CodPagCg62 != null &&
                    this.CodPagCg62.Equals(input.CodPagCg62))
                ) && 
                (
                    this.Daggfix1 == input.Daggfix1 ||
                    (this.Daggfix1 != null &&
                    this.Daggfix1.Equals(input.Daggfix1))
                ) && 
                (
                    this.Daggfix2 == input.Daggfix2 ||
                    (this.Daggfix2 != null &&
                    this.Daggfix2.Equals(input.Daggfix2))
                ) && 
                (
                    this.El1frimp == input.El1frimp ||
                    (this.El1frimp != null &&
                    this.El1frimp.Equals(input.El1frimp))
                ) && 
                (
                    this.El1friva == input.El1friva ||
                    (this.El1friva != null &&
                    this.El1friva.Equals(input.El1friva))
                ) && 
                (
                    this.El2frimp == input.El2frimp ||
                    (this.El2frimp != null &&
                    this.El2frimp.Equals(input.El2frimp))
                ) && 
                (
                    this.El2friva == input.El2friva ||
                    (this.El2friva != null &&
                    this.El2friva.Equals(input.El2friva))
                ) && 
                (
                    this.FlgFrpercimp == input.FlgFrpercimp ||
                    (this.FlgFrpercimp != null &&
                    this.FlgFrpercimp.Equals(input.FlgFrpercimp))
                ) && 
                (
                    this.FlgFrperciva == input.FlgFrperciva ||
                    (this.FlgFrperciva != null &&
                    this.FlgFrperciva.Equals(input.FlgFrperciva))
                ) && 
                (
                    this.Ggdecor == input.Ggdecor ||
                    (this.Ggdecor != null &&
                    this.Ggdecor.Equals(input.Ggdecor))
                ) && 
                (
                    this.Ggmmfix == input.Ggmmfix ||
                    (this.Ggmmfix != null &&
                    this.Ggmmfix.Equals(input.Ggmmfix))
                ) && 
                (
                    this.Ggscadfix1 == input.Ggscadfix1 ||
                    (this.Ggscadfix1 != null &&
                    this.Ggscadfix1.Equals(input.Ggscadfix1))
                ) && 
                (
                    this.Ggscadfix2 == input.Ggscadfix2 ||
                    (this.Ggscadfix2 != null &&
                    this.Ggscadfix2.Equals(input.Ggscadfix2))
                ) && 
                (
                    this.Id == input.Id ||
                    (this.Id != null &&
                    this.Id.Equals(input.Id))
                ) && 
                (
                    this.IdCg62 == input.IdCg62 ||
                    (this.IdCg62 != null &&
                    this.IdCg62.Equals(input.IdCg62))
                ) && 
                (
                    this.IdCg64 == input.IdCg64 ||
                    (this.IdCg64 != null &&
                    this.IdCg64.Equals(input.IdCg64))
                ) && 
                (
                    this.Imporfix == input.Imporfix ||
                    (this.Imporfix != null &&
                    this.Imporfix.Equals(input.Imporfix))
                ) && 
                (
                    this.IndDatarif == input.IndDatarif ||
                    (this.IndDatarif != null &&
                    this.IndDatarif.Equals(input.IndDatarif))
                ) && 
                (
                    this.IndImpfix == input.IndImpfix ||
                    (this.IndImpfix != null &&
                    this.IndImpfix.Equals(input.IndImpfix))
                ) && 
                (
                    this.IndTipocalend == input.IndTipocalend ||
                    (this.IndTipocalend != null &&
                    this.IndTipocalend.Equals(input.IndTipocalend))
                ) && 
                (
                    this.IndTipodecor == input.IndTipodecor ||
                    (this.IndTipodecor != null &&
                    this.IndTipodecor.Equals(input.IndTipodecor))
                ) && 
                (
                    this.Percimp == input.Percimp ||
                    (this.Percimp != null &&
                    this.Percimp.Equals(input.Percimp))
                ) && 
                (
                    this.Perciva == input.Perciva ||
                    (this.Perciva != null &&
                    this.Perciva.Equals(input.Perciva))
                ) && 
                (
                    this.Prog == input.Prog ||
                    (this.Prog != null &&
                    this.Prog.Equals(input.Prog))
                ) && 
                (
                    this.Rowversion == input.Rowversion ||
                    (this.Rowversion != null &&
                    this.Rowversion.Equals(input.Rowversion))
                ) && 
                (
                    this.Tipoeff == input.Tipoeff ||
                    (this.Tipoeff != null &&
                    this.Tipoeff.Equals(input.Tipoeff))
                ) && 
                (
                    this.SubTypeCO == input.SubTypeCO ||
                    (this.SubTypeCO != null &&
                    this.SubTypeCO.Equals(input.SubTypeCO))
                ) && 
                (
                    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.Aggfix1 != null)
                    hashCode = hashCode * 59 + this.Aggfix1.GetHashCode();
                if (this.Aggfix2 != null)
                    hashCode = hashCode * 59 + this.Aggfix2.GetHashCode();
                if (this.CodPagCg62 != null)
                    hashCode = hashCode * 59 + this.CodPagCg62.GetHashCode();
                if (this.Daggfix1 != null)
                    hashCode = hashCode * 59 + this.Daggfix1.GetHashCode();
                if (this.Daggfix2 != null)
                    hashCode = hashCode * 59 + this.Daggfix2.GetHashCode();
                if (this.El1frimp != null)
                    hashCode = hashCode * 59 + this.El1frimp.GetHashCode();
                if (this.El1friva != null)
                    hashCode = hashCode * 59 + this.El1friva.GetHashCode();
                if (this.El2frimp != null)
                    hashCode = hashCode * 59 + this.El2frimp.GetHashCode();
                if (this.El2friva != null)
                    hashCode = hashCode * 59 + this.El2friva.GetHashCode();
                if (this.FlgFrpercimp != null)
                    hashCode = hashCode * 59 + this.FlgFrpercimp.GetHashCode();
                if (this.FlgFrperciva != null)
                    hashCode = hashCode * 59 + this.FlgFrperciva.GetHashCode();
                if (this.Ggdecor != null)
                    hashCode = hashCode * 59 + this.Ggdecor.GetHashCode();
                if (this.Ggmmfix != null)
                    hashCode = hashCode * 59 + this.Ggmmfix.GetHashCode();
                if (this.Ggscadfix1 != null)
                    hashCode = hashCode * 59 + this.Ggscadfix1.GetHashCode();
                if (this.Ggscadfix2 != null)
                    hashCode = hashCode * 59 + this.Ggscadfix2.GetHashCode();
                if (this.Id != null)
                    hashCode = hashCode * 59 + this.Id.GetHashCode();
                if (this.IdCg62 != null)
                    hashCode = hashCode * 59 + this.IdCg62.GetHashCode();
                if (this.IdCg64 != null)
                    hashCode = hashCode * 59 + this.IdCg64.GetHashCode();
                if (this.Imporfix != null)
                    hashCode = hashCode * 59 + this.Imporfix.GetHashCode();
                if (this.IndDatarif != null)
                    hashCode = hashCode * 59 + this.IndDatarif.GetHashCode();
                if (this.IndImpfix != null)
                    hashCode = hashCode * 59 + this.IndImpfix.GetHashCode();
                if (this.IndTipocalend != null)
                    hashCode = hashCode * 59 + this.IndTipocalend.GetHashCode();
                if (this.IndTipodecor != null)
                    hashCode = hashCode * 59 + this.IndTipodecor.GetHashCode();
                if (this.Percimp != null)
                    hashCode = hashCode * 59 + this.Percimp.GetHashCode();
                if (this.Perciva != null)
                    hashCode = hashCode * 59 + this.Perciva.GetHashCode();
                if (this.Prog != null)
                    hashCode = hashCode * 59 + this.Prog.GetHashCode();
                if (this.Rowversion != null)
                    hashCode = hashCode * 59 + this.Rowversion.GetHashCode();
                if (this.Tipoeff != null)
                    hashCode = hashCode * 59 + this.Tipoeff.GetHashCode();
                if (this.SubTypeCO != null)
                    hashCode = hashCode * 59 + this.SubTypeCO.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;
        }
    }
}
