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,151 @@
|
|
|
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="PatchedMarketplaceCategoryRequestForm")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PatchedMarketplaceCategoryRequestForm:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
title (Union[Unset, str]):
|
|
19
|
+
description (Union[Unset, str]):
|
|
20
|
+
icon (Union[File, None, Unset]):
|
|
21
|
+
default_vm_category (Union[Unset, bool]): Set to "true" if this category is for OpenStack VM. Only one category
|
|
22
|
+
can have "true" value.
|
|
23
|
+
default_volume_category (Union[Unset, bool]): Set to true if this category is for OpenStack Volume. Only one
|
|
24
|
+
category can have "true" value.
|
|
25
|
+
default_tenant_category (Union[Unset, bool]): Set to true if this category is for OpenStack Tenant. Only one
|
|
26
|
+
category can have "true" value.
|
|
27
|
+
group (Union[None, Unset, str]):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
title: Union[Unset, str] = UNSET
|
|
31
|
+
description: Union[Unset, str] = UNSET
|
|
32
|
+
icon: Union[File, None, Unset] = UNSET
|
|
33
|
+
default_vm_category: Union[Unset, bool] = UNSET
|
|
34
|
+
default_volume_category: Union[Unset, bool] = UNSET
|
|
35
|
+
default_tenant_category: Union[Unset, bool] = UNSET
|
|
36
|
+
group: Union[None, Unset, str] = UNSET
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
title = self.title
|
|
41
|
+
|
|
42
|
+
description = self.description
|
|
43
|
+
|
|
44
|
+
icon: Union[None, Unset, types.FileTypes]
|
|
45
|
+
if isinstance(self.icon, Unset):
|
|
46
|
+
icon = UNSET
|
|
47
|
+
elif isinstance(self.icon, File):
|
|
48
|
+
icon = self.icon.to_tuple()
|
|
49
|
+
|
|
50
|
+
else:
|
|
51
|
+
icon = self.icon
|
|
52
|
+
|
|
53
|
+
default_vm_category = self.default_vm_category
|
|
54
|
+
|
|
55
|
+
default_volume_category = self.default_volume_category
|
|
56
|
+
|
|
57
|
+
default_tenant_category = self.default_tenant_category
|
|
58
|
+
|
|
59
|
+
group: Union[None, Unset, str]
|
|
60
|
+
if isinstance(self.group, Unset):
|
|
61
|
+
group = UNSET
|
|
62
|
+
else:
|
|
63
|
+
group = self.group
|
|
64
|
+
|
|
65
|
+
field_dict: dict[str, Any] = {}
|
|
66
|
+
field_dict.update(self.additional_properties)
|
|
67
|
+
field_dict.update({})
|
|
68
|
+
if title is not UNSET:
|
|
69
|
+
field_dict["title"] = title
|
|
70
|
+
if description is not UNSET:
|
|
71
|
+
field_dict["description"] = description
|
|
72
|
+
if icon is not UNSET:
|
|
73
|
+
field_dict["icon"] = icon
|
|
74
|
+
if default_vm_category is not UNSET:
|
|
75
|
+
field_dict["default_vm_category"] = default_vm_category
|
|
76
|
+
if default_volume_category is not UNSET:
|
|
77
|
+
field_dict["default_volume_category"] = default_volume_category
|
|
78
|
+
if default_tenant_category is not UNSET:
|
|
79
|
+
field_dict["default_tenant_category"] = default_tenant_category
|
|
80
|
+
if group is not UNSET:
|
|
81
|
+
field_dict["group"] = group
|
|
82
|
+
|
|
83
|
+
return field_dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
87
|
+
d = dict(src_dict)
|
|
88
|
+
title = d.pop("title", UNSET)
|
|
89
|
+
|
|
90
|
+
description = d.pop("description", UNSET)
|
|
91
|
+
|
|
92
|
+
def _parse_icon(data: object) -> Union[File, None, Unset]:
|
|
93
|
+
if data is None:
|
|
94
|
+
return data
|
|
95
|
+
if isinstance(data, Unset):
|
|
96
|
+
return data
|
|
97
|
+
try:
|
|
98
|
+
if not isinstance(data, bytes):
|
|
99
|
+
raise TypeError()
|
|
100
|
+
icon_type_0 = File(payload=BytesIO(data))
|
|
101
|
+
|
|
102
|
+
return icon_type_0
|
|
103
|
+
except: # noqa: E722
|
|
104
|
+
pass
|
|
105
|
+
return cast(Union[File, None, Unset], data)
|
|
106
|
+
|
|
107
|
+
icon = _parse_icon(d.pop("icon", UNSET))
|
|
108
|
+
|
|
109
|
+
default_vm_category = d.pop("default_vm_category", UNSET)
|
|
110
|
+
|
|
111
|
+
default_volume_category = d.pop("default_volume_category", UNSET)
|
|
112
|
+
|
|
113
|
+
default_tenant_category = d.pop("default_tenant_category", UNSET)
|
|
114
|
+
|
|
115
|
+
def _parse_group(data: object) -> Union[None, Unset, str]:
|
|
116
|
+
if data is None:
|
|
117
|
+
return data
|
|
118
|
+
if isinstance(data, Unset):
|
|
119
|
+
return data
|
|
120
|
+
return cast(Union[None, Unset, str], data)
|
|
121
|
+
|
|
122
|
+
group = _parse_group(d.pop("group", UNSET))
|
|
123
|
+
|
|
124
|
+
patched_marketplace_category_request_form = cls(
|
|
125
|
+
title=title,
|
|
126
|
+
description=description,
|
|
127
|
+
icon=icon,
|
|
128
|
+
default_vm_category=default_vm_category,
|
|
129
|
+
default_volume_category=default_volume_category,
|
|
130
|
+
default_tenant_category=default_tenant_category,
|
|
131
|
+
group=group,
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
patched_marketplace_category_request_form.additional_properties = d
|
|
135
|
+
return patched_marketplace_category_request_form
|
|
136
|
+
|
|
137
|
+
@property
|
|
138
|
+
def additional_keys(self) -> list[str]:
|
|
139
|
+
return list(self.additional_properties.keys())
|
|
140
|
+
|
|
141
|
+
def __getitem__(self, key: str) -> Any:
|
|
142
|
+
return self.additional_properties[key]
|
|
143
|
+
|
|
144
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
145
|
+
self.additional_properties[key] = value
|
|
146
|
+
|
|
147
|
+
def __delitem__(self, key: str) -> None:
|
|
148
|
+
del self.additional_properties[key]
|
|
149
|
+
|
|
150
|
+
def __contains__(self, key: str) -> bool:
|
|
151
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,186 @@
|
|
|
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="PatchedMarketplaceCategoryRequestMultipart")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class PatchedMarketplaceCategoryRequestMultipart:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
title (Union[Unset, str]):
|
|
19
|
+
description (Union[Unset, str]):
|
|
20
|
+
icon (Union[File, None, Unset]):
|
|
21
|
+
default_vm_category (Union[Unset, bool]): Set to "true" if this category is for OpenStack VM. Only one category
|
|
22
|
+
can have "true" value.
|
|
23
|
+
default_volume_category (Union[Unset, bool]): Set to true if this category is for OpenStack Volume. Only one
|
|
24
|
+
category can have "true" value.
|
|
25
|
+
default_tenant_category (Union[Unset, bool]): Set to true if this category is for OpenStack Tenant. Only one
|
|
26
|
+
category can have "true" value.
|
|
27
|
+
group (Union[None, Unset, str]):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
title: Union[Unset, str] = UNSET
|
|
31
|
+
description: Union[Unset, str] = UNSET
|
|
32
|
+
icon: Union[File, None, Unset] = UNSET
|
|
33
|
+
default_vm_category: Union[Unset, bool] = UNSET
|
|
34
|
+
default_volume_category: Union[Unset, bool] = UNSET
|
|
35
|
+
default_tenant_category: Union[Unset, bool] = UNSET
|
|
36
|
+
group: Union[None, Unset, str] = UNSET
|
|
37
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
38
|
+
|
|
39
|
+
def to_dict(self) -> dict[str, Any]:
|
|
40
|
+
title = self.title
|
|
41
|
+
|
|
42
|
+
description = self.description
|
|
43
|
+
|
|
44
|
+
icon: Union[None, Unset, types.FileTypes]
|
|
45
|
+
if isinstance(self.icon, Unset):
|
|
46
|
+
icon = UNSET
|
|
47
|
+
elif isinstance(self.icon, File):
|
|
48
|
+
icon = self.icon.to_tuple()
|
|
49
|
+
|
|
50
|
+
else:
|
|
51
|
+
icon = self.icon
|
|
52
|
+
|
|
53
|
+
default_vm_category = self.default_vm_category
|
|
54
|
+
|
|
55
|
+
default_volume_category = self.default_volume_category
|
|
56
|
+
|
|
57
|
+
default_tenant_category = self.default_tenant_category
|
|
58
|
+
|
|
59
|
+
group: Union[None, Unset, str]
|
|
60
|
+
if isinstance(self.group, Unset):
|
|
61
|
+
group = UNSET
|
|
62
|
+
else:
|
|
63
|
+
group = self.group
|
|
64
|
+
|
|
65
|
+
field_dict: dict[str, Any] = {}
|
|
66
|
+
field_dict.update(self.additional_properties)
|
|
67
|
+
field_dict.update({})
|
|
68
|
+
if title is not UNSET:
|
|
69
|
+
field_dict["title"] = title
|
|
70
|
+
if description is not UNSET:
|
|
71
|
+
field_dict["description"] = description
|
|
72
|
+
if icon is not UNSET:
|
|
73
|
+
field_dict["icon"] = icon
|
|
74
|
+
if default_vm_category is not UNSET:
|
|
75
|
+
field_dict["default_vm_category"] = default_vm_category
|
|
76
|
+
if default_volume_category is not UNSET:
|
|
77
|
+
field_dict["default_volume_category"] = default_volume_category
|
|
78
|
+
if default_tenant_category is not UNSET:
|
|
79
|
+
field_dict["default_tenant_category"] = default_tenant_category
|
|
80
|
+
if group is not UNSET:
|
|
81
|
+
field_dict["group"] = group
|
|
82
|
+
|
|
83
|
+
return field_dict
|
|
84
|
+
|
|
85
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
86
|
+
files: types.RequestFiles = []
|
|
87
|
+
|
|
88
|
+
if not isinstance(self.title, Unset):
|
|
89
|
+
files.append(("title", (None, str(self.title).encode(), "text/plain")))
|
|
90
|
+
|
|
91
|
+
if not isinstance(self.description, Unset):
|
|
92
|
+
files.append(("description", (None, str(self.description).encode(), "text/plain")))
|
|
93
|
+
|
|
94
|
+
if not isinstance(self.icon, Unset):
|
|
95
|
+
if isinstance(self.icon, File):
|
|
96
|
+
files.append(("icon", self.icon.to_tuple()))
|
|
97
|
+
else:
|
|
98
|
+
files.append(("icon", (None, str(self.icon).encode(), "text/plain")))
|
|
99
|
+
|
|
100
|
+
if not isinstance(self.default_vm_category, Unset):
|
|
101
|
+
files.append(("default_vm_category", (None, str(self.default_vm_category).encode(), "text/plain")))
|
|
102
|
+
|
|
103
|
+
if not isinstance(self.default_volume_category, Unset):
|
|
104
|
+
files.append(("default_volume_category", (None, str(self.default_volume_category).encode(), "text/plain")))
|
|
105
|
+
|
|
106
|
+
if not isinstance(self.default_tenant_category, Unset):
|
|
107
|
+
files.append(("default_tenant_category", (None, str(self.default_tenant_category).encode(), "text/plain")))
|
|
108
|
+
|
|
109
|
+
if not isinstance(self.group, Unset):
|
|
110
|
+
if isinstance(self.group, str):
|
|
111
|
+
files.append(("group", (None, str(self.group).encode(), "text/plain")))
|
|
112
|
+
else:
|
|
113
|
+
files.append(("group", (None, str(self.group).encode(), "text/plain")))
|
|
114
|
+
|
|
115
|
+
for prop_name, prop in self.additional_properties.items():
|
|
116
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
117
|
+
|
|
118
|
+
return files
|
|
119
|
+
|
|
120
|
+
@classmethod
|
|
121
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
122
|
+
d = dict(src_dict)
|
|
123
|
+
title = d.pop("title", UNSET)
|
|
124
|
+
|
|
125
|
+
description = d.pop("description", UNSET)
|
|
126
|
+
|
|
127
|
+
def _parse_icon(data: object) -> Union[File, None, Unset]:
|
|
128
|
+
if data is None:
|
|
129
|
+
return data
|
|
130
|
+
if isinstance(data, Unset):
|
|
131
|
+
return data
|
|
132
|
+
try:
|
|
133
|
+
if not isinstance(data, bytes):
|
|
134
|
+
raise TypeError()
|
|
135
|
+
icon_type_0 = File(payload=BytesIO(data))
|
|
136
|
+
|
|
137
|
+
return icon_type_0
|
|
138
|
+
except: # noqa: E722
|
|
139
|
+
pass
|
|
140
|
+
return cast(Union[File, None, Unset], data)
|
|
141
|
+
|
|
142
|
+
icon = _parse_icon(d.pop("icon", UNSET))
|
|
143
|
+
|
|
144
|
+
default_vm_category = d.pop("default_vm_category", UNSET)
|
|
145
|
+
|
|
146
|
+
default_volume_category = d.pop("default_volume_category", UNSET)
|
|
147
|
+
|
|
148
|
+
default_tenant_category = d.pop("default_tenant_category", UNSET)
|
|
149
|
+
|
|
150
|
+
def _parse_group(data: object) -> Union[None, Unset, str]:
|
|
151
|
+
if data is None:
|
|
152
|
+
return data
|
|
153
|
+
if isinstance(data, Unset):
|
|
154
|
+
return data
|
|
155
|
+
return cast(Union[None, Unset, str], data)
|
|
156
|
+
|
|
157
|
+
group = _parse_group(d.pop("group", UNSET))
|
|
158
|
+
|
|
159
|
+
patched_marketplace_category_request_multipart = cls(
|
|
160
|
+
title=title,
|
|
161
|
+
description=description,
|
|
162
|
+
icon=icon,
|
|
163
|
+
default_vm_category=default_vm_category,
|
|
164
|
+
default_volume_category=default_volume_category,
|
|
165
|
+
default_tenant_category=default_tenant_category,
|
|
166
|
+
group=group,
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
patched_marketplace_category_request_multipart.additional_properties = d
|
|
170
|
+
return patched_marketplace_category_request_multipart
|
|
171
|
+
|
|
172
|
+
@property
|
|
173
|
+
def additional_keys(self) -> list[str]:
|
|
174
|
+
return list(self.additional_properties.keys())
|
|
175
|
+
|
|
176
|
+
def __getitem__(self, key: str) -> Any:
|
|
177
|
+
return self.additional_properties[key]
|
|
178
|
+
|
|
179
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
180
|
+
self.additional_properties[key] = value
|
|
181
|
+
|
|
182
|
+
def __delitem__(self, key: str) -> None:
|
|
183
|
+
del self.additional_properties[key]
|
|
184
|
+
|
|
185
|
+
def __contains__(self, key: str) -> bool:
|
|
186
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from io import BytesIO
|
|
4
|
+
from typing import Any, TypeVar, Union, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from .. import types
|
|
11
|
+
from ..types import UNSET, File, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="PatchedPaymentRequestForm")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PatchedPaymentRequestForm:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
profile (Union[Unset, str]):
|
|
21
|
+
date_of_payment (Union[Unset, datetime.date]):
|
|
22
|
+
sum_ (Union[Unset, str]):
|
|
23
|
+
proof (Union[File, None, Unset]):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
profile: Union[Unset, str] = UNSET
|
|
27
|
+
date_of_payment: Union[Unset, datetime.date] = UNSET
|
|
28
|
+
sum_: Union[Unset, str] = UNSET
|
|
29
|
+
proof: Union[File, None, Unset] = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
profile = self.profile
|
|
34
|
+
|
|
35
|
+
date_of_payment: Union[Unset, str] = UNSET
|
|
36
|
+
if not isinstance(self.date_of_payment, Unset):
|
|
37
|
+
date_of_payment = self.date_of_payment.isoformat()
|
|
38
|
+
|
|
39
|
+
sum_ = self.sum_
|
|
40
|
+
|
|
41
|
+
proof: Union[None, Unset, types.FileTypes]
|
|
42
|
+
if isinstance(self.proof, Unset):
|
|
43
|
+
proof = UNSET
|
|
44
|
+
elif isinstance(self.proof, File):
|
|
45
|
+
proof = self.proof.to_tuple()
|
|
46
|
+
|
|
47
|
+
else:
|
|
48
|
+
proof = self.proof
|
|
49
|
+
|
|
50
|
+
field_dict: dict[str, Any] = {}
|
|
51
|
+
field_dict.update(self.additional_properties)
|
|
52
|
+
field_dict.update({})
|
|
53
|
+
if profile is not UNSET:
|
|
54
|
+
field_dict["profile"] = profile
|
|
55
|
+
if date_of_payment is not UNSET:
|
|
56
|
+
field_dict["date_of_payment"] = date_of_payment
|
|
57
|
+
if sum_ is not UNSET:
|
|
58
|
+
field_dict["sum"] = sum_
|
|
59
|
+
if proof is not UNSET:
|
|
60
|
+
field_dict["proof"] = proof
|
|
61
|
+
|
|
62
|
+
return field_dict
|
|
63
|
+
|
|
64
|
+
@classmethod
|
|
65
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
66
|
+
d = dict(src_dict)
|
|
67
|
+
profile = d.pop("profile", UNSET)
|
|
68
|
+
|
|
69
|
+
_date_of_payment = d.pop("date_of_payment", UNSET)
|
|
70
|
+
date_of_payment: Union[Unset, datetime.date]
|
|
71
|
+
if isinstance(_date_of_payment, Unset):
|
|
72
|
+
date_of_payment = UNSET
|
|
73
|
+
else:
|
|
74
|
+
date_of_payment = isoparse(_date_of_payment).date()
|
|
75
|
+
|
|
76
|
+
sum_ = d.pop("sum", UNSET)
|
|
77
|
+
|
|
78
|
+
def _parse_proof(data: object) -> Union[File, None, Unset]:
|
|
79
|
+
if data is None:
|
|
80
|
+
return data
|
|
81
|
+
if isinstance(data, Unset):
|
|
82
|
+
return data
|
|
83
|
+
try:
|
|
84
|
+
if not isinstance(data, bytes):
|
|
85
|
+
raise TypeError()
|
|
86
|
+
proof_type_0 = File(payload=BytesIO(data))
|
|
87
|
+
|
|
88
|
+
return proof_type_0
|
|
89
|
+
except: # noqa: E722
|
|
90
|
+
pass
|
|
91
|
+
return cast(Union[File, None, Unset], data)
|
|
92
|
+
|
|
93
|
+
proof = _parse_proof(d.pop("proof", UNSET))
|
|
94
|
+
|
|
95
|
+
patched_payment_request_form = cls(
|
|
96
|
+
profile=profile,
|
|
97
|
+
date_of_payment=date_of_payment,
|
|
98
|
+
sum_=sum_,
|
|
99
|
+
proof=proof,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
patched_payment_request_form.additional_properties = d
|
|
103
|
+
return patched_payment_request_form
|
|
104
|
+
|
|
105
|
+
@property
|
|
106
|
+
def additional_keys(self) -> list[str]:
|
|
107
|
+
return list(self.additional_properties.keys())
|
|
108
|
+
|
|
109
|
+
def __getitem__(self, key: str) -> Any:
|
|
110
|
+
return self.additional_properties[key]
|
|
111
|
+
|
|
112
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
113
|
+
self.additional_properties[key] = value
|
|
114
|
+
|
|
115
|
+
def __delitem__(self, key: str) -> None:
|
|
116
|
+
del self.additional_properties[key]
|
|
117
|
+
|
|
118
|
+
def __contains__(self, key: str) -> bool:
|
|
119
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from io import BytesIO
|
|
4
|
+
from typing import Any, TypeVar, Union, cast
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from .. import types
|
|
11
|
+
from ..types import UNSET, File, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="PatchedPaymentRequestMultipart")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PatchedPaymentRequestMultipart:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
profile (Union[Unset, str]):
|
|
21
|
+
date_of_payment (Union[Unset, datetime.date]):
|
|
22
|
+
sum_ (Union[Unset, str]):
|
|
23
|
+
proof (Union[File, None, Unset]):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
profile: Union[Unset, str] = UNSET
|
|
27
|
+
date_of_payment: Union[Unset, datetime.date] = UNSET
|
|
28
|
+
sum_: Union[Unset, str] = UNSET
|
|
29
|
+
proof: Union[File, None, Unset] = UNSET
|
|
30
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
31
|
+
|
|
32
|
+
def to_dict(self) -> dict[str, Any]:
|
|
33
|
+
profile = self.profile
|
|
34
|
+
|
|
35
|
+
date_of_payment: Union[Unset, str] = UNSET
|
|
36
|
+
if not isinstance(self.date_of_payment, Unset):
|
|
37
|
+
date_of_payment = self.date_of_payment.isoformat()
|
|
38
|
+
|
|
39
|
+
sum_ = self.sum_
|
|
40
|
+
|
|
41
|
+
proof: Union[None, Unset, types.FileTypes]
|
|
42
|
+
if isinstance(self.proof, Unset):
|
|
43
|
+
proof = UNSET
|
|
44
|
+
elif isinstance(self.proof, File):
|
|
45
|
+
proof = self.proof.to_tuple()
|
|
46
|
+
|
|
47
|
+
else:
|
|
48
|
+
proof = self.proof
|
|
49
|
+
|
|
50
|
+
field_dict: dict[str, Any] = {}
|
|
51
|
+
field_dict.update(self.additional_properties)
|
|
52
|
+
field_dict.update({})
|
|
53
|
+
if profile is not UNSET:
|
|
54
|
+
field_dict["profile"] = profile
|
|
55
|
+
if date_of_payment is not UNSET:
|
|
56
|
+
field_dict["date_of_payment"] = date_of_payment
|
|
57
|
+
if sum_ is not UNSET:
|
|
58
|
+
field_dict["sum"] = sum_
|
|
59
|
+
if proof is not UNSET:
|
|
60
|
+
field_dict["proof"] = proof
|
|
61
|
+
|
|
62
|
+
return field_dict
|
|
63
|
+
|
|
64
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
65
|
+
files: types.RequestFiles = []
|
|
66
|
+
|
|
67
|
+
if not isinstance(self.profile, Unset):
|
|
68
|
+
files.append(("profile", (None, str(self.profile).encode(), "text/plain")))
|
|
69
|
+
|
|
70
|
+
if not isinstance(self.date_of_payment, Unset):
|
|
71
|
+
files.append(("date_of_payment", (None, self.date_of_payment.isoformat().encode(), "text/plain")))
|
|
72
|
+
|
|
73
|
+
if not isinstance(self.sum_, Unset):
|
|
74
|
+
files.append(("sum", (None, str(self.sum_).encode(), "text/plain")))
|
|
75
|
+
|
|
76
|
+
if not isinstance(self.proof, Unset):
|
|
77
|
+
if isinstance(self.proof, File):
|
|
78
|
+
files.append(("proof", self.proof.to_tuple()))
|
|
79
|
+
else:
|
|
80
|
+
files.append(("proof", (None, str(self.proof).encode(), "text/plain")))
|
|
81
|
+
|
|
82
|
+
for prop_name, prop in self.additional_properties.items():
|
|
83
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
84
|
+
|
|
85
|
+
return files
|
|
86
|
+
|
|
87
|
+
@classmethod
|
|
88
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
89
|
+
d = dict(src_dict)
|
|
90
|
+
profile = d.pop("profile", UNSET)
|
|
91
|
+
|
|
92
|
+
_date_of_payment = d.pop("date_of_payment", UNSET)
|
|
93
|
+
date_of_payment: Union[Unset, datetime.date]
|
|
94
|
+
if isinstance(_date_of_payment, Unset):
|
|
95
|
+
date_of_payment = UNSET
|
|
96
|
+
else:
|
|
97
|
+
date_of_payment = isoparse(_date_of_payment).date()
|
|
98
|
+
|
|
99
|
+
sum_ = d.pop("sum", UNSET)
|
|
100
|
+
|
|
101
|
+
def _parse_proof(data: object) -> Union[File, None, Unset]:
|
|
102
|
+
if data is None:
|
|
103
|
+
return data
|
|
104
|
+
if isinstance(data, Unset):
|
|
105
|
+
return data
|
|
106
|
+
try:
|
|
107
|
+
if not isinstance(data, bytes):
|
|
108
|
+
raise TypeError()
|
|
109
|
+
proof_type_0 = File(payload=BytesIO(data))
|
|
110
|
+
|
|
111
|
+
return proof_type_0
|
|
112
|
+
except: # noqa: E722
|
|
113
|
+
pass
|
|
114
|
+
return cast(Union[File, None, Unset], data)
|
|
115
|
+
|
|
116
|
+
proof = _parse_proof(d.pop("proof", UNSET))
|
|
117
|
+
|
|
118
|
+
patched_payment_request_multipart = cls(
|
|
119
|
+
profile=profile,
|
|
120
|
+
date_of_payment=date_of_payment,
|
|
121
|
+
sum_=sum_,
|
|
122
|
+
proof=proof,
|
|
123
|
+
)
|
|
124
|
+
|
|
125
|
+
patched_payment_request_multipart.additional_properties = d
|
|
126
|
+
return patched_payment_request_multipart
|
|
127
|
+
|
|
128
|
+
@property
|
|
129
|
+
def additional_keys(self) -> list[str]:
|
|
130
|
+
return list(self.additional_properties.keys())
|
|
131
|
+
|
|
132
|
+
def __getitem__(self, key: str) -> Any:
|
|
133
|
+
return self.additional_properties[key]
|
|
134
|
+
|
|
135
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
136
|
+
self.additional_properties[key] = value
|
|
137
|
+
|
|
138
|
+
def __delitem__(self, key: str) -> None:
|
|
139
|
+
del self.additional_properties[key]
|
|
140
|
+
|
|
141
|
+
def __contains__(self, key: str) -> bool:
|
|
142
|
+
return key in self.additional_properties
|