/* 
 * 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>
    /// ExportCustomerSupplierCOAddParameterDTO
    /// </summary>
    [DataContract]
        public partial class ExportCustomerSupplierCOAddParameterDTO :  IEquatable<ExportCustomerSupplierCOAddParameterDTO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ExportCustomerSupplierCOAddParameterDTO" /> class.
        /// </summary>
        /// <param name="selectionValidityGeneralMasterData">Selection on validity General master data&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - 0 (All General master data)&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - 1 (Current valid General master data)&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - 2 (General master data valid on the date)&lt;/li&gt;&lt;/ul&gt; (default to &quot;0&quot;).</param>
        /// <param name="referenceValidDate">Reference valid date for General master data.</param>
        public ExportCustomerSupplierCOAddParameterDTO(string selectionValidityGeneralMasterData = "0", DateTime? referenceValidDate = default(DateTime?))
        {
            // use default value if no "selectionValidityGeneralMasterData" provided
            if (selectionValidityGeneralMasterData == null)
            {
                this.SelectionValidityGeneralMasterData = "0";
            }
            else
            {
                this.SelectionValidityGeneralMasterData = selectionValidityGeneralMasterData;
            }
            this.ReferenceValidDate = referenceValidDate;
        }
        
        /// <summary>
        /// Selection on validity General master data&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - 0 (All General master data)&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - 1 (Current valid General master data)&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - 2 (General master data valid on the date)&lt;/li&gt;&lt;/ul&gt;
        /// </summary>
        /// <value>Selection on validity General master data&lt;br&gt;&lt;ul&gt;&lt;li&gt;&lt;i&gt;0&lt;/i&gt; - 0 (All General master data)&lt;/li&gt;&lt;li&gt;&lt;i&gt;1&lt;/i&gt; - 1 (Current valid General master data)&lt;/li&gt;&lt;li&gt;&lt;i&gt;2&lt;/i&gt; - 2 (General master data valid on the date)&lt;/li&gt;&lt;/ul&gt;</value>
        [DataMember(Name="selectionValidityGeneralMasterData", EmitDefaultValue=false)]
        public string SelectionValidityGeneralMasterData { get; set; }

        /// <summary>
        /// Reference valid date for General master data
        /// </summary>
        /// <value>Reference valid date for General master data</value>
        [DataMember(Name="referenceValidDate", EmitDefaultValue=false)]
        public DateTime? ReferenceValidDate { 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 ExportCustomerSupplierCOAddParameterDTO {\n");
            sb.Append("  SelectionValidityGeneralMasterData: ").Append(SelectionValidityGeneralMasterData).Append("\n");
            sb.Append("  ReferenceValidDate: ").Append(ReferenceValidDate).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 ExportCustomerSupplierCOAddParameterDTO);
        }

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

            return 
                (
                    this.SelectionValidityGeneralMasterData == input.SelectionValidityGeneralMasterData ||
                    (this.SelectionValidityGeneralMasterData != null &&
                    this.SelectionValidityGeneralMasterData.Equals(input.SelectionValidityGeneralMasterData))
                ) && 
                (
                    this.ReferenceValidDate == input.ReferenceValidDate ||
                    (this.ReferenceValidDate != null &&
                    this.ReferenceValidDate.Equals(input.ReferenceValidDate))
                );
        }

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