# 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.portingrequestanswer.porting_request_answer_repeats import PortingRequestAnswerRepeats  # noqa: F401,E501


class PortingRequestAnswer(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',
        'blocking': 'str',
        'repeats': 'list[PortingRequestAnswerRepeats]'
    }

    attribute_map = {
        'dossierid': 'dossierid',
        'blocking': 'blocking',
        'repeats': 'repeats'
    }

    def __init__(self, dossierid=None, blocking=None, repeats=None):  # noqa: E501
        """PortingRequestAnswer - a model defined in Swagger"""  # noqa: E501

        self._dossierid = None
        self._blocking = None
        self._repeats = None
        self.discriminator = None

        self.dossierid = dossierid
        self.blocking = blocking
        self.repeats = repeats

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


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

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


        :param dossierid: The dossierid of this PortingRequestAnswer.  # 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 blocking(self):
        """Gets the blocking of this PortingRequestAnswer.  # noqa: E501


        :return: The blocking of this PortingRequestAnswer.  # noqa: E501
        :rtype: str
        """
        return self._blocking

    @blocking.setter
    def blocking(self, blocking):
        """Sets the blocking of this PortingRequestAnswer.


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

        self._blocking = blocking

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


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

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


        :param repeats: The repeats of this PortingRequestAnswer.  # noqa: E501
        :type: list[PortingRequestAnswerRepeats]
        """
        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(PortingRequestAnswer, 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, PortingRequestAnswer):
            return False

        return self.__dict__ == other.__dict__

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