def to_dict(self):
    'Returns the model properties as a dict'
    result = {}
    for (attr, _) in six.iteritems(self.swagger_types):
        if hasattr(self, attr):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
            elif hasattr(value, 'to_dict'):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map((lambda item: ((item[0], item[1].to_dict()) if hasattr(item[1], 'to_dict') else item)), value.items()))
            else:
                result[attr] = value
    if issubclass(PortCommon, dict):
        for (key, value) in self.items():
            result[key] = value
    return result
Returns the model properties as a dict
def to_dict(self):
    
    result = {}
    for (attr, _) in six.iteritems(self.swagger_types):
        if hasattr(self, attr):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map((lambda x: (x.to_dict() if hasattr(x, 'to_dict') else x)), value))
            elif hasattr(value, 'to_dict'):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map((lambda item: ((item[0], item[1].to_dict()) if hasattr(item[1], 'to_dict') else item)), value.items()))
            else:
                result[attr] = value
    if issubclass(PortCommon, dict):
        for (key, value) in self.items():
            result[key] = value
    return result