def VisitFile(self, file_proto, type_context, services, msgs, enums):
    has_messages = True
    if (all(((len(msg) == 0) for msg in msgs)) and all(((len(enum) == 0) for enum in enums))):
        has_messages = False
    if (has_messages and (not (annotations.DOC_TITLE_ANNOTATION in type_context.source_code_info.file_level_annotations)) and file_proto.name.startswith('envoy')):
        raise ProtodocError('Envoy API proto file missing [#protodoc-title:] annotation: {}'.format(file_proto.name))
    (header, comment) = FormatHeaderFromFile('=', type_context.source_code_info, file_proto.name)
    if (not has_messages):
        header = (':orphan:\n\n' + header)
    warnings = ''
    if file_proto.options.HasExtension(status_pb2.file_status):
        if file_proto.options.Extensions[status_pb2.file_status].work_in_progress:
            warnings += '.. warning::\n   This API is work-in-progress and is subject to breaking changes.\n\n'
    debug_proto = FormatProtoAsBlockComment(file_proto)
    return ((((header + warnings) + comment) + '\n'.join(msgs)) + '\n'.join(enums))
def VisitFile(self, file_proto, type_context, services, msgs, enums):
    has_messages = True
    if (all(((len(msg) == 0) for msg in msgs)) and all(((len(enum) == 0) for enum in enums))):
        has_messages = False
    if (has_messages and (not (annotations.DOC_TITLE_ANNOTATION in type_context.source_code_info.file_level_annotations)) and file_proto.name.startswith('envoy')):
        raise ProtodocError('Envoy API proto file missing [#protodoc-title:] annotation: {}'.format(file_proto.name))
    (header, comment) = FormatHeaderFromFile('=', type_context.source_code_info, file_proto.name)
    if (not has_messages):
        header = (':orphan:\n\n' + header)
    warnings = 
    if file_proto.options.HasExtension(status_pb2.file_status):
        if file_proto.options.Extensions[status_pb2.file_status].work_in_progress:
            warnings += '.. warning::\n   This API is work-in-progress and is subject to breaking changes.\n\n'
    debug_proto = FormatProtoAsBlockComment(file_proto)
    return ((((header + warnings) + comment) + '\n'.join(msgs)) + '\n'.join(enums))