waldur-api-client 7.8.1__py3-none-any.whl → 7.8.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of waldur-api-client might be problematic. Click here for more details.
- waldur_api_client/api/booking_resources/booking_resources_count.py +10 -13
- waldur_api_client/api/booking_resources/booking_resources_list.py +10 -13
- waldur_api_client/api/call_managing_organisations/call_managing_organisations_create.py +44 -7
- waldur_api_client/api/call_managing_organisations/call_managing_organisations_partial_update.py +46 -7
- waldur_api_client/api/call_managing_organisations/call_managing_organisations_update.py +44 -7
- waldur_api_client/api/checklists_admin/checklists_admin_checklist_questions.py +49 -0
- waldur_api_client/api/checklists_admin/checklists_admin_count.py +43 -0
- waldur_api_client/api/checklists_admin/checklists_admin_list.py +43 -0
- waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_create.py +44 -7
- waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_partial_update.py +44 -7
- waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_update.py +44 -7
- waldur_api_client/api/customers/customers_create.py +44 -7
- waldur_api_client/api/customers/customers_partial_update.py +44 -7
- waldur_api_client/api/customers/customers_update.py +44 -7
- waldur_api_client/api/external_links/external_links_create.py +44 -7
- waldur_api_client/api/external_links/external_links_partial_update.py +44 -7
- waldur_api_client/api/external_links/external_links_update.py +44 -7
- waldur_api_client/api/invoices/invoices_paid.py +44 -7
- waldur_api_client/api/marketplace_categories/marketplace_categories_create.py +44 -7
- waldur_api_client/api/marketplace_categories/marketplace_categories_partial_update.py +44 -7
- waldur_api_client/api/marketplace_categories/marketplace_categories_update.py +44 -7
- waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_create.py +44 -7
- waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_partial_update.py +44 -7
- waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_update.py +44 -7
- waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_create.py +44 -7
- waldur_api_client/api/marketplace_orders/marketplace_orders_update_attachment.py +44 -7
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_create.py +44 -7
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_image.py +44 -7
- waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_thumbnail.py +30 -5
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +10 -13
- waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +10 -13
- waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +10 -13
- waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +10 -13
- waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_create.py +44 -7
- waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_update.py +44 -7
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_create.py +44 -7
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_partial_update.py +44 -7
- waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_update.py +44 -7
- waldur_api_client/api/override_settings/override_settings.py +30 -5
- waldur_api_client/api/payments/payments_create.py +44 -7
- waldur_api_client/api/payments/payments_partial_update.py +44 -7
- waldur_api_client/api/payments/payments_update.py +44 -7
- waldur_api_client/api/projects/projects_create.py +44 -7
- waldur_api_client/api/projects/projects_partial_update.py +44 -7
- waldur_api_client/api/projects/projects_update.py +44 -7
- waldur_api_client/api/proposal_proposals/proposal_proposals_attach_document.py +30 -5
- waldur_api_client/api/slurm_jobs/slurm_jobs_create.py +44 -7
- waldur_api_client/api/slurm_jobs/slurm_jobs_update.py +44 -7
- waldur_api_client/api/support_attachments/support_attachments_create.py +44 -7
- waldur_api_client/api/user_group_invitations/user_group_invitations_count.py +15 -0
- waldur_api_client/api/user_group_invitations/user_group_invitations_list.py +15 -0
- waldur_api_client/api/users/users_create.py +44 -7
- waldur_api_client/api/users/users_partial_update.py +44 -7
- waldur_api_client/api/users/users_update.py +44 -7
- waldur_api_client/models/__init__.py +146 -2
- waldur_api_client/models/agent_type_enum.py +13 -0
- waldur_api_client/models/attachment_request_form.py +70 -0
- waldur_api_client/models/attachment_request_multipart.py +83 -0
- waldur_api_client/models/booking_offerings_list_field_item.py +1 -0
- waldur_api_client/models/booking_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/call_managing_organisation_request_form.py +103 -0
- waldur_api_client/models/call_managing_organisation_request_multipart.py +122 -0
- waldur_api_client/models/call_round.py +11 -1
- waldur_api_client/models/category_group_request_form.py +103 -0
- waldur_api_client/models/category_group_request_multipart.py +122 -0
- waldur_api_client/models/checklist_category_request_form.py +103 -0
- waldur_api_client/models/checklist_category_request_multipart.py +122 -0
- waldur_api_client/models/checklists_admin_checklist_questions_checklist_type.py +11 -0
- waldur_api_client/models/checklists_admin_checklist_questions_checklist_type_in_item.py +11 -0
- waldur_api_client/models/checklists_admin_count_checklist_type.py +11 -0
- waldur_api_client/models/checklists_admin_count_checklist_type_in_item.py +11 -0
- waldur_api_client/models/checklists_admin_list_checklist_type.py +11 -0
- waldur_api_client/models/checklists_admin_list_checklist_type_in_item.py +11 -0
- waldur_api_client/models/constance_settings.py +9 -0
- waldur_api_client/models/constance_settings_request.py +9 -0
- waldur_api_client/models/constance_settings_request_form.py +1547 -0
- waldur_api_client/models/constance_settings_request_multipart.py +2173 -0
- waldur_api_client/models/customer.py +9 -0
- waldur_api_client/models/customer_request.py +9 -0
- waldur_api_client/models/customer_request_form.py +312 -0
- waldur_api_client/models/customer_request_multipart.py +394 -0
- waldur_api_client/models/customers_list_field_item.py +1 -0
- waldur_api_client/models/customers_retrieve_field_item.py +1 -0
- waldur_api_client/models/external_link_request_form.py +111 -0
- waldur_api_client/models/external_link_request_multipart.py +132 -0
- waldur_api_client/models/firecrest_job_request_form.py +104 -0
- waldur_api_client/models/firecrest_job_request_multipart.py +127 -0
- waldur_api_client/models/integration_status.py +21 -4
- waldur_api_client/models/marketplace_category_request_form.py +153 -0
- waldur_api_client/models/marketplace_category_request_multipart.py +187 -0
- waldur_api_client/models/marketplace_provider_offerings_list_course_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_list_field_item.py +1 -0
- waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +1 -0
- waldur_api_client/models/marketplace_service_providers_offerings_list_field_item.py +1 -0
- waldur_api_client/models/nested_round.py +9 -0
- waldur_api_client/models/nested_round_request.py +9 -0
- waldur_api_client/models/offering.py +20 -0
- waldur_api_client/models/offering_create.py +20 -0
- waldur_api_client/models/offering_create_request.py +20 -0
- waldur_api_client/models/offering_create_request_form.py +479 -0
- waldur_api_client/models/offering_create_request_form_limits.py +57 -0
- waldur_api_client/models/offering_create_request_multipart.py +599 -0
- waldur_api_client/models/offering_create_request_multipart_limits.py +57 -0
- waldur_api_client/models/offering_file_request_form.py +78 -0
- waldur_api_client/models/offering_file_request_multipart.py +93 -0
- waldur_api_client/models/offering_image_request_form.py +62 -0
- waldur_api_client/models/offering_image_request_multipart.py +73 -0
- waldur_api_client/models/offering_thumbnail_request_form.py +62 -0
- waldur_api_client/models/offering_thumbnail_request_multipart.py +73 -0
- waldur_api_client/models/offering_user.py +5 -5
- waldur_api_client/models/{offering_user_state_enum.py → offering_user_state.py} +1 -1
- waldur_api_client/models/order_attachment_request_form.py +84 -0
- waldur_api_client/models/order_attachment_request_multipart.py +98 -0
- waldur_api_client/models/paid_request_form.py +81 -0
- waldur_api_client/models/paid_request_multipart.py +94 -0
- waldur_api_client/models/patched_call_managing_organisation_request_form.py +92 -0
- waldur_api_client/models/patched_call_managing_organisation_request_multipart.py +109 -0
- waldur_api_client/models/patched_category_group_request_form.py +101 -0
- waldur_api_client/models/patched_category_group_request_multipart.py +121 -0
- waldur_api_client/models/patched_checklist_category_request_form.py +102 -0
- waldur_api_client/models/patched_checklist_category_request_multipart.py +122 -0
- waldur_api_client/models/patched_customer_request.py +9 -0
- waldur_api_client/models/patched_customer_request_form.py +310 -0
- waldur_api_client/models/patched_customer_request_multipart.py +393 -0
- waldur_api_client/models/patched_external_link_request_form.py +110 -0
- waldur_api_client/models/patched_external_link_request_multipart.py +133 -0
- waldur_api_client/models/patched_marketplace_category_request_form.py +151 -0
- waldur_api_client/models/patched_marketplace_category_request_multipart.py +186 -0
- waldur_api_client/models/patched_payment_request_form.py +119 -0
- waldur_api_client/models/patched_payment_request_multipart.py +142 -0
- waldur_api_client/models/patched_project_request_form.py +279 -0
- waldur_api_client/models/patched_project_request_multipart.py +342 -0
- waldur_api_client/models/patched_service_provider_request_form.py +101 -0
- waldur_api_client/models/patched_service_provider_request_multipart.py +121 -0
- waldur_api_client/models/patched_user_request_form.py +241 -0
- waldur_api_client/models/patched_user_request_multipart.py +306 -0
- waldur_api_client/models/payment_request_form.py +113 -0
- waldur_api_client/models/payment_request_multipart.py +134 -0
- waldur_api_client/models/project_request_form.py +280 -0
- waldur_api_client/models/project_request_multipart.py +341 -0
- waldur_api_client/models/project_user.py +9 -0
- waldur_api_client/models/proposal.py +8 -0
- waldur_api_client/models/proposal_documentation_request_form.py +84 -0
- waldur_api_client/models/proposal_documentation_request_multipart.py +98 -0
- waldur_api_client/models/proposal_proposals_count_o_item.py +3 -1
- waldur_api_client/models/proposal_proposals_list_o_item.py +3 -1
- waldur_api_client/models/proposal_review.py +40 -0
- waldur_api_client/models/protected_proposal_list.py +8 -0
- waldur_api_client/models/protected_proposal_list_request.py +8 -0
- waldur_api_client/models/protected_round.py +8 -0
- waldur_api_client/models/provider_offering.py +21 -1
- waldur_api_client/models/provider_offering_details.py +20 -0
- waldur_api_client/models/public_offering_details.py +20 -0
- waldur_api_client/models/screenshot_request_form.py +87 -0
- waldur_api_client/models/screenshot_request_multipart.py +105 -0
- waldur_api_client/models/service_provider_request_form.py +112 -0
- waldur_api_client/models/service_provider_request_multipart.py +134 -0
- waldur_api_client/models/user_request_form.py +250 -0
- waldur_api_client/models/user_request_multipart.py +316 -0
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.2.dist-info}/METADATA +1 -1
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.2.dist-info}/RECORD +169 -98
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.2.dist-info}/WHEEL +0 -0
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import UNSET, File, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PatchedServiceProviderRequestForm")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PatchedServiceProviderRequestForm:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
description (Union[Unset, str]):
|
|
19
|
+
enable_notifications (Union[Unset, bool]):
|
|
20
|
+
image (Union[File, None, Unset]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
description: Union[Unset, str] = UNSET
|
|
24
|
+
enable_notifications: Union[Unset, bool] = UNSET
|
|
25
|
+
image: Union[File, None, Unset] = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
description = self.description
|
|
30
|
+
|
|
31
|
+
enable_notifications = self.enable_notifications
|
|
32
|
+
|
|
33
|
+
image: Union[None, Unset, types.FileTypes]
|
|
34
|
+
if isinstance(self.image, Unset):
|
|
35
|
+
image = UNSET
|
|
36
|
+
elif isinstance(self.image, File):
|
|
37
|
+
image = self.image.to_tuple()
|
|
38
|
+
|
|
39
|
+
else:
|
|
40
|
+
image = self.image
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update({})
|
|
45
|
+
if description is not UNSET:
|
|
46
|
+
field_dict["description"] = description
|
|
47
|
+
if enable_notifications is not UNSET:
|
|
48
|
+
field_dict["enable_notifications"] = enable_notifications
|
|
49
|
+
if image is not UNSET:
|
|
50
|
+
field_dict["image"] = image
|
|
51
|
+
|
|
52
|
+
return field_dict
|
|
53
|
+
|
|
54
|
+
@classmethod
|
|
55
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
56
|
+
d = dict(src_dict)
|
|
57
|
+
description = d.pop("description", UNSET)
|
|
58
|
+
|
|
59
|
+
enable_notifications = d.pop("enable_notifications", UNSET)
|
|
60
|
+
|
|
61
|
+
def _parse_image(data: object) -> Union[File, None, Unset]:
|
|
62
|
+
if data is None:
|
|
63
|
+
return data
|
|
64
|
+
if isinstance(data, Unset):
|
|
65
|
+
return data
|
|
66
|
+
try:
|
|
67
|
+
if not isinstance(data, bytes):
|
|
68
|
+
raise TypeError()
|
|
69
|
+
image_type_0 = File(payload=BytesIO(data))
|
|
70
|
+
|
|
71
|
+
return image_type_0
|
|
72
|
+
except: # noqa: E722
|
|
73
|
+
pass
|
|
74
|
+
return cast(Union[File, None, Unset], data)
|
|
75
|
+
|
|
76
|
+
image = _parse_image(d.pop("image", UNSET))
|
|
77
|
+
|
|
78
|
+
patched_service_provider_request_form = cls(
|
|
79
|
+
description=description,
|
|
80
|
+
enable_notifications=enable_notifications,
|
|
81
|
+
image=image,
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
patched_service_provider_request_form.additional_properties = d
|
|
85
|
+
return patched_service_provider_request_form
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def additional_keys(self) -> list[str]:
|
|
89
|
+
return list(self.additional_properties.keys())
|
|
90
|
+
|
|
91
|
+
def __getitem__(self, key: str) -> Any:
|
|
92
|
+
return self.additional_properties[key]
|
|
93
|
+
|
|
94
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
95
|
+
self.additional_properties[key] = value
|
|
96
|
+
|
|
97
|
+
def __delitem__(self, key: str) -> None:
|
|
98
|
+
del self.additional_properties[key]
|
|
99
|
+
|
|
100
|
+
def __contains__(self, key: str) -> bool:
|
|
101
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import UNSET, File, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PatchedServiceProviderRequestMultipart")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PatchedServiceProviderRequestMultipart:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
description (Union[Unset, str]):
|
|
19
|
+
enable_notifications (Union[Unset, bool]):
|
|
20
|
+
image (Union[File, None, Unset]):
|
|
21
|
+
"""
|
|
22
|
+
|
|
23
|
+
description: Union[Unset, str] = UNSET
|
|
24
|
+
enable_notifications: Union[Unset, bool] = UNSET
|
|
25
|
+
image: Union[File, None, Unset] = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
description = self.description
|
|
30
|
+
|
|
31
|
+
enable_notifications = self.enable_notifications
|
|
32
|
+
|
|
33
|
+
image: Union[None, Unset, types.FileTypes]
|
|
34
|
+
if isinstance(self.image, Unset):
|
|
35
|
+
image = UNSET
|
|
36
|
+
elif isinstance(self.image, File):
|
|
37
|
+
image = self.image.to_tuple()
|
|
38
|
+
|
|
39
|
+
else:
|
|
40
|
+
image = self.image
|
|
41
|
+
|
|
42
|
+
field_dict: dict[str, Any] = {}
|
|
43
|
+
field_dict.update(self.additional_properties)
|
|
44
|
+
field_dict.update({})
|
|
45
|
+
if description is not UNSET:
|
|
46
|
+
field_dict["description"] = description
|
|
47
|
+
if enable_notifications is not UNSET:
|
|
48
|
+
field_dict["enable_notifications"] = enable_notifications
|
|
49
|
+
if image is not UNSET:
|
|
50
|
+
field_dict["image"] = image
|
|
51
|
+
|
|
52
|
+
return field_dict
|
|
53
|
+
|
|
54
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
55
|
+
files: types.RequestFiles = []
|
|
56
|
+
|
|
57
|
+
if not isinstance(self.description, Unset):
|
|
58
|
+
files.append(("description", (None, str(self.description).encode(), "text/plain")))
|
|
59
|
+
|
|
60
|
+
if not isinstance(self.enable_notifications, Unset):
|
|
61
|
+
files.append(("enable_notifications", (None, str(self.enable_notifications).encode(), "text/plain")))
|
|
62
|
+
|
|
63
|
+
if not isinstance(self.image, Unset):
|
|
64
|
+
if isinstance(self.image, File):
|
|
65
|
+
files.append(("image", self.image.to_tuple()))
|
|
66
|
+
else:
|
|
67
|
+
files.append(("image", (None, str(self.image).encode(), "text/plain")))
|
|
68
|
+
|
|
69
|
+
for prop_name, prop in self.additional_properties.items():
|
|
70
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
71
|
+
|
|
72
|
+
return files
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
76
|
+
d = dict(src_dict)
|
|
77
|
+
description = d.pop("description", UNSET)
|
|
78
|
+
|
|
79
|
+
enable_notifications = d.pop("enable_notifications", UNSET)
|
|
80
|
+
|
|
81
|
+
def _parse_image(data: object) -> Union[File, None, Unset]:
|
|
82
|
+
if data is None:
|
|
83
|
+
return data
|
|
84
|
+
if isinstance(data, Unset):
|
|
85
|
+
return data
|
|
86
|
+
try:
|
|
87
|
+
if not isinstance(data, bytes):
|
|
88
|
+
raise TypeError()
|
|
89
|
+
image_type_0 = File(payload=BytesIO(data))
|
|
90
|
+
|
|
91
|
+
return image_type_0
|
|
92
|
+
except: # noqa: E722
|
|
93
|
+
pass
|
|
94
|
+
return cast(Union[File, None, Unset], data)
|
|
95
|
+
|
|
96
|
+
image = _parse_image(d.pop("image", UNSET))
|
|
97
|
+
|
|
98
|
+
patched_service_provider_request_multipart = cls(
|
|
99
|
+
description=description,
|
|
100
|
+
enable_notifications=enable_notifications,
|
|
101
|
+
image=image,
|
|
102
|
+
)
|
|
103
|
+
|
|
104
|
+
patched_service_provider_request_multipart.additional_properties = d
|
|
105
|
+
return patched_service_provider_request_multipart
|
|
106
|
+
|
|
107
|
+
@property
|
|
108
|
+
def additional_keys(self) -> list[str]:
|
|
109
|
+
return list(self.additional_properties.keys())
|
|
110
|
+
|
|
111
|
+
def __getitem__(self, key: str) -> Any:
|
|
112
|
+
return self.additional_properties[key]
|
|
113
|
+
|
|
114
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
115
|
+
self.additional_properties[key] = value
|
|
116
|
+
|
|
117
|
+
def __delitem__(self, key: str) -> None:
|
|
118
|
+
del self.additional_properties[key]
|
|
119
|
+
|
|
120
|
+
def __contains__(self, key: str) -> bool:
|
|
121
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import Any, TypeVar, Union, cast
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
|
|
8
|
+
from .. import types
|
|
9
|
+
from ..types import UNSET, File, Unset
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="PatchedUserRequestForm")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PatchedUserRequestForm:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
username (Union[Unset, str]): Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_
|
|
19
|
+
characters
|
|
20
|
+
slug (Union[Unset, str]):
|
|
21
|
+
native_name (Union[Unset, str]):
|
|
22
|
+
job_title (Union[Unset, str]):
|
|
23
|
+
phone_number (Union[Unset, str]):
|
|
24
|
+
organization (Union[Unset, str]):
|
|
25
|
+
description (Union[Unset, str]):
|
|
26
|
+
is_staff (Union[Unset, bool]): Designates whether the user can log into this admin site.
|
|
27
|
+
is_active (Union[Unset, bool]): Designates whether this user should be treated as active. Unselect this instead
|
|
28
|
+
of deleting accounts.
|
|
29
|
+
is_support (Union[Unset, bool]): Designates whether the user is a global support user.
|
|
30
|
+
token_lifetime (Union[None, Unset, int]): Token lifetime in seconds.
|
|
31
|
+
agree_with_policy (Union[Unset, bool]): User must agree with the policy to register.
|
|
32
|
+
notifications_enabled (Union[Unset, bool]): Designates whether the user is allowed to receive email
|
|
33
|
+
notifications.
|
|
34
|
+
preferred_language (Union[Unset, str]):
|
|
35
|
+
first_name (Union[Unset, str]):
|
|
36
|
+
last_name (Union[Unset, str]):
|
|
37
|
+
image (Union[File, None, Unset]):
|
|
38
|
+
"""
|
|
39
|
+
|
|
40
|
+
username: Union[Unset, str] = UNSET
|
|
41
|
+
slug: Union[Unset, str] = UNSET
|
|
42
|
+
native_name: Union[Unset, str] = UNSET
|
|
43
|
+
job_title: Union[Unset, str] = UNSET
|
|
44
|
+
phone_number: Union[Unset, str] = UNSET
|
|
45
|
+
organization: Union[Unset, str] = UNSET
|
|
46
|
+
description: Union[Unset, str] = UNSET
|
|
47
|
+
is_staff: Union[Unset, bool] = UNSET
|
|
48
|
+
is_active: Union[Unset, bool] = UNSET
|
|
49
|
+
is_support: Union[Unset, bool] = UNSET
|
|
50
|
+
token_lifetime: Union[None, Unset, int] = UNSET
|
|
51
|
+
agree_with_policy: Union[Unset, bool] = UNSET
|
|
52
|
+
notifications_enabled: Union[Unset, bool] = UNSET
|
|
53
|
+
preferred_language: Union[Unset, str] = UNSET
|
|
54
|
+
first_name: Union[Unset, str] = UNSET
|
|
55
|
+
last_name: Union[Unset, str] = UNSET
|
|
56
|
+
image: Union[File, None, Unset] = UNSET
|
|
57
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
58
|
+
|
|
59
|
+
def to_dict(self) -> dict[str, Any]:
|
|
60
|
+
username = self.username
|
|
61
|
+
|
|
62
|
+
slug = self.slug
|
|
63
|
+
|
|
64
|
+
native_name = self.native_name
|
|
65
|
+
|
|
66
|
+
job_title = self.job_title
|
|
67
|
+
|
|
68
|
+
phone_number = self.phone_number
|
|
69
|
+
|
|
70
|
+
organization = self.organization
|
|
71
|
+
|
|
72
|
+
description = self.description
|
|
73
|
+
|
|
74
|
+
is_staff = self.is_staff
|
|
75
|
+
|
|
76
|
+
is_active = self.is_active
|
|
77
|
+
|
|
78
|
+
is_support = self.is_support
|
|
79
|
+
|
|
80
|
+
token_lifetime: Union[None, Unset, int]
|
|
81
|
+
if isinstance(self.token_lifetime, Unset):
|
|
82
|
+
token_lifetime = UNSET
|
|
83
|
+
else:
|
|
84
|
+
token_lifetime = self.token_lifetime
|
|
85
|
+
|
|
86
|
+
agree_with_policy = self.agree_with_policy
|
|
87
|
+
|
|
88
|
+
notifications_enabled = self.notifications_enabled
|
|
89
|
+
|
|
90
|
+
preferred_language = self.preferred_language
|
|
91
|
+
|
|
92
|
+
first_name = self.first_name
|
|
93
|
+
|
|
94
|
+
last_name = self.last_name
|
|
95
|
+
|
|
96
|
+
image: Union[None, Unset, types.FileTypes]
|
|
97
|
+
if isinstance(self.image, Unset):
|
|
98
|
+
image = UNSET
|
|
99
|
+
elif isinstance(self.image, File):
|
|
100
|
+
image = self.image.to_tuple()
|
|
101
|
+
|
|
102
|
+
else:
|
|
103
|
+
image = self.image
|
|
104
|
+
|
|
105
|
+
field_dict: dict[str, Any] = {}
|
|
106
|
+
field_dict.update(self.additional_properties)
|
|
107
|
+
field_dict.update({})
|
|
108
|
+
if username is not UNSET:
|
|
109
|
+
field_dict["username"] = username
|
|
110
|
+
if slug is not UNSET:
|
|
111
|
+
field_dict["slug"] = slug
|
|
112
|
+
if native_name is not UNSET:
|
|
113
|
+
field_dict["native_name"] = native_name
|
|
114
|
+
if job_title is not UNSET:
|
|
115
|
+
field_dict["job_title"] = job_title
|
|
116
|
+
if phone_number is not UNSET:
|
|
117
|
+
field_dict["phone_number"] = phone_number
|
|
118
|
+
if organization is not UNSET:
|
|
119
|
+
field_dict["organization"] = organization
|
|
120
|
+
if description is not UNSET:
|
|
121
|
+
field_dict["description"] = description
|
|
122
|
+
if is_staff is not UNSET:
|
|
123
|
+
field_dict["is_staff"] = is_staff
|
|
124
|
+
if is_active is not UNSET:
|
|
125
|
+
field_dict["is_active"] = is_active
|
|
126
|
+
if is_support is not UNSET:
|
|
127
|
+
field_dict["is_support"] = is_support
|
|
128
|
+
if token_lifetime is not UNSET:
|
|
129
|
+
field_dict["token_lifetime"] = token_lifetime
|
|
130
|
+
if agree_with_policy is not UNSET:
|
|
131
|
+
field_dict["agree_with_policy"] = agree_with_policy
|
|
132
|
+
if notifications_enabled is not UNSET:
|
|
133
|
+
field_dict["notifications_enabled"] = notifications_enabled
|
|
134
|
+
if preferred_language is not UNSET:
|
|
135
|
+
field_dict["preferred_language"] = preferred_language
|
|
136
|
+
if first_name is not UNSET:
|
|
137
|
+
field_dict["first_name"] = first_name
|
|
138
|
+
if last_name is not UNSET:
|
|
139
|
+
field_dict["last_name"] = last_name
|
|
140
|
+
if image is not UNSET:
|
|
141
|
+
field_dict["image"] = image
|
|
142
|
+
|
|
143
|
+
return field_dict
|
|
144
|
+
|
|
145
|
+
@classmethod
|
|
146
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
147
|
+
d = dict(src_dict)
|
|
148
|
+
username = d.pop("username", UNSET)
|
|
149
|
+
|
|
150
|
+
slug = d.pop("slug", UNSET)
|
|
151
|
+
|
|
152
|
+
native_name = d.pop("native_name", UNSET)
|
|
153
|
+
|
|
154
|
+
job_title = d.pop("job_title", UNSET)
|
|
155
|
+
|
|
156
|
+
phone_number = d.pop("phone_number", UNSET)
|
|
157
|
+
|
|
158
|
+
organization = d.pop("organization", UNSET)
|
|
159
|
+
|
|
160
|
+
description = d.pop("description", UNSET)
|
|
161
|
+
|
|
162
|
+
is_staff = d.pop("is_staff", UNSET)
|
|
163
|
+
|
|
164
|
+
is_active = d.pop("is_active", UNSET)
|
|
165
|
+
|
|
166
|
+
is_support = d.pop("is_support", UNSET)
|
|
167
|
+
|
|
168
|
+
def _parse_token_lifetime(data: object) -> Union[None, Unset, int]:
|
|
169
|
+
if data is None:
|
|
170
|
+
return data
|
|
171
|
+
if isinstance(data, Unset):
|
|
172
|
+
return data
|
|
173
|
+
return cast(Union[None, Unset, int], data)
|
|
174
|
+
|
|
175
|
+
token_lifetime = _parse_token_lifetime(d.pop("token_lifetime", UNSET))
|
|
176
|
+
|
|
177
|
+
agree_with_policy = d.pop("agree_with_policy", UNSET)
|
|
178
|
+
|
|
179
|
+
notifications_enabled = d.pop("notifications_enabled", UNSET)
|
|
180
|
+
|
|
181
|
+
preferred_language = d.pop("preferred_language", UNSET)
|
|
182
|
+
|
|
183
|
+
first_name = d.pop("first_name", UNSET)
|
|
184
|
+
|
|
185
|
+
last_name = d.pop("last_name", UNSET)
|
|
186
|
+
|
|
187
|
+
def _parse_image(data: object) -> Union[File, None, Unset]:
|
|
188
|
+
if data is None:
|
|
189
|
+
return data
|
|
190
|
+
if isinstance(data, Unset):
|
|
191
|
+
return data
|
|
192
|
+
try:
|
|
193
|
+
if not isinstance(data, bytes):
|
|
194
|
+
raise TypeError()
|
|
195
|
+
image_type_0 = File(payload=BytesIO(data))
|
|
196
|
+
|
|
197
|
+
return image_type_0
|
|
198
|
+
except: # noqa: E722
|
|
199
|
+
pass
|
|
200
|
+
return cast(Union[File, None, Unset], data)
|
|
201
|
+
|
|
202
|
+
image = _parse_image(d.pop("image", UNSET))
|
|
203
|
+
|
|
204
|
+
patched_user_request_form = cls(
|
|
205
|
+
username=username,
|
|
206
|
+
slug=slug,
|
|
207
|
+
native_name=native_name,
|
|
208
|
+
job_title=job_title,
|
|
209
|
+
phone_number=phone_number,
|
|
210
|
+
organization=organization,
|
|
211
|
+
description=description,
|
|
212
|
+
is_staff=is_staff,
|
|
213
|
+
is_active=is_active,
|
|
214
|
+
is_support=is_support,
|
|
215
|
+
token_lifetime=token_lifetime,
|
|
216
|
+
agree_with_policy=agree_with_policy,
|
|
217
|
+
notifications_enabled=notifications_enabled,
|
|
218
|
+
preferred_language=preferred_language,
|
|
219
|
+
first_name=first_name,
|
|
220
|
+
last_name=last_name,
|
|
221
|
+
image=image,
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
patched_user_request_form.additional_properties = d
|
|
225
|
+
return patched_user_request_form
|
|
226
|
+
|
|
227
|
+
@property
|
|
228
|
+
def additional_keys(self) -> list[str]:
|
|
229
|
+
return list(self.additional_properties.keys())
|
|
230
|
+
|
|
231
|
+
def __getitem__(self, key: str) -> Any:
|
|
232
|
+
return self.additional_properties[key]
|
|
233
|
+
|
|
234
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
235
|
+
self.additional_properties[key] = value
|
|
236
|
+
|
|
237
|
+
def __delitem__(self, key: str) -> None:
|
|
238
|
+
del self.additional_properties[key]
|
|
239
|
+
|
|
240
|
+
def __contains__(self, key: str) -> bool:
|
|
241
|
+
return key in self.additional_properties
|