# coding: utf-8

"""
    Onfido API

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

    OpenAPI spec version: 2.0.0
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class Report(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',
        'sub_result': 'str',
        'breakdown': 'dict(str, object)',
        'properties': 'dict(str, object)',
        'name': 'str',
        'variant': 'str',
        'options': 'list[ReportOption]',
        'documents': 'list[ReportDocument]'
    }

    attribute_map = {
        'id': 'id',
        'created_at': 'created_at',
        'href': 'href',
        'status': 'status',
        'result': 'result',
        'sub_result': 'sub_result',
        'breakdown': 'breakdown',
        'properties': 'properties',
        'name': 'name',
        'variant': 'variant',
        'options': 'options',
        'documents': 'documents'
    }

    def __init__(self, id=None, created_at=None, href=None, status=None, result=None, sub_result=None, breakdown=None, properties=None, name=None, variant=None, options=None, documents=None):  # noqa: E501
        """Report - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._created_at = None
        self._href = None
        self._status = None
        self._result = None
        self._sub_result = None
        self._breakdown = None
        self._properties = None
        self._name = None
        self._variant = None
        self._options = None
        self._documents = 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 sub_result is not None:
            self.sub_result = sub_result
        if breakdown is not None:
            self.breakdown = breakdown
        if properties is not None:
            self.properties = properties
        self.name = name
        if variant is not None:
            self.variant = variant
        if options is not None:
            self.options = options
        if documents is not None:
            self.documents = documents

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

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

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

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

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

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

        self._id = id

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

        The date and time at which the report was first initiated. Read-only.  # noqa: E501

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

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

        The date and time at which the report was first initiated. Read-only.  # noqa: E501

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

        self._created_at = created_at

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

        The API endpoint to retrieve the report. Read-only.  # noqa: E501

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

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

        The API endpoint to retrieve the report. Read-only.  # noqa: E501

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

        self._href = href

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

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

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

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

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

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

        self._status = status

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

        The result of the report. Read-only.  # noqa: E501

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

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

        The result of the report. Read-only.  # noqa: E501

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

        self._result = result

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

        The sub_result of the report. It gives a more detailed result for document reports only, and will be null otherwise. Read-only.  # noqa: E501

        :return: The sub_result of this Report.  # noqa: E501
        :rtype: str
        """
        return self._sub_result

    @sub_result.setter
    def sub_result(self, sub_result):
        """Sets the sub_result of this Report.

        The sub_result of the report. It gives a more detailed result for document reports only, and will be null otherwise. Read-only.  # noqa: E501

        :param sub_result: The sub_result of this Report.  # noqa: E501
        :type: str
        """

        self._sub_result = sub_result

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

        The details of the report. This is specific to each type of report. Read-only.  # noqa: E501

        :return: The breakdown of this Report.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._breakdown

    @breakdown.setter
    def breakdown(self, breakdown):
        """Sets the breakdown of this Report.

        The details of the report. This is specific to each type of report. Read-only.  # noqa: E501

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

        self._breakdown = breakdown

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

        The properties associated with the report, if any. Read-only.  # noqa: E501

        :return: The properties of this Report.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._properties

    @properties.setter
    def properties(self, properties):
        """Sets the properties of this Report.

        The properties associated with the report, if any. Read-only.  # noqa: E501

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

        self._properties = properties

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

        The name of the report type.  # noqa: E501

        :return: The name of this Report.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this Report.

        The name of the report type.  # noqa: E501

        :param name: The name of this Report.  # noqa: E501
        :type: str
        """
        if name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        The name of the report type variant, if required.  # noqa: E501

        :return: The variant of this Report.  # noqa: E501
        :rtype: str
        """
        return self._variant

    @variant.setter
    def variant(self, variant):
        """Sets the variant of this Report.

        The name of the report type variant, if required.  # noqa: E501

        :param variant: The variant of this Report.  # noqa: E501
        :type: str
        """

        self._variant = variant

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

        List of Report Option objects.  # noqa: E501

        :return: The options of this Report.  # noqa: E501
        :rtype: list[ReportOption]
        """
        return self._options

    @options.setter
    def options(self, options):
        """Sets the options of this Report.

        List of Report Option objects.  # noqa: E501

        :param options: The options of this Report.  # noqa: E501
        :type: list[ReportOption]
        """

        self._options = options

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

        Array of objects with document ids that were used in the Onfido engine. [ONLY USED IN A DOCUMENT CHECK]  # noqa: E501

        :return: The documents of this Report.  # noqa: E501
        :rtype: list[ReportDocument]
        """
        return self._documents

    @documents.setter
    def documents(self, documents):
        """Sets the documents of this Report.

        Array of objects with document ids that were used in the Onfido engine. [ONLY USED IN A DOCUMENT CHECK]  # noqa: E501

        :param documents: The documents of this Report.  # noqa: E501
        :type: list[ReportDocument]
        """

        self._documents = documents

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

        return self.__dict__ == other.__dict__

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