/* 
 * 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>
    /// MG2E_STORICORID - Dati precedenti&lt;br&gt;Proprietà chiave:&lt;ul&gt;&lt;li&gt;&lt;b&gt;Datavar&lt;/b&gt;&lt;/li&gt;&lt;li&gt;&lt;b&gt;Id&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;
    /// </summary>
    [DataContract]
        public partial class CSHistorySddCODTO :  IEquatable<CSHistorySddCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CSHistorySddCODTO" /> class.
        /// </summary>
        /// <param name="codBicswift">MG2E_CODBICSWIFT - BICSWIFT.</param>
        /// <param name="codClideb">MG2E_CODCLIDEB - Codice debitore.</param>
        /// <param name="codIndiv">MG2E_CODINDIV - Codice individuale&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Nessuno&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Utenza&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Matricola&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Codice fiscale&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Codice cliente&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Codice fornitore&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Portafoglio commerciale&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Altro&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="datavar">MG2E_DATAVAR - Data (required).</param>
        /// <param name="id">MG2E_ID - Id (required).</param>
        /// <param name="indStorno">MG2E_INDSTORNO - Facoltà di storno&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Nessuno&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Facoltà di storno dopo la scadenza (D+5)&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Facoltà di storno alla scadenza&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Nessuna facoltà di storno per contestazione&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Nessuna facoltà di storno per la banca domiciliataria&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Esiste diritto al rimborso (D+8 settimane)&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Nessuna facoltà di storno per le caratteristiche del mandato&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="indTipoinc">MG2E_INDTIPOINC - Tipo seq. incasso&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - First&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Recurrent&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Final&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - One-Off&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="indTiposdd">MG2E_INDTIPOSDD - Tipo SDD&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Core&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - B2B&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="ridiban">MG2E_RIDIBAN - IBAN.</param>
        /// <param name="soggtitibanCg16">MG2E_SOGGTITIBAN_CG16 - Sogg. titolare IBAN.</param>
        /// <param name="tipologia">MG2E_TIPOLOGIA - Tipologia&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Consumatore&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Non Consumatore&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Microimpresa&lt;/li&gt;&lt;/ul&gt;.</param>
        /// <param name="additionalData">additionalData.</param>
        /// <param name="pluginData">pluginData.</param>
        public CSHistorySddCODTO(string codBicswift = default(string), string codClideb = default(string), double? codIndiv = default(double?), DateTime? datavar = default(DateTime?), int? id = default(int?), double? indStorno = default(double?), int? indTipoinc = default(int?), double? indTiposdd = default(double?), string ridiban = default(string), int? soggtitibanCg16 = default(int?), double? tipologia = default(double?), Dictionary<string, Object> additionalData = default(Dictionary<string, Object>), Dictionary<string, Object> pluginData = default(Dictionary<string, Object>))
        {
            // to ensure "datavar" is required (not null)
            if (datavar == null)
            {
                throw new InvalidDataException("datavar is a required property for CSHistorySddCODTO and cannot be null");
            }
            else
            {
                this.Datavar = datavar;
            }
            // to ensure "id" is required (not null)
            if (id == null)
            {
                throw new InvalidDataException("id is a required property for CSHistorySddCODTO and cannot be null");
            }
            else
            {
                this.Id = id;
            }
            this.CodBicswift = codBicswift;
            this.CodClideb = codClideb;
            this.CodIndiv = codIndiv;
            this.IndStorno = indStorno;
            this.IndTipoinc = indTipoinc;
            this.IndTiposdd = indTiposdd;
            this.Ridiban = ridiban;
            this.SoggtitibanCg16 = soggtitibanCg16;
            this.Tipologia = tipologia;
            this.AdditionalData = additionalData;
            this.PluginData = pluginData;
        }
        
        /// <summary>
        /// MG2E_CODBICSWIFT - BICSWIFT
        /// </summary>
        /// <value>MG2E_CODBICSWIFT - BICSWIFT</value>
        [DataMember(Name="codBicswift", EmitDefaultValue=false)]
        public string CodBicswift { get; set; }

        /// <summary>
        /// MG2E_CODCLIDEB - Codice debitore
        /// </summary>
        /// <value>MG2E_CODCLIDEB - Codice debitore</value>
        [DataMember(Name="codClideb", EmitDefaultValue=false)]
        public string CodClideb { get; set; }

        /// <summary>
        /// MG2E_CODINDIV - Codice individuale&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Nessuno&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Utenza&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Matricola&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Codice fiscale&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Codice cliente&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Codice fornitore&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Portafoglio commerciale&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Altro&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>MG2E_CODINDIV - Codice individuale&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Nessuno&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Utenza&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Matricola&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Codice fiscale&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Codice cliente&lt;/li&gt;&lt;li&gt;&lt;i&gt;5&lt;/i&gt; - Codice fornitore&lt;/li&gt;&lt;li&gt;&lt;i&gt;6&lt;/i&gt; - Portafoglio commerciale&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Altro&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="codIndiv", EmitDefaultValue=false)]
        public double? CodIndiv { get; set; }

        /// <summary>
        /// MG2E_DATAVAR - Data
        /// </summary>
        /// <value>MG2E_DATAVAR - Data</value>
        [DataMember(Name="datavar", EmitDefaultValue=false)]
        public DateTime? Datavar { get; set; }

        /// <summary>
        /// MG2E_ID - Id
        /// </summary>
        /// <value>MG2E_ID - Id</value>
        [DataMember(Name="id", EmitDefaultValue=false)]
        public int? Id { get; set; }

        /// <summary>
        /// MG2E_INDSTORNO - Facoltà di storno&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Nessuno&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Facoltà di storno dopo la scadenza (D+5)&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Facoltà di storno alla scadenza&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Nessuna facoltà di storno per contestazione&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Nessuna facoltà di storno per la banca domiciliataria&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Esiste diritto al rimborso (D+8 settimane)&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Nessuna facoltà di storno per le caratteristiche del mandato&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>MG2E_INDSTORNO - Facoltà di storno&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Nessuno&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Facoltà di storno dopo la scadenza (D+5)&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Facoltà di storno alla scadenza&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Nessuna facoltà di storno per contestazione&lt;/li&gt;&lt;li&gt;&lt;i&gt;4&lt;/i&gt; - Nessuna facoltà di storno per la banca domiciliataria&lt;/li&gt;&lt;li&gt;&lt;i&gt;8&lt;/i&gt; - Esiste diritto al rimborso (D+8 settimane)&lt;/li&gt;&lt;li&gt;&lt;i&gt;9&lt;/i&gt; - Nessuna facoltà di storno per le caratteristiche del mandato&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indStorno", EmitDefaultValue=false)]
        public double? IndStorno { get; set; }

        /// <summary>
        /// MG2E_INDTIPOINC - Tipo seq. incasso&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - First&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Recurrent&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Final&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - One-Off&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>MG2E_INDTIPOINC - Tipo seq. incasso&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - First&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Recurrent&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Final&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - One-Off&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indTipoinc", EmitDefaultValue=false)]
        public int? IndTipoinc { get; set; }

        /// <summary>
        /// MG2E_INDTIPOSDD - Tipo SDD&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Core&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - B2B&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>MG2E_INDTIPOSDD - Tipo SDD&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Core&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - B2B&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="indTiposdd", EmitDefaultValue=false)]
        public double? IndTiposdd { get; set; }

        /// <summary>
        /// MG2E_RIDIBAN - IBAN
        /// </summary>
        /// <value>MG2E_RIDIBAN - IBAN</value>
        [DataMember(Name="ridiban", EmitDefaultValue=false)]
        public string Ridiban { get; set; }

        /// <summary>
        /// MG2E_SOGGTITIBAN_CG16 - Sogg. titolare IBAN
        /// </summary>
        /// <value>MG2E_SOGGTITIBAN_CG16 - Sogg. titolare IBAN</value>
        [DataMember(Name="soggtitibanCg16", EmitDefaultValue=false)]
        public int? SoggtitibanCg16 { get; set; }

        /// <summary>
        /// MG2E_TIPOLOGIA - Tipologia&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Consumatore&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Non Consumatore&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Microimpresa&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>MG2E_TIPOLOGIA - Tipologia&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Consumatore&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Non Consumatore&lt;/li&gt;&lt;li&gt;&lt;i&gt;3&lt;/i&gt; - Microimpresa&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="tipologia", EmitDefaultValue=false)]
        public double? Tipologia { 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 CSHistorySddCODTO {\n");
            sb.Append("  CodBicswift: ").Append(CodBicswift).Append("\n");
            sb.Append("  CodClideb: ").Append(CodClideb).Append("\n");
            sb.Append("  CodIndiv: ").Append(CodIndiv).Append("\n");
            sb.Append("  Datavar: ").Append(Datavar).Append("\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  IndStorno: ").Append(IndStorno).Append("\n");
            sb.Append("  IndTipoinc: ").Append(IndTipoinc).Append("\n");
            sb.Append("  IndTiposdd: ").Append(IndTiposdd).Append("\n");
            sb.Append("  Ridiban: ").Append(Ridiban).Append("\n");
            sb.Append("  SoggtitibanCg16: ").Append(SoggtitibanCg16).Append("\n");
            sb.Append("  Tipologia: ").Append(Tipologia).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 CSHistorySddCODTO);
        }

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

            return 
                (
                    this.CodBicswift == input.CodBicswift ||
                    (this.CodBicswift != null &&
                    this.CodBicswift.Equals(input.CodBicswift))
                ) && 
                (
                    this.CodClideb == input.CodClideb ||
                    (this.CodClideb != null &&
                    this.CodClideb.Equals(input.CodClideb))
                ) && 
                (
                    this.CodIndiv == input.CodIndiv ||
                    (this.CodIndiv != null &&
                    this.CodIndiv.Equals(input.CodIndiv))
                ) && 
                (
                    this.Datavar == input.Datavar ||
                    (this.Datavar != null &&
                    this.Datavar.Equals(input.Datavar))
                ) && 
                (
                    this.Id == input.Id ||
                    (this.Id != null &&
                    this.Id.Equals(input.Id))
                ) && 
                (
                    this.IndStorno == input.IndStorno ||
                    (this.IndStorno != null &&
                    this.IndStorno.Equals(input.IndStorno))
                ) && 
                (
                    this.IndTipoinc == input.IndTipoinc ||
                    (this.IndTipoinc != null &&
                    this.IndTipoinc.Equals(input.IndTipoinc))
                ) && 
                (
                    this.IndTiposdd == input.IndTiposdd ||
                    (this.IndTiposdd != null &&
                    this.IndTiposdd.Equals(input.IndTiposdd))
                ) && 
                (
                    this.Ridiban == input.Ridiban ||
                    (this.Ridiban != null &&
                    this.Ridiban.Equals(input.Ridiban))
                ) && 
                (
                    this.SoggtitibanCg16 == input.SoggtitibanCg16 ||
                    (this.SoggtitibanCg16 != null &&
                    this.SoggtitibanCg16.Equals(input.SoggtitibanCg16))
                ) && 
                (
                    this.Tipologia == input.Tipologia ||
                    (this.Tipologia != null &&
                    this.Tipologia.Equals(input.Tipologia))
                ) && 
                (
                    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.CodBicswift != null)
                    hashCode = hashCode * 59 + this.CodBicswift.GetHashCode();
                if (this.CodClideb != null)
                    hashCode = hashCode * 59 + this.CodClideb.GetHashCode();
                if (this.CodIndiv != null)
                    hashCode = hashCode * 59 + this.CodIndiv.GetHashCode();
                if (this.Datavar != null)
                    hashCode = hashCode * 59 + this.Datavar.GetHashCode();
                if (this.Id != null)
                    hashCode = hashCode * 59 + this.Id.GetHashCode();
                if (this.IndStorno != null)
                    hashCode = hashCode * 59 + this.IndStorno.GetHashCode();
                if (this.IndTipoinc != null)
                    hashCode = hashCode * 59 + this.IndTipoinc.GetHashCode();
                if (this.IndTiposdd != null)
                    hashCode = hashCode * 59 + this.IndTiposdd.GetHashCode();
                if (this.Ridiban != null)
                    hashCode = hashCode * 59 + this.Ridiban.GetHashCode();
                if (this.SoggtitibanCg16 != null)
                    hashCode = hashCode * 59 + this.SoggtitibanCg16.GetHashCode();
                if (this.Tipologia != null)
                    hashCode = hashCode * 59 + this.Tipologia.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;
        }
    }
}
