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


class PortingPerformedSeq(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',
        'backporting': 'str',
        'pop': 'str',
        'repeats': 'list[EnumRepeats]'
    }

    attribute_map = {
        'numberseries': 'numberseries',
        'backporting': 'backporting',
        'pop': 'pop',
        'repeats': 'repeats'
    }

    def __init__(self, numberseries=None, backporting=None, pop=None, repeats=None):  # noqa: E501
        """PortingPerformedSeq - a model defined in Swagger"""  # noqa: E501

        self._numberseries = None
        self._backporting = None
        self._pop = None
        self._repeats = None
        self.discriminator = None

        self.numberseries = numberseries
        if backporting is not None:
            self.backporting = backporting
        if pop is not None:
            self.pop = pop
        if repeats is not None:
            self.repeats = repeats

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


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

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


        :param numberseries: The numberseries of this PortingPerformedSeq.  # 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 backporting(self):
        """Gets the backporting of this PortingPerformedSeq.  # noqa: E501


        :return: The backporting of this PortingPerformedSeq.  # noqa: E501
        :rtype: str
        """
        return self._backporting

    @backporting.setter
    def backporting(self, backporting):
        """Sets the backporting of this PortingPerformedSeq.


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

        self._backporting = backporting

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


        :return: The pop of this PortingPerformedSeq.  # noqa: E501
        :rtype: str
        """
        return self._pop

    @pop.setter
    def pop(self, pop):
        """Sets the pop of this PortingPerformedSeq.


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

        self._pop = pop

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


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

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


        :param repeats: The repeats of this PortingPerformedSeq.  # noqa: E501
        :type: list[EnumRepeats]
        """

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

        return self.__dict__ == other.__dict__

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