/* 
 * 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>
    /// InstalmentCalculationResultElementDTO
    /// </summary>
    [DataContract]
        public partial class InstalmentCalculationResultElementDTO :  IEquatable<InstalmentCalculationResultElementDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="InstalmentCalculationResultElementDTO" /> class.
        /// </summary>
        /// <param name="tipoEffetto">EF01_TIPOEFF - Type&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Cash&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Bank receipt&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Draft&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Accepted draft&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Assignment&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Bill of exchange&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Credit card&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Debit card&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Cash on delivery&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Letter of credit&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; - Direct remittance&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bank transfer&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - Postal account&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="sottotipoEffetto">EF01_STIPOEFF - Subtype.</param>
        /// <param name="descSottotipoEffetto">Subtype Description.</param>
        /// <param name="dataScadenza">EF01_SCADE_S - Due date.</param>
        /// <param name="idBancaAziendale">EF01_ID_EF08 - Company bank.</param>
        /// <param name="idBancaCliFor">EF01_ID_MG35 - Customer/Supplier bank.</param>
        /// <param name="importoScadenzaEuro">EF01_IMPEFFORIG - Instalment amount in EURO.</param>
        /// <param name="importoScadenzaValuta">EF01_IMPEFFORIGVAL - Instalment amount in currency.</param>
        /// <param name="importoIvaEuro">EF01_IMPEFFIVA - VAT amount in EURO.</param>
        /// <param name="importoIvaValuta">EF01_IMPEFFIVA_VAL - VAT amount in currency.</param>
        /// <param name="importoRitenutaEuro">EF01_IMPRITACC - Withholding amount in EURO.</param>
        /// <param name="importoRitenutaValuta">EF01_IMPRITACCVAL - Withholding amount in currency.</param>
        /// <param name="dataDecorrenza">EF01_DATADECORR - Effective date.</param>
        public InstalmentCalculationResultElementDTO(double? tipoEffetto = default(double?), double? sottotipoEffetto = default(double?), string descSottotipoEffetto = default(string), DateTime? dataScadenza = default(DateTime?), long? idBancaAziendale = default(long?), int? idBancaCliFor = default(int?), double? importoScadenzaEuro = default(double?), double? importoScadenzaValuta = default(double?), double? importoIvaEuro = default(double?), double? importoIvaValuta = default(double?), double? importoRitenutaEuro = default(double?), double? importoRitenutaValuta = default(double?), DateTime? dataDecorrenza = default(DateTime?))
        {
            this.TipoEffetto = tipoEffetto;
            this.SottotipoEffetto = sottotipoEffetto;
            this.DescSottotipoEffetto = descSottotipoEffetto;
            this.DataScadenza = dataScadenza;
            this.IdBancaAziendale = idBancaAziendale;
            this.IdBancaCliFor = idBancaCliFor;
            this.ImportoScadenzaEuro = importoScadenzaEuro;
            this.ImportoScadenzaValuta = importoScadenzaValuta;
            this.ImportoIvaEuro = importoIvaEuro;
            this.ImportoIvaValuta = importoIvaValuta;
            this.ImportoRitenutaEuro = importoRitenutaEuro;
            this.ImportoRitenutaValuta = importoRitenutaValuta;
            this.DataDecorrenza = dataDecorrenza;
        }
        
        /// <summary>
        /// EF01_TIPOEFF - Type&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Cash&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Bank receipt&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Draft&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Accepted draft&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Assignment&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Bill of exchange&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Credit card&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Debit card&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Cash on delivery&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Letter of credit&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; - Direct remittance&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bank transfer&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - Postal account&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>EF01_TIPOEFF - Type&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Cash&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Bank receipt&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Draft&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Accepted draft&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Assignment&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Bill of exchange&lt;/li&gt;&lt;li&gt;&lt;i&gt;7&lt;/i&gt; - Credit card&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Debit card&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Cash on delivery&lt;/li&gt;&lt;li&gt;&lt;i&gt;10&lt;/i&gt; - Letter of credit&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; - Direct remittance&lt;/li&gt;&lt;li&gt;&lt;i&gt;14&lt;/i&gt; - Bank transfer&lt;/li&gt;&lt;li&gt;&lt;i&gt;15&lt;/i&gt; - Postal account&lt;/li&gt;&lt;li&gt;&lt;i&gt;16&lt;/i&gt; - MAV&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="tipoEffetto", EmitDefaultValue=false)]
        public double? TipoEffetto { get; set; }

        /// <summary>
        /// EF01_STIPOEFF - Subtype
        /// </summary>
        /// <value>EF01_STIPOEFF - Subtype</value>
        [DataMember(Name="sottotipoEffetto", EmitDefaultValue=false)]
        public double? SottotipoEffetto { get; set; }

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

        /// <summary>
        /// EF01_SCADE_S - Due date
        /// </summary>
        /// <value>EF01_SCADE_S - Due date</value>
        [DataMember(Name="dataScadenza", EmitDefaultValue=false)]
        public DateTime? DataScadenza { get; set; }

        /// <summary>
        /// EF01_ID_EF08 - Company bank
        /// </summary>
        /// <value>EF01_ID_EF08 - Company bank</value>
        [DataMember(Name="idBancaAziendale", EmitDefaultValue=false)]
        public long? IdBancaAziendale { get; set; }

        /// <summary>
        /// EF01_ID_MG35 - Customer/Supplier bank
        /// </summary>
        /// <value>EF01_ID_MG35 - Customer/Supplier bank</value>
        [DataMember(Name="idBancaCliFor", EmitDefaultValue=false)]
        public int? IdBancaCliFor { get; set; }

        /// <summary>
        /// EF01_IMPEFFORIG - Instalment amount in EURO
        /// </summary>
        /// <value>EF01_IMPEFFORIG - Instalment amount in EURO</value>
        [DataMember(Name="importoScadenzaEuro", EmitDefaultValue=false)]
        public double? ImportoScadenzaEuro { get; set; }

        /// <summary>
        /// EF01_IMPEFFORIGVAL - Instalment amount in currency
        /// </summary>
        /// <value>EF01_IMPEFFORIGVAL - Instalment amount in currency</value>
        [DataMember(Name="importoScadenzaValuta", EmitDefaultValue=false)]
        public double? ImportoScadenzaValuta { get; set; }

        /// <summary>
        /// EF01_IMPEFFIVA - VAT amount in EURO
        /// </summary>
        /// <value>EF01_IMPEFFIVA - VAT amount in EURO</value>
        [DataMember(Name="importoIvaEuro", EmitDefaultValue=false)]
        public double? ImportoIvaEuro { get; set; }

        /// <summary>
        /// EF01_IMPEFFIVA_VAL - VAT amount in currency
        /// </summary>
        /// <value>EF01_IMPEFFIVA_VAL - VAT amount in currency</value>
        [DataMember(Name="importoIvaValuta", EmitDefaultValue=false)]
        public double? ImportoIvaValuta { get; set; }

        /// <summary>
        /// EF01_IMPRITACC - Withholding amount in EURO
        /// </summary>
        /// <value>EF01_IMPRITACC - Withholding amount in EURO</value>
        [DataMember(Name="importoRitenutaEuro", EmitDefaultValue=false)]
        public double? ImportoRitenutaEuro { get; set; }

        /// <summary>
        /// EF01_IMPRITACCVAL - Withholding amount in currency
        /// </summary>
        /// <value>EF01_IMPRITACCVAL - Withholding amount in currency</value>
        [DataMember(Name="importoRitenutaValuta", EmitDefaultValue=false)]
        public double? ImportoRitenutaValuta { get; set; }

        /// <summary>
        /// EF01_DATADECORR - Effective date
        /// </summary>
        /// <value>EF01_DATADECORR - Effective date</value>
        [DataMember(Name="dataDecorrenza", EmitDefaultValue=false)]
        public DateTime? DataDecorrenza { 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 InstalmentCalculationResultElementDTO {\n");
            sb.Append("  TipoEffetto: ").Append(TipoEffetto).Append("\n");
            sb.Append("  SottotipoEffetto: ").Append(SottotipoEffetto).Append("\n");
            sb.Append("  DescSottotipoEffetto: ").Append(DescSottotipoEffetto).Append("\n");
            sb.Append("  DataScadenza: ").Append(DataScadenza).Append("\n");
            sb.Append("  IdBancaAziendale: ").Append(IdBancaAziendale).Append("\n");
            sb.Append("  IdBancaCliFor: ").Append(IdBancaCliFor).Append("\n");
            sb.Append("  ImportoScadenzaEuro: ").Append(ImportoScadenzaEuro).Append("\n");
            sb.Append("  ImportoScadenzaValuta: ").Append(ImportoScadenzaValuta).Append("\n");
            sb.Append("  ImportoIvaEuro: ").Append(ImportoIvaEuro).Append("\n");
            sb.Append("  ImportoIvaValuta: ").Append(ImportoIvaValuta).Append("\n");
            sb.Append("  ImportoRitenutaEuro: ").Append(ImportoRitenutaEuro).Append("\n");
            sb.Append("  ImportoRitenutaValuta: ").Append(ImportoRitenutaValuta).Append("\n");
            sb.Append("  DataDecorrenza: ").Append(DataDecorrenza).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 InstalmentCalculationResultElementDTO);
        }

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

            return 
                (
                    this.TipoEffetto == input.TipoEffetto ||
                    (this.TipoEffetto != null &&
                    this.TipoEffetto.Equals(input.TipoEffetto))
                ) && 
                (
                    this.SottotipoEffetto == input.SottotipoEffetto ||
                    (this.SottotipoEffetto != null &&
                    this.SottotipoEffetto.Equals(input.SottotipoEffetto))
                ) && 
                (
                    this.DescSottotipoEffetto == input.DescSottotipoEffetto ||
                    (this.DescSottotipoEffetto != null &&
                    this.DescSottotipoEffetto.Equals(input.DescSottotipoEffetto))
                ) && 
                (
                    this.DataScadenza == input.DataScadenza ||
                    (this.DataScadenza != null &&
                    this.DataScadenza.Equals(input.DataScadenza))
                ) && 
                (
                    this.IdBancaAziendale == input.IdBancaAziendale ||
                    (this.IdBancaAziendale != null &&
                    this.IdBancaAziendale.Equals(input.IdBancaAziendale))
                ) && 
                (
                    this.IdBancaCliFor == input.IdBancaCliFor ||
                    (this.IdBancaCliFor != null &&
                    this.IdBancaCliFor.Equals(input.IdBancaCliFor))
                ) && 
                (
                    this.ImportoScadenzaEuro == input.ImportoScadenzaEuro ||
                    (this.ImportoScadenzaEuro != null &&
                    this.ImportoScadenzaEuro.Equals(input.ImportoScadenzaEuro))
                ) && 
                (
                    this.ImportoScadenzaValuta == input.ImportoScadenzaValuta ||
                    (this.ImportoScadenzaValuta != null &&
                    this.ImportoScadenzaValuta.Equals(input.ImportoScadenzaValuta))
                ) && 
                (
                    this.ImportoIvaEuro == input.ImportoIvaEuro ||
                    (this.ImportoIvaEuro != null &&
                    this.ImportoIvaEuro.Equals(input.ImportoIvaEuro))
                ) && 
                (
                    this.ImportoIvaValuta == input.ImportoIvaValuta ||
                    (this.ImportoIvaValuta != null &&
                    this.ImportoIvaValuta.Equals(input.ImportoIvaValuta))
                ) && 
                (
                    this.ImportoRitenutaEuro == input.ImportoRitenutaEuro ||
                    (this.ImportoRitenutaEuro != null &&
                    this.ImportoRitenutaEuro.Equals(input.ImportoRitenutaEuro))
                ) && 
                (
                    this.ImportoRitenutaValuta == input.ImportoRitenutaValuta ||
                    (this.ImportoRitenutaValuta != null &&
                    this.ImportoRitenutaValuta.Equals(input.ImportoRitenutaValuta))
                ) && 
                (
                    this.DataDecorrenza == input.DataDecorrenza ||
                    (this.DataDecorrenza != null &&
                    this.DataDecorrenza.Equals(input.DataDecorrenza))
                );
        }

        /// <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.TipoEffetto != null)
                    hashCode = hashCode * 59 + this.TipoEffetto.GetHashCode();
                if (this.SottotipoEffetto != null)
                    hashCode = hashCode * 59 + this.SottotipoEffetto.GetHashCode();
                if (this.DescSottotipoEffetto != null)
                    hashCode = hashCode * 59 + this.DescSottotipoEffetto.GetHashCode();
                if (this.DataScadenza != null)
                    hashCode = hashCode * 59 + this.DataScadenza.GetHashCode();
                if (this.IdBancaAziendale != null)
                    hashCode = hashCode * 59 + this.IdBancaAziendale.GetHashCode();
                if (this.IdBancaCliFor != null)
                    hashCode = hashCode * 59 + this.IdBancaCliFor.GetHashCode();
                if (this.ImportoScadenzaEuro != null)
                    hashCode = hashCode * 59 + this.ImportoScadenzaEuro.GetHashCode();
                if (this.ImportoScadenzaValuta != null)
                    hashCode = hashCode * 59 + this.ImportoScadenzaValuta.GetHashCode();
                if (this.ImportoIvaEuro != null)
                    hashCode = hashCode * 59 + this.ImportoIvaEuro.GetHashCode();
                if (this.ImportoIvaValuta != null)
                    hashCode = hashCode * 59 + this.ImportoIvaValuta.GetHashCode();
                if (this.ImportoRitenutaEuro != null)
                    hashCode = hashCode * 59 + this.ImportoRitenutaEuro.GetHashCode();
                if (this.ImportoRitenutaValuta != null)
                    hashCode = hashCode * 59 + this.ImportoRitenutaValuta.GetHashCode();
                if (this.DataDecorrenza != null)
                    hashCode = hashCode * 59 + this.DataDecorrenza.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;
        }
    }
}
