/* 
 * 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>
    /// Parametri per l&#x27;importazione dei cambi medi annuali
    /// </summary>
    [DataContract]
        public partial class ImportAnnualAverageRatesInputDTO :  IEquatable<ImportAnnualAverageRatesInputDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ImportAnnualAverageRatesInputDTO" /> class.
        /// </summary>
        /// <param name="baseCurrencyIsoCode">baseCurrencyIsoCode.</param>
        /// <param name="referenceYear">referenceYear.</param>
        /// <param name="overwrite">overwrite.</param>
        public ImportAnnualAverageRatesInputDTO(List<string> baseCurrencyIsoCode = default(List<string>), int? referenceYear = default(int?), bool? overwrite = default(bool?))
        {
            this.BaseCurrencyIsoCode = baseCurrencyIsoCode;
            this.ReferenceYear = referenceYear;
            this.Overwrite = overwrite;
        }
        
        /// <summary>
        /// Gets or Sets BaseCurrencyIsoCode
        /// </summary>
        [DataMember(Name="baseCurrencyIsoCode", EmitDefaultValue=false)]
        public List<string> BaseCurrencyIsoCode { get; set; }

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

        /// <summary>
        /// Gets or Sets Overwrite
        /// </summary>
        [DataMember(Name="overwrite", EmitDefaultValue=false)]
        public bool? Overwrite { 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 ImportAnnualAverageRatesInputDTO {\n");
            sb.Append("  BaseCurrencyIsoCode: ").Append(BaseCurrencyIsoCode).Append("\n");
            sb.Append("  ReferenceYear: ").Append(ReferenceYear).Append("\n");
            sb.Append("  Overwrite: ").Append(Overwrite).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 ImportAnnualAverageRatesInputDTO);
        }

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

            return 
                (
                    this.BaseCurrencyIsoCode == input.BaseCurrencyIsoCode ||
                    this.BaseCurrencyIsoCode != null &&
                    input.BaseCurrencyIsoCode != null &&
                    this.BaseCurrencyIsoCode.SequenceEqual(input.BaseCurrencyIsoCode)
                ) && 
                (
                    this.ReferenceYear == input.ReferenceYear ||
                    (this.ReferenceYear != null &&
                    this.ReferenceYear.Equals(input.ReferenceYear))
                ) && 
                (
                    this.Overwrite == input.Overwrite ||
                    (this.Overwrite != null &&
                    this.Overwrite.Equals(input.Overwrite))
                );
        }

        /// <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.BaseCurrencyIsoCode != null)
                    hashCode = hashCode * 59 + this.BaseCurrencyIsoCode.GetHashCode();
                if (this.ReferenceYear != null)
                    hashCode = hashCode * 59 + this.ReferenceYear.GetHashCode();
                if (this.Overwrite != null)
                    hashCode = hashCode * 59 + this.Overwrite.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;
        }
    }
}
