# Path: ingenico/connect/sdk/webhooks/secret_key_not_available_exception.py
# class SecretKeyNotAvailableException(SignatureValidationException):
#     """
#     Represents an error that causes a secret key to not be available.
#     """
# 
#     def __init__(self, param1, param2, cause=False):
#         if cause is False:
#             if isinstance(param2, str):
#                 super(SecretKeyNotAvailableException, self).__init__(param1)
#                 self.__key_id = param2
#             else:
#                 super(SecretKeyNotAvailableException, self).__init__(param2)
#                 self.__key_id = param1
#         else:
#             super(SecretKeyNotAvailableException, self).__init__(param1, cause)
#             self.__key_id = param2
# 
#     @property
#     def key_id(self):
#         return self.__key_id


from .secret_key_not_available_exception import SecretKeyNotAvailableException
from .secret_key_store import SecretKeyStore


class InMemorySecretKeyStore(SecretKeyStore):
    """
    An in-memory secret key store.
    This implementation can be used in applications where secret keys can be
    specified at application startup.
    """

    @staticmethod
    def INSTANCE():
        return _IN_MEMORY_SECRET_KEY_CACHE_INSTANCE

    __store = {}

    def get_secret_key(self, key_id):
        try:
            secret_key = self.__store[key_id]
        except KeyError:

# Path: ingenico/connect/sdk/webhooks/secret_key_not_available_exception.py
# class SecretKeyNotAvailableException(SignatureValidationException):
#     """
#     Represents an error that causes a secret key to not be available.
#     """
# 
#     def __init__(self, param1, param2, cause=False):
#         if cause is False:
#             if isinstance(param2, str):
#                 super(SecretKeyNotAvailableException, self).__init__(param1)
#                 self.__key_id = param2
#             else:
#                 super(SecretKeyNotAvailableException, self).__init__(param2)
#                 self.__key_id = param1
#         else:
#             super(SecretKeyNotAvailableException, self).__init__(param1, cause)
#             self.__key_id = param2
# 
#     @property
#     def key_id(self):
#         return self.__key_id


# Path: ingenico/connect/sdk/webhooks/in_memory_secret_key_store.py
from .secret_key_not_available_exception import SecretKeyNotAvailableException
from .secret_key_store import SecretKeyStore



class InMemorySecretKeyStore(SecretKeyStore):
    """
    An in-memory secret key store.
    This implementation can be used in applications where secret keys can be
    specified at application startup.
    """

    @staticmethod
    def INSTANCE():
        return _IN_MEMORY_SECRET_KEY_CACHE_INSTANCE

    __store = {}

    def get_secret_key(self, key_id):
        try:
            secret_key = self.__store[key_id]
        except KeyError:

            raise SecretKeyNotAvailableException(