wallaroo.wallaroo_ml_ops_api_client.models.users_query_response_200

 1from typing import Any, Dict, List, Type, TypeVar
 2
 3import attr
 4
 5from ..models.users_query_response_200_users import UsersQueryResponse200Users
 6
 7T = TypeVar("T", bound="UsersQueryResponse200")
 8
 9@attr.s(auto_attribs=True)
10class UsersQueryResponse200:
11    """ Users that match the query.
12
13    Attributes:
14        users (UsersQueryResponse200Users):  User details keyed by User ID.
15    """
16
17    users: UsersQueryResponse200Users
18    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
19
20
21    def to_dict(self) -> Dict[str, Any]:
22        users = self.users.to_dict()
23
24
25        field_dict: Dict[str, Any] = {}
26        field_dict.update(self.additional_properties)
27        field_dict.update({
28            "users": users,
29        })
30
31        return field_dict
32
33
34
35    @classmethod
36    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
37        d = src_dict.copy()
38        users = UsersQueryResponse200Users.from_dict(d.pop("users"))
39
40
41
42
43        users_query_response_200 = cls(
44            users=users,
45        )
46
47        users_query_response_200.additional_properties = d
48        return users_query_response_200
49
50    @property
51    def additional_keys(self) -> List[str]:
52        return list(self.additional_properties.keys())
53
54    def __getitem__(self, key: str) -> Any:
55        return self.additional_properties[key]
56
57    def __setitem__(self, key: str, value: Any) -> None:
58        self.additional_properties[key] = value
59
60    def __delitem__(self, key: str) -> None:
61        del self.additional_properties[key]
62
63    def __contains__(self, key: str) -> bool:
64        return key in self.additional_properties
@attr.s(auto_attribs=True)
class UsersQueryResponse200:
10@attr.s(auto_attribs=True)
11class UsersQueryResponse200:
12    """ Users that match the query.
13
14    Attributes:
15        users (UsersQueryResponse200Users):  User details keyed by User ID.
16    """
17
18    users: UsersQueryResponse200Users
19    additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict)
20
21
22    def to_dict(self) -> Dict[str, Any]:
23        users = self.users.to_dict()
24
25
26        field_dict: Dict[str, Any] = {}
27        field_dict.update(self.additional_properties)
28        field_dict.update({
29            "users": users,
30        })
31
32        return field_dict
33
34
35
36    @classmethod
37    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
38        d = src_dict.copy()
39        users = UsersQueryResponse200Users.from_dict(d.pop("users"))
40
41
42
43
44        users_query_response_200 = cls(
45            users=users,
46        )
47
48        users_query_response_200.additional_properties = d
49        return users_query_response_200
50
51    @property
52    def additional_keys(self) -> List[str]:
53        return list(self.additional_properties.keys())
54
55    def __getitem__(self, key: str) -> Any:
56        return self.additional_properties[key]
57
58    def __setitem__(self, key: str, value: Any) -> None:
59        self.additional_properties[key] = value
60
61    def __delitem__(self, key: str) -> None:
62        del self.additional_properties[key]
63
64    def __contains__(self, key: str) -> bool:
65        return key in self.additional_properties

Users that match the query.

Attributes: users (UsersQueryResponse200Users): User details keyed by User ID.

2def __init__(self, users):
3    self.users = users
4    self.additional_properties = __attr_factory_additional_properties()

Method generated by attrs for class UsersQueryResponse200.

def to_dict(self) -> Dict[str, Any]:
22    def to_dict(self) -> Dict[str, Any]:
23        users = self.users.to_dict()
24
25
26        field_dict: Dict[str, Any] = {}
27        field_dict.update(self.additional_properties)
28        field_dict.update({
29            "users": users,
30        })
31
32        return field_dict
@classmethod
def from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
36    @classmethod
37    def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
38        d = src_dict.copy()
39        users = UsersQueryResponse200Users.from_dict(d.pop("users"))
40
41
42
43
44        users_query_response_200 = cls(
45            users=users,
46        )
47
48        users_query_response_200.additional_properties = d
49        return users_query_response_200
additional_keys: List[str]