# Path: messagebird/base.py
# class Base:
#     def load(self, data):
#         if data is not None:
#             for name, value in list(data.items()):
#                 if hasattr(self, name) and not callable(getattr(self, name)):
#                     setattr(self, name, value)
# 
#         return self
# 
#     @staticmethod
#     def value_to_time(value, format='%Y-%m-%dT%H:%M:%S+00:00'):
#         if value is not None:
#             return dateutil.parser.parse(value).replace(microsecond=0)
# 
# Path: messagebird/validation.py
# def validate_is_not_blank(value, message):
#     if value is None or not value.strip():
#         raise ValidationError(message)


from messagebird.base import Base
from messagebird.validation import validate_is_not_blank


class VoiceWebhook(Base):
    def __init__(self):
        self.id = None
        self.url = None
        self.token = None
        self._createdAtDatetime = None
        self._updatedAtDatetime = None
        self._links = None

    @property
    def createdAtDatetime(self):
        return self._createdAtDatetime

    @createdAtDatetime.setter
    def createdAt(self, value):
        if value is not None:

# Path: messagebird/base.py
# class Base:
#     def load(self, data):
#         if data is not None:
#             for name, value in list(data.items()):
#                 if hasattr(self, name) and not callable(getattr(self, name)):
#                     setattr(self, name, value)
# 
#         return self
# 
#     @staticmethod
#     def value_to_time(value, format='%Y-%m-%dT%H:%M:%S+00:00'):
#         if value is not None:
#             return dateutil.parser.parse(value).replace(microsecond=0)
# 
# Path: messagebird/validation.py
# def validate_is_not_blank(value, message):
#     if value is None or not value.strip():
#         raise ValidationError(message)


# Path: messagebird/voice_webhook.py
from messagebird.base import Base
from messagebird.validation import validate_is_not_blank



class VoiceWebhook(Base):
    def __init__(self):
        self.id = None
        self.url = None
        self.token = None
        self._createdAtDatetime = None
        self._updatedAtDatetime = None
        self._links = None

    @property
    def createdAtDatetime(self):
        return self._createdAtDatetime

    @createdAtDatetime.setter
    def createdAt(self, value):
        if value is not None:

            self._createdAtDatetime = self.value_to_time(value, '%Y-%m-%dT%H:%M:%SZ')