# 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.common.number_series import NumberSeries  # noqa: F401,E501


class PortingRequestAnswerSeq(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 = {
        'numberseries': 'NumberSeries',
        'blockingcode': 'str',
        'firstpossibledate': 'str',
        'note': 'str',
        'donornetworkoperator': 'str',
        'donorserviceprovider': 'str'
    }

    attribute_map = {
        'numberseries': 'numberseries',
        'blockingcode': 'blockingcode',
        'firstpossibledate': 'firstpossibledate',
        'note': 'note',
        'donornetworkoperator': 'donornetworkoperator',
        'donorserviceprovider': 'donorserviceprovider'
    }

    def __init__(self, numberseries=None, blockingcode=None, firstpossibledate=None, note=None, donornetworkoperator=None, donorserviceprovider=None):  # noqa: E501
        """PortingRequestAnswerSeq - a model defined in Swagger"""  # noqa: E501

        self._numberseries = None
        self._blockingcode = None
        self._firstpossibledate = None
        self._note = None
        self._donornetworkoperator = None
        self._donorserviceprovider = None
        self.discriminator = None

        self.numberseries = numberseries
        if blockingcode is not None:
            self.blockingcode = blockingcode
        if firstpossibledate is not None:
            self.firstpossibledate = firstpossibledate
        if note is not None:
            self.note = note
        if donornetworkoperator is not None:
            self.donornetworkoperator = donornetworkoperator
        if donorserviceprovider is not None:
            self.donorserviceprovider = donorserviceprovider

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


        :return: The numberseries of this PortingRequestAnswerSeq.  # noqa: E501
        :rtype: NumberSeries
        """
        return self._numberseries

    @numberseries.setter
    def numberseries(self, numberseries):
        """Sets the numberseries of this PortingRequestAnswerSeq.


        :param numberseries: The numberseries of this PortingRequestAnswerSeq.  # noqa: E501
        :type: NumberSeries
        """
        if numberseries is None:
            raise ValueError("Invalid value for `numberseries`, must not be `None`")  # noqa: E501

        self._numberseries = numberseries

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


        :return: The blockingcode of this PortingRequestAnswerSeq.  # noqa: E501
        :rtype: str
        """
        return self._blockingcode

    @blockingcode.setter
    def blockingcode(self, blockingcode):
        """Sets the blockingcode of this PortingRequestAnswerSeq.


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

        self._blockingcode = blockingcode

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


        :return: The firstpossibledate of this PortingRequestAnswerSeq.  # noqa: E501
        :rtype: str
        """
        return self._firstpossibledate

    @firstpossibledate.setter
    def firstpossibledate(self, firstpossibledate):
        """Sets the firstpossibledate of this PortingRequestAnswerSeq.


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

        self._firstpossibledate = firstpossibledate

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


        :return: The note of this PortingRequestAnswerSeq.  # noqa: E501
        :rtype: str
        """
        return self._note

    @note.setter
    def note(self, note):
        """Sets the note of this PortingRequestAnswerSeq.


        :param note: The note of this PortingRequestAnswerSeq.  # noqa: E501
        :type: str
        """
        if note is not None and len(note) > 100:
            raise ValueError("Invalid value for `note`, length must be less than or equal to `100`")  # noqa: E501
        if note is not None and len(note) < 1:
            raise ValueError("Invalid value for `note`, length must be greater than or equal to `1`")  # noqa: E501

        self._note = note

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


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

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


        :param donornetworkoperator: The donornetworkoperator of this PortingRequestAnswerSeq.  # noqa: E501
        :type: str
        """
        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 donorserviceprovider(self):
        """Gets the donorserviceprovider of this PortingRequestAnswerSeq.  # noqa: E501


        :return: The donorserviceprovider of this PortingRequestAnswerSeq.  # noqa: E501
        :rtype: str
        """
        return self._donorserviceprovider

    @donorserviceprovider.setter
    def donorserviceprovider(self, donorserviceprovider):
        """Sets the donorserviceprovider of this PortingRequestAnswerSeq.


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

        self._donorserviceprovider = donorserviceprovider

    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(PortingRequestAnswerSeq, 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, PortingRequestAnswerSeq):
            return False

        return self.__dict__ == other.__dict__

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