# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

    OpenAPI spec version: 4.11.5
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class TokenDetailed(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 = {
        'status': 'TokenStatusEnum',
        'user': 'User',
        'activation_date': 'datetime',
        'creation_date': 'datetime',
        'expiry_date': 'datetime'
    }

    attribute_map = {
        'status': 'status',
        'user': 'user',
        'activation_date': 'activationDate',
        'creation_date': 'creationDate',
        'expiry_date': 'expiryDate'
    }

    def __init__(self, status=None, user=None, activation_date=None, creation_date=None, expiry_date=None, _configuration=None):  # noqa: E501
        """TokenDetailed - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._status = None
        self._user = None
        self._activation_date = None
        self._creation_date = None
        self._expiry_date = None
        self.discriminator = None

        if status is not None:
            self.status = status
        if user is not None:
            self.user = user
        if activation_date is not None:
            self.activation_date = activation_date
        if creation_date is not None:
            self.creation_date = creation_date
        if expiry_date is not None:
            self.expiry_date = expiry_date

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

        The possible statuses for a token Possible values are: * activationExpired: The token has exceeded the activation deadline. * active: The token is active and can be used. * blocked: The token is blocked from being used. * canceled: The token is canceled and cannot be used. * expired: The token has exceeded the expiration date. * pending: The token has been assigned to an user, but it's still pending for activation. * unassigned: The token is not assigned to an user.   # noqa: E501

        :return: The status of this TokenDetailed.  # noqa: E501
        :rtype: TokenStatusEnum
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this TokenDetailed.

        The possible statuses for a token Possible values are: * activationExpired: The token has exceeded the activation deadline. * active: The token is active and can be used. * blocked: The token is blocked from being used. * canceled: The token is canceled and cannot be used. * expired: The token has exceeded the expiration date. * pending: The token has been assigned to an user, but it's still pending for activation. * unassigned: The token is not assigned to an user.   # noqa: E501

        :param status: The status of this TokenDetailed.  # noqa: E501
        :type: TokenStatusEnum
        """

        self._status = status

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

        The assigned user. Only if status is not `unassigned`.  # noqa: E501

        :return: The user of this TokenDetailed.  # noqa: E501
        :rtype: User
        """
        return self._user

    @user.setter
    def user(self, user):
        """Sets the user of this TokenDetailed.

        The assigned user. Only if status is not `unassigned`.  # noqa: E501

        :param user: The user of this TokenDetailed.  # noqa: E501
        :type: User
        """

        self._user = user

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

        When the owner user activated the token.   # noqa: E501

        :return: The activation_date of this TokenDetailed.  # noqa: E501
        :rtype: datetime
        """
        return self._activation_date

    @activation_date.setter
    def activation_date(self, activation_date):
        """Sets the activation_date of this TokenDetailed.

        When the owner user activated the token.   # noqa: E501

        :param activation_date: The activation_date of this TokenDetailed.  # noqa: E501
        :type: datetime
        """

        self._activation_date = activation_date

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

        The creation date.  # noqa: E501

        :return: The creation_date of this TokenDetailed.  # noqa: E501
        :rtype: datetime
        """
        return self._creation_date

    @creation_date.setter
    def creation_date(self, creation_date):
        """Sets the creation_date of this TokenDetailed.

        The creation date.  # noqa: E501

        :param creation_date: The creation_date of this TokenDetailed.  # noqa: E501
        :type: datetime
        """

        self._creation_date = creation_date

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

        The expiration date. Only if the corresponding token type defines an expiration period.  # noqa: E501

        :return: The expiry_date of this TokenDetailed.  # noqa: E501
        :rtype: datetime
        """
        return self._expiry_date

    @expiry_date.setter
    def expiry_date(self, expiry_date):
        """Sets the expiry_date of this TokenDetailed.

        The expiration date. Only if the corresponding token type defines an expiration period.  # noqa: E501

        :param expiry_date: The expiry_date of this TokenDetailed.  # noqa: E501
        :type: datetime
        """

        self._expiry_date = expiry_date

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
