/* 
 * GK application - OmniPOS Service API
 *
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 5.21.1-b03
 * 
 * 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>
    /// PromotionItemFilterSO &lt;p&gt;This domain object contains the promotion data relevant for the Loyalty Engine.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Import from:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;ul&gt;&lt;br /&gt; &lt;li&gt;masterdata_Promotion_SE.xml (namespace &lt;br /&gt;  &lt;a href&#x3D;&#39;http://www.gk-software.com/master_data/promotion_SE/&#39;&gt;http://www.gk-software.com/master_data/promotion_SE/&lt;/a&gt;)&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt;PromotionCPD.xml (namespace &lt;br /&gt;  &lt;a href&#x3D;&#39;http://www.gk-software.com/masterdata/rebate&#39;&gt;http://www.gk-software.com/masterdata/rebate&lt;/a&gt;)&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt;masterData_Promotion.xml (namespace &lt;br /&gt;  &lt;a href&#x3D;&#39;http://www.gk-software.com/storeweaver/master_data/promotion/&#39;&gt;http://www.gk-software.com/storeweaver/master_data/promotion/&lt;/a&gt;)&lt;br /&gt; &lt;/li&gt;&lt;br /&gt; &lt;li&gt;masterData_CustomerPromotion.xml (namespace &lt;br /&gt;  &lt;a href&#x3D;&#39;http://www.gk-software.com/storeweaver/master_data/customer_promotion/&#39;&gt;http://www.gk-software.com/storeweaver/master_data/customer_promotion/&lt;/a&gt;)&lt;br /&gt; &lt;/li&gt;&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;&lt;p&gt;The imports from masterData_Promotion.xml and masterData_CustomerPromotion.xml are not intended for further use.&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareSweeSesApiServerMdPromotionDtoSoPromotionItemFilterSO :  IEquatable<ComGkSoftwareSweeSesApiServerMdPromotionDtoSoPromotionItemFilterSO>, IValidatableObject
    {
        /// <summary>
        /// Defines CalculationMode
        /// </summary>
        [JsonConverter(typeof(StringEnumConverter))]
        public enum CalculationModeEnum
        {
            
            /// <summary>
            /// Enum BASKET for value: BASKET
            /// </summary>
            [EnumMember(Value = "BASKET")]
            BASKET = 1,
            
            /// <summary>
            /// Enum LINEITEM for value: LINE_ITEM
            /// </summary>
            [EnumMember(Value = "LINE_ITEM")]
            LINEITEM = 2
        }

        /// <summary>
        /// Gets or Sets CalculationMode
        /// </summary>
        [DataMember(Name="calculationMode", EmitDefaultValue=false)]
        public CalculationModeEnum? CalculationMode { get; set; }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareSweeSesApiServerMdPromotionDtoSoPromotionItemFilterSO" /> class.
        /// </summary>
        /// <param name="itemID">itemID.</param>
        /// <param name="unitOfMeasureCode">unitOfMeasureCode.</param>
        /// <param name="timestamp">Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone).</param>
        /// <param name="considerOnlyDiscountAdviceConditions">considerOnlyDiscountAdviceConditions.</param>
        /// <param name="calculationMode">calculationMode.</param>
        public ComGkSoftwareSweeSesApiServerMdPromotionDtoSoPromotionItemFilterSO(string itemID = default(string), string unitOfMeasureCode = default(string), string timestamp = default(string), bool? considerOnlyDiscountAdviceConditions = default(bool?), CalculationModeEnum? calculationMode = default(CalculationModeEnum?))
        {
            this.ItemID = itemID;
            this.UnitOfMeasureCode = unitOfMeasureCode;
            this.Timestamp = timestamp;
            this.ConsiderOnlyDiscountAdviceConditions = considerOnlyDiscountAdviceConditions;
            this.CalculationMode = calculationMode;
        }
        
        /// <summary>
        /// Gets or Sets ItemID
        /// </summary>
        [DataMember(Name="itemID", EmitDefaultValue=false)]
        public string ItemID { get; set; }

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

        /// <summary>
        /// Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="timestamp", EmitDefaultValue=false)]
        public string Timestamp { get; set; }

        /// <summary>
        /// Gets or Sets ConsiderOnlyDiscountAdviceConditions
        /// </summary>
        [DataMember(Name="considerOnlyDiscountAdviceConditions", EmitDefaultValue=false)]
        public bool? ConsiderOnlyDiscountAdviceConditions { 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 ComGkSoftwareSweeSesApiServerMdPromotionDtoSoPromotionItemFilterSO {\n");
            sb.Append("  ItemID: ").Append(ItemID).Append("\n");
            sb.Append("  UnitOfMeasureCode: ").Append(UnitOfMeasureCode).Append("\n");
            sb.Append("  Timestamp: ").Append(Timestamp).Append("\n");
            sb.Append("  ConsiderOnlyDiscountAdviceConditions: ").Append(ConsiderOnlyDiscountAdviceConditions).Append("\n");
            sb.Append("  CalculationMode: ").Append(CalculationMode).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 ComGkSoftwareSweeSesApiServerMdPromotionDtoSoPromotionItemFilterSO);
        }

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

            return 
                (
                    this.ItemID == input.ItemID ||
                    (this.ItemID != null &&
                    this.ItemID.Equals(input.ItemID))
                ) && 
                (
                    this.UnitOfMeasureCode == input.UnitOfMeasureCode ||
                    (this.UnitOfMeasureCode != null &&
                    this.UnitOfMeasureCode.Equals(input.UnitOfMeasureCode))
                ) && 
                (
                    this.Timestamp == input.Timestamp ||
                    (this.Timestamp != null &&
                    this.Timestamp.Equals(input.Timestamp))
                ) && 
                (
                    this.ConsiderOnlyDiscountAdviceConditions == input.ConsiderOnlyDiscountAdviceConditions ||
                    (this.ConsiderOnlyDiscountAdviceConditions != null &&
                    this.ConsiderOnlyDiscountAdviceConditions.Equals(input.ConsiderOnlyDiscountAdviceConditions))
                ) && 
                (
                    this.CalculationMode == input.CalculationMode ||
                    (this.CalculationMode != null &&
                    this.CalculationMode.Equals(input.CalculationMode))
                );
        }

        /// <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.ItemID != null)
                    hashCode = hashCode * 59 + this.ItemID.GetHashCode();
                if (this.UnitOfMeasureCode != null)
                    hashCode = hashCode * 59 + this.UnitOfMeasureCode.GetHashCode();
                if (this.Timestamp != null)
                    hashCode = hashCode * 59 + this.Timestamp.GetHashCode();
                if (this.ConsiderOnlyDiscountAdviceConditions != null)
                    hashCode = hashCode * 59 + this.ConsiderOnlyDiscountAdviceConditions.GetHashCode();
                if (this.CalculationMode != null)
                    hashCode = hashCode * 59 + this.CalculationMode.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;
        }
    }

}
