Coverage for src/hush_hush/_generated/models/mcp_response_200.py: 60%

30 statements  

« 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. 

2 

3from __future__ import annotations 

4 

5from collections.abc import Mapping 

6from typing import Any, TypeVar 

7 

8from attrs import define as _attrs_define 

9from attrs import field as _attrs_field 

10 

11T = TypeVar("T", bound="McpResponse200") 

12 

13 

14@_attrs_define 

15class McpResponse200: 

16 """An MCP JSON-RPC 2.0 response.""" 

17 

18 additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict) 

19 

20 def to_dict(self) -> dict[str, Any]: 

21 

22 field_dict: dict[str, Any] = {} 

23 field_dict.update(self.additional_properties) 

24 

25 return field_dict 

26 

27 @classmethod 

28 def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T: 

29 d = dict(src_dict) 

30 mcp_response_200 = cls() 

31 

32 mcp_response_200.additional_properties = d 

33 return mcp_response_200 

34 

35 @property 

36 def additional_keys(self) -> list[str]: 

37 return list(self.additional_properties.keys()) 

38 

39 def __getitem__(self, key: str) -> Any: 

40 return self.additional_properties[key] 

41 

42 def __setitem__(self, key: str, value: Any) -> None: 

43 self.additional_properties[key] = value 

44 

45 def __delitem__(self, key: str) -> None: 

46 del self.additional_properties[key] 

47 

48 def __contains__(self, key: str) -> bool: 

49 return key in self.additional_properties