/*
 * 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>
    /// AnalyzeDocumentResponseEntityTextDataInner
    /// </summary>
    [DataContract(Name = "AnalyzeDocumentResponse_entity_text_data_inner")]
    public partial class AnalyzeDocumentResponseEntityTextDataInner : IEquatable<AnalyzeDocumentResponseEntityTextDataInner>, IValidatableObject
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="AnalyzeDocumentResponseEntityTextDataInner" /> class.
        /// </summary>
        /// <param name="fieldName">fieldName.</param>
        /// <param name="fieldType">fieldType.</param>
        /// <param name="status">status.</param>
        /// <param name="value">value.</param>
        public AnalyzeDocumentResponseEntityTextDataInner(string fieldName = default(string), decimal fieldType = default(decimal), decimal status = default(decimal), string value = default(string))
        {
            this.FieldName = fieldName;
            this.FieldType = fieldType;
            this.Status = status;
            this.Value = value;
        }

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

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

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

        /// <summary>
        /// Gets or Sets Value
        /// </summary>
        [DataMember(Name = "value", EmitDefaultValue = false)]
        public string Value { 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 AnalyzeDocumentResponseEntityTextDataInner {\n");
            sb.Append("  FieldName: ").Append(FieldName).Append("\n");
            sb.Append("  FieldType: ").Append(FieldType).Append("\n");
            sb.Append("  Status: ").Append(Status).Append("\n");
            sb.Append("  Value: ").Append(Value).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 AnalyzeDocumentResponseEntityTextDataInner);
        }

        /// <summary>
        /// Returns true if AnalyzeDocumentResponseEntityTextDataInner instances are equal
        /// </summary>
        /// <param name="input">Instance of AnalyzeDocumentResponseEntityTextDataInner to be compared</param>
        /// <returns>Boolean</returns>
        public bool Equals(AnalyzeDocumentResponseEntityTextDataInner input)
        {
            if (input == null)
            {
                return false;
            }
            return 
                (
                    this.FieldName == input.FieldName ||
                    (this.FieldName != null &&
                    this.FieldName.Equals(input.FieldName))
                ) && 
                (
                    this.FieldType == input.FieldType ||
                    this.FieldType.Equals(input.FieldType)
                ) && 
                (
                    this.Status == input.Status ||
                    this.Status.Equals(input.Status)
                ) && 
                (
                    this.Value == input.Value ||
                    (this.Value != null &&
                    this.Value.Equals(input.Value))
                );
        }

        /// <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.FieldName != null)
                {
                    hashCode = (hashCode * 59) + this.FieldName.GetHashCode();
                }
                hashCode = (hashCode * 59) + this.FieldType.GetHashCode();
                hashCode = (hashCode * 59) + this.Status.GetHashCode();
                if (this.Value != null)
                {
                    hashCode = (hashCode * 59) + this.Value.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;
        }
    }

}
