# Path: proto/_file_info.py
# class _FileInfo(
#     collections.namedtuple(
#         "_FileInfo",
#         ["descriptor", "messages", "enums", "name", "nested", "nested_enum"],
#     )
# ):
#     def maybe_add_descriptor(cls, filename, package):
#     def proto_file_name(name):
#     def _get_manifest(self, new_class):
#     def _get_remaining_manifest(self, new_class):
#     def _calculate_salt(self, new_class, fallback):
#     def generate_file_pb(self, new_class, fallback_salt=""):
#     def ready(self, new_class):
#     def unresolved_fields(self):
# 
# Path: proto/_package_info.py
# def compile(name, attrs):


import collections
import proto
from google.protobuf import descriptor_pb2
from proto import _file_info, _package_info



PACKAGE = "a.test.package.salting.with.manifest"
__protobuf__ = proto.module(package=PACKAGE, manifest={"This", "That"},)


class This(proto.Message):
    this = proto.Field(proto.INT32, number=1)


class That(proto.Message):
    that = proto.Field(proto.INT32, number=1)


class NotInManifest(proto.Message):
    them = proto.Field(proto.INT32, number=1)


def sample_file_info(name):
    filename = name + ".proto"

    # Get the essential information about the proto package, and where
    # this component belongs within the file.
    package, marshal = _package_info.compile(name, {})

    # Get or create the information about the file, including the
    # descriptor to which the new message descriptor shall be added.
    return _file_info._FileInfo.registry.setdefault(
        filename,

# Path: proto/_file_info.py
# class _FileInfo(
#     collections.namedtuple(
#         "_FileInfo",
#         ["descriptor", "messages", "enums", "name", "nested", "nested_enum"],
#     )
# ):
#     def maybe_add_descriptor(cls, filename, package):
#     def proto_file_name(name):
#     def _get_manifest(self, new_class):
#     def _get_remaining_manifest(self, new_class):
#     def _calculate_salt(self, new_class, fallback):
#     def generate_file_pb(self, new_class, fallback_salt=""):
#     def ready(self, new_class):
#     def unresolved_fields(self):
# 
# Path: proto/_package_info.py
# def compile(name, attrs):


# Path: tests/test_file_info_salting_with_manifest.py
import collections
import proto
from google.protobuf import descriptor_pb2
from proto import _file_info, _package_info




PACKAGE = "a.test.package.salting.with.manifest"
__protobuf__ = proto.module(package=PACKAGE, manifest={"This", "That"},)


class This(proto.Message):
    this = proto.Field(proto.INT32, number=1)


class That(proto.Message):
    that = proto.Field(proto.INT32, number=1)


class NotInManifest(proto.Message):
    them = proto.Field(proto.INT32, number=1)


def sample_file_info(name):
    filename = name + ".proto"

    # Get the essential information about the proto package, and where
    # this component belongs within the file.
    package, marshal = _package_info.compile(name, {})

    # Get or create the information about the file, including the
    # descriptor to which the new message descriptor shall be added.
    return _file_info._FileInfo.registry.setdefault(
        filename,

        _file_info._FileInfo(