Untitled

 avatar
unknown
plain_text
24 days ago
570 B
3
Indexable
if not klass.swagger_types and not self.__hasattr(klass, 'get_real_child_model'):
    return data

kwargs = {}
if klass.swagger_types is not None:
    for attr, attr_type in six.iteritems(klass.swagger_types):
        # Skip if data is bytes
        if isinstance(data, bytes):
            continue
            
        if (data is not None and 
            isinstance(data, (list, dict)) and 
            klass.attribute_map[attr] in data):
            
            value = data[klass.attribute_map[attr]]
            kwargs[attr] = self.__deserialize(value, attr_type)
Leave a Comment