# coding: utf-8

"""
    Selling Partner API for Tokens 

    The Selling Partner API for Tokens provides a secure way to access a customer's PII (Personally Identifiable Information). You can call the Tokens API to get a Restricted Data Token (RDT) for one or more restricted resources that you specify. The RDT authorizes subsequent calls to restricted operations that correspond to the restricted resources that you specified.  For more information, see the [Tokens API Use Case Guide](doc:tokens-api-use-case-guide).

    The version of the OpenAPI document: 2021-03-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class CreateRestrictedDataTokenResponse(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 = {
        'restricted_data_token': 'str',
        'expires_in': 'int',
    }

    attribute_map = {
        'restricted_data_token': 'restrictedDataToken',
        'expires_in': 'expiresIn',
    }

    def __init__(self, restricted_data_token=None, expires_in=None, _configuration=None):  # noqa: E501
        """CreateRestrictedDataTokenResponse - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._restricted_data_token = None
        self._expires_in = None
        self.discriminator = None

        if restricted_data_token is not None:
            self.restricted_data_token = restricted_data_token
        if expires_in is not None:
            self.expires_in = expires_in

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

        A Restricted Data Token (RDT). This is a short-lived access token that authorizes calls to restricted operations. Pass this value with the x-amz-access-token header when making subsequent calls to these restricted resources.  # noqa: E501

        :return: The restricted_data_token of this CreateRestrictedDataTokenResponse.  # noqa: E501
        :rtype: str
        """
        return self._restricted_data_token

    @restricted_data_token.setter
    def restricted_data_token(self, restricted_data_token):
        """Sets the restricted_data_token of this CreateRestrictedDataTokenResponse.

        A Restricted Data Token (RDT). This is a short-lived access token that authorizes calls to restricted operations. Pass this value with the x-amz-access-token header when making subsequent calls to these restricted resources.  # noqa: E501

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

        self._restricted_data_token = restricted_data_token

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

        The lifetime of the Restricted Data Token, in seconds.  # noqa: E501

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

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

        The lifetime of the Restricted Data Token, in seconds.  # noqa: E501

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

        self._expires_in = expires_in

    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(CreateRestrictedDataTokenResponse, 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, CreateRestrictedDataTokenResponse):
            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, CreateRestrictedDataTokenResponse):
            return True

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