diff --git a/funkwhale_api_client/models/manage_user.py b/funkwhale_api_client/models/manage_user.py index 4a99e5b63fc396f175fdf067d1a1eb98686138d0..9a37dcb5d75d37ec457a3e276d400f1ba13264f5 100644 --- a/funkwhale_api_client/models/manage_user.py +++ b/funkwhale_api_client/models/manage_user.py @@ -29,7 +29,7 @@ class ManageUser: is_superuser (Union[Unset, bool]): Designates that this user has all permissions without explicitly assigning them. last_activity (Optional[datetime.datetime]): - upload_quota (Optional[int]): + upload_quota (Union[Unset, None, int]): """ id: int @@ -40,11 +40,11 @@ class ManageUser: privacy_level: PrivacyLevelEnum full_username: str last_activity: Optional[datetime.datetime] - upload_quota: Optional[int] name: Union[Unset, str] = UNSET is_active: Union[Unset, bool] = UNSET is_staff: Union[Unset, bool] = UNSET is_superuser: Union[Unset, bool] = UNSET + upload_quota: Union[Unset, None, int] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -78,7 +78,6 @@ class ManageUser: "privacy_level": privacy_level, "full_username": full_username, "last_activity": last_activity, - "upload_quota": upload_quota, } ) if name is not UNSET: @@ -89,6 +88,8 @@ class ManageUser: field_dict["is_staff"] = is_staff if is_superuser is not UNSET: field_dict["is_superuser"] = is_superuser + if upload_quota is not UNSET: + field_dict["upload_quota"] = upload_quota return field_dict @@ -124,7 +125,7 @@ class ManageUser: else: last_activity = isoparse(_last_activity) - upload_quota = d.pop("upload_quota") + upload_quota = d.pop("upload_quota", UNSET) manage_user = cls( id=id, diff --git a/funkwhale_api_client/models/manage_user_request.py b/funkwhale_api_client/models/manage_user_request.py index 0c35ddcd820b626663a8878b53aeebafd86e8492..cb674be448a638cd35f71b1d1821c5a2968da2c6 100644 --- a/funkwhale_api_client/models/manage_user_request.py +++ b/funkwhale_api_client/models/manage_user_request.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, List, Optional, Type, TypeVar, Union +from typing import Any, Dict, List, Type, TypeVar, Union import attr @@ -17,14 +17,14 @@ class ManageUserRequest: is_staff (Union[Unset, bool]): Designates whether the user can log into this admin site. is_superuser (Union[Unset, bool]): Designates that this user has all permissions without explicitly assigning them. - upload_quota (Optional[int]): + upload_quota (Union[Unset, None, int]): """ - upload_quota: Optional[int] name: Union[Unset, str] = UNSET is_active: Union[Unset, bool] = UNSET is_staff: Union[Unset, bool] = UNSET is_superuser: Union[Unset, bool] = UNSET + upload_quota: Union[Unset, None, int] = UNSET additional_properties: Dict[str, Any] = attr.ib(init=False, factory=dict) def to_dict(self) -> Dict[str, Any]: @@ -36,11 +36,7 @@ class ManageUserRequest: field_dict: Dict[str, Any] = {} field_dict.update(self.additional_properties) - field_dict.update( - { - "upload_quota": upload_quota, - } - ) + field_dict.update({}) if name is not UNSET: field_dict["name"] = name if is_active is not UNSET: @@ -49,6 +45,8 @@ class ManageUserRequest: field_dict["is_staff"] = is_staff if is_superuser is not UNSET: field_dict["is_superuser"] = is_superuser + if upload_quota is not UNSET: + field_dict["upload_quota"] = upload_quota return field_dict @@ -75,11 +73,7 @@ class ManageUserRequest: field_dict.update( {key: (None, str(value).encode(), "text/plain") for key, value in self.additional_properties.items()} ) - field_dict.update( - { - "upload_quota": upload_quota, - } - ) + field_dict.update({}) if name is not UNSET: field_dict["name"] = name if is_active is not UNSET: @@ -88,6 +82,8 @@ class ManageUserRequest: field_dict["is_staff"] = is_staff if is_superuser is not UNSET: field_dict["is_superuser"] = is_superuser + if upload_quota is not UNSET: + field_dict["upload_quota"] = upload_quota return field_dict @@ -102,7 +98,7 @@ class ManageUserRequest: is_superuser = d.pop("is_superuser", UNSET) - upload_quota = d.pop("upload_quota") + upload_quota = d.pop("upload_quota", UNSET) manage_user_request = cls( name=name,