# coding: utf-8

"""
    Onfido API

    The Onfido API is used to submit check requests.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class Check(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 = {
        'id': 'str',
        'created_at': 'datetime',
        'href': 'str',
        'status': 'str',
        'result': 'str',
        'download_uri': 'str',
        'form_uri': 'str',
        'redirect_uri': 'str',
        'results_uri': 'str',
        'report_names': 'list[str]',
        'applicant_id': 'str',
        'tags': 'list[str]',
        'applicant_provides_data': 'bool',
        'suppress_form_emails': 'bool',
        'asynchronous': 'bool',
        'report_ids': 'list[str]'
    }

    attribute_map = {
        'id': 'id',
        'created_at': 'created_at',
        'href': 'href',
        'status': 'status',
        'result': 'result',
        'download_uri': 'download_uri',
        'form_uri': 'form_uri',
        'redirect_uri': 'redirect_uri',
        'results_uri': 'results_uri',
        'report_names': 'report_names',
        'applicant_id': 'applicant_id',
        'tags': 'tags',
        'applicant_provides_data': 'applicant_provides_data',
        'suppress_form_emails': 'suppress_form_emails',
        'asynchronous': 'asynchronous',
        'report_ids': 'report_ids'
    }

    def __init__(self, id=None, created_at=None, href=None, status=None, result=None, download_uri=None, form_uri=None, redirect_uri=None, results_uri=None, report_names=None, applicant_id=None, tags=None, applicant_provides_data=None, suppress_form_emails=None, asynchronous=None, report_ids=None):  # noqa: E501
        """Check - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._created_at = None
        self._href = None
        self._status = None
        self._result = None
        self._download_uri = None
        self._form_uri = None
        self._redirect_uri = None
        self._results_uri = None
        self._report_names = None
        self._applicant_id = None
        self._tags = None
        self._applicant_provides_data = None
        self._suppress_form_emails = None
        self._asynchronous = None
        self._report_ids = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if created_at is not None:
            self.created_at = created_at
        if href is not None:
            self.href = href
        if status is not None:
            self.status = status
        if result is not None:
            self.result = result
        if download_uri is not None:
            self.download_uri = download_uri
        if form_uri is not None:
            self.form_uri = form_uri
        if redirect_uri is not None:
            self.redirect_uri = redirect_uri
        if results_uri is not None:
            self.results_uri = results_uri
        if report_names is not None:
            self.report_names = report_names
        if applicant_id is not None:
            self.applicant_id = applicant_id
        if tags is not None:
            self.tags = tags
        if applicant_provides_data is not None:
            self.applicant_provides_data = applicant_provides_data
        if suppress_form_emails is not None:
            self.suppress_form_emails = suppress_form_emails
        if asynchronous is not None:
            self.asynchronous = asynchronous
        if report_ids is not None:
            self.report_ids = report_ids

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

        The unique identifier for the check. Read-only.  # noqa: E501

        :return: The id of this Check.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this Check.

        The unique identifier for the check. Read-only.  # noqa: E501

        :param id: The id of this Check.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The date and time when this check was created. Read-only.  # noqa: E501

        :return: The created_at of this Check.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this Check.

        The date and time when this check was created. Read-only.  # noqa: E501

        :param created_at: The created_at of this Check.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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

        The uri of this resource. Read-only.  # noqa: E501

        :return: The href of this Check.  # noqa: E501
        :rtype: str
        """
        return self._href

    @href.setter
    def href(self, href):
        """Sets the href of this Check.

        The uri of this resource. Read-only.  # noqa: E501

        :param href: The href of this Check.  # noqa: E501
        :type: str
        """

        self._href = href

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

        The current state of the check in the checking process. Read-only.  # noqa: E501

        :return: The status of this Check.  # noqa: E501
        :rtype: str
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this Check.

        The current state of the check in the checking process. Read-only.  # noqa: E501

        :param status: The status of this Check.  # noqa: E501
        :type: str
        """

        self._status = status

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

        The overall result of the check, based on the results of the constituent reports. Read-only.  # noqa: E501

        :return: The result of this Check.  # noqa: E501
        :rtype: str
        """
        return self._result

    @result.setter
    def result(self, result):
        """Sets the result of this Check.

        The overall result of the check, based on the results of the constituent reports. Read-only.  # noqa: E501

        :param result: The result of this Check.  # noqa: E501
        :type: str
        """

        self._result = result

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

        A link to a PDF output of the check results. Append `.pdf` to get the pdf file. Read-only.  # noqa: E501

        :return: The download_uri of this Check.  # noqa: E501
        :rtype: str
        """
        return self._download_uri

    @download_uri.setter
    def download_uri(self, download_uri):
        """Sets the download_uri of this Check.

        A link to a PDF output of the check results. Append `.pdf` to get the pdf file. Read-only.  # noqa: E501

        :param download_uri: The download_uri of this Check.  # noqa: E501
        :type: str
        """

        self._download_uri = download_uri

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

        A link to the applicant form, if `applicant_provides_data` is `true`. Read-only.  # noqa: E501

        :return: The form_uri of this Check.  # noqa: E501
        :rtype: str
        """
        return self._form_uri

    @form_uri.setter
    def form_uri(self, form_uri):
        """Sets the form_uri of this Check.

        A link to the applicant form, if `applicant_provides_data` is `true`. Read-only.  # noqa: E501

        :param form_uri: The form_uri of this Check.  # noqa: E501
        :type: str
        """

        self._form_uri = form_uri

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

        For checks where `applicant_provides_data` is `true`, redirect to this URI when the applicant has submitted their data. Read-only.  # noqa: E501

        :return: The redirect_uri of this Check.  # noqa: E501
        :rtype: str
        """
        return self._redirect_uri

    @redirect_uri.setter
    def redirect_uri(self, redirect_uri):
        """Sets the redirect_uri of this Check.

        For checks where `applicant_provides_data` is `true`, redirect to this URI when the applicant has submitted their data. Read-only.  # noqa: E501

        :param redirect_uri: The redirect_uri of this Check.  # noqa: E501
        :type: str
        """

        self._redirect_uri = redirect_uri

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

        A link to the corresponding results page on the Onfido dashboard.  # noqa: E501

        :return: The results_uri of this Check.  # noqa: E501
        :rtype: str
        """
        return self._results_uri

    @results_uri.setter
    def results_uri(self, results_uri):
        """Sets the results_uri of this Check.

        A link to the corresponding results page on the Onfido dashboard.  # noqa: E501

        :param results_uri: The results_uri of this Check.  # noqa: E501
        :type: str
        """

        self._results_uri = results_uri

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

        An array of report names (strings).  # noqa: E501

        :return: The report_names of this Check.  # noqa: E501
        :rtype: list[str]
        """
        return self._report_names

    @report_names.setter
    def report_names(self, report_names):
        """Sets the report_names of this Check.

        An array of report names (strings).  # noqa: E501

        :param report_names: The report_names of this Check.  # noqa: E501
        :type: list[str]
        """

        self._report_names = report_names

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

        The ID of the applicant to do the check on.  # noqa: E501

        :return: The applicant_id of this Check.  # noqa: E501
        :rtype: str
        """
        return self._applicant_id

    @applicant_id.setter
    def applicant_id(self, applicant_id):
        """Sets the applicant_id of this Check.

        The ID of the applicant to do the check on.  # noqa: E501

        :param applicant_id: The applicant_id of this Check.  # noqa: E501
        :type: str
        """

        self._applicant_id = applicant_id

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

        Array of tags being assigned to this check.  # noqa: E501

        :return: The tags of this Check.  # noqa: E501
        :rtype: list[str]
        """
        return self._tags

    @tags.setter
    def tags(self, tags):
        """Sets the tags of this Check.

        Array of tags being assigned to this check.  # noqa: E501

        :param tags: The tags of this Check.  # noqa: E501
        :type: list[str]
        """

        self._tags = tags

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

        Send an applicant form to applicant to complete to proceed with check. Defaults to false.   # noqa: E501

        :return: The applicant_provides_data of this Check.  # noqa: E501
        :rtype: bool
        """
        return self._applicant_provides_data

    @applicant_provides_data.setter
    def applicant_provides_data(self, applicant_provides_data):
        """Sets the applicant_provides_data of this Check.

        Send an applicant form to applicant to complete to proceed with check. Defaults to false.   # noqa: E501

        :param applicant_provides_data: The applicant_provides_data of this Check.  # noqa: E501
        :type: bool
        """

        self._applicant_provides_data = applicant_provides_data

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

        For checks where `applicant_provides_data` is `true`, applicant form will not be automatically sent if `suppress_form_emails` is set to `true`. You can manually send the form at any time after the check has been created, using the link found in the form_uri attribute of the check object. Write-only. Defaults to false.   # noqa: E501

        :return: The suppress_form_emails of this Check.  # noqa: E501
        :rtype: bool
        """
        return self._suppress_form_emails

    @suppress_form_emails.setter
    def suppress_form_emails(self, suppress_form_emails):
        """Sets the suppress_form_emails of this Check.

        For checks where `applicant_provides_data` is `true`, applicant form will not be automatically sent if `suppress_form_emails` is set to `true`. You can manually send the form at any time after the check has been created, using the link found in the form_uri attribute of the check object. Write-only. Defaults to false.   # noqa: E501

        :param suppress_form_emails: The suppress_form_emails of this Check.  # noqa: E501
        :type: bool
        """

        self._suppress_form_emails = suppress_form_emails

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

        Defaults to `true`. Write-only. If set to `false`, you will only receive a response when all reports in your check have completed.   # noqa: E501

        :return: The asynchronous of this Check.  # noqa: E501
        :rtype: bool
        """
        return self._asynchronous

    @asynchronous.setter
    def asynchronous(self, asynchronous):
        """Sets the asynchronous of this Check.

        Defaults to `true`. Write-only. If set to `false`, you will only receive a response when all reports in your check have completed.   # noqa: E501

        :param asynchronous: The asynchronous of this Check.  # noqa: E501
        :type: bool
        """

        self._asynchronous = asynchronous

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

        An array of report ids.  # noqa: E501

        :return: The report_ids of this Check.  # noqa: E501
        :rtype: list[str]
        """
        return self._report_ids

    @report_ids.setter
    def report_ids(self, report_ids):
        """Sets the report_ids of this Check.

        An array of report ids.  # noqa: E501

        :param report_ids: The report_ids of this Check.  # noqa: E501
        :type: list[str]
        """

        self._report_ids = report_ids

    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, Check):
            return False

        return self.__dict__ == other.__dict__

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