Lines Matching +full:data +full:- +full:mapping
2 QMP Data Models
4 This module provides simplistic data classes that represent the few
6 data to make sure it conforms to spec.
8 # pylint: disable=too-few-public-methods
15 Mapping,
23 Abstract data model, representing some QMP object of some kind.
29 def __init__(self, raw: Mapping[str, Any]):
32 def _check_key(self, key: str) -> None:
36 def _check_value(self, key: str, type_: type, typestr: str) -> None:
43 def _check_member(self, key: str, type_: type, typestr: str) -> None:
48 def _name(self) -> str:
51 def __repr__(self) -> str:
57 Defined in qmp-spec.rst, section "Server Greeting".
63 def __init__(self, raw: Mapping[str, Any]):
66 self.QMP: QMPGreeting # pylint: disable=invalid-name
68 self._check_member('QMP', abc.Mapping, "JSON object")
71 def _asdict(self) -> Dict[str, object]:
75 The legacy QMP interface needs Greetings as a garden-variety Dict.
78 be dropped again in the near-future. Caller beware!
85 Defined in qmp-spec.rst, section "Server Greeting".
91 def __init__(self, raw: Mapping[str, Any]):
94 self.version: Mapping[str, object]
98 self._check_member('version', abc.Mapping, "JSON object")
107 Defined in qmp-spec.rst, section "Error".
113 def __init__(self, raw: Mapping[str, Any]):
118 self.id: Optional[object] = None # pylint: disable=invalid-name
120 self._check_member('error', abc.Mapping, "JSON object")
129 Defined in qmp-spec.rst, section "Error".
135 def __init__(self, raw: Mapping[str, Any]):