# Path: botoflow/history_events/event_bases.py
# class ActivityEventBase(EventBase):
#     pass
# 
# class ChildWorkflowEventBase(EventBase):
#     pass
# 
# class DecisionEventBase(EventBase):
#     """
#     To be used as a mixin with events that represent decisions
#     """
#     pass
# 
# class ExternalWorkflowEventBase(EventBase):
#     pass
# 
# class WorkflowEventBase(EventBase):
#     pass
# 
# class TimerEventBase(EventBase):
#     pass
# 
# class EventBase(object):
# 
#     def __init__(self, event_id, datetime, attributes):
#         """
#         :param event_id: event id
#         :type event_id: int
#         :param datetime: datetime of event
#         :type datetime: datetime.datetime
#         :param attributes: event attributes
#         :type attributes: dict
#         """
#         self.id = event_id
#         self.datetime = datetime
#         self.attributes = attributes
# 
#     def __repr__(self):
#         return "<{0} id={1}, time={2}, attributes={3}>".format(
#             self.__class__.__name__, self.id, self.datetime,
#             self.attributes)
# 
# class MarkerEventBase(EventBase):
#     pass
# 
# class DecisionTaskEventBase(EventBase):
#     pass


import logging
import six
from .event_bases import (ActivityEventBase, ChildWorkflowEventBase,
                          DecisionEventBase, ExternalWorkflowEventBase,
                          WorkflowEventBase, TimerEventBase, EventBase,
                          MarkerEventBase, DecisionTaskEventBase)
# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.




log = logging.getLogger(__name__)


def swf_event_to_object(event_dict):
    """
    takes an event dictionary from botocore and converts it into a specific
    event instance.
    """
    try:
        event_class = _event_type_name_to_class[event_dict['eventType']]
    except KeyError:
        # we cannot guarantee we do the right thing in the decider if there's an unsupported event type.
        logging.critical("Event type '%' is not implemented. Cannot continue processing decisions!",
                         event_dict['eventType'])
        raise NotImplementedError(
            "Event type '{}' is not implemented. Cannot continue processing decisions!".format(event_dict['eventType']))

    return event_class(event_dict['eventId'],
                       event_dict['eventTimestamp'],
                       event_dict[event_class.attribute_key])



# Path: botoflow/history_events/event_bases.py
# class ActivityEventBase(EventBase):
#     pass
# 
# class ChildWorkflowEventBase(EventBase):
#     pass
# 
# class DecisionEventBase(EventBase):
#     """
#     To be used as a mixin with events that represent decisions
#     """
#     pass
# 
# class ExternalWorkflowEventBase(EventBase):
#     pass
# 
# class WorkflowEventBase(EventBase):
#     pass
# 
# class TimerEventBase(EventBase):
#     pass
# 
# class EventBase(object):
# 
#     def __init__(self, event_id, datetime, attributes):
#         """
#         :param event_id: event id
#         :type event_id: int
#         :param datetime: datetime of event
#         :type datetime: datetime.datetime
#         :param attributes: event attributes
#         :type attributes: dict
#         """
#         self.id = event_id
#         self.datetime = datetime
#         self.attributes = attributes
# 
#     def __repr__(self):
#         return "<{0} id={1}, time={2}, attributes={3}>".format(
#             self.__class__.__name__, self.id, self.datetime,
#             self.attributes)
# 
# class MarkerEventBase(EventBase):
#     pass
# 
# class DecisionTaskEventBase(EventBase):
#     pass


# Path: botoflow/history_events/events.py
import logging
import six
from .event_bases import (ActivityEventBase, ChildWorkflowEventBase,
                          DecisionEventBase, ExternalWorkflowEventBase,
                          WorkflowEventBase, TimerEventBase, EventBase,
                          MarkerEventBase, DecisionTaskEventBase)

# or in the "license" file accompanying this file. This file is distributed
# on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
# express or implied. See the License for the specific language governing
# permissions and limitations under the License.




log = logging.getLogger(__name__)


def swf_event_to_object(event_dict):
    """
    takes an event dictionary from botocore and converts it into a specific
    event instance.
    """
    try:
        event_class = _event_type_name_to_class[event_dict['eventType']]
    except KeyError:
        # we cannot guarantee we do the right thing in the decider if there's an unsupported event type.
        logging.critical("Event type '%' is not implemented. Cannot continue processing decisions!",
                         event_dict['eventType'])
        raise NotImplementedError(
            "Event type '{}' is not implemented. Cannot continue processing decisions!".format(event_dict['eventType']))

    return event_class(event_dict['eventId'],
                       event_dict['eventTimestamp'],
                       event_dict[event_class.attribute_key])



class ActivityTaskCancelRequested(ActivityEventBase, DecisionEventBase):