# coding: utf-8

"""
    Generated by: https://openapi-generator.tech
"""

import pprint
import re  # noqa: F401

import six

from regula.documentreader.webclient.gen.configuration import Configuration
# this line was added to enable pycharm type hinting
from regula.documentreader.webclient.gen.models import *


class Result(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    "Contains cropped and rotated with perspective compensation image of document. Single input image can contain multiple document side/pages, which will be returned as separated results. Most of coordinates in other types defined on that image"
    DOCUMENT_IMAGE = int("1")

    "Contains check statuses with details, grouped by source"
    STATUS = int("33")

    "Contains document textual fields from all sources (mrz, rfid, visual, barcode) with validity and cross-source compare checks"
    TEXT = int("36")

    "Contains images from all document sources (mrz, rfid, visual, barcode)"
    IMAGES = int("37")

    "Contains MRZ OCR results"
    MRZ_TEXT = int("3")

    "Contains Visual zone OCR results"
    VISUAL_TEXT = int("17")

    "Contains barcode parsing result with text fields"
    BARCODE_TEXT = int("18")

    "Contains RFID parsing result with text fields"
    RFID_TEXT = int("102")

    "Contains lexical data analysis results that allow you to compare MRZ OCR results, Visual zone OCR results, barcodes and RFID chip data for an additional assessment of the authenticity of the document (this is an old format, better use TEXT type)"
    LEXICAL_ANALYSIS = int("15")

    "Contains cropped graphic fields from Visual zone"
    VISUAL_GRAPHICS = int("6")

    "Contains barcode parsing result with graphic fields"
    BARCODE_GRAPHICS = int("19")

    "Contains RFID parsing result with graphic fields"
    RFID_GRAPHICS = int("103")

    "Contains list of document type candidates with their probabilities and descriptions"
    DOCUMENT_TYPE_CANDIDATES = int("8")

    "Contains description of determined document type, if any"
    DOCUMENT_TYPE = int("9")

    "Contains result of document authenticity checks"
    AUTHENTICITY = int("20")

    allowable_values = [DOCUMENT_IMAGE, STATUS, TEXT, IMAGES, MRZ_TEXT, VISUAL_TEXT, BARCODE_TEXT, RFID_TEXT, LEXICAL_ANALYSIS, VISUAL_GRAPHICS, BARCODE_GRAPHICS, RFID_GRAPHICS, DOCUMENT_TYPE_CANDIDATES, DOCUMENT_TYPE, AUTHENTICITY]  # noqa: E501

    """
    Attributes:
      openapi_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    openapi_types = {
    }

    attribute_map = {
    }

    def __init__(self, local_vars_configuration=None):  # noqa: E501
        """Result - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration
        self.discriminator = None

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, Result):
            return False

        return self.to_dict() == other.to_dict()

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        if not isinstance(other, Result):
            return True

        return self.to_dict() != other.to_dict()
