/* 
 * 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>
    /// ImportExportHeadResultDTO
    /// </summary>
    [DataContract]
        public partial class ImportExportHeadResultDTO :  IEquatable<ImportExportHeadResultDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ImportExportHeadResultDTO" /> class.
        /// </summary>
        /// <param name="guidResult">Guid Result.</param>
        /// <param name="totRowImpExp">total rows processed.</param>
        /// <param name="impExpWithErrors">Import/Export with Error.</param>
        /// <param name="rowElab">Information/Error rows.</param>
        public ImportExportHeadResultDTO(string guidResult = default(string), int? totRowImpExp = default(int?), bool? impExpWithErrors = default(bool?), List<ImportExportRowResultDTO> rowElab = default(List<ImportExportRowResultDTO>))
        {
            this.GuidResult = guidResult;
            this.TotRowImpExp = totRowImpExp;
            this.ImpExpWithErrors = impExpWithErrors;
            this.RowElab = rowElab;
        }
        
        /// <summary>
        /// Guid Result
        /// </summary>
        /// <value>Guid Result</value>
        [DataMember(Name="guidResult", EmitDefaultValue=false)]
        public string GuidResult { get; set; }

        /// <summary>
        /// total rows processed
        /// </summary>
        /// <value>total rows processed</value>
        [DataMember(Name="totRowImpExp", EmitDefaultValue=false)]
        public int? TotRowImpExp { get; set; }

        /// <summary>
        /// Import/Export with Error
        /// </summary>
        /// <value>Import/Export with Error</value>
        [DataMember(Name="impExpWithErrors", EmitDefaultValue=false)]
        public bool? ImpExpWithErrors { get; set; }

        /// <summary>
        /// Information/Error rows
        /// </summary>
        /// <value>Information/Error rows</value>
        [DataMember(Name="rowElab", EmitDefaultValue=false)]
        public List<ImportExportRowResultDTO> RowElab { 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 ImportExportHeadResultDTO {\n");
            sb.Append("  GuidResult: ").Append(GuidResult).Append("\n");
            sb.Append("  TotRowImpExp: ").Append(TotRowImpExp).Append("\n");
            sb.Append("  ImpExpWithErrors: ").Append(ImpExpWithErrors).Append("\n");
            sb.Append("  RowElab: ").Append(RowElab).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 ImportExportHeadResultDTO);
        }

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

            return 
                (
                    this.GuidResult == input.GuidResult ||
                    (this.GuidResult != null &&
                    this.GuidResult.Equals(input.GuidResult))
                ) && 
                (
                    this.TotRowImpExp == input.TotRowImpExp ||
                    (this.TotRowImpExp != null &&
                    this.TotRowImpExp.Equals(input.TotRowImpExp))
                ) && 
                (
                    this.ImpExpWithErrors == input.ImpExpWithErrors ||
                    (this.ImpExpWithErrors != null &&
                    this.ImpExpWithErrors.Equals(input.ImpExpWithErrors))
                ) && 
                (
                    this.RowElab == input.RowElab ||
                    this.RowElab != null &&
                    input.RowElab != null &&
                    this.RowElab.SequenceEqual(input.RowElab)
                );
        }

        /// <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.GuidResult != null)
                    hashCode = hashCode * 59 + this.GuidResult.GetHashCode();
                if (this.TotRowImpExp != null)
                    hashCode = hashCode * 59 + this.TotRowImpExp.GetHashCode();
                if (this.ImpExpWithErrors != null)
                    hashCode = hashCode * 59 + this.ImpExpWithErrors.GetHashCode();
                if (this.RowElab != null)
                    hashCode = hashCode * 59 + this.RowElab.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;
        }
    }
}
