# coding: utf-8

"""
    HEP REST API

    The REST API for HEP protocol  # noqa: E501

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

import pprint
import re  # noqa: F401

import six


class AuthCacheRequest(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 = {
        'dapp_key': 'str',
        'protocol': 'str',
        'version': 'str',
        'ts': 'int',
        'nonce': 'str',
        'os': 'str',
        'language': 'str',
        'dapp_signature_method': 'str',
        'dapp_signature': 'str',
        'sign_type': 'str',
        'signature': 'str',
        'dapp_id': 'str',
        'uuid': 'str',
        'action': 'str',
        'scope': 'int',
        'expired': 'int',
        'memo': 'str'
    }

    attribute_map = {
        'dapp_key': 'dapp_key',
        'protocol': 'protocol',
        'version': 'version',
        'ts': 'ts',
        'nonce': 'nonce',
        'os': 'os',
        'language': 'language',
        'dapp_signature_method': 'dapp_signature_method',
        'dapp_signature': 'dapp_signature',
        'sign_type': 'sign_type',
        'signature': 'signature',
        'dapp_id': 'dapp_id',
        'uuid': 'uuid',
        'action': 'action',
        'scope': 'scope',
        'expired': 'expired',
        'memo': 'memo'
    }

    def __init__(self, dapp_key=None, protocol=None, version=None, ts=None, nonce=None, os=None, language=None, dapp_signature_method=None, dapp_signature=None, sign_type=None, signature=None, dapp_id=None, uuid=None, action=None, scope=None, expired=None, memo=None):  # noqa: E501
        """AuthCacheRequest - a model defined in Swagger"""  # noqa: E501
        self._dapp_key = None
        self._protocol = None
        self._version = None
        self._ts = None
        self._nonce = None
        self._os = None
        self._language = None
        self._dapp_signature_method = None
        self._dapp_signature = None
        self._sign_type = None
        self._signature = None
        self._dapp_id = None
        self._uuid = None
        self._action = None
        self._scope = None
        self._expired = None
        self._memo = None
        self.discriminator = None
        self.dapp_key = dapp_key
        self.protocol = protocol
        self.version = version
        self.ts = ts
        self.nonce = nonce
        self.os = os
        self.language = language
        self.dapp_signature_method = dapp_signature_method
        self.dapp_signature = dapp_signature
        self.sign_type = sign_type
        self.signature = signature
        self.dapp_id = dapp_id
        self.uuid = uuid
        self.action = action
        self.scope = scope
        self.expired = expired
        if memo is not None:
            self.memo = memo

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

        The decentralized application access key  # noqa: E501

        :return: The dapp_key of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._dapp_key

    @dapp_key.setter
    def dapp_key(self, dapp_key):
        """Sets the dapp_key of this AuthCacheRequest.

        The decentralized application access key  # noqa: E501

        :param dapp_key: The dapp_key of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if dapp_key is None:
            raise ValueError("Invalid value for `dapp_key`, must not be `None`")  # noqa: E501

        self._dapp_key = dapp_key

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

        The protocol name. default is 'HEP'.  # noqa: E501

        :return: The protocol of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._protocol

    @protocol.setter
    def protocol(self, protocol):
        """Sets the protocol of this AuthCacheRequest.

        The protocol name. default is 'HEP'.  # noqa: E501

        :param protocol: The protocol of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if protocol is None:
            raise ValueError("Invalid value for `protocol`, must not be `None`")  # noqa: E501

        self._protocol = protocol

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

        The protocol version such as '1.0'  # noqa: E501

        :return: The version of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._version

    @version.setter
    def version(self, version):
        """Sets the version of this AuthCacheRequest.

        The protocol version such as '1.0'  # noqa: E501

        :param version: The version of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if version is None:
            raise ValueError("Invalid value for `version`, must not be `None`")  # noqa: E501

        self._version = version

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

        The current timestamp  # noqa: E501

        :return: The ts of this AuthCacheRequest.  # noqa: E501
        :rtype: int
        """
        return self._ts

    @ts.setter
    def ts(self, ts):
        """Sets the ts of this AuthCacheRequest.

        The current timestamp  # noqa: E501

        :param ts: The ts of this AuthCacheRequest.  # noqa: E501
        :type: int
        """
        if ts is None:
            raise ValueError("Invalid value for `ts`, must not be `None`")  # noqa: E501

        self._ts = ts

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

        The random string or auto-increment sequence  # noqa: E501

        :return: The nonce of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._nonce

    @nonce.setter
    def nonce(self, nonce):
        """Sets the nonce of this AuthCacheRequest.

        The random string or auto-increment sequence  # noqa: E501

        :param nonce: The nonce of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if nonce is None:
            raise ValueError("Invalid value for `nonce`, must not be `None`")  # noqa: E501

        self._nonce = nonce

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

        The operating system of client such as ios, android, dweb,etc.  # noqa: E501

        :return: The os of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._os

    @os.setter
    def os(self, os):
        """Sets the os of this AuthCacheRequest.

        The operating system of client such as ios, android, dweb,etc.  # noqa: E501

        :param os: The os of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if os is None:
            raise ValueError("Invalid value for `os`, must not be `None`")  # noqa: E501

        self._os = os

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

        The i18n language code such as zh, en, etc.  # noqa: E501

        :return: The language of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._language

    @language.setter
    def language(self, language):
        """Sets the language of this AuthCacheRequest.

        The i18n language code such as zh, en, etc.  # noqa: E501

        :param language: The language of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if language is None:
            raise ValueError("Invalid value for `language`, must not be `None`")  # noqa: E501

        self._language = language

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

        The signature method used by dapp.  # noqa: E501

        :return: The dapp_signature_method of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._dapp_signature_method

    @dapp_signature_method.setter
    def dapp_signature_method(self, dapp_signature_method):
        """Sets the dapp_signature_method of this AuthCacheRequest.

        The signature method used by dapp.  # noqa: E501

        :param dapp_signature_method: The dapp_signature_method of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if dapp_signature_method is None:
            raise ValueError("Invalid value for `dapp_signature_method`, must not be `None`")  # noqa: E501

        self._dapp_signature_method = dapp_signature_method

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

        The signature generated by dapp.  # noqa: E501

        :return: The dapp_signature of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._dapp_signature

    @dapp_signature.setter
    def dapp_signature(self, dapp_signature):
        """Sets the dapp_signature of this AuthCacheRequest.

        The signature generated by dapp.  # noqa: E501

        :param dapp_signature: The dapp_signature of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if dapp_signature is None:
            raise ValueError("Invalid value for `dapp_signature`, must not be `None`")  # noqa: E501

        self._dapp_signature = dapp_signature

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

        The signature Type,aka cryptographic algorithm.  # noqa: E501

        :return: The sign_type of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._sign_type

    @sign_type.setter
    def sign_type(self, sign_type):
        """Sets the sign_type of this AuthCacheRequest.

        The signature Type,aka cryptographic algorithm.  # noqa: E501

        :param sign_type: The sign_type of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if sign_type is None:
            raise ValueError("Invalid value for `sign_type`, must not be `None`")  # noqa: E501

        self._sign_type = sign_type

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

        The signature hex string by application owner. The exclude fields is [sign_type, signature, md5].  # noqa: E501

        :return: The signature of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._signature

    @signature.setter
    def signature(self, signature):
        """Sets the signature of this AuthCacheRequest.

        The signature hex string by application owner. The exclude fields is [sign_type, signature, md5].  # noqa: E501

        :param signature: The signature of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if signature is None:
            raise ValueError("Invalid value for `signature`, must not be `None`")  # noqa: E501

        self._signature = signature

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

        The decentralized application ID  # noqa: E501

        :return: The dapp_id of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._dapp_id

    @dapp_id.setter
    def dapp_id(self, dapp_id):
        """Sets the dapp_id of this AuthCacheRequest.

        The decentralized application ID  # noqa: E501

        :param dapp_id: The dapp_id of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if dapp_id is None:
            raise ValueError("Invalid value for `dapp_id`, must not be `None`")  # noqa: E501

        self._dapp_id = dapp_id

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

        The request uuid  # noqa: E501

        :return: The uuid of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._uuid

    @uuid.setter
    def uuid(self, uuid):
        """Sets the uuid of this AuthCacheRequest.

        The request uuid  # noqa: E501

        :param uuid: The uuid of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if uuid is None:
            raise ValueError("Invalid value for `uuid`, must not be `None`")  # noqa: E501

        self._uuid = uuid

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

        The action name which value is 'hep.auth.login'.  # noqa: E501

        :return: The action of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._action

    @action.setter
    def action(self, action):
        """Sets the action of this AuthCacheRequest.

        The action name which value is 'hep.auth.login'.  # noqa: E501

        :param action: The action of this AuthCacheRequest.  # noqa: E501
        :type: str
        """
        if action is None:
            raise ValueError("Invalid value for `action`, must not be `None`")  # noqa: E501

        self._action = action

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

        The request profile type. 1: base profile including name,head,newid; 2: advance profile including cellphone.  # noqa: E501

        :return: The scope of this AuthCacheRequest.  # noqa: E501
        :rtype: int
        """
        return self._scope

    @scope.setter
    def scope(self, scope):
        """Sets the scope of this AuthCacheRequest.

        The request profile type. 1: base profile including name,head,newid; 2: advance profile including cellphone.  # noqa: E501

        :param scope: The scope of this AuthCacheRequest.  # noqa: E501
        :type: int
        """
        if scope is None:
            raise ValueError("Invalid value for `scope`, must not be `None`")  # noqa: E501

        self._scope = scope

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

        The expired timestamp  # noqa: E501

        :return: The expired of this AuthCacheRequest.  # noqa: E501
        :rtype: int
        """
        return self._expired

    @expired.setter
    def expired(self, expired):
        """Sets the expired of this AuthCacheRequest.

        The expired timestamp  # noqa: E501

        :param expired: The expired of this AuthCacheRequest.  # noqa: E501
        :type: int
        """
        if expired is None:
            raise ValueError("Invalid value for `expired`, must not be `None`")  # noqa: E501

        self._expired = expired

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

        The login Memo,optional.  # noqa: E501

        :return: The memo of this AuthCacheRequest.  # noqa: E501
        :rtype: str
        """
        return self._memo

    @memo.setter
    def memo(self, memo):
        """Sets the memo of this AuthCacheRequest.

        The login Memo,optional.  # noqa: E501

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

        self._memo = memo

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

        return self.__dict__ == other.__dict__

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