# 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 DevicePreviewRunDto(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 = {
        'run_id': 'str',
        'email_id': 'str',
        'status': 'str',
        'primary_screenshot_id': 'str',
        'requested_providers': 'list[str]',
        'imported_providers': 'list[str]',
        'warnings': 'list[str]',
        'provider_message_ids': 'dict(str, str)',
        'target_count': 'int',
        'screenshot_count': 'int',
        'created_at': 'datetime',
        'updated_at': 'datetime'
    }

    attribute_map = {
        'run_id': 'runId',
        'email_id': 'emailId',
        'status': 'status',
        'primary_screenshot_id': 'primaryScreenshotId',
        'requested_providers': 'requestedProviders',
        'imported_providers': 'importedProviders',
        'warnings': 'warnings',
        'provider_message_ids': 'providerMessageIds',
        'target_count': 'targetCount',
        'screenshot_count': 'screenshotCount',
        'created_at': 'createdAt',
        'updated_at': 'updatedAt'
    }

    def __init__(self, run_id=None, email_id=None, status=None, primary_screenshot_id=None, requested_providers=None, imported_providers=None, warnings=None, provider_message_ids=None, target_count=None, screenshot_count=None, created_at=None, updated_at=None, local_vars_configuration=None):  # noqa: E501
        """DevicePreviewRunDto - 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._run_id = None
        self._email_id = None
        self._status = None
        self._primary_screenshot_id = None
        self._requested_providers = None
        self._imported_providers = None
        self._warnings = None
        self._provider_message_ids = None
        self._target_count = None
        self._screenshot_count = None
        self._created_at = None
        self._updated_at = None
        self.discriminator = None

        self.run_id = run_id
        self.email_id = email_id
        self.status = status
        if primary_screenshot_id is not None:
            self.primary_screenshot_id = primary_screenshot_id
        if requested_providers is not None:
            self.requested_providers = requested_providers
        if imported_providers is not None:
            self.imported_providers = imported_providers
        if warnings is not None:
            self.warnings = warnings
        if provider_message_ids is not None:
            self.provider_message_ids = provider_message_ids
        self.target_count = target_count
        self.screenshot_count = screenshot_count
        self.created_at = created_at
        self.updated_at = updated_at

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


        :return: The run_id of this DevicePreviewRunDto.  # noqa: E501
        :rtype: str
        """
        return self._run_id

    @run_id.setter
    def run_id(self, run_id):
        """Sets the run_id of this DevicePreviewRunDto.


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

        self._run_id = run_id

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


        :return: The email_id of this DevicePreviewRunDto.  # noqa: E501
        :rtype: str
        """
        return self._email_id

    @email_id.setter
    def email_id(self, email_id):
        """Sets the email_id of this DevicePreviewRunDto.


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

        self._email_id = email_id

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


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

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


        :param status: The status of this DevicePreviewRunDto.  # 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", "AWAITING_ARRIVAL", "CAPTURING", "PARTIAL_COMPLETE", "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 primary_screenshot_id(self):
        """Gets the primary_screenshot_id of this DevicePreviewRunDto.  # noqa: E501


        :return: The primary_screenshot_id of this DevicePreviewRunDto.  # noqa: E501
        :rtype: str
        """
        return self._primary_screenshot_id

    @primary_screenshot_id.setter
    def primary_screenshot_id(self, primary_screenshot_id):
        """Sets the primary_screenshot_id of this DevicePreviewRunDto.


        :param primary_screenshot_id: The primary_screenshot_id of this DevicePreviewRunDto.  # noqa: E501
        :type: str
        """

        self._primary_screenshot_id = primary_screenshot_id

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


        :return: The requested_providers of this DevicePreviewRunDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._requested_providers

    @requested_providers.setter
    def requested_providers(self, requested_providers):
        """Sets the requested_providers of this DevicePreviewRunDto.


        :param requested_providers: The requested_providers of this DevicePreviewRunDto.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["GMAIL", "OUTLOOK", "YAHOO"]  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                not set(requested_providers).issubset(set(allowed_values))):  # noqa: E501
            raise ValueError(
                "Invalid values for `requested_providers` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(requested_providers) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._requested_providers = requested_providers

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


        :return: The imported_providers of this DevicePreviewRunDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._imported_providers

    @imported_providers.setter
    def imported_providers(self, imported_providers):
        """Sets the imported_providers of this DevicePreviewRunDto.


        :param imported_providers: The imported_providers of this DevicePreviewRunDto.  # noqa: E501
        :type: list[str]
        """
        allowed_values = ["GMAIL", "OUTLOOK", "YAHOO"]  # noqa: E501
        if (self.local_vars_configuration.client_side_validation and
                not set(imported_providers).issubset(set(allowed_values))):  # noqa: E501
            raise ValueError(
                "Invalid values for `imported_providers` [{0}], must be a subset of [{1}]"  # noqa: E501
                .format(", ".join(map(str, set(imported_providers) - set(allowed_values))),  # noqa: E501
                        ", ".join(map(str, allowed_values)))
            )

        self._imported_providers = imported_providers

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


        :return: The warnings of this DevicePreviewRunDto.  # noqa: E501
        :rtype: list[str]
        """
        return self._warnings

    @warnings.setter
    def warnings(self, warnings):
        """Sets the warnings of this DevicePreviewRunDto.


        :param warnings: The warnings of this DevicePreviewRunDto.  # noqa: E501
        :type: list[str]
        """

        self._warnings = warnings

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


        :return: The provider_message_ids of this DevicePreviewRunDto.  # noqa: E501
        :rtype: dict(str, str)
        """
        return self._provider_message_ids

    @provider_message_ids.setter
    def provider_message_ids(self, provider_message_ids):
        """Sets the provider_message_ids of this DevicePreviewRunDto.


        :param provider_message_ids: The provider_message_ids of this DevicePreviewRunDto.  # noqa: E501
        :type: dict(str, str)
        """

        self._provider_message_ids = provider_message_ids

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


        :return: The target_count of this DevicePreviewRunDto.  # noqa: E501
        :rtype: int
        """
        return self._target_count

    @target_count.setter
    def target_count(self, target_count):
        """Sets the target_count of this DevicePreviewRunDto.


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

        self._target_count = target_count

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


        :return: The screenshot_count of this DevicePreviewRunDto.  # noqa: E501
        :rtype: int
        """
        return self._screenshot_count

    @screenshot_count.setter
    def screenshot_count(self, screenshot_count):
        """Sets the screenshot_count of this DevicePreviewRunDto.


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

        self._screenshot_count = screenshot_count

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


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

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


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


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

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


        :param updated_at: The updated_at of this DevicePreviewRunDto.  # 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, DevicePreviewRunDto):
            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, DevicePreviewRunDto):
            return True

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