/* 
 * 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>
    /// ControlTransaction &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoControlTransaction :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoControlTransaction>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoControlTransaction" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoControlTransaction() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoControlTransaction" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="typeCode">A code that describes the type of control transaction..</param>
        /// <param name="fuelingTransaction">data for fuel.</param>
        /// <param name="xxcustom05">Customizable information.</param>
        /// <param name="xxcustom03">Customizable information.</param>
        /// <param name="xxcustom02">Customizable information.</param>
        /// <param name="xxcustom04">Customizable information.</param>
        /// <param name="posnoSaleTransactionList">data for no sale transactions.</param>
        /// <param name="signOnTransactionList">data for sign on transactons.</param>
        /// <param name="signOffTransactionList">data for sign off transactons.</param>
        /// <param name="tillTenderSettlementTransactionList">data for till tender settlements.</param>
        /// <param name="storeSafeSettlementTransactionList">data for store safe tender settlements.</param>
        /// <param name="depositBagTransactionList">data for safebag status changes.</param>
        /// <param name="depositBagSettlementTransactionList">data for safebag settlements.</param>
        /// <param name="taxRefundTransactionList">data for tax refund.</param>
        /// <param name="xxcustom01">Customizable information.</param>
        public ComGkSoftwareGkrApiTxpoolDtoControlTransaction(ComGkSoftwareGkrApiTxpoolDtoControlTransactionKey key = default(ComGkSoftwareGkrApiTxpoolDtoControlTransactionKey), string typeCode = default(string), ComGkSoftwareGkrApiTxpoolDtoFuelingTransaction fuelingTransaction = default(ComGkSoftwareGkrApiTxpoolDtoFuelingTransaction), string xxcustom05 = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), List<ComGkSoftwareGkrApiTxpoolDtoPOSNoSaleTransaction> posnoSaleTransactionList = default(List<ComGkSoftwareGkrApiTxpoolDtoPOSNoSaleTransaction>), List<ComGkSoftwareGkrApiTxpoolDtoSignOnTransaction> signOnTransactionList = default(List<ComGkSoftwareGkrApiTxpoolDtoSignOnTransaction>), List<ComGkSoftwareGkrApiTxpoolDtoSignOffTransaction> signOffTransactionList = default(List<ComGkSoftwareGkrApiTxpoolDtoSignOffTransaction>), List<ComGkSoftwareGkrApiTxpoolDtoTillTenderSettlementTransaction> tillTenderSettlementTransactionList = default(List<ComGkSoftwareGkrApiTxpoolDtoTillTenderSettlementTransaction>), List<ComGkSoftwareGkrApiTxpoolDtoStoreSafeSettlementTransaction> storeSafeSettlementTransactionList = default(List<ComGkSoftwareGkrApiTxpoolDtoStoreSafeSettlementTransaction>), List<ComGkSoftwareGkrApiTxpoolDtoDepositBagTransaction> depositBagTransactionList = default(List<ComGkSoftwareGkrApiTxpoolDtoDepositBagTransaction>), List<ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTransaction> depositBagSettlementTransactionList = default(List<ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTransaction>), List<ComGkSoftwareGkrApiTxpoolDtoTaxRefundTransaction> taxRefundTransactionList = default(List<ComGkSoftwareGkrApiTxpoolDtoTaxRefundTransaction>), string xxcustom01 = default(string))
        {
            // to ensure "key" is required (not null)
            if (key == null)
            {
                throw new InvalidDataException("key is a required property for ComGkSoftwareGkrApiTxpoolDtoControlTransaction and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            this.TypeCode = typeCode;
            this.FuelingTransaction = fuelingTransaction;
            this.Xxcustom05 = xxcustom05;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            this.PosnoSaleTransactionList = posnoSaleTransactionList;
            this.SignOnTransactionList = signOnTransactionList;
            this.SignOffTransactionList = signOffTransactionList;
            this.TillTenderSettlementTransactionList = tillTenderSettlementTransactionList;
            this.StoreSafeSettlementTransactionList = storeSafeSettlementTransactionList;
            this.DepositBagTransactionList = depositBagTransactionList;
            this.DepositBagSettlementTransactionList = depositBagSettlementTransactionList;
            this.TaxRefundTransactionList = taxRefundTransactionList;
            this.Xxcustom01 = xxcustom01;
        }
        
        /// <summary>
        /// &lt;p&gt;Getter for inner key class.&lt;/p&gt;
        /// </summary>
        /// <value>&lt;p&gt;Getter for inner key class.&lt;/p&gt;</value>
        [DataMember(Name="key", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiTxpoolDtoControlTransactionKey Key { get; set; }

        /// <summary>
        /// A code that describes the type of control transaction.
        /// </summary>
        /// <value>A code that describes the type of control transaction.</value>
        [DataMember(Name="typeCode", EmitDefaultValue=false)]
        public string TypeCode { get; set; }

        /// <summary>
        /// data for fuel
        /// </summary>
        /// <value>data for fuel</value>
        [DataMember(Name="fuelingTransaction", EmitDefaultValue=false)]
        public ComGkSoftwareGkrApiTxpoolDtoFuelingTransaction FuelingTransaction { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom05", EmitDefaultValue=false)]
        public string Xxcustom05 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom03", EmitDefaultValue=false)]
        public string Xxcustom03 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom02", EmitDefaultValue=false)]
        public string Xxcustom02 { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom04", EmitDefaultValue=false)]
        public string Xxcustom04 { get; set; }

        /// <summary>
        /// data for no sale transactions
        /// </summary>
        /// <value>data for no sale transactions</value>
        [DataMember(Name="posnoSaleTransactionList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoPOSNoSaleTransaction> PosnoSaleTransactionList { get; set; }

        /// <summary>
        /// data for sign on transactons
        /// </summary>
        /// <value>data for sign on transactons</value>
        [DataMember(Name="signOnTransactionList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoSignOnTransaction> SignOnTransactionList { get; set; }

        /// <summary>
        /// data for sign off transactons
        /// </summary>
        /// <value>data for sign off transactons</value>
        [DataMember(Name="signOffTransactionList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoSignOffTransaction> SignOffTransactionList { get; set; }

        /// <summary>
        /// data for till tender settlements
        /// </summary>
        /// <value>data for till tender settlements</value>
        [DataMember(Name="tillTenderSettlementTransactionList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoTillTenderSettlementTransaction> TillTenderSettlementTransactionList { get; set; }

        /// <summary>
        /// data for store safe tender settlements
        /// </summary>
        /// <value>data for store safe tender settlements</value>
        [DataMember(Name="storeSafeSettlementTransactionList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoStoreSafeSettlementTransaction> StoreSafeSettlementTransactionList { get; set; }

        /// <summary>
        /// data for safebag status changes
        /// </summary>
        /// <value>data for safebag status changes</value>
        [DataMember(Name="depositBagTransactionList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoDepositBagTransaction> DepositBagTransactionList { get; set; }

        /// <summary>
        /// data for safebag settlements
        /// </summary>
        /// <value>data for safebag settlements</value>
        [DataMember(Name="depositBagSettlementTransactionList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTransaction> DepositBagSettlementTransactionList { get; set; }

        /// <summary>
        /// data for tax refund
        /// </summary>
        /// <value>data for tax refund</value>
        [DataMember(Name="taxRefundTransactionList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoTaxRefundTransaction> TaxRefundTransactionList { get; set; }

        /// <summary>
        /// Customizable information
        /// </summary>
        /// <value>Customizable information</value>
        [DataMember(Name="xxcustom01", EmitDefaultValue=false)]
        public string Xxcustom01 { 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 ComGkSoftwareGkrApiTxpoolDtoControlTransaction {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  TypeCode: ").Append(TypeCode).Append("\n");
            sb.Append("  FuelingTransaction: ").Append(FuelingTransaction).Append("\n");
            sb.Append("  Xxcustom05: ").Append(Xxcustom05).Append("\n");
            sb.Append("  Xxcustom03: ").Append(Xxcustom03).Append("\n");
            sb.Append("  Xxcustom02: ").Append(Xxcustom02).Append("\n");
            sb.Append("  Xxcustom04: ").Append(Xxcustom04).Append("\n");
            sb.Append("  PosnoSaleTransactionList: ").Append(PosnoSaleTransactionList).Append("\n");
            sb.Append("  SignOnTransactionList: ").Append(SignOnTransactionList).Append("\n");
            sb.Append("  SignOffTransactionList: ").Append(SignOffTransactionList).Append("\n");
            sb.Append("  TillTenderSettlementTransactionList: ").Append(TillTenderSettlementTransactionList).Append("\n");
            sb.Append("  StoreSafeSettlementTransactionList: ").Append(StoreSafeSettlementTransactionList).Append("\n");
            sb.Append("  DepositBagTransactionList: ").Append(DepositBagTransactionList).Append("\n");
            sb.Append("  DepositBagSettlementTransactionList: ").Append(DepositBagSettlementTransactionList).Append("\n");
            sb.Append("  TaxRefundTransactionList: ").Append(TaxRefundTransactionList).Append("\n");
            sb.Append("  Xxcustom01: ").Append(Xxcustom01).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 ComGkSoftwareGkrApiTxpoolDtoControlTransaction);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.TypeCode == input.TypeCode ||
                    (this.TypeCode != null &&
                    this.TypeCode.Equals(input.TypeCode))
                ) && 
                (
                    this.FuelingTransaction == input.FuelingTransaction ||
                    (this.FuelingTransaction != null &&
                    this.FuelingTransaction.Equals(input.FuelingTransaction))
                ) && 
                (
                    this.Xxcustom05 == input.Xxcustom05 ||
                    (this.Xxcustom05 != null &&
                    this.Xxcustom05.Equals(input.Xxcustom05))
                ) && 
                (
                    this.Xxcustom03 == input.Xxcustom03 ||
                    (this.Xxcustom03 != null &&
                    this.Xxcustom03.Equals(input.Xxcustom03))
                ) && 
                (
                    this.Xxcustom02 == input.Xxcustom02 ||
                    (this.Xxcustom02 != null &&
                    this.Xxcustom02.Equals(input.Xxcustom02))
                ) && 
                (
                    this.Xxcustom04 == input.Xxcustom04 ||
                    (this.Xxcustom04 != null &&
                    this.Xxcustom04.Equals(input.Xxcustom04))
                ) && 
                (
                    this.PosnoSaleTransactionList == input.PosnoSaleTransactionList ||
                    this.PosnoSaleTransactionList != null &&
                    this.PosnoSaleTransactionList.SequenceEqual(input.PosnoSaleTransactionList)
                ) && 
                (
                    this.SignOnTransactionList == input.SignOnTransactionList ||
                    this.SignOnTransactionList != null &&
                    this.SignOnTransactionList.SequenceEqual(input.SignOnTransactionList)
                ) && 
                (
                    this.SignOffTransactionList == input.SignOffTransactionList ||
                    this.SignOffTransactionList != null &&
                    this.SignOffTransactionList.SequenceEqual(input.SignOffTransactionList)
                ) && 
                (
                    this.TillTenderSettlementTransactionList == input.TillTenderSettlementTransactionList ||
                    this.TillTenderSettlementTransactionList != null &&
                    this.TillTenderSettlementTransactionList.SequenceEqual(input.TillTenderSettlementTransactionList)
                ) && 
                (
                    this.StoreSafeSettlementTransactionList == input.StoreSafeSettlementTransactionList ||
                    this.StoreSafeSettlementTransactionList != null &&
                    this.StoreSafeSettlementTransactionList.SequenceEqual(input.StoreSafeSettlementTransactionList)
                ) && 
                (
                    this.DepositBagTransactionList == input.DepositBagTransactionList ||
                    this.DepositBagTransactionList != null &&
                    this.DepositBagTransactionList.SequenceEqual(input.DepositBagTransactionList)
                ) && 
                (
                    this.DepositBagSettlementTransactionList == input.DepositBagSettlementTransactionList ||
                    this.DepositBagSettlementTransactionList != null &&
                    this.DepositBagSettlementTransactionList.SequenceEqual(input.DepositBagSettlementTransactionList)
                ) && 
                (
                    this.TaxRefundTransactionList == input.TaxRefundTransactionList ||
                    this.TaxRefundTransactionList != null &&
                    this.TaxRefundTransactionList.SequenceEqual(input.TaxRefundTransactionList)
                ) && 
                (
                    this.Xxcustom01 == input.Xxcustom01 ||
                    (this.Xxcustom01 != null &&
                    this.Xxcustom01.Equals(input.Xxcustom01))
                );
        }

        /// <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.Key != null)
                    hashCode = hashCode * 59 + this.Key.GetHashCode();
                if (this.TypeCode != null)
                    hashCode = hashCode * 59 + this.TypeCode.GetHashCode();
                if (this.FuelingTransaction != null)
                    hashCode = hashCode * 59 + this.FuelingTransaction.GetHashCode();
                if (this.Xxcustom05 != null)
                    hashCode = hashCode * 59 + this.Xxcustom05.GetHashCode();
                if (this.Xxcustom03 != null)
                    hashCode = hashCode * 59 + this.Xxcustom03.GetHashCode();
                if (this.Xxcustom02 != null)
                    hashCode = hashCode * 59 + this.Xxcustom02.GetHashCode();
                if (this.Xxcustom04 != null)
                    hashCode = hashCode * 59 + this.Xxcustom04.GetHashCode();
                if (this.PosnoSaleTransactionList != null)
                    hashCode = hashCode * 59 + this.PosnoSaleTransactionList.GetHashCode();
                if (this.SignOnTransactionList != null)
                    hashCode = hashCode * 59 + this.SignOnTransactionList.GetHashCode();
                if (this.SignOffTransactionList != null)
                    hashCode = hashCode * 59 + this.SignOffTransactionList.GetHashCode();
                if (this.TillTenderSettlementTransactionList != null)
                    hashCode = hashCode * 59 + this.TillTenderSettlementTransactionList.GetHashCode();
                if (this.StoreSafeSettlementTransactionList != null)
                    hashCode = hashCode * 59 + this.StoreSafeSettlementTransactionList.GetHashCode();
                if (this.DepositBagTransactionList != null)
                    hashCode = hashCode * 59 + this.DepositBagTransactionList.GetHashCode();
                if (this.DepositBagSettlementTransactionList != null)
                    hashCode = hashCode * 59 + this.DepositBagSettlementTransactionList.GetHashCode();
                if (this.TaxRefundTransactionList != null)
                    hashCode = hashCode * 59 + this.TaxRefundTransactionList.GetHashCode();
                if (this.Xxcustom01 != null)
                    hashCode = hashCode * 59 + this.Xxcustom01.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;
        }
    }

}
