/* 
 * 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>
    /// ImportCustomerSupplierCOParameterDTO
    /// </summary>
    [DataContract]
        public partial class ImportCustomerSupplierCOParameterDTO :  IEquatable<ImportCustomerSupplierCOParameterDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ImportCustomerSupplierCOParameterDTO" /> 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="streamFileImport">Stream File Import (required).</param>
        public ImportCustomerSupplierCOParameterDTO(ImportCustomerSupplierCOAddParameterDTO addParameters = default(ImportCustomerSupplierCOAddParameterDTO), bool? isAsyncMode = false, string codLayout = default(string), string streamFileImport = default(string))
        {
            // to ensure "codLayout" is required (not null)
            if (codLayout == null)
            {
                throw new InvalidDataException("codLayout is a required property for ImportCustomerSupplierCOParameterDTO and cannot be null");
            }
            else
            {
                this.CodLayout = codLayout;
            }
            // to ensure "streamFileImport" is required (not null)
            if (streamFileImport == null)
            {
                throw new InvalidDataException("streamFileImport is a required property for ImportCustomerSupplierCOParameterDTO and cannot be null");
            }
            else
            {
                this.StreamFileImport = streamFileImport;
            }
            this.AddParameters = addParameters;
            // use default value if no "isAsyncMode" provided
            if (isAsyncMode == null)
            {
                this.IsAsyncMode = false;
            }
            else
            {
                this.IsAsyncMode = isAsyncMode;
            }
        }
        
        /// <summary>
        /// Gets or Sets AddParameters
        /// </summary>
        [DataMember(Name="addParameters", EmitDefaultValue=false)]
        public ImportCustomerSupplierCOAddParameterDTO 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>
        /// Stream File Import
        /// </summary>
        /// <value>Stream File Import</value>
        [DataMember(Name="streamFileImport", EmitDefaultValue=false)]
        public string StreamFileImport { 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 ImportCustomerSupplierCOParameterDTO {\n");
            sb.Append("  AddParameters: ").Append(AddParameters).Append("\n");
            sb.Append("  IsAsyncMode: ").Append(IsAsyncMode).Append("\n");
            sb.Append("  CodLayout: ").Append(CodLayout).Append("\n");
            sb.Append("  StreamFileImport: ").Append(StreamFileImport).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 ImportCustomerSupplierCOParameterDTO);
        }

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

        /// <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.StreamFileImport != null)
                    hashCode = hashCode * 59 + this.StreamFileImport.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;
        }
    }
}
