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
« 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
11T = TypeVar("T", bound="McpResponse200")
14@_attrs_define
15class McpResponse200:
16 """An MCP JSON-RPC 2.0 response."""
18 additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
20 def to_dict(self) -> dict[str, Any]:
22 field_dict: dict[str, Any] = {}
23 field_dict.update(self.additional_properties)
25 return field_dict
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()
32 mcp_response_200.additional_properties = d
33 return mcp_response_200
35 @property
36 def additional_keys(self) -> list[str]:
37 return list(self.additional_properties.keys())
39 def __getitem__(self, key: str) -> Any:
40 return self.additional_properties[key]
42 def __setitem__(self, key: str, value: Any) -> None:
43 self.additional_properties[key] = value
45 def __delitem__(self, key: str) -> None:
46 del self.additional_properties[key]
48 def __contains__(self, key: str) -> bool:
49 return key in self.additional_properties