# coding: utf-8

"""
    EmbedOps API

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

    OpenAPI spec version: 1.0.0
    Contact: support@embedops.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six


class GitlabAccessTokenToken(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 = {
        "access_level": "float",
        "active": "bool",
        "created_at": "str",
        "expires_at": "str",
        "id": "float",
        "name": "str",
        "revoked": "bool",
        "scopes": "list[str]",
        "token": "str",
        "user_id": "float",
    }

    attribute_map = {
        "access_level": "access_level",
        "active": "active",
        "created_at": "created_at",
        "expires_at": "expires_at",
        "id": "id",
        "name": "name",
        "revoked": "revoked",
        "scopes": "scopes",
        "token": "token",
        "user_id": "user_id",
    }

    def __init__(
        self,
        access_level=None,
        active=None,
        created_at=None,
        expires_at=None,
        id=None,
        name=None,
        revoked=None,
        scopes=None,
        token=None,
        user_id=None,
    ):  # noqa: E501
        """GitlabAccessTokenToken - a model defined in Swagger"""  # noqa: E501
        self._access_level = None
        self._active = None
        self._created_at = None
        self._expires_at = None
        self._id = None
        self._name = None
        self._revoked = None
        self._scopes = None
        self._token = None
        self._user_id = None
        self.discriminator = None
        if access_level is not None:
            self.access_level = access_level
        if active is not None:
            self.active = active
        if created_at is not None:
            self.created_at = created_at
        if expires_at is not None:
            self.expires_at = expires_at
        if id is not None:
            self.id = id
        if name is not None:
            self.name = name
        if revoked is not None:
            self.revoked = revoked
        if scopes is not None:
            self.scopes = scopes
        if token is not None:
            self.token = token
        if user_id is not None:
            self.user_id = user_id

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


        :return: The access_level of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: float
        """
        return self._access_level

    @access_level.setter
    def access_level(self, access_level):
        """Sets the access_level of this GitlabAccessTokenToken.


        :param access_level: The access_level of this GitlabAccessTokenToken.  # noqa: E501
        :type: float
        """
        allowed_values = [10, 20]  # noqa: E501
        if access_level not in allowed_values:
            raise ValueError(
                "Invalid value for `access_level` ({0}), must be one of {1}".format(  # noqa: E501
                    access_level, allowed_values
                )
            )

        self._access_level = access_level

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


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

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


        :param active: The active of this GitlabAccessTokenToken.  # noqa: E501
        :type: bool
        """

        self._active = active

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


        :return: The created_at of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: str
        """
        return self._created_at

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


        :param created_at: The created_at of this GitlabAccessTokenToken.  # noqa: E501
        :type: str
        """

        self._created_at = created_at

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


        :return: The expires_at of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: str
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this GitlabAccessTokenToken.


        :param expires_at: The expires_at of this GitlabAccessTokenToken.  # noqa: E501
        :type: str
        """

        self._expires_at = expires_at

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


        :return: The id of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: float
        """
        return self._id

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


        :param id: The id of this GitlabAccessTokenToken.  # noqa: E501
        :type: float
        """

        self._id = id

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


        :return: The name of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this GitlabAccessTokenToken.


        :param name: The name of this GitlabAccessTokenToken.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The revoked of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: bool
        """
        return self._revoked

    @revoked.setter
    def revoked(self, revoked):
        """Sets the revoked of this GitlabAccessTokenToken.


        :param revoked: The revoked of this GitlabAccessTokenToken.  # noqa: E501
        :type: bool
        """

        self._revoked = revoked

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


        :return: The scopes of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: list[str]
        """
        return self._scopes

    @scopes.setter
    def scopes(self, scopes):
        """Sets the scopes of this GitlabAccessTokenToken.


        :param scopes: The scopes of this GitlabAccessTokenToken.  # noqa: E501
        :type: list[str]
        """
        allowed_values = [
            "api",
            "read_api",
            "read_registry",
            "write_registry",
            "read_repository",
            "write_repository",
        ]  # noqa: E501
        if not set(scopes).issubset(set(allowed_values)):
            raise ValueError(
                "Invalid values for `scopes` [{0}], must be a subset of [{1}]".format(  # noqa: E501
                    ", ".join(
                        map(str, set(scopes) - set(allowed_values))
                    ),  # noqa: E501
                    ", ".join(map(str, allowed_values)),
                )
            )

        self._scopes = scopes

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


        :return: The token of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: str
        """
        return self._token

    @token.setter
    def token(self, token):
        """Sets the token of this GitlabAccessTokenToken.


        :param token: The token of this GitlabAccessTokenToken.  # noqa: E501
        :type: str
        """

        self._token = token

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


        :return: The user_id of this GitlabAccessTokenToken.  # noqa: E501
        :rtype: float
        """
        return self._user_id

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


        :param user_id: The user_id of this GitlabAccessTokenToken.  # noqa: E501
        :type: float
        """

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

        return self.__dict__ == other.__dict__

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