1919
2020from pydantic import BaseModel , ConfigDict , Field , StrictBool
2121from typing import Any , ClassVar , Dict , List , Optional
22- from cloudbeds_pms_v1_3 .models .get_users_response_data_inner import GetUsersResponseDataInner
2322from typing import Optional , Set
2423from typing_extensions import Self
2524
@@ -28,7 +27,7 @@ class GetUsersResponse(BaseModel):
2827 GetUsersResponse
2928 """ # noqa: E501
3029 success : Optional [StrictBool ] = Field (default = None , description = "Returns if the request could be completed" )
31- data : Optional [List [ GetUsersResponseDataInner ]] = Field (default = None , description = "Details for the users " )
30+ data : Optional [Dict [ str , Any ]] = Field (default = None , description = "Container of user arrays, indexed by property ID (e.g., \" 1 \" ). " )
3231 __properties : ClassVar [List [str ]] = ["success" , "data" ]
3332
3433 model_config = ConfigDict (
@@ -70,13 +69,6 @@ def to_dict(self) -> Dict[str, Any]:
7069 exclude = excluded_fields ,
7170 exclude_none = True ,
7271 )
73- # override the default output from pydantic by calling `to_dict()` of each item in data (list)
74- _items = []
75- if self .data :
76- for _item_data in self .data :
77- if _item_data :
78- _items .append (_item_data .to_dict ())
79- _dict ['data' ] = _items
8072 return _dict
8173
8274 @classmethod
@@ -90,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
9082
9183 _obj = cls .model_validate ({
9284 "success" : obj .get ("success" ),
93- "data" : [ GetUsersResponseDataInner . from_dict ( _item ) for _item in obj [ "data" ]] if obj .get ("data" ) is not None else None
85+ "data" : obj .get ("data" )
9486 })
9587 return _obj
9688
0 commit comments