waldur-api-client 7.6.5__py3-none-any.whl → 7.6.8__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.

Files changed (230) hide show
  1. waldur_api_client/api/access_subnets/access_subnets_list.py +8 -4
  2. waldur_api_client/api/admin_announcements/admin_announcements_list.py +8 -4
  3. waldur_api_client/api/auth_tokens/auth_tokens_list.py +8 -4
  4. waldur_api_client/api/autoprovisioning_rule_plans/autoprovisioning_rule_plans_list.py +8 -4
  5. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_list.py +8 -4
  6. waldur_api_client/api/aws_images/aws_images_list.py +8 -4
  7. waldur_api_client/api/aws_instances/aws_instances_list.py +8 -4
  8. waldur_api_client/api/aws_regions/aws_regions_list.py +8 -4
  9. waldur_api_client/api/aws_sizes/aws_sizes_list.py +8 -4
  10. waldur_api_client/api/aws_volumes/aws_volumes_list.py +8 -4
  11. waldur_api_client/api/azure_images/azure_images_list.py +8 -4
  12. waldur_api_client/api/azure_locations/azure_locations_list.py +8 -4
  13. waldur_api_client/api/azure_public_ips/azure_public_ips_list.py +8 -4
  14. waldur_api_client/api/azure_resource_groups/azure_resource_groups_list.py +8 -4
  15. waldur_api_client/api/azure_sizes/azure_sizes_list.py +8 -4
  16. waldur_api_client/api/azure_sql_databases/azure_sql_databases_list.py +8 -4
  17. waldur_api_client/api/azure_sql_servers/azure_sql_servers_list.py +8 -4
  18. waldur_api_client/api/azure_virtualmachines/azure_virtualmachines_list.py +8 -4
  19. waldur_api_client/api/backend_resource_requests/__init__.py +1 -0
  20. waldur_api_client/api/backend_resource_requests/backend_resource_requests_create.py +150 -0
  21. waldur_api_client/api/backend_resource_requests/backend_resource_requests_list.py +313 -0
  22. waldur_api_client/api/backend_resource_requests/backend_resource_requests_retrieve.py +142 -0
  23. waldur_api_client/api/backend_resource_requests/backend_resource_requests_set_done.py +144 -0
  24. waldur_api_client/api/backend_resource_requests/backend_resource_requests_set_erred.py +166 -0
  25. waldur_api_client/api/backend_resource_requests/backend_resource_requests_start_processing.py +146 -0
  26. waldur_api_client/api/backend_resources/__init__.py +1 -0
  27. waldur_api_client/api/backend_resources/backend_resources_create.py +150 -0
  28. waldur_api_client/api/backend_resources/backend_resources_destroy.py +89 -0
  29. waldur_api_client/api/backend_resources/backend_resources_import_resource.py +162 -0
  30. waldur_api_client/api/backend_resources/backend_resources_list.py +315 -0
  31. waldur_api_client/api/backend_resources/backend_resources_retrieve.py +142 -0
  32. waldur_api_client/api/booking_offerings/booking_offerings_list.py +8 -4
  33. waldur_api_client/api/booking_resources/booking_resources_list.py +8 -4
  34. waldur_api_client/api/broadcast_message_templates/broadcast_message_templates_list.py +8 -4
  35. waldur_api_client/api/broadcast_messages/broadcast_messages_list.py +8 -4
  36. waldur_api_client/api/call_managing_organisations/call_managing_organisations_list.py +8 -4
  37. waldur_api_client/api/call_rounds/call_rounds_list.py +8 -4
  38. waldur_api_client/api/component_user_usage_limits/component_user_usage_limits_list.py +8 -4
  39. waldur_api_client/api/customer_credits/customer_credits_list.py +8 -4
  40. waldur_api_client/api/customer_permissions_reviews/customer_permissions_reviews_list.py +8 -4
  41. waldur_api_client/api/digitalocean_droplets/digitalocean_droplets_list.py +8 -4
  42. waldur_api_client/api/digitalocean_images/digitalocean_images_list.py +8 -4
  43. waldur_api_client/api/digitalocean_regions/digitalocean_regions_list.py +8 -4
  44. waldur_api_client/api/digitalocean_sizes/digitalocean_sizes_list.py +8 -4
  45. waldur_api_client/api/email_logs/email_logs_list.py +8 -4
  46. waldur_api_client/api/event_subscriptions/event_subscriptions_list.py +8 -4
  47. waldur_api_client/api/events/events_list.py +8 -4
  48. waldur_api_client/api/events_stats/events_stats_list.py +8 -4
  49. waldur_api_client/api/financial_reports/financial_reports_list.py +8 -4
  50. waldur_api_client/api/freeipa_profiles/freeipa_profiles_list.py +8 -4
  51. waldur_api_client/api/google_auth/google_auth_list.py +8 -4
  52. waldur_api_client/api/hooks/hooks_list.py +4 -2
  53. waldur_api_client/api/hooks_email/hooks_email_list.py +8 -4
  54. waldur_api_client/api/hooks_web/hooks_web_list.py +8 -4
  55. waldur_api_client/api/identity_providers/identity_providers_list.py +8 -4
  56. waldur_api_client/api/invoice_items/invoice_items_list.py +8 -4
  57. waldur_api_client/api/invoices/invoices_list.py +8 -4
  58. waldur_api_client/api/keycloak_groups/keycloak_groups_list.py +8 -4
  59. waldur_api_client/api/keycloak_user_group_memberships/keycloak_user_group_memberships_list.py +8 -4
  60. waldur_api_client/api/keys/keys_list.py +8 -4
  61. waldur_api_client/api/lexis_links/lexis_links_list.py +8 -4
  62. waldur_api_client/api/marketplace_categories/marketplace_categories_list.py +8 -4
  63. waldur_api_client/api/marketplace_category_columns/marketplace_category_columns_list.py +8 -4
  64. waldur_api_client/api/marketplace_category_component_usages/marketplace_category_component_usages_list.py +8 -4
  65. waldur_api_client/api/marketplace_category_components/marketplace_category_components_list.py +8 -4
  66. waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_list.py +8 -4
  67. waldur_api_client/api/marketplace_category_help_articles/marketplace_category_help_articles_list.py +8 -4
  68. waldur_api_client/api/marketplace_checklists/marketplace_checklists_answers_list.py +8 -4
  69. waldur_api_client/api/marketplace_checklists/marketplace_checklists_list.py +8 -4
  70. waldur_api_client/api/marketplace_checklists/marketplace_checklists_questions_list.py +8 -4
  71. waldur_api_client/api/marketplace_checklists/marketplace_checklists_user_answers_list.py +8 -4
  72. waldur_api_client/api/marketplace_checklists_categories/marketplace_checklists_categories_checklists_list.py +8 -4
  73. waldur_api_client/api/marketplace_checklists_categories/marketplace_checklists_categories_list.py +8 -4
  74. waldur_api_client/api/marketplace_component_usages/marketplace_component_usages_list.py +8 -4
  75. waldur_api_client/api/marketplace_component_user_usages/marketplace_component_user_usages_list.py +8 -4
  76. waldur_api_client/api/marketplace_customer_estimated_cost_policies/marketplace_customer_estimated_cost_policies_list.py +8 -4
  77. waldur_api_client/api/marketplace_customer_service_accounts/marketplace_customer_service_accounts_list.py +8 -4
  78. waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_list.py +8 -4
  79. waldur_api_client/api/marketplace_offering_estimated_cost_policies/marketplace_offering_estimated_cost_policies_list.py +8 -4
  80. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_list.py +8 -4
  81. waldur_api_client/api/marketplace_offering_permissions/marketplace_offering_permissions_list.py +18 -17
  82. waldur_api_client/api/marketplace_offering_permissions_log/marketplace_offering_permissions_log_list.py +18 -17
  83. waldur_api_client/api/marketplace_offering_referrals/marketplace_offering_referrals_list.py +8 -4
  84. waldur_api_client/api/marketplace_offering_usage_policies/marketplace_offering_usage_policies_list.py +8 -4
  85. waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_list.py +8 -4
  86. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +8 -4
  87. waldur_api_client/api/marketplace_orders/marketplace_orders_list.py +8 -4
  88. waldur_api_client/api/marketplace_plan_components/marketplace_plan_components_list.py +8 -4
  89. waldur_api_client/api/marketplace_plans/marketplace_plans_list.py +8 -4
  90. waldur_api_client/api/marketplace_project_estimated_cost_policies/marketplace_project_estimated_cost_policies_list.py +8 -4
  91. waldur_api_client/api/marketplace_project_service_accounts/marketplace_project_service_accounts_list.py +8 -4
  92. waldur_api_client/api/marketplace_project_update_requests/marketplace_project_update_requests_list.py +8 -4
  93. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_component_stats_list.py +10 -13
  94. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_costs_list.py +10 -13
  95. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_customers_list.py +10 -13
  96. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_groups_list.py +10 -13
  97. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list.py +18 -17
  98. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_refresh_offering_usernames.py +20 -16
  99. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +8 -4
  100. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_as_erred.py +11 -68
  101. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_backend_id.py +20 -16
  102. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_backend_metadata.py +12 -12
  103. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_set_limits.py +12 -12
  104. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_submit_report.py +20 -16
  105. waldur_api_client/api/marketplace_public_offerings/marketplace_public_offerings_list.py +18 -17
  106. waldur_api_client/api/marketplace_remote_synchronisations/marketplace_remote_synchronisations_list.py +8 -4
  107. waldur_api_client/api/marketplace_resource_users/marketplace_resource_users_list.py +8 -4
  108. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +8 -4
  109. waldur_api_client/api/marketplace_resources/marketplace_resources_update_options.py +20 -16
  110. waldur_api_client/api/marketplace_robot_accounts/marketplace_robot_accounts_list.py +8 -4
  111. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_list.py +8 -4
  112. waldur_api_client/api/marketplace_script_async_dry_run/marketplace_script_async_dry_run_list.py +8 -4
  113. waldur_api_client/api/marketplace_sections/marketplace_sections_list.py +8 -4
  114. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_customer_projects_list.py +15 -0
  115. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_list.py +8 -4
  116. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_offerings_list.py +10 -13
  117. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_project_permissions_list.py +10 -13
  118. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_projects_list.py +15 -0
  119. waldur_api_client/api/notification_messages/notification_messages_list.py +8 -4
  120. waldur_api_client/api/notification_messages_templates/notification_messages_templates_list.py +8 -4
  121. waldur_api_client/api/openstack_backups/openstack_backups_list.py +8 -4
  122. waldur_api_client/api/openstack_flavors/openstack_flavors_list.py +26 -4
  123. waldur_api_client/api/openstack_images/openstack_images_list.py +26 -4
  124. waldur_api_client/api/openstack_instance_availability_zones/openstack_instance_availability_zones_list.py +8 -4
  125. waldur_api_client/api/openstack_instances/openstack_instances_list.py +8 -4
  126. waldur_api_client/api/openstack_marketplace_tenants/openstack_marketplace_tenants_list.py +8 -4
  127. waldur_api_client/api/openstack_migrations/openstack_migrations_list.py +8 -4
  128. waldur_api_client/api/openstack_network_rbac_policies/openstack_network_rbac_policies_list.py +8 -4
  129. waldur_api_client/api/openstack_networks/openstack_networks_list.py +8 -4
  130. waldur_api_client/api/openstack_ports/openstack_ports_list.py +8 -4
  131. waldur_api_client/api/openstack_routers/openstack_routers_list.py +8 -4
  132. waldur_api_client/api/openstack_security_groups/openstack_security_groups_list.py +8 -4
  133. waldur_api_client/api/openstack_server_groups/openstack_server_groups_list.py +8 -4
  134. waldur_api_client/api/openstack_snapshots/openstack_snapshots_list.py +8 -4
  135. waldur_api_client/api/openstack_subnets/openstack_subnets_list.py +8 -4
  136. waldur_api_client/api/openstack_tenants/openstack_tenants_list.py +8 -4
  137. waldur_api_client/api/openstack_volume_availability_zones/openstack_volume_availability_zones_list.py +8 -4
  138. waldur_api_client/api/openstack_volume_types/openstack_volume_types_list.py +26 -4
  139. waldur_api_client/api/openstack_volumes/openstack_volumes_list.py +8 -4
  140. waldur_api_client/api/organization_groups/organization_groups_list.py +8 -4
  141. waldur_api_client/api/payment_profiles/payment_profiles_list.py +8 -4
  142. waldur_api_client/api/payments/payments_list.py +8 -4
  143. waldur_api_client/api/project_credits/project_credits_list.py +8 -4
  144. waldur_api_client/api/project_types/project_types_list.py +8 -4
  145. waldur_api_client/api/projects/projects_list.py +23 -4
  146. waldur_api_client/api/promotions_campaigns/promotions_campaigns_list.py +8 -4
  147. waldur_api_client/api/proposal_proposals/proposal_proposals_list.py +8 -4
  148. waldur_api_client/api/proposal_protected_calls/proposal_protected_calls_list.py +8 -4
  149. waldur_api_client/api/proposal_public_calls/proposal_public_calls_list.py +8 -4
  150. waldur_api_client/api/proposal_requested_offerings/proposal_requested_offerings_list.py +8 -4
  151. waldur_api_client/api/proposal_requested_resources/proposal_requested_resources_list.py +8 -4
  152. waldur_api_client/api/proposal_reviews/proposal_reviews_list.py +8 -4
  153. waldur_api_client/api/provider_invoice_items/provider_invoice_items_list.py +8 -4
  154. waldur_api_client/api/rancher_apps/rancher_apps_list.py +8 -4
  155. waldur_api_client/api/rancher_catalogs/rancher_catalogs_list.py +8 -4
  156. waldur_api_client/api/rancher_cluster_security_groups/rancher_cluster_security_groups_list.py +8 -4
  157. waldur_api_client/api/rancher_cluster_templates/rancher_cluster_templates_list.py +8 -4
  158. waldur_api_client/api/rancher_clusters/rancher_clusters_list.py +8 -4
  159. waldur_api_client/api/rancher_hpas/rancher_hpas_list.py +8 -4
  160. waldur_api_client/api/rancher_ingresses/rancher_ingresses_list.py +8 -4
  161. waldur_api_client/api/rancher_namespaces/rancher_namespaces_list.py +8 -4
  162. waldur_api_client/api/rancher_nodes/rancher_nodes_list.py +8 -4
  163. waldur_api_client/api/rancher_projects/rancher_projects_list.py +8 -4
  164. waldur_api_client/api/rancher_role_templates/rancher_role_templates_list.py +8 -4
  165. waldur_api_client/api/rancher_services/rancher_services_list.py +8 -4
  166. waldur_api_client/api/rancher_templates/rancher_templates_list.py +8 -4
  167. waldur_api_client/api/rancher_users/rancher_users_list.py +8 -4
  168. waldur_api_client/api/rancher_workloads/rancher_workloads_list.py +8 -4
  169. waldur_api_client/api/roles/roles_list.py +8 -4
  170. waldur_api_client/api/service_settings/service_settings_list.py +18 -17
  171. waldur_api_client/api/slurm_allocation_user_usage/slurm_allocation_user_usage_list.py +8 -4
  172. waldur_api_client/api/slurm_allocations/slurm_allocations_list.py +8 -4
  173. waldur_api_client/api/slurm_associations/slurm_associations_list.py +8 -4
  174. waldur_api_client/api/slurm_jobs/slurm_jobs_list.py +8 -4
  175. waldur_api_client/api/support_attachments/support_attachments_list.py +8 -4
  176. waldur_api_client/api/support_comments/support_comments_list.py +8 -4
  177. waldur_api_client/api/support_feedbacks/support_feedbacks_list.py +8 -4
  178. waldur_api_client/api/support_issues/support_issues_list.py +8 -4
  179. waldur_api_client/api/support_priorities/support_priorities_list.py +8 -4
  180. waldur_api_client/api/support_templates/support_templates_list.py +8 -4
  181. waldur_api_client/api/support_users/support_users_list.py +8 -4
  182. waldur_api_client/api/user_agreements/user_agreements_list.py +8 -4
  183. waldur_api_client/api/user_group_invitations/user_group_invitations_list.py +8 -4
  184. waldur_api_client/api/user_invitations/user_invitations_list.py +8 -4
  185. waldur_api_client/api/user_permission_requests/user_permission_requests_list.py +8 -4
  186. waldur_api_client/api/user_permissions/user_permissions_list.py +18 -17
  187. waldur_api_client/api/users/users_list.py +8 -4
  188. waldur_api_client/api/vmware_clusters/vmware_clusters_list.py +8 -4
  189. waldur_api_client/api/vmware_datastores/vmware_datastores_list.py +8 -4
  190. waldur_api_client/api/vmware_disks/vmware_disks_list.py +8 -4
  191. waldur_api_client/api/vmware_folders/vmware_folders_list.py +8 -4
  192. waldur_api_client/api/vmware_networks/vmware_networks_list.py +8 -4
  193. waldur_api_client/api/vmware_ports/vmware_ports_list.py +8 -4
  194. waldur_api_client/api/vmware_templates/vmware_templates_list.py +8 -4
  195. waldur_api_client/api/vmware_virtual_machine/vmware_virtual_machine_list.py +8 -4
  196. waldur_api_client/models/__init__.py +28 -16
  197. waldur_api_client/models/backend_resource.py +162 -0
  198. waldur_api_client/models/{resource_backend_id.py → backend_resource_import_request.py} +21 -13
  199. waldur_api_client/models/backend_resource_req.py +162 -0
  200. waldur_api_client/models/{resource_backend_metadata.py → backend_resource_req_request.py} +12 -11
  201. waldur_api_client/models/backend_resource_req_state_enum.py +11 -0
  202. waldur_api_client/models/backend_resource_request.py +96 -0
  203. waldur_api_client/models/{resource_set_state_erred.py → backend_resource_request_set_erred_request.py} +5 -5
  204. waldur_api_client/models/backend_resource_requests_list_o_item.py +9 -0
  205. waldur_api_client/models/backend_resource_requests_list_state_item.py +11 -0
  206. waldur_api_client/models/{order_details_attributes.py → backend_resource_requests_set_done_response_200.py} +6 -6
  207. waldur_api_client/models/{resource_options.py → backend_resource_requests_set_erred_response_200.py} +7 -22
  208. waldur_api_client/models/backend_resource_requests_start_processing_response_200.py +44 -0
  209. waldur_api_client/models/backend_resources_list_o_item.py +9 -0
  210. waldur_api_client/models/constance_settings.py +9 -0
  211. waldur_api_client/models/constance_settings_request.py +9 -0
  212. waldur_api_client/models/customer.py +0 -21
  213. waldur_api_client/models/customers_list_field_item.py +0 -1
  214. waldur_api_client/models/customers_retrieve_field_item.py +0 -1
  215. waldur_api_client/models/event_types_enum.py +5 -0
  216. waldur_api_client/models/merged_plugin_options.py +20 -0
  217. waldur_api_client/models/merged_plugin_options_request.py +20 -0
  218. waldur_api_client/models/nested_requested_offering.py +18 -0
  219. waldur_api_client/models/order_details.py +4 -14
  220. waldur_api_client/models/provider_requested_offering.py +10 -0
  221. waldur_api_client/models/requested_offering.py +10 -0
  222. waldur_api_client/models/{resource_set_limits.py → resource_response_status.py} +11 -11
  223. waldur_api_client/models/user_agreement.py +9 -11
  224. waldur_api_client/models/user_agreement_request.py +9 -11
  225. {waldur_api_client-7.6.5.dist-info → waldur_api_client-7.6.8.dist-info}/METADATA +1 -1
  226. {waldur_api_client-7.6.5.dist-info → waldur_api_client-7.6.8.dist-info}/RECORD +228 -209
  227. waldur_api_client/models/permission_project.py +0 -147
  228. waldur_api_client/models/resource_report.py +0 -73
  229. {waldur_api_client-7.6.5.dist-info → waldur_api_client-7.6.8.dist-info}/LICENSE +0 -0
  230. {waldur_api_client-7.6.5.dist-info → waldur_api_client-7.6.8.dist-info}/WHEEL +0 -0
@@ -1,147 +0,0 @@
1
- import datetime
2
- from collections.abc import Mapping
3
- from typing import Any, TypeVar, Union, cast
4
- from uuid import UUID
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 ..types import UNSET, Unset
11
-
12
- T = TypeVar("T", bound="PermissionProject")
13
-
14
-
15
- @_attrs_define
16
- class PermissionProject:
17
- """
18
- Attributes:
19
- url (Union[Unset, str]):
20
- uuid (Union[Unset, UUID]):
21
- name (Union[Unset, str]):
22
- image (Union[None, Unset, str]):
23
- resource_count (Union[Unset, int]):
24
- end_date (Union[None, Unset, datetime.date]): The date is inclusive. Once reached, all project resource will be
25
- scheduled for termination.
26
- """
27
-
28
- url: Union[Unset, str] = UNSET
29
- uuid: Union[Unset, UUID] = UNSET
30
- name: Union[Unset, str] = UNSET
31
- image: Union[None, Unset, str] = UNSET
32
- resource_count: Union[Unset, int] = UNSET
33
- end_date: Union[None, Unset, datetime.date] = UNSET
34
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
35
-
36
- def to_dict(self) -> dict[str, Any]:
37
- url = self.url
38
-
39
- uuid: Union[Unset, str] = UNSET
40
- if not isinstance(self.uuid, Unset):
41
- uuid = str(self.uuid)
42
-
43
- name = self.name
44
-
45
- image: Union[None, Unset, str]
46
- if isinstance(self.image, Unset):
47
- image = UNSET
48
- else:
49
- image = self.image
50
-
51
- resource_count = self.resource_count
52
-
53
- end_date: Union[None, Unset, str]
54
- if isinstance(self.end_date, Unset):
55
- end_date = UNSET
56
- elif isinstance(self.end_date, datetime.date):
57
- end_date = self.end_date.isoformat()
58
- else:
59
- end_date = self.end_date
60
-
61
- field_dict: dict[str, Any] = {}
62
- field_dict.update(self.additional_properties)
63
- field_dict.update({})
64
- if url is not UNSET:
65
- field_dict["url"] = url
66
- if uuid is not UNSET:
67
- field_dict["uuid"] = uuid
68
- if name is not UNSET:
69
- field_dict["name"] = name
70
- if image is not UNSET:
71
- field_dict["image"] = image
72
- if resource_count is not UNSET:
73
- field_dict["resource_count"] = resource_count
74
- if end_date is not UNSET:
75
- field_dict["end_date"] = end_date
76
-
77
- return field_dict
78
-
79
- @classmethod
80
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
81
- d = dict(src_dict)
82
- url = d.pop("url", UNSET)
83
-
84
- _uuid = d.pop("uuid", UNSET)
85
- uuid: Union[Unset, UUID]
86
- if isinstance(_uuid, Unset):
87
- uuid = UNSET
88
- else:
89
- uuid = UUID(_uuid)
90
-
91
- name = d.pop("name", UNSET)
92
-
93
- def _parse_image(data: object) -> Union[None, Unset, str]:
94
- if data is None:
95
- return data
96
- if isinstance(data, Unset):
97
- return data
98
- return cast(Union[None, Unset, str], data)
99
-
100
- image = _parse_image(d.pop("image", UNSET))
101
-
102
- resource_count = d.pop("resource_count", UNSET)
103
-
104
- def _parse_end_date(data: object) -> Union[None, Unset, datetime.date]:
105
- if data is None:
106
- return data
107
- if isinstance(data, Unset):
108
- return data
109
- try:
110
- if not isinstance(data, str):
111
- raise TypeError()
112
- end_date_type_0 = isoparse(data).date()
113
-
114
- return end_date_type_0
115
- except: # noqa: E722
116
- pass
117
- return cast(Union[None, Unset, datetime.date], data)
118
-
119
- end_date = _parse_end_date(d.pop("end_date", UNSET))
120
-
121
- permission_project = cls(
122
- url=url,
123
- uuid=uuid,
124
- name=name,
125
- image=image,
126
- resource_count=resource_count,
127
- end_date=end_date,
128
- )
129
-
130
- permission_project.additional_properties = d
131
- return permission_project
132
-
133
- @property
134
- def additional_keys(self) -> list[str]:
135
- return list(self.additional_properties.keys())
136
-
137
- def __getitem__(self, key: str) -> Any:
138
- return self.additional_properties[key]
139
-
140
- def __setitem__(self, key: str, value: Any) -> None:
141
- self.additional_properties[key] = value
142
-
143
- def __delitem__(self, key: str) -> None:
144
- del self.additional_properties[key]
145
-
146
- def __contains__(self, key: str) -> bool:
147
- return key in self.additional_properties
@@ -1,73 +0,0 @@
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.report_section import ReportSection
9
-
10
-
11
- T = TypeVar("T", bound="ResourceReport")
12
-
13
-
14
- @_attrs_define
15
- class ResourceReport:
16
- """
17
- Attributes:
18
- report (list['ReportSection']):
19
- """
20
-
21
- report: list["ReportSection"]
22
- additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
23
-
24
- def to_dict(self) -> dict[str, Any]:
25
- report = []
26
- for report_item_data in self.report:
27
- report_item = report_item_data.to_dict()
28
- report.append(report_item)
29
-
30
- field_dict: dict[str, Any] = {}
31
- field_dict.update(self.additional_properties)
32
- field_dict.update(
33
- {
34
- "report": report,
35
- }
36
- )
37
-
38
- return field_dict
39
-
40
- @classmethod
41
- def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
42
- from ..models.report_section import ReportSection
43
-
44
- d = dict(src_dict)
45
- report = []
46
- _report = d.pop("report")
47
- for report_item_data in _report:
48
- report_item = ReportSection.from_dict(report_item_data)
49
-
50
- report.append(report_item)
51
-
52
- resource_report = cls(
53
- report=report,
54
- )
55
-
56
- resource_report.additional_properties = d
57
- return resource_report
58
-
59
- @property
60
- def additional_keys(self) -> list[str]:
61
- return list(self.additional_properties.keys())
62
-
63
- def __getitem__(self, key: str) -> Any:
64
- return self.additional_properties[key]
65
-
66
- def __setitem__(self, key: str, value: Any) -> None:
67
- self.additional_properties[key] = value
68
-
69
- def __delitem__(self, key: str) -> None:
70
- del self.additional_properties[key]
71
-
72
- def __contains__(self, key: str) -> bool:
73
- return key in self.additional_properties