Create typed objects from the dicts.
331225
def items(self, value):
        """"""
        items = []
        for item in value:
            items.append(self.itemType().load(item))

        self._items = items
297347
def from_dict(self, values):
        
        for k in values.keys():
            setattr(self, k, values[k])
1153611
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'tokens' in _dict:
            args['tokens'] = [
                TokenResult._from_dict(x) for x in (_dict.get('tokens'))
            ]
        if 'sentences' in _dict:
            args['sentences'] = [
                SentenceResult._from_dict(x) for x in (_dict.get('sentences'))
            ]
        return cls(**args)
43610
def from_dictionary(cls, dictionary):
        """"""
        if not isinstance(dictionary, dict):
            raise TypeError('dictionary has to be a dict type, got: {}'.format(type(dictionary)))

        return cls(dictionary)
496425
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'input' in _dict:
            args['input'] = MessageInput._from_dict(_dict.get('input'))
        if 'intents' in _dict:
            args['intents'] = [
                RuntimeIntent._from_dict(x) for x in (_dict.get('intents'))
            ]
        if 'entities' in _dict:
            args['entities'] = [
                RuntimeEntity._from_dict(x) for x in (_dict.get('entities'))
            ]
        return cls(**args)
1225957
def dict_to_object(source):
    """"""
    target = inspectable_class.InspectableClass()
    for k, v in source.items():
        setattr(target, k, v)
    return target
214224
def _from_dict(cls, _dict):
        """"""
        args = {}
        xtra = _dict.copy()
        if 'generic' in _dict:
            args['generic'] = [
                DialogNodeOutputGeneric._from_dict(x)
                for x in (_dict.get('generic'))
            ]
            del xtra['generic']
        if 'modifiers' in _dict:
            args['modifiers'] = DialogNodeOutputModifiers._from_dict(
                _dict.get('modifiers'))
            del xtra['modifiers']
        args.update(xtra)
        return cls(**args)
235227
def dict_to_object(d):
    """"""
    top = type('CreateSendModel', (object,), d)
    seqs = tuple, list, set, frozenset
    for i, j in d.items():
        if isinstance(j, dict):
            setattr(top, i, dict_to_object(j))
        elif isinstance(j, seqs):
            setattr(top, i, type(j)(dict_to_object(sj) if isinstance(sj, dict) else sj for sj in j))
        else:
            setattr(top, i, j)
    return top
890721
def from_dict(cls, d):
        

        if type(d) != dict:
            raise TypeError('Expecting a <dict>, got a {0}'.format(type(d)))
        obj = cls()
        obj._full_data = d

        # import attributes
        obj._import_attributes(d)

        # import <a> child tags as dict items, see __getitem__()
        obj._a_tags = obj._parse_a_tags(d)

        return obj
1082234
def _from_dict_dict(cls, dic):
        
        return cls({_convert_id(i): v for i, v in dic.items()})
238177
def _typed_from_items(items):
    
    dct = {}
    for name, attr in items:
        if isinstance(attr, Typed):
            dct[name] = attr(name)
    return dct
1107035
def from_dict(cls, d):
        
        result = super(ActorHandler, cls).from_dict(d)
        if "actors" in d:
            l = d["actors"]
            for e in l:
                if u"type" in e:
                    typestr = e[u"type"]
                else:
                    typestr = e["type"]
                result.actors.append(classes.get_dict_handler(typestr)(e))
        return result
783187
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'document' in _dict:
            args['document'] = DocumentSentimentResults._from_dict(
                _dict.get('document'))
        if 'targets' in _dict:
            args['targets'] = [
                TargetedSentimentResults._from_dict(x)
                for x in (_dict.get('targets'))
            ]
        return cls(**args)
1248130
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'images_processed' in _dict:
            args['images_processed'] = _dict.get('images_processed')
        else:
            raise ValueError(
                'Required property \'images_processed\' not present in DetectedFaces JSON'
            )
        if 'images' in _dict:
            args['images'] = [
                ImageWithFaces._from_dict(x) for x in (_dict.get('images'))
            ]
        else:
            raise ValueError(
                'Required property \'images\' not present in DetectedFaces JSON'
            )
        if 'warnings' in _dict:
            args['warnings'] = [
                WarningInfo._from_dict(x) for x in (_dict.get('warnings'))
            ]
        return cls(**args)
682028
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'collections' in _dict:
            args['collections'] = [
                Collection._from_dict(x) for x in (_dict.get('collections'))
            ]
        return cls(**args)
1120647
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'configurations' in _dict:
            args['configurations'] = [
                Configuration._from_dict(x)
                for x in (_dict.get('configurations'))
            ]
        return cls(**args)
187675
def _from_dict(cls, _dict):
        """"""
        args = {}
        if 'document' in _dict:
            args['document'] = DocInfo._from_dict(_dict.get('document'))
        if 'model_id' in _dict:
            args['model_id'] = _dict.get('model_id')
        if 'model_version' in _dict:
            args['model_version'] = _dict.get('model_version')
        if 'tables' in _dict:
            args['tables'] = [
                Tables._from_dict(x) for x in (_dict.get('tables'))
            ]
        return cls(**args)