Coverage for src/hush_hush/_generated/models/registration_finish_request_credential.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="RegistrationFinishRequestCredential") 

12 

13 

14@_attrs_define 

15class RegistrationFinishRequestCredential: 

16 """The browser's attestation response, exactly as 

17 `navigator.credentials.create()` returned it. 

18 

19 """ 

20 

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

22 

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

24 

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

26 field_dict.update(self.additional_properties) 

27 

28 return field_dict 

29 

30 @classmethod 

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

32 d = dict(src_dict) 

33 registration_finish_request_credential = cls() 

34 

35 registration_finish_request_credential.additional_properties = d 

36 return registration_finish_request_credential 

37 

38 @property 

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

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

41 

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

43 return self.additional_properties[key] 

44 

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

46 self.additional_properties[key] = value 

47 

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

49 del self.additional_properties[key] 

50 

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

52 return key in self.additional_properties