waldur-api-client 7.7.0__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 (83) hide show
  1. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_create.py +8 -4
  2. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_destroy.py +4 -2
  3. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_list.py +4 -4
  4. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_partial_update.py +8 -4
  5. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_retrieve.py +8 -4
  6. waldur_api_client/api/autoprovisioning_rules/autoprovisioning_rules_update.py +8 -4
  7. waldur_api_client/api/marketplace_checklists/marketplace_checklists_questions_list.py +31 -32
  8. waldur_api_client/api/marketplace_checklists/marketplace_checklists_retrieve.py +15 -14
  9. waldur_api_client/api/marketplace_checklists_admin/__init__.py +1 -0
  10. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_checklist_questions.py +187 -0
  11. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_create.py +150 -0
  12. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_destroy.py +89 -0
  13. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_list.py +173 -0
  14. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_partial_update.py +164 -0
  15. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_retrieve.py +142 -0
  16. waldur_api_client/api/marketplace_checklists_admin/marketplace_checklists_admin_update.py +164 -0
  17. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/__init__.py +1 -0
  18. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_create.py +150 -0
  19. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_destroy.py +89 -0
  20. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_list.py +212 -0
  21. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_partial_update.py +164 -0
  22. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_retrieve.py +142 -0
  23. waldur_api_client/api/marketplace_checklists_admin_question_dependencies/marketplace_checklists_admin_question_dependencies_update.py +164 -0
  24. waldur_api_client/api/marketplace_checklists_admin_question_options/__init__.py +1 -0
  25. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_create.py +150 -0
  26. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_destroy.py +89 -0
  27. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_list.py +194 -0
  28. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_partial_update.py +164 -0
  29. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_retrieve.py +142 -0
  30. waldur_api_client/api/marketplace_checklists_admin_question_options/marketplace_checklists_admin_question_options_update.py +164 -0
  31. waldur_api_client/api/marketplace_checklists_admin_questions/__init__.py +1 -0
  32. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_create.py +148 -0
  33. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_destroy.py +89 -0
  34. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_list.py +192 -0
  35. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_partial_update.py +162 -0
  36. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_retrieve.py +140 -0
  37. waldur_api_client/api/marketplace_checklists_admin_questions/marketplace_checklists_admin_questions_update.py +162 -0
  38. waldur_api_client/models/__init__.py +36 -2
  39. waldur_api_client/models/answer_list.py +8 -19
  40. waldur_api_client/models/answer_submit.py +7 -13
  41. waldur_api_client/models/answer_submit_request.py +7 -13
  42. waldur_api_client/models/booking_resource.py +18 -0
  43. waldur_api_client/models/booking_resources_list_field_item.py +2 -0
  44. waldur_api_client/models/booking_resources_retrieve_field_item.py +2 -0
  45. waldur_api_client/models/call_resource_template.py +23 -1
  46. waldur_api_client/models/checklist.py +8 -0
  47. waldur_api_client/models/checklist_admin.py +127 -0
  48. waldur_api_client/models/checklist_type_enum.py +10 -0
  49. waldur_api_client/models/create_checklist.py +131 -0
  50. waldur_api_client/models/create_checklist_request.py +90 -0
  51. waldur_api_client/models/group_invitation.py +16 -5
  52. waldur_api_client/models/group_invitation_request.py +16 -5
  53. waldur_api_client/models/marketplace_provider_resources_details_retrieve_field_item.py +2 -0
  54. waldur_api_client/models/marketplace_provider_resources_list_field_item.py +2 -0
  55. waldur_api_client/models/marketplace_provider_resources_retrieve_field_item.py +2 -0
  56. waldur_api_client/models/marketplace_resources_details_retrieve_field_item.py +2 -0
  57. waldur_api_client/models/marketplace_resources_list_field_item.py +2 -0
  58. waldur_api_client/models/marketplace_resources_retrieve_field_item.py +2 -0
  59. waldur_api_client/models/open_stack_floating_ip.py +21 -0
  60. waldur_api_client/models/open_stack_port.py +15 -4
  61. waldur_api_client/models/open_stack_router.py +15 -4
  62. waldur_api_client/models/openstack_floating_ips_list_field_item.py +1 -0
  63. waldur_api_client/models/openstack_floating_ips_retrieve_field_item.py +1 -0
  64. waldur_api_client/models/operator_enum.py +12 -0
  65. waldur_api_client/models/patched_create_checklist_request.py +96 -0
  66. waldur_api_client/models/patched_question_admin_request.py +208 -0
  67. waldur_api_client/models/patched_question_dependency_request.py +94 -0
  68. waldur_api_client/models/patched_question_options_admin_request.py +68 -0
  69. waldur_api_client/models/{checklist_question.py → question.py} +29 -16
  70. waldur_api_client/models/question_admin.py +260 -0
  71. waldur_api_client/models/question_admin_request.py +210 -0
  72. waldur_api_client/models/question_dependency.py +127 -0
  73. waldur_api_client/models/question_dependency_request.py +94 -0
  74. waldur_api_client/models/question_options.py +79 -0
  75. waldur_api_client/models/question_options_admin.py +103 -0
  76. waldur_api_client/models/question_options_admin_request.py +78 -0
  77. waldur_api_client/models/question_type_enum.py +15 -0
  78. waldur_api_client/models/resource.py +18 -0
  79. waldur_api_client/models/rule.py +46 -6
  80. {waldur_api_client-7.7.0.dist-info → waldur_api_client-7.7.2.dist-info}/METADATA +1 -1
  81. {waldur_api_client-7.7.0.dist-info → waldur_api_client-7.7.2.dist-info}/RECORD +83 -37
  82. {waldur_api_client-7.7.0.dist-info → waldur_api_client-7.7.2.dist-info}/LICENSE +0 -0
  83. {waldur_api_client-7.7.0.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.create_checklist import CreateChecklist
10
+ from ...models.patched_create_checklist_request import PatchedCreateChecklistRequest
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: PatchedCreateChecklistRequest,
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/{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) -> CreateChecklist:
35
+ if response.status_code == 200:
36
+ response_200 = CreateChecklist.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[CreateChecklist]:
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: PatchedCreateChecklistRequest,
58
+ ) -> Response[CreateChecklist]:
59
+ """
60
+ Args:
61
+ uuid (UUID):
62
+ body (PatchedCreateChecklistRequest):
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[CreateChecklist]
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: PatchedCreateChecklistRequest,
89
+ ) -> CreateChecklist:
90
+ """
91
+ Args:
92
+ uuid (UUID):
93
+ body (PatchedCreateChecklistRequest):
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
+ CreateChecklist
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: PatchedCreateChecklistRequest,
115
+ ) -> Response[CreateChecklist]:
116
+ """
117
+ Args:
118
+ uuid (UUID):
119
+ body (PatchedCreateChecklistRequest):
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[CreateChecklist]
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: PatchedCreateChecklistRequest,
144
+ ) -> CreateChecklist:
145
+ """
146
+ Args:
147
+ uuid (UUID):
148
+ body (PatchedCreateChecklistRequest):
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
+ CreateChecklist
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.checklist_admin import ChecklistAdmin
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/{uuid}/",
19
+ }
20
+
21
+ return _kwargs
22
+
23
+
24
+ def _parse_response(*, client: Union[AuthenticatedClient, Client], response: httpx.Response) -> ChecklistAdmin:
25
+ if response.status_code == 200:
26
+ response_200 = ChecklistAdmin.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[ChecklistAdmin]:
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[ChecklistAdmin]:
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[ChecklistAdmin]
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
+ ) -> ChecklistAdmin:
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
+ ChecklistAdmin
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[ChecklistAdmin]:
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[ChecklistAdmin]
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
+ ) -> ChecklistAdmin:
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
+ ChecklistAdmin
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.create_checklist import CreateChecklist
10
+ from ...models.create_checklist_request import CreateChecklistRequest
11
+ from ...types import Response
12
+
13
+
14
+ def _get_kwargs(
15
+ uuid: UUID,
16
+ *,
17
+ body: CreateChecklistRequest,
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/{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) -> CreateChecklist:
35
+ if response.status_code == 200:
36
+ response_200 = CreateChecklist.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[CreateChecklist]:
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: CreateChecklistRequest,
58
+ ) -> Response[CreateChecklist]:
59
+ """
60
+ Args:
61
+ uuid (UUID):
62
+ body (CreateChecklistRequest):
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[CreateChecklist]
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: CreateChecklistRequest,
89
+ ) -> CreateChecklist:
90
+ """
91
+ Args:
92
+ uuid (UUID):
93
+ body (CreateChecklistRequest):
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
+ CreateChecklist
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: CreateChecklistRequest,
115
+ ) -> Response[CreateChecklist]:
116
+ """
117
+ Args:
118
+ uuid (UUID):
119
+ body (CreateChecklistRequest):
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[CreateChecklist]
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: CreateChecklistRequest,
144
+ ) -> CreateChecklist:
145
+ """
146
+ Args:
147
+ uuid (UUID):
148
+ body (CreateChecklistRequest):
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
+ CreateChecklist
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_dependency import QuestionDependency
9
+ from ...models.question_dependency_request import QuestionDependencyRequest
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ body: QuestionDependencyRequest,
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-dependencies/",
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) -> QuestionDependency:
33
+ if response.status_code == 201:
34
+ response_201 = QuestionDependency.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[QuestionDependency]:
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: QuestionDependencyRequest,
55
+ ) -> Response[QuestionDependency]:
56
+ """
57
+ Args:
58
+ body (QuestionDependencyRequest):
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[QuestionDependency]
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: QuestionDependencyRequest,
83
+ ) -> QuestionDependency:
84
+ """
85
+ Args:
86
+ body (QuestionDependencyRequest):
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
+ QuestionDependency
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: QuestionDependencyRequest,
106
+ ) -> Response[QuestionDependency]:
107
+ """
108
+ Args:
109
+ body (QuestionDependencyRequest):
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[QuestionDependency]
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: QuestionDependencyRequest,
132
+ ) -> QuestionDependency:
133
+ """
134
+ Args:
135
+ body (QuestionDependencyRequest):
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
+ QuestionDependency
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-dependencies/{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)