waldur-api-client 7.8.1__py3-none-any.whl → 7.8.3__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_project_update_requests/marketplace_project_update_requests_count.py +18 -18
- waldur_api_client/api/marketplace_project_update_requests/marketplace_project_update_requests_list.py +18 -18
- 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_provider_resources/marketplace_provider_resources_move_resource.py +22 -0
- 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_resources/marketplace_resources_move_resource.py +22 -0
- 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/openstack_backups/openstack_backups_restore.py +10 -10
- 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/rancher_services/rancher_services_create.py +22 -22
- 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 +172 -8
- 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/azure_sql_server_create_order_attributes.py +5 -10
- waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +7 -12
- 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/booking_resource.py +16 -34
- waldur_api_client/models/booking_resources_list_field_item.py +1 -3
- waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -3
- 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 +18 -0
- waldur_api_client/models/constance_settings_request.py +18 -0
- waldur_api_client/models/constance_settings_request_form.py +1556 -0
- waldur_api_client/models/constance_settings_request_multipart.py +2187 -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/event_groups_enum.py +1 -0
- waldur_api_client/models/event_types_enum.py +2 -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/generic_order_attributes.py +1 -2
- waldur_api_client/models/integration_status.py +21 -4
- waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +1 -3
- waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +1 -3
- 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_orders_list_field_item.py +1 -3
- waldur_api_client/models/marketplace_orders_retrieve_field_item.py +1 -3
- 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_provider_resources_details_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -3
- waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -3
- 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_resources_details_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_resources_list_field_item.py +1 -3
- waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -3
- waldur_api_client/models/marketplace_robot_accounts_list_field_item.py +2 -1
- waldur_api_client/models/marketplace_robot_accounts_retrieve_field_item.py +2 -1
- waldur_api_client/models/marketplace_service_providers_offerings_list_field_item.py +1 -0
- waldur_api_client/models/merged_plugin_options.py +9 -0
- waldur_api_client/models/merged_plugin_options_request.py +9 -0
- waldur_api_client/models/move_resource_request.py +65 -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/open_stack_backup_restoration.py +3 -5
- waldur_api_client/models/open_stack_backup_restoration_create_request.py +141 -0
- waldur_api_client/models/open_stack_backup_restoration_request.py +22 -30
- waldur_api_client/models/{open_stack_nested_security_group_request.py → open_stack_create_floating_ip_request.py} +17 -6
- waldur_api_client/models/open_stack_create_port_request.py +104 -0
- waldur_api_client/models/open_stack_instance.py +13 -29
- waldur_api_client/models/open_stack_instance_create_order_attributes.py +67 -54
- waldur_api_client/models/open_stack_instance_floating_i_ps_update_request.py +5 -5
- waldur_api_client/models/open_stack_instance_ports_update_request.py +5 -5
- waldur_api_client/models/open_stack_instance_request.py +1 -67
- waldur_api_client/models/open_stack_nested_port_request.py +0 -9
- waldur_api_client/models/open_stack_security_group_hyperlink_request.py +59 -0
- waldur_api_client/models/open_stack_server_group_hyperlink_request.py +59 -0
- waldur_api_client/models/open_stack_tenant_create_order_attributes.py +9 -14
- waldur_api_client/models/open_stack_volume_create_order_attributes.py +8 -13
- waldur_api_client/models/openstack_instances_list_field_item.py +0 -7
- waldur_api_client/models/openstack_instances_retrieve_field_item.py +0 -7
- 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/order_create.py +8 -0
- waldur_api_client/models/order_details.py +16 -34
- 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_open_stack_instance_request.py +1 -67
- 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/{rancher_nested_security_group.py → project_hyperlink_request.py} +5 -5
- 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/rancher_clusters_list_field_item.py +0 -1
- waldur_api_client/models/rancher_clusters_retrieve_field_item.py +0 -1
- waldur_api_client/models/rancher_service_create.py +508 -0
- waldur_api_client/models/rancher_service_create_marketplace_offering_plugin_options_type_0.py +44 -0
- waldur_api_client/models/rancher_service_create_request.py +185 -0
- waldur_api_client/models/rancher_service_request.py +16 -19
- waldur_api_client/models/rancher_workload_create.py +59 -0
- waldur_api_client/models/rancher_workload_create_request.py +59 -0
- waldur_api_client/models/resource.py +16 -34
- waldur_api_client/models/robot_account_details.py +22 -13
- 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/slurm_invoices_slurm_package_create_order_attributes.py +4 -9
- waldur_api_client/models/user_request_form.py +250 -0
- waldur_api_client/models/user_request_multipart.py +316 -0
- waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +11 -16
- waldur_api_client/models/vmware_nested_network.py +0 -25
- waldur_api_client/models/vmware_nested_network_request.py +6 -14
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.3.dist-info}/METADATA +1 -1
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.3.dist-info}/RECORD +233 -153
- waldur_api_client/models/open_stack_data_volume.py +0 -81
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.3.dist-info}/WHEEL +0 -0
- {waldur_api_client-7.8.1.dist-info → waldur_api_client-7.8.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
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="PaymentRequestMultipart")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class PaymentRequestMultipart:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
profile (str):
|
|
21
|
+
date_of_payment (datetime.date):
|
|
22
|
+
sum_ (Union[Unset, str]):
|
|
23
|
+
proof (Union[File, None, Unset]):
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
profile: str
|
|
27
|
+
date_of_payment: datetime.date
|
|
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 = self.date_of_payment.isoformat()
|
|
36
|
+
|
|
37
|
+
sum_ = self.sum_
|
|
38
|
+
|
|
39
|
+
proof: Union[None, Unset, types.FileTypes]
|
|
40
|
+
if isinstance(self.proof, Unset):
|
|
41
|
+
proof = UNSET
|
|
42
|
+
elif isinstance(self.proof, File):
|
|
43
|
+
proof = self.proof.to_tuple()
|
|
44
|
+
|
|
45
|
+
else:
|
|
46
|
+
proof = self.proof
|
|
47
|
+
|
|
48
|
+
field_dict: dict[str, Any] = {}
|
|
49
|
+
field_dict.update(self.additional_properties)
|
|
50
|
+
field_dict.update(
|
|
51
|
+
{
|
|
52
|
+
"profile": profile,
|
|
53
|
+
"date_of_payment": date_of_payment,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
if sum_ is not UNSET:
|
|
57
|
+
field_dict["sum"] = sum_
|
|
58
|
+
if proof is not UNSET:
|
|
59
|
+
field_dict["proof"] = proof
|
|
60
|
+
|
|
61
|
+
return field_dict
|
|
62
|
+
|
|
63
|
+
def to_multipart(self) -> types.RequestFiles:
|
|
64
|
+
files: types.RequestFiles = []
|
|
65
|
+
|
|
66
|
+
files.append(("profile", (None, str(self.profile).encode(), "text/plain")))
|
|
67
|
+
|
|
68
|
+
files.append(("date_of_payment", (None, self.date_of_payment.isoformat().encode(), "text/plain")))
|
|
69
|
+
|
|
70
|
+
if not isinstance(self.sum_, Unset):
|
|
71
|
+
files.append(("sum", (None, str(self.sum_).encode(), "text/plain")))
|
|
72
|
+
|
|
73
|
+
if not isinstance(self.proof, Unset):
|
|
74
|
+
if isinstance(self.proof, File):
|
|
75
|
+
files.append(("proof", self.proof.to_tuple()))
|
|
76
|
+
else:
|
|
77
|
+
files.append(("proof", (None, str(self.proof).encode(), "text/plain")))
|
|
78
|
+
|
|
79
|
+
for prop_name, prop in self.additional_properties.items():
|
|
80
|
+
files.append((prop_name, (None, str(prop).encode(), "text/plain")))
|
|
81
|
+
|
|
82
|
+
return files
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
86
|
+
d = dict(src_dict)
|
|
87
|
+
profile = d.pop("profile")
|
|
88
|
+
|
|
89
|
+
date_of_payment = isoparse(d.pop("date_of_payment")).date()
|
|
90
|
+
|
|
91
|
+
sum_ = d.pop("sum", UNSET)
|
|
92
|
+
|
|
93
|
+
def _parse_proof(data: object) -> Union[File, None, Unset]:
|
|
94
|
+
if data is None:
|
|
95
|
+
return data
|
|
96
|
+
if isinstance(data, Unset):
|
|
97
|
+
return data
|
|
98
|
+
try:
|
|
99
|
+
if not isinstance(data, bytes):
|
|
100
|
+
raise TypeError()
|
|
101
|
+
proof_type_0 = File(payload=BytesIO(data))
|
|
102
|
+
|
|
103
|
+
return proof_type_0
|
|
104
|
+
except: # noqa: E722
|
|
105
|
+
pass
|
|
106
|
+
return cast(Union[File, None, Unset], data)
|
|
107
|
+
|
|
108
|
+
proof = _parse_proof(d.pop("proof", UNSET))
|
|
109
|
+
|
|
110
|
+
payment_request_multipart = cls(
|
|
111
|
+
profile=profile,
|
|
112
|
+
date_of_payment=date_of_payment,
|
|
113
|
+
sum_=sum_,
|
|
114
|
+
proof=proof,
|
|
115
|
+
)
|
|
116
|
+
|
|
117
|
+
payment_request_multipart.additional_properties = d
|
|
118
|
+
return payment_request_multipart
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def additional_keys(self) -> list[str]:
|
|
122
|
+
return list(self.additional_properties.keys())
|
|
123
|
+
|
|
124
|
+
def __getitem__(self, key: str) -> Any:
|
|
125
|
+
return self.additional_properties[key]
|
|
126
|
+
|
|
127
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
128
|
+
self.additional_properties[key] = value
|
|
129
|
+
|
|
130
|
+
def __delitem__(self, key: str) -> None:
|
|
131
|
+
del self.additional_properties[key]
|
|
132
|
+
|
|
133
|
+
def __contains__(self, key: str) -> bool:
|
|
134
|
+
return key in self.additional_properties
|
|
@@ -4,11 +4,11 @@ from typing import Any, TypeVar
|
|
|
4
4
|
from attrs import define as _attrs_define
|
|
5
5
|
from attrs import field as _attrs_field
|
|
6
6
|
|
|
7
|
-
T = TypeVar("T", bound="
|
|
7
|
+
T = TypeVar("T", bound="ProjectHyperlinkRequest")
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
@_attrs_define
|
|
11
|
-
class
|
|
11
|
+
class ProjectHyperlinkRequest:
|
|
12
12
|
"""
|
|
13
13
|
Attributes:
|
|
14
14
|
url (str):
|
|
@@ -35,12 +35,12 @@ class RancherNestedSecurityGroup:
|
|
|
35
35
|
d = dict(src_dict)
|
|
36
36
|
url = d.pop("url")
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
project_hyperlink_request = cls(
|
|
39
39
|
url=url,
|
|
40
40
|
)
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
return
|
|
42
|
+
project_hyperlink_request.additional_properties = d
|
|
43
|
+
return project_hyperlink_request
|
|
44
44
|
|
|
45
45
|
@property
|
|
46
46
|
def additional_keys(self) -> list[str]:
|
|
@@ -0,0 +1,280 @@
|
|
|
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 ..models.blank_enum import BlankEnum
|
|
12
|
+
from ..models.kind_enum import KindEnum
|
|
13
|
+
from ..models.oecd_fos_2007_code_enum import OecdFos2007CodeEnum
|
|
14
|
+
from ..types import UNSET, File, Unset
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="ProjectRequestForm")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class ProjectRequestForm:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
name (str):
|
|
24
|
+
customer (str):
|
|
25
|
+
slug (Union[Unset, str]):
|
|
26
|
+
description (Union[Unset, str]):
|
|
27
|
+
type_ (Union[None, Unset, str]):
|
|
28
|
+
backend_id (Union[Unset, str]):
|
|
29
|
+
start_date (Union[None, Unset, datetime.date]):
|
|
30
|
+
end_date (Union[None, Unset, datetime.date]): The date is inclusive. Once reached, all project resource will be
|
|
31
|
+
scheduled for termination.
|
|
32
|
+
oecd_fos_2007_code (Union[BlankEnum, None, OecdFos2007CodeEnum, Unset]):
|
|
33
|
+
is_industry (Union[Unset, bool]):
|
|
34
|
+
image (Union[File, None, Unset]):
|
|
35
|
+
kind (Union[Unset, KindEnum]):
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
name: str
|
|
39
|
+
customer: str
|
|
40
|
+
slug: Union[Unset, str] = UNSET
|
|
41
|
+
description: Union[Unset, str] = UNSET
|
|
42
|
+
type_: Union[None, Unset, str] = UNSET
|
|
43
|
+
backend_id: Union[Unset, str] = UNSET
|
|
44
|
+
start_date: Union[None, Unset, datetime.date] = UNSET
|
|
45
|
+
end_date: Union[None, Unset, datetime.date] = UNSET
|
|
46
|
+
oecd_fos_2007_code: Union[BlankEnum, None, OecdFos2007CodeEnum, Unset] = UNSET
|
|
47
|
+
is_industry: Union[Unset, bool] = UNSET
|
|
48
|
+
image: Union[File, None, Unset] = UNSET
|
|
49
|
+
kind: Union[Unset, KindEnum] = UNSET
|
|
50
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
51
|
+
|
|
52
|
+
def to_dict(self) -> dict[str, Any]:
|
|
53
|
+
name = self.name
|
|
54
|
+
|
|
55
|
+
customer = self.customer
|
|
56
|
+
|
|
57
|
+
slug = self.slug
|
|
58
|
+
|
|
59
|
+
description = self.description
|
|
60
|
+
|
|
61
|
+
type_: Union[None, Unset, str]
|
|
62
|
+
if isinstance(self.type_, Unset):
|
|
63
|
+
type_ = UNSET
|
|
64
|
+
else:
|
|
65
|
+
type_ = self.type_
|
|
66
|
+
|
|
67
|
+
backend_id = self.backend_id
|
|
68
|
+
|
|
69
|
+
start_date: Union[None, Unset, str]
|
|
70
|
+
if isinstance(self.start_date, Unset):
|
|
71
|
+
start_date = UNSET
|
|
72
|
+
elif isinstance(self.start_date, datetime.date):
|
|
73
|
+
start_date = self.start_date.isoformat()
|
|
74
|
+
else:
|
|
75
|
+
start_date = self.start_date
|
|
76
|
+
|
|
77
|
+
end_date: Union[None, Unset, str]
|
|
78
|
+
if isinstance(self.end_date, Unset):
|
|
79
|
+
end_date = UNSET
|
|
80
|
+
elif isinstance(self.end_date, datetime.date):
|
|
81
|
+
end_date = self.end_date.isoformat()
|
|
82
|
+
else:
|
|
83
|
+
end_date = self.end_date
|
|
84
|
+
|
|
85
|
+
oecd_fos_2007_code: Union[None, Unset, str]
|
|
86
|
+
if isinstance(self.oecd_fos_2007_code, Unset):
|
|
87
|
+
oecd_fos_2007_code = UNSET
|
|
88
|
+
elif isinstance(self.oecd_fos_2007_code, OecdFos2007CodeEnum):
|
|
89
|
+
oecd_fos_2007_code = self.oecd_fos_2007_code.value
|
|
90
|
+
elif isinstance(self.oecd_fos_2007_code, BlankEnum):
|
|
91
|
+
oecd_fos_2007_code = self.oecd_fos_2007_code.value
|
|
92
|
+
else:
|
|
93
|
+
oecd_fos_2007_code = self.oecd_fos_2007_code
|
|
94
|
+
|
|
95
|
+
is_industry = self.is_industry
|
|
96
|
+
|
|
97
|
+
image: Union[None, Unset, types.FileTypes]
|
|
98
|
+
if isinstance(self.image, Unset):
|
|
99
|
+
image = UNSET
|
|
100
|
+
elif isinstance(self.image, File):
|
|
101
|
+
image = self.image.to_tuple()
|
|
102
|
+
|
|
103
|
+
else:
|
|
104
|
+
image = self.image
|
|
105
|
+
|
|
106
|
+
kind: Union[Unset, str] = UNSET
|
|
107
|
+
if not isinstance(self.kind, Unset):
|
|
108
|
+
kind = self.kind.value
|
|
109
|
+
|
|
110
|
+
field_dict: dict[str, Any] = {}
|
|
111
|
+
field_dict.update(self.additional_properties)
|
|
112
|
+
field_dict.update(
|
|
113
|
+
{
|
|
114
|
+
"name": name,
|
|
115
|
+
"customer": customer,
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
if slug is not UNSET:
|
|
119
|
+
field_dict["slug"] = slug
|
|
120
|
+
if description is not UNSET:
|
|
121
|
+
field_dict["description"] = description
|
|
122
|
+
if type_ is not UNSET:
|
|
123
|
+
field_dict["type"] = type_
|
|
124
|
+
if backend_id is not UNSET:
|
|
125
|
+
field_dict["backend_id"] = backend_id
|
|
126
|
+
if start_date is not UNSET:
|
|
127
|
+
field_dict["start_date"] = start_date
|
|
128
|
+
if end_date is not UNSET:
|
|
129
|
+
field_dict["end_date"] = end_date
|
|
130
|
+
if oecd_fos_2007_code is not UNSET:
|
|
131
|
+
field_dict["oecd_fos_2007_code"] = oecd_fos_2007_code
|
|
132
|
+
if is_industry is not UNSET:
|
|
133
|
+
field_dict["is_industry"] = is_industry
|
|
134
|
+
if image is not UNSET:
|
|
135
|
+
field_dict["image"] = image
|
|
136
|
+
if kind is not UNSET:
|
|
137
|
+
field_dict["kind"] = kind
|
|
138
|
+
|
|
139
|
+
return field_dict
|
|
140
|
+
|
|
141
|
+
@classmethod
|
|
142
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
143
|
+
d = dict(src_dict)
|
|
144
|
+
name = d.pop("name")
|
|
145
|
+
|
|
146
|
+
customer = d.pop("customer")
|
|
147
|
+
|
|
148
|
+
slug = d.pop("slug", UNSET)
|
|
149
|
+
|
|
150
|
+
description = d.pop("description", UNSET)
|
|
151
|
+
|
|
152
|
+
def _parse_type_(data: object) -> Union[None, Unset, str]:
|
|
153
|
+
if data is None:
|
|
154
|
+
return data
|
|
155
|
+
if isinstance(data, Unset):
|
|
156
|
+
return data
|
|
157
|
+
return cast(Union[None, Unset, str], data)
|
|
158
|
+
|
|
159
|
+
type_ = _parse_type_(d.pop("type", UNSET))
|
|
160
|
+
|
|
161
|
+
backend_id = d.pop("backend_id", UNSET)
|
|
162
|
+
|
|
163
|
+
def _parse_start_date(data: object) -> Union[None, Unset, datetime.date]:
|
|
164
|
+
if data is None:
|
|
165
|
+
return data
|
|
166
|
+
if isinstance(data, Unset):
|
|
167
|
+
return data
|
|
168
|
+
try:
|
|
169
|
+
if not isinstance(data, str):
|
|
170
|
+
raise TypeError()
|
|
171
|
+
start_date_type_0 = isoparse(data).date()
|
|
172
|
+
|
|
173
|
+
return start_date_type_0
|
|
174
|
+
except: # noqa: E722
|
|
175
|
+
pass
|
|
176
|
+
return cast(Union[None, Unset, datetime.date], data)
|
|
177
|
+
|
|
178
|
+
start_date = _parse_start_date(d.pop("start_date", UNSET))
|
|
179
|
+
|
|
180
|
+
def _parse_end_date(data: object) -> Union[None, Unset, datetime.date]:
|
|
181
|
+
if data is None:
|
|
182
|
+
return data
|
|
183
|
+
if isinstance(data, Unset):
|
|
184
|
+
return data
|
|
185
|
+
try:
|
|
186
|
+
if not isinstance(data, str):
|
|
187
|
+
raise TypeError()
|
|
188
|
+
end_date_type_0 = isoparse(data).date()
|
|
189
|
+
|
|
190
|
+
return end_date_type_0
|
|
191
|
+
except: # noqa: E722
|
|
192
|
+
pass
|
|
193
|
+
return cast(Union[None, Unset, datetime.date], data)
|
|
194
|
+
|
|
195
|
+
end_date = _parse_end_date(d.pop("end_date", UNSET))
|
|
196
|
+
|
|
197
|
+
def _parse_oecd_fos_2007_code(data: object) -> Union[BlankEnum, None, OecdFos2007CodeEnum, Unset]:
|
|
198
|
+
if data is None:
|
|
199
|
+
return data
|
|
200
|
+
if isinstance(data, Unset):
|
|
201
|
+
return data
|
|
202
|
+
try:
|
|
203
|
+
if not isinstance(data, str):
|
|
204
|
+
raise TypeError()
|
|
205
|
+
oecd_fos_2007_code_type_0 = OecdFos2007CodeEnum(data)
|
|
206
|
+
|
|
207
|
+
return oecd_fos_2007_code_type_0
|
|
208
|
+
except: # noqa: E722
|
|
209
|
+
pass
|
|
210
|
+
try:
|
|
211
|
+
if not isinstance(data, str):
|
|
212
|
+
raise TypeError()
|
|
213
|
+
oecd_fos_2007_code_type_1 = BlankEnum(data)
|
|
214
|
+
|
|
215
|
+
return oecd_fos_2007_code_type_1
|
|
216
|
+
except: # noqa: E722
|
|
217
|
+
pass
|
|
218
|
+
return cast(Union[BlankEnum, None, OecdFos2007CodeEnum, Unset], data)
|
|
219
|
+
|
|
220
|
+
oecd_fos_2007_code = _parse_oecd_fos_2007_code(d.pop("oecd_fos_2007_code", UNSET))
|
|
221
|
+
|
|
222
|
+
is_industry = d.pop("is_industry", UNSET)
|
|
223
|
+
|
|
224
|
+
def _parse_image(data: object) -> Union[File, None, Unset]:
|
|
225
|
+
if data is None:
|
|
226
|
+
return data
|
|
227
|
+
if isinstance(data, Unset):
|
|
228
|
+
return data
|
|
229
|
+
try:
|
|
230
|
+
if not isinstance(data, bytes):
|
|
231
|
+
raise TypeError()
|
|
232
|
+
image_type_0 = File(payload=BytesIO(data))
|
|
233
|
+
|
|
234
|
+
return image_type_0
|
|
235
|
+
except: # noqa: E722
|
|
236
|
+
pass
|
|
237
|
+
return cast(Union[File, None, Unset], data)
|
|
238
|
+
|
|
239
|
+
image = _parse_image(d.pop("image", UNSET))
|
|
240
|
+
|
|
241
|
+
_kind = d.pop("kind", UNSET)
|
|
242
|
+
kind: Union[Unset, KindEnum]
|
|
243
|
+
if isinstance(_kind, Unset):
|
|
244
|
+
kind = UNSET
|
|
245
|
+
else:
|
|
246
|
+
kind = KindEnum(_kind)
|
|
247
|
+
|
|
248
|
+
project_request_form = cls(
|
|
249
|
+
name=name,
|
|
250
|
+
customer=customer,
|
|
251
|
+
slug=slug,
|
|
252
|
+
description=description,
|
|
253
|
+
type_=type_,
|
|
254
|
+
backend_id=backend_id,
|
|
255
|
+
start_date=start_date,
|
|
256
|
+
end_date=end_date,
|
|
257
|
+
oecd_fos_2007_code=oecd_fos_2007_code,
|
|
258
|
+
is_industry=is_industry,
|
|
259
|
+
image=image,
|
|
260
|
+
kind=kind,
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
project_request_form.additional_properties = d
|
|
264
|
+
return project_request_form
|
|
265
|
+
|
|
266
|
+
@property
|
|
267
|
+
def additional_keys(self) -> list[str]:
|
|
268
|
+
return list(self.additional_properties.keys())
|
|
269
|
+
|
|
270
|
+
def __getitem__(self, key: str) -> Any:
|
|
271
|
+
return self.additional_properties[key]
|
|
272
|
+
|
|
273
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
274
|
+
self.additional_properties[key] = value
|
|
275
|
+
|
|
276
|
+
def __delitem__(self, key: str) -> None:
|
|
277
|
+
del self.additional_properties[key]
|
|
278
|
+
|
|
279
|
+
def __contains__(self, key: str) -> bool:
|
|
280
|
+
return key in self.additional_properties
|