# 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 DeliverabilityAnalyticsRunDto(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',
        'name': 'str',
        'scope': 'str',
        'status': 'str',
        'created_at': 'datetime',
        'start_at': 'datetime',
        'completed_at': 'datetime',
        'total_entities': 'int',
        'matched_entities': 'int',
        'unmatched_entities': 'int',
        'completion_percentage': 'float',
        'success_threshold_percent': 'float',
        'threshold_status': 'str'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'scope': 'scope',
        'status': 'status',
        'created_at': 'createdAt',
        'start_at': 'startAt',
        'completed_at': 'completedAt',
        'total_entities': 'totalEntities',
        'matched_entities': 'matchedEntities',
        'unmatched_entities': 'unmatchedEntities',
        'completion_percentage': 'completionPercentage',
        'success_threshold_percent': 'successThresholdPercent',
        'threshold_status': 'thresholdStatus'
    }

    def __init__(self, id=None, name=None, scope=None, status=None, created_at=None, start_at=None, completed_at=None, total_entities=None, matched_entities=None, unmatched_entities=None, completion_percentage=None, success_threshold_percent=None, threshold_status=None, local_vars_configuration=None):  # noqa: E501
        """DeliverabilityAnalyticsRunDto - 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._id = None
        self._name = None
        self._scope = None
        self._status = None
        self._created_at = None
        self._start_at = None
        self._completed_at = None
        self._total_entities = None
        self._matched_entities = None
        self._unmatched_entities = None
        self._completion_percentage = None
        self._success_threshold_percent = None
        self._threshold_status = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.scope = scope
        self.status = status
        self.created_at = created_at
        self.start_at = start_at
        self.completed_at = completed_at
        self.total_entities = total_entities
        self.matched_entities = matched_entities
        self.unmatched_entities = unmatched_entities
        self.completion_percentage = completion_percentage
        self.success_threshold_percent = success_threshold_percent
        self.threshold_status = threshold_status

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


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

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


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

        self._id = id

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


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

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


        :param name: The name of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The scope of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: str
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """Sets the scope of this DeliverabilityAnalyticsRunDto.


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

        self._scope = scope

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


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

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


        :param status: The status of this DeliverabilityAnalyticsRunDto.  # 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 = ["CREATED", "SCHEDULED", "RUNNING", "PAUSED", "STOPPED", "COMPLETE", "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 created_at(self):
        """Gets the created_at of this DeliverabilityAnalyticsRunDto.  # noqa: E501


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

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


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

        self._created_at = created_at

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


        :return: The start_at of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: datetime
        """
        return self._start_at

    @start_at.setter
    def start_at(self, start_at):
        """Sets the start_at of this DeliverabilityAnalyticsRunDto.


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

        self._start_at = start_at

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


        :return: The completed_at of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: datetime
        """
        return self._completed_at

    @completed_at.setter
    def completed_at(self, completed_at):
        """Sets the completed_at of this DeliverabilityAnalyticsRunDto.


        :param completed_at: The completed_at of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :type: datetime
        """

        self._completed_at = completed_at

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


        :return: The total_entities of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: int
        """
        return self._total_entities

    @total_entities.setter
    def total_entities(self, total_entities):
        """Sets the total_entities of this DeliverabilityAnalyticsRunDto.


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

        self._total_entities = total_entities

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


        :return: The matched_entities of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: int
        """
        return self._matched_entities

    @matched_entities.setter
    def matched_entities(self, matched_entities):
        """Sets the matched_entities of this DeliverabilityAnalyticsRunDto.


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

        self._matched_entities = matched_entities

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


        :return: The unmatched_entities of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: int
        """
        return self._unmatched_entities

    @unmatched_entities.setter
    def unmatched_entities(self, unmatched_entities):
        """Sets the unmatched_entities of this DeliverabilityAnalyticsRunDto.


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

        self._unmatched_entities = unmatched_entities

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


        :return: The completion_percentage of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: float
        """
        return self._completion_percentage

    @completion_percentage.setter
    def completion_percentage(self, completion_percentage):
        """Sets the completion_percentage of this DeliverabilityAnalyticsRunDto.


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

        self._completion_percentage = completion_percentage

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


        :return: The success_threshold_percent of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: float
        """
        return self._success_threshold_percent

    @success_threshold_percent.setter
    def success_threshold_percent(self, success_threshold_percent):
        """Sets the success_threshold_percent of this DeliverabilityAnalyticsRunDto.


        :param success_threshold_percent: The success_threshold_percent of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :type: float
        """

        self._success_threshold_percent = success_threshold_percent

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


        :return: The threshold_status of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :rtype: str
        """
        return self._threshold_status

    @threshold_status.setter
    def threshold_status(self, threshold_status):
        """Sets the threshold_status of this DeliverabilityAnalyticsRunDto.


        :param threshold_status: The threshold_status of this DeliverabilityAnalyticsRunDto.  # noqa: E501
        :type: str
        """
        if self.local_vars_configuration.client_side_validation and threshold_status is None:  # noqa: E501
            raise ValueError("Invalid value for `threshold_status`, must not be `None`")  # noqa: E501
        allowed_values = ["NOT_CONFIGURED", "PASSING", "FAILING"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and threshold_status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `threshold_status` ({0}), must be one of {1}"  # noqa: E501
                .format(threshold_status, allowed_values)
            )

        self._threshold_status = threshold_status

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

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