waldur-api-client 7.8.0__py3-none-any.whl → 7.8.1__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 (50) hide show
  1. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_count.py +96 -0
  2. waldur_api_client/api/marketplace_course_accounts/marketplace_course_accounts_list.py +96 -0
  3. waldur_api_client/api/marketplace_offering_user_checklist_completions/__init__.py +1 -0
  4. waldur_api_client/api/marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_count.py +286 -0
  5. waldur_api_client/api/marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_list.py +289 -0
  6. waldur_api_client/api/marketplace_offering_user_checklist_completions/marketplace_offering_user_checklist_completions_retrieve.py +141 -0
  7. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_list_course_accounts_retrieve.py +177 -0
  8. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_refresh_offering_usernames.py +0 -22
  9. waldur_api_client/api/marketplace_provider_offerings/marketplace_provider_offerings_update_compliance_checklist.py +105 -0
  10. waldur_api_client/api/marketplace_service_providers/marketplace_service_providers_course_accounts_list.py +98 -0
  11. waldur_api_client/api/user_invitations/user_invitations_count.py +15 -0
  12. waldur_api_client/api/user_invitations/user_invitations_list.py +15 -0
  13. waldur_api_client/models/__init__.py +26 -2
  14. waldur_api_client/models/booking_resource.py +18 -0
  15. waldur_api_client/models/booking_resources_list_field_item.py +2 -0
  16. waldur_api_client/models/booking_resources_retrieve_field_item.py +2 -0
  17. waldur_api_client/models/course_account.py +24 -0
  18. waldur_api_client/models/group_invitation.py +8 -0
  19. waldur_api_client/models/invitation.py +8 -0
  20. waldur_api_client/models/managed_rancher_cluster_resources_list_field_item.py +2 -0
  21. waldur_api_client/models/managed_rancher_cluster_resources_retrieve_field_item.py +2 -0
  22. waldur_api_client/models/marketplace_course_accounts_count_o_item.py +23 -0
  23. waldur_api_client/models/marketplace_course_accounts_list_o_item.py +23 -0
  24. waldur_api_client/models/marketplace_offering_user_checklist_completions_count_o_item.py +11 -0
  25. waldur_api_client/models/marketplace_offering_user_checklist_completions_list_o_item.py +11 -0
  26. waldur_api_client/models/marketplace_orders_list_field_item.py +3 -0
  27. waldur_api_client/models/marketplace_orders_retrieve_field_item.py +3 -0
  28. waldur_api_client/models/marketplace_provider_offerings_list_course_accounts_retrieve_field_item.py +72 -0
  29. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +2 -0
  30. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +2 -0
  31. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +2 -0
  32. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +2 -0
  33. waldur_api_client/models/marketplace_resources_list_field_item.py +2 -0
  34. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +2 -0
  35. waldur_api_client/models/marketplace_service_providers_course_accounts_list_o_item.py +23 -0
  36. waldur_api_client/models/merged_plugin_options.py +9 -0
  37. waldur_api_client/models/merged_plugin_options_request.py +9 -0
  38. waldur_api_client/models/notification.py +11 -0
  39. waldur_api_client/models/notification_context_fields.py +47 -0
  40. waldur_api_client/models/offering_compliance_checklist_update_request.py +82 -0
  41. waldur_api_client/models/order_details.py +34 -0
  42. waldur_api_client/models/resource.py +18 -0
  43. waldur_api_client/models/resource_update_limits_request.py +1 -34
  44. waldur_api_client/models/user_checklist_completion.py +265 -0
  45. waldur_api_client/models/visible_invitation_details.py +8 -0
  46. {waldur_api_client-7.8.0.dist-info → waldur_api_client-7.8.1.dist-info}/METADATA +1 -1
  47. {waldur_api_client-7.8.0.dist-info → waldur_api_client-7.8.1.dist-info}/RECORD +49 -35
  48. {waldur_api_client-7.8.0.dist-info → waldur_api_client-7.8.1.dist-info}/WHEEL +1 -1
  49. waldur_api_client/models/provider_offering_details_request.py +0 -407
  50. {waldur_api_client-7.8.0.dist-info → waldur_api_client-7.8.1.dist-info}/licenses/LICENSE +0 -0
@@ -0,0 +1,286 @@
1
+ import datetime
2
+ from http import HTTPStatus
3
+ from typing import Any, Union
4
+ from uuid import UUID
5
+
6
+ import httpx
7
+
8
+ from ... import errors
9
+ from ...client import AuthenticatedClient, Client
10
+ from ...models.marketplace_offering_user_checklist_completions_count_o_item import (
11
+ MarketplaceOfferingUserChecklistCompletionsCountOItem,
12
+ )
13
+ from ...types import UNSET, Response, Unset
14
+
15
+
16
+ def _get_kwargs(
17
+ *,
18
+ created: Union[Unset, datetime.datetime] = UNSET,
19
+ is_completed: Union[Unset, bool] = UNSET,
20
+ modified: Union[Unset, datetime.datetime] = UNSET,
21
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]] = UNSET,
22
+ offering_uuid: Union[Unset, UUID] = UNSET,
23
+ page: Union[Unset, int] = UNSET,
24
+ page_size: Union[Unset, int] = UNSET,
25
+ user_uuid: Union[Unset, UUID] = UNSET,
26
+ ) -> dict[str, Any]:
27
+ params: dict[str, Any] = {}
28
+
29
+ json_created: Union[Unset, str] = UNSET
30
+ if not isinstance(created, Unset):
31
+ json_created = created.isoformat()
32
+ params["created"] = json_created
33
+
34
+ params["is_completed"] = is_completed
35
+
36
+ json_modified: Union[Unset, str] = UNSET
37
+ if not isinstance(modified, Unset):
38
+ json_modified = modified.isoformat()
39
+ params["modified"] = json_modified
40
+
41
+ json_o: Union[Unset, list[str]] = UNSET
42
+ if not isinstance(o, Unset):
43
+ json_o = []
44
+ for o_item_data in o:
45
+ o_item = o_item_data.value
46
+ json_o.append(o_item)
47
+
48
+ params["o"] = json_o
49
+
50
+ json_offering_uuid: Union[Unset, str] = UNSET
51
+ if not isinstance(offering_uuid, Unset):
52
+ json_offering_uuid = str(offering_uuid)
53
+ params["offering_uuid"] = json_offering_uuid
54
+
55
+ params["page"] = page
56
+
57
+ params["page_size"] = page_size
58
+
59
+ json_user_uuid: Union[Unset, str] = UNSET
60
+ if not isinstance(user_uuid, Unset):
61
+ json_user_uuid = str(user_uuid)
62
+ params["user_uuid"] = json_user_uuid
63
+
64
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
65
+
66
+ _kwargs: dict[str, Any] = {
67
+ "method": "head",
68
+ "url": "/api/marketplace-offering-user-checklist-completions/",
69
+ "params": params,
70
+ }
71
+
72
+ return _kwargs
73
+
74
+
75
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> int:
76
+ if response.status_code == HTTPStatus.OK:
77
+ try:
78
+ return int(response.headers["x-result-count"])
79
+ except KeyError:
80
+ raise errors.UnexpectedStatus(
81
+ response.status_code, b"Expected 'X-Result-Count' header for HEAD request, but it was not found."
82
+ )
83
+ except ValueError:
84
+ count_val = response.headers.get("x-result-count")
85
+ msg = f"Expected 'X-Result-Count' header to be an integer, but got '{count_val}'."
86
+ raise errors.UnexpectedStatus(response.status_code, msg.encode())
87
+ raise errors.UnexpectedStatus(response.status_code, response.content)
88
+
89
+
90
+ def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[int]:
91
+ return Response(
92
+ status_code=HTTPStatus(response.status_code),
93
+ content=response.content,
94
+ headers=response.headers,
95
+ parsed=_parse_response(client=client, response=response),
96
+ )
97
+
98
+
99
+ def sync_detailed(
100
+ *,
101
+ client: AuthenticatedClient,
102
+ created: Union[Unset, datetime.datetime] = UNSET,
103
+ is_completed: Union[Unset, bool] = UNSET,
104
+ modified: Union[Unset, datetime.datetime] = UNSET,
105
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]] = UNSET,
106
+ offering_uuid: Union[Unset, UUID] = UNSET,
107
+ page: Union[Unset, int] = UNSET,
108
+ page_size: Union[Unset, int] = UNSET,
109
+ user_uuid: Union[Unset, UUID] = UNSET,
110
+ ) -> Response[int]:
111
+ """Get number of items in the collection matching the request parameters.
112
+
113
+ Args:
114
+ created (Union[Unset, datetime.datetime]):
115
+ is_completed (Union[Unset, bool]):
116
+ modified (Union[Unset, datetime.datetime]):
117
+ o (Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]]):
118
+ offering_uuid (Union[Unset, UUID]):
119
+ page (Union[Unset, int]):
120
+ page_size (Union[Unset, int]):
121
+ user_uuid (Union[Unset, UUID]):
122
+
123
+ Raises:
124
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
125
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
126
+
127
+ Returns:
128
+ Response[int]
129
+ """
130
+
131
+ kwargs = _get_kwargs(
132
+ created=created,
133
+ is_completed=is_completed,
134
+ modified=modified,
135
+ o=o,
136
+ offering_uuid=offering_uuid,
137
+ page=page,
138
+ page_size=page_size,
139
+ user_uuid=user_uuid,
140
+ )
141
+
142
+ response = client.get_httpx_client().request(
143
+ **kwargs,
144
+ )
145
+
146
+ return _build_response(client=client, response=response)
147
+
148
+
149
+ def sync(
150
+ *,
151
+ client: AuthenticatedClient,
152
+ created: Union[Unset, datetime.datetime] = UNSET,
153
+ is_completed: Union[Unset, bool] = UNSET,
154
+ modified: Union[Unset, datetime.datetime] = UNSET,
155
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]] = UNSET,
156
+ offering_uuid: Union[Unset, UUID] = UNSET,
157
+ page: Union[Unset, int] = UNSET,
158
+ page_size: Union[Unset, int] = UNSET,
159
+ user_uuid: Union[Unset, UUID] = UNSET,
160
+ ) -> int:
161
+ """Get number of items in the collection matching the request parameters.
162
+
163
+ Args:
164
+ created (Union[Unset, datetime.datetime]):
165
+ is_completed (Union[Unset, bool]):
166
+ modified (Union[Unset, datetime.datetime]):
167
+ o (Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]]):
168
+ offering_uuid (Union[Unset, UUID]):
169
+ page (Union[Unset, int]):
170
+ page_size (Union[Unset, int]):
171
+ user_uuid (Union[Unset, UUID]):
172
+
173
+ Raises:
174
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
175
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
176
+
177
+ Returns:
178
+ int
179
+ """
180
+
181
+ return sync_detailed(
182
+ client=client,
183
+ created=created,
184
+ is_completed=is_completed,
185
+ modified=modified,
186
+ o=o,
187
+ offering_uuid=offering_uuid,
188
+ page=page,
189
+ page_size=page_size,
190
+ user_uuid=user_uuid,
191
+ ).parsed
192
+
193
+
194
+ async def asyncio_detailed(
195
+ *,
196
+ client: AuthenticatedClient,
197
+ created: Union[Unset, datetime.datetime] = UNSET,
198
+ is_completed: Union[Unset, bool] = UNSET,
199
+ modified: Union[Unset, datetime.datetime] = UNSET,
200
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]] = UNSET,
201
+ offering_uuid: Union[Unset, UUID] = UNSET,
202
+ page: Union[Unset, int] = UNSET,
203
+ page_size: Union[Unset, int] = UNSET,
204
+ user_uuid: Union[Unset, UUID] = UNSET,
205
+ ) -> Response[int]:
206
+ """Get number of items in the collection matching the request parameters.
207
+
208
+ Args:
209
+ created (Union[Unset, datetime.datetime]):
210
+ is_completed (Union[Unset, bool]):
211
+ modified (Union[Unset, datetime.datetime]):
212
+ o (Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]]):
213
+ offering_uuid (Union[Unset, UUID]):
214
+ page (Union[Unset, int]):
215
+ page_size (Union[Unset, int]):
216
+ user_uuid (Union[Unset, UUID]):
217
+
218
+ Raises:
219
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
220
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
221
+
222
+ Returns:
223
+ Response[int]
224
+ """
225
+
226
+ kwargs = _get_kwargs(
227
+ created=created,
228
+ is_completed=is_completed,
229
+ modified=modified,
230
+ o=o,
231
+ offering_uuid=offering_uuid,
232
+ page=page,
233
+ page_size=page_size,
234
+ user_uuid=user_uuid,
235
+ )
236
+
237
+ response = await client.get_async_httpx_client().request(**kwargs)
238
+
239
+ return _build_response(client=client, response=response)
240
+
241
+
242
+ async def asyncio(
243
+ *,
244
+ client: AuthenticatedClient,
245
+ created: Union[Unset, datetime.datetime] = UNSET,
246
+ is_completed: Union[Unset, bool] = UNSET,
247
+ modified: Union[Unset, datetime.datetime] = UNSET,
248
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]] = UNSET,
249
+ offering_uuid: Union[Unset, UUID] = UNSET,
250
+ page: Union[Unset, int] = UNSET,
251
+ page_size: Union[Unset, int] = UNSET,
252
+ user_uuid: Union[Unset, UUID] = UNSET,
253
+ ) -> int:
254
+ """Get number of items in the collection matching the request parameters.
255
+
256
+ Args:
257
+ created (Union[Unset, datetime.datetime]):
258
+ is_completed (Union[Unset, bool]):
259
+ modified (Union[Unset, datetime.datetime]):
260
+ o (Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsCountOItem]]):
261
+ offering_uuid (Union[Unset, UUID]):
262
+ page (Union[Unset, int]):
263
+ page_size (Union[Unset, int]):
264
+ user_uuid (Union[Unset, UUID]):
265
+
266
+ Raises:
267
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
268
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
269
+
270
+ Returns:
271
+ int
272
+ """
273
+
274
+ return (
275
+ await asyncio_detailed(
276
+ client=client,
277
+ created=created,
278
+ is_completed=is_completed,
279
+ modified=modified,
280
+ o=o,
281
+ offering_uuid=offering_uuid,
282
+ page=page,
283
+ page_size=page_size,
284
+ user_uuid=user_uuid,
285
+ )
286
+ ).parsed
@@ -0,0 +1,289 @@
1
+ import datetime
2
+ from http import HTTPStatus
3
+ from typing import Any, Union
4
+ from uuid import UUID
5
+
6
+ import httpx
7
+
8
+ from ... import errors
9
+ from ...client import AuthenticatedClient, Client
10
+ from ...models.marketplace_offering_user_checklist_completions_list_o_item import (
11
+ MarketplaceOfferingUserChecklistCompletionsListOItem,
12
+ )
13
+ from ...models.user_checklist_completion import UserChecklistCompletion
14
+ from ...types import UNSET, Response, Unset
15
+
16
+
17
+ def _get_kwargs(
18
+ *,
19
+ created: Union[Unset, datetime.datetime] = UNSET,
20
+ is_completed: Union[Unset, bool] = UNSET,
21
+ modified: Union[Unset, datetime.datetime] = UNSET,
22
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]] = UNSET,
23
+ offering_uuid: Union[Unset, UUID] = UNSET,
24
+ page: Union[Unset, int] = UNSET,
25
+ page_size: Union[Unset, int] = UNSET,
26
+ user_uuid: Union[Unset, UUID] = UNSET,
27
+ ) -> dict[str, Any]:
28
+ params: dict[str, Any] = {}
29
+
30
+ json_created: Union[Unset, str] = UNSET
31
+ if not isinstance(created, Unset):
32
+ json_created = created.isoformat()
33
+ params["created"] = json_created
34
+
35
+ params["is_completed"] = is_completed
36
+
37
+ json_modified: Union[Unset, str] = UNSET
38
+ if not isinstance(modified, Unset):
39
+ json_modified = modified.isoformat()
40
+ params["modified"] = json_modified
41
+
42
+ json_o: Union[Unset, list[str]] = UNSET
43
+ if not isinstance(o, Unset):
44
+ json_o = []
45
+ for o_item_data in o:
46
+ o_item = o_item_data.value
47
+ json_o.append(o_item)
48
+
49
+ params["o"] = json_o
50
+
51
+ json_offering_uuid: Union[Unset, str] = UNSET
52
+ if not isinstance(offering_uuid, Unset):
53
+ json_offering_uuid = str(offering_uuid)
54
+ params["offering_uuid"] = json_offering_uuid
55
+
56
+ params["page"] = page
57
+
58
+ params["page_size"] = page_size
59
+
60
+ json_user_uuid: Union[Unset, str] = UNSET
61
+ if not isinstance(user_uuid, Unset):
62
+ json_user_uuid = str(user_uuid)
63
+ params["user_uuid"] = json_user_uuid
64
+
65
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
66
+
67
+ _kwargs: dict[str, Any] = {
68
+ "method": "get",
69
+ "url": "/api/marketplace-offering-user-checklist-completions/",
70
+ "params": params,
71
+ }
72
+
73
+ return _kwargs
74
+
75
+
76
+ def _parse_response(
77
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
78
+ ) -> list["UserChecklistCompletion"]:
79
+ if response.status_code == 200:
80
+ response_200 = []
81
+ _response_200 = response.json()
82
+ for response_200_item_data in _response_200:
83
+ response_200_item = UserChecklistCompletion.from_dict(response_200_item_data)
84
+
85
+ response_200.append(response_200_item)
86
+
87
+ return response_200
88
+ raise errors.UnexpectedStatus(response.status_code, response.content)
89
+
90
+
91
+ def _build_response(
92
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
93
+ ) -> Response[list["UserChecklistCompletion"]]:
94
+ return Response(
95
+ status_code=HTTPStatus(response.status_code),
96
+ content=response.content,
97
+ headers=response.headers,
98
+ parsed=_parse_response(client=client, response=response),
99
+ )
100
+
101
+
102
+ def sync_detailed(
103
+ *,
104
+ client: AuthenticatedClient,
105
+ created: Union[Unset, datetime.datetime] = UNSET,
106
+ is_completed: Union[Unset, bool] = UNSET,
107
+ modified: Union[Unset, datetime.datetime] = UNSET,
108
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]] = UNSET,
109
+ offering_uuid: Union[Unset, UUID] = UNSET,
110
+ page: Union[Unset, int] = UNSET,
111
+ page_size: Union[Unset, int] = UNSET,
112
+ user_uuid: Union[Unset, UUID] = UNSET,
113
+ ) -> Response[list["UserChecklistCompletion"]]:
114
+ """Override list to add OfferingUser data optimization.
115
+
116
+ Args:
117
+ created (Union[Unset, datetime.datetime]):
118
+ is_completed (Union[Unset, bool]):
119
+ modified (Union[Unset, datetime.datetime]):
120
+ o (Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]]):
121
+ offering_uuid (Union[Unset, UUID]):
122
+ page (Union[Unset, int]):
123
+ page_size (Union[Unset, int]):
124
+ user_uuid (Union[Unset, UUID]):
125
+
126
+ Raises:
127
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
128
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
129
+
130
+ Returns:
131
+ Response[list['UserChecklistCompletion']]
132
+ """
133
+
134
+ kwargs = _get_kwargs(
135
+ created=created,
136
+ is_completed=is_completed,
137
+ modified=modified,
138
+ o=o,
139
+ offering_uuid=offering_uuid,
140
+ page=page,
141
+ page_size=page_size,
142
+ user_uuid=user_uuid,
143
+ )
144
+
145
+ response = client.get_httpx_client().request(
146
+ **kwargs,
147
+ )
148
+
149
+ return _build_response(client=client, response=response)
150
+
151
+
152
+ def sync(
153
+ *,
154
+ client: AuthenticatedClient,
155
+ created: Union[Unset, datetime.datetime] = UNSET,
156
+ is_completed: Union[Unset, bool] = UNSET,
157
+ modified: Union[Unset, datetime.datetime] = UNSET,
158
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]] = UNSET,
159
+ offering_uuid: Union[Unset, UUID] = UNSET,
160
+ page: Union[Unset, int] = UNSET,
161
+ page_size: Union[Unset, int] = UNSET,
162
+ user_uuid: Union[Unset, UUID] = UNSET,
163
+ ) -> list["UserChecklistCompletion"]:
164
+ """Override list to add OfferingUser data optimization.
165
+
166
+ Args:
167
+ created (Union[Unset, datetime.datetime]):
168
+ is_completed (Union[Unset, bool]):
169
+ modified (Union[Unset, datetime.datetime]):
170
+ o (Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]]):
171
+ offering_uuid (Union[Unset, UUID]):
172
+ page (Union[Unset, int]):
173
+ page_size (Union[Unset, int]):
174
+ user_uuid (Union[Unset, UUID]):
175
+
176
+ Raises:
177
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
178
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
179
+
180
+ Returns:
181
+ list['UserChecklistCompletion']
182
+ """
183
+
184
+ return sync_detailed(
185
+ client=client,
186
+ created=created,
187
+ is_completed=is_completed,
188
+ modified=modified,
189
+ o=o,
190
+ offering_uuid=offering_uuid,
191
+ page=page,
192
+ page_size=page_size,
193
+ user_uuid=user_uuid,
194
+ ).parsed
195
+
196
+
197
+ async def asyncio_detailed(
198
+ *,
199
+ client: AuthenticatedClient,
200
+ created: Union[Unset, datetime.datetime] = UNSET,
201
+ is_completed: Union[Unset, bool] = UNSET,
202
+ modified: Union[Unset, datetime.datetime] = UNSET,
203
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]] = UNSET,
204
+ offering_uuid: Union[Unset, UUID] = UNSET,
205
+ page: Union[Unset, int] = UNSET,
206
+ page_size: Union[Unset, int] = UNSET,
207
+ user_uuid: Union[Unset, UUID] = UNSET,
208
+ ) -> Response[list["UserChecklistCompletion"]]:
209
+ """Override list to add OfferingUser data optimization.
210
+
211
+ Args:
212
+ created (Union[Unset, datetime.datetime]):
213
+ is_completed (Union[Unset, bool]):
214
+ modified (Union[Unset, datetime.datetime]):
215
+ o (Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]]):
216
+ offering_uuid (Union[Unset, UUID]):
217
+ page (Union[Unset, int]):
218
+ page_size (Union[Unset, int]):
219
+ user_uuid (Union[Unset, UUID]):
220
+
221
+ Raises:
222
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
223
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
224
+
225
+ Returns:
226
+ Response[list['UserChecklistCompletion']]
227
+ """
228
+
229
+ kwargs = _get_kwargs(
230
+ created=created,
231
+ is_completed=is_completed,
232
+ modified=modified,
233
+ o=o,
234
+ offering_uuid=offering_uuid,
235
+ page=page,
236
+ page_size=page_size,
237
+ user_uuid=user_uuid,
238
+ )
239
+
240
+ response = await client.get_async_httpx_client().request(**kwargs)
241
+
242
+ return _build_response(client=client, response=response)
243
+
244
+
245
+ async def asyncio(
246
+ *,
247
+ client: AuthenticatedClient,
248
+ created: Union[Unset, datetime.datetime] = UNSET,
249
+ is_completed: Union[Unset, bool] = UNSET,
250
+ modified: Union[Unset, datetime.datetime] = UNSET,
251
+ o: Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]] = UNSET,
252
+ offering_uuid: Union[Unset, UUID] = UNSET,
253
+ page: Union[Unset, int] = UNSET,
254
+ page_size: Union[Unset, int] = UNSET,
255
+ user_uuid: Union[Unset, UUID] = UNSET,
256
+ ) -> list["UserChecklistCompletion"]:
257
+ """Override list to add OfferingUser data optimization.
258
+
259
+ Args:
260
+ created (Union[Unset, datetime.datetime]):
261
+ is_completed (Union[Unset, bool]):
262
+ modified (Union[Unset, datetime.datetime]):
263
+ o (Union[Unset, list[MarketplaceOfferingUserChecklistCompletionsListOItem]]):
264
+ offering_uuid (Union[Unset, UUID]):
265
+ page (Union[Unset, int]):
266
+ page_size (Union[Unset, int]):
267
+ user_uuid (Union[Unset, UUID]):
268
+
269
+ Raises:
270
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
271
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
272
+
273
+ Returns:
274
+ list['UserChecklistCompletion']
275
+ """
276
+
277
+ return (
278
+ await asyncio_detailed(
279
+ client=client,
280
+ created=created,
281
+ is_completed=is_completed,
282
+ modified=modified,
283
+ o=o,
284
+ offering_uuid=offering_uuid,
285
+ page=page,
286
+ page_size=page_size,
287
+ user_uuid=user_uuid,
288
+ )
289
+ ).parsed
@@ -0,0 +1,141 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.user_checklist_completion import UserChecklistCompletion
9
+ from ...types import Response
10
+
11
+
12
+ def _get_kwargs(
13
+ id: int,
14
+ ) -> dict[str, Any]:
15
+ _kwargs: dict[str, Any] = {
16
+ "method": "get",
17
+ "url": f"/api/marketplace-offering-user-checklist-completions/{id}/",
18
+ }
19
+
20
+ return _kwargs
21
+
22
+
23
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> UserChecklistCompletion:
24
+ if response.status_code == 200:
25
+ response_200 = UserChecklistCompletion.from_dict(response.json())
26
+
27
+ return response_200
28
+ raise errors.UnexpectedStatus(response.status_code, response.content)
29
+
30
+
31
+ def _build_response(
32
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
33
+ ) -> Response[UserChecklistCompletion]:
34
+ return Response(
35
+ status_code=HTTPStatus(response.status_code),
36
+ content=response.content,
37
+ headers=response.headers,
38
+ parsed=_parse_response(client=client, response=response),
39
+ )
40
+
41
+
42
+ def sync_detailed(
43
+ id: int,
44
+ *,
45
+ client: AuthenticatedClient,
46
+ ) -> Response[UserChecklistCompletion]:
47
+ """
48
+ Args:
49
+ id (int):
50
+
51
+ Raises:
52
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
53
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
54
+
55
+ Returns:
56
+ Response[UserChecklistCompletion]
57
+ """
58
+
59
+ kwargs = _get_kwargs(
60
+ id=id,
61
+ )
62
+
63
+ response = client.get_httpx_client().request(
64
+ **kwargs,
65
+ )
66
+
67
+ return _build_response(client=client, response=response)
68
+
69
+
70
+ def sync(
71
+ id: int,
72
+ *,
73
+ client: AuthenticatedClient,
74
+ ) -> UserChecklistCompletion:
75
+ """
76
+ Args:
77
+ id (int):
78
+
79
+ Raises:
80
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
81
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
82
+
83
+ Returns:
84
+ UserChecklistCompletion
85
+ """
86
+
87
+ return sync_detailed(
88
+ id=id,
89
+ client=client,
90
+ ).parsed
91
+
92
+
93
+ async def asyncio_detailed(
94
+ id: int,
95
+ *,
96
+ client: AuthenticatedClient,
97
+ ) -> Response[UserChecklistCompletion]:
98
+ """
99
+ Args:
100
+ id (int):
101
+
102
+ Raises:
103
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
104
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
105
+
106
+ Returns:
107
+ Response[UserChecklistCompletion]
108
+ """
109
+
110
+ kwargs = _get_kwargs(
111
+ id=id,
112
+ )
113
+
114
+ response = await client.get_async_httpx_client().request(**kwargs)
115
+
116
+ return _build_response(client=client, response=response)
117
+
118
+
119
+ async def asyncio(
120
+ id: int,
121
+ *,
122
+ client: AuthenticatedClient,
123
+ ) -> UserChecklistCompletion:
124
+ """
125
+ Args:
126
+ id (int):
127
+
128
+ Raises:
129
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
130
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
131
+
132
+ Returns:
133
+ UserChecklistCompletion
134
+ """
135
+
136
+ return (
137
+ await asyncio_detailed(
138
+ id=id,
139
+ client=client,
140
+ )
141
+ ).parsed