waldur-api-client 7.7.1__py3-none-any.whl → 7.7.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 (71) hide show
  1. waldur_api_client/api/marketplace_checklists/marketplace_checklists_questions_list.py +31 -32
  2. waldur_api_client/api/marketplace_checklists/marketplace_checklists_retrieve.py +15 -14
  3. waldur_api_client/api/marketplace_checklists_admin/__init__.py +1 -0
  4. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_checklist_questions.py +187 -0
  5. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_create.py +150 -0
  6. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_destroy.py +89 -0
  7. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_list.py +173 -0
  8. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_partial_update.py +164 -0
  9. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_retrieve.py +142 -0
  10. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_update.py +164 -0
  11. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/__init__.py +1 -0
  12. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_create.py +150 -0
  13. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_destroy.py +89 -0
  14. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_list.py +212 -0
  15. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_partial_update.py +164 -0
  16. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_retrieve.py +142 -0
  17. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_update.py +164 -0
  18. waldur_api_client/api/marketplace_checklists_admin_question_options/__init__.py +1 -0
  19. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_create.py +150 -0
  20. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_destroy.py +89 -0
  21. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_list.py +194 -0
  22. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_partial_update.py +164 -0
  23. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_retrieve.py +142 -0
  24. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_update.py +164 -0
  25. waldur_api_client/api/marketplace_checklists_admin_questions/__init__.py +1 -0
  26. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_create.py +148 -0
  27. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_destroy.py +89 -0
  28. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_list.py +192 -0
  29. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_partial_update.py +162 -0
  30. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_retrieve.py +140 -0
  31. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_update.py +162 -0
  32. waldur_api_client/models/__init__.py +36 -2
  33. waldur_api_client/models/answer_list.py +8 -19
  34. waldur_api_client/models/answer_submit.py +7 -13
  35. waldur_api_client/models/answer_submit_request.py +7 -13
  36. waldur_api_client/models/booking_resource.py +18 -0
  37. waldur_api_client/models/booking_resources_list_field_item.py +2 -0
  38. waldur_api_client/models/booking_resources_retrieve_field_item.py +2 -0
  39. waldur_api_client/models/call_resource_template.py +23 -1
  40. waldur_api_client/models/checklist.py +8 -0
  41. waldur_api_client/models/checklist_admin.py +127 -0
  42. waldur_api_client/models/checklist_type_enum.py +10 -0
  43. waldur_api_client/models/create_checklist.py +131 -0
  44. waldur_api_client/models/create_checklist_request.py +90 -0
  45. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +2 -0
  46. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +2 -0
  47. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +2 -0
  48. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +2 -0
  49. waldur_api_client/models/marketplace_resources_list_field_item.py +2 -0
  50. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +2 -0
  51. waldur_api_client/models/open_stack_port.py +15 -4
  52. waldur_api_client/models/open_stack_router.py +15 -4
  53. waldur_api_client/models/operator_enum.py +12 -0
  54. waldur_api_client/models/patched_create_checklist_request.py +96 -0
  55. waldur_api_client/models/patched_question_admin_request.py +208 -0
  56. waldur_api_client/models/patched_question_dependency_request.py +94 -0
  57. waldur_api_client/models/patched_question_options_admin_request.py +68 -0
  58. waldur_api_client/models/{checklist_question.py → question.py} +29 -16
  59. waldur_api_client/models/question_admin.py +260 -0
  60. waldur_api_client/models/question_admin_request.py +210 -0
  61. waldur_api_client/models/question_dependency.py +127 -0
  62. waldur_api_client/models/question_dependency_request.py +94 -0
  63. waldur_api_client/models/question_options.py +79 -0
  64. waldur_api_client/models/question_options_admin.py +103 -0
  65. waldur_api_client/models/question_options_admin_request.py +78 -0
  66. waldur_api_client/models/question_type_enum.py +15 -0
  67. waldur_api_client/models/resource.py +18 -0
  68. {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.2.dist-info}/METADATA +1 -1
  69. {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.2.dist-info}/RECORD +71 -25
  70. {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.2.dist-info}/LICENSE +0 -0
  71. {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.2.dist-info}/WHEEL +0 -0
@@ -0,0 +1,194 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.question_options_admin import QuestionOptionsAdmin
10
+ from ...types import UNSET, Response, Unset
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ page: Union[Unset, int] = UNSET,
16
+ page_size: Union[Unset, int] = UNSET,
17
+ question_uuid: Union[Unset, UUID] = UNSET,
18
+ ) -> dict[str, Any]:
19
+ params: dict[str, Any] = {}
20
+
21
+ params["page"] = page
22
+
23
+ params["page_size"] = page_size
24
+
25
+ json_question_uuid: Union[Unset, str] = UNSET
26
+ if not isinstance(question_uuid, Unset):
27
+ json_question_uuid = str(question_uuid)
28
+ params["question_uuid"] = json_question_uuid
29
+
30
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
31
+
32
+ _kwargs: dict[str, Any] = {
33
+ "method": "get",
34
+ "url": "/api/marketplace-checklists-admin-question-options/",
35
+ "params": params,
36
+ }
37
+
38
+ return _kwargs
39
+
40
+
41
+ def _parse_response(
42
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
43
+ ) -> list["QuestionOptionsAdmin"]:
44
+ if response.status_code == 200:
45
+ response_200 = []
46
+ _response_200 = response.json()
47
+ for response_200_item_data in _response_200:
48
+ response_200_item = QuestionOptionsAdmin.from_dict(response_200_item_data)
49
+
50
+ response_200.append(response_200_item)
51
+
52
+ return response_200
53
+ raise errors.UnexpectedStatus(response.status_code, response.content)
54
+
55
+
56
+ def _build_response(
57
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
58
+ ) -> Response[list["QuestionOptionsAdmin"]]:
59
+ return Response(
60
+ status_code=HTTPStatus(response.status_code),
61
+ content=response.content,
62
+ headers=response.headers,
63
+ parsed=_parse_response(client=client, response=response),
64
+ )
65
+
66
+
67
+ def sync_detailed(
68
+ *,
69
+ client: AuthenticatedClient,
70
+ page: Union[Unset, int] = UNSET,
71
+ page_size: Union[Unset, int] = UNSET,
72
+ question_uuid: Union[Unset, UUID] = UNSET,
73
+ ) -> Response[list["QuestionOptionsAdmin"]]:
74
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
75
+
76
+ Args:
77
+ page (Union[Unset, int]):
78
+ page_size (Union[Unset, int]):
79
+ question_uuid (Union[Unset, UUID]):
80
+
81
+ Raises:
82
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
83
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
84
+
85
+ Returns:
86
+ Response[list['QuestionOptionsAdmin']]
87
+ """
88
+
89
+ kwargs = _get_kwargs(
90
+ page=page,
91
+ page_size=page_size,
92
+ question_uuid=question_uuid,
93
+ )
94
+
95
+ response = client.get_httpx_client().request(
96
+ **kwargs,
97
+ )
98
+
99
+ return _build_response(client=client, response=response)
100
+
101
+
102
+ def sync(
103
+ *,
104
+ client: AuthenticatedClient,
105
+ page: Union[Unset, int] = UNSET,
106
+ page_size: Union[Unset, int] = UNSET,
107
+ question_uuid: Union[Unset, UUID] = UNSET,
108
+ ) -> list["QuestionOptionsAdmin"]:
109
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
110
+
111
+ Args:
112
+ page (Union[Unset, int]):
113
+ page_size (Union[Unset, int]):
114
+ question_uuid (Union[Unset, UUID]):
115
+
116
+ Raises:
117
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
118
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
119
+
120
+ Returns:
121
+ list['QuestionOptionsAdmin']
122
+ """
123
+
124
+ return sync_detailed(
125
+ client=client,
126
+ page=page,
127
+ page_size=page_size,
128
+ question_uuid=question_uuid,
129
+ ).parsed
130
+
131
+
132
+ async def asyncio_detailed(
133
+ *,
134
+ client: AuthenticatedClient,
135
+ page: Union[Unset, int] = UNSET,
136
+ page_size: Union[Unset, int] = UNSET,
137
+ question_uuid: Union[Unset, UUID] = UNSET,
138
+ ) -> Response[list["QuestionOptionsAdmin"]]:
139
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
140
+
141
+ Args:
142
+ page (Union[Unset, int]):
143
+ page_size (Union[Unset, int]):
144
+ question_uuid (Union[Unset, UUID]):
145
+
146
+ Raises:
147
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
148
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
149
+
150
+ Returns:
151
+ Response[list['QuestionOptionsAdmin']]
152
+ """
153
+
154
+ kwargs = _get_kwargs(
155
+ page=page,
156
+ page_size=page_size,
157
+ question_uuid=question_uuid,
158
+ )
159
+
160
+ response = await client.get_async_httpx_client().request(**kwargs)
161
+
162
+ return _build_response(client=client, response=response)
163
+
164
+
165
+ async def asyncio(
166
+ *,
167
+ client: AuthenticatedClient,
168
+ page: Union[Unset, int] = UNSET,
169
+ page_size: Union[Unset, int] = UNSET,
170
+ question_uuid: Union[Unset, UUID] = UNSET,
171
+ ) -> list["QuestionOptionsAdmin"]:
172
+ """Mixin to optimize HEAD requests for DRF views bypassing serializer processing
173
+
174
+ Args:
175
+ page (Union[Unset, int]):
176
+ page_size (Union[Unset, int]):
177
+ question_uuid (Union[Unset, UUID]):
178
+
179
+ Raises:
180
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
181
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
182
+
183
+ Returns:
184
+ list['QuestionOptionsAdmin']
185
+ """
186
+
187
+ return (
188
+ await asyncio_detailed(
189
+ client=client,
190
+ page=page,
191
+ page_size=page_size,
192
+ question_uuid=question_uuid,
193
+ )
194
+ ).parsed
@@ -0,0 +1,164 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.patched_question_options_admin_request import PatchedQuestionOptionsAdminRequest
10
+ from ...models.question_options_admin import QuestionOptionsAdmin
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: PatchedQuestionOptionsAdminRequest,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "patch",
23
+ "url": f"/api/marketplace-checklists-admin-question-options/{uuid}/",
24
+ }
25
+
26
+ _kwargs["json"] = body.to_dict()
27
+
28
+ headers["Content-Type"] = "application/json"
29
+
30
+ _kwargs["headers"] = headers
31
+ return _kwargs
32
+
33
+
34
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> QuestionOptionsAdmin:
35
+ if response.status_code == 200:
36
+ response_200 = QuestionOptionsAdmin.from_dict(response.json())
37
+
38
+ return response_200
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+
41
+
42
+ def _build_response(
43
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
44
+ ) -> Response[QuestionOptionsAdmin]:
45
+ return Response(
46
+ status_code=HTTPStatus(response.status_code),
47
+ content=response.content,
48
+ headers=response.headers,
49
+ parsed=_parse_response(client=client, response=response),
50
+ )
51
+
52
+
53
+ def sync_detailed(
54
+ uuid: UUID,
55
+ *,
56
+ client: AuthenticatedClient,
57
+ body: PatchedQuestionOptionsAdminRequest,
58
+ ) -> Response[QuestionOptionsAdmin]:
59
+ """
60
+ Args:
61
+ uuid (UUID):
62
+ body (PatchedQuestionOptionsAdminRequest):
63
+
64
+ Raises:
65
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
66
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
67
+
68
+ Returns:
69
+ Response[QuestionOptionsAdmin]
70
+ """
71
+
72
+ kwargs = _get_kwargs(
73
+ uuid=uuid,
74
+ body=body,
75
+ )
76
+
77
+ response = client.get_httpx_client().request(
78
+ **kwargs,
79
+ )
80
+
81
+ return _build_response(client=client, response=response)
82
+
83
+
84
+ def sync(
85
+ uuid: UUID,
86
+ *,
87
+ client: AuthenticatedClient,
88
+ body: PatchedQuestionOptionsAdminRequest,
89
+ ) -> QuestionOptionsAdmin:
90
+ """
91
+ Args:
92
+ uuid (UUID):
93
+ body (PatchedQuestionOptionsAdminRequest):
94
+
95
+ Raises:
96
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
97
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
98
+
99
+ Returns:
100
+ QuestionOptionsAdmin
101
+ """
102
+
103
+ return sync_detailed(
104
+ uuid=uuid,
105
+ client=client,
106
+ body=body,
107
+ ).parsed
108
+
109
+
110
+ async def asyncio_detailed(
111
+ uuid: UUID,
112
+ *,
113
+ client: AuthenticatedClient,
114
+ body: PatchedQuestionOptionsAdminRequest,
115
+ ) -> Response[QuestionOptionsAdmin]:
116
+ """
117
+ Args:
118
+ uuid (UUID):
119
+ body (PatchedQuestionOptionsAdminRequest):
120
+
121
+ Raises:
122
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
123
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
124
+
125
+ Returns:
126
+ Response[QuestionOptionsAdmin]
127
+ """
128
+
129
+ kwargs = _get_kwargs(
130
+ uuid=uuid,
131
+ body=body,
132
+ )
133
+
134
+ response = await client.get_async_httpx_client().request(**kwargs)
135
+
136
+ return _build_response(client=client, response=response)
137
+
138
+
139
+ async def asyncio(
140
+ uuid: UUID,
141
+ *,
142
+ client: AuthenticatedClient,
143
+ body: PatchedQuestionOptionsAdminRequest,
144
+ ) -> QuestionOptionsAdmin:
145
+ """
146
+ Args:
147
+ uuid (UUID):
148
+ body (PatchedQuestionOptionsAdminRequest):
149
+
150
+ Raises:
151
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
152
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
153
+
154
+ Returns:
155
+ QuestionOptionsAdmin
156
+ """
157
+
158
+ return (
159
+ await asyncio_detailed(
160
+ uuid=uuid,
161
+ client=client,
162
+ body=body,
163
+ )
164
+ ).parsed
@@ -0,0 +1,142 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.question_options_admin import QuestionOptionsAdmin
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ uuid: UUID,
15
+ ) -> dict[str, Any]:
16
+ _kwargs: dict[str, Any] = {
17
+ "method": "get",
18
+ "url": f"/api/marketplace-checklists-admin-question-options/{uuid}/",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> QuestionOptionsAdmin:
25
+ if response.status_code == 200:
26
+ response_200 = QuestionOptionsAdmin.from_dict(response.json())
27
+
28
+ return response_200
29
+ raise errors.UnexpectedStatus(response.status_code, response.content)
30
+
31
+
32
+ def _build_response(
33
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
34
+ ) -> Response[QuestionOptionsAdmin]:
35
+ return Response(
36
+ status_code=HTTPStatus(response.status_code),
37
+ content=response.content,
38
+ headers=response.headers,
39
+ parsed=_parse_response(client=client, response=response),
40
+ )
41
+
42
+
43
+ def sync_detailed(
44
+ uuid: UUID,
45
+ *,
46
+ client: AuthenticatedClient,
47
+ ) -> Response[QuestionOptionsAdmin]:
48
+ """
49
+ Args:
50
+ uuid (UUID):
51
+
52
+ Raises:
53
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
54
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
55
+
56
+ Returns:
57
+ Response[QuestionOptionsAdmin]
58
+ """
59
+
60
+ kwargs = _get_kwargs(
61
+ uuid=uuid,
62
+ )
63
+
64
+ response = client.get_httpx_client().request(
65
+ **kwargs,
66
+ )
67
+
68
+ return _build_response(client=client, response=response)
69
+
70
+
71
+ def sync(
72
+ uuid: UUID,
73
+ *,
74
+ client: AuthenticatedClient,
75
+ ) -> QuestionOptionsAdmin:
76
+ """
77
+ Args:
78
+ uuid (UUID):
79
+
80
+ Raises:
81
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
82
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
83
+
84
+ Returns:
85
+ QuestionOptionsAdmin
86
+ """
87
+
88
+ return sync_detailed(
89
+ uuid=uuid,
90
+ client=client,
91
+ ).parsed
92
+
93
+
94
+ async def asyncio_detailed(
95
+ uuid: UUID,
96
+ *,
97
+ client: AuthenticatedClient,
98
+ ) -> Response[QuestionOptionsAdmin]:
99
+ """
100
+ Args:
101
+ uuid (UUID):
102
+
103
+ Raises:
104
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
105
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
106
+
107
+ Returns:
108
+ Response[QuestionOptionsAdmin]
109
+ """
110
+
111
+ kwargs = _get_kwargs(
112
+ uuid=uuid,
113
+ )
114
+
115
+ response = await client.get_async_httpx_client().request(**kwargs)
116
+
117
+ return _build_response(client=client, response=response)
118
+
119
+
120
+ async def asyncio(
121
+ uuid: UUID,
122
+ *,
123
+ client: AuthenticatedClient,
124
+ ) -> QuestionOptionsAdmin:
125
+ """
126
+ Args:
127
+ uuid (UUID):
128
+
129
+ Raises:
130
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
131
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
132
+
133
+ Returns:
134
+ QuestionOptionsAdmin
135
+ """
136
+
137
+ return (
138
+ await asyncio_detailed(
139
+ uuid=uuid,
140
+ client=client,
141
+ )
142
+ ).parsed
@@ -0,0 +1,164 @@
1
+ from http import HTTPStatus
2
+ from typing import Any, Union
3
+ from uuid import UUID
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.question_options_admin import QuestionOptionsAdmin
10
+ from ...models.question_options_admin_request import QuestionOptionsAdminRequest
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: QuestionOptionsAdminRequest,
18
+ ) -> dict[str, Any]:
19
+ headers: dict[str, Any] = {}
20
+
21
+ _kwargs: dict[str, Any] = {
22
+ "method": "put",
23
+ "url": f"/api/marketplace-checklists-admin-question-options/{uuid}/",
24
+ }
25
+
26
+ _kwargs["json"] = body.to_dict()
27
+
28
+ headers["Content-Type"] = "application/json"
29
+
30
+ _kwargs["headers"] = headers
31
+ return _kwargs
32
+
33
+
34
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> QuestionOptionsAdmin:
35
+ if response.status_code == 200:
36
+ response_200 = QuestionOptionsAdmin.from_dict(response.json())
37
+
38
+ return response_200
39
+ raise errors.UnexpectedStatus(response.status_code, response.content)
40
+
41
+
42
+ def _build_response(
43
+ *, client: Union[AuthenticatedClient, Client], response: httpx.Response
44
+ ) -> Response[QuestionOptionsAdmin]:
45
+ return Response(
46
+ status_code=HTTPStatus(response.status_code),
47
+ content=response.content,
48
+ headers=response.headers,
49
+ parsed=_parse_response(client=client, response=response),
50
+ )
51
+
52
+
53
+ def sync_detailed(
54
+ uuid: UUID,
55
+ *,
56
+ client: AuthenticatedClient,
57
+ body: QuestionOptionsAdminRequest,
58
+ ) -> Response[QuestionOptionsAdmin]:
59
+ """
60
+ Args:
61
+ uuid (UUID):
62
+ body (QuestionOptionsAdminRequest):
63
+
64
+ Raises:
65
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
66
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
67
+
68
+ Returns:
69
+ Response[QuestionOptionsAdmin]
70
+ """
71
+
72
+ kwargs = _get_kwargs(
73
+ uuid=uuid,
74
+ body=body,
75
+ )
76
+
77
+ response = client.get_httpx_client().request(
78
+ **kwargs,
79
+ )
80
+
81
+ return _build_response(client=client, response=response)
82
+
83
+
84
+ def sync(
85
+ uuid: UUID,
86
+ *,
87
+ client: AuthenticatedClient,
88
+ body: QuestionOptionsAdminRequest,
89
+ ) -> QuestionOptionsAdmin:
90
+ """
91
+ Args:
92
+ uuid (UUID):
93
+ body (QuestionOptionsAdminRequest):
94
+
95
+ Raises:
96
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
97
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
98
+
99
+ Returns:
100
+ QuestionOptionsAdmin
101
+ """
102
+
103
+ return sync_detailed(
104
+ uuid=uuid,
105
+ client=client,
106
+ body=body,
107
+ ).parsed
108
+
109
+
110
+ async def asyncio_detailed(
111
+ uuid: UUID,
112
+ *,
113
+ client: AuthenticatedClient,
114
+ body: QuestionOptionsAdminRequest,
115
+ ) -> Response[QuestionOptionsAdmin]:
116
+ """
117
+ Args:
118
+ uuid (UUID):
119
+ body (QuestionOptionsAdminRequest):
120
+
121
+ Raises:
122
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
123
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
124
+
125
+ Returns:
126
+ Response[QuestionOptionsAdmin]
127
+ """
128
+
129
+ kwargs = _get_kwargs(
130
+ uuid=uuid,
131
+ body=body,
132
+ )
133
+
134
+ response = await client.get_async_httpx_client().request(**kwargs)
135
+
136
+ return _build_response(client=client, response=response)
137
+
138
+
139
+ async def asyncio(
140
+ uuid: UUID,
141
+ *,
142
+ client: AuthenticatedClient,
143
+ body: QuestionOptionsAdminRequest,
144
+ ) -> QuestionOptionsAdmin:
145
+ """
146
+ Args:
147
+ uuid (UUID):
148
+ body (QuestionOptionsAdminRequest):
149
+
150
+ Raises:
151
+ errors.UnexpectedStatus: If the server returns an undocumented status code.
152
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
153
+
154
+ Returns:
155
+ QuestionOptionsAdmin
156
+ """
157
+
158
+ return (
159
+ await asyncio_detailed(
160
+ uuid=uuid,
161
+ client=client,
162
+ body=body,
163
+ )
164
+ ).parsed
@@ -0,0 +1 @@
1
+ """Contains endpoint functions for accessing the API"""