

def to_dict(self):
    d = {
        'id': self.id,
        'name': self.name,
        'version': self.version,
        'class': getattr(self, 'class'),
        'link-config': [link_config.to_dict() for link_config in self.link_config],
        'job-config': {
            
        },
        'all-config-resources': self.config_resources,
    }
    if ('FROM' in self.job_config):
        d['job-config']['FROM'] = [job_config.to_dict() for job_config in self.job_config['FROM']]
    if ('TO' in self.job_config):
        d['job-config']['TO'] = [job_config.to_dict() for job_config in self.job_config['TO']]
    return d

dataset/ETHPy150Open cloudera/hue/apps/sqoop/src/sqoop/client/connector.py Connector.to_dict/original