# coding: utf-8

"""
    Karbon Platform Services API reference.

    OpenAPI documentation for public facing Karbon Platform Services API  This API documentation is generated from source code using go-swagger. Do not edit the generated kps_api.json directly!  # noqa: E501

    OpenAPI spec version: 1.0
    Contact: karbon-platform-services-api@nutanix.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class UserApiToken(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 = {
        'active': 'bool',
        'created_at': 'datetime',
        'id': 'str',
        'updated_at': 'datetime',
        'used_at': 'datetime',
        'user_id': 'str'
    }

    attribute_map = {
        'active': 'active',
        'created_at': 'createdAt',
        'id': 'id',
        'updated_at': 'updatedAt',
        'used_at': 'usedAt',
        'user_id': 'userId'
    }

    def __init__(self, active=None, created_at=None, id=None, updated_at=None, used_at=None, user_id=None):  # noqa: E501
        """UserApiToken - a model defined in Swagger"""  # noqa: E501
        self._active = None
        self._created_at = None
        self._id = None
        self._updated_at = None
        self._used_at = None
        self._user_id = None
        self.discriminator = None
        self.active = active
        if created_at is not None:
            self.created_at = created_at
        if id is not None:
            self.id = id
        if updated_at is not None:
            self.updated_at = updated_at
        if used_at is not None:
            self.used_at = used_at
        self.user_id = user_id

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

        Whether the token is active  # noqa: E501

        :return: The active of this UserApiToken.  # noqa: E501
        :rtype: bool
        """
        return self._active

    @active.setter
    def active(self, active):
        """Sets the active of this UserApiToken.

        Whether the token is active  # noqa: E501

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

        self._active = active

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

        created at timestamp  # noqa: E501

        :return: The created_at of this UserApiToken.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this UserApiToken.

        created at timestamp  # noqa: E501

        :param created_at: The created_at of this UserApiToken.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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

        ID of the user API token  # noqa: E501

        :return: The id of this UserApiToken.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this UserApiToken.

        ID of the user API token  # noqa: E501

        :param id: The id of this UserApiToken.  # noqa: E501
        :type: str
        """

        self._id = id

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

        updated at timestamp  # noqa: E501

        :return: The updated_at of this UserApiToken.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this UserApiToken.

        updated at timestamp  # noqa: E501

        :param updated_at: The updated_at of this UserApiToken.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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

        last used timestamp  # noqa: E501

        :return: The used_at of this UserApiToken.  # noqa: E501
        :rtype: datetime
        """
        return self._used_at

    @used_at.setter
    def used_at(self, used_at):
        """Sets the used_at of this UserApiToken.

        last used timestamp  # noqa: E501

        :param used_at: The used_at of this UserApiToken.  # noqa: E501
        :type: datetime
        """

        self._used_at = used_at

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

        User ID  # noqa: E501

        :return: The user_id of this UserApiToken.  # noqa: E501
        :rtype: str
        """
        return self._user_id

    @user_id.setter
    def user_id(self, user_id):
        """Sets the user_id of this UserApiToken.

        User ID  # noqa: E501

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

        self._user_id = user_id

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

        return self.__dict__ == other.__dict__

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