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,479 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from io import BytesIO
|
|
3
|
+
from typing import TYPE_CHECKING, 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 ..models.blank_enum import BlankEnum
|
|
10
|
+
from ..models.country_enum import CountryEnum
|
|
11
|
+
from ..types import UNSET, File, Unset
|
|
12
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from ..models.base_provider_plan_request import BaseProviderPlanRequest
|
|
15
|
+
from ..models.offering_component_request import OfferingComponentRequest
|
|
16
|
+
from ..models.offering_create_request_form_limits import OfferingCreateRequestFormLimits
|
|
17
|
+
from ..models.offering_options_request import OfferingOptionsRequest
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
T = TypeVar("T", bound="OfferingCreateRequestForm")
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
@_attrs_define
|
|
24
|
+
class OfferingCreateRequestForm:
|
|
25
|
+
"""
|
|
26
|
+
Attributes:
|
|
27
|
+
name (str):
|
|
28
|
+
category (str):
|
|
29
|
+
type_ (str):
|
|
30
|
+
slug (Union[Unset, str]):
|
|
31
|
+
description (Union[Unset, str]):
|
|
32
|
+
full_description (Union[Unset, str]):
|
|
33
|
+
privacy_policy_link (Union[Unset, str]):
|
|
34
|
+
access_url (Union[Unset, str]): Publicly accessible offering access URL
|
|
35
|
+
customer (Union[None, Unset, str]):
|
|
36
|
+
attributes (Union[Unset, Any]):
|
|
37
|
+
options (Union[Unset, OfferingOptionsRequest]):
|
|
38
|
+
resource_options (Union[Unset, OfferingOptionsRequest]):
|
|
39
|
+
components (Union[Unset, list['OfferingComponentRequest']]):
|
|
40
|
+
vendor_details (Union[Unset, str]):
|
|
41
|
+
getting_started (Union[Unset, str]):
|
|
42
|
+
integration_guide (Union[Unset, str]):
|
|
43
|
+
thumbnail (Union[File, None, Unset]):
|
|
44
|
+
plans (Union[Unset, list['BaseProviderPlanRequest']]):
|
|
45
|
+
shared (Union[Unset, bool]): Accessible to all customers.
|
|
46
|
+
billable (Union[Unset, bool]): Purchase and usage is invoiced.
|
|
47
|
+
datacite_doi (Union[Unset, str]):
|
|
48
|
+
latitude (Union[None, Unset, float]):
|
|
49
|
+
longitude (Union[None, Unset, float]):
|
|
50
|
+
country (Union[BlankEnum, CountryEnum, Unset]):
|
|
51
|
+
backend_id (Union[Unset, str]):
|
|
52
|
+
image (Union[File, None, Unset]):
|
|
53
|
+
backend_metadata (Union[Unset, Any]):
|
|
54
|
+
compliance_checklist (Union[None, Unset, str]):
|
|
55
|
+
limits (Union[Unset, OfferingCreateRequestFormLimits]):
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
name: str
|
|
59
|
+
category: str
|
|
60
|
+
type_: str
|
|
61
|
+
slug: Union[Unset, str] = UNSET
|
|
62
|
+
description: Union[Unset, str] = UNSET
|
|
63
|
+
full_description: Union[Unset, str] = UNSET
|
|
64
|
+
privacy_policy_link: Union[Unset, str] = UNSET
|
|
65
|
+
access_url: Union[Unset, str] = UNSET
|
|
66
|
+
customer: Union[None, Unset, str] = UNSET
|
|
67
|
+
attributes: Union[Unset, Any] = UNSET
|
|
68
|
+
options: Union[Unset, "OfferingOptionsRequest"] = UNSET
|
|
69
|
+
resource_options: Union[Unset, "OfferingOptionsRequest"] = UNSET
|
|
70
|
+
components: Union[Unset, list["OfferingComponentRequest"]] = UNSET
|
|
71
|
+
vendor_details: Union[Unset, str] = UNSET
|
|
72
|
+
getting_started: Union[Unset, str] = UNSET
|
|
73
|
+
integration_guide: Union[Unset, str] = UNSET
|
|
74
|
+
thumbnail: Union[File, None, Unset] = UNSET
|
|
75
|
+
plans: Union[Unset, list["BaseProviderPlanRequest"]] = UNSET
|
|
76
|
+
shared: Union[Unset, bool] = UNSET
|
|
77
|
+
billable: Union[Unset, bool] = UNSET
|
|
78
|
+
datacite_doi: Union[Unset, str] = UNSET
|
|
79
|
+
latitude: Union[None, Unset, float] = UNSET
|
|
80
|
+
longitude: Union[None, Unset, float] = UNSET
|
|
81
|
+
country: Union[BlankEnum, CountryEnum, Unset] = UNSET
|
|
82
|
+
backend_id: Union[Unset, str] = UNSET
|
|
83
|
+
image: Union[File, None, Unset] = UNSET
|
|
84
|
+
backend_metadata: Union[Unset, Any] = UNSET
|
|
85
|
+
compliance_checklist: Union[None, Unset, str] = UNSET
|
|
86
|
+
limits: Union[Unset, "OfferingCreateRequestFormLimits"] = UNSET
|
|
87
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
88
|
+
|
|
89
|
+
def to_dict(self) -> dict[str, Any]:
|
|
90
|
+
name = self.name
|
|
91
|
+
|
|
92
|
+
category = self.category
|
|
93
|
+
|
|
94
|
+
type_ = self.type_
|
|
95
|
+
|
|
96
|
+
slug = self.slug
|
|
97
|
+
|
|
98
|
+
description = self.description
|
|
99
|
+
|
|
100
|
+
full_description = self.full_description
|
|
101
|
+
|
|
102
|
+
privacy_policy_link = self.privacy_policy_link
|
|
103
|
+
|
|
104
|
+
access_url = self.access_url
|
|
105
|
+
|
|
106
|
+
customer: Union[None, Unset, str]
|
|
107
|
+
if isinstance(self.customer, Unset):
|
|
108
|
+
customer = UNSET
|
|
109
|
+
else:
|
|
110
|
+
customer = self.customer
|
|
111
|
+
|
|
112
|
+
attributes = self.attributes
|
|
113
|
+
|
|
114
|
+
options: Union[Unset, dict[str, Any]] = UNSET
|
|
115
|
+
if not isinstance(self.options, Unset):
|
|
116
|
+
options = self.options.to_dict()
|
|
117
|
+
|
|
118
|
+
resource_options: Union[Unset, dict[str, Any]] = UNSET
|
|
119
|
+
if not isinstance(self.resource_options, Unset):
|
|
120
|
+
resource_options = self.resource_options.to_dict()
|
|
121
|
+
|
|
122
|
+
components: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
123
|
+
if not isinstance(self.components, Unset):
|
|
124
|
+
components = []
|
|
125
|
+
for components_item_data in self.components:
|
|
126
|
+
components_item = components_item_data.to_dict()
|
|
127
|
+
components.append(components_item)
|
|
128
|
+
|
|
129
|
+
vendor_details = self.vendor_details
|
|
130
|
+
|
|
131
|
+
getting_started = self.getting_started
|
|
132
|
+
|
|
133
|
+
integration_guide = self.integration_guide
|
|
134
|
+
|
|
135
|
+
thumbnail: Union[None, Unset, types.FileTypes]
|
|
136
|
+
if isinstance(self.thumbnail, Unset):
|
|
137
|
+
thumbnail = UNSET
|
|
138
|
+
elif isinstance(self.thumbnail, File):
|
|
139
|
+
thumbnail = self.thumbnail.to_tuple()
|
|
140
|
+
|
|
141
|
+
else:
|
|
142
|
+
thumbnail = self.thumbnail
|
|
143
|
+
|
|
144
|
+
plans: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
145
|
+
if not isinstance(self.plans, Unset):
|
|
146
|
+
plans = []
|
|
147
|
+
for plans_item_data in self.plans:
|
|
148
|
+
plans_item = plans_item_data.to_dict()
|
|
149
|
+
plans.append(plans_item)
|
|
150
|
+
|
|
151
|
+
shared = self.shared
|
|
152
|
+
|
|
153
|
+
billable = self.billable
|
|
154
|
+
|
|
155
|
+
datacite_doi = self.datacite_doi
|
|
156
|
+
|
|
157
|
+
latitude: Union[None, Unset, float]
|
|
158
|
+
if isinstance(self.latitude, Unset):
|
|
159
|
+
latitude = UNSET
|
|
160
|
+
else:
|
|
161
|
+
latitude = self.latitude
|
|
162
|
+
|
|
163
|
+
longitude: Union[None, Unset, float]
|
|
164
|
+
if isinstance(self.longitude, Unset):
|
|
165
|
+
longitude = UNSET
|
|
166
|
+
else:
|
|
167
|
+
longitude = self.longitude
|
|
168
|
+
|
|
169
|
+
country: Union[Unset, str]
|
|
170
|
+
if isinstance(self.country, Unset):
|
|
171
|
+
country = UNSET
|
|
172
|
+
elif isinstance(self.country, CountryEnum):
|
|
173
|
+
country = self.country.value
|
|
174
|
+
else:
|
|
175
|
+
country = self.country.value
|
|
176
|
+
|
|
177
|
+
backend_id = self.backend_id
|
|
178
|
+
|
|
179
|
+
image: Union[None, Unset, types.FileTypes]
|
|
180
|
+
if isinstance(self.image, Unset):
|
|
181
|
+
image = UNSET
|
|
182
|
+
elif isinstance(self.image, File):
|
|
183
|
+
image = self.image.to_tuple()
|
|
184
|
+
|
|
185
|
+
else:
|
|
186
|
+
image = self.image
|
|
187
|
+
|
|
188
|
+
backend_metadata = self.backend_metadata
|
|
189
|
+
|
|
190
|
+
compliance_checklist: Union[None, Unset, str]
|
|
191
|
+
if isinstance(self.compliance_checklist, Unset):
|
|
192
|
+
compliance_checklist = UNSET
|
|
193
|
+
else:
|
|
194
|
+
compliance_checklist = self.compliance_checklist
|
|
195
|
+
|
|
196
|
+
limits: Union[Unset, dict[str, Any]] = UNSET
|
|
197
|
+
if not isinstance(self.limits, Unset):
|
|
198
|
+
limits = self.limits.to_dict()
|
|
199
|
+
|
|
200
|
+
field_dict: dict[str, Any] = {}
|
|
201
|
+
field_dict.update(self.additional_properties)
|
|
202
|
+
field_dict.update(
|
|
203
|
+
{
|
|
204
|
+
"name": name,
|
|
205
|
+
"category": category,
|
|
206
|
+
"type": type_,
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
if slug is not UNSET:
|
|
210
|
+
field_dict["slug"] = slug
|
|
211
|
+
if description is not UNSET:
|
|
212
|
+
field_dict["description"] = description
|
|
213
|
+
if full_description is not UNSET:
|
|
214
|
+
field_dict["full_description"] = full_description
|
|
215
|
+
if privacy_policy_link is not UNSET:
|
|
216
|
+
field_dict["privacy_policy_link"] = privacy_policy_link
|
|
217
|
+
if access_url is not UNSET:
|
|
218
|
+
field_dict["access_url"] = access_url
|
|
219
|
+
if customer is not UNSET:
|
|
220
|
+
field_dict["customer"] = customer
|
|
221
|
+
if attributes is not UNSET:
|
|
222
|
+
field_dict["attributes"] = attributes
|
|
223
|
+
if options is not UNSET:
|
|
224
|
+
field_dict["options"] = options
|
|
225
|
+
if resource_options is not UNSET:
|
|
226
|
+
field_dict["resource_options"] = resource_options
|
|
227
|
+
if components is not UNSET:
|
|
228
|
+
field_dict["components"] = components
|
|
229
|
+
if vendor_details is not UNSET:
|
|
230
|
+
field_dict["vendor_details"] = vendor_details
|
|
231
|
+
if getting_started is not UNSET:
|
|
232
|
+
field_dict["getting_started"] = getting_started
|
|
233
|
+
if integration_guide is not UNSET:
|
|
234
|
+
field_dict["integration_guide"] = integration_guide
|
|
235
|
+
if thumbnail is not UNSET:
|
|
236
|
+
field_dict["thumbnail"] = thumbnail
|
|
237
|
+
if plans is not UNSET:
|
|
238
|
+
field_dict["plans"] = plans
|
|
239
|
+
if shared is not UNSET:
|
|
240
|
+
field_dict["shared"] = shared
|
|
241
|
+
if billable is not UNSET:
|
|
242
|
+
field_dict["billable"] = billable
|
|
243
|
+
if datacite_doi is not UNSET:
|
|
244
|
+
field_dict["datacite_doi"] = datacite_doi
|
|
245
|
+
if latitude is not UNSET:
|
|
246
|
+
field_dict["latitude"] = latitude
|
|
247
|
+
if longitude is not UNSET:
|
|
248
|
+
field_dict["longitude"] = longitude
|
|
249
|
+
if country is not UNSET:
|
|
250
|
+
field_dict["country"] = country
|
|
251
|
+
if backend_id is not UNSET:
|
|
252
|
+
field_dict["backend_id"] = backend_id
|
|
253
|
+
if image is not UNSET:
|
|
254
|
+
field_dict["image"] = image
|
|
255
|
+
if backend_metadata is not UNSET:
|
|
256
|
+
field_dict["backend_metadata"] = backend_metadata
|
|
257
|
+
if compliance_checklist is not UNSET:
|
|
258
|
+
field_dict["compliance_checklist"] = compliance_checklist
|
|
259
|
+
if limits is not UNSET:
|
|
260
|
+
field_dict["limits"] = limits
|
|
261
|
+
|
|
262
|
+
return field_dict
|
|
263
|
+
|
|
264
|
+
@classmethod
|
|
265
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
266
|
+
from ..models.base_provider_plan_request import BaseProviderPlanRequest
|
|
267
|
+
from ..models.offering_component_request import OfferingComponentRequest
|
|
268
|
+
from ..models.offering_create_request_form_limits import OfferingCreateRequestFormLimits
|
|
269
|
+
from ..models.offering_options_request import OfferingOptionsRequest
|
|
270
|
+
|
|
271
|
+
d = dict(src_dict)
|
|
272
|
+
name = d.pop("name")
|
|
273
|
+
|
|
274
|
+
category = d.pop("category")
|
|
275
|
+
|
|
276
|
+
type_ = d.pop("type")
|
|
277
|
+
|
|
278
|
+
slug = d.pop("slug", UNSET)
|
|
279
|
+
|
|
280
|
+
description = d.pop("description", UNSET)
|
|
281
|
+
|
|
282
|
+
full_description = d.pop("full_description", UNSET)
|
|
283
|
+
|
|
284
|
+
privacy_policy_link = d.pop("privacy_policy_link", UNSET)
|
|
285
|
+
|
|
286
|
+
access_url = d.pop("access_url", UNSET)
|
|
287
|
+
|
|
288
|
+
def _parse_customer(data: object) -> Union[None, Unset, str]:
|
|
289
|
+
if data is None:
|
|
290
|
+
return data
|
|
291
|
+
if isinstance(data, Unset):
|
|
292
|
+
return data
|
|
293
|
+
return cast(Union[None, Unset, str], data)
|
|
294
|
+
|
|
295
|
+
customer = _parse_customer(d.pop("customer", UNSET))
|
|
296
|
+
|
|
297
|
+
attributes = d.pop("attributes", UNSET)
|
|
298
|
+
|
|
299
|
+
_options = d.pop("options", UNSET)
|
|
300
|
+
options: Union[Unset, OfferingOptionsRequest]
|
|
301
|
+
if isinstance(_options, Unset):
|
|
302
|
+
options = UNSET
|
|
303
|
+
else:
|
|
304
|
+
options = OfferingOptionsRequest.from_dict(_options)
|
|
305
|
+
|
|
306
|
+
_resource_options = d.pop("resource_options", UNSET)
|
|
307
|
+
resource_options: Union[Unset, OfferingOptionsRequest]
|
|
308
|
+
if isinstance(_resource_options, Unset):
|
|
309
|
+
resource_options = UNSET
|
|
310
|
+
else:
|
|
311
|
+
resource_options = OfferingOptionsRequest.from_dict(_resource_options)
|
|
312
|
+
|
|
313
|
+
components = []
|
|
314
|
+
_components = d.pop("components", UNSET)
|
|
315
|
+
for components_item_data in _components or []:
|
|
316
|
+
components_item = OfferingComponentRequest.from_dict(components_item_data)
|
|
317
|
+
|
|
318
|
+
components.append(components_item)
|
|
319
|
+
|
|
320
|
+
vendor_details = d.pop("vendor_details", UNSET)
|
|
321
|
+
|
|
322
|
+
getting_started = d.pop("getting_started", UNSET)
|
|
323
|
+
|
|
324
|
+
integration_guide = d.pop("integration_guide", UNSET)
|
|
325
|
+
|
|
326
|
+
def _parse_thumbnail(data: object) -> Union[File, None, Unset]:
|
|
327
|
+
if data is None:
|
|
328
|
+
return data
|
|
329
|
+
if isinstance(data, Unset):
|
|
330
|
+
return data
|
|
331
|
+
try:
|
|
332
|
+
if not isinstance(data, bytes):
|
|
333
|
+
raise TypeError()
|
|
334
|
+
thumbnail_type_0 = File(payload=BytesIO(data))
|
|
335
|
+
|
|
336
|
+
return thumbnail_type_0
|
|
337
|
+
except: # noqa: E722
|
|
338
|
+
pass
|
|
339
|
+
return cast(Union[File, None, Unset], data)
|
|
340
|
+
|
|
341
|
+
thumbnail = _parse_thumbnail(d.pop("thumbnail", UNSET))
|
|
342
|
+
|
|
343
|
+
plans = []
|
|
344
|
+
_plans = d.pop("plans", UNSET)
|
|
345
|
+
for plans_item_data in _plans or []:
|
|
346
|
+
plans_item = BaseProviderPlanRequest.from_dict(plans_item_data)
|
|
347
|
+
|
|
348
|
+
plans.append(plans_item)
|
|
349
|
+
|
|
350
|
+
shared = d.pop("shared", UNSET)
|
|
351
|
+
|
|
352
|
+
billable = d.pop("billable", UNSET)
|
|
353
|
+
|
|
354
|
+
datacite_doi = d.pop("datacite_doi", UNSET)
|
|
355
|
+
|
|
356
|
+
def _parse_latitude(data: object) -> Union[None, Unset, float]:
|
|
357
|
+
if data is None:
|
|
358
|
+
return data
|
|
359
|
+
if isinstance(data, Unset):
|
|
360
|
+
return data
|
|
361
|
+
return cast(Union[None, Unset, float], data)
|
|
362
|
+
|
|
363
|
+
latitude = _parse_latitude(d.pop("latitude", UNSET))
|
|
364
|
+
|
|
365
|
+
def _parse_longitude(data: object) -> Union[None, Unset, float]:
|
|
366
|
+
if data is None:
|
|
367
|
+
return data
|
|
368
|
+
if isinstance(data, Unset):
|
|
369
|
+
return data
|
|
370
|
+
return cast(Union[None, Unset, float], data)
|
|
371
|
+
|
|
372
|
+
longitude = _parse_longitude(d.pop("longitude", UNSET))
|
|
373
|
+
|
|
374
|
+
def _parse_country(data: object) -> Union[BlankEnum, CountryEnum, Unset]:
|
|
375
|
+
if isinstance(data, Unset):
|
|
376
|
+
return data
|
|
377
|
+
try:
|
|
378
|
+
if not isinstance(data, str):
|
|
379
|
+
raise TypeError()
|
|
380
|
+
country_type_0 = CountryEnum(data)
|
|
381
|
+
|
|
382
|
+
return country_type_0
|
|
383
|
+
except: # noqa: E722
|
|
384
|
+
pass
|
|
385
|
+
if not isinstance(data, str):
|
|
386
|
+
raise TypeError()
|
|
387
|
+
country_type_1 = BlankEnum(data)
|
|
388
|
+
|
|
389
|
+
return country_type_1
|
|
390
|
+
|
|
391
|
+
country = _parse_country(d.pop("country", UNSET))
|
|
392
|
+
|
|
393
|
+
backend_id = d.pop("backend_id", UNSET)
|
|
394
|
+
|
|
395
|
+
def _parse_image(data: object) -> Union[File, None, Unset]:
|
|
396
|
+
if data is None:
|
|
397
|
+
return data
|
|
398
|
+
if isinstance(data, Unset):
|
|
399
|
+
return data
|
|
400
|
+
try:
|
|
401
|
+
if not isinstance(data, bytes):
|
|
402
|
+
raise TypeError()
|
|
403
|
+
image_type_0 = File(payload=BytesIO(data))
|
|
404
|
+
|
|
405
|
+
return image_type_0
|
|
406
|
+
except: # noqa: E722
|
|
407
|
+
pass
|
|
408
|
+
return cast(Union[File, None, Unset], data)
|
|
409
|
+
|
|
410
|
+
image = _parse_image(d.pop("image", UNSET))
|
|
411
|
+
|
|
412
|
+
backend_metadata = d.pop("backend_metadata", UNSET)
|
|
413
|
+
|
|
414
|
+
def _parse_compliance_checklist(data: object) -> Union[None, Unset, str]:
|
|
415
|
+
if data is None:
|
|
416
|
+
return data
|
|
417
|
+
if isinstance(data, Unset):
|
|
418
|
+
return data
|
|
419
|
+
return cast(Union[None, Unset, str], data)
|
|
420
|
+
|
|
421
|
+
compliance_checklist = _parse_compliance_checklist(d.pop("compliance_checklist", UNSET))
|
|
422
|
+
|
|
423
|
+
_limits = d.pop("limits", UNSET)
|
|
424
|
+
limits: Union[Unset, OfferingCreateRequestFormLimits]
|
|
425
|
+
if isinstance(_limits, Unset):
|
|
426
|
+
limits = UNSET
|
|
427
|
+
else:
|
|
428
|
+
limits = OfferingCreateRequestFormLimits.from_dict(_limits)
|
|
429
|
+
|
|
430
|
+
offering_create_request_form = cls(
|
|
431
|
+
name=name,
|
|
432
|
+
category=category,
|
|
433
|
+
type_=type_,
|
|
434
|
+
slug=slug,
|
|
435
|
+
description=description,
|
|
436
|
+
full_description=full_description,
|
|
437
|
+
privacy_policy_link=privacy_policy_link,
|
|
438
|
+
access_url=access_url,
|
|
439
|
+
customer=customer,
|
|
440
|
+
attributes=attributes,
|
|
441
|
+
options=options,
|
|
442
|
+
resource_options=resource_options,
|
|
443
|
+
components=components,
|
|
444
|
+
vendor_details=vendor_details,
|
|
445
|
+
getting_started=getting_started,
|
|
446
|
+
integration_guide=integration_guide,
|
|
447
|
+
thumbnail=thumbnail,
|
|
448
|
+
plans=plans,
|
|
449
|
+
shared=shared,
|
|
450
|
+
billable=billable,
|
|
451
|
+
datacite_doi=datacite_doi,
|
|
452
|
+
latitude=latitude,
|
|
453
|
+
longitude=longitude,
|
|
454
|
+
country=country,
|
|
455
|
+
backend_id=backend_id,
|
|
456
|
+
image=image,
|
|
457
|
+
backend_metadata=backend_metadata,
|
|
458
|
+
compliance_checklist=compliance_checklist,
|
|
459
|
+
limits=limits,
|
|
460
|
+
)
|
|
461
|
+
|
|
462
|
+
offering_create_request_form.additional_properties = d
|
|
463
|
+
return offering_create_request_form
|
|
464
|
+
|
|
465
|
+
@property
|
|
466
|
+
def additional_keys(self) -> list[str]:
|
|
467
|
+
return list(self.additional_properties.keys())
|
|
468
|
+
|
|
469
|
+
def __getitem__(self, key: str) -> Any:
|
|
470
|
+
return self.additional_properties[key]
|
|
471
|
+
|
|
472
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
473
|
+
self.additional_properties[key] = value
|
|
474
|
+
|
|
475
|
+
def __delitem__(self, key: str) -> None:
|
|
476
|
+
del self.additional_properties[key]
|
|
477
|
+
|
|
478
|
+
def __contains__(self, key: str) -> bool:
|
|
479
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.offering_component_limit_request import OfferingComponentLimitRequest
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="OfferingCreateRequestFormLimits")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class OfferingCreateRequestFormLimits:
|
|
16
|
+
""" """
|
|
17
|
+
|
|
18
|
+
additional_properties: dict[str, "OfferingComponentLimitRequest"] = _attrs_field(init=False, factory=dict)
|
|
19
|
+
|
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
|
21
|
+
field_dict: dict[str, Any] = {}
|
|
22
|
+
for prop_name, prop in self.additional_properties.items():
|
|
23
|
+
field_dict[prop_name] = prop.to_dict()
|
|
24
|
+
|
|
25
|
+
return field_dict
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
29
|
+
from ..models.offering_component_limit_request import OfferingComponentLimitRequest
|
|
30
|
+
|
|
31
|
+
d = dict(src_dict)
|
|
32
|
+
offering_create_request_form_limits = cls()
|
|
33
|
+
|
|
34
|
+
additional_properties = {}
|
|
35
|
+
for prop_name, prop_dict in d.items():
|
|
36
|
+
additional_property = OfferingComponentLimitRequest.from_dict(prop_dict)
|
|
37
|
+
|
|
38
|
+
additional_properties[prop_name] = additional_property
|
|
39
|
+
|
|
40
|
+
offering_create_request_form_limits.additional_properties = additional_properties
|
|
41
|
+
return offering_create_request_form_limits
|
|
42
|
+
|
|
43
|
+
@property
|
|
44
|
+
def additional_keys(self) -> list[str]:
|
|
45
|
+
return list(self.additional_properties.keys())
|
|
46
|
+
|
|
47
|
+
def __getitem__(self, key: str) -> "OfferingComponentLimitRequest":
|
|
48
|
+
return self.additional_properties[key]
|
|
49
|
+
|
|
50
|
+
def __setitem__(self, key: str, value: "OfferingComponentLimitRequest") -> None:
|
|
51
|
+
self.additional_properties[key] = value
|
|
52
|
+
|
|
53
|
+
def __delitem__(self, key: str) -> None:
|
|
54
|
+
del self.additional_properties[key]
|
|
55
|
+
|
|
56
|
+
def __contains__(self, key: str) -> bool:
|
|
57
|
+
return key in self.additional_properties
|