/* 
 * 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>
    /// Calcola il cambio valute in base ai parametri forniti
    /// </summary>
    [DataContract]
        public partial class CalculateExchangeRateParametersDTO :  IEquatable<CalculateExchangeRateParametersDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CalculateExchangeRateParametersDTO" /> class.
        /// </summary>
        /// <param name="valutaRiferimento">valutaRiferimento.</param>
        /// <param name="valuta">valuta.</param>
        /// <param name="data">data.</param>
        /// <param name="tipoCambioRichiesto">tipoCambioRichiesto.</param>
        public CalculateExchangeRateParametersDTO(string valutaRiferimento = default(string), string valuta = default(string), DateTime? data = default(DateTime?), int? tipoCambioRichiesto = default(int?))
        {
            this.ValutaRiferimento = valutaRiferimento;
            this.Valuta = valuta;
            this.Data = data;
            this.TipoCambioRichiesto = tipoCambioRichiesto;
        }
        
        /// <summary>
        /// Gets or Sets ValutaRiferimento
        /// </summary>
        [DataMember(Name="valutaRiferimento", EmitDefaultValue=false)]
        public string ValutaRiferimento { get; set; }

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

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

        /// <summary>
        /// Gets or Sets TipoCambioRichiesto
        /// </summary>
        [DataMember(Name="tipoCambioRichiesto", EmitDefaultValue=false)]
        public int? TipoCambioRichiesto { 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 CalculateExchangeRateParametersDTO {\n");
            sb.Append("  ValutaRiferimento: ").Append(ValutaRiferimento).Append("\n");
            sb.Append("  Valuta: ").Append(Valuta).Append("\n");
            sb.Append("  Data: ").Append(Data).Append("\n");
            sb.Append("  TipoCambioRichiesto: ").Append(TipoCambioRichiesto).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 CalculateExchangeRateParametersDTO);
        }

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

            return 
                (
                    this.ValutaRiferimento == input.ValutaRiferimento ||
                    (this.ValutaRiferimento != null &&
                    this.ValutaRiferimento.Equals(input.ValutaRiferimento))
                ) && 
                (
                    this.Valuta == input.Valuta ||
                    (this.Valuta != null &&
                    this.Valuta.Equals(input.Valuta))
                ) && 
                (
                    this.Data == input.Data ||
                    (this.Data != null &&
                    this.Data.Equals(input.Data))
                ) && 
                (
                    this.TipoCambioRichiesto == input.TipoCambioRichiesto ||
                    (this.TipoCambioRichiesto != null &&
                    this.TipoCambioRichiesto.Equals(input.TipoCambioRichiesto))
                );
        }

        /// <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.ValutaRiferimento != null)
                    hashCode = hashCode * 59 + this.ValutaRiferimento.GetHashCode();
                if (this.Valuta != null)
                    hashCode = hashCode * 59 + this.Valuta.GetHashCode();
                if (this.Data != null)
                    hashCode = hashCode * 59 + this.Data.GetHashCode();
                if (this.TipoCambioRichiesto != null)
                    hashCode = hashCode * 59 + this.TipoCambioRichiesto.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;
        }
    }
}
