/* 
 * 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>
    /// SendingLettersToInsertRowCODTO
    /// </summary>
    [DataContract]
        public partial class SendingLettersToInsertRowCODTO :  IEquatable<SendingLettersToInsertRowCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="SendingLettersToInsertRowCODTO" /> class.
        /// </summary>
        /// <param name="idCliFor">idCliFor.</param>
        /// <param name="annoCompetenza">annoCompetenza.</param>
        /// <param name="validaDa">validaDa.</param>
        /// <param name="validaA">validaA.</param>
        /// <param name="dataStampa">dataStampa.</param>
        /// <param name="indTipoDich">indTipoDich.</param>
        /// <param name="ammontare">ammontare.</param>
        /// <param name="dogana">dogana.</param>
        /// <param name="ivaEsenz">ivaEsenz.</param>
        /// <param name="note">note.</param>
        /// <param name="codRap">codRap.</param>
        /// <param name="codCarica">codCarica.</param>
        public SendingLettersToInsertRowCODTO(int? idCliFor = default(int?), int? annoCompetenza = default(int?), DateTime? validaDa = default(DateTime?), DateTime? validaA = default(DateTime?), DateTime? dataStampa = default(DateTime?), double? indTipoDich = default(double?), double? ammontare = default(double?), string dogana = default(string), string ivaEsenz = default(string), string note = default(string), int? codRap = default(int?), int? codCarica = default(int?))
        {
            this.IdCliFor = idCliFor;
            this.AnnoCompetenza = annoCompetenza;
            this.ValidaDa = validaDa;
            this.ValidaA = validaA;
            this.DataStampa = dataStampa;
            this.IndTipoDich = indTipoDich;
            this.Ammontare = ammontare;
            this.Dogana = dogana;
            this.IvaEsenz = ivaEsenz;
            this.Note = note;
            this.CodRap = codRap;
            this.CodCarica = codCarica;
        }
        
        /// <summary>
        /// Gets or Sets IdCliFor
        /// </summary>
        [DataMember(Name="idCliFor", EmitDefaultValue=false)]
        public int? IdCliFor { get; set; }

        /// <summary>
        /// Gets or Sets AnnoCompetenza
        /// </summary>
        [DataMember(Name="annoCompetenza", EmitDefaultValue=false)]
        public int? AnnoCompetenza { get; set; }

        /// <summary>
        /// Gets or Sets ValidaDa
        /// </summary>
        [DataMember(Name="validaDa", EmitDefaultValue=false)]
        public DateTime? ValidaDa { get; set; }

        /// <summary>
        /// Gets or Sets ValidaA
        /// </summary>
        [DataMember(Name="validaA", EmitDefaultValue=false)]
        public DateTime? ValidaA { get; set; }

        /// <summary>
        /// Gets or Sets DataStampa
        /// </summary>
        [DataMember(Name="dataStampa", EmitDefaultValue=false)]
        public DateTime? DataStampa { get; set; }

        /// <summary>
        /// Gets or Sets IndTipoDich
        /// </summary>
        [DataMember(Name="indTipoDich", EmitDefaultValue=false)]
        public double? IndTipoDich { get; set; }

        /// <summary>
        /// Gets or Sets Ammontare
        /// </summary>
        [DataMember(Name="ammontare", EmitDefaultValue=false)]
        public double? Ammontare { get; set; }

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

        /// <summary>
        /// Gets or Sets IvaEsenz
        /// </summary>
        [DataMember(Name="ivaEsenz", EmitDefaultValue=false)]
        public string IvaEsenz { get; set; }

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

        /// <summary>
        /// Gets or Sets CodRap
        /// </summary>
        [DataMember(Name="codRap", EmitDefaultValue=false)]
        public int? CodRap { get; set; }

        /// <summary>
        /// Gets or Sets CodCarica
        /// </summary>
        [DataMember(Name="codCarica", EmitDefaultValue=false)]
        public int? CodCarica { 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 SendingLettersToInsertRowCODTO {\n");
            sb.Append("  IdCliFor: ").Append(IdCliFor).Append("\n");
            sb.Append("  AnnoCompetenza: ").Append(AnnoCompetenza).Append("\n");
            sb.Append("  ValidaDa: ").Append(ValidaDa).Append("\n");
            sb.Append("  ValidaA: ").Append(ValidaA).Append("\n");
            sb.Append("  DataStampa: ").Append(DataStampa).Append("\n");
            sb.Append("  IndTipoDich: ").Append(IndTipoDich).Append("\n");
            sb.Append("  Ammontare: ").Append(Ammontare).Append("\n");
            sb.Append("  Dogana: ").Append(Dogana).Append("\n");
            sb.Append("  IvaEsenz: ").Append(IvaEsenz).Append("\n");
            sb.Append("  Note: ").Append(Note).Append("\n");
            sb.Append("  CodRap: ").Append(CodRap).Append("\n");
            sb.Append("  CodCarica: ").Append(CodCarica).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 SendingLettersToInsertRowCODTO);
        }

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

            return 
                (
                    this.IdCliFor == input.IdCliFor ||
                    (this.IdCliFor != null &&
                    this.IdCliFor.Equals(input.IdCliFor))
                ) && 
                (
                    this.AnnoCompetenza == input.AnnoCompetenza ||
                    (this.AnnoCompetenza != null &&
                    this.AnnoCompetenza.Equals(input.AnnoCompetenza))
                ) && 
                (
                    this.ValidaDa == input.ValidaDa ||
                    (this.ValidaDa != null &&
                    this.ValidaDa.Equals(input.ValidaDa))
                ) && 
                (
                    this.ValidaA == input.ValidaA ||
                    (this.ValidaA != null &&
                    this.ValidaA.Equals(input.ValidaA))
                ) && 
                (
                    this.DataStampa == input.DataStampa ||
                    (this.DataStampa != null &&
                    this.DataStampa.Equals(input.DataStampa))
                ) && 
                (
                    this.IndTipoDich == input.IndTipoDich ||
                    (this.IndTipoDich != null &&
                    this.IndTipoDich.Equals(input.IndTipoDich))
                ) && 
                (
                    this.Ammontare == input.Ammontare ||
                    (this.Ammontare != null &&
                    this.Ammontare.Equals(input.Ammontare))
                ) && 
                (
                    this.Dogana == input.Dogana ||
                    (this.Dogana != null &&
                    this.Dogana.Equals(input.Dogana))
                ) && 
                (
                    this.IvaEsenz == input.IvaEsenz ||
                    (this.IvaEsenz != null &&
                    this.IvaEsenz.Equals(input.IvaEsenz))
                ) && 
                (
                    this.Note == input.Note ||
                    (this.Note != null &&
                    this.Note.Equals(input.Note))
                ) && 
                (
                    this.CodRap == input.CodRap ||
                    (this.CodRap != null &&
                    this.CodRap.Equals(input.CodRap))
                ) && 
                (
                    this.CodCarica == input.CodCarica ||
                    (this.CodCarica != null &&
                    this.CodCarica.Equals(input.CodCarica))
                );
        }

        /// <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.IdCliFor != null)
                    hashCode = hashCode * 59 + this.IdCliFor.GetHashCode();
                if (this.AnnoCompetenza != null)
                    hashCode = hashCode * 59 + this.AnnoCompetenza.GetHashCode();
                if (this.ValidaDa != null)
                    hashCode = hashCode * 59 + this.ValidaDa.GetHashCode();
                if (this.ValidaA != null)
                    hashCode = hashCode * 59 + this.ValidaA.GetHashCode();
                if (this.DataStampa != null)
                    hashCode = hashCode * 59 + this.DataStampa.GetHashCode();
                if (this.IndTipoDich != null)
                    hashCode = hashCode * 59 + this.IndTipoDich.GetHashCode();
                if (this.Ammontare != null)
                    hashCode = hashCode * 59 + this.Ammontare.GetHashCode();
                if (this.Dogana != null)
                    hashCode = hashCode * 59 + this.Dogana.GetHashCode();
                if (this.IvaEsenz != null)
                    hashCode = hashCode * 59 + this.IvaEsenz.GetHashCode();
                if (this.Note != null)
                    hashCode = hashCode * 59 + this.Note.GetHashCode();
                if (this.CodRap != null)
                    hashCode = hashCode * 59 + this.CodRap.GetHashCode();
                if (this.CodCarica != null)
                    hashCode = hashCode * 59 + this.CodCarica.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;
        }
    }
}
