wallaroo.wallaroo_ml_ops_api_client.models.users_query_json_body
1from typing import Any, Dict, List, Type, TypeVar, Union, cast 2 3import attr 4 5from ..types import UNSET, Unset 6 7T = TypeVar("T", bound="UsersQueryJsonBody") 8 9@attr.s(auto_attribs=True) 10class UsersQueryJsonBody: 11 """ Specifies which users to query. 12 13 Attributes: 14 user_ids (Union[Unset, None, List[str]]): Optional list of user IDs to return. 15 """ 16 17 user_ids: Union[Unset, None, List[str]] = UNSET 18 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 19 20 21 def to_dict(self) -> Dict[str, Any]: 22 user_ids: Union[Unset, None, List[str]] = UNSET 23 if not isinstance(self.user_ids, Unset): 24 if self.user_ids is None: 25 user_ids = None 26 else: 27 user_ids = self.user_ids 28 29 30 31 32 33 field_dict: Dict[str, Any] = {} 34 field_dict.update(self.additional_properties) 35 field_dict.update({ 36 }) 37 if user_ids is not UNSET: 38 field_dict["user_ids"] = user_ids 39 40 return field_dict 41 42 43 44 @classmethod 45 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 46 d = src_dict.copy() 47 user_ids = cast(List[str], d.pop("user_ids", UNSET)) 48 49 50 users_query_json_body = cls( 51 user_ids=user_ids, 52 ) 53 54 users_query_json_body.additional_properties = d 55 return users_query_json_body 56 57 @property 58 def additional_keys(self) -> List[str]: 59 return list(self.additional_properties.keys()) 60 61 def __getitem__(self, key: str) -> Any: 62 return self.additional_properties[key] 63 64 def __setitem__(self, key: str, value: Any) -> None: 65 self.additional_properties[key] = value 66 67 def __delitem__(self, key: str) -> None: 68 del self.additional_properties[key] 69 70 def __contains__(self, key: str) -> bool: 71 return key in self.additional_properties
@attr.s(auto_attribs=True)
class
UsersQueryJsonBody:
10@attr.s(auto_attribs=True) 11class UsersQueryJsonBody: 12 """ Specifies which users to query. 13 14 Attributes: 15 user_ids (Union[Unset, None, List[str]]): Optional list of user IDs to return. 16 """ 17 18 user_ids: Union[Unset, None, List[str]] = UNSET 19 additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) 20 21 22 def to_dict(self) -> Dict[str, Any]: 23 user_ids: Union[Unset, None, List[str]] = UNSET 24 if not isinstance(self.user_ids, Unset): 25 if self.user_ids is None: 26 user_ids = None 27 else: 28 user_ids = self.user_ids 29 30 31 32 33 34 field_dict: Dict[str, Any] = {} 35 field_dict.update(self.additional_properties) 36 field_dict.update({ 37 }) 38 if user_ids is not UNSET: 39 field_dict["user_ids"] = user_ids 40 41 return field_dict 42 43 44 45 @classmethod 46 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 47 d = src_dict.copy() 48 user_ids = cast(List[str], d.pop("user_ids", UNSET)) 49 50 51 users_query_json_body = cls( 52 user_ids=user_ids, 53 ) 54 55 users_query_json_body.additional_properties = d 56 return users_query_json_body 57 58 @property 59 def additional_keys(self) -> List[str]: 60 return list(self.additional_properties.keys()) 61 62 def __getitem__(self, key: str) -> Any: 63 return self.additional_properties[key] 64 65 def __setitem__(self, key: str, value: Any) -> None: 66 self.additional_properties[key] = value 67 68 def __delitem__(self, key: str) -> None: 69 del self.additional_properties[key] 70 71 def __contains__(self, key: str) -> bool: 72 return key in self.additional_properties
Specifies which users to query.
Attributes: user_ids (Union[Unset, None, List[str]]): Optional list of user IDs to return.
UsersQueryJsonBody( user_ids: Union[wallaroo.wallaroo_ml_ops_api_client.types.Unset, NoneType, List[str]] = <wallaroo.wallaroo_ml_ops_api_client.types.Unset object>)
2def __init__(self, user_ids=attr_dict['user_ids'].default): 3 self.user_ids = user_ids 4 self.additional_properties = __attr_factory_additional_properties()
Method generated by attrs for class UsersQueryJsonBody.
def
to_dict(self) -> Dict[str, Any]:
22 def to_dict(self) -> Dict[str, Any]: 23 user_ids: Union[Unset, None, List[str]] = UNSET 24 if not isinstance(self.user_ids, Unset): 25 if self.user_ids is None: 26 user_ids = None 27 else: 28 user_ids = self.user_ids 29 30 31 32 33 34 field_dict: Dict[str, Any] = {} 35 field_dict.update(self.additional_properties) 36 field_dict.update({ 37 }) 38 if user_ids is not UNSET: 39 field_dict["user_ids"] = user_ids 40 41 return field_dict
@classmethod
def
from_dict(cls: Type[~T], src_dict: Dict[str, Any]) -> ~T:
45 @classmethod 46 def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T: 47 d = src_dict.copy() 48 user_ids = cast(List[str], d.pop("user_ids", UNSET)) 49 50 51 users_query_json_body = cls( 52 user_ids=user_ids, 53 ) 54 55 users_query_json_body.additional_properties = d 56 return users_query_json_body