# Path: groundstation/broadcast_event.py
# class BroadcastEvent(object):
#     def __init__(self):
#         self.validate()
# 
#     def validate(self):
#         return True # Assume that if no validation is specified it's all good
# 
#     @staticmethod
#     def normalize_payload(payload):
#         if payload == 'None':
#             return None
# 
#         try:
#             return uuid.UUID(payload)
#         except ValueError:
#             pass
# 
#         return payload


import uuid
from groundstation.broadcast_event import BroadcastEvent


class BroadcastPing(BroadcastEvent):
    def __init__(self, data):
        self.payload = self.normalize_payload(data)
        super(BroadcastPing, self).__init__()

    def validate(self):

# Path: groundstation/broadcast_event.py
# class BroadcastEvent(object):
#     def __init__(self):
#         self.validate()
# 
#     def validate(self):
#         return True # Assume that if no validation is specified it's all good
# 
#     @staticmethod
#     def normalize_payload(payload):
#         if payload == 'None':
#             return None
# 
#         try:
#             return uuid.UUID(payload)
#         except ValueError:
#             pass
# 
#         return payload


# Path: groundstation/broadcast_events/broadcast_ping.py
import uuid
from groundstation.broadcast_event import BroadcastEvent



class BroadcastPing(BroadcastEvent):
    def __init__(self, data):
        self.payload = self.normalize_payload(data)
        super(BroadcastPing, self).__init__()

    def validate(self):

        assert isinstance(self.payload, uuid.UUID)