waldur-api-client 7.8.0__py3-none-any.whl → 7.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of waldur-api-client might be problematic. Click here for more details.

Files changed (212) hide show
  1. waldur_api_client/api/booking_resources/booking_resources_count.py +10 -13
  2. waldur_api_client/api/booking_resources/booking_resources_list.py +10 -13
  3. waldur_api_client/api/call_managing_organisations/call_managing_organisations_create.py +44 -7
  4. waldur_api_client/api/call_managing_organisations/call_managing_organisations_partial_update.py +46 -7
  5. waldur_api_client/api/call_managing_organisations/call_managing_organisations_update.py +44 -7
  6. waldur_api_client/api/checklists_admin/checklists_admin_checklist_questions.py +49 -0
  7. waldur_api_client/api/checklists_admin/checklists_admin_count.py +43 -0
  8. waldur_api_client/api/checklists_admin/checklists_admin_list.py +43 -0
  9. waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_create.py +44 -7
  10. waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_partial_update.py +44 -7
  11. waldur_api_client/api/checklists_admin_categories/checklists_admin_categories_update.py +44 -7
  12. waldur_api_client/api/customers/customers_create.py +44 -7
  13. waldur_api_client/api/customers/customers_partial_update.py +44 -7
  14. waldur_api_client/api/customers/customers_update.py +44 -7
  15. waldur_api_client/api/external_links/external_links_create.py +44 -7
  16. waldur_api_client/api/external_links/external_links_partial_update.py +44 -7
  17. waldur_api_client/api/external_links/external_links_update.py +44 -7
  18. waldur_api_client/api/invoices/invoices_paid.py +44 -7
  19. waldur_api_client/api/marketplace_categories/marketplace_categories_create.py +44 -7
  20. waldur_api_client/api/marketplace_categories/marketplace_categories_partial_update.py +44 -7
  21. waldur_api_client/api/marketplace_categories/marketplace_categories_update.py +44 -7
  22. waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_create.py +44 -7
  23. waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_partial_update.py +44 -7
  24. waldur_api_client/api/marketplace_category_groups/marketplace_category_groups_update.py +44 -7
  25. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_count.py +96 -0
  26. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_list.py +96 -0
  27. waldur_api_client/api/marketplace_offering_files/marketplace_offering_files_create.py +44 -7
  28. waldur_api_client/api/marketplace_offering_user_checklist_completions/__init__.py +1 -0
  29. waldur_api_client/api/marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_count.py +286 -0
  30. waldur_api_client/api/marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_list.py +289 -0
  31. waldur_api_client/api/marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_retrieve.py +141 -0
  32. waldur_api_client/api/marketplace_orders/marketplace_orders_update_attachment.py +44 -7
  33. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_create.py +44 -7
  34. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list_course_accounts_retrieve.py +177 -0
  35. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_refresh_offering_usernames.py +0 -22
  36. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_compliance_checklist.py +105 -0
  37. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_image.py +44 -7
  38. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_thumbnail.py +30 -5
  39. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_count.py +10 -13
  40. waldur_api_client/api/marketplace_provider_resources/marketplace_provider_resources_list.py +10 -13
  41. waldur_api_client/api/marketplace_resources/marketplace_resources_count.py +10 -13
  42. waldur_api_client/api/marketplace_resources/marketplace_resources_list.py +10 -13
  43. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_create.py +44 -7
  44. waldur_api_client/api/marketplace_screenshots/marketplace_screenshots_update.py +44 -7
  45. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_course_accounts_list.py +98 -0
  46. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_create.py +44 -7
  47. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_partial_update.py +44 -7
  48. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_update.py +44 -7
  49. waldur_api_client/api/override_settings/override_settings.py +30 -5
  50. waldur_api_client/api/payments/payments_create.py +44 -7
  51. waldur_api_client/api/payments/payments_partial_update.py +44 -7
  52. waldur_api_client/api/payments/payments_update.py +44 -7
  53. waldur_api_client/api/projects/projects_create.py +44 -7
  54. waldur_api_client/api/projects/projects_partial_update.py +44 -7
  55. waldur_api_client/api/projects/projects_update.py +44 -7
  56. waldur_api_client/api/proposal_proposals/proposal_proposals_attach_document.py +30 -5
  57. waldur_api_client/api/slurm_jobs/slurm_jobs_create.py +44 -7
  58. waldur_api_client/api/slurm_jobs/slurm_jobs_update.py +44 -7
  59. waldur_api_client/api/support_attachments/support_attachments_create.py +44 -7
  60. waldur_api_client/api/user_group_invitations/user_group_invitations_count.py +15 -0
  61. waldur_api_client/api/user_group_invitations/user_group_invitations_list.py +15 -0
  62. waldur_api_client/api/user_invitations/user_invitations_count.py +15 -0
  63. waldur_api_client/api/user_invitations/user_invitations_list.py +15 -0
  64. waldur_api_client/api/users/users_create.py +44 -7
  65. waldur_api_client/api/users/users_partial_update.py +44 -7
  66. waldur_api_client/api/users/users_update.py +44 -7
  67. waldur_api_client/models/__init__.py +172 -4
  68. waldur_api_client/models/agent_type_enum.py +13 -0
  69. waldur_api_client/models/attachment_request_form.py +70 -0
  70. waldur_api_client/models/attachment_request_multipart.py +83 -0
  71. waldur_api_client/models/booking_offerings_list_field_item.py +1 -0
  72. waldur_api_client/models/booking_offerings_retrieve_field_item.py +1 -0
  73. waldur_api_client/models/booking_resource.py +18 -0
  74. waldur_api_client/models/booking_resources_list_field_item.py +2 -0
  75. waldur_api_client/models/booking_resources_retrieve_field_item.py +2 -0
  76. waldur_api_client/models/call_managing_organisation_request_form.py +103 -0
  77. waldur_api_client/models/call_managing_organisation_request_multipart.py +122 -0
  78. waldur_api_client/models/call_round.py +11 -1
  79. waldur_api_client/models/category_group_request_form.py +103 -0
  80. waldur_api_client/models/category_group_request_multipart.py +122 -0
  81. waldur_api_client/models/checklist_category_request_form.py +103 -0
  82. waldur_api_client/models/checklist_category_request_multipart.py +122 -0
  83. waldur_api_client/models/checklists_admin_checklist_questions_checklist_type.py +11 -0
  84. waldur_api_client/models/checklists_admin_checklist_questions_checklist_type_in_item.py +11 -0
  85. waldur_api_client/models/checklists_admin_count_checklist_type.py +11 -0
  86. waldur_api_client/models/checklists_admin_count_checklist_type_in_item.py +11 -0
  87. waldur_api_client/models/checklists_admin_list_checklist_type.py +11 -0
  88. waldur_api_client/models/checklists_admin_list_checklist_type_in_item.py +11 -0
  89. waldur_api_client/models/constance_settings.py +9 -0
  90. waldur_api_client/models/constance_settings_request.py +9 -0
  91. waldur_api_client/models/constance_settings_request_form.py +1547 -0
  92. waldur_api_client/models/constance_settings_request_multipart.py +2173 -0
  93. waldur_api_client/models/course_account.py +24 -0
  94. waldur_api_client/models/customer.py +9 -0
  95. waldur_api_client/models/customer_request.py +9 -0
  96. waldur_api_client/models/customer_request_form.py +312 -0
  97. waldur_api_client/models/customer_request_multipart.py +394 -0
  98. waldur_api_client/models/customers_list_field_item.py +1 -0
  99. waldur_api_client/models/customers_retrieve_field_item.py +1 -0
  100. waldur_api_client/models/external_link_request_form.py +111 -0
  101. waldur_api_client/models/external_link_request_multipart.py +132 -0
  102. waldur_api_client/models/firecrest_job_request_form.py +104 -0
  103. waldur_api_client/models/firecrest_job_request_multipart.py +127 -0
  104. waldur_api_client/models/group_invitation.py +8 -0
  105. waldur_api_client/models/integration_status.py +21 -4
  106. waldur_api_client/models/invitation.py +8 -0
  107. waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +2 -0
  108. waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +2 -0
  109. waldur_api_client/models/marketplace_category_request_form.py +153 -0
  110. waldur_api_client/models/marketplace_category_request_multipart.py +187 -0
  111. waldur_api_client/models/marketplace_course_accounts_count_o_item.py +23 -0
  112. waldur_api_client/models/marketplace_course_accounts_list_o_item.py +23 -0
  113. waldur_api_client/models/marketplace_offering_user_checklist_completions_count_o_item.py +11 -0
  114. waldur_api_client/models/marketplace_offering_user_checklist_completions_list_o_item.py +11 -0
  115. waldur_api_client/models/marketplace_orders_list_field_item.py +3 -0
  116. waldur_api_client/models/marketplace_orders_retrieve_field_item.py +3 -0
  117. waldur_api_client/models/marketplace_provider_offerings_list_course_accounts_retrieve_field_item.py +73 -0
  118. waldur_api_client/models/marketplace_provider_offerings_list_customer_service_accounts_retrieve_field_item.py +1 -0
  119. waldur_api_client/models/marketplace_provider_offerings_list_field_item.py +1 -0
  120. waldur_api_client/models/marketplace_provider_offerings_list_project_service_accounts_retrieve_field_item.py +1 -0
  121. waldur_api_client/models/marketplace_provider_offerings_retrieve_field_item.py +1 -0
  122. waldur_api_client/models/marketplace_provider_offerings_stats_retrieve_field_item.py +1 -0
  123. waldur_api_client/models/marketplace_provider_offerings_user_has_resource_access_retrieve_field_item.py +1 -0
  124. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +2 -0
  125. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +2 -0
  126. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +2 -0
  127. waldur_api_client/models/marketplace_public_offerings_list_field_item.py +1 -0
  128. waldur_api_client/models/marketplace_public_offerings_retrieve_field_item.py +1 -0
  129. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +2 -0
  130. waldur_api_client/models/marketplace_resources_list_field_item.py +2 -0
  131. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +2 -0
  132. waldur_api_client/models/marketplace_service_providers_course_accounts_list_o_item.py +23 -0
  133. waldur_api_client/models/marketplace_service_providers_offerings_list_field_item.py +1 -0
  134. waldur_api_client/models/merged_plugin_options.py +9 -0
  135. waldur_api_client/models/merged_plugin_options_request.py +9 -0
  136. waldur_api_client/models/nested_round.py +9 -0
  137. waldur_api_client/models/nested_round_request.py +9 -0
  138. waldur_api_client/models/notification.py +11 -0
  139. waldur_api_client/models/notification_context_fields.py +47 -0
  140. waldur_api_client/models/offering.py +20 -0
  141. waldur_api_client/models/offering_compliance_checklist_update_request.py +82 -0
  142. waldur_api_client/models/offering_create.py +20 -0
  143. waldur_api_client/models/offering_create_request.py +20 -0
  144. waldur_api_client/models/{provider_offering_details_request.py → offering_create_request_form.py} +77 -5
  145. waldur_api_client/models/offering_create_request_form_limits.py +57 -0
  146. waldur_api_client/models/offering_create_request_multipart.py +599 -0
  147. waldur_api_client/models/offering_create_request_multipart_limits.py +57 -0
  148. waldur_api_client/models/offering_file_request_form.py +78 -0
  149. waldur_api_client/models/offering_file_request_multipart.py +93 -0
  150. waldur_api_client/models/offering_image_request_form.py +62 -0
  151. waldur_api_client/models/offering_image_request_multipart.py +73 -0
  152. waldur_api_client/models/offering_thumbnail_request_form.py +62 -0
  153. waldur_api_client/models/offering_thumbnail_request_multipart.py +73 -0
  154. waldur_api_client/models/offering_user.py +5 -5
  155. waldur_api_client/models/{offering_user_state_enum.py → offering_user_state.py} +1 -1
  156. waldur_api_client/models/order_attachment_request_form.py +84 -0
  157. waldur_api_client/models/order_attachment_request_multipart.py +98 -0
  158. waldur_api_client/models/order_details.py +34 -0
  159. waldur_api_client/models/paid_request_form.py +81 -0
  160. waldur_api_client/models/paid_request_multipart.py +94 -0
  161. waldur_api_client/models/patched_call_managing_organisation_request_form.py +92 -0
  162. waldur_api_client/models/patched_call_managing_organisation_request_multipart.py +109 -0
  163. waldur_api_client/models/patched_category_group_request_form.py +101 -0
  164. waldur_api_client/models/patched_category_group_request_multipart.py +121 -0
  165. waldur_api_client/models/patched_checklist_category_request_form.py +102 -0
  166. waldur_api_client/models/patched_checklist_category_request_multipart.py +122 -0
  167. waldur_api_client/models/patched_customer_request.py +9 -0
  168. waldur_api_client/models/patched_customer_request_form.py +310 -0
  169. waldur_api_client/models/patched_customer_request_multipart.py +393 -0
  170. waldur_api_client/models/patched_external_link_request_form.py +110 -0
  171. waldur_api_client/models/patched_external_link_request_multipart.py +133 -0
  172. waldur_api_client/models/patched_marketplace_category_request_form.py +151 -0
  173. waldur_api_client/models/patched_marketplace_category_request_multipart.py +186 -0
  174. waldur_api_client/models/patched_payment_request_form.py +119 -0
  175. waldur_api_client/models/patched_payment_request_multipart.py +142 -0
  176. waldur_api_client/models/patched_project_request_form.py +279 -0
  177. waldur_api_client/models/patched_project_request_multipart.py +342 -0
  178. waldur_api_client/models/patched_service_provider_request_form.py +101 -0
  179. waldur_api_client/models/patched_service_provider_request_multipart.py +121 -0
  180. waldur_api_client/models/patched_user_request_form.py +241 -0
  181. waldur_api_client/models/patched_user_request_multipart.py +306 -0
  182. waldur_api_client/models/payment_request_form.py +113 -0
  183. waldur_api_client/models/payment_request_multipart.py +134 -0
  184. waldur_api_client/models/project_request_form.py +280 -0
  185. waldur_api_client/models/project_request_multipart.py +341 -0
  186. waldur_api_client/models/project_user.py +9 -0
  187. waldur_api_client/models/proposal.py +8 -0
  188. waldur_api_client/models/proposal_documentation_request_form.py +84 -0
  189. waldur_api_client/models/proposal_documentation_request_multipart.py +98 -0
  190. waldur_api_client/models/proposal_proposals_count_o_item.py +3 -1
  191. waldur_api_client/models/proposal_proposals_list_o_item.py +3 -1
  192. waldur_api_client/models/proposal_review.py +40 -0
  193. waldur_api_client/models/protected_proposal_list.py +8 -0
  194. waldur_api_client/models/protected_proposal_list_request.py +8 -0
  195. waldur_api_client/models/protected_round.py +8 -0
  196. waldur_api_client/models/provider_offering.py +21 -1
  197. waldur_api_client/models/provider_offering_details.py +20 -0
  198. waldur_api_client/models/public_offering_details.py +20 -0
  199. waldur_api_client/models/resource.py +18 -0
  200. waldur_api_client/models/resource_update_limits_request.py +1 -34
  201. waldur_api_client/models/screenshot_request_form.py +87 -0
  202. waldur_api_client/models/screenshot_request_multipart.py +105 -0
  203. waldur_api_client/models/service_provider_request_form.py +112 -0
  204. waldur_api_client/models/service_provider_request_multipart.py +134 -0
  205. waldur_api_client/models/user_checklist_completion.py +265 -0
  206. waldur_api_client/models/user_request_form.py +250 -0
  207. waldur_api_client/models/user_request_multipart.py +316 -0
  208. waldur_api_client/models/visible_invitation_details.py +8 -0
  209. {waldur_api_client-7.8.0.dist-info → waldur_api_client-7.8.2.dist-info}/METADATA +1 -1
  210. {waldur_api_client-7.8.0.dist-info → waldur_api_client-7.8.2.dist-info}/RECORD +212 -127
  211. {waldur_api_client-7.8.0.dist-info → waldur_api_client-7.8.2.dist-info}/WHEEL +1 -1
  212. {waldur_api_client-7.8.0.dist-info → waldur_api_client-7.8.2.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,265 @@
1
+ import datetime
2
+ from collections.abc import Mapping
3
+ from typing import TYPE_CHECKING, 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
+ if TYPE_CHECKING:
11
+ from ..models.offering_user import OfferingUser
12
+
13
+
14
+ T = TypeVar("T", bound="UserChecklistCompletion")
15
+
16
+
17
+ @_attrs_define
18
+ class UserChecklistCompletion:
19
+ """
20
+ Attributes:
21
+ uuid (UUID):
22
+ offering_user (OfferingUser):
23
+ offering_user_uuid (Union[None, str]):
24
+ offering_name (Union[None, str]):
25
+ offering_uuid (Union[None, str]):
26
+ customer_provider_uuid (Union[None, str]):
27
+ customer_provider_name (Union[None, str]):
28
+ checklist_uuid (str):
29
+ checklist_name (str):
30
+ checklist_description (str):
31
+ is_completed (bool): Whether all required questions have been answered
32
+ completion_percentage (float):
33
+ unanswered_required_questions (int):
34
+ requires_review (bool): Whether any answers triggered review requirements
35
+ reviewed_by (Union[None, int]): User who reviewed the checklist completion
36
+ reviewed_at (Union[None, datetime.datetime]):
37
+ review_notes (str): Notes from the reviewer
38
+ created (datetime.datetime):
39
+ modified (datetime.datetime):
40
+ """
41
+
42
+ uuid: UUID
43
+ offering_user: "OfferingUser"
44
+ offering_user_uuid: Union[None, str]
45
+ offering_name: Union[None, str]
46
+ offering_uuid: Union[None, str]
47
+ customer_provider_uuid: Union[None, str]
48
+ customer_provider_name: Union[None, str]
49
+ checklist_uuid: str
50
+ checklist_name: str
51
+ checklist_description: str
52
+ is_completed: bool
53
+ completion_percentage: float
54
+ unanswered_required_questions: int
55
+ requires_review: bool
56
+ reviewed_by: Union[None, int]
57
+ reviewed_at: Union[None, datetime.datetime]
58
+ review_notes: str
59
+ created: datetime.datetime
60
+ modified: datetime.datetime
61
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
62
+
63
+ def to_dict(self) -> dict[str, Any]:
64
+ uuid = str(self.uuid)
65
+
66
+ offering_user = self.offering_user.to_dict()
67
+
68
+ offering_user_uuid: Union[None, str]
69
+ offering_user_uuid = self.offering_user_uuid
70
+
71
+ offering_name: Union[None, str]
72
+ offering_name = self.offering_name
73
+
74
+ offering_uuid: Union[None, str]
75
+ offering_uuid = self.offering_uuid
76
+
77
+ customer_provider_uuid: Union[None, str]
78
+ customer_provider_uuid = self.customer_provider_uuid
79
+
80
+ customer_provider_name: Union[None, str]
81
+ customer_provider_name = self.customer_provider_name
82
+
83
+ checklist_uuid = self.checklist_uuid
84
+
85
+ checklist_name = self.checklist_name
86
+
87
+ checklist_description = self.checklist_description
88
+
89
+ is_completed = self.is_completed
90
+
91
+ completion_percentage = self.completion_percentage
92
+
93
+ unanswered_required_questions = self.unanswered_required_questions
94
+
95
+ requires_review = self.requires_review
96
+
97
+ reviewed_by: Union[None, int]
98
+ reviewed_by = self.reviewed_by
99
+
100
+ reviewed_at: Union[None, str]
101
+ if isinstance(self.reviewed_at, datetime.datetime):
102
+ reviewed_at = self.reviewed_at.isoformat()
103
+ else:
104
+ reviewed_at = self.reviewed_at
105
+
106
+ review_notes = self.review_notes
107
+
108
+ created = self.created.isoformat()
109
+
110
+ modified = self.modified.isoformat()
111
+
112
+ field_dict: dict[str, Any] = {}
113
+ field_dict.update(self.additional_properties)
114
+ field_dict.update(
115
+ {
116
+ "uuid": uuid,
117
+ "offering_user": offering_user,
118
+ "offering_user_uuid": offering_user_uuid,
119
+ "offering_name": offering_name,
120
+ "offering_uuid": offering_uuid,
121
+ "customer_provider_uuid": customer_provider_uuid,
122
+ "customer_provider_name": customer_provider_name,
123
+ "checklist_uuid": checklist_uuid,
124
+ "checklist_name": checklist_name,
125
+ "checklist_description": checklist_description,
126
+ "is_completed": is_completed,
127
+ "completion_percentage": completion_percentage,
128
+ "unanswered_required_questions": unanswered_required_questions,
129
+ "requires_review": requires_review,
130
+ "reviewed_by": reviewed_by,
131
+ "reviewed_at": reviewed_at,
132
+ "review_notes": review_notes,
133
+ "created": created,
134
+ "modified": modified,
135
+ }
136
+ )
137
+
138
+ return field_dict
139
+
140
+ @classmethod
141
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
142
+ from ..models.offering_user import OfferingUser
143
+
144
+ d = dict(src_dict)
145
+ uuid = UUID(d.pop("uuid"))
146
+
147
+ offering_user = OfferingUser.from_dict(d.pop("offering_user"))
148
+
149
+ def _parse_offering_user_uuid(data: object) -> Union[None, str]:
150
+ if data is None:
151
+ return data
152
+ return cast(Union[None, str], data)
153
+
154
+ offering_user_uuid = _parse_offering_user_uuid(d.pop("offering_user_uuid"))
155
+
156
+ def _parse_offering_name(data: object) -> Union[None, str]:
157
+ if data is None:
158
+ return data
159
+ return cast(Union[None, str], data)
160
+
161
+ offering_name = _parse_offering_name(d.pop("offering_name"))
162
+
163
+ def _parse_offering_uuid(data: object) -> Union[None, str]:
164
+ if data is None:
165
+ return data
166
+ return cast(Union[None, str], data)
167
+
168
+ offering_uuid = _parse_offering_uuid(d.pop("offering_uuid"))
169
+
170
+ def _parse_customer_provider_uuid(data: object) -> Union[None, str]:
171
+ if data is None:
172
+ return data
173
+ return cast(Union[None, str], data)
174
+
175
+ customer_provider_uuid = _parse_customer_provider_uuid(d.pop("customer_provider_uuid"))
176
+
177
+ def _parse_customer_provider_name(data: object) -> Union[None, str]:
178
+ if data is None:
179
+ return data
180
+ return cast(Union[None, str], data)
181
+
182
+ customer_provider_name = _parse_customer_provider_name(d.pop("customer_provider_name"))
183
+
184
+ checklist_uuid = d.pop("checklist_uuid")
185
+
186
+ checklist_name = d.pop("checklist_name")
187
+
188
+ checklist_description = d.pop("checklist_description")
189
+
190
+ is_completed = d.pop("is_completed")
191
+
192
+ completion_percentage = d.pop("completion_percentage")
193
+
194
+ unanswered_required_questions = d.pop("unanswered_required_questions")
195
+
196
+ requires_review = d.pop("requires_review")
197
+
198
+ def _parse_reviewed_by(data: object) -> Union[None, int]:
199
+ if data is None:
200
+ return data
201
+ return cast(Union[None, int], data)
202
+
203
+ reviewed_by = _parse_reviewed_by(d.pop("reviewed_by"))
204
+
205
+ def _parse_reviewed_at(data: object) -> Union[None, datetime.datetime]:
206
+ if data is None:
207
+ return data
208
+ try:
209
+ if not isinstance(data, str):
210
+ raise TypeError()
211
+ reviewed_at_type_0 = isoparse(data)
212
+
213
+ return reviewed_at_type_0
214
+ except: # noqa: E722
215
+ pass
216
+ return cast(Union[None, datetime.datetime], data)
217
+
218
+ reviewed_at = _parse_reviewed_at(d.pop("reviewed_at"))
219
+
220
+ review_notes = d.pop("review_notes")
221
+
222
+ created = isoparse(d.pop("created"))
223
+
224
+ modified = isoparse(d.pop("modified"))
225
+
226
+ user_checklist_completion = cls(
227
+ uuid=uuid,
228
+ offering_user=offering_user,
229
+ offering_user_uuid=offering_user_uuid,
230
+ offering_name=offering_name,
231
+ offering_uuid=offering_uuid,
232
+ customer_provider_uuid=customer_provider_uuid,
233
+ customer_provider_name=customer_provider_name,
234
+ checklist_uuid=checklist_uuid,
235
+ checklist_name=checklist_name,
236
+ checklist_description=checklist_description,
237
+ is_completed=is_completed,
238
+ completion_percentage=completion_percentage,
239
+ unanswered_required_questions=unanswered_required_questions,
240
+ requires_review=requires_review,
241
+ reviewed_by=reviewed_by,
242
+ reviewed_at=reviewed_at,
243
+ review_notes=review_notes,
244
+ created=created,
245
+ modified=modified,
246
+ )
247
+
248
+ user_checklist_completion.additional_properties = d
249
+ return user_checklist_completion
250
+
251
+ @property
252
+ def additional_keys(self) -> list[str]:
253
+ return list(self.additional_properties.keys())
254
+
255
+ def __getitem__(self, key: str) -> Any:
256
+ return self.additional_properties[key]
257
+
258
+ def __setitem__(self, key: str, value: Any) -> None:
259
+ self.additional_properties[key] = value
260
+
261
+ def __delitem__(self, key: str) -> None:
262
+ del self.additional_properties[key]
263
+
264
+ def __contains__(self, key: str) -> bool:
265
+ return key in self.additional_properties
@@ -0,0 +1,250 @@
1
+ from collections.abc import Mapping
2
+ from io import BytesIO
3
+ from typing import Any, TypeVar, Union, cast
4
+
5
+ from attrs import define as _attrs_define
6
+ from attrs import field as _attrs_field
7
+
8
+ from .. import types
9
+ from ..types import UNSET, File, Unset
10
+
11
+ T = TypeVar("T", bound="UserRequestForm")
12
+
13
+
14
+ @_attrs_define
15
+ class UserRequestForm:
16
+ """
17
+ Attributes:
18
+ username (str): Required. 128 characters or fewer. Lowercase letters, numbers and @/./+/-/_ characters
19
+ email (str):
20
+ slug (Union[Unset, str]):
21
+ native_name (Union[Unset, str]):
22
+ job_title (Union[Unset, str]):
23
+ phone_number (Union[Unset, str]):
24
+ organization (Union[Unset, str]):
25
+ description (Union[Unset, str]):
26
+ is_staff (Union[Unset, bool]): Designates whether the user can log into this admin site.
27
+ is_active (Union[Unset, bool]): Designates whether this user should be treated as active. Unselect this instead
28
+ of deleting accounts.
29
+ is_support (Union[Unset, bool]): Designates whether the user is a global support user.
30
+ token_lifetime (Union[None, Unset, int]): Token lifetime in seconds.
31
+ agree_with_policy (Union[Unset, bool]): User must agree with the policy to register.
32
+ notifications_enabled (Union[Unset, bool]): Designates whether the user is allowed to receive email
33
+ notifications.
34
+ preferred_language (Union[Unset, str]):
35
+ first_name (Union[Unset, str]):
36
+ last_name (Union[Unset, str]):
37
+ image (Union[File, None, Unset]):
38
+ """
39
+
40
+ username: str
41
+ email: str
42
+ slug: Union[Unset, str] = UNSET
43
+ native_name: Union[Unset, str] = UNSET
44
+ job_title: Union[Unset, str] = UNSET
45
+ phone_number: Union[Unset, str] = UNSET
46
+ organization: Union[Unset, str] = UNSET
47
+ description: Union[Unset, str] = UNSET
48
+ is_staff: Union[Unset, bool] = UNSET
49
+ is_active: Union[Unset, bool] = UNSET
50
+ is_support: Union[Unset, bool] = UNSET
51
+ token_lifetime: Union[None, Unset, int] = UNSET
52
+ agree_with_policy: Union[Unset, bool] = UNSET
53
+ notifications_enabled: Union[Unset, bool] = UNSET
54
+ preferred_language: Union[Unset, str] = UNSET
55
+ first_name: Union[Unset, str] = UNSET
56
+ last_name: Union[Unset, str] = UNSET
57
+ image: Union[File, None, Unset] = UNSET
58
+ additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
59
+
60
+ def to_dict(self) -> dict[str, Any]:
61
+ username = self.username
62
+
63
+ email = self.email
64
+
65
+ slug = self.slug
66
+
67
+ native_name = self.native_name
68
+
69
+ job_title = self.job_title
70
+
71
+ phone_number = self.phone_number
72
+
73
+ organization = self.organization
74
+
75
+ description = self.description
76
+
77
+ is_staff = self.is_staff
78
+
79
+ is_active = self.is_active
80
+
81
+ is_support = self.is_support
82
+
83
+ token_lifetime: Union[None, Unset, int]
84
+ if isinstance(self.token_lifetime, Unset):
85
+ token_lifetime = UNSET
86
+ else:
87
+ token_lifetime = self.token_lifetime
88
+
89
+ agree_with_policy = self.agree_with_policy
90
+
91
+ notifications_enabled = self.notifications_enabled
92
+
93
+ preferred_language = self.preferred_language
94
+
95
+ first_name = self.first_name
96
+
97
+ last_name = self.last_name
98
+
99
+ image: Union[None, Unset, types.FileTypes]
100
+ if isinstance(self.image, Unset):
101
+ image = UNSET
102
+ elif isinstance(self.image, File):
103
+ image = self.image.to_tuple()
104
+
105
+ else:
106
+ image = self.image
107
+
108
+ field_dict: dict[str, Any] = {}
109
+ field_dict.update(self.additional_properties)
110
+ field_dict.update(
111
+ {
112
+ "username": username,
113
+ "email": email,
114
+ }
115
+ )
116
+ if slug is not UNSET:
117
+ field_dict["slug"] = slug
118
+ if native_name is not UNSET:
119
+ field_dict["native_name"] = native_name
120
+ if job_title is not UNSET:
121
+ field_dict["job_title"] = job_title
122
+ if phone_number is not UNSET:
123
+ field_dict["phone_number"] = phone_number
124
+ if organization is not UNSET:
125
+ field_dict["organization"] = organization
126
+ if description is not UNSET:
127
+ field_dict["description"] = description
128
+ if is_staff is not UNSET:
129
+ field_dict["is_staff"] = is_staff
130
+ if is_active is not UNSET:
131
+ field_dict["is_active"] = is_active
132
+ if is_support is not UNSET:
133
+ field_dict["is_support"] = is_support
134
+ if token_lifetime is not UNSET:
135
+ field_dict["token_lifetime"] = token_lifetime
136
+ if agree_with_policy is not UNSET:
137
+ field_dict["agree_with_policy"] = agree_with_policy
138
+ if notifications_enabled is not UNSET:
139
+ field_dict["notifications_enabled"] = notifications_enabled
140
+ if preferred_language is not UNSET:
141
+ field_dict["preferred_language"] = preferred_language
142
+ if first_name is not UNSET:
143
+ field_dict["first_name"] = first_name
144
+ if last_name is not UNSET:
145
+ field_dict["last_name"] = last_name
146
+ if image is not UNSET:
147
+ field_dict["image"] = image
148
+
149
+ return field_dict
150
+
151
+ @classmethod
152
+ def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
153
+ d = dict(src_dict)
154
+ username = d.pop("username")
155
+
156
+ email = d.pop("email")
157
+
158
+ slug = d.pop("slug", UNSET)
159
+
160
+ native_name = d.pop("native_name", UNSET)
161
+
162
+ job_title = d.pop("job_title", UNSET)
163
+
164
+ phone_number = d.pop("phone_number", UNSET)
165
+
166
+ organization = d.pop("organization", UNSET)
167
+
168
+ description = d.pop("description", UNSET)
169
+
170
+ is_staff = d.pop("is_staff", UNSET)
171
+
172
+ is_active = d.pop("is_active", UNSET)
173
+
174
+ is_support = d.pop("is_support", UNSET)
175
+
176
+ def _parse_token_lifetime(data: object) -> Union[None, Unset, int]:
177
+ if data is None:
178
+ return data
179
+ if isinstance(data, Unset):
180
+ return data
181
+ return cast(Union[None, Unset, int], data)
182
+
183
+ token_lifetime = _parse_token_lifetime(d.pop("token_lifetime", UNSET))
184
+
185
+ agree_with_policy = d.pop("agree_with_policy", UNSET)
186
+
187
+ notifications_enabled = d.pop("notifications_enabled", UNSET)
188
+
189
+ preferred_language = d.pop("preferred_language", UNSET)
190
+
191
+ first_name = d.pop("first_name", UNSET)
192
+
193
+ last_name = d.pop("last_name", UNSET)
194
+
195
+ def _parse_image(data: object) -> Union[File, None, Unset]:
196
+ if data is None:
197
+ return data
198
+ if isinstance(data, Unset):
199
+ return data
200
+ try:
201
+ if not isinstance(data, bytes):
202
+ raise TypeError()
203
+ image_type_0 = File(payload=BytesIO(data))
204
+
205
+ return image_type_0
206
+ except: # noqa: E722
207
+ pass
208
+ return cast(Union[File, None, Unset], data)
209
+
210
+ image = _parse_image(d.pop("image", UNSET))
211
+
212
+ user_request_form = cls(
213
+ username=username,
214
+ email=email,
215
+ slug=slug,
216
+ native_name=native_name,
217
+ job_title=job_title,
218
+ phone_number=phone_number,
219
+ organization=organization,
220
+ description=description,
221
+ is_staff=is_staff,
222
+ is_active=is_active,
223
+ is_support=is_support,
224
+ token_lifetime=token_lifetime,
225
+ agree_with_policy=agree_with_policy,
226
+ notifications_enabled=notifications_enabled,
227
+ preferred_language=preferred_language,
228
+ first_name=first_name,
229
+ last_name=last_name,
230
+ image=image,
231
+ )
232
+
233
+ user_request_form.additional_properties = d
234
+ return user_request_form
235
+
236
+ @property
237
+ def additional_keys(self) -> list[str]:
238
+ return list(self.additional_properties.keys())
239
+
240
+ def __getitem__(self, key: str) -> Any:
241
+ return self.additional_properties[key]
242
+
243
+ def __setitem__(self, key: str, value: Any) -> None:
244
+ self.additional_properties[key] = value
245
+
246
+ def __delitem__(self, key: str) -> None:
247
+ del self.additional_properties[key]
248
+
249
+ def __contains__(self, key: str) -> bool:
250
+ return key in self.additional_properties