# 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/base_list.py
# class BaseList(Base):
# 
#     def __init__(self, item_type):
#         """When setting items, they are instantiated as objects of type item_type."""
#         self.limit = None
#         self.offset = None
#         self.count = None
#         self.totalCount = None
#         self._links = None
#         self._items = None
# 
#         self.itemType = item_type
# 
#     @property
#     def links(self):
#         return self._links
# 
#     @links.setter
#     def links(self, value):
#         self._links = Links().load(value)
# 
#     @property
#     def items(self):
#         return self._items
# 
#     @items.setter
#     def items(self, value):
#         """Create typed objects from the dicts."""
#         items = []
#         if value is not None:
#             for item in value:
#                 items.append(self.itemType().load(item))
# 
#         self._items = items
# 
#     def __str__(self):
#         items_count = 0 if self.items is None else len(self.items)
#         return "%s with %d items.\n" % (str(self.__class__), items_count)


from messagebird.base import Base
from messagebird.base_list import BaseList

    @property
    def createdAt(self):
        return self._createdAt

    @createdAt.setter
    def createdAt(self, value):
        self._createdAt = self.value_to_time(value)

    @property
    def updatedAt(self):
        return self._updatedAt

    @updatedAt.setter
    def updatedAt(self, value):
        self._updatedAt = self.value_to_time(value)

    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



# 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/base_list.py
# class BaseList(Base):
# 
#     def __init__(self, item_type):
#         """When setting items, they are instantiated as objects of type item_type."""
#         self.limit = None
#         self.offset = None
#         self.count = None
#         self.totalCount = None
#         self._links = None
#         self._items = None
# 
#         self.itemType = item_type
# 
#     @property
#     def links(self):
#         return self._links
# 
#     @links.setter
#     def links(self, value):
#         self._links = Links().load(value)
# 
#     @property
#     def items(self):
#         return self._items
# 
#     @items.setter
#     def items(self, value):
#         """Create typed objects from the dicts."""
#         items = []
#         if value is not None:
#             for item in value:
#                 items.append(self.itemType().load(item))
# 
#         self._items = items
# 
#     def __str__(self):
#         items_count = 0 if self.items is None else len(self.items)
#         return "%s with %d items.\n" % (str(self.__class__), items_count)


# Path: messagebird/call_flow.py
from messagebird.base import Base
from messagebird.base_list import BaseList


    @property
    def createdAt(self):
        return self._createdAt

    @createdAt.setter
    def createdAt(self, value):
        self._createdAt = self.value_to_time(value)

    @property
    def updatedAt(self):
        return self._updatedAt

    @updatedAt.setter
    def updatedAt(self, value):
        self._updatedAt = self.value_to_time(value)

    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



class CallFlowNumber(Base):