Skip to content

Commit d772d01

Browse files
committed
update client
1 parent 846bb01 commit d772d01

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
from collections.abc import Mapping
2+
from typing import Any, TypeVar
3+
4+
from attrs import define as _attrs_define
5+
from attrs import field as _attrs_field
6+
7+
T = TypeVar("T", bound="PatchedTaskRequestTags")
8+
9+
10+
@_attrs_define
11+
class PatchedTaskRequestTags:
12+
"""Tags for the task represented as a mapping from 'namespace' to 'value'."""
13+
14+
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
15+
16+
def to_dict(self) -> dict[str, Any]:
17+
field_dict: dict[str, Any] = {}
18+
field_dict.update(self.additional_properties)
19+
20+
return field_dict
21+
22+
@classmethod
23+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24+
d = dict(src_dict)
25+
patched_task_request_tags = cls()
26+
27+
patched_task_request_tags.additional_properties = d
28+
return patched_task_request_tags
29+
30+
@property
31+
def additional_keys(self) -> list[str]:
32+
return list(self.additional_properties.keys())
33+
34+
def __getitem__(self, key: str) -> str:
35+
return self.additional_properties[key]
36+
37+
def __setitem__(self, key: str, value: str) -> None:
38+
self.additional_properties[key] = value
39+
40+
def __delitem__(self, key: str) -> None:
41+
del self.additional_properties[key]
42+
43+
def __contains__(self, key: str) -> bool:
44+
return key in self.additional_properties
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
from collections.abc import Mapping
2+
from typing import Any, TypeVar
3+
4+
from attrs import define as _attrs_define
5+
from attrs import field as _attrs_field
6+
7+
T = TypeVar("T", bound="TaskRequestTags")
8+
9+
10+
@_attrs_define
11+
class TaskRequestTags:
12+
"""Tags for the task represented as a mapping from 'namespace' to 'value'."""
13+
14+
additional_properties: dict[str, str] = _attrs_field(init=False, factory=dict)
15+
16+
def to_dict(self) -> dict[str, Any]:
17+
field_dict: dict[str, Any] = {}
18+
field_dict.update(self.additional_properties)
19+
20+
return field_dict
21+
22+
@classmethod
23+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
24+
d = dict(src_dict)
25+
task_request_tags = cls()
26+
27+
task_request_tags.additional_properties = d
28+
return task_request_tags
29+
30+
@property
31+
def additional_keys(self) -> list[str]:
32+
return list(self.additional_properties.keys())
33+
34+
def __getitem__(self, key: str) -> str:
35+
return self.additional_properties[key]
36+
37+
def __setitem__(self, key: str, value: str) -> None:
38+
self.additional_properties[key] = value
39+
40+
def __delitem__(self, key: str) -> None:
41+
del self.additional_properties[key]
42+
43+
def __contains__(self, key: str) -> bool:
44+
return key in self.additional_properties

0 commit comments

Comments
 (0)