/* 
 * 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>
    /// DepositBagSettlementTenderDetail &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="tenderDescription">Description of the tender.</param>
        /// <param name="tenderClassCode">The tender class code from master data.</param>
        /// <param name="currencySymbol">The currency symbol.</param>
        /// <param name="exchangeRate">The quantitative conversion factor between foreign currency and local currency. &lt;br&gt;Fixed decimal precision expected, definition of used precision: double(14, 9). Be aware of this and round value!.</param>
        /// <param name="exchangeRateMultiplyFlag">Determines whether inside the calculation foreign currency -&gt; local currency the amount is to be multiplied with (true) or divided by (false) the ExchangeRate factor  (required).</param>
        /// <param name="unitCountRequiredFlag">A flag to signify that specific tender type units need to be counted and recorded by the operator prior to a pickup.  (required).</param>
        /// <param name="amountCountRequiredFlag">A flag to signify that a specific tender type amount needs to be counted and recorded by the operator prior to a pickup.  (required).</param>
        /// <param name="openBalanceAmount">The opening tender balance (required).</param>
        /// <param name="openMediaUnitQuantity">The opening number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.).</param>
        /// <param name="closeBalanceAmount">The closing tender balance in main currencyCorresponds to the target values. (required).</param>
        /// <param name="foreignCurrencyCloseBalanceAmount">The closing tender balance expressed in the currency of the tender&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(16, 5). Be aware of this and round value!.</param>
        /// <param name="closeMediaUnitQuantity">The closing number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.).</param>
        /// <param name="countedBalanceAmount">The counted tender balance in main currency (required).</param>
        /// <param name="foreignCurrencyCountedBalanceAmount">The counted tender balance expressed in the currency of the tender&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(16, 5). Be aware of this and round value!.</param>
        /// <param name="countedMediaUnitQuantity">The counted number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.).</param>
        /// <param name="overUnderBalanceAmount">The variance between closing balance amount and counted balance amount by subtracting the CloseBalanceAmount from the CountedBalanceAmount (required).</param>
        /// <param name="overUnderMediaUnitQuantity">The variance between closing media unit quantity and counted media unit quantity by subtracting the CloseMediaUnitQuantity from the CountedMediaUnitQuantity..</param>
        /// <param name="depositBagSettlementTenderDenominationList">denomination list for counted values.</param>
        /// <param name="xxcustom05">Customizable information .</param>
        /// <param name="isocurrencyCode">The currency code of the tender.</param>
        /// <param name="xxcustom03">Customizable information .</param>
        /// <param name="xxcustom02">Customizable information .</param>
        /// <param name="xxcustom04">Customizable information .</param>
        /// <param name="xxcustom01">Customizable information .</param>
        public ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail(ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetailKey key = default(ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetailKey), string tenderDescription = default(string), string tenderClassCode = default(string), string currencySymbol = default(string), double? exchangeRate = default(double?), bool? exchangeRateMultiplyFlag = default(bool?), bool? unitCountRequiredFlag = default(bool?), bool? amountCountRequiredFlag = default(bool?), double? openBalanceAmount = default(double?), int? openMediaUnitQuantity = default(int?), double? closeBalanceAmount = default(double?), double? foreignCurrencyCloseBalanceAmount = default(double?), int? closeMediaUnitQuantity = default(int?), double? countedBalanceAmount = default(double?), double? foreignCurrencyCountedBalanceAmount = default(double?), int? countedMediaUnitQuantity = default(int?), double? overUnderBalanceAmount = default(double?), int? overUnderMediaUnitQuantity = default(int?), List<ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDenomination> depositBagSettlementTenderDenominationList = default(List<ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDenomination>), string xxcustom05 = default(string), string isocurrencyCode = default(string), string xxcustom03 = default(string), string xxcustom02 = default(string), string xxcustom04 = default(string), string xxcustom01 = default(string))
        {
            // to ensure "key" is required (not null)
            if (key == null)
            {
                throw new InvalidDataException("key is a required property for ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            // to ensure "exchangeRateMultiplyFlag" is required (not null)
            if (exchangeRateMultiplyFlag == null)
            {
                throw new InvalidDataException("exchangeRateMultiplyFlag is a required property for ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail and cannot be null");
            }
            else
            {
                this.ExchangeRateMultiplyFlag = exchangeRateMultiplyFlag;
            }
            // to ensure "unitCountRequiredFlag" is required (not null)
            if (unitCountRequiredFlag == null)
            {
                throw new InvalidDataException("unitCountRequiredFlag is a required property for ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail and cannot be null");
            }
            else
            {
                this.UnitCountRequiredFlag = unitCountRequiredFlag;
            }
            // to ensure "amountCountRequiredFlag" is required (not null)
            if (amountCountRequiredFlag == null)
            {
                throw new InvalidDataException("amountCountRequiredFlag is a required property for ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail and cannot be null");
            }
            else
            {
                this.AmountCountRequiredFlag = amountCountRequiredFlag;
            }
            // to ensure "openBalanceAmount" is required (not null)
            if (openBalanceAmount == null)
            {
                throw new InvalidDataException("openBalanceAmount is a required property for ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail and cannot be null");
            }
            else
            {
                this.OpenBalanceAmount = openBalanceAmount;
            }
            // to ensure "closeBalanceAmount" is required (not null)
            if (closeBalanceAmount == null)
            {
                throw new InvalidDataException("closeBalanceAmount is a required property for ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail and cannot be null");
            }
            else
            {
                this.CloseBalanceAmount = closeBalanceAmount;
            }
            // to ensure "countedBalanceAmount" is required (not null)
            if (countedBalanceAmount == null)
            {
                throw new InvalidDataException("countedBalanceAmount is a required property for ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail and cannot be null");
            }
            else
            {
                this.CountedBalanceAmount = countedBalanceAmount;
            }
            // to ensure "overUnderBalanceAmount" is required (not null)
            if (overUnderBalanceAmount == null)
            {
                throw new InvalidDataException("overUnderBalanceAmount is a required property for ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail and cannot be null");
            }
            else
            {
                this.OverUnderBalanceAmount = overUnderBalanceAmount;
            }
            this.TenderDescription = tenderDescription;
            this.TenderClassCode = tenderClassCode;
            this.CurrencySymbol = currencySymbol;
            this.ExchangeRate = exchangeRate;
            this.OpenMediaUnitQuantity = openMediaUnitQuantity;
            this.ForeignCurrencyCloseBalanceAmount = foreignCurrencyCloseBalanceAmount;
            this.CloseMediaUnitQuantity = closeMediaUnitQuantity;
            this.ForeignCurrencyCountedBalanceAmount = foreignCurrencyCountedBalanceAmount;
            this.CountedMediaUnitQuantity = countedMediaUnitQuantity;
            this.OverUnderMediaUnitQuantity = overUnderMediaUnitQuantity;
            this.DepositBagSettlementTenderDenominationList = depositBagSettlementTenderDenominationList;
            this.Xxcustom05 = xxcustom05;
            this.IsocurrencyCode = isocurrencyCode;
            this.Xxcustom03 = xxcustom03;
            this.Xxcustom02 = xxcustom02;
            this.Xxcustom04 = xxcustom04;
            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 ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetailKey Key { get; set; }

        /// <summary>
        /// Description of the tender
        /// </summary>
        /// <value>Description of the tender</value>
        [DataMember(Name="tenderDescription", EmitDefaultValue=false)]
        public string TenderDescription { get; set; }

        /// <summary>
        /// The tender class code from master data
        /// </summary>
        /// <value>The tender class code from master data</value>
        [DataMember(Name="tenderClassCode", EmitDefaultValue=false)]
        public string TenderClassCode { get; set; }

        /// <summary>
        /// The currency symbol
        /// </summary>
        /// <value>The currency symbol</value>
        [DataMember(Name="currencySymbol", EmitDefaultValue=false)]
        public string CurrencySymbol { get; set; }

        /// <summary>
        /// The quantitative conversion factor between foreign currency and local currency. &lt;br&gt;Fixed decimal precision expected, definition of used precision: double(14, 9). Be aware of this and round value!
        /// </summary>
        /// <value>The quantitative conversion factor between foreign currency and local currency. &lt;br&gt;Fixed decimal precision expected, definition of used precision: double(14, 9). Be aware of this and round value!</value>
        [DataMember(Name="exchangeRate", EmitDefaultValue=false)]
        public double? ExchangeRate { get; set; }

        /// <summary>
        /// Determines whether inside the calculation foreign currency -&gt; local currency the amount is to be multiplied with (true) or divided by (false) the ExchangeRate factor 
        /// </summary>
        /// <value>Determines whether inside the calculation foreign currency -&gt; local currency the amount is to be multiplied with (true) or divided by (false) the ExchangeRate factor </value>
        [DataMember(Name="exchangeRateMultiplyFlag", EmitDefaultValue=false)]
        public bool? ExchangeRateMultiplyFlag { get; set; }

        /// <summary>
        /// A flag to signify that specific tender type units need to be counted and recorded by the operator prior to a pickup. 
        /// </summary>
        /// <value>A flag to signify that specific tender type units need to be counted and recorded by the operator prior to a pickup. </value>
        [DataMember(Name="unitCountRequiredFlag", EmitDefaultValue=false)]
        public bool? UnitCountRequiredFlag { get; set; }

        /// <summary>
        /// A flag to signify that a specific tender type amount needs to be counted and recorded by the operator prior to a pickup. 
        /// </summary>
        /// <value>A flag to signify that a specific tender type amount needs to be counted and recorded by the operator prior to a pickup. </value>
        [DataMember(Name="amountCountRequiredFlag", EmitDefaultValue=false)]
        public bool? AmountCountRequiredFlag { get; set; }

        /// <summary>
        /// The opening tender balance
        /// </summary>
        /// <value>The opening tender balance</value>
        [DataMember(Name="openBalanceAmount", EmitDefaultValue=false)]
        public double? OpenBalanceAmount { get; set; }

        /// <summary>
        /// The opening number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.)
        /// </summary>
        /// <value>The opening number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.)</value>
        [DataMember(Name="openMediaUnitQuantity", EmitDefaultValue=false)]
        public int? OpenMediaUnitQuantity { get; set; }

        /// <summary>
        /// The closing tender balance in main currencyCorresponds to the target values.
        /// </summary>
        /// <value>The closing tender balance in main currencyCorresponds to the target values.</value>
        [DataMember(Name="closeBalanceAmount", EmitDefaultValue=false)]
        public double? CloseBalanceAmount { get; set; }

        /// <summary>
        /// The closing tender balance expressed in the currency of the tender&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(16, 5). Be aware of this and round value!
        /// </summary>
        /// <value>The closing tender balance expressed in the currency of the tender&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(16, 5). Be aware of this and round value!</value>
        [DataMember(Name="foreignCurrencyCloseBalanceAmount", EmitDefaultValue=false)]
        public double? ForeignCurrencyCloseBalanceAmount { get; set; }

        /// <summary>
        /// The closing number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.)
        /// </summary>
        /// <value>The closing number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.)</value>
        [DataMember(Name="closeMediaUnitQuantity", EmitDefaultValue=false)]
        public int? CloseMediaUnitQuantity { get; set; }

        /// <summary>
        /// The counted tender balance in main currency
        /// </summary>
        /// <value>The counted tender balance in main currency</value>
        [DataMember(Name="countedBalanceAmount", EmitDefaultValue=false)]
        public double? CountedBalanceAmount { get; set; }

        /// <summary>
        /// The counted tender balance expressed in the currency of the tender&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(16, 5). Be aware of this and round value!
        /// </summary>
        /// <value>The counted tender balance expressed in the currency of the tender&lt;br&gt;Fixed decimal precision expected, definition of used precision: double(16, 5). Be aware of this and round value!</value>
        [DataMember(Name="foreignCurrencyCountedBalanceAmount", EmitDefaultValue=false)]
        public double? ForeignCurrencyCountedBalanceAmount { get; set; }

        /// <summary>
        /// The counted number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.)
        /// </summary>
        /// <value>The counted number of discrete tender media (e.g. currency bills, coins, credit/debit card signed slips, etc.)</value>
        [DataMember(Name="countedMediaUnitQuantity", EmitDefaultValue=false)]
        public int? CountedMediaUnitQuantity { get; set; }

        /// <summary>
        /// The variance between closing balance amount and counted balance amount by subtracting the CloseBalanceAmount from the CountedBalanceAmount
        /// </summary>
        /// <value>The variance between closing balance amount and counted balance amount by subtracting the CloseBalanceAmount from the CountedBalanceAmount</value>
        [DataMember(Name="overUnderBalanceAmount", EmitDefaultValue=false)]
        public double? OverUnderBalanceAmount { get; set; }

        /// <summary>
        /// The variance between closing media unit quantity and counted media unit quantity by subtracting the CloseMediaUnitQuantity from the CountedMediaUnitQuantity.
        /// </summary>
        /// <value>The variance between closing media unit quantity and counted media unit quantity by subtracting the CloseMediaUnitQuantity from the CountedMediaUnitQuantity.</value>
        [DataMember(Name="overUnderMediaUnitQuantity", EmitDefaultValue=false)]
        public int? OverUnderMediaUnitQuantity { get; set; }

        /// <summary>
        /// denomination list for counted values
        /// </summary>
        /// <value>denomination list for counted values</value>
        [DataMember(Name="depositBagSettlementTenderDenominationList", EmitDefaultValue=false)]
        public List<ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDenomination> DepositBagSettlementTenderDenominationList { get; set; }

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

        /// <summary>
        /// The currency code of the tender
        /// </summary>
        /// <value>The currency code of the tender</value>
        [DataMember(Name="isocurrencyCode", EmitDefaultValue=false)]
        public string IsocurrencyCode { 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>
        /// 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 ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  TenderDescription: ").Append(TenderDescription).Append("\n");
            sb.Append("  TenderClassCode: ").Append(TenderClassCode).Append("\n");
            sb.Append("  CurrencySymbol: ").Append(CurrencySymbol).Append("\n");
            sb.Append("  ExchangeRate: ").Append(ExchangeRate).Append("\n");
            sb.Append("  ExchangeRateMultiplyFlag: ").Append(ExchangeRateMultiplyFlag).Append("\n");
            sb.Append("  UnitCountRequiredFlag: ").Append(UnitCountRequiredFlag).Append("\n");
            sb.Append("  AmountCountRequiredFlag: ").Append(AmountCountRequiredFlag).Append("\n");
            sb.Append("  OpenBalanceAmount: ").Append(OpenBalanceAmount).Append("\n");
            sb.Append("  OpenMediaUnitQuantity: ").Append(OpenMediaUnitQuantity).Append("\n");
            sb.Append("  CloseBalanceAmount: ").Append(CloseBalanceAmount).Append("\n");
            sb.Append("  ForeignCurrencyCloseBalanceAmount: ").Append(ForeignCurrencyCloseBalanceAmount).Append("\n");
            sb.Append("  CloseMediaUnitQuantity: ").Append(CloseMediaUnitQuantity).Append("\n");
            sb.Append("  CountedBalanceAmount: ").Append(CountedBalanceAmount).Append("\n");
            sb.Append("  ForeignCurrencyCountedBalanceAmount: ").Append(ForeignCurrencyCountedBalanceAmount).Append("\n");
            sb.Append("  CountedMediaUnitQuantity: ").Append(CountedMediaUnitQuantity).Append("\n");
            sb.Append("  OverUnderBalanceAmount: ").Append(OverUnderBalanceAmount).Append("\n");
            sb.Append("  OverUnderMediaUnitQuantity: ").Append(OverUnderMediaUnitQuantity).Append("\n");
            sb.Append("  DepositBagSettlementTenderDenominationList: ").Append(DepositBagSettlementTenderDenominationList).Append("\n");
            sb.Append("  Xxcustom05: ").Append(Xxcustom05).Append("\n");
            sb.Append("  IsocurrencyCode: ").Append(IsocurrencyCode).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("  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 ComGkSoftwareGkrApiTxpoolDtoDepositBagSettlementTenderDetail);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.TenderDescription == input.TenderDescription ||
                    (this.TenderDescription != null &&
                    this.TenderDescription.Equals(input.TenderDescription))
                ) && 
                (
                    this.TenderClassCode == input.TenderClassCode ||
                    (this.TenderClassCode != null &&
                    this.TenderClassCode.Equals(input.TenderClassCode))
                ) && 
                (
                    this.CurrencySymbol == input.CurrencySymbol ||
                    (this.CurrencySymbol != null &&
                    this.CurrencySymbol.Equals(input.CurrencySymbol))
                ) && 
                (
                    this.ExchangeRate == input.ExchangeRate ||
                    (this.ExchangeRate != null &&
                    this.ExchangeRate.Equals(input.ExchangeRate))
                ) && 
                (
                    this.ExchangeRateMultiplyFlag == input.ExchangeRateMultiplyFlag ||
                    (this.ExchangeRateMultiplyFlag != null &&
                    this.ExchangeRateMultiplyFlag.Equals(input.ExchangeRateMultiplyFlag))
                ) && 
                (
                    this.UnitCountRequiredFlag == input.UnitCountRequiredFlag ||
                    (this.UnitCountRequiredFlag != null &&
                    this.UnitCountRequiredFlag.Equals(input.UnitCountRequiredFlag))
                ) && 
                (
                    this.AmountCountRequiredFlag == input.AmountCountRequiredFlag ||
                    (this.AmountCountRequiredFlag != null &&
                    this.AmountCountRequiredFlag.Equals(input.AmountCountRequiredFlag))
                ) && 
                (
                    this.OpenBalanceAmount == input.OpenBalanceAmount ||
                    (this.OpenBalanceAmount != null &&
                    this.OpenBalanceAmount.Equals(input.OpenBalanceAmount))
                ) && 
                (
                    this.OpenMediaUnitQuantity == input.OpenMediaUnitQuantity ||
                    (this.OpenMediaUnitQuantity != null &&
                    this.OpenMediaUnitQuantity.Equals(input.OpenMediaUnitQuantity))
                ) && 
                (
                    this.CloseBalanceAmount == input.CloseBalanceAmount ||
                    (this.CloseBalanceAmount != null &&
                    this.CloseBalanceAmount.Equals(input.CloseBalanceAmount))
                ) && 
                (
                    this.ForeignCurrencyCloseBalanceAmount == input.ForeignCurrencyCloseBalanceAmount ||
                    (this.ForeignCurrencyCloseBalanceAmount != null &&
                    this.ForeignCurrencyCloseBalanceAmount.Equals(input.ForeignCurrencyCloseBalanceAmount))
                ) && 
                (
                    this.CloseMediaUnitQuantity == input.CloseMediaUnitQuantity ||
                    (this.CloseMediaUnitQuantity != null &&
                    this.CloseMediaUnitQuantity.Equals(input.CloseMediaUnitQuantity))
                ) && 
                (
                    this.CountedBalanceAmount == input.CountedBalanceAmount ||
                    (this.CountedBalanceAmount != null &&
                    this.CountedBalanceAmount.Equals(input.CountedBalanceAmount))
                ) && 
                (
                    this.ForeignCurrencyCountedBalanceAmount == input.ForeignCurrencyCountedBalanceAmount ||
                    (this.ForeignCurrencyCountedBalanceAmount != null &&
                    this.ForeignCurrencyCountedBalanceAmount.Equals(input.ForeignCurrencyCountedBalanceAmount))
                ) && 
                (
                    this.CountedMediaUnitQuantity == input.CountedMediaUnitQuantity ||
                    (this.CountedMediaUnitQuantity != null &&
                    this.CountedMediaUnitQuantity.Equals(input.CountedMediaUnitQuantity))
                ) && 
                (
                    this.OverUnderBalanceAmount == input.OverUnderBalanceAmount ||
                    (this.OverUnderBalanceAmount != null &&
                    this.OverUnderBalanceAmount.Equals(input.OverUnderBalanceAmount))
                ) && 
                (
                    this.OverUnderMediaUnitQuantity == input.OverUnderMediaUnitQuantity ||
                    (this.OverUnderMediaUnitQuantity != null &&
                    this.OverUnderMediaUnitQuantity.Equals(input.OverUnderMediaUnitQuantity))
                ) && 
                (
                    this.DepositBagSettlementTenderDenominationList == input.DepositBagSettlementTenderDenominationList ||
                    this.DepositBagSettlementTenderDenominationList != null &&
                    this.DepositBagSettlementTenderDenominationList.SequenceEqual(input.DepositBagSettlementTenderDenominationList)
                ) && 
                (
                    this.Xxcustom05 == input.Xxcustom05 ||
                    (this.Xxcustom05 != null &&
                    this.Xxcustom05.Equals(input.Xxcustom05))
                ) && 
                (
                    this.IsocurrencyCode == input.IsocurrencyCode ||
                    (this.IsocurrencyCode != null &&
                    this.IsocurrencyCode.Equals(input.IsocurrencyCode))
                ) && 
                (
                    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.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.TenderDescription != null)
                    hashCode = hashCode * 59 + this.TenderDescription.GetHashCode();
                if (this.TenderClassCode != null)
                    hashCode = hashCode * 59 + this.TenderClassCode.GetHashCode();
                if (this.CurrencySymbol != null)
                    hashCode = hashCode * 59 + this.CurrencySymbol.GetHashCode();
                if (this.ExchangeRate != null)
                    hashCode = hashCode * 59 + this.ExchangeRate.GetHashCode();
                if (this.ExchangeRateMultiplyFlag != null)
                    hashCode = hashCode * 59 + this.ExchangeRateMultiplyFlag.GetHashCode();
                if (this.UnitCountRequiredFlag != null)
                    hashCode = hashCode * 59 + this.UnitCountRequiredFlag.GetHashCode();
                if (this.AmountCountRequiredFlag != null)
                    hashCode = hashCode * 59 + this.AmountCountRequiredFlag.GetHashCode();
                if (this.OpenBalanceAmount != null)
                    hashCode = hashCode * 59 + this.OpenBalanceAmount.GetHashCode();
                if (this.OpenMediaUnitQuantity != null)
                    hashCode = hashCode * 59 + this.OpenMediaUnitQuantity.GetHashCode();
                if (this.CloseBalanceAmount != null)
                    hashCode = hashCode * 59 + this.CloseBalanceAmount.GetHashCode();
                if (this.ForeignCurrencyCloseBalanceAmount != null)
                    hashCode = hashCode * 59 + this.ForeignCurrencyCloseBalanceAmount.GetHashCode();
                if (this.CloseMediaUnitQuantity != null)
                    hashCode = hashCode * 59 + this.CloseMediaUnitQuantity.GetHashCode();
                if (this.CountedBalanceAmount != null)
                    hashCode = hashCode * 59 + this.CountedBalanceAmount.GetHashCode();
                if (this.ForeignCurrencyCountedBalanceAmount != null)
                    hashCode = hashCode * 59 + this.ForeignCurrencyCountedBalanceAmount.GetHashCode();
                if (this.CountedMediaUnitQuantity != null)
                    hashCode = hashCode * 59 + this.CountedMediaUnitQuantity.GetHashCode();
                if (this.OverUnderBalanceAmount != null)
                    hashCode = hashCode * 59 + this.OverUnderBalanceAmount.GetHashCode();
                if (this.OverUnderMediaUnitQuantity != null)
                    hashCode = hashCode * 59 + this.OverUnderMediaUnitQuantity.GetHashCode();
                if (this.DepositBagSettlementTenderDenominationList != null)
                    hashCode = hashCode * 59 + this.DepositBagSettlementTenderDenominationList.GetHashCode();
                if (this.Xxcustom05 != null)
                    hashCode = hashCode * 59 + this.Xxcustom05.GetHashCode();
                if (this.IsocurrencyCode != null)
                    hashCode = hashCode * 59 + this.IsocurrencyCode.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.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;
        }
    }

}
