/*
 * 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>
    /// GetEarningStructureResponseEntity
    /// </summary>
    [DataContract(Name = "GetEarningStructureResponse_entity")]
    public partial class GetEarningStructureResponseEntity : IEquatable<GetEarningStructureResponseEntity>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="GetEarningStructureResponseEntity" /> class.
        /// </summary>
        /// <param name="averageMonthlyIncome">averageMonthlyIncome.</param>
        /// <param name="salaryEarner">salaryEarner.</param>
        /// <param name="consistent">consistent.</param>
        /// <param name="numberOfDays">numberOfDays.</param>
        public GetEarningStructureResponseEntity(decimal averageMonthlyIncome = default(decimal), bool salaryEarner = default(bool), bool consistent = default(bool), decimal numberOfDays = default(decimal))
        {
            this.AverageMonthlyIncome = averageMonthlyIncome;
            this.SalaryEarner = salaryEarner;
            this.Consistent = consistent;
            this.NumberOfDays = numberOfDays;
        }

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

        /// <summary>
        /// Gets or Sets SalaryEarner
        /// </summary>
        [DataMember(Name = "salary_earner", EmitDefaultValue = true)]
        public bool SalaryEarner { get; set; }

        /// <summary>
        /// Gets or Sets Consistent
        /// </summary>
        [DataMember(Name = "consistent", EmitDefaultValue = true)]
        public bool Consistent { get; set; }

        /// <summary>
        /// Gets or Sets NumberOfDays
        /// </summary>
        [DataMember(Name = "number_of_days", EmitDefaultValue = false)]
        public decimal NumberOfDays { 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 GetEarningStructureResponseEntity {\n");
            sb.Append("  AverageMonthlyIncome: ").Append(AverageMonthlyIncome).Append("\n");
            sb.Append("  SalaryEarner: ").Append(SalaryEarner).Append("\n");
            sb.Append("  Consistent: ").Append(Consistent).Append("\n");
            sb.Append("  NumberOfDays: ").Append(NumberOfDays).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 GetEarningStructureResponseEntity);
        }

        /// <summary>
        /// Returns true if GetEarningStructureResponseEntity instances are equal
        /// </summary>
        /// <param name="input">Instance of GetEarningStructureResponseEntity to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(GetEarningStructureResponseEntity input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.AverageMonthlyIncome == input.AverageMonthlyIncome ||
                    this.AverageMonthlyIncome.Equals(input.AverageMonthlyIncome)
                ) && 
                (
                    this.SalaryEarner == input.SalaryEarner ||
                    this.SalaryEarner.Equals(input.SalaryEarner)
                ) && 
                (
                    this.Consistent == input.Consistent ||
                    this.Consistent.Equals(input.Consistent)
                ) && 
                (
                    this.NumberOfDays == input.NumberOfDays ||
                    this.NumberOfDays.Equals(input.NumberOfDays)
                );
        }

        /// <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.AverageMonthlyIncome.GetHashCode();
                hashCode = (hashCode * 59) + this.SalaryEarner.GetHashCode();
                hashCode = (hashCode * 59) + this.Consistent.GetHashCode();
                hashCode = (hashCode * 59) + this.NumberOfDays.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;
        }
    }

}
