waldur-api-client 7.7.6__py3-none-any.whl → 7.7.7__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 (143) hide show
  1. waldur_api_client/api/booking_resources/booking_resources_count.py +34 -11
  2. waldur_api_client/api/booking_resources/booking_resources_list.py +34 -11
  3. waldur_api_client/api/customers/customers_project_metadata_compliance_details_list.py +189 -0
  4. waldur_api_client/api/customers/customers_project_metadata_compliance_overview_list.py +189 -0
  5. waldur_api_client/api/customers/customers_project_metadata_compliance_projects_list.py +187 -0
  6. waldur_api_client/api/customers/customers_project_metadata_question_answers_list.py +187 -0
  7. waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_count.py +34 -11
  8. waldur_api_client/api/marketplace_integration_statuses/marketplace_integration_statuses_list.py +34 -11
  9. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_count.py +34 -11
  10. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_list.py +34 -11
  11. waldur_api_client/api/marketplace_offering_terms_of_service/__init__.py +1 -0
  12. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_count.py +274 -0
  13. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_create.py +152 -0
  14. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_destroy.py +89 -0
  15. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_list.py +277 -0
  16. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_partial_update.py +164 -0
  17. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_retrieve.py +142 -0
  18. waldur_api_client/api/marketplace_offering_terms_of_service/marketplace_offering_terms_of_service_update.py +164 -0
  19. waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_count.py +34 -11
  20. waldur_api_client/api/marketplace_offering_user_roles/marketplace_offering_user_roles_list.py +34 -11
  21. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_count.py +34 -11
  22. waldur_api_client/api/marketplace_offering_users/marketplace_offering_users_list.py +34 -11
  23. waldur_api_client/api/marketplace_orders/marketplace_orders_count.py +19 -0
  24. waldur_api_client/api/marketplace_orders/marketplace_orders_list.py +19 -0
  25. waldur_api_client/api/marketplace_plans/marketplace_plans_count.py +19 -0
  26. waldur_api_client/api/marketplace_plans/marketplace_plans_list.py +19 -0
  27. waldur_api_client/api/marketplace_plans/marketplace_plans_usage_stats_count.py +19 -0
  28. waldur_api_client/api/marketplace_plans/marketplace_plans_usage_stats_list.py +19 -0
  29. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +34 -11
  30. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +34 -11
  31. waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +34 -11
  32. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +34 -11
  33. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_count.py +34 -11
  34. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_list.py +34 -11
  35. waldur_api_client/api/marketplace_user_offering_consents/__init__.py +1 -0
  36. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_count.py +307 -0
  37. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_create.py +152 -0
  38. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_destroy.py +89 -0
  39. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_list.py +310 -0
  40. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_partial_update.py +164 -0
  41. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_retrieve.py +142 -0
  42. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_revoke.py +146 -0
  43. waldur_api_client/api/marketplace_user_offering_consents/marketplace_user_offering_consents_update.py +164 -0
  44. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_order_status_retrieve.py +145 -0
  45. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_status_retrieve.py +147 -0
  46. waldur_api_client/api/remote_waldur_api/remote_waldur_api_remote_resource_team_status_list.py +188 -0
  47. waldur_api_client/models/__init__.py +62 -0
  48. waldur_api_client/models/azure_sql_server_create_order_attributes.py +3 -0
  49. waldur_api_client/models/azure_virtual_machine_create_order_attributes.py +3 -0
  50. waldur_api_client/models/booking_offerings_list_field_item.py +0 -2
  51. waldur_api_client/models/booking_offerings_retrieve_field_item.py +0 -2
  52. waldur_api_client/models/booking_resource.py +10 -9
  53. waldur_api_client/models/booking_resources_list_field_item.py +1 -1
  54. waldur_api_client/models/booking_resources_retrieve_field_item.py +1 -1
  55. waldur_api_client/models/checklist_info.py +76 -0
  56. waldur_api_client/models/compliance_overview.py +91 -0
  57. waldur_api_client/models/customer.py +81 -0
  58. waldur_api_client/models/customers_list_field_item.py +4 -0
  59. waldur_api_client/models/customers_retrieve_field_item.py +4 -0
  60. waldur_api_client/models/generic_order_attributes.py +69 -0
  61. waldur_api_client/models/google_auth_authorize_retrieve_field_item.py +1 -0
  62. waldur_api_client/models/google_auth_list_field_item.py +1 -0
  63. waldur_api_client/models/google_auth_retrieve_field_item.py +1 -0
  64. waldur_api_client/models/google_credentials.py +9 -0
  65. waldur_api_client/models/group_invitation.py +24 -0
  66. waldur_api_client/models/group_invitation_request.py +10 -0
  67. waldur_api_client/models/maintenance_announcement.py +8 -0
  68. waldur_api_client/models/marketplace_offering_terms_of_service_count_o_item.py +13 -0
  69. waldur_api_client/models/marketplace_offering_terms_of_service_list_o_item.py +13 -0
  70. waldur_api_client/models/marketplace_orders_list_field_item.py +1 -1
  71. waldur_api_client/models/marketplace_orders_retrieve_field_item.py +1 -1
  72. waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +0 -2
  73. waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +0 -2
  74. waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +0 -2
  75. waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +0 -2
  76. waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +0 -2
  77. waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +0 -2
  78. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +1 -1
  79. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +1 -1
  80. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +1 -1
  81. waldur_api_client/models/marketplace_public_offerings_list_field_item.py +0 -2
  82. waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +0 -2
  83. waldur_api_client/models/marketplace_rancher_create_order_attributes.py +3 -0
  84. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +1 -1
  85. waldur_api_client/models/marketplace_resources_list_field_item.py +1 -1
  86. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +1 -1
  87. waldur_api_client/models/marketplace_service_providers_list_field_item.py +1 -0
  88. waldur_api_client/models/marketplace_service_providers_retrieve_field_item.py +1 -0
  89. waldur_api_client/models/marketplace_user_offering_consents_count_o_item.py +15 -0
  90. waldur_api_client/models/marketplace_user_offering_consents_list_o_item.py +15 -0
  91. waldur_api_client/models/offering.py +0 -18
  92. waldur_api_client/models/offering_create.py +0 -18
  93. waldur_api_client/models/offering_create_request.py +0 -18
  94. waldur_api_client/models/offering_overview_update_request.py +0 -18
  95. waldur_api_client/models/offering_terms_of_service.py +142 -0
  96. waldur_api_client/models/offering_terms_of_service_create.py +107 -0
  97. waldur_api_client/models/offering_terms_of_service_create_request.py +107 -0
  98. waldur_api_client/models/offering_terms_of_service_request.py +96 -0
  99. waldur_api_client/models/open_stack_instance_create_order_attributes.py +3 -0
  100. waldur_api_client/models/open_stack_nested_security_group.py +53 -1
  101. waldur_api_client/models/open_stack_nested_security_group_rules_item.py +197 -0
  102. waldur_api_client/models/open_stack_network.py +20 -0
  103. waldur_api_client/models/open_stack_security_group_rule_update_request.py +4 -4
  104. waldur_api_client/models/open_stack_tenant.py +38 -0
  105. waldur_api_client/models/open_stack_tenant_create_order_attributes.py +21 -0
  106. waldur_api_client/models/open_stack_volume_create_order_attributes.py +3 -0
  107. waldur_api_client/models/openstack_networks_list_field_item.py +1 -0
  108. waldur_api_client/models/openstack_networks_retrieve_field_item.py +1 -0
  109. waldur_api_client/models/openstack_tenants_list_field_item.py +3 -0
  110. waldur_api_client/models/openstack_tenants_retrieve_field_item.py +3 -0
  111. waldur_api_client/models/order_create.py +0 -8
  112. waldur_api_client/models/order_create_request.py +23 -7
  113. waldur_api_client/models/order_details.py +0 -9
  114. waldur_api_client/models/patched_offering_terms_of_service_request.py +96 -0
  115. waldur_api_client/models/patched_user_offering_consent_request.py +59 -0
  116. waldur_api_client/models/permission_project.py +147 -0
  117. waldur_api_client/models/project_answer.py +122 -0
  118. waldur_api_client/models/project_detail.py +133 -0
  119. waldur_api_client/models/project_details_response.py +115 -0
  120. waldur_api_client/models/provider_offering_details.py +0 -18
  121. waldur_api_client/models/provider_offering_details_request.py +0 -18
  122. waldur_api_client/models/public_offering_details.py +0 -18
  123. waldur_api_client/models/question_answer.py +176 -0
  124. waldur_api_client/models/question_answer_project_answers_item.py +44 -0
  125. waldur_api_client/models/question_answer_question_options_item.py +44 -0
  126. waldur_api_client/models/remote_resource_order.py +88 -0
  127. waldur_api_client/models/remote_resource_order_remote_state_enum.py +15 -0
  128. waldur_api_client/models/remote_resource_sync_status.py +123 -0
  129. waldur_api_client/models/remote_resource_sync_status_remote_state_enum.py +13 -0
  130. waldur_api_client/models/remote_resource_team_member.py +85 -0
  131. waldur_api_client/models/resource.py +10 -9
  132. waldur_api_client/models/service_provider.py +9 -0
  133. waldur_api_client/models/slurm_invoices_slurm_package_create_order_attributes.py +3 -0
  134. waldur_api_client/models/sync_status_enum.py +10 -0
  135. waldur_api_client/models/user_offering_consent.py +202 -0
  136. waldur_api_client/models/user_offering_consent_create.py +60 -0
  137. waldur_api_client/models/user_offering_consent_create_request.py +60 -0
  138. waldur_api_client/models/user_offering_consent_request.py +59 -0
  139. waldur_api_client/models/v_mware_virtual_machine_create_order_attributes.py +3 -0
  140. {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/METADATA +1 -1
  141. {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/RECORD +143 -88
  142. {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/LICENSE +0 -0
  143. {waldur_api_client-7.7.6.dist-info → waldur_api_client-7.7.7.dist-info}/WHEEL +0 -0
@@ -31,7 +31,6 @@ class OrderDetails:
31
31
  offering_image (Union[Unset, str]):
32
32
  offering_thumbnail (Union[Unset, str]):
33
33
  offering_type (Union[Unset, str]):
34
- offering_terms_of_service (Union[Unset, str]):
35
34
  offering_shared (Union[Unset, bool]): Accessible to all customers.
36
35
  offering_billable (Union[Unset, bool]): Purchase and usage is invoiced.
37
36
  offering_plugin_options (Union[Unset, Any]): Public data used by specific plugin, such as storage mode for
@@ -106,7 +105,6 @@ class OrderDetails:
106
105
  offering_image: Union[Unset, str] = UNSET
107
106
  offering_thumbnail: Union[Unset, str] = UNSET
108
107
  offering_type: Union[Unset, str] = UNSET
109
- offering_terms_of_service: Union[Unset, str] = UNSET
110
108
  offering_shared: Union[Unset, bool] = UNSET
111
109
  offering_billable: Union[Unset, bool] = UNSET
112
110
  offering_plugin_options: Union[Unset, Any] = UNSET
@@ -187,8 +185,6 @@ class OrderDetails:
187
185
 
188
186
  offering_type = self.offering_type
189
187
 
190
- offering_terms_of_service = self.offering_terms_of_service
191
-
192
188
  offering_shared = self.offering_shared
193
189
 
194
190
  offering_billable = self.offering_billable
@@ -468,8 +464,6 @@ class OrderDetails:
468
464
  field_dict["offering_thumbnail"] = offering_thumbnail
469
465
  if offering_type is not UNSET:
470
466
  field_dict["offering_type"] = offering_type
471
- if offering_terms_of_service is not UNSET:
472
- field_dict["offering_terms_of_service"] = offering_terms_of_service
473
467
  if offering_shared is not UNSET:
474
468
  field_dict["offering_shared"] = offering_shared
475
469
  if offering_billable is not UNSET:
@@ -616,8 +610,6 @@ class OrderDetails:
616
610
 
617
611
  offering_type = d.pop("offering_type", UNSET)
618
612
 
619
- offering_terms_of_service = d.pop("offering_terms_of_service", UNSET)
620
-
621
613
  offering_shared = d.pop("offering_shared", UNSET)
622
614
 
623
615
  offering_billable = d.pop("offering_billable", UNSET)
@@ -1061,7 +1053,6 @@ class OrderDetails:
1061
1053
  offering_image=offering_image,
1062
1054
  offering_thumbnail=offering_thumbnail,
1063
1055
  offering_type=offering_type,
1064
- offering_terms_of_service=offering_terms_of_service,
1065
1056
  offering_shared=offering_shared,
1066
1057
  offering_billable=offering_billable,
1067
1058
  offering_plugin_options=offering_plugin_options,
@@ -0,0 +1,96 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="PatchedOfferingTermsOfServiceRequest")
10
+
11
+
12
+ @_attrs_define
13
+ class PatchedOfferingTermsOfServiceRequest:
14
+ """
15
+ Attributes:
16
+ terms_of_service (Union[Unset, str]):
17
+ terms_of_service_link (Union[Unset, str]):
18
+ version (Union[Unset, str]):
19
+ is_active (Union[Unset, bool]):
20
+ requires_reconsent (Union[Unset, bool]): If True, user will be asked to re-consent to the terms of service when
21
+ the terms of service are updated.
22
+ """
23
+
24
+ terms_of_service: Union[Unset, str] = UNSET
25
+ terms_of_service_link: Union[Unset, str] = UNSET
26
+ version: Union[Unset, str] = UNSET
27
+ is_active: Union[Unset, bool] = UNSET
28
+ requires_reconsent: Union[Unset, bool] = UNSET
29
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
30
+
31
+ def to_dict(self) -> dict[str, Any]:
32
+ terms_of_service = self.terms_of_service
33
+
34
+ terms_of_service_link = self.terms_of_service_link
35
+
36
+ version = self.version
37
+
38
+ is_active = self.is_active
39
+
40
+ requires_reconsent = self.requires_reconsent
41
+
42
+ field_dict: dict[str, Any] = {}
43
+ field_dict.update(self.additional_properties)
44
+ field_dict.update({})
45
+ if terms_of_service is not UNSET:
46
+ field_dict["terms_of_service"] = terms_of_service
47
+ if terms_of_service_link is not UNSET:
48
+ field_dict["terms_of_service_link"] = terms_of_service_link
49
+ if version is not UNSET:
50
+ field_dict["version"] = version
51
+ if is_active is not UNSET:
52
+ field_dict["is_active"] = is_active
53
+ if requires_reconsent is not UNSET:
54
+ field_dict["requires_reconsent"] = requires_reconsent
55
+
56
+ return field_dict
57
+
58
+ @classmethod
59
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
60
+ d = dict(src_dict)
61
+ terms_of_service = d.pop("terms_of_service", UNSET)
62
+
63
+ terms_of_service_link = d.pop("terms_of_service_link", UNSET)
64
+
65
+ version = d.pop("version", UNSET)
66
+
67
+ is_active = d.pop("is_active", UNSET)
68
+
69
+ requires_reconsent = d.pop("requires_reconsent", UNSET)
70
+
71
+ patched_offering_terms_of_service_request = cls(
72
+ terms_of_service=terms_of_service,
73
+ terms_of_service_link=terms_of_service_link,
74
+ version=version,
75
+ is_active=is_active,
76
+ requires_reconsent=requires_reconsent,
77
+ )
78
+
79
+ patched_offering_terms_of_service_request.additional_properties = d
80
+ return patched_offering_terms_of_service_request
81
+
82
+ @property
83
+ def additional_keys(self) -> list[str]:
84
+ return list(self.additional_properties.keys())
85
+
86
+ def __getitem__(self, key: str) -> Any:
87
+ return self.additional_properties[key]
88
+
89
+ def __setitem__(self, key: str, value: Any) -> None:
90
+ self.additional_properties[key] = value
91
+
92
+ def __delitem__(self, key: str) -> None:
93
+ del self.additional_properties[key]
94
+
95
+ def __contains__(self, key: str) -> bool:
96
+ return key in self.additional_properties
@@ -0,0 +1,59 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union
3
+
4
+ from attrs import define as _attrs_define
5
+ from attrs import field as _attrs_field
6
+
7
+ from ..types import UNSET, Unset
8
+
9
+ T = TypeVar("T", bound="PatchedUserOfferingConsentRequest")
10
+
11
+
12
+ @_attrs_define
13
+ class PatchedUserOfferingConsentRequest:
14
+ """
15
+ Attributes:
16
+ version (Union[Unset, str]):
17
+ """
18
+
19
+ version: Union[Unset, str] = UNSET
20
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
21
+
22
+ def to_dict(self) -> dict[str, Any]:
23
+ version = self.version
24
+
25
+ field_dict: dict[str, Any] = {}
26
+ field_dict.update(self.additional_properties)
27
+ field_dict.update({})
28
+ if version is not UNSET:
29
+ field_dict["version"] = version
30
+
31
+ return field_dict
32
+
33
+ @classmethod
34
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
35
+ d = dict(src_dict)
36
+ version = d.pop("version", UNSET)
37
+
38
+ patched_user_offering_consent_request = cls(
39
+ version=version,
40
+ )
41
+
42
+ patched_user_offering_consent_request.additional_properties = d
43
+ return patched_user_offering_consent_request
44
+
45
+ @property
46
+ def additional_keys(self) -> list[str]:
47
+ return list(self.additional_properties.keys())
48
+
49
+ def __getitem__(self, key: str) -> Any:
50
+ return self.additional_properties[key]
51
+
52
+ def __setitem__(self, key: str, value: Any) -> None:
53
+ self.additional_properties[key] = value
54
+
55
+ def __delitem__(self, key: str) -> None:
56
+ del self.additional_properties[key]
57
+
58
+ def __contains__(self, key: str) -> bool:
59
+ return key in self.additional_properties
@@ -0,0 +1,147 @@
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
@@ -0,0 +1,122 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+ from uuid import UUID
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+
8
+ T = TypeVar("T", bound="ProjectAnswer")
9
+
10
+
11
+ @_attrs_define
12
+ class ProjectAnswer:
13
+ """
14
+ Attributes:
15
+ project_uuid (UUID):
16
+ project_name (str):
17
+ completion_uuid (Union[None, str]): Get completion UUID.
18
+ completion_percentage (float): Get completion percentage.
19
+ is_completed (bool): Get completion status.
20
+ requires_review (bool): Get review requirement status.
21
+ answers_count (int): Get count of answers.
22
+ unanswered_required_count (int): Get count of unanswered required questions.
23
+ """
24
+
25
+ project_uuid: UUID
26
+ project_name: str
27
+ completion_uuid: Union[None, str]
28
+ completion_percentage: float
29
+ is_completed: bool
30
+ requires_review: bool
31
+ answers_count: int
32
+ unanswered_required_count: int
33
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> dict[str, Any]:
36
+ project_uuid = str(self.project_uuid)
37
+
38
+ project_name = self.project_name
39
+
40
+ completion_uuid: Union[None, str]
41
+ completion_uuid = self.completion_uuid
42
+
43
+ completion_percentage = self.completion_percentage
44
+
45
+ is_completed = self.is_completed
46
+
47
+ requires_review = self.requires_review
48
+
49
+ answers_count = self.answers_count
50
+
51
+ unanswered_required_count = self.unanswered_required_count
52
+
53
+ field_dict: dict[str, Any] = {}
54
+ field_dict.update(self.additional_properties)
55
+ field_dict.update(
56
+ {
57
+ "project_uuid": project_uuid,
58
+ "project_name": project_name,
59
+ "completion_uuid": completion_uuid,
60
+ "completion_percentage": completion_percentage,
61
+ "is_completed": is_completed,
62
+ "requires_review": requires_review,
63
+ "answers_count": answers_count,
64
+ "unanswered_required_count": unanswered_required_count,
65
+ }
66
+ )
67
+
68
+ return field_dict
69
+
70
+ @classmethod
71
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
72
+ d = dict(src_dict)
73
+ project_uuid = UUID(d.pop("project_uuid"))
74
+
75
+ project_name = d.pop("project_name")
76
+
77
+ def _parse_completion_uuid(data: object) -> Union[None, str]:
78
+ if data is None:
79
+ return data
80
+ return cast(Union[None, str], data)
81
+
82
+ completion_uuid = _parse_completion_uuid(d.pop("completion_uuid"))
83
+
84
+ completion_percentage = d.pop("completion_percentage")
85
+
86
+ is_completed = d.pop("is_completed")
87
+
88
+ requires_review = d.pop("requires_review")
89
+
90
+ answers_count = d.pop("answers_count")
91
+
92
+ unanswered_required_count = d.pop("unanswered_required_count")
93
+
94
+ project_answer = cls(
95
+ project_uuid=project_uuid,
96
+ project_name=project_name,
97
+ completion_uuid=completion_uuid,
98
+ completion_percentage=completion_percentage,
99
+ is_completed=is_completed,
100
+ requires_review=requires_review,
101
+ answers_count=answers_count,
102
+ unanswered_required_count=unanswered_required_count,
103
+ )
104
+
105
+ project_answer.additional_properties = d
106
+ return project_answer
107
+
108
+ @property
109
+ def additional_keys(self) -> list[str]:
110
+ return list(self.additional_properties.keys())
111
+
112
+ def __getitem__(self, key: str) -> Any:
113
+ return self.additional_properties[key]
114
+
115
+ def __setitem__(self, key: str, value: Any) -> None:
116
+ self.additional_properties[key] = value
117
+
118
+ def __delitem__(self, key: str) -> None:
119
+ del self.additional_properties[key]
120
+
121
+ def __contains__(self, key: str) -> bool:
122
+ return key in self.additional_properties
@@ -0,0 +1,133 @@
1
+ from collections.abc import Mapping
2
+ from typing import Any, TypeVar, Union, cast
3
+ from uuid import UUID
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+
8
+ T = TypeVar("T", bound="ProjectDetail")
9
+
10
+
11
+ @_attrs_define
12
+ class ProjectDetail:
13
+ """
14
+ Attributes:
15
+ project_uuid (UUID):
16
+ project_name (str):
17
+ completion_uuid (Union[None, UUID]):
18
+ completion_percentage (float):
19
+ is_completed (bool):
20
+ requires_review (bool):
21
+ answers (list[Any]):
22
+ unanswered_required_questions (list[Any]):
23
+ """
24
+
25
+ project_uuid: UUID
26
+ project_name: str
27
+ completion_uuid: Union[None, UUID]
28
+ completion_percentage: float
29
+ is_completed: bool
30
+ requires_review: bool
31
+ answers: list[Any]
32
+ unanswered_required_questions: list[Any]
33
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
34
+
35
+ def to_dict(self) -> dict[str, Any]:
36
+ project_uuid = str(self.project_uuid)
37
+
38
+ project_name = self.project_name
39
+
40
+ completion_uuid: Union[None, str]
41
+ if isinstance(self.completion_uuid, UUID):
42
+ completion_uuid = str(self.completion_uuid)
43
+ else:
44
+ completion_uuid = self.completion_uuid
45
+
46
+ completion_percentage = self.completion_percentage
47
+
48
+ is_completed = self.is_completed
49
+
50
+ requires_review = self.requires_review
51
+
52
+ answers = self.answers
53
+
54
+ unanswered_required_questions = self.unanswered_required_questions
55
+
56
+ field_dict: dict[str, Any] = {}
57
+ field_dict.update(self.additional_properties)
58
+ field_dict.update(
59
+ {
60
+ "project_uuid": project_uuid,
61
+ "project_name": project_name,
62
+ "completion_uuid": completion_uuid,
63
+ "completion_percentage": completion_percentage,
64
+ "is_completed": is_completed,
65
+ "requires_review": requires_review,
66
+ "answers": answers,
67
+ "unanswered_required_questions": unanswered_required_questions,
68
+ }
69
+ )
70
+
71
+ return field_dict
72
+
73
+ @classmethod
74
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
75
+ d = dict(src_dict)
76
+ project_uuid = UUID(d.pop("project_uuid"))
77
+
78
+ project_name = d.pop("project_name")
79
+
80
+ def _parse_completion_uuid(data: object) -> Union[None, UUID]:
81
+ if data is None:
82
+ return data
83
+ try:
84
+ if not isinstance(data, str):
85
+ raise TypeError()
86
+ completion_uuid_type_0 = UUID(data)
87
+
88
+ return completion_uuid_type_0
89
+ except: # noqa: E722
90
+ pass
91
+ return cast(Union[None, UUID], data)
92
+
93
+ completion_uuid = _parse_completion_uuid(d.pop("completion_uuid"))
94
+
95
+ completion_percentage = d.pop("completion_percentage")
96
+
97
+ is_completed = d.pop("is_completed")
98
+
99
+ requires_review = d.pop("requires_review")
100
+
101
+ answers = cast(list[Any], d.pop("answers"))
102
+
103
+ unanswered_required_questions = cast(list[Any], d.pop("unanswered_required_questions"))
104
+
105
+ project_detail = cls(
106
+ project_uuid=project_uuid,
107
+ project_name=project_name,
108
+ completion_uuid=completion_uuid,
109
+ completion_percentage=completion_percentage,
110
+ is_completed=is_completed,
111
+ requires_review=requires_review,
112
+ answers=answers,
113
+ unanswered_required_questions=unanswered_required_questions,
114
+ )
115
+
116
+ project_detail.additional_properties = d
117
+ return project_detail
118
+
119
+ @property
120
+ def additional_keys(self) -> list[str]:
121
+ return list(self.additional_properties.keys())
122
+
123
+ def __getitem__(self, key: str) -> Any:
124
+ return self.additional_properties[key]
125
+
126
+ def __setitem__(self, key: str, value: Any) -> None:
127
+ self.additional_properties[key] = value
128
+
129
+ def __delitem__(self, key: str) -> None:
130
+ del self.additional_properties[key]
131
+
132
+ def __contains__(self, key: str) -> bool:
133
+ return key in self.additional_properties