<reponame>dojah-inc/dojah-sdks<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>
    /// CollectTransactionsRequestTransactionsInner
    /// </summary>
    [DataContract(Name = "CollectTransactionsRequest_transactions_inner")]
    public partial class CollectTransactionsRequestTransactionsInner : IEquatable<CollectTransactionsRequestTransactionsInner>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CollectTransactionsRequestTransactionsInner" /> class.
        /// </summary>
        /// <param name="transactionDate">transactionDate.</param>
        /// <param name="transactionAmount">transactionAmount.</param>
        /// <param name="transactionDescription">transactionDescription.</param>
        /// <param name="transactionType">transactionType.</param>
        /// <param name="referenceNumber">referenceNumber.</param>
        public CollectTransactionsRequestTransactionsInner(string transactionDate = default(string), string transactionAmount = default(string), string transactionDescription = default(string), string transactionType = default(string), string referenceNumber = default(string))
        {
            this.TransactionDate = transactionDate;
            this.TransactionAmount = transactionAmount;
            this.TransactionDescription = transactionDescription;
            this.TransactionType = transactionType;
            this.ReferenceNumber = referenceNumber;
        }

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

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

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

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

        /// <summary>
        /// Gets or Sets ReferenceNumber
        /// </summary>
        [DataMember(Name = "reference_number", EmitDefaultValue = false)]
        public string ReferenceNumber { 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 CollectTransactionsRequestTransactionsInner {\n");
            sb.Append("  TransactionDate: ").Append(TransactionDate).Append("\n");
            sb.Append("  TransactionAmount: ").Append(TransactionAmount).Append("\n");
            sb.Append("  TransactionDescription: ").Append(TransactionDescription).Append("\n");
            sb.Append("  TransactionType: ").Append(TransactionType).Append("\n");
            sb.Append("  ReferenceNumber: ").Append(ReferenceNumber).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 CollectTransactionsRequestTransactionsInner);
        }

        /// <summary>
        /// Returns true if CollectTransactionsRequestTransactionsInner instances are equal
        /// </summary>
        /// <param name="input">Instance of CollectTransactionsRequestTransactionsInner to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CollectTransactionsRequestTransactionsInner input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.TransactionDate == input.TransactionDate ||
                    (this.TransactionDate != null &&
                    this.TransactionDate.Equals(input.TransactionDate))
                ) && 
                (
                    this.TransactionAmount == input.TransactionAmount ||
                    (this.TransactionAmount != null &&
                    this.TransactionAmount.Equals(input.TransactionAmount))
                ) && 
                (
                    this.TransactionDescription == input.TransactionDescription ||
                    (this.TransactionDescription != null &&
                    this.TransactionDescription.Equals(input.TransactionDescription))
                ) && 
                (
                    this.TransactionType == input.TransactionType ||
                    (this.TransactionType != null &&
                    this.TransactionType.Equals(input.TransactionType))
                ) && 
                (
                    this.ReferenceNumber == input.ReferenceNumber ||
                    (this.ReferenceNumber != null &&
                    this.ReferenceNumber.Equals(input.ReferenceNumber))
                );
        }

        /// <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.TransactionDate != null)
                {
                    hashCode = (hashCode * 59) + this.TransactionDate.GetHashCode();
                }
                if (this.TransactionAmount != null)
                {
                    hashCode = (hashCode * 59) + this.TransactionAmount.GetHashCode();
                }
                if (this.TransactionDescription != null)
                {
                    hashCode = (hashCode * 59) + this.TransactionDescription.GetHashCode();
                }
                if (this.TransactionType != null)
                {
                    hashCode = (hashCode * 59) + this.TransactionType.GetHashCode();
                }
                if (this.ReferenceNumber != null)
                {
                    hashCode = (hashCode * 59) + this.ReferenceNumber.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;
        }
    }

}
