/* 
 * 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>
    /// PriceContractReadDO &lt;p&gt;The view object which consolidates data from Price Contract tables.&lt;br /&gt;&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiServerMdPriceContractDtoDomPriceContractReadDO :  IEquatable<ComGkSoftwareGkrApiServerMdPriceContractDtoDomPriceContractReadDO>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiServerMdPriceContractDtoDomPriceContractReadDO" /> class.
        /// </summary>
        /// <param name="priceContractID">&lt;p&gt;The identifier of a contract which was created for a customer or customer group&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="itemID">&lt;p&gt;Reference to the Item.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="posItemID">&lt;p&gt;The POS Item ID.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="unitOfMeasureCode">&lt;p&gt;The UOM of the Item.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="effectiveDateTime">&lt;p&gt;Effective (start) Time Stamp of that price.&lt;br /&gt;&lt;/p&gt; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone).</param>
        /// <param name="expirationDateTime">&lt;p&gt;Expiration (end) Time Stamp of that price.&lt;br /&gt;&lt;/p&gt; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone).</param>
        /// <param name="saleUnitRetailPriceAmount">&lt;p&gt;The agreed sales unit price for the item.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="customerID">&lt;p&gt;A unique system assigned identifier for the Customer.&lt;br /&gt;&lt;/p&gt;.</param>
        /// <param name="customerGroupID">&lt;p&gt;Customer group ID.&lt;br /&gt;&lt;/p&gt;.</param>
        public ComGkSoftwareGkrApiServerMdPriceContractDtoDomPriceContractReadDO(string priceContractID = default(string), string itemID = default(string), string posItemID = default(string), string unitOfMeasureCode = default(string), string effectiveDateTime = default(string), string expirationDateTime = default(string), double? saleUnitRetailPriceAmount = default(double?), string customerID = default(string), string customerGroupID = default(string))
        {
            this.PriceContractID = priceContractID;
            this.ItemID = itemID;
            this.PosItemID = posItemID;
            this.UnitOfMeasureCode = unitOfMeasureCode;
            this.EffectiveDateTime = effectiveDateTime;
            this.ExpirationDateTime = expirationDateTime;
            this.SaleUnitRetailPriceAmount = saleUnitRetailPriceAmount;
            this.CustomerID = customerID;
            this.CustomerGroupID = customerGroupID;
        }
        
        /// <summary>
        /// &lt;p&gt;The identifier of a contract which was created for a customer or customer group&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The identifier of a contract which was created for a customer or customer group&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="priceContractID", EmitDefaultValue=false)]
        public string PriceContractID { get; set; }

        /// <summary>
        /// &lt;p&gt;Reference to the Item.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Reference to the Item.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="itemID", EmitDefaultValue=false)]
        public string ItemID { get; set; }

        /// <summary>
        /// &lt;p&gt;The POS Item ID.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The POS Item ID.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="posItemID", EmitDefaultValue=false)]
        public string PosItemID { get; set; }

        /// <summary>
        /// &lt;p&gt;The UOM of the Item.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The UOM of the Item.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="unitOfMeasureCode", EmitDefaultValue=false)]
        public string UnitOfMeasureCode { get; set; }

        /// <summary>
        /// &lt;p&gt;Effective (start) Time Stamp of that price.&lt;br /&gt;&lt;/p&gt; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>&lt;p&gt;Effective (start) Time Stamp of that price.&lt;br /&gt;&lt;/p&gt; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="effectiveDateTime", EmitDefaultValue=false)]
        public string EffectiveDateTime { get; set; }

        /// <summary>
        /// &lt;p&gt;Expiration (end) Time Stamp of that price.&lt;br /&gt;&lt;/p&gt; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)
        /// </summary>
        /// <value>&lt;p&gt;Expiration (end) Time Stamp of that price.&lt;br /&gt;&lt;/p&gt; Date format &#39;yyyy-MM-dd&#39;T&#39;HH:mm:ss.SSS&#39; (no timezone)</value>
        [DataMember(Name="expirationDateTime", EmitDefaultValue=false)]
        public string ExpirationDateTime { get; set; }

        /// <summary>
        /// &lt;p&gt;The agreed sales unit price for the item.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;The agreed sales unit price for the item.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="saleUnitRetailPriceAmount", EmitDefaultValue=false)]
        public double? SaleUnitRetailPriceAmount { get; set; }

        /// <summary>
        /// &lt;p&gt;A unique system assigned identifier for the Customer.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;A unique system assigned identifier for the Customer.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="customerID", EmitDefaultValue=false)]
        public string CustomerID { get; set; }

        /// <summary>
        /// &lt;p&gt;Customer group ID.&lt;br /&gt;&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Customer group ID.&lt;br /&gt;&lt;/p&gt;</value>
        [DataMember(Name="customerGroupID", EmitDefaultValue=false)]
        public string CustomerGroupID { 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 ComGkSoftwareGkrApiServerMdPriceContractDtoDomPriceContractReadDO {\n");
            sb.Append("  PriceContractID: ").Append(PriceContractID).Append("\n");
            sb.Append("  ItemID: ").Append(ItemID).Append("\n");
            sb.Append("  PosItemID: ").Append(PosItemID).Append("\n");
            sb.Append("  UnitOfMeasureCode: ").Append(UnitOfMeasureCode).Append("\n");
            sb.Append("  EffectiveDateTime: ").Append(EffectiveDateTime).Append("\n");
            sb.Append("  ExpirationDateTime: ").Append(ExpirationDateTime).Append("\n");
            sb.Append("  SaleUnitRetailPriceAmount: ").Append(SaleUnitRetailPriceAmount).Append("\n");
            sb.Append("  CustomerID: ").Append(CustomerID).Append("\n");
            sb.Append("  CustomerGroupID: ").Append(CustomerGroupID).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 ComGkSoftwareGkrApiServerMdPriceContractDtoDomPriceContractReadDO);
        }

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

            return 
                (
                    this.PriceContractID == input.PriceContractID ||
                    (this.PriceContractID != null &&
                    this.PriceContractID.Equals(input.PriceContractID))
                ) && 
                (
                    this.ItemID == input.ItemID ||
                    (this.ItemID != null &&
                    this.ItemID.Equals(input.ItemID))
                ) && 
                (
                    this.PosItemID == input.PosItemID ||
                    (this.PosItemID != null &&
                    this.PosItemID.Equals(input.PosItemID))
                ) && 
                (
                    this.UnitOfMeasureCode == input.UnitOfMeasureCode ||
                    (this.UnitOfMeasureCode != null &&
                    this.UnitOfMeasureCode.Equals(input.UnitOfMeasureCode))
                ) && 
                (
                    this.EffectiveDateTime == input.EffectiveDateTime ||
                    (this.EffectiveDateTime != null &&
                    this.EffectiveDateTime.Equals(input.EffectiveDateTime))
                ) && 
                (
                    this.ExpirationDateTime == input.ExpirationDateTime ||
                    (this.ExpirationDateTime != null &&
                    this.ExpirationDateTime.Equals(input.ExpirationDateTime))
                ) && 
                (
                    this.SaleUnitRetailPriceAmount == input.SaleUnitRetailPriceAmount ||
                    (this.SaleUnitRetailPriceAmount != null &&
                    this.SaleUnitRetailPriceAmount.Equals(input.SaleUnitRetailPriceAmount))
                ) && 
                (
                    this.CustomerID == input.CustomerID ||
                    (this.CustomerID != null &&
                    this.CustomerID.Equals(input.CustomerID))
                ) && 
                (
                    this.CustomerGroupID == input.CustomerGroupID ||
                    (this.CustomerGroupID != null &&
                    this.CustomerGroupID.Equals(input.CustomerGroupID))
                );
        }

        /// <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.PriceContractID != null)
                    hashCode = hashCode * 59 + this.PriceContractID.GetHashCode();
                if (this.ItemID != null)
                    hashCode = hashCode * 59 + this.ItemID.GetHashCode();
                if (this.PosItemID != null)
                    hashCode = hashCode * 59 + this.PosItemID.GetHashCode();
                if (this.UnitOfMeasureCode != null)
                    hashCode = hashCode * 59 + this.UnitOfMeasureCode.GetHashCode();
                if (this.EffectiveDateTime != null)
                    hashCode = hashCode * 59 + this.EffectiveDateTime.GetHashCode();
                if (this.ExpirationDateTime != null)
                    hashCode = hashCode * 59 + this.ExpirationDateTime.GetHashCode();
                if (this.SaleUnitRetailPriceAmount != null)
                    hashCode = hashCode * 59 + this.SaleUnitRetailPriceAmount.GetHashCode();
                if (this.CustomerID != null)
                    hashCode = hashCode * 59 + this.CustomerID.GetHashCode();
                if (this.CustomerGroupID != null)
                    hashCode = hashCode * 59 + this.CustomerGroupID.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;
        }
    }

}
