Server liveness response, including the echoed message, current server timestamp, and protocol version.
| 4965 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 4966 | @dataclass |
| 4967 | class PingResult: |
| 4968 | """Server liveness response, including the echoed message, current server timestamp, and |
| 4969 | protocol version. |
| 4970 | """ |
| 4971 | message: str |
| 4972 | """Echoed message (or default greeting)""" |
| 4973 | |
| 4974 | protocol_version: int |
| 4975 | """Server protocol version number""" |
| 4976 | |
| 4977 | timestamp: datetime |
| 4978 | """ISO 8601 timestamp when the server handled the ping""" |
| 4979 | |
| 4980 | @staticmethod |
| 4981 | def from_dict(obj: Any) -> 'PingResult': |
| 4982 | assert isinstance(obj, dict) |
| 4983 | message = from_str(obj.get("message")) |
| 4984 | protocol_version = from_int(obj.get("protocolVersion")) |
| 4985 | timestamp = from_datetime(obj.get("timestamp")) |
| 4986 | return PingResult(message, protocol_version, timestamp) |
| 4987 | |
| 4988 | def to_dict(self) -> dict: |
| 4989 | result: dict = {} |
| 4990 | result["message"] = from_str(self.message) |
| 4991 | result["protocolVersion"] = from_int(self.protocol_version) |
| 4992 | result["timestamp"] = self.timestamp.isoformat() |
| 4993 | return result |
| 4994 | |
| 4995 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 4996 | @dataclass |
no outgoing calls
no test coverage detected
searching dependent graphs…