/* 
 * 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>
    /// ImportCustomerSupplierCOAddParameterDTO
    /// </summary>
    [DataContract]
        public partial class ImportCustomerSupplierCOAddParameterDTO :  IEquatable<ImportCustomerSupplierCOAddParameterDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ImportCustomerSupplierCOAddParameterDTO" /> class.
        /// </summary>
        /// <param name="typeImportModeCustomerSupplier">Type import mode Customer/Supplier&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Search by general master data&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Search by code and verify general master data&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Search by code (with overwriting of non-corresponding data)&lt;/li&gt;&lt;/ul&gt; (default to &quot;0&quot;).</param>
        /// <param name="insertCustomerSupplier">Inserting a new Customer/Supplier (default to true).</param>
        /// <param name="updateExistingCustomerSupplier">Update existing Customer/Supplier (default to false).</param>
        public ImportCustomerSupplierCOAddParameterDTO(string typeImportModeCustomerSupplier = "0", bool? insertCustomerSupplier = true, bool? updateExistingCustomerSupplier = false)
        {
            // use default value if no "typeImportModeCustomerSupplier" provided
            if (typeImportModeCustomerSupplier == null)
            {
                this.TypeImportModeCustomerSupplier = "0";
            }
            else
            {
                this.TypeImportModeCustomerSupplier = typeImportModeCustomerSupplier;
            }
            // use default value if no "insertCustomerSupplier" provided
            if (insertCustomerSupplier == null)
            {
                this.InsertCustomerSupplier = true;
            }
            else
            {
                this.InsertCustomerSupplier = insertCustomerSupplier;
            }
            // use default value if no "updateExistingCustomerSupplier" provided
            if (updateExistingCustomerSupplier == null)
            {
                this.UpdateExistingCustomerSupplier = false;
            }
            else
            {
                this.UpdateExistingCustomerSupplier = updateExistingCustomerSupplier;
            }
        }
        
        /// <summary>
        /// Type import mode Customer/Supplier&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Search by general master data&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Search by code and verify general master data&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Search by code (with overwriting of non-corresponding data)&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>Type import mode Customer/Supplier&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - Search by general master data&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - Search by code and verify general master data&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - Search by code (with overwriting of non-corresponding data)&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="typeImportModeCustomerSupplier", EmitDefaultValue=false)]
        public string TypeImportModeCustomerSupplier { get; set; }

        /// <summary>
        /// Inserting a new Customer/Supplier
        /// </summary>
        /// <value>Inserting a new Customer/Supplier</value>
        [DataMember(Name="insertCustomerSupplier", EmitDefaultValue=false)]
        public bool? InsertCustomerSupplier { get; set; }

        /// <summary>
        /// Update existing Customer/Supplier
        /// </summary>
        /// <value>Update existing Customer/Supplier</value>
        [DataMember(Name="updateExistingCustomerSupplier", EmitDefaultValue=false)]
        public bool? UpdateExistingCustomerSupplier { 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 ImportCustomerSupplierCOAddParameterDTO {\n");
            sb.Append("  TypeImportModeCustomerSupplier: ").Append(TypeImportModeCustomerSupplier).Append("\n");
            sb.Append("  InsertCustomerSupplier: ").Append(InsertCustomerSupplier).Append("\n");
            sb.Append("  UpdateExistingCustomerSupplier: ").Append(UpdateExistingCustomerSupplier).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 ImportCustomerSupplierCOAddParameterDTO);
        }

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

            return 
                (
                    this.TypeImportModeCustomerSupplier == input.TypeImportModeCustomerSupplier ||
                    (this.TypeImportModeCustomerSupplier != null &&
                    this.TypeImportModeCustomerSupplier.Equals(input.TypeImportModeCustomerSupplier))
                ) && 
                (
                    this.InsertCustomerSupplier == input.InsertCustomerSupplier ||
                    (this.InsertCustomerSupplier != null &&
                    this.InsertCustomerSupplier.Equals(input.InsertCustomerSupplier))
                ) && 
                (
                    this.UpdateExistingCustomerSupplier == input.UpdateExistingCustomerSupplier ||
                    (this.UpdateExistingCustomerSupplier != null &&
                    this.UpdateExistingCustomerSupplier.Equals(input.UpdateExistingCustomerSupplier))
                );
        }

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