# 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 ProcessParams(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 = {
        'scenario': 'Scenario',
        'result_type_output': 'list[Result]',
        'double_page_spread': 'bool',
        'field_types_filter': 'list[TextFieldType]',
        'date_format': 'str',
        'image_dpi_out_max': 'int',
        'already_cropped': 'bool',
        'custom_params': 'dict(str, object)'
    }

    attribute_map = {
        'scenario': 'scenario',
        'result_type_output': 'resultTypeOutput',
        'double_page_spread': 'doublePageSpread',
        'field_types_filter': 'fieldTypesFilter',
        'date_format': 'dateFormat',
        'image_dpi_out_max': 'imageDpiOutMax',
        'already_cropped': 'alreadyCropped',
        'custom_params': 'customParams'
    }

    def __init__(self, scenario=None, result_type_output=None, double_page_spread=None, field_types_filter=None, date_format=None, image_dpi_out_max=None, already_cropped=None, custom_params=None, local_vars_configuration=None):  # noqa: E501
        """ProcessParams - 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._scenario = None
        self._result_type_output = None
        self._double_page_spread = None
        self._field_types_filter = None
        self._date_format = None
        self._image_dpi_out_max = None
        self._already_cropped = None
        self._custom_params = None
        self.discriminator = None

        self.scenario = scenario
        if result_type_output is not None:
            self.result_type_output = result_type_output
        if double_page_spread is not None:
            self.double_page_spread = double_page_spread
        if field_types_filter is not None:
            self.field_types_filter = field_types_filter
        if date_format is not None:
            self.date_format = date_format
        if image_dpi_out_max is not None:
            self.image_dpi_out_max = image_dpi_out_max
        if already_cropped is not None:
            self.already_cropped = already_cropped
        if custom_params is not None:
            self.custom_params = custom_params

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


        :return: The scenario of this ProcessParams.  # noqa: E501
        :rtype: Scenario
        """
        return self._scenario

    @scenario.setter
    def scenario(self, scenario):
        """Sets the scenario of this ProcessParams.


        :param scenario: The scenario of this ProcessParams.  # noqa: E501
        :type scenario: Scenario
        """
        if self.local_vars_configuration.client_side_validation and scenario is None:  # noqa: E501
            raise ValueError("Invalid value for `scenario`, must not be `None`")  # noqa: E501

        self._scenario = scenario

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

        Types of results to return in response. See 'Result' enum for available options  # noqa: E501

        :return: The result_type_output of this ProcessParams.  # noqa: E501
        :rtype: list[Result]
        """
        return self._result_type_output

    @result_type_output.setter
    def result_type_output(self, result_type_output):
        """Sets the result_type_output of this ProcessParams.

        Types of results to return in response. See 'Result' enum for available options  # noqa: E501

        :param result_type_output: The result_type_output of this ProcessParams.  # noqa: E501
        :type result_type_output: list[Result]
        """

        self._result_type_output = result_type_output

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

        This option can be set to true if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. By default is set to false.  # noqa: E501

        :return: The double_page_spread of this ProcessParams.  # noqa: E501
        :rtype: bool
        """
        return self._double_page_spread

    @double_page_spread.setter
    def double_page_spread(self, double_page_spread):
        """Sets the double_page_spread of this ProcessParams.

        This option can be set to true if the image you provide contains double page spread of the passport and you want to process both pages in one go. It makes sense to use it for documents that have meaningful information on both pages, like Russian domestic passport, or some others. By default is set to false.  # noqa: E501

        :param double_page_spread: The double_page_spread of this ProcessParams.  # noqa: E501
        :type double_page_spread: bool
        """

        self._double_page_spread = double_page_spread

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

        List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. By default is empty.  # noqa: E501

        :return: The field_types_filter of this ProcessParams.  # noqa: E501
        :rtype: list[TextFieldType]
        """
        return self._field_types_filter

    @field_types_filter.setter
    def field_types_filter(self, field_types_filter):
        """Sets the field_types_filter of this ProcessParams.

        List of text field types to extract. If empty, all text fields from template will be extracted. Narrowing the list can shorten processing time. By default is empty.  # noqa: E501

        :param field_types_filter: The field_types_filter of this ProcessParams.  # noqa: E501
        :type field_types_filter: list[TextFieldType]
        """

        self._field_types_filter = field_types_filter

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

        This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running).  # noqa: E501

        :return: The date_format of this ProcessParams.  # noqa: E501
        :rtype: str
        """
        return self._date_format

    @date_format.setter
    def date_format(self, date_format):
        """Sets the date_format of this ProcessParams.

        This option allows you to set dates format so that solution will return dates in this format. For example, if you supply 'MM/dd/yyyy', and document have printed date '09 JUL 2020' for the date os issue, you will get '07/09/2020' as a result. By default it is set to system locale default (where the service is running).  # noqa: E501

        :param date_format: The date_format of this ProcessParams.  # noqa: E501
        :type date_format: str
        """

        self._date_format = date_format

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

        This option controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi.  # noqa: E501

        :return: The image_dpi_out_max of this ProcessParams.  # noqa: E501
        :rtype: int
        """
        return self._image_dpi_out_max

    @image_dpi_out_max.setter
    def image_dpi_out_max(self, image_dpi_out_max):
        """Sets the image_dpi_out_max of this ProcessParams.

        This option controls maximum resolution in dpi of output images. Resolution will remain original in case 0 is supplied. By default is set to return images in response with resolution not greater than 300 dpi.  # noqa: E501

        :param image_dpi_out_max: The image_dpi_out_max of this ProcessParams.  # noqa: E501
        :type image_dpi_out_max: int
        """

        self._image_dpi_out_max = image_dpi_out_max

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

        This option can be set to true if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. By default is set to false.  # noqa: E501

        :return: The already_cropped of this ProcessParams.  # noqa: E501
        :rtype: bool
        """
        return self._already_cropped

    @already_cropped.setter
    def already_cropped(self, already_cropped):
        """Sets the already_cropped of this ProcessParams.

        This option can be set to true if you know for sure that the image you provide contains already cropped document by its edges. This was designed to process on the server side images captured and cropped on mobile. By default is set to false.  # noqa: E501

        :param already_cropped: The already_cropped of this ProcessParams.  # noqa: E501
        :type already_cropped: bool
        """

        self._already_cropped = already_cropped

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

        This option allows to pass custom processing parameters that can be implemented in future without changing API.  # noqa: E501

        :return: The custom_params of this ProcessParams.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._custom_params

    @custom_params.setter
    def custom_params(self, custom_params):
        """Sets the custom_params of this ProcessParams.

        This option allows to pass custom processing parameters that can be implemented in future without changing API.  # noqa: E501

        :param custom_params: The custom_params of this ProcessParams.  # noqa: E501
        :type custom_params: dict(str, object)
        """

        self._custom_params = custom_params

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

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