# coding: utf-8

"""
    Coin CRDB Rest API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 3.0.0
    Contact: devops@coin.nl
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from coin_sdk.number_portability.messages.portingperformed.porting_performed_repeats import PortingPerformedRepeats  # noqa: F401,E501


class PortingPerformed(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """

    """
    Attributes:
      swagger_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.
    """
    swagger_types = {
        'dossierid': 'str',
        'recipientnetworkoperator': 'str',
        'donornetworkoperator': 'str',
        'actualdatetime': 'str',
        'batchporting': 'str',
        'repeats': 'list[PortingPerformedRepeats]'
    }

    attribute_map = {
        'dossierid': 'dossierid',
        'recipientnetworkoperator': 'recipientnetworkoperator',
        'donornetworkoperator': 'donornetworkoperator',
        'actualdatetime': 'actualdatetime',
        'batchporting': 'batchporting',
        'repeats': 'repeats'
    }

    def __init__(self, dossierid=None, recipientnetworkoperator=None, donornetworkoperator=None, actualdatetime=None, batchporting=None, repeats=None):  # noqa: E501
        """PortingPerformed - a model defined in Swagger"""  # noqa: E501

        self._dossierid = None
        self._recipientnetworkoperator = None
        self._donornetworkoperator = None
        self._actualdatetime = None
        self._batchporting = None
        self._repeats = None
        self.discriminator = None

        self.dossierid = dossierid
        self.recipientnetworkoperator = recipientnetworkoperator
        self.donornetworkoperator = donornetworkoperator
        if actualdatetime is not None:
            self.actualdatetime = actualdatetime
        if batchporting is not None:
            self.batchporting = batchporting
        self.repeats = repeats

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


        :return: The dossierid of this PortingPerformed.  # noqa: E501
        :rtype: str
        """
        return self._dossierid

    @dossierid.setter
    def dossierid(self, dossierid):
        """Sets the dossierid of this PortingPerformed.


        :param dossierid: The dossierid of this PortingPerformed.  # noqa: E501
        :type: str
        """
        if dossierid is None:
            raise ValueError("Invalid value for `dossierid`, must not be `None`")  # noqa: E501
        if dossierid is not None and not re.search(r'[-0-9A-Z]{5,26}', dossierid):  # noqa: E501
            raise ValueError(r"Invalid value for `dossierid`, must be a follow pattern or equal to `/[-0-9A-Z]{5,26}/`")  # noqa: E501

        self._dossierid = dossierid

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


        :return: The recipientnetworkoperator of this PortingPerformed.  # noqa: E501
        :rtype: str
        """
        return self._recipientnetworkoperator

    @recipientnetworkoperator.setter
    def recipientnetworkoperator(self, recipientnetworkoperator):
        """Sets the recipientnetworkoperator of this PortingPerformed.


        :param recipientnetworkoperator: The recipientnetworkoperator of this PortingPerformed.  # noqa: E501
        :type: str
        """
        if recipientnetworkoperator is None:
            raise ValueError("Invalid value for `recipientnetworkoperator`, must not be `None`")  # noqa: E501
        if recipientnetworkoperator is not None and not re.search(r'[0-9A-Z]{3,6}', recipientnetworkoperator):  # noqa: E501
            raise ValueError(r"Invalid value for `recipientnetworkoperator`, must be a follow pattern or equal to `/[0-9A-Z]{3,6}/`")  # noqa: E501

        self._recipientnetworkoperator = recipientnetworkoperator

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


        :return: The donornetworkoperator of this PortingPerformed.  # noqa: E501
        :rtype: str
        """
        return self._donornetworkoperator

    @donornetworkoperator.setter
    def donornetworkoperator(self, donornetworkoperator):
        """Sets the donornetworkoperator of this PortingPerformed.


        :param donornetworkoperator: The donornetworkoperator of this PortingPerformed.  # noqa: E501
        :type: str
        """
        if donornetworkoperator is None:
            raise ValueError("Invalid value for `donornetworkoperator`, must not be `None`")  # noqa: E501
        if donornetworkoperator is not None and not re.search(r'[0-9A-Z]{3,6}', donornetworkoperator):  # noqa: E501
            raise ValueError(r"Invalid value for `donornetworkoperator`, must be a follow pattern or equal to `/[0-9A-Z]{3,6}/`")  # noqa: E501

        self._donornetworkoperator = donornetworkoperator

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


        :return: The actualdatetime of this PortingPerformed.  # noqa: E501
        :rtype: str
        """
        return self._actualdatetime

    @actualdatetime.setter
    def actualdatetime(self, actualdatetime):
        """Sets the actualdatetime of this PortingPerformed.


        :param actualdatetime: The actualdatetime of this PortingPerformed.  # noqa: E501
        :type: str
        """
        if actualdatetime is not None and not re.search(r'[0-9]{14}', actualdatetime):  # noqa: E501
            raise ValueError(r"Invalid value for `actualdatetime`, must be a follow pattern or equal to `/[0-9]{14}/`")  # noqa: E501

        self._actualdatetime = actualdatetime

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


        :return: The batchporting of this PortingPerformed.  # noqa: E501
        :rtype: str
        """
        return self._batchporting

    @batchporting.setter
    def batchporting(self, batchporting):
        """Sets the batchporting of this PortingPerformed.


        :param batchporting: The batchporting of this PortingPerformed.  # noqa: E501
        :type: str
        """
        if batchporting is not None and not re.search(r'[Y]{0,}', batchporting):  # noqa: E501
            raise ValueError(r"Invalid value for `batchporting`, must be a follow pattern or equal to `/[Y]{0,}/`")  # noqa: E501

        self._batchporting = batchporting

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


        :return: The repeats of this PortingPerformed.  # noqa: E501
        :rtype: list[PortingPerformedRepeats]
        """
        return self._repeats

    @repeats.setter
    def repeats(self, repeats):
        """Sets the repeats of this PortingPerformed.


        :param repeats: The repeats of this PortingPerformed.  # noqa: E501
        :type: list[PortingPerformedRepeats]
        """
        if repeats is None:
            raise ValueError("Invalid value for `repeats`, must not be `None`")  # noqa: E501

        self._repeats = repeats

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_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
        if issubclass(PortingPerformed, dict):
            for key, value in self.items():
                result[key] = 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, PortingPerformed):
            return False

        return self.__dict__ == other.__dict__

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