# Path: plex/core/idict.py
# class idict(dict):
#     def __init__(self, initial=None):
#         if initial:
#             self.update(initial)
# 
#     def get(self, k, d=None):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         if super(idict, self).__contains__(k):
#             return self[k]
# 
#         return d
# 
#     def update(self, E=None, **F):
#         if E:
#             if hasattr(E, 'keys'):
#                 # Update with `E` dictionary
#                 for k in E:
#                     self[k] = E[k]
#             else:
#                 # Update with `E` items
#                 for (k, v) in E:
#                     self[k] = v
# 
#         # Update with `F` dictionary
#         for k in F:
#             self[k] = F[k]
# 
#     def __contains__(self, k):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         return super(idict, self).__contains__(k)
# 
#     def __delitem__(self, k):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         super(idict, self).__delitem__(k)
# 
#     def __getitem__(self, k):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         return super(idict, self).__getitem__(k)
# 
#     def __setitem__(self, k, value):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         super(idict, self).__setitem__(k, value)
# 
# Path: plex/objects/core/base.py
# class Property(object):
#     helpers = Interface.helpers
# 
#     def __init__(self, name=None, type=None, resolver=None):
#         self.name = name
#         self.type = type
#         self.resolver = resolver
# 
#     def value(self, descriptor, client, key, node, keys_used):
#         if self.resolver is not None:
#             return self.value_func(descriptor, client, key, node, keys_used)
# 
#         return self.value_node(descriptor, key, node, keys_used)
# 
#     def value_node(self, descriptor, key, node, keys_used):
#         value = self.helpers.get(node, key)
# 
#         if value is None:
#             return None
# 
#         keys_used.append(key.lower())
# 
#         try:
#             return self.value_convert(value)
#         except Exception as ex:
#             log.warn('[%s] Unable to parse property %r - %%s' % (descriptor.__name__, key), ex, exc_info=True)
#             return None
# 
#     def value_convert(self, value):
#         if not self.type:
#             return value
# 
#         types = self.type if isinstance(self.type, collections.Iterable) else [self.type]
#         result = value
# 
#         for target_type in types:
#             try:
#                 result = target_type(result)
#             except Exception as ex:
#                 six.reraise(ex, None, sys.exc_info()[2])
# 
#         return result
# 
#     def value_func(self, descriptor, client, key, node, keys_used):
#         func = self.resolver()
# 
#         try:
#             keys, value = func(client, node)
# 
#             keys_used.extend([k.lower() for k in keys])
#             return value
#         except Exception as ex:
#             log.warn('[%s] Exception raised in value function for %r - %%s' % (descriptor.__name__, key), ex, exc_info=True)
#             return None
# 
# Path: plex/objects/directory.py
# class Directory(Descriptor):
#     key = Property
#     type = Property
# 
#     title = Property
# 
#     art = Property
#     thumb = Property
# 
#     allow_sync = Property('allowSync', bool)
#     updated_at = Property('updatedAt', int)


from plex.core.idict import idict
from plex.objects.core.base import Property
from plex.objects.directory import Directory


class Section(Directory):
    uuid = Property

    filters = Property(type=bool)
    refreshing = Property(type=bool)

    agent = Property
    scanner = Property

# Path: plex/core/idict.py
# class idict(dict):
#     def __init__(self, initial=None):
#         if initial:
#             self.update(initial)
# 
#     def get(self, k, d=None):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         if super(idict, self).__contains__(k):
#             return self[k]
# 
#         return d
# 
#     def update(self, E=None, **F):
#         if E:
#             if hasattr(E, 'keys'):
#                 # Update with `E` dictionary
#                 for k in E:
#                     self[k] = E[k]
#             else:
#                 # Update with `E` items
#                 for (k, v) in E:
#                     self[k] = v
# 
#         # Update with `F` dictionary
#         for k in F:
#             self[k] = F[k]
# 
#     def __contains__(self, k):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         return super(idict, self).__contains__(k)
# 
#     def __delitem__(self, k):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         super(idict, self).__delitem__(k)
# 
#     def __getitem__(self, k):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         return super(idict, self).__getitem__(k)
# 
#     def __setitem__(self, k, value):
#         if isinstance(k, six.string_types):
#             k = k.lower()
# 
#         super(idict, self).__setitem__(k, value)
# 
# Path: plex/objects/core/base.py
# class Property(object):
#     helpers = Interface.helpers
# 
#     def __init__(self, name=None, type=None, resolver=None):
#         self.name = name
#         self.type = type
#         self.resolver = resolver
# 
#     def value(self, descriptor, client, key, node, keys_used):
#         if self.resolver is not None:
#             return self.value_func(descriptor, client, key, node, keys_used)
# 
#         return self.value_node(descriptor, key, node, keys_used)
# 
#     def value_node(self, descriptor, key, node, keys_used):
#         value = self.helpers.get(node, key)
# 
#         if value is None:
#             return None
# 
#         keys_used.append(key.lower())
# 
#         try:
#             return self.value_convert(value)
#         except Exception as ex:
#             log.warn('[%s] Unable to parse property %r - %%s' % (descriptor.__name__, key), ex, exc_info=True)
#             return None
# 
#     def value_convert(self, value):
#         if not self.type:
#             return value
# 
#         types = self.type if isinstance(self.type, collections.Iterable) else [self.type]
#         result = value
# 
#         for target_type in types:
#             try:
#                 result = target_type(result)
#             except Exception as ex:
#                 six.reraise(ex, None, sys.exc_info()[2])
# 
#         return result
# 
#     def value_func(self, descriptor, client, key, node, keys_used):
#         func = self.resolver()
# 
#         try:
#             keys, value = func(client, node)
# 
#             keys_used.extend([k.lower() for k in keys])
#             return value
#         except Exception as ex:
#             log.warn('[%s] Exception raised in value function for %r - %%s' % (descriptor.__name__, key), ex, exc_info=True)
#             return None
# 
# Path: plex/objects/directory.py
# class Directory(Descriptor):
#     key = Property
#     type = Property
# 
#     title = Property
# 
#     art = Property
#     thumb = Property
# 
#     allow_sync = Property('allowSync', bool)
#     updated_at = Property('updatedAt', int)


# Path: plex/objects/library/section.py
from plex.core.idict import idict
from plex.objects.core.base import Property
from plex.objects.directory import Directory



class Section(Directory):
    uuid = Property

    filters = Property(type=bool)
    refreshing = Property(type=bool)

    agent = Property
    scanner = Property

    language = Property