/* 
 * 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>
    /// PaymentTermDuplicationParametersCODTO
    /// </summary>
    [DataContract]
        public partial class PaymentTermDuplicationParametersCODTO :  IEquatable<PaymentTermDuplicationParametersCODTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="PaymentTermDuplicationParametersCODTO" /> class.
        /// </summary>
        /// <param name="sourcePaymentTermId">sourcePaymentTermId.</param>
        /// <param name="targetPaymentTermCode">targetPaymentTermCode.</param>
        /// <param name="targetPaymentTermCodeDescription">targetPaymentTermCodeDescription.</param>
        /// <param name="isDuplLangDescriptions">isDuplLangDescriptions.</param>
        /// <param name="isDuplExtendedAttribute">isDuplExtendedAttribute.</param>
        public PaymentTermDuplicationParametersCODTO(long? sourcePaymentTermId = default(long?), string targetPaymentTermCode = default(string), string targetPaymentTermCodeDescription = default(string), bool? isDuplLangDescriptions = default(bool?), bool? isDuplExtendedAttribute = default(bool?))
        {
            this.SourcePaymentTermId = sourcePaymentTermId;
            this.TargetPaymentTermCode = targetPaymentTermCode;
            this.TargetPaymentTermCodeDescription = targetPaymentTermCodeDescription;
            this.IsDuplLangDescriptions = isDuplLangDescriptions;
            this.IsDuplExtendedAttribute = isDuplExtendedAttribute;
        }
        
        /// <summary>
        /// Gets or Sets SourcePaymentTermId
        /// </summary>
        [DataMember(Name="sourcePaymentTermId", EmitDefaultValue=false)]
        public long? SourcePaymentTermId { get; set; }

        /// <summary>
        /// Gets or Sets TargetPaymentTermCode
        /// </summary>
        [DataMember(Name="targetPaymentTermCode", EmitDefaultValue=false)]
        public string TargetPaymentTermCode { get; set; }

        /// <summary>
        /// Gets or Sets TargetPaymentTermCodeDescription
        /// </summary>
        [DataMember(Name="targetPaymentTermCodeDescription", EmitDefaultValue=false)]
        public string TargetPaymentTermCodeDescription { get; set; }

        /// <summary>
        /// Gets or Sets IsDuplLangDescriptions
        /// </summary>
        [DataMember(Name="isDuplLangDescriptions", EmitDefaultValue=false)]
        public bool? IsDuplLangDescriptions { get; set; }

        /// <summary>
        /// Gets or Sets IsDuplExtendedAttribute
        /// </summary>
        [DataMember(Name="isDuplExtendedAttribute", EmitDefaultValue=false)]
        public bool? IsDuplExtendedAttribute { 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 PaymentTermDuplicationParametersCODTO {\n");
            sb.Append("  SourcePaymentTermId: ").Append(SourcePaymentTermId).Append("\n");
            sb.Append("  TargetPaymentTermCode: ").Append(TargetPaymentTermCode).Append("\n");
            sb.Append("  TargetPaymentTermCodeDescription: ").Append(TargetPaymentTermCodeDescription).Append("\n");
            sb.Append("  IsDuplLangDescriptions: ").Append(IsDuplLangDescriptions).Append("\n");
            sb.Append("  IsDuplExtendedAttribute: ").Append(IsDuplExtendedAttribute).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 PaymentTermDuplicationParametersCODTO);
        }

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

            return 
                (
                    this.SourcePaymentTermId == input.SourcePaymentTermId ||
                    (this.SourcePaymentTermId != null &&
                    this.SourcePaymentTermId.Equals(input.SourcePaymentTermId))
                ) && 
                (
                    this.TargetPaymentTermCode == input.TargetPaymentTermCode ||
                    (this.TargetPaymentTermCode != null &&
                    this.TargetPaymentTermCode.Equals(input.TargetPaymentTermCode))
                ) && 
                (
                    this.TargetPaymentTermCodeDescription == input.TargetPaymentTermCodeDescription ||
                    (this.TargetPaymentTermCodeDescription != null &&
                    this.TargetPaymentTermCodeDescription.Equals(input.TargetPaymentTermCodeDescription))
                ) && 
                (
                    this.IsDuplLangDescriptions == input.IsDuplLangDescriptions ||
                    (this.IsDuplLangDescriptions != null &&
                    this.IsDuplLangDescriptions.Equals(input.IsDuplLangDescriptions))
                ) && 
                (
                    this.IsDuplExtendedAttribute == input.IsDuplExtendedAttribute ||
                    (this.IsDuplExtendedAttribute != null &&
                    this.IsDuplExtendedAttribute.Equals(input.IsDuplExtendedAttribute))
                );
        }

        /// <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.SourcePaymentTermId != null)
                    hashCode = hashCode * 59 + this.SourcePaymentTermId.GetHashCode();
                if (this.TargetPaymentTermCode != null)
                    hashCode = hashCode * 59 + this.TargetPaymentTermCode.GetHashCode();
                if (this.TargetPaymentTermCodeDescription != null)
                    hashCode = hashCode * 59 + this.TargetPaymentTermCodeDescription.GetHashCode();
                if (this.IsDuplLangDescriptions != null)
                    hashCode = hashCode * 59 + this.IsDuplLangDescriptions.GetHashCode();
                if (this.IsDuplExtendedAttribute != null)
                    hashCode = hashCode * 59 + this.IsDuplExtendedAttribute.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;
        }
    }
}
