# 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
        return self._updatedAtDatetime

    @updatedAtDatetime.setter
    def updatedAt(self, value):
        if value is not None:
            self._updatedAtDatetime = self.value_to_time(value, '%Y-%m-%dT%H:%M:%SZ')

    def load(self, data):
        if data.get('data') is not None:
            items = data.get('data')[0].items()
        else:
            items = list(data.items())

        for name, value in items:
            if hasattr(self, name) and not callable(getattr(self, name)):
                setattr(self, name, value)

        return self

    def __str__(self):
        return "\n".join([
            'webhook id         : %s' % self.id,
            'url                : %s' % self.url,
            'token              : %s' % self.token,
            'createdAtDatetime  : %s' % self._createdAtDatetime,
            'updatedAtDatetime  : %s' % self._updatedAtDatetime,
            'links              : %s' % self._links
        ])



# 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

        return self._updatedAtDatetime

    @updatedAtDatetime.setter
    def updatedAt(self, value):
        if value is not None:
            self._updatedAtDatetime = self.value_to_time(value, '%Y-%m-%dT%H:%M:%SZ')

    def load(self, data):
        if data.get('data') is not None:
            items = data.get('data')[0].items()
        else:
            items = list(data.items())

        for name, value in items:
            if hasattr(self, name) and not callable(getattr(self, name)):
                setattr(self, name, value)

        return self

    def __str__(self):
        return "\n".join([
            'webhook id         : %s' % self.id,
            'url                : %s' % self.url,
            'token              : %s' % self.token,
            'createdAtDatetime  : %s' % self._createdAtDatetime,
            'updatedAtDatetime  : %s' % self._updatedAtDatetime,
            'links              : %s' % self._links
        ])



class VoiceWebhookList(Base):