/* 
 * 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>
    /// CheckTenderLineItem &lt;emph&gt;undocumented&lt;/emph&gt;
    /// </summary>
    [DataContract]
    public partial class ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem :  IEquatable<ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem" /> class.
        /// </summary>
        [JsonConstructorAttribute]
        protected ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem() { }
        /// <summary>
        /// Initializes a new instance of the <see cref="ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem" /> class.
        /// </summary>
        /// <param name="key">&lt;p&gt;Getter for inner key class.&lt;/p&gt; (required).</param>
        /// <param name="fullMICR">The complete string of characters read from the MICR (Magnetic Ink Character Recognition) strip.Content varies by Country and/or Financial Institution but it usually contains BankID, CheckAccountNumber and CheckSequenceNumber - but there may be more data encoded in the MICR..</param>
        /// <param name="checkSequenceNumber">A unique sequence number relating to a particular check authorization..</param>
        /// <param name="adjudicationCode">A code to denote that approval has been received from the authorization center..</param>
        /// <param name="checkCardNumber">The number from a bank issued card guaranteeing checks up to a certain value..</param>
        /// <param name="bankID">The unique identifier of the bank or third party authorization center..</param>
        /// <param name="checkAccountNumber">The check account number.</param>
        /// <param name="bankIdentifierCode">Bank Identifier Code. Also known as SWIFT Code..</param>
        /// <param name="internationalBankAccountNumber">International Bank Account Number.</param>
        /// <param name="checkNumber">A unique sequence number relating to a particular check authorization..</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="xxcustom01">Customizable information.</param>
        public ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem(ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItemKey key = default(ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItemKey), string fullMICR = default(string), int? checkSequenceNumber = default(int?), string adjudicationCode = default(string), string checkCardNumber = default(string), string bankID = default(string), string checkAccountNumber = default(string), string bankIdentifierCode = default(string), string internationalBankAccountNumber = default(string), string checkNumber = default(string), string xxcustom05 = 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 ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem and cannot be null");
            }
            else
            {
                this.Key = key;
            }
            this.FullMICR = fullMICR;
            this.CheckSequenceNumber = checkSequenceNumber;
            this.AdjudicationCode = adjudicationCode;
            this.CheckCardNumber = checkCardNumber;
            this.BankID = bankID;
            this.CheckAccountNumber = checkAccountNumber;
            this.BankIdentifierCode = bankIdentifierCode;
            this.InternationalBankAccountNumber = internationalBankAccountNumber;
            this.CheckNumber = checkNumber;
            this.Xxcustom05 = xxcustom05;
            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 ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItemKey Key { get; set; }

        /// <summary>
        /// The complete string of characters read from the MICR (Magnetic Ink Character Recognition) strip.Content varies by Country and/or Financial Institution but it usually contains BankID, CheckAccountNumber and CheckSequenceNumber - but there may be more data encoded in the MICR.
        /// </summary>
        /// <value>The complete string of characters read from the MICR (Magnetic Ink Character Recognition) strip.Content varies by Country and/or Financial Institution but it usually contains BankID, CheckAccountNumber and CheckSequenceNumber - but there may be more data encoded in the MICR.</value>
        [DataMember(Name="fullMICR", EmitDefaultValue=false)]
        public string FullMICR { get; set; }

        /// <summary>
        /// A unique sequence number relating to a particular check authorization.
        /// </summary>
        /// <value>A unique sequence number relating to a particular check authorization.</value>
        [DataMember(Name="checkSequenceNumber", EmitDefaultValue=false)]
        public int? CheckSequenceNumber { get; set; }

        /// <summary>
        /// A code to denote that approval has been received from the authorization center.
        /// </summary>
        /// <value>A code to denote that approval has been received from the authorization center.</value>
        [DataMember(Name="adjudicationCode", EmitDefaultValue=false)]
        public string AdjudicationCode { get; set; }

        /// <summary>
        /// The number from a bank issued card guaranteeing checks up to a certain value.
        /// </summary>
        /// <value>The number from a bank issued card guaranteeing checks up to a certain value.</value>
        [DataMember(Name="checkCardNumber", EmitDefaultValue=false)]
        public string CheckCardNumber { get; set; }

        /// <summary>
        /// The unique identifier of the bank or third party authorization center.
        /// </summary>
        /// <value>The unique identifier of the bank or third party authorization center.</value>
        [DataMember(Name="bankID", EmitDefaultValue=false)]
        public string BankID { get; set; }

        /// <summary>
        /// The check account number
        /// </summary>
        /// <value>The check account number</value>
        [DataMember(Name="checkAccountNumber", EmitDefaultValue=false)]
        public string CheckAccountNumber { get; set; }

        /// <summary>
        /// Bank Identifier Code. Also known as SWIFT Code.
        /// </summary>
        /// <value>Bank Identifier Code. Also known as SWIFT Code.</value>
        [DataMember(Name="bankIdentifierCode", EmitDefaultValue=false)]
        public string BankIdentifierCode { get; set; }

        /// <summary>
        /// International Bank Account Number
        /// </summary>
        /// <value>International Bank Account Number</value>
        [DataMember(Name="internationalBankAccountNumber", EmitDefaultValue=false)]
        public string InternationalBankAccountNumber { get; set; }

        /// <summary>
        /// A unique sequence number relating to a particular check authorization.
        /// </summary>
        /// <value>A unique sequence number relating to a particular check authorization.</value>
        [DataMember(Name="checkNumber", EmitDefaultValue=false)]
        public string CheckNumber { 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>
        /// 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 ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem {\n");
            sb.Append("  Key: ").Append(Key).Append("\n");
            sb.Append("  FullMICR: ").Append(FullMICR).Append("\n");
            sb.Append("  CheckSequenceNumber: ").Append(CheckSequenceNumber).Append("\n");
            sb.Append("  AdjudicationCode: ").Append(AdjudicationCode).Append("\n");
            sb.Append("  CheckCardNumber: ").Append(CheckCardNumber).Append("\n");
            sb.Append("  BankID: ").Append(BankID).Append("\n");
            sb.Append("  CheckAccountNumber: ").Append(CheckAccountNumber).Append("\n");
            sb.Append("  BankIdentifierCode: ").Append(BankIdentifierCode).Append("\n");
            sb.Append("  InternationalBankAccountNumber: ").Append(InternationalBankAccountNumber).Append("\n");
            sb.Append("  CheckNumber: ").Append(CheckNumber).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("  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 ComGkSoftwareGkrApiTxpoolDtoCheckTenderLineItem);
        }

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

            return 
                (
                    this.Key == input.Key ||
                    (this.Key != null &&
                    this.Key.Equals(input.Key))
                ) && 
                (
                    this.FullMICR == input.FullMICR ||
                    (this.FullMICR != null &&
                    this.FullMICR.Equals(input.FullMICR))
                ) && 
                (
                    this.CheckSequenceNumber == input.CheckSequenceNumber ||
                    (this.CheckSequenceNumber != null &&
                    this.CheckSequenceNumber.Equals(input.CheckSequenceNumber))
                ) && 
                (
                    this.AdjudicationCode == input.AdjudicationCode ||
                    (this.AdjudicationCode != null &&
                    this.AdjudicationCode.Equals(input.AdjudicationCode))
                ) && 
                (
                    this.CheckCardNumber == input.CheckCardNumber ||
                    (this.CheckCardNumber != null &&
                    this.CheckCardNumber.Equals(input.CheckCardNumber))
                ) && 
                (
                    this.BankID == input.BankID ||
                    (this.BankID != null &&
                    this.BankID.Equals(input.BankID))
                ) && 
                (
                    this.CheckAccountNumber == input.CheckAccountNumber ||
                    (this.CheckAccountNumber != null &&
                    this.CheckAccountNumber.Equals(input.CheckAccountNumber))
                ) && 
                (
                    this.BankIdentifierCode == input.BankIdentifierCode ||
                    (this.BankIdentifierCode != null &&
                    this.BankIdentifierCode.Equals(input.BankIdentifierCode))
                ) && 
                (
                    this.InternationalBankAccountNumber == input.InternationalBankAccountNumber ||
                    (this.InternationalBankAccountNumber != null &&
                    this.InternationalBankAccountNumber.Equals(input.InternationalBankAccountNumber))
                ) && 
                (
                    this.CheckNumber == input.CheckNumber ||
                    (this.CheckNumber != null &&
                    this.CheckNumber.Equals(input.CheckNumber))
                ) && 
                (
                    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.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.FullMICR != null)
                    hashCode = hashCode * 59 + this.FullMICR.GetHashCode();
                if (this.CheckSequenceNumber != null)
                    hashCode = hashCode * 59 + this.CheckSequenceNumber.GetHashCode();
                if (this.AdjudicationCode != null)
                    hashCode = hashCode * 59 + this.AdjudicationCode.GetHashCode();
                if (this.CheckCardNumber != null)
                    hashCode = hashCode * 59 + this.CheckCardNumber.GetHashCode();
                if (this.BankID != null)
                    hashCode = hashCode * 59 + this.BankID.GetHashCode();
                if (this.CheckAccountNumber != null)
                    hashCode = hashCode * 59 + this.CheckAccountNumber.GetHashCode();
                if (this.BankIdentifierCode != null)
                    hashCode = hashCode * 59 + this.BankIdentifierCode.GetHashCode();
                if (this.InternationalBankAccountNumber != null)
                    hashCode = hashCode * 59 + this.InternationalBankAccountNumber.GetHashCode();
                if (this.CheckNumber != null)
                    hashCode = hashCode * 59 + this.CheckNumber.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.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;
        }
    }

}
