# coding: utf-8

"""
    MailSlurp API

    MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more.  ## Resources  - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository  # noqa: E501

    The version of the OpenAPI document: 6.5.2
    Contact: contact@mailslurp.dev
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from mailslurp_client.configuration import Configuration


class CheckDomainMonitorResults(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 = {
        'domain': 'str',
        'status': 'str',
        'health_score': 'int',
        'total_checks': 'int',
        'passing_checks': 'int',
        'failing_checks': 'int',
        'spf_ok': 'bool',
        'dmarc_ok': 'bool',
        'dmarc_enforced': 'bool',
        'mx_ok': 'bool',
        'insights': 'list[str]',
        'error_message': 'str'
    }

    attribute_map = {
        'domain': 'domain',
        'status': 'status',
        'health_score': 'healthScore',
        'total_checks': 'totalChecks',
        'passing_checks': 'passingChecks',
        'failing_checks': 'failingChecks',
        'spf_ok': 'spfOk',
        'dmarc_ok': 'dmarcOk',
        'dmarc_enforced': 'dmarcEnforced',
        'mx_ok': 'mxOk',
        'insights': 'insights',
        'error_message': 'errorMessage'
    }

    def __init__(self, domain=None, status=None, health_score=None, total_checks=None, passing_checks=None, failing_checks=None, spf_ok=None, dmarc_ok=None, dmarc_enforced=None, mx_ok=None, insights=None, error_message=None, local_vars_configuration=None):  # noqa: E501
        """CheckDomainMonitorResults - 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._domain = None
        self._status = None
        self._health_score = None
        self._total_checks = None
        self._passing_checks = None
        self._failing_checks = None
        self._spf_ok = None
        self._dmarc_ok = None
        self._dmarc_enforced = None
        self._mx_ok = None
        self._insights = None
        self._error_message = None
        self.discriminator = None

        self.domain = domain
        self.status = status
        self.health_score = health_score
        self.total_checks = total_checks
        self.passing_checks = passing_checks
        self.failing_checks = failing_checks
        self.spf_ok = spf_ok
        self.dmarc_ok = dmarc_ok
        self.dmarc_enforced = dmarc_enforced
        self.mx_ok = mx_ok
        self.insights = insights
        self.error_message = error_message

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


        :return: The domain of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: str
        """
        return self._domain

    @domain.setter
    def domain(self, domain):
        """Sets the domain of this CheckDomainMonitorResults.


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

        self._domain = domain

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


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

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


        :param status: The status of this CheckDomainMonitorResults.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and status is None:  # noqa: E501
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501
        allowed_values = ["HEALTHY", "DEGRADED", "CRITICAL", "FAILED"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `status` ({0}), must be one of {1}"  # noqa: E501
                .format(status, allowed_values)
            )

        self._status = status

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


        :return: The health_score of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: int
        """
        return self._health_score

    @health_score.setter
    def health_score(self, health_score):
        """Sets the health_score of this CheckDomainMonitorResults.


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

        self._health_score = health_score

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


        :return: The total_checks of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: int
        """
        return self._total_checks

    @total_checks.setter
    def total_checks(self, total_checks):
        """Sets the total_checks of this CheckDomainMonitorResults.


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

        self._total_checks = total_checks

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


        :return: The passing_checks of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: int
        """
        return self._passing_checks

    @passing_checks.setter
    def passing_checks(self, passing_checks):
        """Sets the passing_checks of this CheckDomainMonitorResults.


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

        self._passing_checks = passing_checks

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


        :return: The failing_checks of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: int
        """
        return self._failing_checks

    @failing_checks.setter
    def failing_checks(self, failing_checks):
        """Sets the failing_checks of this CheckDomainMonitorResults.


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

        self._failing_checks = failing_checks

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


        :return: The spf_ok of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: bool
        """
        return self._spf_ok

    @spf_ok.setter
    def spf_ok(self, spf_ok):
        """Sets the spf_ok of this CheckDomainMonitorResults.


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

        self._spf_ok = spf_ok

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


        :return: The dmarc_ok of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: bool
        """
        return self._dmarc_ok

    @dmarc_ok.setter
    def dmarc_ok(self, dmarc_ok):
        """Sets the dmarc_ok of this CheckDomainMonitorResults.


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

        self._dmarc_ok = dmarc_ok

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


        :return: The dmarc_enforced of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: bool
        """
        return self._dmarc_enforced

    @dmarc_enforced.setter
    def dmarc_enforced(self, dmarc_enforced):
        """Sets the dmarc_enforced of this CheckDomainMonitorResults.


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

        self._dmarc_enforced = dmarc_enforced

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


        :return: The mx_ok of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: bool
        """
        return self._mx_ok

    @mx_ok.setter
    def mx_ok(self, mx_ok):
        """Sets the mx_ok of this CheckDomainMonitorResults.


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

        self._mx_ok = mx_ok

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


        :return: The insights of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: list[str]
        """
        return self._insights

    @insights.setter
    def insights(self, insights):
        """Sets the insights of this CheckDomainMonitorResults.


        :param insights: The insights of this CheckDomainMonitorResults.  # noqa: E501
        :type: list[str]
        """
        if self.local_vars_configuration.client_side_validation and insights is None:  # noqa: E501
            raise ValueError("Invalid value for `insights`, must not be `None`")  # noqa: E501

        self._insights = insights

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


        :return: The error_message of this CheckDomainMonitorResults.  # noqa: E501
        :rtype: str
        """
        return self._error_message

    @error_message.setter
    def error_message(self, error_message):
        """Sets the error_message of this CheckDomainMonitorResults.


        :param error_message: The error_message of this CheckDomainMonitorResults.  # noqa: E501
        :type: str
        """

        self._error_message = error_message

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

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