class documentation

class DynamicRegistry(Registry): (source)

View In Hierarchy

Registry of SDK-owned message classes and descriptor facades.

Static Method type_name Validate a type URL and return its final protobuf-name component.
Method __init__ Undocumented
Method client_class Undocumented
Method enum_class Resolve a generated enum class only inside this registry.
Method enum_descriptor Undocumented
Method extension_descriptor Undocumented
Method file_descriptor Undocumented
Method load_all Import every SDK API module available in this installation.
Method message_class Resolve a message class only inside this registry.
Method message_descriptor Undocumented
Method pack_any Pack a namespace-owned direct message into its localized Any class.
Method service_descriptor Undocumented
Method unpack_any Unpack a localized Any through this registry only.
Property reflection Return descriptor metadata when the registry has serialized files.
Property symbols Return the immutable lazy symbol mapping.
Static Method _import_symbol_owner Undocumented
Method _decode_options Undocumented
Method _internal_enum_class Resolve descriptor-only enums without exporting them.
Method _internal_message_class Resolve descriptor-only option messages without exporting them.
Method _load_all_api_modules Undocumented
Method _reflection_snapshot Undocumented
Instance Variable _all_modules_loaded Undocumented
Instance Variable _load_lock Undocumented
Instance Variable _loading_all_modules Undocumented
Instance Variable _lock Undocumented
Instance Variable _reflection Undocumented
Instance Variable _serialized_files Undocumented

Inherited from Registry:

Class Method from_fragments Merge package fragments into one immutable namespace registry.
Method _any_class Undocumented
Method _require_reflection Undocumented
Instance Variable _any_type Undocumented
Instance Variable _cache Undocumented
Instance Variable _enum_cache Undocumented
Instance Variable _enum_symbols Undocumented
Instance Variable _symbols Undocumented
@staticmethod
def type_name(type_url: str) -> str: (source)

Validate a type URL and return its final protobuf-name component.

def __init__(self): (source)
def client_class(self, full_name: str) -> type[Any]: (source)

Undocumented

def enum_class(self, full_name: str) -> type[Enum]: (source)

Resolve a generated enum class only inside this registry.

def enum_descriptor(self, full_name: str) -> Any: (source)
def extension_descriptor(self, full_name: str) -> Any: (source)
def file_descriptor(self, name: str) -> Any: (source)
def load_all(self): (source)

Import every SDK API module available in this installation.

def message_class(self, full_name: str) -> type[Message]: (source)

Resolve a message class only inside this registry.

def message_descriptor(self, full_name: str) -> Any: (source)
def pack_any(self, message: Message, *, type_url_prefix: str = 'type.googleapis.com') -> Message: (source)

Pack a namespace-owned direct message into its localized Any class.

def service_descriptor(self, full_name: str) -> Any: (source)
def unpack_any(self, any_message: Message, *, expected_type: type[Message] | None = None) -> Message: (source)

Unpack a localized Any through this registry only.

Return descriptor metadata when the registry has serialized files.

Return the immutable lazy symbol mapping.

@staticmethod
def _import_symbol_owner(full_name: str): (source)

Undocumented

def _decode_options(self, full_name: str, payload: bytes) -> Message: (source)
def _internal_enum_class(self, full_name: str) -> type[Enum]: (source)

Resolve descriptor-only enums without exporting them.

def _internal_message_class(self, full_name: str) -> type[Message]: (source)

Resolve descriptor-only option messages without exporting them.

def _load_all_api_modules(self): (source)

Undocumented

def _reflection_snapshot(self) -> Reflection: (source)

Undocumented

_all_modules_loaded: bool = (source)

Undocumented

_load_lock = (source)

Undocumented

_loading_all_modules: bool = (source)

Undocumented

_serialized_files: dict[str, bytes] = (source)

Undocumented