def to_dict(self, serialize=False):
    'Returns the model properties as a dict'
    result = {}

    def convert(x):
        if hasattr(x, 'to_dict'):
            args = getfullargspec(x.to_dict).args
            if (len(args) == 1):
                return x.to_dict()
            else:
                return x.to_dict(serialize)
        else:
            return x
    for (attr, _) in six.iteritems(self.openapi_types):
        value = getattr(self, attr)
        attr = (self.attribute_map.get(attr, attr) if serialize else attr)
        if isinstance(value, list):
            result[attr] = list(map((lambda x: convert(x)), value))
        elif isinstance(value, dict):
            result[attr] = dict(map((lambda item: (item[0], convert(item[1]))), value.items()))
        else:
            result[attr] = convert(value)
    return result
Returns the model properties as a dict
def to_dict(self, serialize=False):
    
    result = {}

    def convert(x):
        if hasattr(x, 'to_dict'):
            args = getfullargspec(x.to_dict).args
            if (len(args) == 1):
                return x.to_dict()
            else:
                return x.to_dict(serialize)
        else:
            return x
    for (attr, _) in six.iteritems(self.openapi_types):
        value = getattr(self, attr)
        attr = (self.attribute_map.get(attr, attr) if serialize else attr)
        if isinstance(value, list):
            result[attr] = list(map((lambda x: convert(x)), value))
        elif isinstance(value, dict):
            result[attr] = dict(map((lambda item: (item[0], convert(item[1]))), value.items()))
        else:
            result[attr] = convert(value)
    return result