(self)
| 164 | return PingState(self._src_ping.get('state', None)) |
| 165 | |
| 166 | def as_dict(self) -> Dict[str, Any]: |
| 167 | output = {k: v for k, v in self._src_ping.items() if v is not None} |
| 168 | latency = output.pop('latency', None) |
| 169 | if latency: |
| 170 | output['latency_us'] = latency |
| 171 | return output |
| 172 | |
| 173 | def __repr__(self) -> str: |
| 174 | return "EndpointPingReport:{}".format(self.as_dict()) |