# coding: utf-8

"""
    CloudCheckr API

    CloudCheckr API  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class TokenInfoResponse(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 = {
        'type': 'str',
        'client_id': 'str',
        'user_id': 'str',
        'roles': 'list[str]',
        'version1_roles': 'list[str]',
        'customer_id': 'str',
        'expiration': 'datetime'
    }

    attribute_map = {
        'type': 'type',
        'client_id': 'clientId',
        'user_id': 'userId',
        'roles': 'roles',
        'version1_roles': 'version1Roles',
        'customer_id': 'customerId',
        'expiration': 'expiration'
    }

    def __init__(self, type=None, client_id=None, user_id=None, roles=None, version1_roles=None, customer_id=None, expiration=None):  # noqa: E501
        """TokenInfoResponse - a model defined in Swagger"""  # noqa: E501

        self._type = None
        self._client_id = None
        self._user_id = None
        self._roles = None
        self._version1_roles = None
        self._customer_id = None
        self._expiration = None
        self.discriminator = None

        if type is not None:
            self.type = type
        if client_id is not None:
            self.client_id = client_id
        if user_id is not None:
            self.user_id = user_id
        if roles is not None:
            self.roles = roles
        if version1_roles is not None:
            self.version1_roles = version1_roles
        if customer_id is not None:
            self.customer_id = customer_id
        if expiration is not None:
            self.expiration = expiration

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

        The type of authentication (authentication_entity).  # noqa: E501

        :return: The type of this TokenInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._type

    @type.setter
    def type(self, type):
        """Sets the type of this TokenInfoResponse.

        The type of authentication (authentication_entity).  # noqa: E501

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

        self._type = type

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

        The client ID from the token (client_id).  # noqa: E501

        :return: The client_id of this TokenInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._client_id

    @client_id.setter
    def client_id(self, client_id):
        """Sets the client_id of this TokenInfoResponse.

        The client ID from the token (client_id).  # noqa: E501

        :param client_id: The client_id of this TokenInfoResponse.  # noqa: E501
        :type: str
        """

        self._client_id = client_id

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

        The user ID from the token (sub)  # noqa: E501

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

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

        The user ID from the token (sub)  # noqa: E501

        :param user_id: The user_id of this TokenInfoResponse.  # noqa: E501
        :type: str
        """

        self._user_id = user_id

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

        The roles associated with this token.  # noqa: E501

        :return: The roles of this TokenInfoResponse.  # noqa: E501
        :rtype: list[str]
        """
        return self._roles

    @roles.setter
    def roles(self, roles):
        """Sets the roles of this TokenInfoResponse.

        The roles associated with this token.  # noqa: E501

        :param roles: The roles of this TokenInfoResponse.  # noqa: E501
        :type: list[str]
        """

        self._roles = roles

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

        The legacy roles associated with this token.  # noqa: E501

        :return: The version1_roles of this TokenInfoResponse.  # noqa: E501
        :rtype: list[str]
        """
        return self._version1_roles

    @version1_roles.setter
    def version1_roles(self, version1_roles):
        """Sets the version1_roles of this TokenInfoResponse.

        The legacy roles associated with this token.  # noqa: E501

        :param version1_roles: The version1_roles of this TokenInfoResponse.  # noqa: E501
        :type: list[str]
        """

        self._version1_roles = version1_roles

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

        The current customer ID (authz_customer_id).  # noqa: E501

        :return: The customer_id of this TokenInfoResponse.  # noqa: E501
        :rtype: str
        """
        return self._customer_id

    @customer_id.setter
    def customer_id(self, customer_id):
        """Sets the customer_id of this TokenInfoResponse.

        The current customer ID (authz_customer_id).  # noqa: E501

        :param customer_id: The customer_id of this TokenInfoResponse.  # noqa: E501
        :type: str
        """

        self._customer_id = customer_id

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

        The expiration date and time (exp).  # noqa: E501

        :return: The expiration of this TokenInfoResponse.  # noqa: E501
        :rtype: datetime
        """
        return self._expiration

    @expiration.setter
    def expiration(self, expiration):
        """Sets the expiration of this TokenInfoResponse.

        The expiration date and time (exp).  # noqa: E501

        :param expiration: The expiration of this TokenInfoResponse.  # noqa: E501
        :type: datetime
        """

        self._expiration = expiration

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

        return self.__dict__ == other.__dict__

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