# 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
        if isinstance(value, list):
            self._items = []
            for item in value:
                self._items.append(VoiceWebhook().load(item))

    def __str__(self):
        item_ids = []
        if self._items is not None:
            for voice_item in self._items:
                item_ids.append(voice_item.id)

        return "\n".join([
            'items IDs  : %s' % item_ids,
            'count      : %s' % len(item_ids)
        ])


class VoiceCreateWebhookRequest(Base):
    def __init__(self, title=None, url=None, token=None):
        validate_is_not_blank(url, "url cannot be empty")
        self.title = title
        self._url = url
        self.token = token

    @property
    def url(self):
        return self._url

    @url.setter
    def url(self, value):

# 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

        if isinstance(value, list):
            self._items = []
            for item in value:
                self._items.append(VoiceWebhook().load(item))

    def __str__(self):
        item_ids = []
        if self._items is not None:
            for voice_item in self._items:
                item_ids.append(voice_item.id)

        return "\n".join([
            'items IDs  : %s' % item_ids,
            'count      : %s' % len(item_ids)
        ])


class VoiceCreateWebhookRequest(Base):
    def __init__(self, title=None, url=None, token=None):
        validate_is_not_blank(url, "url cannot be empty")
        self.title = title
        self._url = url
        self.token = token

    @property
    def url(self):
        return self._url

    @url.setter
    def url(self, value):

        validate_is_not_blank(value, "url cannot be empty")