# Path: artman/utils/lang_params.py
# class LanguageParams:
# class JavaParams(LanguageParams):
# class PhpParams(LanguageParams):
#     def code_root(self, base_dir):
#     def code_root(self, base_dir):
#     def code_root(self, base_dir):
# LANG_PARAMS_MAP = {
#     'python': LanguageParams(),
#     'ruby': LanguageParams(),
#     'nodejs': LanguageParams(),
#     'java': JavaParams(),
#     'go': LanguageParams(),
#     'csharp': LanguageParams(),
#     'php': PhpParams(),
# }
# 
# Path: artman/utils/task_utils.py
# def get_java_tool_path(toolkit_path, tool_name):
# def gapic_gen_task(toolkit_path, task_args):
# def run_gradle_task(toolkit_path, task_name, task_args=()):
# def api_full_name(api_name, api_version, organization_name):
# def is_output_gcloud(language, gapic_code_dir):
# def instantiate_tasks(task_class_list, inject):
# 
# Path: artman/utils/logger.py
# OUTPUT = 22
# SUCCESS = 25
# COLORS = {
#     'DEBUG': 'blue',
#     'INFO': 'cyan',
#     'OUTPUT': 'white',
#     'SUCCESS': 'green',
#     'WARNING': 'yellow',
#     'ERROR': 'red',
#     'CRITICAL': 'red,bold',
# }
# class Logger(logging.getLoggerClass()):
#     def __init__(self, name, level=logging.NOTSET):
#     def output(self, message, *args, **kwargs):
#     def success(self, message, *args, **kwargs):
# def setup_logging(level=logging.DEBUG):  # pragma: no cover
# def setup_logger(name, level, colors=COLORS,
#                  format_string="%(purple)s%(name)s> %(log_color)s%(message)s"):


import collections.abc
import io
import os
import re
import subprocess
import types
import sys
import six
from artman.utils import lang_params
from artman.utils import task_utils
from artman.utils.logger import logger
        elif os.path.isfile(path) and os.path.splitext(path)[1] == '.proto':
            yield path


def list_files_recursive(path):
    for root, _, files in os.walk(path):
        for f in files:
            yield os.path.join(root, f)


_php_replacements = [
    ('\\Google\\Protobuf\\Empty', '\\Google\\Protobuf\\GPBEmpty'),
]
def php_proto_rename(contents):
    for src, target in _php_replacements:
        contents = contents.replace(src, target)
    return contents


def _is_proto_excluded(proto, excluded_proto_path):
    for excluded_path in excluded_proto_path:
        if excluded_path in proto:
            return True
    return False

_protobuf_path = None
def _find_protobuf_path(toolkit_path):
    """Fetch and locate protobuf source"""
    global _protobuf_path
    if not _protobuf_path:

# Path: artman/utils/lang_params.py
# class LanguageParams:
# class JavaParams(LanguageParams):
# class PhpParams(LanguageParams):
#     def code_root(self, base_dir):
#     def code_root(self, base_dir):
#     def code_root(self, base_dir):
# LANG_PARAMS_MAP = {
#     'python': LanguageParams(),
#     'ruby': LanguageParams(),
#     'nodejs': LanguageParams(),
#     'java': JavaParams(),
#     'go': LanguageParams(),
#     'csharp': LanguageParams(),
#     'php': PhpParams(),
# }
# 
# Path: artman/utils/task_utils.py
# def get_java_tool_path(toolkit_path, tool_name):
# def gapic_gen_task(toolkit_path, task_args):
# def run_gradle_task(toolkit_path, task_name, task_args=()):
# def api_full_name(api_name, api_version, organization_name):
# def is_output_gcloud(language, gapic_code_dir):
# def instantiate_tasks(task_class_list, inject):
# 
# Path: artman/utils/logger.py
# OUTPUT = 22
# SUCCESS = 25
# COLORS = {
#     'DEBUG': 'blue',
#     'INFO': 'cyan',
#     'OUTPUT': 'white',
#     'SUCCESS': 'green',
#     'WARNING': 'yellow',
#     'ERROR': 'red',
#     'CRITICAL': 'red,bold',
# }
# class Logger(logging.getLoggerClass()):
#     def __init__(self, name, level=logging.NOTSET):
#     def output(self, message, *args, **kwargs):
#     def success(self, message, *args, **kwargs):
# def setup_logging(level=logging.DEBUG):  # pragma: no cover
# def setup_logger(name, level, colors=COLORS,
#                  format_string="%(purple)s%(name)s> %(log_color)s%(message)s"):


# Path: artman/utils/protoc_utils.py
import collections.abc
import io
import os
import re
import subprocess
import types
import sys
import six
from artman.utils import lang_params
from artman.utils import task_utils
from artman.utils.logger import logger

        elif os.path.isfile(path) and os.path.splitext(path)[1] == '.proto':
            yield path


def list_files_recursive(path):
    for root, _, files in os.walk(path):
        for f in files:
            yield os.path.join(root, f)


_php_replacements = [
    ('\\Google\\Protobuf\\Empty', '\\Google\\Protobuf\\GPBEmpty'),
]
def php_proto_rename(contents):
    for src, target in _php_replacements:
        contents = contents.replace(src, target)
    return contents


def _is_proto_excluded(proto, excluded_proto_path):
    for excluded_path in excluded_proto_path:
        if excluded_path in proto:
            return True
    return False

_protobuf_path = None
def _find_protobuf_path(toolkit_path):
    """Fetch and locate protobuf source"""
    global _protobuf_path
    if not _protobuf_path:

        logger.debug('Searching for latest protobuf source')