/* 
 * 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 mensili
    /// </summary>
    [DataContract]
        public partial class ImportMonthlyAverageRatesInputDTO :  IEquatable<ImportMonthlyAverageRatesInputDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ImportMonthlyAverageRatesInputDTO" /> class.
        /// </summary>
        /// <param name="baseCurrencyIsoCode">baseCurrencyIsoCode.</param>
        /// <param name="referenceYear">referenceYear.</param>
        /// <param name="referenceMonth">referenceMonth.</param>
        /// <param name="overwrite">overwrite.</param>
        public ImportMonthlyAverageRatesInputDTO(List<string> baseCurrencyIsoCode = default(List<string>), int? referenceYear = default(int?), int? referenceMonth = default(int?), bool? overwrite = default(bool?))
        {
            this.BaseCurrencyIsoCode = baseCurrencyIsoCode;
            this.ReferenceYear = referenceYear;
            this.ReferenceMonth = referenceMonth;
            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 ReferenceMonth
        /// </summary>
        [DataMember(Name="referenceMonth", EmitDefaultValue=false)]
        public int? ReferenceMonth { 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 ImportMonthlyAverageRatesInputDTO {\n");
            sb.Append("  BaseCurrencyIsoCode: ").Append(BaseCurrencyIsoCode).Append("\n");
            sb.Append("  ReferenceYear: ").Append(ReferenceYear).Append("\n");
            sb.Append("  ReferenceMonth: ").Append(ReferenceMonth).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 ImportMonthlyAverageRatesInputDTO);
        }

        /// <summary>
        /// Returns true if ImportMonthlyAverageRatesInputDTO instances are equal
        /// </summary>
        /// <param name="input">Instance of ImportMonthlyAverageRatesInputDTO to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(ImportMonthlyAverageRatesInputDTO 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.ReferenceMonth == input.ReferenceMonth ||
                    (this.ReferenceMonth != null &&
                    this.ReferenceMonth.Equals(input.ReferenceMonth))
                ) && 
                (
                    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.ReferenceMonth != null)
                    hashCode = hashCode * 59 + this.ReferenceMonth.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;
        }
    }
}
