#!/usr/bin/env python3
import sys

LANGUAGES = [
    'conda', 'docker', 'docker_image', 'fail', 'golang', 'node', 'perl',
    'pygrep', 'python', 'ruby', 'rust', 'script', 'swift', 'system',
]
FIELDS = [
    'ENVIRONMENT_DIR', 'get_default_version', 'healthy', 'install_environment',
    'run_hook',
]


def main() -> int:
    print(f'    # BEGIN GENERATED ({sys.argv[0]})')
    for lang in LANGUAGES:
        parts = [f'    {lang!r}: Language(name={lang!r}']
        for k in FIELDS:
            parts.append(f', {k}={lang}.{k}')
        parts.append('),  # noqa: E501')
        print(''.join(parts))
    print('    # END GENERATED')
    return 0


if __name__ == '__main__':
    exit(main())
