<gh_stars>0/*
 * DOJAH APIs
 *
 * Use Dojah to verify, onboard and manage user identity across Africa!
 *
 * The version of the OpenAPI document: 1.0.0
 * Generated by: https://konfigthis.com
 */


using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.IO;
using System.Runtime.Serialization;
using System.Text;
using System.Text.RegularExpressions;
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using Newtonsoft.Json.Linq;
using System.ComponentModel.DataAnnotations;
using OpenAPIDateConverter = Dojah.Net.Client.OpenAPIDateConverter;

namespace Dojah.Net.Model
{
    /// <summary>
    /// GetAccountTransactionsResponseEntityTransactionsInner
    /// </summary>
    [DataContract(Name = "GetAccountTransactionsResponse_entity_transactions_inner")]
    public partial class GetAccountTransactionsResponseEntityTransactionsInner : IEquatable<GetAccountTransactionsResponseEntityTransactionsInner>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetAccountTransactionsResponseEntityTransactionsInner" /> class.
        /// </summary>
        /// <param name="id">id.</param>
        /// <param name="transactionDate">transactionDate.</param>
        /// <param name="valueDate">valueDate.</param>
        /// <param name="transType">transType.</param>
        /// <param name="bankName">bankName.</param>
        /// <param name="amount">amount.</param>
        /// <param name="reference">reference.</param>
        /// <param name="narration">narration.</param>
        public GetAccountTransactionsResponseEntityTransactionsInner(decimal id = default(decimal), string transactionDate = default(string), string valueDate = default(string), string transType = default(string), string bankName = default(string), string amount = default(string), string reference = default(string), string narration = default(string))
        {
            this.Id = id;
            this.TransactionDate = transactionDate;
            this.ValueDate = valueDate;
            this.TransType = transType;
            this.BankName = bankName;
            this.Amount = amount;
            this.Reference = reference;
            this.Narration = narration;
        }

        /// <summary>
        /// Gets or Sets Id
        /// </summary>
        [DataMember(Name = "id", EmitDefaultValue = false)]
        public decimal Id { get; set; }

        /// <summary>
        /// Gets or Sets TransactionDate
        /// </summary>
        [DataMember(Name = "transaction_date", EmitDefaultValue = false)]
        public string TransactionDate { get; set; }

        /// <summary>
        /// Gets or Sets ValueDate
        /// </summary>
        [DataMember(Name = "value_date", EmitDefaultValue = false)]
        public string ValueDate { get; set; }

        /// <summary>
        /// Gets or Sets TransType
        /// </summary>
        [DataMember(Name = "trans_type", EmitDefaultValue = false)]
        public string TransType { get; set; }

        /// <summary>
        /// Gets or Sets BankName
        /// </summary>
        [DataMember(Name = "bank_name", EmitDefaultValue = false)]
        public string BankName { get; set; }

        /// <summary>
        /// Gets or Sets Amount
        /// </summary>
        [DataMember(Name = "amount", EmitDefaultValue = false)]
        public string Amount { get; set; }

        /// <summary>
        /// Gets or Sets Reference
        /// </summary>
        [DataMember(Name = "reference", EmitDefaultValue = false)]
        public string Reference { get; set; }

        /// <summary>
        /// Gets or Sets Narration
        /// </summary>
        [DataMember(Name = "narration", EmitDefaultValue = false)]
        public string Narration { get; set; }

        /// <summary>
        /// Returns the string presentation of the object
        /// </summary>
        /// <returns>String presentation of the object</returns>
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("class GetAccountTransactionsResponseEntityTransactionsInner {\n");
            sb.Append("  Id: ").Append(Id).Append("\n");
            sb.Append("  TransactionDate: ").Append(TransactionDate).Append("\n");
            sb.Append("  ValueDate: ").Append(ValueDate).Append("\n");
            sb.Append("  TransType: ").Append(TransType).Append("\n");
            sb.Append("  BankName: ").Append(BankName).Append("\n");
            sb.Append("  Amount: ").Append(Amount).Append("\n");
            sb.Append("  Reference: ").Append(Reference).Append("\n");
            sb.Append("  Narration: ").Append(Narration).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 Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.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 GetAccountTransactionsResponseEntityTransactionsInner);
        }

        /// <summary>
        /// Returns true if GetAccountTransactionsResponseEntityTransactionsInner instances are equal
        /// </summary>
        /// <param name="input">Instance of GetAccountTransactionsResponseEntityTransactionsInner to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GetAccountTransactionsResponseEntityTransactionsInner input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Id == input.Id ||
                    this.Id.Equals(input.Id)
                ) && 
                (
                    this.TransactionDate == input.TransactionDate ||
                    (this.TransactionDate != null &&
                    this.TransactionDate.Equals(input.TransactionDate))
                ) && 
                (
                    this.ValueDate == input.ValueDate ||
                    (this.ValueDate != null &&
                    this.ValueDate.Equals(input.ValueDate))
                ) && 
                (
                    this.TransType == input.TransType ||
                    (this.TransType != null &&
                    this.TransType.Equals(input.TransType))
                ) && 
                (
                    this.BankName == input.BankName ||
                    (this.BankName != null &&
                    this.BankName.Equals(input.BankName))
                ) && 
                (
                    this.Amount == input.Amount ||
                    (this.Amount != null &&
                    this.Amount.Equals(input.Amount))
                ) && 
                (
                    this.Reference == input.Reference ||
                    (this.Reference != null &&
                    this.Reference.Equals(input.Reference))
                ) && 
                (
                    this.Narration == input.Narration ||
                    (this.Narration != null &&
                    this.Narration.Equals(input.Narration))
                );
        }

        /// <summary>
        /// Gets the hash code
        /// </summary>
        /// <returns>Hash code</returns>
        public override int GetHashCode()
        {
            unchecked // Overflow is fine, just wrap
            {
                int hashCode = 41;
                hashCode = (hashCode * 59) + this.Id.GetHashCode();
                if (this.TransactionDate != null)
                {
                    hashCode = (hashCode * 59) + this.TransactionDate.GetHashCode();
                }
                if (this.ValueDate != null)
                {
                    hashCode = (hashCode * 59) + this.ValueDate.GetHashCode();
                }
                if (this.TransType != null)
                {
                    hashCode = (hashCode * 59) + this.TransType.GetHashCode();
                }
                if (this.BankName != null)
                {
                    hashCode = (hashCode * 59) + this.BankName.GetHashCode();
                }
                if (this.Amount != null)
                {
                    hashCode = (hashCode * 59) + this.Amount.GetHashCode();
                }
                if (this.Reference != null)
                {
                    hashCode = (hashCode * 59) + this.Reference.GetHashCode();
                }
                if (this.Narration != null)
                {
                    hashCode = (hashCode * 59) + this.Narration.GetHashCode();
                }
                return hashCode;
            }
        }

        /// <summary>
        /// To validate all properties of the instance
        /// </summary>
        /// <param name="validationContext">Validation context</param>
        /// <returns>Validation Result</returns>
        public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
        {
            yield break;
        }
    }

}
