(self)
| 8025 | return ShutdownRequest(reason, type) |
| 8026 | |
| 8027 | def to_dict(self) -> dict: |
| 8028 | result: dict = {} |
| 8029 | if self.reason is not None: |
| 8030 | result["reason"] = from_union([from_str, from_none], self.reason) |
| 8031 | if self.type is not None: |
| 8032 | result["type"] = from_union([lambda x: to_enum(ShutdownType, x), from_none], self.type) |
| 8033 | return result |
| 8034 | |
| 8035 | # Experimental: this type is part of an experimental API and may change or be removed. |
| 8036 | @dataclass |
nothing calls this directly
no test coverage detected