/* 
 * 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>
    /// RegisterFuelLineItem &lt;p&gt;This entity defines fuel data from app enablement to be assigned to fuel sale return line item during item registration&lt;/p&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwarePosApiModelConfigProcessFlowsRegisterFuelLineItem :  IEquatable<ComGkSoftwarePosApiModelConfigProcessFlowsRegisterFuelLineItem>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwarePosApiModelConfigProcessFlowsRegisterFuelLineItem" /> class.
        /// </summary>
        /// <param name="fuelingPointId">&lt;p&gt;Defines the Fueling Point Id (pump) where the transaction started&lt;/p&gt;.</param>
        /// <param name="gradeId">&lt;p&gt;Defines grade Id of the fuel product&lt;/p&gt;.</param>
        /// <param name="stackPosition">&lt;p&gt;Defines internal transaction number for the fuel services&lt;/p&gt;.</param>
        /// <param name="fuelSaleStatusCode">&lt;p&gt;This parameter defines fuel sale status code (transaction type).&lt;/p&gt;.</param>
        /// <param name="presetAmount">&lt;p&gt;Defines the preset amount in case of prepay transactions&lt;/p&gt;.</param>
        /// <param name="fuelPrepayItem">&lt;p&gt;Defines the pos item id for the generic prepay item&lt;/p&gt;.</param>
        /// <param name="fuelPrepayItemUOMCode">&lt;p&gt;Defines the pos item UOM code for the generic prepay item&lt;/p&gt;.</param>
        /// <param name="actualAmount">&lt;p&gt;Defines the actual amount for the fuel line item.&lt;/p&gt;.</param>
        /// <param name="fuelDiscount">&lt;p&gt;Defines the discount for the fuel line item.&lt;/p&gt;.</param>
        public ComGkSoftwarePosApiModelConfigProcessFlowsRegisterFuelLineItem(string fuelingPointId = default(string), string gradeId = default(string), int? stackPosition = default(int?), string fuelSaleStatusCode = default(string), double? presetAmount = default(double?), string fuelPrepayItem = default(string), string fuelPrepayItemUOMCode = default(string), double? actualAmount = default(double?), double? fuelDiscount = default(double?))
        {
            this.FuelingPointId = fuelingPointId;
            this.GradeId = gradeId;
            this.StackPosition = stackPosition;
            this.FuelSaleStatusCode = fuelSaleStatusCode;
            this.PresetAmount = presetAmount;
            this.FuelPrepayItem = fuelPrepayItem;
            this.FuelPrepayItemUOMCode = fuelPrepayItemUOMCode;
            this.ActualAmount = actualAmount;
            this.FuelDiscount = fuelDiscount;
        }
        
        /// <summary>
        /// &lt;p&gt;Defines the Fueling Point Id (pump) where the transaction started&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Defines the Fueling Point Id (pump) where the transaction started&lt;/p&gt;</value>
        [DataMember(Name="fuelingPointId", EmitDefaultValue=false)]
        public string FuelingPointId { get; set; }

        /// <summary>
        /// &lt;p&gt;Defines grade Id of the fuel product&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Defines grade Id of the fuel product&lt;/p&gt;</value>
        [DataMember(Name="gradeId", EmitDefaultValue=false)]
        public string GradeId { get; set; }

        /// <summary>
        /// &lt;p&gt;Defines internal transaction number for the fuel services&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Defines internal transaction number for the fuel services&lt;/p&gt;</value>
        [DataMember(Name="stackPosition", EmitDefaultValue=false)]
        public int? StackPosition { get; set; }

        /// <summary>
        /// &lt;p&gt;This parameter defines fuel sale status code (transaction type).&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;This parameter defines fuel sale status code (transaction type).&lt;/p&gt;</value>
        [DataMember(Name="fuelSaleStatusCode", EmitDefaultValue=false)]
        public string FuelSaleStatusCode { get; set; }

        /// <summary>
        /// &lt;p&gt;Defines the preset amount in case of prepay transactions&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Defines the preset amount in case of prepay transactions&lt;/p&gt;</value>
        [DataMember(Name="presetAmount", EmitDefaultValue=false)]
        public double? PresetAmount { get; set; }

        /// <summary>
        /// &lt;p&gt;Defines the pos item id for the generic prepay item&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Defines the pos item id for the generic prepay item&lt;/p&gt;</value>
        [DataMember(Name="fuelPrepayItem", EmitDefaultValue=false)]
        public string FuelPrepayItem { get; set; }

        /// <summary>
        /// &lt;p&gt;Defines the pos item UOM code for the generic prepay item&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Defines the pos item UOM code for the generic prepay item&lt;/p&gt;</value>
        [DataMember(Name="fuelPrepayItemUOMCode", EmitDefaultValue=false)]
        public string FuelPrepayItemUOMCode { get; set; }

        /// <summary>
        /// &lt;p&gt;Defines the actual amount for the fuel line item.&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Defines the actual amount for the fuel line item.&lt;/p&gt;</value>
        [DataMember(Name="actualAmount", EmitDefaultValue=false)]
        public double? ActualAmount { get; set; }

        /// <summary>
        /// &lt;p&gt;Defines the discount for the fuel line item.&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Defines the discount for the fuel line item.&lt;/p&gt;</value>
        [DataMember(Name="fuelDiscount", EmitDefaultValue=false)]
        public double? FuelDiscount { 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 ComGkSoftwarePosApiModelConfigProcessFlowsRegisterFuelLineItem {\n");
            sb.Append("  FuelingPointId: ").Append(FuelingPointId).Append("\n");
            sb.Append("  GradeId: ").Append(GradeId).Append("\n");
            sb.Append("  StackPosition: ").Append(StackPosition).Append("\n");
            sb.Append("  FuelSaleStatusCode: ").Append(FuelSaleStatusCode).Append("\n");
            sb.Append("  PresetAmount: ").Append(PresetAmount).Append("\n");
            sb.Append("  FuelPrepayItem: ").Append(FuelPrepayItem).Append("\n");
            sb.Append("  FuelPrepayItemUOMCode: ").Append(FuelPrepayItemUOMCode).Append("\n");
            sb.Append("  ActualAmount: ").Append(ActualAmount).Append("\n");
            sb.Append("  FuelDiscount: ").Append(FuelDiscount).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 ComGkSoftwarePosApiModelConfigProcessFlowsRegisterFuelLineItem);
        }

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

            return 
                (
                    this.FuelingPointId == input.FuelingPointId ||
                    (this.FuelingPointId != null &&
                    this.FuelingPointId.Equals(input.FuelingPointId))
                ) && 
                (
                    this.GradeId == input.GradeId ||
                    (this.GradeId != null &&
                    this.GradeId.Equals(input.GradeId))
                ) && 
                (
                    this.StackPosition == input.StackPosition ||
                    (this.StackPosition != null &&
                    this.StackPosition.Equals(input.StackPosition))
                ) && 
                (
                    this.FuelSaleStatusCode == input.FuelSaleStatusCode ||
                    (this.FuelSaleStatusCode != null &&
                    this.FuelSaleStatusCode.Equals(input.FuelSaleStatusCode))
                ) && 
                (
                    this.PresetAmount == input.PresetAmount ||
                    (this.PresetAmount != null &&
                    this.PresetAmount.Equals(input.PresetAmount))
                ) && 
                (
                    this.FuelPrepayItem == input.FuelPrepayItem ||
                    (this.FuelPrepayItem != null &&
                    this.FuelPrepayItem.Equals(input.FuelPrepayItem))
                ) && 
                (
                    this.FuelPrepayItemUOMCode == input.FuelPrepayItemUOMCode ||
                    (this.FuelPrepayItemUOMCode != null &&
                    this.FuelPrepayItemUOMCode.Equals(input.FuelPrepayItemUOMCode))
                ) && 
                (
                    this.ActualAmount == input.ActualAmount ||
                    (this.ActualAmount != null &&
                    this.ActualAmount.Equals(input.ActualAmount))
                ) && 
                (
                    this.FuelDiscount == input.FuelDiscount ||
                    (this.FuelDiscount != null &&
                    this.FuelDiscount.Equals(input.FuelDiscount))
                );
        }

        /// <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.FuelingPointId != null)
                    hashCode = hashCode * 59 + this.FuelingPointId.GetHashCode();
                if (this.GradeId != null)
                    hashCode = hashCode * 59 + this.GradeId.GetHashCode();
                if (this.StackPosition != null)
                    hashCode = hashCode * 59 + this.StackPosition.GetHashCode();
                if (this.FuelSaleStatusCode != null)
                    hashCode = hashCode * 59 + this.FuelSaleStatusCode.GetHashCode();
                if (this.PresetAmount != null)
                    hashCode = hashCode * 59 + this.PresetAmount.GetHashCode();
                if (this.FuelPrepayItem != null)
                    hashCode = hashCode * 59 + this.FuelPrepayItem.GetHashCode();
                if (this.FuelPrepayItemUOMCode != null)
                    hashCode = hashCode * 59 + this.FuelPrepayItemUOMCode.GetHashCode();
                if (this.ActualAmount != null)
                    hashCode = hashCode * 59 + this.ActualAmount.GetHashCode();
                if (this.FuelDiscount != null)
                    hashCode = hashCode * 59 + this.FuelDiscount.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;
        }
    }

}
