# coding: utf-8

"""
    Corpus Processing Service (CPS) API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 2.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from deepsearch.cps.apis.public.configuration import Configuration


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

    Do not edit the class manually.
    """

    """
    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 = {
        'backend': 'str',
        'backend_settings': 'object',
        'enabled': 'bool',
        'merge_mode': 'str'
    }

    attribute_map = {
        'backend': 'backend',
        'backend_settings': 'backend_settings',
        'enabled': 'enabled',
        'merge_mode': 'merge_mode'
    }

    def __init__(self, backend=None, backend_settings=None, enabled=False, merge_mode=None, local_vars_configuration=None):  # noqa: E501
        """OCRSettings - 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._backend = None
        self._backend_settings = None
        self._enabled = None
        self._merge_mode = None
        self.discriminator = None

        if backend is not None:
            self.backend = backend
        if backend_settings is not None:
            self.backend_settings = backend_settings
        if enabled is not None:
            self.enabled = enabled
        if merge_mode is not None:
            self.merge_mode = merge_mode

    @property
    def backend(self):
        """Gets the backend of this OCRSettings.  # noqa: E501


        :return: The backend of this OCRSettings.  # noqa: E501
        :rtype: str
        """
        return self._backend

    @backend.setter
    def backend(self, backend):
        """Sets the backend of this OCRSettings.


        :param backend: The backend of this OCRSettings.  # noqa: E501
        :type: str
        """

        self._backend = backend

    @property
    def backend_settings(self):
        """Gets the backend_settings of this OCRSettings.  # noqa: E501


        :return: The backend_settings of this OCRSettings.  # noqa: E501
        :rtype: object
        """
        return self._backend_settings

    @backend_settings.setter
    def backend_settings(self, backend_settings):
        """Sets the backend_settings of this OCRSettings.


        :param backend_settings: The backend_settings of this OCRSettings.  # noqa: E501
        :type: object
        """

        self._backend_settings = backend_settings

    @property
    def enabled(self):
        """Gets the enabled of this OCRSettings.  # noqa: E501


        :return: The enabled of this OCRSettings.  # noqa: E501
        :rtype: bool
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """Sets the enabled of this OCRSettings.


        :param enabled: The enabled of this OCRSettings.  # noqa: E501
        :type: bool
        """

        self._enabled = enabled

    @property
    def merge_mode(self):
        """Gets the merge_mode of this OCRSettings.  # noqa: E501


        :return: The merge_mode of this OCRSettings.  # noqa: E501
        :rtype: str
        """
        return self._merge_mode

    @merge_mode.setter
    def merge_mode(self, merge_mode):
        """Sets the merge_mode of this OCRSettings.


        :param merge_mode: The merge_mode of this OCRSettings.  # noqa: E501
        :type: str
        """

        self._merge_mode = merge_mode

    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, OCRSettings):
            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, OCRSettings):
            return True

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