/*
 * 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>
    /// CategorizeTransactionsResponseEntity
    /// </summary>
    [DataContract(Name = "CategorizeTransactionsResponse_entity")]
    public partial class CategorizeTransactionsResponseEntity : IEquatable<CategorizeTransactionsResponseEntity>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CategorizeTransactionsResponseEntity" /> class.
        /// </summary>
        /// <param name="category">category.</param>
        /// <param name="subCategory">subCategory.</param>
        /// <param name="serviceId">serviceId.</param>
        /// <param name="isSubscription">isSubscription.</param>
        /// <param name="duration">duration.</param>
        /// <param name="serviceName">serviceName.</param>
        /// <param name="label">label.</param>
        /// <param name="modeOfPayment">modeOfPayment.</param>
        public CategorizeTransactionsResponseEntity(string category = default(string), string subCategory = default(string), decimal serviceId = default(decimal), decimal isSubscription = default(decimal), string duration = default(string), string serviceName = default(string), string label = default(string), string modeOfPayment = default(string))
        {
            this.Category = category;
            this.SubCategory = subCategory;
            this.ServiceId = serviceId;
            this.IsSubscription = isSubscription;
            this.Duration = duration;
            this.ServiceName = serviceName;
            this.Label = label;
            this.ModeOfPayment = modeOfPayment;
        }

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

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

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

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

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

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

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

        /// <summary>
        /// Gets or Sets ModeOfPayment
        /// </summary>
        [DataMember(Name = "mode_of_payment", EmitDefaultValue = false)]
        public string ModeOfPayment { 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 CategorizeTransactionsResponseEntity {\n");
            sb.Append("  Category: ").Append(Category).Append("\n");
            sb.Append("  SubCategory: ").Append(SubCategory).Append("\n");
            sb.Append("  ServiceId: ").Append(ServiceId).Append("\n");
            sb.Append("  IsSubscription: ").Append(IsSubscription).Append("\n");
            sb.Append("  Duration: ").Append(Duration).Append("\n");
            sb.Append("  ServiceName: ").Append(ServiceName).Append("\n");
            sb.Append("  Label: ").Append(Label).Append("\n");
            sb.Append("  ModeOfPayment: ").Append(ModeOfPayment).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 CategorizeTransactionsResponseEntity);
        }

        /// <summary>
        /// Returns true if CategorizeTransactionsResponseEntity instances are equal
        /// </summary>
        /// <param name="input">Instance of CategorizeTransactionsResponseEntity to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(CategorizeTransactionsResponseEntity input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.Category == input.Category ||
                    (this.Category != null &&
                    this.Category.Equals(input.Category))
                ) && 
                (
                    this.SubCategory == input.SubCategory ||
                    (this.SubCategory != null &&
                    this.SubCategory.Equals(input.SubCategory))
                ) && 
                (
                    this.ServiceId == input.ServiceId ||
                    this.ServiceId.Equals(input.ServiceId)
                ) && 
                (
                    this.IsSubscription == input.IsSubscription ||
                    this.IsSubscription.Equals(input.IsSubscription)
                ) && 
                (
                    this.Duration == input.Duration ||
                    (this.Duration != null &&
                    this.Duration.Equals(input.Duration))
                ) && 
                (
                    this.ServiceName == input.ServiceName ||
                    (this.ServiceName != null &&
                    this.ServiceName.Equals(input.ServiceName))
                ) && 
                (
                    this.Label == input.Label ||
                    (this.Label != null &&
                    this.Label.Equals(input.Label))
                ) && 
                (
                    this.ModeOfPayment == input.ModeOfPayment ||
                    (this.ModeOfPayment != null &&
                    this.ModeOfPayment.Equals(input.ModeOfPayment))
                );
        }

        /// <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.Category != null)
                {
                    hashCode = (hashCode * 59) + this.Category.GetHashCode();
                }
                if (this.SubCategory != null)
                {
                    hashCode = (hashCode * 59) + this.SubCategory.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.ServiceId.GetHashCode();
                hashCode = (hashCode * 59) + this.IsSubscription.GetHashCode();
                if (this.Duration != null)
                {
                    hashCode = (hashCode * 59) + this.Duration.GetHashCode();
                }
                if (this.ServiceName != null)
                {
                    hashCode = (hashCode * 59) + this.ServiceName.GetHashCode();
                }
                if (this.Label != null)
                {
                    hashCode = (hashCode * 59) + this.Label.GetHashCode();
                }
                if (this.ModeOfPayment != null)
                {
                    hashCode = (hashCode * 59) + this.ModeOfPayment.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;
        }
    }

}
