# coding: utf-8

"""
    Amber API Server

    Boon Logic Amber API server

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

import pprint
import re  # noqa: F401

import six

class PostOauth2RefreshResponse(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 = {
        'id_token': 'str',
        'token_type': 'str',
        'expires_in': 'str',
        'refresh_token': 'str'
    }

    attribute_map = {
        'id_token': 'idToken',
        'token_type': 'tokenType',
        'expires_in': 'expiresIn',
        'refresh_token': 'refreshToken'
    }

    def __init__(self, id_token=None, token_type=None, expires_in=None, refresh_token=None):
        """PostOauth2RefreshResponse - a model defined in Swagger"""
        self._id_token = None
        self._token_type = None
        self._expires_in = None
        self._refresh_token = None
        self.discriminator = None
        if id_token is not None:
            self.id_token = id_token
        if token_type is not None:
            self.token_type = token_type
        if expires_in is not None:
            self.expires_in = expires_in
        if refresh_token is not None:
            self.refresh_token = refresh_token

    @property
    def id_token(self):
        """Gets the id_token of this PostOauth2RefreshResponse.

        Authorization token. Requests to all API endpoints except `POST /oauth2` must include a valid token in a header field called `Authorization` with value `Bearer ${idToken}`.

        :return: The id_token of this PostOauth2RefreshResponse.
        :rtype: str
        """
        return self._id_token

    @id_token.setter
    def id_token(self, id_token):
        """Sets the id_token of this PostOauth2RefreshResponse.

        Authorization token. Requests to all API endpoints except `POST /oauth2` must include a valid token in a header field called `Authorization` with value `Bearer ${idToken}`.

        :param id_token: The id_token of this PostOauth2RefreshResponse.
        :type: str
        """

        self._id_token = id_token

    @property
    def token_type(self):
        """Gets the token_type of this PostOauth2RefreshResponse.

        Always `Bearer`.

        :return: The token_type of this PostOauth2RefreshResponse.
        :rtype: str
        """
        return self._token_type

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

        Always `Bearer`.

        :param token_type: The token_type of this PostOauth2RefreshResponse.
        :type: str
        """

        self._token_type = token_type

    @property
    def expires_in(self):
        """Gets the expires_in of this PostOauth2RefreshResponse.

        Number of seconds before `idToken` becomes invalid.

        :return: The expires_in of this PostOauth2RefreshResponse.
        :rtype: str
        """
        return self._expires_in

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

        Number of seconds before `idToken` becomes invalid.

        :param expires_in: The expires_in of this PostOauth2RefreshResponse.
        :type: str
        """

        self._expires_in = expires_in

    @property
    def refresh_token(self):
        """Gets the refresh_token of this PostOauth2RefreshResponse.

        Can be used to refresh the `idToken` when it is nearing expiration.

        :return: The refresh_token of this PostOauth2RefreshResponse.
        :rtype: str
        """
        return self._refresh_token

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

        Can be used to refresh the `idToken` when it is nearing expiration.

        :param refresh_token: The refresh_token of this PostOauth2RefreshResponse.
        :type: str
        """

        self._refresh_token = refresh_token

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

        return self.__dict__ == other.__dict__

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