Coverage for src/hush_hush/_generated/models/ready.py: 57%
35 statements
« prev ^ index » next coverage.py v7.16.0, created at 2026-10-16 16:01 +0000
« prev ^ index » next coverage.py v7.16.0, created at 2026-10-16 16:01 +0000
1# Code generated by openapi-python-client from hush-hush/api/openapi.yaml; DO NOT EDIT.
3from __future__ import annotations
5from collections.abc import Mapping
6from typing import Any, TypeVar
8from attrs import define as _attrs_define
9from attrs import field as _attrs_field
11from ..models.ready_status import ReadyStatus
13T = TypeVar("T", bound="Ready")
16@_attrs_define
17class Ready:
18 """
19 Attributes:
20 status (ReadyStatus):
21 """
23 status: ReadyStatus
24 additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
26 def to_dict(self) -> dict[str, Any]:
27 status = self.status.value
29 field_dict: dict[str, Any] = {}
30 field_dict.update(self.additional_properties)
31 field_dict.update(
32 {
33 "status": status,
34 }
35 )
37 return field_dict
39 @classmethod
40 def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
41 d = dict(src_dict)
42 status = ReadyStatus(d.pop("status"))
44 ready = cls(
45 status=status,
46 )
48 ready.additional_properties = d
49 return ready
51 @property
52 def additional_keys(self) -> list[str]:
53 return list(self.additional_properties.keys())
55 def __getitem__(self, key: str) -> Any:
56 return self.additional_properties[key]
58 def __setitem__(self, key: str, value: Any) -> None:
59 self.additional_properties[key] = value
61 def __delitem__(self, key: str) -> None:
62 del self.additional_properties[key]
64 def __contains__(self, key: str) -> bool:
65 return key in self.additional_properties