# 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 DeliverabilityTestDto(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',
        'description': 'str',
        'scope': 'str',
        'selector': 'DeliverabilitySelectorOptions',
        'selected_entity_count': 'int',
        'expectations': 'list[DeliverabilityExpectation]',
        'status': 'str',
        'start_at': 'datetime',
        'started_at': 'datetime',
        'completed_at': 'datetime',
        'max_duration_seconds': 'int',
        'success_threshold_percent': 'float',
        'threshold_status': 'str',
        'threshold_met': 'bool',
        'last_evaluated_at': 'datetime',
        'total_entities': 'int',
        'matched_entities': 'int',
        'unmatched_entities': 'int',
        'completion_percentage': 'float',
        'timed_out': 'bool',
        'failure_reason': 'str',
        'created_at': 'datetime',
        'updated_at': 'datetime'
    }

    attribute_map = {
        'id': 'id',
        'name': 'name',
        'description': 'description',
        'scope': 'scope',
        'selector': 'selector',
        'selected_entity_count': 'selectedEntityCount',
        'expectations': 'expectations',
        'status': 'status',
        'start_at': 'startAt',
        'started_at': 'startedAt',
        'completed_at': 'completedAt',
        'max_duration_seconds': 'maxDurationSeconds',
        'success_threshold_percent': 'successThresholdPercent',
        'threshold_status': 'thresholdStatus',
        'threshold_met': 'thresholdMet',
        'last_evaluated_at': 'lastEvaluatedAt',
        'total_entities': 'totalEntities',
        'matched_entities': 'matchedEntities',
        'unmatched_entities': 'unmatchedEntities',
        'completion_percentage': 'completionPercentage',
        'timed_out': 'timedOut',
        'failure_reason': 'failureReason',
        'created_at': 'createdAt',
        'updated_at': 'updatedAt'
    }

    def __init__(self, id=None, name=None, description=None, scope=None, selector=None, selected_entity_count=None, expectations=None, status=None, start_at=None, started_at=None, completed_at=None, max_duration_seconds=None, success_threshold_percent=None, threshold_status=None, threshold_met=None, last_evaluated_at=None, total_entities=None, matched_entities=None, unmatched_entities=None, completion_percentage=None, timed_out=None, failure_reason=None, created_at=None, updated_at=None, local_vars_configuration=None):  # noqa: E501
        """DeliverabilityTestDto - 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._description = None
        self._scope = None
        self._selector = None
        self._selected_entity_count = None
        self._expectations = None
        self._status = None
        self._start_at = None
        self._started_at = None
        self._completed_at = None
        self._max_duration_seconds = None
        self._success_threshold_percent = None
        self._threshold_status = None
        self._threshold_met = None
        self._last_evaluated_at = None
        self._total_entities = None
        self._matched_entities = None
        self._unmatched_entities = None
        self._completion_percentage = None
        self._timed_out = None
        self._failure_reason = None
        self._created_at = None
        self._updated_at = None
        self.discriminator = None

        self.id = id
        self.name = name
        self.description = description
        self.scope = scope
        self.selector = selector
        self.selected_entity_count = selected_entity_count
        self.expectations = expectations
        self.status = status
        self.start_at = start_at
        self.started_at = started_at
        self.completed_at = completed_at
        self.max_duration_seconds = max_duration_seconds
        self.success_threshold_percent = success_threshold_percent
        self.threshold_status = threshold_status
        self.threshold_met = threshold_met
        self.last_evaluated_at = last_evaluated_at
        self.total_entities = total_entities
        self.matched_entities = matched_entities
        self.unmatched_entities = unmatched_entities
        self.completion_percentage = completion_percentage
        self.timed_out = timed_out
        self.failure_reason = failure_reason
        self.created_at = created_at
        self.updated_at = updated_at

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


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

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


        :param id: The id of this DeliverabilityTestDto.  # 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 DeliverabilityTestDto.  # noqa: E501


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

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


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

        self._name = name

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


        :return: The description of this DeliverabilityTestDto.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this DeliverabilityTestDto.


        :param description: The description of this DeliverabilityTestDto.  # noqa: E501
        :type: str
        """

        self._description = description

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


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

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


        :param scope: The scope of this DeliverabilityTestDto.  # 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 selector(self):
        """Gets the selector of this DeliverabilityTestDto.  # noqa: E501


        :return: The selector of this DeliverabilityTestDto.  # noqa: E501
        :rtype: DeliverabilitySelectorOptions
        """
        return self._selector

    @selector.setter
    def selector(self, selector):
        """Sets the selector of this DeliverabilityTestDto.


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

        self._selector = selector

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


        :return: The selected_entity_count of this DeliverabilityTestDto.  # noqa: E501
        :rtype: int
        """
        return self._selected_entity_count

    @selected_entity_count.setter
    def selected_entity_count(self, selected_entity_count):
        """Sets the selected_entity_count of this DeliverabilityTestDto.


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

        self._selected_entity_count = selected_entity_count

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


        :return: The expectations of this DeliverabilityTestDto.  # noqa: E501
        :rtype: list[DeliverabilityExpectation]
        """
        return self._expectations

    @expectations.setter
    def expectations(self, expectations):
        """Sets the expectations of this DeliverabilityTestDto.


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

        self._expectations = expectations

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


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

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


        :param status: The status of this DeliverabilityTestDto.  # 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 start_at(self):
        """Gets the start_at of this DeliverabilityTestDto.  # noqa: E501


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

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


        :param start_at: The start_at of this DeliverabilityTestDto.  # 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 started_at(self):
        """Gets the started_at of this DeliverabilityTestDto.  # noqa: E501


        :return: The started_at of this DeliverabilityTestDto.  # noqa: E501
        :rtype: datetime
        """
        return self._started_at

    @started_at.setter
    def started_at(self, started_at):
        """Sets the started_at of this DeliverabilityTestDto.


        :param started_at: The started_at of this DeliverabilityTestDto.  # noqa: E501
        :type: datetime
        """

        self._started_at = started_at

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


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

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


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

        self._completed_at = completed_at

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


        :return: The max_duration_seconds of this DeliverabilityTestDto.  # noqa: E501
        :rtype: int
        """
        return self._max_duration_seconds

    @max_duration_seconds.setter
    def max_duration_seconds(self, max_duration_seconds):
        """Sets the max_duration_seconds of this DeliverabilityTestDto.


        :param max_duration_seconds: The max_duration_seconds of this DeliverabilityTestDto.  # noqa: E501
        :type: int
        """

        self._max_duration_seconds = max_duration_seconds

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


        :return: The success_threshold_percent of this DeliverabilityTestDto.  # 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 DeliverabilityTestDto.


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

        self._success_threshold_percent = success_threshold_percent

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


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

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


        :param threshold_status: The threshold_status of this DeliverabilityTestDto.  # 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

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


        :return: The threshold_met of this DeliverabilityTestDto.  # noqa: E501
        :rtype: bool
        """
        return self._threshold_met

    @threshold_met.setter
    def threshold_met(self, threshold_met):
        """Sets the threshold_met of this DeliverabilityTestDto.


        :param threshold_met: The threshold_met of this DeliverabilityTestDto.  # noqa: E501
        :type: bool
        """

        self._threshold_met = threshold_met

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


        :return: The last_evaluated_at of this DeliverabilityTestDto.  # noqa: E501
        :rtype: datetime
        """
        return self._last_evaluated_at

    @last_evaluated_at.setter
    def last_evaluated_at(self, last_evaluated_at):
        """Sets the last_evaluated_at of this DeliverabilityTestDto.


        :param last_evaluated_at: The last_evaluated_at of this DeliverabilityTestDto.  # noqa: E501
        :type: datetime
        """

        self._last_evaluated_at = last_evaluated_at

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


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

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


        :param total_entities: The total_entities of this DeliverabilityTestDto.  # 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 DeliverabilityTestDto.  # noqa: E501


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

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


        :param matched_entities: The matched_entities of this DeliverabilityTestDto.  # 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 DeliverabilityTestDto.  # noqa: E501


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

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


        :param unmatched_entities: The unmatched_entities of this DeliverabilityTestDto.  # 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 DeliverabilityTestDto.  # noqa: E501


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

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


        :param completion_percentage: The completion_percentage of this DeliverabilityTestDto.  # 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 timed_out(self):
        """Gets the timed_out of this DeliverabilityTestDto.  # noqa: E501


        :return: The timed_out of this DeliverabilityTestDto.  # noqa: E501
        :rtype: bool
        """
        return self._timed_out

    @timed_out.setter
    def timed_out(self, timed_out):
        """Sets the timed_out of this DeliverabilityTestDto.


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

        self._timed_out = timed_out

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


        :return: The failure_reason of this DeliverabilityTestDto.  # noqa: E501
        :rtype: str
        """
        return self._failure_reason

    @failure_reason.setter
    def failure_reason(self, failure_reason):
        """Sets the failure_reason of this DeliverabilityTestDto.


        :param failure_reason: The failure_reason of this DeliverabilityTestDto.  # noqa: E501
        :type: str
        """

        self._failure_reason = failure_reason

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


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

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


        :param created_at: The created_at of this DeliverabilityTestDto.  # 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 updated_at(self):
        """Gets the updated_at of this DeliverabilityTestDto.  # noqa: E501


        :return: The updated_at of this DeliverabilityTestDto.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this DeliverabilityTestDto.


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

        self._updated_at = updated_at

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

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