# coding: utf-8

"""
    COIN Number Portability API V3

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

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

import pprint
import re

import six


class Cancel(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',
        'note': 'str'
    }

    attribute_map = {
        'dossierid': 'dossierid',
        'note': 'note'
    }

    def __init__(self, dossierid=None, note=None):
        """Cancel - a model defined in Swagger"""
        self._dossierid = None
        self._note = None
        self.discriminator = None
        self.dossierid = dossierid
        if note is not None:
            self.note = note

    @property
    def dossierid(self):
        """Gets the dossierid of this Cancel.


        :return: The dossierid of this Cancel.
        :rtype: str
        """
        return self._dossierid

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


        :param dossierid: The dossierid of this Cancel.
        :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 note(self):
        """Gets the note of this Cancel.


        :return: The note of this Cancel.
        :rtype: str
        """
        return self._note

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


        :param note: The note of this Cancel.
        :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

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

        return self.__dict__ == other.__dict__

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