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.
- waldur_api_client/api/marketplace_checklists/marketplace_checklists_questions_list.py +31 -32
- waldur_api_client/api/marketplace_checklists/marketplace_checklists_retrieve.py +15 -14
- waldur_api_client/api/marketplace_checklists_admin/__init__.py +1 -0
- waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_checklist_questions.py +187 -0
- waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_create.py +150 -0
- waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_destroy.py +89 -0
- waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_list.py +173 -0
- waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_partial_update.py +164 -0
- waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_retrieve.py +142 -0
- waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_update.py +164 -0
- waldur_api_client/api/marketplace_checklists_admin_question_dependencies/__init__.py +1 -0
- waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_create.py +150 -0
- waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_destroy.py +89 -0
- waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_list.py +212 -0
- waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_partial_update.py +164 -0
- waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_retrieve.py +142 -0
- waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_update.py +164 -0
- waldur_api_client/api/marketplace_checklists_admin_question_options/__init__.py +1 -0
- waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_create.py +150 -0
- waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_destroy.py +89 -0
- waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_list.py +194 -0
- waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_partial_update.py +164 -0
- waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_retrieve.py +142 -0
- waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_update.py +164 -0
- waldur_api_client/api/marketplace_checklists_admin_questions/__init__.py +1 -0
- waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_create.py +148 -0
- waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_destroy.py +89 -0
- waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_list.py +192 -0
- waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_partial_update.py +162 -0
- waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_retrieve.py +140 -0
- waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_update.py +162 -0
- waldur_api_client/models/__init__.py +36 -2
- waldur_api_client/models/answer_list.py +8 -19
- waldur_api_client/models/answer_submit.py +7 -13
- waldur_api_client/models/answer_submit_request.py +7 -13
- waldur_api_client/models/booking_resource.py +18 -0
- waldur_api_client/models/booking_resources_list_field_item.py +2 -0
- waldur_api_client/models/booking_resources_retrieve_field_item.py +2 -0
- waldur_api_client/models/call_resource_template.py +23 -1
- waldur_api_client/models/checklist.py +8 -0
- waldur_api_client/models/checklist_admin.py +127 -0
- waldur_api_client/models/checklist_type_enum.py +10 -0
- waldur_api_client/models/create_checklist.py +131 -0
- waldur_api_client/models/create_checklist_request.py +90 -0
- waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_resources_list_field_item.py +2 -0
- waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +2 -0
- waldur_api_client/models/marketplace_resources_list_field_item.py +2 -0
- waldur_api_client/models/marketplace_resources_retrieve_field_item.py +2 -0
- waldur_api_client/models/open_stack_port.py +15 -4
- waldur_api_client/models/open_stack_router.py +15 -4
- waldur_api_client/models/operator_enum.py +12 -0
- waldur_api_client/models/patched_create_checklist_request.py +96 -0
- waldur_api_client/models/patched_question_admin_request.py +208 -0
- waldur_api_client/models/patched_question_dependency_request.py +94 -0
- waldur_api_client/models/patched_question_options_admin_request.py +68 -0
- waldur_api_client/models/{checklist_question.py → question.py} +29 -16
- waldur_api_client/models/question_admin.py +260 -0
- waldur_api_client/models/question_admin_request.py +210 -0
- waldur_api_client/models/question_dependency.py +127 -0
- waldur_api_client/models/question_dependency_request.py +94 -0
- waldur_api_client/models/question_options.py +79 -0
- waldur_api_client/models/question_options_admin.py +103 -0
- waldur_api_client/models/question_options_admin_request.py +78 -0
- waldur_api_client/models/question_type_enum.py +15 -0
- waldur_api_client/models/resource.py +18 -0
- {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.2.dist-info}/METADATA +1 -1
- {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.2.dist-info}/RECORD +71 -25
- {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.2.dist-info}/LICENSE +0 -0
- {waldur_api_client-7.7.1.dist-info → waldur_api_client-7.7.2.dist-info}/WHEEL +0 -0
|
@@ -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_dependency_request import PatchedQuestionDependencyRequest
|
|
10
|
+
from ...models.question_dependency import QuestionDependency
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: PatchedQuestionDependencyRequest,
|
|
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-dependencies/{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) -> QuestionDependency:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = QuestionDependency.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[QuestionDependency]:
|
|
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: PatchedQuestionDependencyRequest,
|
|
58
|
+
) -> Response[QuestionDependency]:
|
|
59
|
+
"""
|
|
60
|
+
Args:
|
|
61
|
+
uuid (UUID):
|
|
62
|
+
body (PatchedQuestionDependencyRequest):
|
|
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[QuestionDependency]
|
|
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: PatchedQuestionDependencyRequest,
|
|
89
|
+
) -> QuestionDependency:
|
|
90
|
+
"""
|
|
91
|
+
Args:
|
|
92
|
+
uuid (UUID):
|
|
93
|
+
body (PatchedQuestionDependencyRequest):
|
|
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
|
+
QuestionDependency
|
|
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: PatchedQuestionDependencyRequest,
|
|
115
|
+
) -> Response[QuestionDependency]:
|
|
116
|
+
"""
|
|
117
|
+
Args:
|
|
118
|
+
uuid (UUID):
|
|
119
|
+
body (PatchedQuestionDependencyRequest):
|
|
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[QuestionDependency]
|
|
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: PatchedQuestionDependencyRequest,
|
|
144
|
+
) -> QuestionDependency:
|
|
145
|
+
"""
|
|
146
|
+
Args:
|
|
147
|
+
uuid (UUID):
|
|
148
|
+
body (PatchedQuestionDependencyRequest):
|
|
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
|
+
QuestionDependency
|
|
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_dependency import QuestionDependency
|
|
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-dependencies/{uuid}/",
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return _kwargs
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> QuestionDependency:
|
|
25
|
+
if response.status_code == 200:
|
|
26
|
+
response_200 = QuestionDependency.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[QuestionDependency]:
|
|
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[QuestionDependency]:
|
|
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[QuestionDependency]
|
|
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
|
+
) -> QuestionDependency:
|
|
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
|
+
QuestionDependency
|
|
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[QuestionDependency]:
|
|
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[QuestionDependency]
|
|
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
|
+
) -> QuestionDependency:
|
|
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
|
+
QuestionDependency
|
|
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_dependency import QuestionDependency
|
|
10
|
+
from ...models.question_dependency_request import QuestionDependencyRequest
|
|
11
|
+
from ...types import Response
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def _get_kwargs(
|
|
15
|
+
uuid: UUID,
|
|
16
|
+
*,
|
|
17
|
+
body: QuestionDependencyRequest,
|
|
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-dependencies/{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) -> QuestionDependency:
|
|
35
|
+
if response.status_code == 200:
|
|
36
|
+
response_200 = QuestionDependency.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[QuestionDependency]:
|
|
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: QuestionDependencyRequest,
|
|
58
|
+
) -> Response[QuestionDependency]:
|
|
59
|
+
"""
|
|
60
|
+
Args:
|
|
61
|
+
uuid (UUID):
|
|
62
|
+
body (QuestionDependencyRequest):
|
|
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[QuestionDependency]
|
|
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: QuestionDependencyRequest,
|
|
89
|
+
) -> QuestionDependency:
|
|
90
|
+
"""
|
|
91
|
+
Args:
|
|
92
|
+
uuid (UUID):
|
|
93
|
+
body (QuestionDependencyRequest):
|
|
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
|
+
QuestionDependency
|
|
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: QuestionDependencyRequest,
|
|
115
|
+
) -> Response[QuestionDependency]:
|
|
116
|
+
"""
|
|
117
|
+
Args:
|
|
118
|
+
uuid (UUID):
|
|
119
|
+
body (QuestionDependencyRequest):
|
|
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[QuestionDependency]
|
|
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: QuestionDependencyRequest,
|
|
144
|
+
) -> QuestionDependency:
|
|
145
|
+
"""
|
|
146
|
+
Args:
|
|
147
|
+
uuid (UUID):
|
|
148
|
+
body (QuestionDependencyRequest):
|
|
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
|
+
QuestionDependency
|
|
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"""
|
|
@@ -0,0 +1,150 @@
|
|
|
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.question_options_admin import QuestionOptionsAdmin
|
|
9
|
+
from ...models.question_options_admin_request import QuestionOptionsAdminRequest
|
|
10
|
+
from ...types import Response
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def _get_kwargs(
|
|
14
|
+
*,
|
|
15
|
+
body: QuestionOptionsAdminRequest,
|
|
16
|
+
) -> dict[str, Any]:
|
|
17
|
+
headers: dict[str, Any] = {}
|
|
18
|
+
|
|
19
|
+
_kwargs: dict[str, Any] = {
|
|
20
|
+
"method": "post",
|
|
21
|
+
"url": "/api/marketplace-checklists-admin-question-options/",
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
_kwargs["json"] = body.to_dict()
|
|
25
|
+
|
|
26
|
+
headers["Content-Type"] = "application/json"
|
|
27
|
+
|
|
28
|
+
_kwargs["headers"] = headers
|
|
29
|
+
return _kwargs
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> QuestionOptionsAdmin:
|
|
33
|
+
if response.status_code == 201:
|
|
34
|
+
response_201 = QuestionOptionsAdmin.from_dict(response.json())
|
|
35
|
+
|
|
36
|
+
return response_201
|
|
37
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def _build_response(
|
|
41
|
+
*, client: Union[AuthenticatedClient, Client], response: httpx.Response
|
|
42
|
+
) -> Response[QuestionOptionsAdmin]:
|
|
43
|
+
return Response(
|
|
44
|
+
status_code=HTTPStatus(response.status_code),
|
|
45
|
+
content=response.content,
|
|
46
|
+
headers=response.headers,
|
|
47
|
+
parsed=_parse_response(client=client, response=response),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def sync_detailed(
|
|
52
|
+
*,
|
|
53
|
+
client: AuthenticatedClient,
|
|
54
|
+
body: QuestionOptionsAdminRequest,
|
|
55
|
+
) -> Response[QuestionOptionsAdmin]:
|
|
56
|
+
"""
|
|
57
|
+
Args:
|
|
58
|
+
body (QuestionOptionsAdminRequest):
|
|
59
|
+
|
|
60
|
+
Raises:
|
|
61
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
62
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
63
|
+
|
|
64
|
+
Returns:
|
|
65
|
+
Response[QuestionOptionsAdmin]
|
|
66
|
+
"""
|
|
67
|
+
|
|
68
|
+
kwargs = _get_kwargs(
|
|
69
|
+
body=body,
|
|
70
|
+
)
|
|
71
|
+
|
|
72
|
+
response = client.get_httpx_client().request(
|
|
73
|
+
**kwargs,
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
return _build_response(client=client, response=response)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def sync(
|
|
80
|
+
*,
|
|
81
|
+
client: AuthenticatedClient,
|
|
82
|
+
body: QuestionOptionsAdminRequest,
|
|
83
|
+
) -> QuestionOptionsAdmin:
|
|
84
|
+
"""
|
|
85
|
+
Args:
|
|
86
|
+
body (QuestionOptionsAdminRequest):
|
|
87
|
+
|
|
88
|
+
Raises:
|
|
89
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
90
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
91
|
+
|
|
92
|
+
Returns:
|
|
93
|
+
QuestionOptionsAdmin
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
return sync_detailed(
|
|
97
|
+
client=client,
|
|
98
|
+
body=body,
|
|
99
|
+
).parsed
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
async def asyncio_detailed(
|
|
103
|
+
*,
|
|
104
|
+
client: AuthenticatedClient,
|
|
105
|
+
body: QuestionOptionsAdminRequest,
|
|
106
|
+
) -> Response[QuestionOptionsAdmin]:
|
|
107
|
+
"""
|
|
108
|
+
Args:
|
|
109
|
+
body (QuestionOptionsAdminRequest):
|
|
110
|
+
|
|
111
|
+
Raises:
|
|
112
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
113
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
114
|
+
|
|
115
|
+
Returns:
|
|
116
|
+
Response[QuestionOptionsAdmin]
|
|
117
|
+
"""
|
|
118
|
+
|
|
119
|
+
kwargs = _get_kwargs(
|
|
120
|
+
body=body,
|
|
121
|
+
)
|
|
122
|
+
|
|
123
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
124
|
+
|
|
125
|
+
return _build_response(client=client, response=response)
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
async def asyncio(
|
|
129
|
+
*,
|
|
130
|
+
client: AuthenticatedClient,
|
|
131
|
+
body: QuestionOptionsAdminRequest,
|
|
132
|
+
) -> QuestionOptionsAdmin:
|
|
133
|
+
"""
|
|
134
|
+
Args:
|
|
135
|
+
body (QuestionOptionsAdminRequest):
|
|
136
|
+
|
|
137
|
+
Raises:
|
|
138
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
139
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
140
|
+
|
|
141
|
+
Returns:
|
|
142
|
+
QuestionOptionsAdmin
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
await asyncio_detailed(
|
|
147
|
+
client=client,
|
|
148
|
+
body=body,
|
|
149
|
+
)
|
|
150
|
+
).parsed
|
|
@@ -0,0 +1,89 @@
|
|
|
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 ...types import Response
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def _get_kwargs(
|
|
13
|
+
uuid: UUID,
|
|
14
|
+
) -> dict[str, Any]:
|
|
15
|
+
_kwargs: dict[str, Any] = {
|
|
16
|
+
"method": "delete",
|
|
17
|
+
"url": f"/api/marketplace-checklists-admin-question-options/{uuid}/",
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
return _kwargs
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Any:
|
|
24
|
+
if response.status_code == 204:
|
|
25
|
+
return None
|
|
26
|
+
raise errors.UnexpectedStatus(response.status_code, response.content)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _build_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> Response[Any]:
|
|
30
|
+
return Response(
|
|
31
|
+
status_code=HTTPStatus(response.status_code),
|
|
32
|
+
content=response.content,
|
|
33
|
+
headers=response.headers,
|
|
34
|
+
parsed=_parse_response(client=client, response=response),
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
def sync_detailed(
|
|
39
|
+
uuid: UUID,
|
|
40
|
+
*,
|
|
41
|
+
client: AuthenticatedClient,
|
|
42
|
+
) -> Response[Any]:
|
|
43
|
+
"""
|
|
44
|
+
Args:
|
|
45
|
+
uuid (UUID):
|
|
46
|
+
|
|
47
|
+
Raises:
|
|
48
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
49
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
50
|
+
|
|
51
|
+
Returns:
|
|
52
|
+
Response[Any]
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
kwargs = _get_kwargs(
|
|
56
|
+
uuid=uuid,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
response = client.get_httpx_client().request(
|
|
60
|
+
**kwargs,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
return _build_response(client=client, response=response)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
async def asyncio_detailed(
|
|
67
|
+
uuid: UUID,
|
|
68
|
+
*,
|
|
69
|
+
client: AuthenticatedClient,
|
|
70
|
+
) -> Response[Any]:
|
|
71
|
+
"""
|
|
72
|
+
Args:
|
|
73
|
+
uuid (UUID):
|
|
74
|
+
|
|
75
|
+
Raises:
|
|
76
|
+
errors.UnexpectedStatus: If the server returns an undocumented status code.
|
|
77
|
+
httpx.TimeoutException: If the request takes longer than Client.timeout.
|
|
78
|
+
|
|
79
|
+
Returns:
|
|
80
|
+
Response[Any]
|
|
81
|
+
"""
|
|
82
|
+
|
|
83
|
+
kwargs = _get_kwargs(
|
|
84
|
+
uuid=uuid,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
response = await client.get_async_httpx_client().request(**kwargs)
|
|
88
|
+
|
|
89
|
+
return _build_response(client=client, response=response)
|