# coding: utf-8

"""
    Canopy.Api

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: v1
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from canopy.openapi.configuration import Configuration


class GrantTypeHandlerResponse(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'expires': 'str',
        'issued': 'str',
        'access_token': 'str',
        'canopysimulationsclient_id': 'str',
        'expires_in': 'int',
        'refresh_token': 'str',
        'roles': 'str',
        'tenant_id': 'str',
        'token_type': 'str',
        'user_id': 'str',
        'username': 'str'
    }

    attribute_map = {
        'expires': '.expires',
        'issued': '.issued',
        'access_token': 'access_token',
        'canopysimulationsclient_id': 'canopysimulations:client_id:',
        'expires_in': 'expires_in',
        'refresh_token': 'refresh_token',
        'roles': 'roles',
        'tenant_id': 'tenant_id',
        'token_type': 'token_type',
        'user_id': 'user_id',
        'username': 'username'
    }

    def __init__(self, expires=None, issued=None, access_token=None, canopysimulationsclient_id=None, expires_in=None, refresh_token=None, roles=None, tenant_id=None, token_type=None, user_id=None, username=None, local_vars_configuration=None):  # noqa: E501
        """GrantTypeHandlerResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._expires = None
        self._issued = None
        self._access_token = None
        self._canopysimulationsclient_id = None
        self._expires_in = None
        self._refresh_token = None
        self._roles = None
        self._tenant_id = None
        self._token_type = None
        self._user_id = None
        self._username = None
        self.discriminator = None

        self.expires = expires
        self.issued = issued
        self.access_token = access_token
        self.canopysimulationsclient_id = canopysimulationsclient_id
        if expires_in is not None:
            self.expires_in = expires_in
        self.refresh_token = refresh_token
        self.roles = roles
        self.tenant_id = tenant_id
        self.token_type = token_type
        self.user_id = user_id
        self.username = username

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


        :return: The expires of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._expires

    @expires.setter
    def expires(self, expires):
        """Sets the expires of this GrantTypeHandlerResponse.


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

        self._expires = expires

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


        :return: The issued of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._issued

    @issued.setter
    def issued(self, issued):
        """Sets the issued of this GrantTypeHandlerResponse.


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

        self._issued = issued

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


        :return: The access_token of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._access_token

    @access_token.setter
    def access_token(self, access_token):
        """Sets the access_token of this GrantTypeHandlerResponse.


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

        self._access_token = access_token

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


        :return: The canopysimulationsclient_id of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._canopysimulationsclient_id

    @canopysimulationsclient_id.setter
    def canopysimulationsclient_id(self, canopysimulationsclient_id):
        """Sets the canopysimulationsclient_id of this GrantTypeHandlerResponse.


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

        self._canopysimulationsclient_id = canopysimulationsclient_id

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


        :return: The expires_in of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: int
        """
        return self._expires_in

    @expires_in.setter
    def expires_in(self, expires_in):
        """Sets the expires_in of this GrantTypeHandlerResponse.


        :param expires_in: The expires_in of this GrantTypeHandlerResponse.  # noqa: E501
        :type expires_in: int
        """

        self._expires_in = expires_in

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


        :return: The refresh_token of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._refresh_token

    @refresh_token.setter
    def refresh_token(self, refresh_token):
        """Sets the refresh_token of this GrantTypeHandlerResponse.


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

        self._refresh_token = refresh_token

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


        :return: The roles of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._roles

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


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

        self._roles = roles

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


        :return: The tenant_id of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._tenant_id

    @tenant_id.setter
    def tenant_id(self, tenant_id):
        """Sets the tenant_id of this GrantTypeHandlerResponse.


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

        self._tenant_id = tenant_id

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


        :return: The token_type of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._token_type

    @token_type.setter
    def token_type(self, token_type):
        """Sets the token_type of this GrantTypeHandlerResponse.


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

        self._token_type = token_type

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


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

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


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

        self._user_id = user_id

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


        :return: The username of this GrantTypeHandlerResponse.  # noqa: E501
        :rtype: str
        """
        return self._username

    @username.setter
    def username(self, username):
        """Sets the username of this GrantTypeHandlerResponse.


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

        self._username = username

    def to_dict(self, serialize=False):
        """Returns the model properties as a dict"""
        result = {}

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, GrantTypeHandlerResponse):
            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, GrantTypeHandlerResponse):
            return True

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