/* 
 * 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>
    /// ExportCustomerSupplierCOParameterDTO
    /// </summary>
    [DataContract]
        public partial class ExportCustomerSupplierCOParameterDTO :  IEquatable<ExportCustomerSupplierCOParameterDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ExportCustomerSupplierCOParameterDTO" /> class.
        /// </summary>
        /// <param name="addParameters">addParameters.</param>
        /// <param name="isAsyncMode">Asynchronous processing (default to false).</param>
        /// <param name="codLayout">Code Layout (required).</param>
        /// <param name="searchFilter">searchFilter.</param>
        public ExportCustomerSupplierCOParameterDTO(ExportCustomerSupplierCOAddParameterDTO addParameters = default(ExportCustomerSupplierCOAddParameterDTO), bool? isAsyncMode = false, string codLayout = default(string), SearchDTO searchFilter = default(SearchDTO))
        {
            // to ensure "codLayout" is required (not null)
            if (codLayout == null)
            {
                throw new InvalidDataException("codLayout is a required property for ExportCustomerSupplierCOParameterDTO and cannot be null");
            }
            else
            {
                this.CodLayout = codLayout;
            }
            this.AddParameters = addParameters;
            // use default value if no "isAsyncMode" provided
            if (isAsyncMode == null)
            {
                this.IsAsyncMode = false;
            }
            else
            {
                this.IsAsyncMode = isAsyncMode;
            }
            this.SearchFilter = searchFilter;
        }
        
        /// <summary>
        /// Gets or Sets AddParameters
        /// </summary>
        [DataMember(Name="addParameters", EmitDefaultValue=false)]
        public ExportCustomerSupplierCOAddParameterDTO AddParameters { get; set; }

        /// <summary>
        /// Asynchronous processing
        /// </summary>
        /// <value>Asynchronous processing</value>
        [DataMember(Name="isAsyncMode", EmitDefaultValue=false)]
        public bool? IsAsyncMode { get; set; }

        /// <summary>
        /// Code Layout
        /// </summary>
        /// <value>Code Layout</value>
        [DataMember(Name="codLayout", EmitDefaultValue=false)]
        public string CodLayout { get; set; }

        /// <summary>
        /// Gets or Sets SearchFilter
        /// </summary>
        [DataMember(Name="searchFilter", EmitDefaultValue=false)]
        public SearchDTO SearchFilter { 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 ExportCustomerSupplierCOParameterDTO {\n");
            sb.Append("  AddParameters: ").Append(AddParameters).Append("\n");
            sb.Append("  IsAsyncMode: ").Append(IsAsyncMode).Append("\n");
            sb.Append("  CodLayout: ").Append(CodLayout).Append("\n");
            sb.Append("  SearchFilter: ").Append(SearchFilter).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 ExportCustomerSupplierCOParameterDTO);
        }

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

            return 
                (
                    this.AddParameters == input.AddParameters ||
                    (this.AddParameters != null &&
                    this.AddParameters.Equals(input.AddParameters))
                ) && 
                (
                    this.IsAsyncMode == input.IsAsyncMode ||
                    (this.IsAsyncMode != null &&
                    this.IsAsyncMode.Equals(input.IsAsyncMode))
                ) && 
                (
                    this.CodLayout == input.CodLayout ||
                    (this.CodLayout != null &&
                    this.CodLayout.Equals(input.CodLayout))
                ) && 
                (
                    this.SearchFilter == input.SearchFilter ||
                    (this.SearchFilter != null &&
                    this.SearchFilter.Equals(input.SearchFilter))
                );
        }

        /// <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.AddParameters != null)
                    hashCode = hashCode * 59 + this.AddParameters.GetHashCode();
                if (this.IsAsyncMode != null)
                    hashCode = hashCode * 59 + this.IsAsyncMode.GetHashCode();
                if (this.CodLayout != null)
                    hashCode = hashCode * 59 + this.CodLayout.GetHashCode();
                if (this.SearchFilter != null)
                    hashCode = hashCode * 59 + this.SearchFilter.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;
        }
    }
}
